mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-05 14:59:01 +00:00
CHANGED: #1471 instead of CInterfaceManager, the new global db manager will be used.
This commit is contained in:
parent
bb9101ae9f
commit
dc6c1db2cd
99 changed files with 1706 additions and 1780 deletions
|
@ -319,7 +319,7 @@ void CCDBSynchronised::writeInitInProgressIntoUIDB()
|
|||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
if (pIM)
|
||||
pIM->getDbProp("UI:VARIABLES:CDB_INIT_IN_PROGRESS")->setValueBool(_InitInProgress);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:CDB_INIT_IN_PROGRESS")->setValueBool(_InitInProgress);
|
||||
else
|
||||
nlwarning("InterfaceManager not created");
|
||||
}
|
||||
|
|
|
@ -8387,7 +8387,7 @@ ADD_METHOD(void CCharacterCL::displayDebug(float x, float &y, float lineStep)) /
|
|||
TextContext->printfAt(x, y, "Mount: %3u(Theoretical: %3u) Rider: %3u(Theoretical: %3u)", mount(), _TheoreticalMount, rider(), _TheoreticalRider);
|
||||
y += lineStep;
|
||||
// VPA
|
||||
sint64 prop = IM->getDbProp("SERVER:Entities:E"+toString("%d", _Slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
||||
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", _Slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
||||
if(isPlayer() || isUser())
|
||||
{
|
||||
SPropVisualA visualA = *(SPropVisualA *)(&prop);
|
||||
|
@ -8403,7 +8403,7 @@ ADD_METHOD(void CCharacterCL::displayDebug(float x, float &y, float lineStep)) /
|
|||
TextContext->printfAt(x, y, "VPA: %"NL_I64"X", prop);
|
||||
y += lineStep;
|
||||
// VPB
|
||||
prop = IM->getDbProp("SERVER:Entities:E"+toString("%d", _Slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
||||
prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", _Slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
||||
if(isPlayer() || isUser())
|
||||
{
|
||||
SPropVisualB visualB = *(SPropVisualB *)(&prop);
|
||||
|
@ -8415,7 +8415,7 @@ ADD_METHOD(void CCharacterCL::displayDebug(float x, float &y, float lineStep)) /
|
|||
TextContext->printfAt(x, y, "VPB: %"NL_I64"X", prop);
|
||||
y += lineStep;
|
||||
// VPC
|
||||
prop = IM->getDbProp("SERVER:Entities:E"+toString("%d", _Slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64();
|
||||
prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", _Slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64();
|
||||
if(isPlayer() || isUser())
|
||||
{
|
||||
SPropVisualC visualC = *(SPropVisualC *)(&prop);
|
||||
|
@ -8547,7 +8547,7 @@ void CCharacterCL::load() // virtual
|
|||
_LookRdy = false;
|
||||
// Visual properties A
|
||||
_HeadIdx = CEntityCL::BadIndex;
|
||||
sint64 prop = IM->getDbProp("SERVER:Entities:E"+toString("%d", _Slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
||||
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", _Slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
||||
updateVisualPropertyVpa(0, prop);
|
||||
}
|
||||
}// load //
|
||||
|
@ -9798,11 +9798,11 @@ NLMISC_COMMAND(weapon, "change the weapon in hand", "<slot> <hand> <weapon>")
|
|||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
uint slot;
|
||||
fromString(args[0], slot);
|
||||
CCDBNodeLeaf *propA = im->getDbProp(toString("SERVER:Entities:E%d:P%d", (int) slot, (int) PROPERTY_VPA), false);
|
||||
CCDBNodeLeaf *propA = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:Entities:E%d:P%d", (int) slot, (int) PROPERTY_VPA), false);
|
||||
if (!propA) return false;
|
||||
sint64 valueA = propA->getValue64();
|
||||
|
||||
CCDBNodeLeaf *propB = im->getDbProp(toString("SERVER:Entities:E%d:P%d", (int) slot, (int) PROPERTY_VPB), false);
|
||||
CCDBNodeLeaf *propB = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:Entities:E%d:P%d", (int) slot, (int) PROPERTY_VPB), false);
|
||||
if (!propB) return false;
|
||||
sint64 valueB = propB->getValue64();
|
||||
|
||||
|
@ -9869,7 +9869,7 @@ NLMISC_COMMAND(advantageFX, "turn on / off the advantage fx for an item in hand"
|
|||
fromString(args[0], slot);
|
||||
|
||||
/*
|
||||
CCDBNodeLeaf *prop = im->getDbProp(toString("SERVER:Entities:E%d:P%d", (int) slot, (int) PROPERTY_VPA), false);
|
||||
CCDBNodeLeaf *prop = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:Entities:E%d:P%d", (int) slot, (int) PROPERTY_VPA), false);
|
||||
if (!prop) return false;
|
||||
sint64 value = prop->getValue64();
|
||||
uint hand;
|
||||
|
@ -9917,11 +9917,11 @@ NLMISC_COMMAND(trailLength, "set length of trail for one weapon in hand", "<slot
|
|||
uint slot;
|
||||
fromString(args[0], slot);
|
||||
|
||||
CCDBNodeLeaf *propA = im->getDbProp(toString("SERVER:Entities:E%d:P%d", (int) slot, (int) PROPERTY_VPA), false);
|
||||
CCDBNodeLeaf *propA = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:Entities:E%d:P%d", (int) slot, (int) PROPERTY_VPA), false);
|
||||
if (!propA) return false;
|
||||
sint64 valueA = propA->getValue64();
|
||||
|
||||
CCDBNodeLeaf *propB = im->getDbProp(toString("SERVER:Entities:E%d:P%d", (int) slot, (int) PROPERTY_VPB), false);
|
||||
CCDBNodeLeaf *propB = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:Entities:E%d:P%d", (int) slot, (int) PROPERTY_VPB), false);
|
||||
if (!propB) return false;
|
||||
sint64 valueB = propB->getValue64();
|
||||
|
||||
|
|
|
@ -286,7 +286,7 @@ void CClientChatManager::chat( const ucstring& strIn, bool isChatTeam )
|
|||
|
||||
if (isChatTeam)
|
||||
{
|
||||
if (CInterfaceManager::getInstance()->getDbProp("SERVER:GROUP:0:PRESENT")->getValueBool())
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GROUP:0:PRESENT")->getValueBool())
|
||||
msgType = "STRING:CHAT_TEAM";
|
||||
else
|
||||
return; // don't display team chat message if there is no team chat
|
||||
|
@ -1058,8 +1058,8 @@ void CClientChatManager::initInGame()
|
|||
_DynamicChannelIdLeaf[i]= NULL;
|
||||
_DynamicChannelIdCache[i]= DynamicChannelEmptyId;
|
||||
// get
|
||||
CCDBNodeLeaf *name= pIM->getDbProp(toString("SERVER:DYN_CHAT:CHANNEL%d:NAME", i), false);
|
||||
CCDBNodeLeaf *id= pIM->getDbProp(toString("SERVER:DYN_CHAT:CHANNEL%d:ID", i), false);
|
||||
CCDBNodeLeaf *name= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:DYN_CHAT:CHANNEL%d:NAME", i), false);
|
||||
CCDBNodeLeaf *id= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:DYN_CHAT:CHANNEL%d:ID", i), false);
|
||||
if(name && id)
|
||||
{
|
||||
_DynamicChannelNameLeaf[i]= name;
|
||||
|
@ -1247,8 +1247,8 @@ void CClientChatManager::updateChatModeAndButton(uint mode, uint32 dynamicChanne
|
|||
CInterfaceGroup *pEditBox = dynamic_cast<CInterfaceGroup*>(pCGW->getContainer()->getGroup("content:ebw"));
|
||||
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
const bool teamActive = pIM->getDbProp("SERVER:GROUP:0:PRESENT")->getValueBool();
|
||||
const bool guildActive = pIM->getDbProp("SERVER:GUILD:NAME")->getValueBool();
|
||||
const bool teamActive = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GROUP:0:PRESENT")->getValueBool();
|
||||
const bool guildActive = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:NAME")->getValueBool();
|
||||
|
||||
if (m == CChatGroup::team && ! teamActive)
|
||||
m = PeopleInterraction.TheUserChat.Filter.getTargetGroup();
|
||||
|
@ -1409,7 +1409,7 @@ class CHandlerSwapChatMode : public IActionHandler
|
|||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
bool updateCapture= getParam(sParams, "update_capture")=="1";
|
||||
|
||||
CCDBNodeLeaf *node= pIM->getDbProp("UI:SAVE:CHAT:ENTER_DONT_QUIT_CB", false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHAT:ENTER_DONT_QUIT_CB", false);
|
||||
if(node)
|
||||
{
|
||||
// if "chatmode" is active
|
||||
|
|
|
@ -1175,7 +1175,7 @@ NLMISC_COMMAND(db, "Modify Database","<Property> <Value>")
|
|||
}
|
||||
|
||||
// Set the property.
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(args[0], false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(args[0], false);
|
||||
if(node)
|
||||
node->setValue64(value);
|
||||
else
|
||||
|
@ -1186,7 +1186,7 @@ NLMISC_COMMAND(db, "Modify Database","<Property> <Value>")
|
|||
}
|
||||
else if (size == 1)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(args[0], false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(args[0], false);
|
||||
if(node)
|
||||
{
|
||||
sint64 prop = node->getValue64();
|
||||
|
@ -1646,7 +1646,7 @@ NLMISC_COMMAND(forgetAll, "forget all bricks", "")
|
|||
for (uint i = 0;i<20;i++)
|
||||
{
|
||||
sprintf(buf,"SERVER:BRICK_FAMILY:%d:BRICKS",i);
|
||||
CCDBNodeLeaf * node= CInterfaceManager::getInstance()->getDbProp(buf);
|
||||
CCDBNodeLeaf * node= NLGUI::CDBManager::getInstance()->getDbProp(buf);
|
||||
node->setValue64(0);
|
||||
}
|
||||
return true;
|
||||
|
@ -2027,24 +2027,24 @@ NLMISC_COMMAND(entity, "Create an entity on the user or just remove it if Form n
|
|||
sint64 *prop = 0;
|
||||
CCDBNodeLeaf *node = 0;
|
||||
// Set The property 'CLFECOMMON::PROPERTY_POSITION'.
|
||||
node = IM->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_POSX), false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_POSX), false);
|
||||
if(node)
|
||||
{
|
||||
sint64 x = (sint64)(entityPos.x*1000.0);
|
||||
sint64 y = (sint64)(entityPos.y*1000.0);
|
||||
sint64 z = (sint64)(entityPos.z*1000.0);
|
||||
node->setValue64(x);
|
||||
node = IM->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_POSY), false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_POSY), false);
|
||||
if(node)
|
||||
{
|
||||
node->setValue64(y);
|
||||
node = IM->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_POSZ), false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_POSZ), false);
|
||||
if(node)
|
||||
node->setValue64(z);
|
||||
}
|
||||
}
|
||||
// Set The property 'PROPERTY_ORIENTATION'.
|
||||
node = IM->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_ORIENTATION), false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_ORIENTATION), false);
|
||||
if(node)
|
||||
{
|
||||
float dir = (float)atan2(UserEntity->front().y, UserEntity->front().x);
|
||||
|
@ -2052,7 +2052,7 @@ NLMISC_COMMAND(entity, "Create an entity on the user or just remove it if Form n
|
|||
node->setValue64(*prop);
|
||||
}
|
||||
// Set Mode
|
||||
node = IM->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_MODE), false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_MODE), false);
|
||||
if(node)
|
||||
{
|
||||
MBEHAV::EMode m = MBEHAV::NORMAL;
|
||||
|
@ -2075,11 +2075,11 @@ NLMISC_COMMAND(entity, "Create an entity on the user or just remove it if Form n
|
|||
visualC.PropertySubData.BreastSize = 7;
|
||||
// Set The Database
|
||||
prop = (sint64 *)&visualB;
|
||||
IM->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->setValue64(*prop);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->setValue64(*prop);
|
||||
prop = (sint64 *)&visualC;
|
||||
IM->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPC))->setValue64(*prop);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPC))->setValue64(*prop);
|
||||
prop = (sint64 *)&visualA;
|
||||
IM->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->setValue64(*prop);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->setValue64(*prop);
|
||||
// Apply Changes.
|
||||
EntitiesMngr.updateVisualProperty(0, slot, CLFECOMMON::PROPERTY_VPA);
|
||||
}
|
||||
|
@ -2091,7 +2091,7 @@ NLMISC_COMMAND(entity, "Create an entity on the user or just remove it if Form n
|
|||
barVal+= 32; barVal<<= 7;
|
||||
barVal+= 10; barVal<<= 7;
|
||||
barVal+= 127;
|
||||
IM->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_BARS))->setValue64(barVal);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_BARS))->setValue64(barVal);
|
||||
EntitiesMngr.updateVisualProperty(0, slot, CLFECOMMON::PROPERTY_BARS);
|
||||
// must also update position, else don't work
|
||||
EntitiesMngr.updateVisualProperty(0, slot, CLFECOMMON::PROPERTY_POSITION);
|
||||
|
@ -2948,9 +2948,9 @@ NLMISC_COMMAND(paintTarget, "Modify the target color",
|
|||
const string propNameA = toString("SERVER:Entities:E%d:P%d", slot, CLFECOMMON::PROPERTY_VPA);
|
||||
const string propNameB = toString("SERVER:Entities:E%d:P%d", slot, CLFECOMMON::PROPERTY_VPB);
|
||||
const string propNameC = toString("SERVER:Entities:E%d:P%d", slot, CLFECOMMON::PROPERTY_VPC);
|
||||
vA.PropertyA = CInterfaceManager::getInstance()->getDbProp(propNameA)->getValue64();
|
||||
vB.PropertyB = CInterfaceManager::getInstance()->getDbProp(propNameB)->getValue64();
|
||||
vC.PropertyC = CInterfaceManager::getInstance()->getDbProp(propNameC)->getValue64();
|
||||
vA.PropertyA = NLGUI::CDBManager::getInstance()->getDbProp(propNameA)->getValue64();
|
||||
vB.PropertyB = NLGUI::CDBManager::getInstance()->getDbProp(propNameB)->getValue64();
|
||||
vC.PropertyC = NLGUI::CDBManager::getInstance()->getDbProp(propNameC)->getValue64();
|
||||
|
||||
// Get the visual item index
|
||||
uint value;
|
||||
|
@ -2964,9 +2964,9 @@ NLMISC_COMMAND(paintTarget, "Modify the target color",
|
|||
vB.PropertySubData.FeetColor = value;
|
||||
|
||||
// Set the database.
|
||||
CInterfaceManager::getInstance()->getDbProp(propNameA)->setValue64((sint64)vA.PropertyA);
|
||||
CInterfaceManager::getInstance()->getDbProp(propNameB)->setValue64((sint64)vB.PropertyB);
|
||||
CInterfaceManager::getInstance()->getDbProp(propNameC)->setValue64((sint64)vC.PropertyC);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(propNameA)->setValue64((sint64)vA.PropertyA);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(propNameB)->setValue64((sint64)vB.PropertyB);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(propNameC)->setValue64((sint64)vC.PropertyC);
|
||||
// Force to update properties.
|
||||
EntitiesMngr.updateVisualProperty(0, slot, CLFECOMMON::PROPERTY_VPA);
|
||||
|
||||
|
@ -3049,9 +3049,9 @@ NLMISC_COMMAND(vP, "Modify the Visual Property",
|
|||
const string propNameA = toString("SERVER:Entities:E%d:P%d", slot, CLFECOMMON::PROPERTY_VPA);
|
||||
const string propNameB = toString("SERVER:Entities:E%d:P%d", slot, CLFECOMMON::PROPERTY_VPB);
|
||||
const string propNameC = toString("SERVER:Entities:E%d:P%d", slot, CLFECOMMON::PROPERTY_VPC);
|
||||
vA.PropertyA = CInterfaceManager::getInstance()->getDbProp(propNameA)->getValue64();
|
||||
vB.PropertyB = CInterfaceManager::getInstance()->getDbProp(propNameB)->getValue64();
|
||||
vC.PropertyC = CInterfaceManager::getInstance()->getDbProp(propNameC)->getValue64();
|
||||
vA.PropertyA = NLGUI::CDBManager::getInstance()->getDbProp(propNameA)->getValue64();
|
||||
vB.PropertyB = NLGUI::CDBManager::getInstance()->getDbProp(propNameB)->getValue64();
|
||||
vC.PropertyC = NLGUI::CDBManager::getInstance()->getDbProp(propNameC)->getValue64();
|
||||
// Get the visual item index
|
||||
uint value;
|
||||
fromString(args[2], value);
|
||||
|
@ -3180,9 +3180,9 @@ NLMISC_COMMAND(vP, "Modify the Visual Property",
|
|||
}
|
||||
|
||||
// Set the database.
|
||||
CInterfaceManager::getInstance()->getDbProp(propNameA)->setValue64((sint64)vA.PropertyA);
|
||||
CInterfaceManager::getInstance()->getDbProp(propNameB)->setValue64((sint64)vB.PropertyB);
|
||||
CInterfaceManager::getInstance()->getDbProp(propNameC)->setValue64((sint64)vC.PropertyC);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(propNameA)->setValue64((sint64)vA.PropertyA);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(propNameB)->setValue64((sint64)vB.PropertyB);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(propNameC)->setValue64((sint64)vC.PropertyC);
|
||||
// Force to update properties.
|
||||
EntitiesMngr.updateVisualProperty(0, slot, CLFECOMMON::PROPERTY_VPA);
|
||||
|
||||
|
@ -3214,7 +3214,7 @@ NLMISC_COMMAND(altLook, "Modify the Alternative Look Property",
|
|||
const string propName = toString("SERVER:Entities:E%d:P%d", slot, CLFECOMMON::PROPERTY_VPA);
|
||||
// Get the old value (not useful since we change the whole property).
|
||||
SAltLookProp altLookProp;
|
||||
altLookProp.Summary = CInterfaceManager::getInstance()->getDbProp(propName)->getValue64();
|
||||
altLookProp.Summary = NLGUI::CDBManager::getInstance()->getDbProp(propName)->getValue64();
|
||||
uint32 colorTop, colorBot, weaponRightHand, weaponLeftHand, seed, colorHair, hat;
|
||||
fromString(args[1], colorTop);
|
||||
fromString(args[2], colorBot);
|
||||
|
@ -3250,7 +3250,7 @@ NLMISC_COMMAND(altLook, "Modify the Alternative Look Property",
|
|||
}
|
||||
|
||||
// Set the database.
|
||||
CInterfaceManager::getInstance()->getDbProp(propName)->setValue64((sint64)altLookProp.Summary);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(propName)->setValue64((sint64)altLookProp.Summary);
|
||||
// Force to update properties.
|
||||
EntitiesMngr.updateVisualProperty(0, slot, CLFECOMMON::PROPERTY_VPA);
|
||||
|
||||
|
@ -3385,12 +3385,12 @@ NLMISC_COMMAND(testMount, "Set the entity to mount","<Slot> <Mount>")
|
|||
|
||||
// Set the database.
|
||||
string propName = toString("SERVER:Entities:E%d:P%d", mount, CLFECOMMON::PROPERTY_RIDER_ENTITY_ID);
|
||||
CInterfaceManager::getInstance()->getDbProp(propName)->setValue64(slot);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(propName)->setValue64(slot);
|
||||
// Force to update properties.
|
||||
EntitiesMngr.updateVisualProperty(0, mount, CLFECOMMON::PROPERTY_RIDER_ENTITY_ID);
|
||||
// Set the database.
|
||||
propName = toString("SERVER:Entities:E%d:P%d", slot, CLFECOMMON::PROPERTY_ENTITY_MOUNTED_ID);
|
||||
CInterfaceManager::getInstance()->getDbProp(propName)->setValue64(mount);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(propName)->setValue64(mount);
|
||||
// Force to update properties.
|
||||
EntitiesMngr.updateVisualProperty(0, slot, CLFECOMMON::PROPERTY_ENTITY_MOUNTED_ID);
|
||||
return true;
|
||||
|
@ -3416,7 +3416,7 @@ NLMISC_COMMAND(mount, "Set the entity to mount","<Slot> [<Mount>]")
|
|||
|
||||
// Set the database.
|
||||
string propName = toString("SERVER:Entities:E%d:P%d", slot, CLFECOMMON::PROPERTY_ENTITY_MOUNTED_ID);
|
||||
CInterfaceManager::getInstance()->getDbProp(propName)->setValue64(mount);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(propName)->setValue64(mount);
|
||||
// Force to update properties.
|
||||
EntitiesMngr.updateVisualProperty(0, slot, CLFECOMMON::PROPERTY_ENTITY_MOUNTED_ID);
|
||||
|
||||
|
@ -3444,7 +3444,7 @@ NLMISC_COMMAND(rider, "Set the rider","<Slot> [<rider>]")
|
|||
|
||||
// Set the database.
|
||||
string propName = toString("SERVER:Entities:E%d:P%d", slot, CLFECOMMON::PROPERTY_RIDER_ENTITY_ID);
|
||||
CInterfaceManager::getInstance()->getDbProp(propName)->setValue64(rider);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(propName)->setValue64(rider);
|
||||
// Force to update properties.
|
||||
EntitiesMngr.updateVisualProperty(0, slot, CLFECOMMON::PROPERTY_RIDER_ENTITY_ID);
|
||||
|
||||
|
@ -3474,7 +3474,7 @@ NLMISC_COMMAND(learnAllBrick, "learn all bricks (only in local mode)", "")
|
|||
uint i=0;
|
||||
for(;;)
|
||||
{
|
||||
CCDBNodeLeaf * node= pIM->getDbProp(toString("SERVER:BRICK_FAMILY:%d:BRICKS", i), false);
|
||||
CCDBNodeLeaf * node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:BRICK_FAMILY:%d:BRICKS", i), false);
|
||||
if(node)
|
||||
node->setValue64(SINT64_CONSTANT(0xFFFFFFFFFFFFFFFF));
|
||||
else
|
||||
|
@ -3617,7 +3617,7 @@ NLMISC_COMMAND(money, "To earn Money (only in local mode)","<very big seed> [<bi
|
|||
uint64 money;
|
||||
fromString(args[0], money);
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
im->getDbProp("SERVER:INVENTORY:MONEY")->setValue64(money);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:INVENTORY:MONEY")->setValue64(money);
|
||||
return true;
|
||||
/*
|
||||
sint32 a = 0;
|
||||
|
@ -3646,10 +3646,10 @@ NLMISC_COMMAND(money, "To earn Money (only in local mode)","<very big seed> [<bi
|
|||
string ms = im->getDefine("money_2");
|
||||
string bs = im->getDefine("money_3");
|
||||
string vbs = im->getDefine("money_4");
|
||||
im->getDbProp(ls + ":QUANTITY")->setValue32(a);
|
||||
im->getDbProp(ms + ":QUANTITY")->setValue32(b);
|
||||
im->getDbProp(bs + ":QUANTITY")->setValue32(c);
|
||||
im->getDbProp(vbs + ":QUANTITY")->setValue32(d);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(ls + ":QUANTITY")->setValue32(a);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(ms + ":QUANTITY")->setValue32(b);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(bs + ":QUANTITY")->setValue32(c);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(vbs + ":QUANTITY")->setValue32(d);
|
||||
return true;
|
||||
*/
|
||||
}
|
||||
|
@ -3874,7 +3874,7 @@ NLMISC_COMMAND(displayInventoryCounter, "display the Inventory counter to compar
|
|||
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
uint srvVal= pIM->getDbProp("SERVER:INVENTORY:COUNTER")->getValue32();
|
||||
uint srvVal= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:INVENTORY:COUNTER")->getValue32();
|
||||
uint locVal= pIM->getLocalSyncActionCounter() ;
|
||||
srvVal&= pIM->getLocalSyncActionCounterMask();
|
||||
locVal&= pIM->getLocalSyncActionCounterMask();
|
||||
|
@ -3893,7 +3893,7 @@ NLMISC_COMMAND(displayActionCounter, "display the action counters", "")
|
|||
CSPhraseManager *pPM= CSPhraseManager::getInstance();
|
||||
|
||||
// next
|
||||
uint srvVal= pIM->getDbProp(PHRASE_DB_COUNTER_NEXT)->getValue32();
|
||||
uint srvVal= NLGUI::CDBManager::getInstance()->getDbProp(PHRASE_DB_COUNTER_NEXT)->getValue32();
|
||||
uint locVal= pPM->getPhraseNextExecuteCounter() ;
|
||||
srvVal&= PHRASE_EXECUTE_COUNTER_MASK;
|
||||
locVal&= PHRASE_EXECUTE_COUNTER_MASK;
|
||||
|
@ -3901,7 +3901,7 @@ NLMISC_COMMAND(displayActionCounter, "display the action counters", "")
|
|||
pIM->displaySystemInfo(ucstring( "NextCounter: " + toString(srvVal) + "/ LocalCounter: " + toString(locVal)) );
|
||||
|
||||
// cycle
|
||||
srvVal= pIM->getDbProp(PHRASE_DB_COUNTER_CYCLE)->getValue32();
|
||||
srvVal= NLGUI::CDBManager::getInstance()->getDbProp(PHRASE_DB_COUNTER_CYCLE)->getValue32();
|
||||
locVal= pPM->getPhraseCycleExecuteCounter() ;
|
||||
srvVal&= PHRASE_EXECUTE_COUNTER_MASK;
|
||||
locVal&= PHRASE_EXECUTE_COUNTER_MASK;
|
||||
|
@ -4404,7 +4404,7 @@ NLMISC_COMMAND(getSkillValue, "get a skill value by its name", "skill_name")
|
|||
if (args.size() != 1) return false;
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
uint skillId= (uint) SKILLS::toSkill(args[0]);
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("SERVER:CHARACTER_INFO:SKILLS:%d:SKILL", skillId), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:CHARACTER_INFO:SKILLS:%d:SKILL", skillId), false);
|
||||
if(node)
|
||||
{
|
||||
pIM->displaySystemInfo(ucstring(toString(node->getValue32())));
|
||||
|
@ -4418,7 +4418,7 @@ NLMISC_COMMAND(setSkillValue, "set a skill value by its name", "skill_name value
|
|||
if (args.size() != 2) return false;
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
uint skillId= (uint) SKILLS::toSkill(args[0]);
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("SERVER:CHARACTER_INFO:SKILLS:%d:SKILL", skillId), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:CHARACTER_INFO:SKILLS:%d:SKILL", skillId), false);
|
||||
if(node)
|
||||
{
|
||||
sint32 value;
|
||||
|
@ -4434,7 +4434,7 @@ NLMISC_COMMAND(getBaseSkillValue, "get a baseskill value by its name", "skill_na
|
|||
if (args.size() != 1) return false;
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
uint skillId= (uint) SKILLS::toSkill(args[0]);
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("SERVER:CHARACTER_INFO:SKILLS:%d:BaseSKILL", skillId), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:CHARACTER_INFO:SKILLS:%d:BaseSKILL", skillId), false);
|
||||
if(node)
|
||||
{
|
||||
pIM->displaySystemInfo(ucstring(toString(node->getValue32())));
|
||||
|
@ -4448,7 +4448,7 @@ NLMISC_COMMAND(setBaseSkillValue, "set a baseskill value by its name", "skill_na
|
|||
if (args.size() != 2) return false;
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
uint skillId= (uint) SKILLS::toSkill(args[0]);
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("SERVER:CHARACTER_INFO:SKILLS:%d:BaseSKILL", skillId), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:CHARACTER_INFO:SKILLS:%d:BaseSKILL", skillId), false);
|
||||
if(node)
|
||||
{
|
||||
sint32 value;
|
||||
|
@ -4468,10 +4468,10 @@ NLMISC_COMMAND(setAllSkillValue, "set all Skill and baseskill to the given value
|
|||
for(uint i=0;i<SKILLS::NUM_SKILLS;i++)
|
||||
{
|
||||
CCDBNodeLeaf *node;
|
||||
node= pIM->getDbProp(toString("SERVER:CHARACTER_INFO:SKILLS:%d:BaseSKILL", i), false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:CHARACTER_INFO:SKILLS:%d:BaseSKILL", i), false);
|
||||
if(node)
|
||||
node->setValue32(value);
|
||||
node= pIM->getDbProp(toString("SERVER:CHARACTER_INFO:SKILLS:%d:SKILL", i), false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:CHARACTER_INFO:SKILLS:%d:SKILL", i), false);
|
||||
if(node)
|
||||
node->setValue32(value);
|
||||
}
|
||||
|
@ -4597,7 +4597,7 @@ NLMISC_COMMAND(vprop, "Flush the Visual Property (local only). you must write to
|
|||
sint64 val= 0;
|
||||
fromString(args[2], val);
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("SERVER:Entities:E%d:P%d", slot, propId), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:Entities:E%d:P%d", slot, propId), false);
|
||||
if(node)
|
||||
node->setValue64(val);
|
||||
}
|
||||
|
@ -4765,10 +4765,10 @@ NLMISC_COMMAND(fillAllInfoVersion, "", "<version>")
|
|||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
for(i=0;i<CPlayerTrade::NumTradeSlot;i++)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("SERVER:EXCHANGE:GIVE:%d:INFO_VERSION", i), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:EXCHANGE:GIVE:%d:INFO_VERSION", i), false);
|
||||
if(node)
|
||||
node->setValue32(ver);
|
||||
node= pIM->getDbProp(toString("SERVER:EXCHANGE:RECEIVE:%d:INFO_VERSION", i), false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:EXCHANGE:RECEIVE:%d:INFO_VERSION", i), false);
|
||||
if(node)
|
||||
node->setValue32(ver);
|
||||
}
|
||||
|
@ -4796,7 +4796,7 @@ NLMISC_COMMAND(fullFillInventory, "", "dbstring sheetName")
|
|||
|
||||
// read db dest
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
CCDBNodeBranch *nb= pIM->getDbBranch(args[0]);
|
||||
CCDBNodeBranch *nb= NLGUI::CDBManager::getInstance()->getDbBranch(args[0]);
|
||||
if(!nb)
|
||||
return false;
|
||||
|
||||
|
@ -4804,14 +4804,14 @@ NLMISC_COMMAND(fullFillInventory, "", "dbstring sheetName")
|
|||
for(uint i=0;i<num;i++)
|
||||
{
|
||||
CCDBNodeLeaf *nl;
|
||||
nl= pIM->getDbProp(args[0]+":"+toString(i)+":SHEET", false);
|
||||
nl= NLGUI::CDBManager::getInstance()->getDbProp(args[0]+":"+toString(i)+":SHEET", false);
|
||||
if(nl)
|
||||
{
|
||||
nl->setValue64(value);
|
||||
nl= pIM->getDbProp(args[0]+":"+toString(i)+":QUALITY", false);
|
||||
nl= NLGUI::CDBManager::getInstance()->getDbProp(args[0]+":"+toString(i)+":QUALITY", false);
|
||||
if(nl)
|
||||
nl->setValue64(i);
|
||||
nl= pIM->getDbProp(args[0]+":"+toString(i)+":PREREQUISIT_VALID", false);
|
||||
nl= NLGUI::CDBManager::getInstance()->getDbProp(args[0]+":"+toString(i)+":PREREQUISIT_VALID", false);
|
||||
if(nl)
|
||||
nl->setValue64(1);
|
||||
}
|
||||
|
@ -4835,7 +4835,7 @@ NLMISC_COMMAND(fillAllItemPreReq, "", "dbstring value")
|
|||
for(;;)
|
||||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("%s:%d:PREREQUISIT_VALID", dbBase.c_str(), index), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("%s:%d:PREREQUISIT_VALID", dbBase.c_str(), index), false);
|
||||
if(!node)
|
||||
break;
|
||||
node->setValue32(value);
|
||||
|
@ -5628,13 +5628,13 @@ NLMISC_COMMAND(setMission, "locally set a mission text for test", "<mission inde
|
|||
if (index >= 30) return false;
|
||||
if (index < 15)
|
||||
{
|
||||
im->getDbProp(toString("SERVER:MISSIONS:%d:TITLE", (int) index))->setValue32(strID);
|
||||
im->getDbProp(toString("SERVER:MISSIONS:%d:FINISHED", (int) index))->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:MISSIONS:%d:TITLE", (int) index))->setValue32(strID);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:MISSIONS:%d:FINISHED", (int) index))->setValue32(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
im->getDbProp(toString("SERVER:GROUP:MISSIONS:%d:TITLE", (int) index - 15))->setValue32(strID);
|
||||
im->getDbProp(toString("SERVER:GROUP:MISSIONS:%d:FINISHED", (int) index - 15))->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:GROUP:MISSIONS:%d:TITLE", (int) index - 15))->setValue32(strID);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:GROUP:MISSIONS:%d:FINISHED", (int) index - 15))->setValue32(0);
|
||||
}
|
||||
setDynString(strID++, args[1]);
|
||||
return true;
|
||||
|
@ -5647,11 +5647,11 @@ static bool setMissionStep(uint missionIndex, uint stepIndex, uint32 strID)
|
|||
if (stepIndex >= 20) return false;
|
||||
if (missionIndex < 15)
|
||||
{
|
||||
im->getDbProp(toString("SERVER:MISSIONS:%d:GOALS:%d:TEXT", (int) missionIndex, (int) stepIndex))->setValue32(strID);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:MISSIONS:%d:GOALS:%d:TEXT", (int) missionIndex, (int) stepIndex))->setValue32(strID);
|
||||
}
|
||||
else
|
||||
{
|
||||
im->getDbProp(toString("SERVER:GROUP:MISSIONS:%d:GOALS:%d:TEXT", (int) (missionIndex - 15), (int) stepIndex))->setValue32(strID);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:GROUP:MISSIONS:%d:GOALS:%d:TEXT", (int) (missionIndex - 15), (int) stepIndex))->setValue32(strID);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -5696,11 +5696,11 @@ static bool debugSetMissionState(uint index, sint32 /* state */)
|
|||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
if (index < 15)
|
||||
{
|
||||
im->getDbProp(toString("SERVER:MISSIONS:%d:TITLE", (int) index))->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:MISSIONS:%d:TITLE", (int) index))->setValue32(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
im->getDbProp(toString("SERVER:GROUP:MISSIONS:%d:TITLE", (int) index - 15))->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:GROUP:MISSIONS:%d:TITLE", (int) index - 15))->setValue32(0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -247,7 +247,7 @@ REGISTER_ACTION_HANDLER (CAHOnReloadTestPage, "on_reload_test_page");
|
|||
void initWebBrowser()
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
//pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_WEBSTART);
|
||||
//NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_WEBSTART);
|
||||
|
||||
// start the browser
|
||||
CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(pIM->getElementFromId(GROUP_BROWSER));
|
||||
|
@ -389,9 +389,9 @@ bool connection (const string &cookie, const string &fsaddr)
|
|||
}*/
|
||||
|
||||
pIM->activateMasterGroup ("ui:outgame", true);
|
||||
pIM->getDbProp ("UI:CURRENT_SCREEN")->setValue32(ClientCfg.Local ? 6 : -1); // TMP TMP
|
||||
NLGUI::CDBManager::getInstance()->getDbProp ("UI:CURRENT_SCREEN")->setValue32(ClientCfg.Local ? 6 : -1); // TMP TMP
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
|
||||
// Active inputs
|
||||
Actions.enable(true);
|
||||
|
@ -410,7 +410,7 @@ bool connection (const string &cookie, const string &fsaddr)
|
|||
SetMouseSpeed (ClientCfg.CursorSpeed);
|
||||
SetMouseAcceleration (ClientCfg.CursorAcceleration);
|
||||
|
||||
pIM->getDbProp("UI:SELECTED_SLOT")->setValue32(ClientCfg.SelectedSlot);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:SELECTED_SLOT")->setValue32(ClientCfg.SelectedSlot);
|
||||
PlayerSelectedSlot = ClientCfg.SelectedSlot;
|
||||
}
|
||||
|
||||
|
@ -447,7 +447,7 @@ bool connection (const string &cookie, const string &fsaddr)
|
|||
{
|
||||
if (ClientCfg.SelectCharacter == -1)
|
||||
{
|
||||
pIM->getDbProp ("UI:CURRENT_SCREEN")->setValue32(0); // 0 == select
|
||||
NLGUI::CDBManager::getInstance()->getDbProp ("UI:CURRENT_SCREEN")->setValue32(0); // 0 == select
|
||||
}
|
||||
}
|
||||
InterfaceState = globalMenu();
|
||||
|
@ -553,9 +553,9 @@ bool reconnection()
|
|||
TInterfaceState InterfaceState = GLOBAL_MENU;
|
||||
|
||||
pIM->activateMasterGroup ("ui:outgame", true);
|
||||
pIM->getDbProp ("UI:CURRENT_SCREEN")->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp ("UI:CURRENT_SCREEN")->setValue32(-1);
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
|
||||
// Active inputs
|
||||
Actions.enable(true);
|
||||
|
@ -571,7 +571,7 @@ bool reconnection()
|
|||
SetMouseCursor ();
|
||||
SetMouseSpeed (ClientCfg.CursorSpeed);
|
||||
SetMouseAcceleration (ClientCfg.CursorAcceleration);
|
||||
pIM->getDbProp("UI:SELECTED_SLOT")->setValue32(ClientCfg.SelectedSlot);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:SELECTED_SLOT")->setValue32(ClientCfg.SelectedSlot);
|
||||
PlayerSelectedSlot = ClientCfg.SelectedSlot;
|
||||
}
|
||||
|
||||
|
@ -588,7 +588,7 @@ bool reconnection()
|
|||
{
|
||||
if (ClientCfg.SelectCharacter == -1)
|
||||
{
|
||||
pIM->getDbProp ("UI:CURRENT_SCREEN")->setValue32(0); // 0 == select
|
||||
NLGUI::CDBManager::getInstance()->getDbProp ("UI:CURRENT_SCREEN")->setValue32(0); // 0 == select
|
||||
}
|
||||
InterfaceState = globalMenu();
|
||||
}
|
||||
|
@ -972,7 +972,7 @@ TInterfaceState globalMenu()
|
|||
// SKIP INTRO : Write to the database if we have to skip the intro and write we want to skip further intro to client cfg
|
||||
if (ClientCfg.SkipIntro)
|
||||
{
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp("UI:TEMP:SKIP_INTRO", false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:SKIP_INTRO", false);
|
||||
if (pNL != NULL)
|
||||
pNL->setValue64(1);
|
||||
}
|
||||
|
@ -993,9 +993,9 @@ TInterfaceState globalMenu()
|
|||
pIM->uninitOutGame();
|
||||
pIM->initOutGame();
|
||||
pIM->activateMasterGroup ("ui:outgame", true);
|
||||
pIM->getDbProp ("UI:CURRENT_SCREEN")->setValue32(2); // TMP TMP
|
||||
NLGUI::CDBManager::getInstance()->getDbProp ("UI:CURRENT_SCREEN")->setValue32(2); // TMP TMP
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
pIM->getElementFromId("ui:outgame:charsel")->setActive(false);
|
||||
pIM->getElementFromId("ui:outgame:charsel")->setActive(true);
|
||||
// Active inputs
|
||||
|
@ -1034,7 +1034,7 @@ TInterfaceState globalMenu()
|
|||
|
||||
}
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
|
||||
// check if we can send another dated block
|
||||
if (NetMngr.getCurrentServerTick() != serverTick)
|
||||
|
@ -1061,7 +1061,7 @@ TInterfaceState globalMenu()
|
|||
pIM->updateFrameEvents();
|
||||
pIM->updateFrameViews(NULL);
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
|
||||
// Movie shooter
|
||||
globalMenuMovieShooter();
|
||||
|
@ -1122,15 +1122,15 @@ TInterfaceState globalMenu()
|
|||
WaitServerAnswer = false;
|
||||
if (ClientCfg.SelectCharacter == -1)
|
||||
{
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp("UI:SERVER_RECEIVED_CHARS", false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:SERVER_RECEIVED_CHARS", false);
|
||||
if (pNL != NULL)
|
||||
{
|
||||
pNL->setValue64 (1); // Send impulse to interface observers
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
pNL->setValue64 (0);
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1178,7 +1178,7 @@ TInterfaceState globalMenu()
|
|||
if (ClientCfg.SelectCharacter == -1)
|
||||
{
|
||||
CCDBNodeLeaf *pNL;
|
||||
pNL = pIM->getDbProp(CharNameValidDBLink,false);
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp(CharNameValidDBLink,false);
|
||||
if (pNL != NULL)
|
||||
{
|
||||
if (CharNameValid)
|
||||
|
@ -1187,15 +1187,15 @@ TInterfaceState globalMenu()
|
|||
pNL->setValue64(0);
|
||||
}
|
||||
|
||||
pNL = pIM->getDbProp("UI:SERVER_RECEIVED_VALID", false);
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:SERVER_RECEIVED_VALID", false);
|
||||
if (pNL != NULL)
|
||||
{
|
||||
pNL->setValue64 (1); // Send impulse to interface observers
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
pNL->setValue64 (0);
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1222,7 +1222,7 @@ TInterfaceState globalMenu()
|
|||
if (NetMngr.getConnectionState() == CNetManager::Disconnect)
|
||||
{
|
||||
// Display the connection failure screen
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp("UI:CURRENT_SCREEN", false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:CURRENT_SCREEN", false);
|
||||
if (pNL != NULL)
|
||||
pNL->setValue64 (nScreenServerCrashed);
|
||||
|
||||
|
@ -1691,22 +1691,22 @@ public:
|
|||
|
||||
CreateCharMsg.Slot = (uint8)result.getInteger();
|
||||
|
||||
pIM->getDbProp("UI:SELECTED_SLOT")->setValue32(PlayerSelectedSlot);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:SELECTED_SLOT")->setValue32(PlayerSelectedSlot);
|
||||
}
|
||||
|
||||
// Setup the new career
|
||||
string sCaracBasePath = getParam (Params, "caracs");
|
||||
CreateCharMsg.NbPointFighter = (uint8)pIM->getDbProp(sCaracBasePath+"FIGHT")->getValue32();
|
||||
CreateCharMsg.NbPointCaster = (uint8)pIM->getDbProp(sCaracBasePath+"MAGIC")->getValue32();
|
||||
CreateCharMsg.NbPointCrafter = (uint8)pIM->getDbProp(sCaracBasePath+"CRAFT")->getValue32();
|
||||
CreateCharMsg.NbPointHarvester = (uint8)pIM->getDbProp(sCaracBasePath+"FORAGE")->getValue32();
|
||||
CreateCharMsg.NbPointFighter = (uint8)NLGUI::CDBManager::getInstance()->getDbProp(sCaracBasePath+"FIGHT")->getValue32();
|
||||
CreateCharMsg.NbPointCaster = (uint8)NLGUI::CDBManager::getInstance()->getDbProp(sCaracBasePath+"MAGIC")->getValue32();
|
||||
CreateCharMsg.NbPointCrafter = (uint8)NLGUI::CDBManager::getInstance()->getDbProp(sCaracBasePath+"CRAFT")->getValue32();
|
||||
CreateCharMsg.NbPointHarvester = (uint8)NLGUI::CDBManager::getInstance()->getDbProp(sCaracBasePath+"FORAGE")->getValue32();
|
||||
|
||||
// Setup starting point
|
||||
string sLocationPath = getParam(Params, "loc");
|
||||
{
|
||||
CreateCharMsg.StartPoint = RYZOM_STARTING_POINT::borea;
|
||||
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp (sLocationPath, false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp (sLocationPath, false);
|
||||
if (pNL != NULL)
|
||||
CreateCharMsg.StartPoint = (RYZOM_STARTING_POINT::TStartPoint)(pNL->getValue64());
|
||||
else
|
||||
|
@ -1865,7 +1865,7 @@ public:
|
|||
string sDBSlot = getParam(Params, "dbslot");
|
||||
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
uint8 nSelectedSlot = (uint8)pIM->getDbProp(sDBSlot,false)->getValue32();
|
||||
uint8 nSelectedSlot = (uint8)NLGUI::CDBManager::getInstance()->getDbProp(sDBSlot,false)->getValue32();
|
||||
|
||||
if (nSelectedSlot > CharacterSummaries.size())
|
||||
return;
|
||||
|
@ -1927,7 +1927,7 @@ public:
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
if (sName.empty())
|
||||
{
|
||||
pIM->getDbProp(sDBLink,false)->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(sDBLink,false)->setValue32(0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2648,7 +2648,7 @@ class CAHScenarioControl : public IActionHandler
|
|||
{
|
||||
bool team = !(R2::getEditor().isInitialized());
|
||||
if(team)
|
||||
team = (pIM->getDbProp("SERVER:USER:TEAM_MEMBER")->getValue8())!=0;
|
||||
team = (NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:TEAM_MEMBER")->getValue8())!=0;
|
||||
groupTeam->setActive(team);
|
||||
}
|
||||
}
|
||||
|
@ -2921,7 +2921,7 @@ class CAHHideCharsFilters : public IActionHandler
|
|||
result = scenarioWnd->findFromShortId(string("invite_team"));
|
||||
if(result)
|
||||
{
|
||||
bool team = (pIM->getDbProp("SERVER:USER:TEAM_MEMBER")->getValue8())!=0;
|
||||
bool team = (NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:TEAM_MEMBER")->getValue8())!=0;
|
||||
team = (team && !(R2::getEditor().isInitialized()) && lookingForPlayers);
|
||||
result->setActive(team);
|
||||
}
|
||||
|
@ -3223,7 +3223,7 @@ class CAHLoadScenario : public IActionHandler
|
|||
|
||||
if(R2::getEditor().getAccessMode() != R2::CEditor::AccessDM)
|
||||
{
|
||||
bool noob = pIM->getDbProp("SERVER:USER:IS_NEWBIE")->getValueBool();
|
||||
bool noob = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:IS_NEWBIE")->getValueBool();
|
||||
if (FreeTrial && noob && (nevraxScenario != "1" || trialAllowed != "1"))
|
||||
{
|
||||
CViewText* pVT = dynamic_cast<CViewText*>(pIM->getElementFromId("ui:interface:warning_free_trial:text"));
|
||||
|
@ -3319,7 +3319,7 @@ class CAHLoadScenario : public IActionHandler
|
|||
{
|
||||
for (uint i = 0 ; i < 8 ; ++i)
|
||||
{
|
||||
uint32 val = pIM->getDbProp(NLMISC::toString("SERVER:GROUP:%d:NAME",i))->getValue32();
|
||||
uint32 val = NLGUI::CDBManager::getInstance()->getDbProp(NLMISC::toString("SERVER:GROUP:%d:NAME",i))->getValue32();
|
||||
if(val!=0)
|
||||
{
|
||||
STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
|
||||
|
|
|
@ -149,7 +149,7 @@ static bool testMissionOption(sint32 priorityWanted)
|
|||
for(uint k = 0; k < NUM_MISSION_OPTIONS; ++k)
|
||||
{
|
||||
std::string nodeName = toString("LOCAL:TARGET:CONTEXT_MENU:MISSIONS_OPTIONS:%d:PRIORITY", (int) k);
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(nodeName, false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(nodeName, false);
|
||||
if(pNL)
|
||||
{
|
||||
sint32 priority = pNL->getValue32();
|
||||
|
@ -159,7 +159,7 @@ static bool testMissionOption(sint32 priorityWanted)
|
|||
if(priorityWanted != 2 || textID==0)
|
||||
{
|
||||
nodeName = toString("LOCAL:TARGET:CONTEXT_MENU:MISSIONS_OPTIONS:%d:TITLE", (int) k);
|
||||
pNL = pIM->getDbProp(nodeName, false);
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp(nodeName, false);
|
||||
if(pNL && pNL->getValue32())
|
||||
{
|
||||
textID = pNL->getValue32();
|
||||
|
@ -206,7 +206,7 @@ static bool testMissionRing()
|
|||
for(uint i=0;i<BOTCHATTYPE::MaxR2MissionEntryDatabase;i++)
|
||||
{
|
||||
// get the ring mission title textID
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(toString("LOCAL:TARGET:CONTEXT_MENU:MISSION_RING:%d:TITLE", i), false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(toString("LOCAL:TARGET:CONTEXT_MENU:MISSION_RING:%d:TITLE", i), false);
|
||||
if(pNL && pNL->getValue32())
|
||||
{
|
||||
uint32 textID = pNL->getValue32();
|
||||
|
@ -273,7 +273,7 @@ void checkUnderCursor()
|
|||
entity= EntitiesMngr.getEntityUnderPos(cursX, cursY, ClientCfg.SelectionDist, isPlayerUnderCursor);
|
||||
|
||||
// If the mouse is over the player make the player transparent
|
||||
CCDBNodeLeaf *pNL = IM->getDbProp("UI:SAVE:USER_CHAR_FADE", false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:USER_CHAR_FADE", false);
|
||||
if ((pNL != NULL) && (pNL->getValue32() == 1) && UserEntity->selectable())
|
||||
{
|
||||
// If the nearest entity is the player, hide!
|
||||
|
@ -308,7 +308,7 @@ void checkUnderCursor()
|
|||
float dist = (float)(entity->pos() - UserEntity->pos()).norm()-entity->box().getRadius();
|
||||
// Entity Slot under the cursor.
|
||||
SlotUnderCursor = entity->slot();
|
||||
uint32 availablePrograms = (uint32)IM->getDbProp("LOCAL:TARGET:CONTEXT_MENU:PROGRAMMES")->getValue32();
|
||||
uint32 availablePrograms = (uint32)NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:TARGET:CONTEXT_MENU:PROGRAMMES")->getValue32();
|
||||
bool entityAttackable = (availablePrograms&(1<<BOTCHATTYPE::Attackable)) || entity->properties().attackable();
|
||||
if (ClientCfg.R2EDEnabled)
|
||||
{
|
||||
|
@ -427,7 +427,7 @@ void checkUnderCursor()
|
|||
else if(availablePrograms & (1 << BOTCHATTYPE::WebPageFlag))
|
||||
{
|
||||
// get the web page title textID
|
||||
CCDBNodeLeaf *pNL = IM->getDbProp("LOCAL:TARGET:CONTEXT_MENU:WEB_PAGE_TITLE", false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:TARGET:CONTEXT_MENU:WEB_PAGE_TITLE", false);
|
||||
if(pNL && pNL->getValue32())
|
||||
{
|
||||
uint32 textID = pNL->getValue32();
|
||||
|
@ -446,7 +446,7 @@ void checkUnderCursor()
|
|||
else if(availablePrograms & (1 << BOTCHATTYPE::OutpostFlag))
|
||||
{
|
||||
// get the outpost sheet
|
||||
CCDBNodeLeaf *pNL = IM->getDbProp("LOCAL:TARGET:CONTEXT_MENU:OUTPOST", false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:TARGET:CONTEXT_MENU:OUTPOST", false);
|
||||
if(pNL && pNL->getValue32())
|
||||
{
|
||||
// get the outpost name
|
||||
|
@ -790,7 +790,7 @@ void contextTalk(bool rightClick, bool dblClick)
|
|||
if(IM == 0)
|
||||
return;
|
||||
// Get Entity Program
|
||||
uint32 availablePrograms = (uint32)IM->getDbProp("LOCAL:TARGET:CONTEXT_MENU:PROGRAMMES")->getValue32();
|
||||
uint32 availablePrograms = (uint32)NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:TARGET:CONTEXT_MENU:PROGRAMMES")->getValue32();
|
||||
// Static Mission
|
||||
if(availablePrograms & (1 << BOTCHATTYPE::ChooseMissionFlag))
|
||||
UserEntity->moveTo(SlotUnderCursor, 2.0, CUserEntity::StaticMission);
|
||||
|
|
|
@ -584,22 +584,22 @@ void displayNetDebug ()
|
|||
TextContext->printfAt(1.f, line, "Local Counter: %d", val);
|
||||
line += lineStep;
|
||||
// Inventory Counter
|
||||
val= pIM->getDbProp("SERVER:INVENTORY:COUNTER")->getValue32();
|
||||
val= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:INVENTORY:COUNTER")->getValue32();
|
||||
val&= pIM->getLocalSyncActionCounterMask();
|
||||
TextContext->printfAt(1.f, line, "INVENTORY:COUNTER: %d", val);
|
||||
line += lineStep;
|
||||
// Exchange Counter
|
||||
val= pIM->getDbProp("SERVER:EXCHANGE:COUNTER")->getValue32();
|
||||
val= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:EXCHANGE:COUNTER")->getValue32();
|
||||
val&= pIM->getLocalSyncActionCounterMask();
|
||||
TextContext->printfAt(1.f, line, "EXCHANGE:COUNTER: %d", val);
|
||||
line += lineStep;
|
||||
// Programme Counter
|
||||
val= pIM->getDbProp("SERVER:TARGET:CONTEXT_MENU:COUNTER")->getValue32();
|
||||
val= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:TARGET:CONTEXT_MENU:COUNTER")->getValue32();
|
||||
val&= pIM->getLocalSyncActionCounterMask();
|
||||
TextContext->printfAt(1.f, line, "TARGET:CONTEXT_MENU:COUNTER: %d", val);
|
||||
line += lineStep;
|
||||
// User Counter
|
||||
val= pIM->getDbProp("SERVER:USER:COUNTER")->getValue32();
|
||||
val= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:COUNTER")->getValue32();
|
||||
val&= pIM->getLocalSyncActionCounterMask();
|
||||
TextContext->printfAt(1.f, line, "USER:COUNTER: %d", val);
|
||||
line += lineStep;
|
||||
|
@ -608,14 +608,14 @@ void displayNetDebug ()
|
|||
// SPhrase Execution Synchronisation Counter
|
||||
CSPhraseManager *pPM= CSPhraseManager::getInstance();
|
||||
// Next action
|
||||
uint srvVal= pIM->getDbProp(PHRASE_DB_COUNTER_NEXT)->getValue32();
|
||||
uint srvVal= NLGUI::CDBManager::getInstance()->getDbProp(PHRASE_DB_COUNTER_NEXT)->getValue32();
|
||||
uint locVal= pPM->getPhraseNextExecuteCounter() ;
|
||||
srvVal&= PHRASE_EXECUTE_COUNTER_MASK;
|
||||
locVal&= PHRASE_EXECUTE_COUNTER_MASK;
|
||||
TextContext->printfAt(1.f, line, "NextAction (loc/srv): %d/%d", locVal, srvVal);
|
||||
line += lineStep;
|
||||
// CycleAction
|
||||
srvVal= pIM->getDbProp(PHRASE_DB_COUNTER_CYCLE)->getValue32();
|
||||
srvVal= NLGUI::CDBManager::getInstance()->getDbProp(PHRASE_DB_COUNTER_CYCLE)->getValue32();
|
||||
locVal= pPM->getPhraseCycleExecuteCounter();
|
||||
srvVal&= PHRASE_EXECUTE_COUNTER_MASK;
|
||||
locVal&= PHRASE_EXECUTE_COUNTER_MASK;
|
||||
|
|
|
@ -433,21 +433,21 @@ void CEntityManager::initialize(uint nbMaxEntity)
|
|||
for (i=0; i<MAX_NUM_MISSIONS; i++)
|
||||
for (j=0; j<MAX_NUM_MISSION_TARGETS; j++)
|
||||
{
|
||||
pIM->addDBObserver(&MissionTargetObserver, "SERVER:MISSIONS:"+toString(i)+":TARGET"+toString(j)+":TITLE");
|
||||
NLGUI::CDBManager::getInstance()->getDB()->addObserver(&MissionTargetObserver, ICDBNode::CTextId( "SERVER:MISSIONS:"+toString(i)+":TARGET"+toString(j)+":TITLE" ) );
|
||||
}
|
||||
|
||||
// Add an Observer to the Team database
|
||||
for (i=0; i<MaxNumPeopleInTeam; i++)
|
||||
{
|
||||
pIM->addDBObserver(&TeamUIDObserver, toString(TEAM_DB_PATH ":%d:UID", i));
|
||||
pIM->addDBObserver(&TeamPresentObserver, toString(TEAM_DB_PATH ":%d:NAME", i));
|
||||
NLGUI::CDBManager::getInstance()->getDB()->addObserver(&TeamUIDObserver, ICDBNode::CTextId( toString(TEAM_DB_PATH ":%d:UID", i) ) );
|
||||
NLGUI::CDBManager::getInstance()->getDB()->addObserver(&TeamPresentObserver, ICDBNode::CTextId( toString(TEAM_DB_PATH ":%d:NAME", i) ));
|
||||
}
|
||||
|
||||
// Add an Observer to the Animal database
|
||||
for (i=0; i<MAX_INVENTORY_ANIMAL; i++)
|
||||
{
|
||||
pIM->addDBObserver(&AnimalUIDObserver, toString("SERVER:PACK_ANIMAL:BEAST%d:UID",i));
|
||||
pIM->addDBObserver(&AnimalStatusObserver, toString("SERVER:PACK_ANIMAL:BEAST%d:STATUS",i));
|
||||
NLGUI::CDBManager::getInstance()->getDB()->addObserver(&AnimalUIDObserver, ICDBNode::CTextId( toString("SERVER:PACK_ANIMAL:BEAST%d:UID",i) ));
|
||||
NLGUI::CDBManager::getInstance()->getDB()->addObserver(&AnimalStatusObserver, ICDBNode::CTextId( toString("SERVER:PACK_ANIMAL:BEAST%d:STATUS",i) ));
|
||||
}
|
||||
|
||||
}// initialize //
|
||||
|
|
|
@ -2423,33 +2423,33 @@ public:
|
|||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
CEntityCL::_EntitiesColor[CEntityCL::User] = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:USER")->getValueRGBA();
|
||||
CEntityCL::_EntitiesColor[CEntityCL::Player] = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:PLAYER")->getValueRGBA();
|
||||
CEntityCL::_EntitiesColor[CEntityCL::NPC] = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:NPC")->getValueRGBA();
|
||||
CEntityCL::_EntitiesColor[CEntityCL::Fauna] = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:FAUNA")->getValueRGBA();
|
||||
CEntityCL::_EntitiesColor[CEntityCL::ForageSource] = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:SOURCE")->getValueRGBA();
|
||||
CEntityCL::_DeadColor = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:DEAD")->getValueRGBA();
|
||||
CEntityCL::_TargetColor = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:TARGET")->getValueRGBA();
|
||||
CEntityCL::_GroupColor = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:GROUP")->getValueRGBA();
|
||||
CEntityCL::_GuildColor = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:GUILD")->getValueRGBA();
|
||||
CEntityCL::_UserMountColor = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:MOUNT")->getValueRGBA();
|
||||
CEntityCL::_UserPackAnimalColor = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:BEAST")->getValueRGBA();
|
||||
CEntityCL::_PvpEnemyColor = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:PVPENEMY")->getValueRGBA();
|
||||
CEntityCL::_PvpAllyColor = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:PVPALLY")->getValueRGBA();
|
||||
CEntityCL::_PvpAllyInTeamColor = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:PVPALLYINTEAM")->getValueRGBA();
|
||||
CEntityCL::_PvpNeutralColor = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:PVPNEUTRAL")->getValueRGBA();
|
||||
CEntityCL::_EntitiesColor[CEntityCL::User] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:ENTITY:COLORS:USER")->getValueRGBA();
|
||||
CEntityCL::_EntitiesColor[CEntityCL::Player] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:ENTITY:COLORS:PLAYER")->getValueRGBA();
|
||||
CEntityCL::_EntitiesColor[CEntityCL::NPC] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:ENTITY:COLORS:NPC")->getValueRGBA();
|
||||
CEntityCL::_EntitiesColor[CEntityCL::Fauna] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:ENTITY:COLORS:FAUNA")->getValueRGBA();
|
||||
CEntityCL::_EntitiesColor[CEntityCL::ForageSource] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:ENTITY:COLORS:SOURCE")->getValueRGBA();
|
||||
CEntityCL::_DeadColor = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:ENTITY:COLORS:DEAD")->getValueRGBA();
|
||||
CEntityCL::_TargetColor = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:ENTITY:COLORS:TARGET")->getValueRGBA();
|
||||
CEntityCL::_GroupColor = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:ENTITY:COLORS:GROUP")->getValueRGBA();
|
||||
CEntityCL::_GuildColor = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:ENTITY:COLORS:GUILD")->getValueRGBA();
|
||||
CEntityCL::_UserMountColor = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:ENTITY:COLORS:MOUNT")->getValueRGBA();
|
||||
CEntityCL::_UserPackAnimalColor = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:ENTITY:COLORS:BEAST")->getValueRGBA();
|
||||
CEntityCL::_PvpEnemyColor = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:ENTITY:COLORS:PVPENEMY")->getValueRGBA();
|
||||
CEntityCL::_PvpAllyColor = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:ENTITY:COLORS:PVPALLY")->getValueRGBA();
|
||||
CEntityCL::_PvpAllyInTeamColor = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:ENTITY:COLORS:PVPALLYINTEAM")->getValueRGBA();
|
||||
CEntityCL::_PvpNeutralColor = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:ENTITY:COLORS:PVPNEUTRAL")->getValueRGBA();
|
||||
|
||||
// don't save these colors in .icfg because players can't change them
|
||||
CEntityCL::_GMTitleColor[ CHARACTER_TITLE::SGM - CHARACTER_TITLE::BeginGmTitle ] = pIM->getDbProp("UI:INTERFACE:ENTITY:COLORS:SGM")->getValueRGBA();
|
||||
CEntityCL::_GMTitleColor[ CHARACTER_TITLE::GM - CHARACTER_TITLE::BeginGmTitle ] = pIM->getDbProp("UI:INTERFACE:ENTITY:COLORS:GM")->getValueRGBA();
|
||||
CEntityCL::_GMTitleColor[ CHARACTER_TITLE::VG - CHARACTER_TITLE::BeginGmTitle ] = pIM->getDbProp("UI:INTERFACE:ENTITY:COLORS:VG")->getValueRGBA();
|
||||
CEntityCL::_GMTitleColor[ CHARACTER_TITLE::SG - CHARACTER_TITLE::BeginGmTitle ] = pIM->getDbProp("UI:INTERFACE:ENTITY:COLORS:SG")->getValueRGBA();
|
||||
CEntityCL::_GMTitleColor[ CHARACTER_TITLE::G - CHARACTER_TITLE::BeginGmTitle ] = pIM->getDbProp("UI:INTERFACE:ENTITY:COLORS:G")->getValueRGBA();
|
||||
CEntityCL::_GMTitleColor[ CHARACTER_TITLE::SGM - CHARACTER_TITLE::BeginGmTitle ] = NLGUI::CDBManager::getInstance()->getDbProp("UI:INTERFACE:ENTITY:COLORS:SGM")->getValueRGBA();
|
||||
CEntityCL::_GMTitleColor[ CHARACTER_TITLE::GM - CHARACTER_TITLE::BeginGmTitle ] = NLGUI::CDBManager::getInstance()->getDbProp("UI:INTERFACE:ENTITY:COLORS:GM")->getValueRGBA();
|
||||
CEntityCL::_GMTitleColor[ CHARACTER_TITLE::VG - CHARACTER_TITLE::BeginGmTitle ] = NLGUI::CDBManager::getInstance()->getDbProp("UI:INTERFACE:ENTITY:COLORS:VG")->getValueRGBA();
|
||||
CEntityCL::_GMTitleColor[ CHARACTER_TITLE::SG - CHARACTER_TITLE::BeginGmTitle ] = NLGUI::CDBManager::getInstance()->getDbProp("UI:INTERFACE:ENTITY:COLORS:SG")->getValueRGBA();
|
||||
CEntityCL::_GMTitleColor[ CHARACTER_TITLE::G - CHARACTER_TITLE::BeginGmTitle ] = NLGUI::CDBManager::getInstance()->getDbProp("UI:INTERFACE:ENTITY:COLORS:G")->getValueRGBA();
|
||||
|
||||
CEntityCL::_GMTitleColor[ CHARACTER_TITLE::CM - CHARACTER_TITLE::BeginGmTitle ] = pIM->getDbProp("UI:INTERFACE:ENTITY:COLORS:CM")->getValueRGBA();
|
||||
CEntityCL::_GMTitleColor[ CHARACTER_TITLE::EM - CHARACTER_TITLE::BeginGmTitle ] = pIM->getDbProp("UI:INTERFACE:ENTITY:COLORS:EM")->getValueRGBA();
|
||||
CEntityCL::_GMTitleColor[ CHARACTER_TITLE::EG - CHARACTER_TITLE::BeginGmTitle ] = pIM->getDbProp("UI:INTERFACE:ENTITY:COLORS:EG")->getValueRGBA();
|
||||
CEntityCL::_GMTitleColor[ CHARACTER_TITLE::OBSERVER - CHARACTER_TITLE::BeginGmTitle ] = pIM->getDbProp("UI:INTERFACE:ENTITY:COLORS:OBSERVER")->getValueRGBA();
|
||||
CEntityCL::_GMTitleColor[ CHARACTER_TITLE::CM - CHARACTER_TITLE::BeginGmTitle ] = NLGUI::CDBManager::getInstance()->getDbProp("UI:INTERFACE:ENTITY:COLORS:CM")->getValueRGBA();
|
||||
CEntityCL::_GMTitleColor[ CHARACTER_TITLE::EM - CHARACTER_TITLE::BeginGmTitle ] = NLGUI::CDBManager::getInstance()->getDbProp("UI:INTERFACE:ENTITY:COLORS:EM")->getValueRGBA();
|
||||
CEntityCL::_GMTitleColor[ CHARACTER_TITLE::EG - CHARACTER_TITLE::BeginGmTitle ] = NLGUI::CDBManager::getInstance()->getDbProp("UI:INTERFACE:ENTITY:COLORS:EG")->getValueRGBA();
|
||||
CEntityCL::_GMTitleColor[ CHARACTER_TITLE::OBSERVER - CHARACTER_TITLE::BeginGmTitle ] = NLGUI::CDBManager::getInstance()->getDbProp("UI:INTERFACE:ENTITY:COLORS:OBSERVER")->getValueRGBA();
|
||||
}
|
||||
};
|
||||
REGISTER_ACTION_HANDLER (CUpdateEntitiesColor, "update_entities_color");
|
||||
|
@ -2631,7 +2631,7 @@ void CEntityCL::updateMissionTarget()
|
|||
for (j=0; j<MAX_NUM_MISSION_TARGETS; j++)
|
||||
{
|
||||
// Get the db prop
|
||||
CCDBNodeLeaf *prop = pIM->getDbProp("SERVER:MISSIONS:"+toString(i)+":TARGET"+toString(j)+":TITLE", false);
|
||||
CCDBNodeLeaf *prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:MISSIONS:"+toString(i)+":TARGET"+toString(j)+":TITLE", false);
|
||||
if (prop)
|
||||
{
|
||||
_MissionTarget = _NameId == (uint32)prop->getValue32();
|
||||
|
@ -2733,7 +2733,7 @@ CCDBNodeLeaf *CEntityCL::getOpacityDBNode()
|
|||
if (!_OpacityMinNodeLeaf)
|
||||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
_OpacityMinNodeLeaf = pIM->getDbProp("UI:SAVE:USER_CHAR_OPA_MIN", false);
|
||||
_OpacityMinNodeLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:USER_CHAR_OPA_MIN", false);
|
||||
}
|
||||
return _OpacityMinNodeLeaf;
|
||||
}
|
||||
|
@ -2831,8 +2831,8 @@ void CEntityCL::updateIsInTeam ()
|
|||
for (uint i=0; i<MaxNumPeopleInTeam; i++)
|
||||
{
|
||||
// Get the db prop
|
||||
CCDBNodeLeaf *uidProp = pIM->getDbProp(toString(TEAM_DB_PATH ":%d:UID", i), false);
|
||||
CCDBNodeLeaf *presentProp = pIM->getDbProp(toString(TEAM_DB_PATH ":%d:NAME", i), false);
|
||||
CCDBNodeLeaf *uidProp = NLGUI::CDBManager::getInstance()->getDbProp(toString(TEAM_DB_PATH ":%d:UID", i), false);
|
||||
CCDBNodeLeaf *presentProp = NLGUI::CDBManager::getInstance()->getDbProp(toString(TEAM_DB_PATH ":%d:NAME", i), false);
|
||||
// If same Entity uid than the one in the Database, ok the entity is in the Player TEAM!!
|
||||
if (uidProp && uidProp->getValue32() == (sint32)dataSetId() &&
|
||||
presentProp && presentProp->getValueBool() )
|
||||
|
@ -2861,9 +2861,9 @@ void CEntityCL::updateIsUserAnimal ()
|
|||
for (uint i=0; i<MAX_INVENTORY_ANIMAL; i++)
|
||||
{
|
||||
// Get the db prop
|
||||
CCDBNodeLeaf *uidProp = pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:UID", i), false);
|
||||
CCDBNodeLeaf *statusProp = pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:STATUS", i), false);
|
||||
CCDBNodeLeaf *typeProp = pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:TYPE", i), false);
|
||||
CCDBNodeLeaf *uidProp = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:UID", i), false);
|
||||
CCDBNodeLeaf *statusProp = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:STATUS", i), false);
|
||||
CCDBNodeLeaf *typeProp = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:TYPE", i), false);
|
||||
// I must have the same Id, and the animal entry must be ok.
|
||||
if(uidProp && statusProp && typeProp && uidProp->getValue32() == (sint32)dataSetId() &&
|
||||
ANIMAL_STATUS::isSpawned((ANIMAL_STATUS::EAnimalStatus)(statusProp->getValue32()) ))
|
||||
|
@ -2893,8 +2893,8 @@ ANIMAL_STATUS::EAnimalStatus CEntityCL::getPackAnimalStatus() const
|
|||
for (uint i=0; i<MAX_INVENTORY_ANIMAL; i++)
|
||||
{
|
||||
// Get the db prop
|
||||
CCDBNodeLeaf *uidProp = pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:UID", i), false);
|
||||
CCDBNodeLeaf *statusProp = pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:STATUS", i), false);
|
||||
CCDBNodeLeaf *uidProp = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:UID", i), false);
|
||||
CCDBNodeLeaf *statusProp = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:STATUS", i), false);
|
||||
// I must have the same Id, and the animal entry must be ok.
|
||||
if(uidProp && statusProp && uidProp->getValue32() == (sint32)dataSetId())
|
||||
return (ANIMAL_STATUS::EAnimalStatus)(statusProp->getValue32());
|
||||
|
@ -2915,8 +2915,8 @@ bool CEntityCL::getPackAnimalIndexInDB(sint &dbIndex) const
|
|||
for (uint i=0; i<MAX_INVENTORY_ANIMAL; i++)
|
||||
{
|
||||
// Get the db prop
|
||||
CCDBNodeLeaf *uidProp = pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:UID", i), false);
|
||||
CCDBNodeLeaf *statusProp = pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:STATUS", i), false);
|
||||
CCDBNodeLeaf *uidProp = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:UID", i), false);
|
||||
CCDBNodeLeaf *statusProp = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:STATUS", i), false);
|
||||
// I must have the same Id, and the animal entry must be ok.
|
||||
if(uidProp && statusProp && uidProp->getValue32() == (sint32)dataSetId())
|
||||
{
|
||||
|
@ -3026,7 +3026,7 @@ void CEntityCL::updateVisiblePostPos(const NLMISC::TTime &/* currentTimeInMs */,
|
|||
|
||||
bool bShowReticle = true;
|
||||
|
||||
CCDBNodeLeaf* node = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:SHOW_RETICLE");
|
||||
CCDBNodeLeaf* node = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:SHOW_RETICLE");
|
||||
if (node)
|
||||
{
|
||||
bShowReticle = node->getValueBool();
|
||||
|
@ -3142,7 +3142,7 @@ void CEntityCL::updateVisiblePostPos(const NLMISC::TTime &/* currentTimeInMs */,
|
|||
// Colorize the selection depending of the level of the creature
|
||||
{
|
||||
CRGBA col = CRGBA(0,0,0);
|
||||
uint8 nForce = CInterfaceManager::getInstance()->getDbProp("SERVER:TARGET:FORCE_RATIO")->getValue8();
|
||||
uint8 nForce = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:TARGET:FORCE_RATIO")->getValue8();
|
||||
_SelectionFX.setUserParam(0, 0.1f*nForce + 0.1f);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1268,7 +1268,7 @@ void CFarTP::sendReady()
|
|||
// Update Network.
|
||||
NetMngr.update();
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
// Be nice to the system
|
||||
nlSleep(100);
|
||||
}
|
||||
|
@ -1407,7 +1407,7 @@ void CFarTP::farTPmainLoop()
|
|||
// Update Network.
|
||||
NetMngr.update();
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
|
||||
// TODO: resend in case the last datagram sent was lost?
|
||||
// // check if we can send another dated block
|
||||
|
|
|
@ -82,7 +82,7 @@ void CGameContextMenu::init(const std::string &srcMenuId)
|
|||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
_GroupMenu = dynamic_cast<CGroupMenu*>(pIM->getWindowFromId ("ui:interface:" + menuId + ""));
|
||||
_ContextVal = pIM->getDbProp("SERVER:TARGET:CONTEXT_VAL", false);
|
||||
_ContextVal = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:TARGET:CONTEXT_VAL", false);
|
||||
|
||||
if(_GroupMenu == NULL)
|
||||
{
|
||||
|
@ -93,7 +93,7 @@ void CGameContextMenu::init(const std::string &srcMenuId)
|
|||
_GroupMilkoPad = "ui:interface:milko_pad";
|
||||
if(_GroupMilkoPad != NULL)
|
||||
{
|
||||
_MilkoAttackDisengage = pIM->getDbProp("UI:VARIABLES:MK_ATTACK", false);
|
||||
_MilkoAttackDisengage = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:MK_ATTACK", false);
|
||||
_MilkoAttDisBut1 = "ui:interface:milko_pad:content:mode1:mode1_content:milko_actions:action5";
|
||||
_MilkoAttDisBut2 = "ui:interface:milko_pad:content:mode2:action5";
|
||||
}
|
||||
|
@ -109,13 +109,13 @@ void CGameContextMenu::init(const std::string &srcMenuId)
|
|||
}
|
||||
|
||||
// Some DB links
|
||||
_AvailablePrograms = pIM->getDbProp("LOCAL:TARGET:CONTEXT_MENU:PROGRAMMES");
|
||||
_ServerTeamPresent = pIM->getDbProp(TEAM_DB_PATH ":0:PRESENT", false);
|
||||
_ServerInDuel = pIM->getDbProp("SERVER:USER:IN_DUEL", false);
|
||||
_ServerInPvpChallenge = pIM->getDbProp("SERVER:USER:IN_PVP_CHALLENGE", false);
|
||||
_WebPageTitle = pIM->getDbProp("LOCAL:TARGET:CONTEXT_MENU:WEB_PAGE_TITLE", false);
|
||||
_OutpostSheet = pIM->getDbProp("LOCAL:TARGET:CONTEXT_MENU:OUTPOST", false);
|
||||
_OutpostRightToBannish = pIM->getDbProp("SERVER:CHARACTER_INFO:PVP_OUTPOST:RIGHT_TO_BANISH", false);
|
||||
_AvailablePrograms = NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:TARGET:CONTEXT_MENU:PROGRAMMES");
|
||||
_ServerTeamPresent = NLGUI::CDBManager::getInstance()->getDbProp(TEAM_DB_PATH ":0:PRESENT", false);
|
||||
_ServerInDuel = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:IN_DUEL", false);
|
||||
_ServerInPvpChallenge = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:IN_PVP_CHALLENGE", false);
|
||||
_WebPageTitle = NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:TARGET:CONTEXT_MENU:WEB_PAGE_TITLE", false);
|
||||
_OutpostSheet = NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:TARGET:CONTEXT_MENU:OUTPOST", false);
|
||||
_OutpostRightToBannish = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:PVP_OUTPOST:RIGHT_TO_BANISH", false);
|
||||
|
||||
|
||||
// Some text Menu
|
||||
|
@ -146,14 +146,14 @@ void CGameContextMenu::init(const std::string &srcMenuId)
|
|||
// Mission DB and Text link
|
||||
for(uint k = 0; k < NUM_MISSION_OPTIONS; ++k)
|
||||
{
|
||||
_MissionOption[k] = pIM->getDbProp(toString("LOCAL:TARGET:CONTEXT_MENU:MISSIONS_OPTIONS:%d:TITLE", (int) k), false);
|
||||
_MissionOption[k] = NLGUI::CDBManager::getInstance()->getDbProp(toString("LOCAL:TARGET:CONTEXT_MENU:MISSIONS_OPTIONS:%d:TITLE", (int) k), false);
|
||||
_TextMission[k] = toString(("ui:interface:" + menuId + ":mo%d").c_str(), (int) k);
|
||||
}
|
||||
|
||||
// Mission Ring DB and Text link
|
||||
for(uint k = 0; k < BOTCHATTYPE::MaxR2MissionEntryDatabase; ++k)
|
||||
{
|
||||
_MissionRing[k]= pIM->getDbProp(toString("LOCAL:TARGET:CONTEXT_MENU:MISSION_RING:%d:TITLE", k), false);
|
||||
_MissionRing[k]= NLGUI::CDBManager::getInstance()->getDbProp(toString("LOCAL:TARGET:CONTEXT_MENU:MISSION_RING:%d:TITLE", k), false);
|
||||
_TextMissionRing[k] = toString(("ui:interface:" + menuId + ":mr%d").c_str(), (int) k);
|
||||
}
|
||||
|
||||
|
@ -569,7 +569,7 @@ void CGameContextMenu::update()
|
|||
if(ok)
|
||||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *node= pIM->getDbProp("UI:GCM_BEAST_SELECTED", false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("UI:GCM_BEAST_SELECTED", false);
|
||||
// beast_order AH start with 1 (0 for ALL beasts)
|
||||
if(node)
|
||||
node->setValue32(animalIndex+1);
|
||||
|
@ -960,10 +960,10 @@ bool testMenuOptionForPackAnimal( CEntityCL* selectedAnimalInVision, uint index,
|
|||
|
||||
// Get animal status and type
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:STATUS", index), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:STATUS", index), false);
|
||||
if(!node) return false;
|
||||
ANIMAL_STATUS::EAnimalStatus status= (ANIMAL_STATUS::EAnimalStatus)node->getValue32();
|
||||
node= pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:TYPE", index), false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:TYPE", index), false);
|
||||
if(!node) return false;
|
||||
ANIMAL_TYPE::EAnimalType anitype= (ANIMAL_TYPE::EAnimalType)node->getValue32();
|
||||
|
||||
|
|
|
@ -919,7 +919,7 @@ NLMISC_COMMAND(gfxAdd, "gfxAdd", "<>")
|
|||
|
||||
CInterfaceManager *IM = CInterfaceManager::getInstance();
|
||||
// Set Position
|
||||
node = IM->getDbProp("SERVER:Entities:E"+NLMISC::toString("%d", slot)+":P"+NLMISC::toString("%d", CLFECOMMON::PROPERTY_POSX), false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+NLMISC::toString("%d", slot)+":P"+NLMISC::toString("%d", CLFECOMMON::PROPERTY_POSX), false);
|
||||
NLMISC::CVectorD pos;
|
||||
pos = UserEntity->pos() + 2.f * UserEntity->front();
|
||||
if(node)
|
||||
|
@ -928,11 +928,11 @@ NLMISC_COMMAND(gfxAdd, "gfxAdd", "<>")
|
|||
sint64 y = (sint64)(pos.y * 1000.0);
|
||||
sint64 z = (sint64)(pos.z * 1000.0);
|
||||
node->setValue64(x);
|
||||
node = IM->getDbProp("SERVER:Entities:E"+NLMISC::toString("%d", slot)+":P"+NLMISC::toString("%d", CLFECOMMON::PROPERTY_POSY), false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+NLMISC::toString("%d", slot)+":P"+NLMISC::toString("%d", CLFECOMMON::PROPERTY_POSY), false);
|
||||
if(node)
|
||||
{
|
||||
node->setValue64(y);
|
||||
node = IM->getDbProp("SERVER:Entities:E"+NLMISC::toString("%d", slot)+":P"+NLMISC::toString("%d", CLFECOMMON::PROPERTY_POSZ), false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+NLMISC::toString("%d", slot)+":P"+NLMISC::toString("%d", CLFECOMMON::PROPERTY_POSZ), false);
|
||||
if(node)
|
||||
{
|
||||
node->setValue64(z);
|
||||
|
@ -944,7 +944,7 @@ NLMISC_COMMAND(gfxAdd, "gfxAdd", "<>")
|
|||
entity->front(UserEntity->front());
|
||||
entity->dir(UserEntity->front());
|
||||
// Set Mode
|
||||
node = IM->getDbProp("SERVER:Entities:E"+NLMISC::toString("%d", slot)+":P"+NLMISC::toString("%d", CLFECOMMON::PROPERTY_MODE), false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+NLMISC::toString("%d", slot)+":P"+NLMISC::toString("%d", CLFECOMMON::PROPERTY_MODE), false);
|
||||
if(node)
|
||||
{
|
||||
MBEHAV::EMode m = MBEHAV::NORMAL;
|
||||
|
@ -967,11 +967,11 @@ NLMISC_COMMAND(gfxAdd, "gfxAdd", "<>")
|
|||
visualC.PropertySubData.BreastSize = 7;
|
||||
// Set The Database
|
||||
prop = (sint64 *)&visualB;
|
||||
IM->getDbProp("SERVER:Entities:E"+NLMISC::toString("%d", slot)+":P"+NLMISC::toString("%d", CLFECOMMON::PROPERTY_VPB))->setValue64(*prop);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+NLMISC::toString("%d", slot)+":P"+NLMISC::toString("%d", CLFECOMMON::PROPERTY_VPB))->setValue64(*prop);
|
||||
prop = (sint64 *)&visualC;
|
||||
IM->getDbProp("SERVER:Entities:E"+NLMISC::toString("%d", slot)+":P"+NLMISC::toString("%d", CLFECOMMON::PROPERTY_VPC))->setValue64(*prop);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+NLMISC::toString("%d", slot)+":P"+NLMISC::toString("%d", CLFECOMMON::PROPERTY_VPC))->setValue64(*prop);
|
||||
prop = (sint64 *)&visualA;
|
||||
IM->getDbProp("SERVER:Entities:E"+NLMISC::toString("%d", slot)+":P"+NLMISC::toString("%d", CLFECOMMON::PROPERTY_VPA))->setValue64(*prop);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+NLMISC::toString("%d", slot)+":P"+NLMISC::toString("%d", CLFECOMMON::PROPERTY_VPA))->setValue64(*prop);
|
||||
// Apply Changes.
|
||||
EntitiesMngr.updateVisualProperty(0, slot, CLFECOMMON::PROPERTY_VPA);
|
||||
}
|
||||
|
|
|
@ -317,7 +317,7 @@ inline void waitForNetworkMessage(bool &var)
|
|||
// Update network.
|
||||
NetMngr.update();
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
// Send dummy info
|
||||
NetMngr.send();
|
||||
// Do not take all the CPU.
|
||||
|
@ -475,9 +475,9 @@ void initMainLoop()
|
|||
|
||||
IngameDbMngr.init(CPath::lookup("database.xml"), ProgressBar);
|
||||
ICDBNode::CTextId textId("SERVER");
|
||||
if( pIM->getDB()->getNode(textId, false) )
|
||||
pIM->getDB()->removeNode(textId);
|
||||
pIM->getDB()->attachChild(IngameDbMngr.getNodePtr(),"SERVER");
|
||||
if( NLGUI::CDBManager::getInstance()->getDB()->getNode(textId, false) )
|
||||
NLGUI::CDBManager::getInstance()->getDB()->removeNode(textId);
|
||||
NLGUI::CDBManager::getInstance()->getDB()->attachChild(IngameDbMngr.getNodePtr(),"SERVER");
|
||||
|
||||
// Set the database
|
||||
NetMngr.setDataBase (IngameDbMngr.getNodePtr());
|
||||
|
@ -497,8 +497,8 @@ void initMainLoop()
|
|||
|
||||
// Add the LOCAL branch
|
||||
ICDBNode::CTextId textId("LOCAL");
|
||||
if( pIM->getDB()->getNode(textId, false) )
|
||||
pIM->getDB()->removeNode(textId);
|
||||
if( NLGUI::CDBManager::getInstance()->getDB()->getNode(textId, false) )
|
||||
NLGUI::CDBManager::getInstance()->getDB()->removeNode(textId);
|
||||
pIM->createLocalBranch(CPath::lookup("local_database.xml"), ProgressBar);
|
||||
|
||||
initLast = initCurrent;
|
||||
|
@ -1219,7 +1219,7 @@ void initMainLoop()
|
|||
// Update Network.
|
||||
NetMngr.update();
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
}
|
||||
|
||||
// Set the LastGameCycle
|
||||
|
@ -1488,7 +1488,7 @@ void initWelcomeWindow()
|
|||
CInterfaceGroup* welcomeWnd = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface:welcome_info"));
|
||||
if(welcomeWnd)
|
||||
{
|
||||
bool welcomeDbProp = pIM->getDbProp("UI:SAVE:WELCOME")->getValueBool();
|
||||
bool welcomeDbProp = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:WELCOME")->getValueBool();
|
||||
CSessionBrowserImpl &sb = CSessionBrowserImpl::getInstance();
|
||||
welcomeWnd->setActive((sb.CurrentJoinMode!=CFarTP::LaunchEditor) && welcomeDbProp);
|
||||
}
|
||||
|
@ -1502,7 +1502,7 @@ void initHardwareCursor(bool secondCall)
|
|||
CSessionBrowserImpl &sb = CSessionBrowserImpl::getInstance();
|
||||
|
||||
string nodeName = "UI:SAVE:HARDWARE_CURSOR";
|
||||
CCDBNodeLeaf * node= pIM->getDbProp(nodeName);
|
||||
CCDBNodeLeaf * node= NLGUI::CDBManager::getInstance()->getDbProp(nodeName);
|
||||
|
||||
if(node)
|
||||
{
|
||||
|
|
|
@ -324,8 +324,8 @@ public:
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
string dbdst = getParam (Params, "dbdst");
|
||||
string dbsrc = getParam (Params, "dbsrc");
|
||||
CCDBNodeBranch *pNBdst = pIM->getDbBranch(dbdst);
|
||||
CCDBNodeBranch *pNBsrc = pIM->getDbBranch(dbsrc);
|
||||
CCDBNodeBranch *pNBdst = NLGUI::CDBManager::getInstance()->getDbBranch(dbdst);
|
||||
CCDBNodeBranch *pNBsrc = NLGUI::CDBManager::getInstance()->getDbBranch(dbsrc);
|
||||
|
||||
// Branch copy
|
||||
|
||||
|
@ -494,21 +494,21 @@ class CAHActiveMenu : public IActionHandler
|
|||
// update GC_POPUP flag
|
||||
if (gc)
|
||||
{
|
||||
im->getDbProp("UI:VARIABLES:GC_POPUP")->setValue64((gc->isPopuped() || gc->getLayerSetup() == 0) ? 1 : 0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:GC_POPUP")->setValue64((gc->isPopuped() || gc->getLayerSetup() == 0) ? 1 : 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
im->getDbProp("UI:VARIABLES:GC_POPUP")->setValue64(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:GC_POPUP")->setValue64(0);
|
||||
}
|
||||
|
||||
// update GC_HAS_HELP flag
|
||||
if(gc && !gc->getHelpPage().empty())
|
||||
{
|
||||
im->getDbProp("UI:VARIABLES:GC_HAS_HELP")->setValue64(1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:GC_HAS_HELP")->setValue64(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
im->getDbProp("UI:VARIABLES:GC_HAS_HELP")->setValue64(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:GC_HAS_HELP")->setValue64(0);
|
||||
}
|
||||
|
||||
// open the menu
|
||||
|
@ -691,10 +691,10 @@ public:
|
|||
AlphaChooserTarget = gc;
|
||||
if (!_AlphaObserversAdded)
|
||||
{
|
||||
_UiVariableBGAlpha = im->getDbProp("UI:VARIABLES:ALPHA_BG");
|
||||
_UiVariableContentAlpha = im->getDbProp("UI:VARIABLES:ALPHA_CONTENT");
|
||||
_UiVariableRolloverAlphaBG = im->getDbProp("UI:VARIABLES:ALPHA_ROLLOVER_BG");
|
||||
_UiVariableRolloverAlphaContent = im->getDbProp("UI:VARIABLES:ALPHA_ROLLOVER_CONTENT");
|
||||
_UiVariableBGAlpha = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:ALPHA_BG");
|
||||
_UiVariableContentAlpha = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:ALPHA_CONTENT");
|
||||
_UiVariableRolloverAlphaBG = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:ALPHA_ROLLOVER_BG");
|
||||
_UiVariableRolloverAlphaContent = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:ALPHA_ROLLOVER_CONTENT");
|
||||
ICDBNode::CTextId textIdBGAlpha, textIdContentAlpha, textIdRolloverAlphaBG, textIdRolloverAlphaContent;
|
||||
_UiVariableBGAlpha->addObserver(&_BgAlphaObs, textIdBGAlpha);
|
||||
_UiVariableContentAlpha->addObserver(&_ContentAlphaObs, textIdContentAlpha);
|
||||
|
@ -724,7 +724,7 @@ public:
|
|||
OldRolloverAlphaContent = gc->getRolloverAlphaContent();
|
||||
OldUseGlobalAlpha = gc->isUsingGlobalAlpha();
|
||||
// Enable 'use global alpha' button
|
||||
im->getDbProp("UI:VARIABLES:USER_ALPHA")->setValue64(gc->isUsingGlobalAlpha() ? 0 : 1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER_ALPHA")->setValue64(gc->isUsingGlobalAlpha() ? 0 : 1);
|
||||
// show the modal box
|
||||
im->enableModalWindow(gc, "ui:interface:define_ui_transparency");
|
||||
|
||||
|
@ -785,7 +785,7 @@ class CAHUseGlobalAlphaSettings : public IActionHandler
|
|||
{
|
||||
AlphaChooserTarget->setUseGlobalAlpha(!AlphaChooserTarget->isUsingGlobalAlpha());
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
im->getDbProp("UI:VARIABLES:USER_ALPHA")->setValue64(AlphaChooserTarget->isUsingGlobalAlpha() ? 0 : 1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER_ALPHA")->setValue64(AlphaChooserTarget->isUsingGlobalAlpha() ? 0 : 1);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -130,7 +130,7 @@ static bool playerKnowSkill( SKILLS::ESkills e)
|
|||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
string sPath = "SERVER:CHARACTER_INFO:SKILLS:" + toStringEnum( e ) + ":SKILL";
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(sPath,false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(sPath,false);
|
||||
if ((pNL != NULL) && (pNL->getValue64() > 0))
|
||||
return true;
|
||||
else
|
||||
|
@ -501,7 +501,7 @@ public:
|
|||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
// get flags
|
||||
std::string playerGiftNeededDbPath = toString("LOCAL:TARGET:CONTEXT_MENU:MISSIONS_OPTIONS:%d:PLAYER_GIFT_NEEDED", intId);
|
||||
CCDBNodeLeaf *playerGiftNeeded = im->getDbProp(playerGiftNeededDbPath, false);
|
||||
CCDBNodeLeaf *playerGiftNeeded = NLGUI::CDBManager::getInstance()->getDbProp(playerGiftNeededDbPath, false);
|
||||
if (!playerGiftNeeded) return;
|
||||
//
|
||||
//CBotChatManager::getInstance()->setChosenMissionFlags((uint) missionFlags->getValue8());
|
||||
|
@ -528,7 +528,7 @@ public:
|
|||
{
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
// if there is only a single page available for missions, go to that page directly
|
||||
CCDBNodeLeaf *progs = im->getDbProp("SERVER:TARGET:PROGRAMMES", false);
|
||||
CCDBNodeLeaf *progs = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:TARGET:PROGRAMMES", false);
|
||||
if (!progs)
|
||||
{
|
||||
nlwarning("<CHandlerContextMissions::execute> can't retrieve programs.");
|
||||
|
@ -742,11 +742,11 @@ static void chooseSheath (ITEMFAMILY::EItemFamily eIF, string sAllSkills)
|
|||
{
|
||||
// Choose right sheath
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *pNLwrite = pIM->getDbProp(pIM->getDefine("ui_set_active"));
|
||||
CCDBNodeLeaf *pNLread = pIM->getDbProp(pIM->getDefine("set_nb"));
|
||||
CCDBNodeLeaf *pNLwrite = NLGUI::CDBManager::getInstance()->getDbProp(pIM->getDefine("ui_set_active"));
|
||||
CCDBNodeLeaf *pNLread = NLGUI::CDBManager::getInstance()->getDbProp(pIM->getDefine("set_nb"));
|
||||
sint32 nNbSheath = (sint32)pNLread->getValue64();
|
||||
if (nNbSheath == 0) return;
|
||||
pNLread = pIM->getDbProp(pIM->getDefine("set_active"));
|
||||
pNLread = NLGUI::CDBManager::getInstance()->getDbProp(pIM->getDefine("set_active"));
|
||||
sint32 nActiveSheath = (sint32)pNLread->getValue64();
|
||||
bool bFound = false;
|
||||
for (sint32 i = 0; i < ((nNbSheath/2)+1); ++i)
|
||||
|
@ -763,7 +763,7 @@ static void chooseSheath (ITEMFAMILY::EItemFamily eIF, string sAllSkills)
|
|||
|
||||
string sPath;
|
||||
sPath = pIM->getDefine("set_base") + ":" + NLMISC::toString(nSheathToTest) + ":" + pIM->getDefine("set_r") + ":SHEET";
|
||||
pNLread = pIM->getDbProp(sPath);
|
||||
pNLread = NLGUI::CDBManager::getInstance()->getDbProp(sPath);
|
||||
sint32 sheetid = (sint32)pNLread->getValue64();
|
||||
CItemSheet *pIS = dynamic_cast<CItemSheet *>(SheetMngr.get(CSheetId(sheetid)));
|
||||
if (pIS != NULL)
|
||||
|
@ -1019,8 +1019,8 @@ public:
|
|||
// Look through Database the index of the mount selected
|
||||
for (uint32 i = 0; i < MAX_INVENTORY_ANIMAL; i++)
|
||||
{
|
||||
CCDBNodeLeaf *uidProp = pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:UID", i), false);
|
||||
CCDBNodeLeaf *typeProp = pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:TYPE", i), false);
|
||||
CCDBNodeLeaf *uidProp = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:UID", i), false);
|
||||
CCDBNodeLeaf *typeProp = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:TYPE", i), false);
|
||||
if ((uidProp != NULL) && (uidProp->getValue32() == (sint32)sel->dataSetId()) &&
|
||||
(typeProp != NULL) && (typeProp->getValue32() == ANIMAL_TYPE::Mount))
|
||||
{
|
||||
|
@ -1102,7 +1102,7 @@ public:
|
|||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
// get ID
|
||||
CCDBNodeLeaf *dbMissionId = pIM->getDbProp(toString("LOCAL:TARGET:CONTEXT_MENU:MISSION_RING:%d:ID", idInDb), false);
|
||||
CCDBNodeLeaf *dbMissionId = NLGUI::CDBManager::getInstance()->getDbProp(toString("LOCAL:TARGET:CONTEXT_MENU:MISSION_RING:%d:ID", idInDb), false);
|
||||
if (!dbMissionId)
|
||||
return;
|
||||
uint32 missionId= dbMissionId->getValue32();
|
||||
|
@ -1335,7 +1335,7 @@ class CSelectItemSheet : public IActionHandler
|
|||
{
|
||||
#define SKILL_PATH "SERVER:CHARACTER_INFO:SKILLS:"
|
||||
string path = toString(SKILL_PATH "%d:SKILL", (int) rs);
|
||||
CCDBNodeLeaf *nl = im->getDbProp(path,false);
|
||||
CCDBNodeLeaf *nl = NLGUI::CDBManager::getInstance()->getDbProp(path,false);
|
||||
if (nl)
|
||||
{
|
||||
if (nl->getValue32() == 0)
|
||||
|
@ -1421,18 +1421,18 @@ class CSetPriceInDB : public IActionHandler
|
|||
{
|
||||
CSeeds money;
|
||||
money.setTotal(price.getInteger());
|
||||
im->getDbProp(ls)->setValue64(money.getLS());
|
||||
im->getDbProp(ms)->setValue64(money.getMS());
|
||||
im->getDbProp(bs)->setValue64(money.getBS());
|
||||
im->getDbProp(vbs)->setValue64(money.getVBS());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(ls)->setValue64(money.getLS());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(ms)->setValue64(money.getMS());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(bs)->setValue64(money.getBS());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(vbs)->setValue64(money.getVBS());
|
||||
}
|
||||
else
|
||||
{
|
||||
// undefined price
|
||||
im->getDbProp(ls)->setValue64(-1);
|
||||
im->getDbProp(ms)->setValue64(-1);
|
||||
im->getDbProp(bs)->setValue64(-1);
|
||||
im->getDbProp(vbs)->setValue64(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(ls)->setValue64(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(ms)->setValue64(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(bs)->setValue64(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(vbs)->setValue64(-1);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1553,7 +1553,7 @@ public:
|
|||
CViewTextMenu *pUnseat = dynamic_cast<CViewTextMenu*>(pMenu->getView("unseat"));
|
||||
|
||||
// Get the animal Selected. 0 for Alls, 1,2,3,4,5 for each pack animal
|
||||
CCDBNodeLeaf *node= pIM->getDbProp("UI:BEAST_SELECTED", false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("UI:BEAST_SELECTED", false);
|
||||
if(!node) return;
|
||||
sint selected= node->getValue32();
|
||||
|
||||
|
@ -1566,7 +1566,7 @@ public:
|
|||
{
|
||||
// Get the entity if it is in vision
|
||||
CEntityCL* selectedAnimalInVision = NULL;
|
||||
CCDBNodeLeaf *uidProp = pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:UID", i), false);
|
||||
CCDBNodeLeaf *uidProp = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:UID", i), false);
|
||||
if ( uidProp )
|
||||
{
|
||||
CLFECOMMON::TClientDataSetIndex datasetIndex = uidProp->getValue32();
|
||||
|
@ -1582,7 +1582,7 @@ public:
|
|||
{
|
||||
// Get the entity if it is in vision
|
||||
CEntityCL* selectedAnimalInVision = NULL;
|
||||
CCDBNodeLeaf *uidProp = pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:UID", selected-1), false);
|
||||
CCDBNodeLeaf *uidProp = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:UID", selected-1), false);
|
||||
if ( uidProp )
|
||||
{
|
||||
CLFECOMMON::TClientDataSetIndex datasetIndex = uidProp->getValue32();
|
||||
|
@ -1624,7 +1624,7 @@ class CHandlerAnimalTarget : public IActionHandler
|
|||
|
||||
if(animalIndex>=1 && animalIndex<=MAX_INVENTORY_ANIMAL)
|
||||
{
|
||||
CCDBNodeLeaf *prop = pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:UID", animalIndex-1), false);
|
||||
CCDBNodeLeaf *prop = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:UID", animalIndex-1), false);
|
||||
if(prop) entityUid= prop->getValue32();
|
||||
}
|
||||
|
||||
|
@ -2022,7 +2022,7 @@ class CActionHandlerSetTargetName : public IActionHandler
|
|||
if (nSlot > -1)
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
// uint32 nDBid = pIM->getDbProp("SERVER:Entities:E"+toString(nSlot)+":P6")->getValue32();
|
||||
// uint32 nDBid = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString(nSlot)+":P6")->getValue32();
|
||||
uint32 nDBid = 0;
|
||||
if (nSlot < sint32(EntitiesMngr.entities().size()) && EntitiesMngr.entities()[nSlot] != NULL)
|
||||
{
|
||||
|
@ -2102,7 +2102,7 @@ class CActionHandlerSetTargetForceRegionLevel: public IActionHandler
|
|||
if ( pE->isPlayer() )
|
||||
{
|
||||
// Player => deduce RegionForce & ForceLevel from the database
|
||||
CCDBNodeLeaf *pDbTargetUid = pIM->getDbProp( pIM->getDefine("target_uid") );
|
||||
CCDBNodeLeaf *pDbTargetUid = NLGUI::CDBManager::getInstance()->getDbProp( pIM->getDefine("target_uid") );
|
||||
if ( ! pDbTargetUid )
|
||||
return;
|
||||
// Hide the target level if the USER is not in PVP FACTION
|
||||
|
@ -2120,7 +2120,7 @@ class CActionHandlerSetTargetForceRegionLevel: public IActionHandler
|
|||
|
||||
return;
|
||||
}
|
||||
CCDBNodeLeaf *pDbPlayerLevel = pIM->getDbProp( pIM->getDefine("target_player_level") );
|
||||
CCDBNodeLeaf *pDbPlayerLevel = NLGUI::CDBManager::getInstance()->getDbProp( pIM->getDefine("target_player_level") );
|
||||
if ( ! pDbPlayerLevel )
|
||||
return;
|
||||
sint nLevel = pDbPlayerLevel->getValue32();
|
||||
|
@ -2217,7 +2217,7 @@ class CAHUpdateCurrentMode : public IActionHandler
|
|||
string sValue = getParam(Params,"value");
|
||||
string sDBLink = getParam(Params,"dblink");
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(sDBLink, false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(sDBLink, false);
|
||||
if (pNL == NULL) return;
|
||||
|
||||
CInterfaceExprValue eVal;
|
||||
|
@ -2267,7 +2267,7 @@ class CAHUpdateCurrentMode : public IActionHandler
|
|||
bool bFound = false;
|
||||
while (!bFound)
|
||||
{
|
||||
CCDBNodeLeaf *pIntFlags = pIM->getDbProp("SERVER:INTERFACES:FLAGS", false);
|
||||
CCDBNodeLeaf *pIntFlags = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:INTERFACES:FLAGS", false);
|
||||
if (pIntFlags == NULL) return;
|
||||
sint64 nIntFlags = pIntFlags->getValue64();
|
||||
|
||||
|
@ -2634,13 +2634,13 @@ class CAHTargetTeammateShortcut : public IActionHandler
|
|||
return;
|
||||
|
||||
// Index is the database index (serverIndex() not used for team list)
|
||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp( NLMISC::toString( TEAM_DB_PATH ":%hu:NAME", indexInTeam ), false );
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp( NLMISC::toString( TEAM_DB_PATH ":%hu:NAME", indexInTeam ), false );
|
||||
if ( ! pNL )
|
||||
return;
|
||||
if ( pNL->getValueBool() )
|
||||
{
|
||||
// There is a character corresponding to this index
|
||||
pNL = CInterfaceManager::getInstance()->getDbProp( NLMISC::toString( TEAM_DB_PATH ":%hu:UID", indexInTeam ), false );
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp( NLMISC::toString( TEAM_DB_PATH ":%hu:UID", indexInTeam ), false );
|
||||
if ( ! pNL )
|
||||
return;
|
||||
CLFECOMMON::TClientDataSetIndex compressedIndex = pNL->getValue32();
|
||||
|
@ -2740,7 +2740,7 @@ public:
|
|||
const string procNames[MAX_NUM_MODES] = { "tb_setexp", "tb_setinfo", "tb_setlab", "tb_setkeys" };
|
||||
const string dbNames[MAX_NUM_MODES] = { "", "UI:SAVE:CURRENT_INFO_MODE", "UI:SAVE:CURRENT_LAB_MODE", "UI:SAVE:CURRENT_KEY_MODE" };
|
||||
string sValue;
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(dbNames[desktop], false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(dbNames[desktop], false);
|
||||
if (pNL != NULL)
|
||||
sValue = NLMISC::toString((sint32)pNL->getValue64());
|
||||
vector<string> vecStr;
|
||||
|
@ -2930,9 +2930,9 @@ public:
|
|||
pCB->addText(ucstring(stringModeList[j]));
|
||||
}
|
||||
// -1 is important to indicate we set this value in edit mode
|
||||
pIM->getDbProp( GAME_CONFIG_VIDEO_MODE_DB )->setValue32(-1);
|
||||
pIM->getDbProp( GAME_CONFIG_VIDEO_FREQ_DB )->setValue32(-1);
|
||||
pIM->getDbProp( GAME_CONFIG_VIDEO_MODE_DB )->setValue32(nFoundMode);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_MODE_DB )->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_FREQ_DB )->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_MODE_DB )->setValue32(nFoundMode);
|
||||
|
||||
CCtrlBaseButton *pBut = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId( GAME_CONFIG_VIDEO_FULLSCREEN_BUTTON ));
|
||||
if (pBut)
|
||||
|
@ -2965,8 +2965,8 @@ public:
|
|||
else
|
||||
texMode= NormalTextureMode;
|
||||
// -1 is important to indicate we set this value in edit mode
|
||||
pIM->getDbProp( GAME_CONFIG_TEXTURE_MODE_DB )->setValue32(-1);
|
||||
pIM->getDbProp( GAME_CONFIG_TEXTURE_MODE_DB )->setValue32(texMode);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_TEXTURE_MODE_DB )->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_TEXTURE_MODE_DB )->setValue32(texMode);
|
||||
|
||||
// **** Init Screen Aspect Ratio
|
||||
// Init the combo box, according to the value
|
||||
|
@ -2977,17 +2977,17 @@ public:
|
|||
BkupScreenAspectRatio= ClientCfg.ScreenAspectRatio;
|
||||
|
||||
// -1 is here to force var change
|
||||
pIM->getDbProp( "UI:TEMP:SCREEN_RATIO_MODE" )->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( "UI:TEMP:SCREEN_RATIO_MODE" )->setValue32(-1);
|
||||
|
||||
// detect with an epsilon to avoid float precision problems
|
||||
if(fabs(ClientCfg.ScreenAspectRatio - 1.33333f)<=0.00001f)
|
||||
pIM->getDbProp( "UI:TEMP:SCREEN_RATIO_MODE" )->setValue32(0); // 4/3
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( "UI:TEMP:SCREEN_RATIO_MODE" )->setValue32(0); // 4/3
|
||||
else if(fabs(ClientCfg.ScreenAspectRatio - 1.77777f)<=0.00001f)
|
||||
pIM->getDbProp( "UI:TEMP:SCREEN_RATIO_MODE" )->setValue32(1); // 16/9
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( "UI:TEMP:SCREEN_RATIO_MODE" )->setValue32(1); // 16/9
|
||||
else if(ClientCfg.ScreenAspectRatio == 0.f)
|
||||
pIM->getDbProp( "UI:TEMP:SCREEN_RATIO_MODE" )->setValue32(3); // Auto
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( "UI:TEMP:SCREEN_RATIO_MODE" )->setValue32(3); // Auto
|
||||
else
|
||||
pIM->getDbProp( "UI:TEMP:SCREEN_RATIO_MODE" )->setValue32(2); // Custom
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( "UI:TEMP:SCREEN_RATIO_MODE" )->setValue32(2); // Custom
|
||||
}
|
||||
|
||||
// **** Init Language : look in game_config.lua
|
||||
|
@ -3004,8 +3004,8 @@ class CHandlerGameConfigMode : public IActionHandler
|
|||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
sint oldVideoMode= pIM->getDbProp( GAME_CONFIG_VIDEO_MODE_DB )->getOldValue32();
|
||||
sint nVideModeNb = pIM->getDbProp( GAME_CONFIG_VIDEO_MODE_DB )->getValue32();
|
||||
sint oldVideoMode= NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_MODE_DB )->getOldValue32();
|
||||
sint nVideModeNb = NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_MODE_DB )->getValue32();
|
||||
if (nVideModeNb == -1) return;
|
||||
|
||||
CDBGroupComboBox *pCB= dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId( GAME_CONFIG_VIDEO_MODES_COMBO ));
|
||||
|
@ -3053,7 +3053,7 @@ class CHandlerGameConfigMode : public IActionHandler
|
|||
for (j = 0; j < (sint)stringFreqList.size(); j++)
|
||||
pCB->addText(ucstring(stringFreqList[j]) + " Hz");
|
||||
}
|
||||
pIM->getDbProp( GAME_CONFIG_VIDEO_FREQ_DB )->setValue32(nFoundFreq);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_FREQ_DB )->setValue32(nFoundFreq);
|
||||
|
||||
// **** dirt the apply button of the DDX
|
||||
// don't do it at init!
|
||||
|
@ -3075,8 +3075,8 @@ class CHandlerGameConfigLanguage : public IActionHandler
|
|||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
sint old = pIM->getDbProp( GAME_CONFIG_LANGUAGE )->getOldValue32();
|
||||
sint newOne = pIM->getDbProp( GAME_CONFIG_LANGUAGE )->getValue32();
|
||||
sint old = NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_LANGUAGE )->getOldValue32();
|
||||
sint newOne = NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_LANGUAGE )->getValue32();
|
||||
if ((old != -1) && (newOne != -1))
|
||||
{
|
||||
// Set the new language
|
||||
|
@ -3100,8 +3100,8 @@ class CHandlerGameConfigFreq : public IActionHandler
|
|||
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
|
||||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
sint oldFreq= pIM->getDbProp( GAME_CONFIG_VIDEO_FREQ_DB )->getOldValue32();
|
||||
sint newFreq= pIM->getDbProp( GAME_CONFIG_VIDEO_FREQ_DB )->getValue32();
|
||||
sint oldFreq= NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_FREQ_DB )->getOldValue32();
|
||||
sint newFreq= NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_FREQ_DB )->getValue32();
|
||||
|
||||
// dirt the apply button of the DDX.
|
||||
// don't do it at init!
|
||||
|
@ -3123,8 +3123,8 @@ public:
|
|||
virtual void execute(CCtrlBase * /* pCalller */, const string &/* Params */)
|
||||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
sint oldTMode= pIM->getDbProp( GAME_CONFIG_TEXTURE_MODE_DB )->getOldValue32();
|
||||
sint newTMode= pIM->getDbProp( GAME_CONFIG_TEXTURE_MODE_DB )->getValue32();
|
||||
sint oldTMode= NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_TEXTURE_MODE_DB )->getOldValue32();
|
||||
sint newTMode= NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_TEXTURE_MODE_DB )->getValue32();
|
||||
|
||||
// dirt the apply button of the DDX
|
||||
// don't do it at init!
|
||||
|
@ -3193,10 +3193,10 @@ class CHandlerGameConfigApply : public IActionHandler
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
// **** Apply the video mode
|
||||
sint nVideModeNb = pIM->getDbProp( GAME_CONFIG_VIDEO_MODE_DB )->getValue32();
|
||||
sint nVideModeNb = NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_MODE_DB )->getValue32();
|
||||
if (nVideModeNb != -1)
|
||||
{
|
||||
sint nVideoFreqNb = pIM->getDbProp( GAME_CONFIG_VIDEO_FREQ_DB )->getValue32();
|
||||
sint nVideoFreqNb = NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_FREQ_DB )->getValue32();
|
||||
if (nVideoFreqNb != -1)
|
||||
{
|
||||
// Get W, H
|
||||
|
@ -3281,7 +3281,7 @@ class CHandlerGameConfigApply : public IActionHandler
|
|||
bool requestReboot = false;
|
||||
|
||||
// **** Apply the texture mode
|
||||
sint nTexMode = pIM->getDbProp( GAME_CONFIG_TEXTURE_MODE_DB )->getValue32();
|
||||
sint nTexMode = NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_TEXTURE_MODE_DB )->getValue32();
|
||||
if (nTexMode>=0 && nTexMode<=HighTextureMode)
|
||||
{
|
||||
if ((ClientCfg.DivideTextureSizeBy2 != (nTexMode==LowTextureMode)) ||
|
||||
|
@ -3303,7 +3303,7 @@ class CHandlerGameConfigApply : public IActionHandler
|
|||
// only if not in "work" language mode (else strange requestReboot)
|
||||
if(ClientCfg.LanguageCode!="wk")
|
||||
{
|
||||
sint newOne = pIM->getDbProp( GAME_CONFIG_LANGUAGE )->getValue32();
|
||||
sint newOne = NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_LANGUAGE )->getValue32();
|
||||
//string newVal = (newOne==2)?"de":(newOne==1)?"fr":"en";
|
||||
string newVal = convertLanguageIntToLanguageCode(newOne);
|
||||
if (ClientCfg.LanguageCode != newVal)
|
||||
|
@ -3315,7 +3315,7 @@ class CHandlerGameConfigApply : public IActionHandler
|
|||
}
|
||||
|
||||
// Apply the NPC icon display mode
|
||||
CNPCIconCache::getInstance().setEnabled(!ClientCfg.R2EDEnabled && pIM->getDbProp("UI:SAVE:INSCENE:FRIEND:MISSION_ICON")->getValueBool());
|
||||
CNPCIconCache::getInstance().setEnabled(!ClientCfg.R2EDEnabled && NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:INSCENE:FRIEND:MISSION_ICON")->getValueBool());
|
||||
|
||||
// Request a reboot
|
||||
if (requestReboot)
|
||||
|
@ -3358,8 +3358,8 @@ class CHandlerGameConfigChangeScreenRatioMode : public IActionHandler
|
|||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
// get the current mode
|
||||
sint oldMode= pIM->getDbProp("UI:TEMP:SCREEN_RATIO_MODE")->getOldValue32();
|
||||
sint mode= pIM->getDbProp("UI:TEMP:SCREEN_RATIO_MODE")->getValue32();
|
||||
sint oldMode= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:SCREEN_RATIO_MODE")->getOldValue32();
|
||||
sint mode= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:SCREEN_RATIO_MODE")->getValue32();
|
||||
if(mode<0 || mode>3)
|
||||
return;
|
||||
|
||||
|
@ -3417,7 +3417,7 @@ class CHandlerGameConfigChangeScreenRatioCustom : public IActionHandler
|
|||
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
|
||||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
sint mode= pIM->getDbProp("UI:TEMP:SCREEN_RATIO_MODE")->getValue32();
|
||||
sint mode= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:SCREEN_RATIO_MODE")->getValue32();
|
||||
if (mode != 2) return;
|
||||
CGroupEditBox *eb= dynamic_cast<CGroupEditBox*>(pIM->getElementFromDefine("game_config_screen_ratio_eb"));
|
||||
if(eb)
|
||||
|
@ -3457,7 +3457,7 @@ class CHandlerGameMissionAbandon : public IActionHandler
|
|||
uint8 nMissionNb;
|
||||
fromString(Params, nMissionNb);
|
||||
|
||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:TEMP:MISSION_ABANDON_BUTTON",false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:MISSION_ABANDON_BUTTON",false);
|
||||
if (pNL != NULL) pNL->setValue64(0);
|
||||
|
||||
sendMsgToServer("JOURNAL:MISSION_ABANDON", nMissionNb);
|
||||
|
@ -3474,7 +3474,7 @@ class CHandlerGameGroupMissionAbandon : public IActionHandler
|
|||
uint8 nMissionNb;
|
||||
fromString(Params, nMissionNb);
|
||||
|
||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:TEMP:MISSION_ABANDON_BUTTON",false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:MISSION_ABANDON_BUTTON",false);
|
||||
if (pNL != NULL) pNL->setValue64(0);
|
||||
|
||||
sendMsgToServer("JOURNAL:GROUP_MISSION_ABANDON", nMissionNb);
|
||||
|
@ -3679,10 +3679,10 @@ static void fillPlayerBarText(ucstring &str, const string &dbScore, SCORES::TSco
|
|||
sint val= 0;
|
||||
sint maxVal= 0;
|
||||
// Get from local database cause written from CBarManager, from a fast impulse
|
||||
node= pIM->getDbProp("UI:VARIABLES:USER:" + dbScore, false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:" + dbScore, false);
|
||||
if(node) val= node->getValue32();
|
||||
// less accurate/speed Max transferred by DB
|
||||
node= pIM->getDbProp(toString("SERVER:CHARACTER_INFO:SCORES%d:", score), false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:CHARACTER_INFO:SCORES%d:", score), false);
|
||||
if(node) maxVal= node->getValue32();
|
||||
val= max(val, 0);
|
||||
maxVal= max(maxVal, 0);
|
||||
|
@ -3777,7 +3777,7 @@ public:
|
|||
|
||||
// Get the Max value
|
||||
sint32 maxVal= 0;
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(dbMax, false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(dbMax, false);
|
||||
if(node)
|
||||
maxVal= node->getValue32();
|
||||
|
||||
|
@ -3804,9 +3804,9 @@ uint32 getMissionTitle(sint32 nSelected)
|
|||
if (nSelected < 0)
|
||||
return 0;
|
||||
else if (nSelected < nNbMission)
|
||||
return pIM->getDbProp("SERVER:MISSIONS:"+toString(nSelected)+":TITLE")->getValue32();
|
||||
return NLGUI::CDBManager::getInstance()->getDbProp("SERVER:MISSIONS:"+toString(nSelected)+":TITLE")->getValue32();
|
||||
else if (nSelected < (nNbMission+nNbGroupMission))
|
||||
return pIM->getDbProp("SERVER:GROUP:MISSIONS:"+toString(nSelected-nNbMission)+":TITLE")->getValue32();
|
||||
return NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GROUP:MISSIONS:"+toString(nSelected-nNbMission)+":TITLE")->getValue32();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -3842,7 +3842,7 @@ public:
|
|||
void execute(CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
sint32 nSelected = pIM->getDbProp("UI:SAVE:MISSION_SELECTED")->getValue32();
|
||||
sint32 nSelected = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:MISSION_SELECTED")->getValue32();
|
||||
|
||||
sint32 nNbMission, nNbGroupMission;
|
||||
fromString(pIM->getDefine("ipj_nb_mission"), nNbMission);
|
||||
|
@ -3884,7 +3884,7 @@ public:
|
|||
}
|
||||
}
|
||||
// No mission at all found so there is no mission in the journal
|
||||
pIM->getDbProp("UI:SAVE:MISSION_SELECTED")->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:MISSION_SELECTED")->setValue32(-1);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -3996,7 +3996,7 @@ public:
|
|||
uint8 nMissionNb;
|
||||
fromString(sParams, nMissionNb);
|
||||
|
||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:TEMP:MISSION_WAKE_BUTTON",false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:MISSION_WAKE_BUTTON",false);
|
||||
if (pNL != NULL) pNL->setValue64(0);
|
||||
|
||||
sendMsgToServer("MISSION:WAKE", nMissionNb);
|
||||
|
@ -4014,7 +4014,7 @@ public:
|
|||
uint8 nMissionNb;
|
||||
fromString(sParams, nMissionNb);
|
||||
|
||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:TEMP:MISSION_WAKE_BUTTON",false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:MISSION_WAKE_BUTTON",false);
|
||||
if (pNL != NULL) pNL->setValue64(0);
|
||||
|
||||
sendMsgToServer("MISSION:GROUP_WAKE", nMissionNb);
|
||||
|
|
|
@ -182,7 +182,7 @@ void CInterfaceHelp::initWindows()
|
|||
// add observers for the update of phrase help texts (depends of weight of equipped weapons)
|
||||
for (uint i = 0; i < MAX_HANDINV_ENTRIES; ++i)
|
||||
{
|
||||
CCDBNodeLeaf *pNodeLeaf = pIM->getDbProp(std::string(LOCAL_INVENTORY) + ":HAND:" + toString(i), false);
|
||||
CCDBNodeLeaf *pNodeLeaf = NLGUI::CDBManager::getInstance()->getDbProp(std::string(LOCAL_INVENTORY) + ":HAND:" + toString(i), false);
|
||||
if(pNodeLeaf)
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
|
@ -205,7 +205,7 @@ void CInterfaceHelp::release()
|
|||
// add observers for the update of phrase help texts (depends of weight of equipped weapons)
|
||||
for (uint i = 0; i < MAX_HANDINV_ENTRIES; ++i)
|
||||
{
|
||||
CCDBNodeLeaf *pNodeLeaf = pIM->getDbProp(std::string(LOCAL_INVENTORY) + ":HAND:" + toString(i), false);
|
||||
CCDBNodeLeaf *pNodeLeaf = NLGUI::CDBManager::getInstance()->getDbProp(std::string(LOCAL_INVENTORY) + ":HAND:" + toString(i), false);
|
||||
if(pNodeLeaf)
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
|
@ -1243,7 +1243,7 @@ static void setupSkillToTradeHelp(CSheetHelpSetup &setup)
|
|||
// for (uint job = 0; job < 8; ++job)
|
||||
// {
|
||||
// std::string dbPath = toString("CHARACTER_INFO:CAREER%d:JOB%d:JOB_CAP", (int) career, (int) job);
|
||||
// uint level = (uint) im->getDbProp(dbPath)->getValue32();
|
||||
// uint level = (uint) NLGUI::CDBManager::getInstance()->getDbProp(dbPath)->getValue32();
|
||||
// if (level != 0) // has the player this job ?
|
||||
// {
|
||||
// // check if level in this job is enough to get the skills
|
||||
|
@ -1437,7 +1437,7 @@ void getMagicProtection(CDBCtrlSheet *item, ucstring &itemText)
|
|||
{
|
||||
// Mul item quality by a constant
|
||||
uint maxAbsorb= item->getQuality();
|
||||
CCDBNodeLeaf *nodeFactor= pIM->getDbProp(pIM->getDefine("player_protect_absorbfactor"), false);
|
||||
CCDBNodeLeaf *nodeFactor= NLGUI::CDBManager::getInstance()->getDbProp(pIM->getDefine("player_protect_absorbfactor"), false);
|
||||
if(nodeFactor)
|
||||
maxAbsorb= maxAbsorb*nodeFactor->getValue32()/100;
|
||||
|
||||
|
@ -1510,7 +1510,7 @@ void getWeightText(CDBCtrlSheet *item, const CItemSheet*pIS, ucstring &itemText)
|
|||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
CCDBNodeLeaf *pWG = pIM->getDbProp(item->getSheet()+":WEIGHT",false);
|
||||
CCDBNodeLeaf *pWG = NLGUI::CDBManager::getInstance()->getDbProp(item->getSheet()+":WEIGHT",false);
|
||||
if(pWG)
|
||||
{
|
||||
// must mul weight by quantity
|
||||
|
@ -2338,7 +2338,7 @@ void setupItemPreview(CSheetHelpSetup &setup, CItemSheet *pIS)
|
|||
nlassert(pIS);
|
||||
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeBranch *dbBranch = pIM->getDbBranch( setup.SrcSheet->getSheet() );
|
||||
CCDBNodeBranch *dbBranch = NLGUI::CDBManager::getInstance()->getDbBranch( setup.SrcSheet->getSheet() );
|
||||
|
||||
|
||||
CInterfaceElement *elt = setup.HelpWindow->getElement(setup.HelpWindow->getId()+setup.PrefixForExtra+INFO_ITEM_PREVIEW);
|
||||
|
@ -2353,7 +2353,7 @@ void setupItemPreview(CSheetHelpSetup &setup, CItemSheet *pIS)
|
|||
}
|
||||
|
||||
static sint32 helpWidth = setup.HelpWindow->getW();
|
||||
bool scene_inactive = ! pIM->getDbProp("UI:SAVE:SHOW_3D_ITEM_PREVIEW")->getValueBool();
|
||||
bool scene_inactive = ! NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:SHOW_3D_ITEM_PREVIEW")->getValueBool();
|
||||
if (scene_inactive ||
|
||||
(pIS->Family != ITEMFAMILY::ARMOR &&
|
||||
pIS->Family != ITEMFAMILY::MELEE_WEAPON &&
|
||||
|
@ -2818,20 +2818,20 @@ void fillOutpostBuildingListItem(const std::vector<NLMISC::CSheetId> &mps, IList
|
|||
uint i;
|
||||
for(i=0;i<mps.size();i++)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("%s:%d:SHEET", branchBase.c_str(), i));
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("%s:%d:SHEET", branchBase.c_str(), i));
|
||||
if(node)
|
||||
node->setValue32(mps[i].asInt());
|
||||
node= pIM->getDbProp(toString("%s:%d:QUALITY", branchBase.c_str(), i), false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(toString("%s:%d:QUALITY", branchBase.c_str(), i), false);
|
||||
if(node)
|
||||
node->setValue32(qualityLevel);
|
||||
node= pIM->getDbProp(toString("%s:%d:PREREQUISIT_VALID", branchBase.c_str(), i), false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(toString("%s:%d:PREREQUISIT_VALID", branchBase.c_str(), i), false);
|
||||
if(node)
|
||||
node->setValue32(1);
|
||||
}
|
||||
// Reset other to 0.
|
||||
for(;;i++)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("%s:%d:SHEET", branchBase.c_str(), i), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("%s:%d:SHEET", branchBase.c_str(), i), false);
|
||||
if(node)
|
||||
node->setValue32(0);
|
||||
else
|
||||
|
@ -2918,7 +2918,7 @@ static bool getAuraDisabledState(CDBCtrlSheet *cs)
|
|||
|
||||
// Get the DISABLED DBprop
|
||||
string db= cs->getSheet() + ":DISABLED";
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(db, false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(db, false);
|
||||
return node && node->getValue32()!=0;
|
||||
}
|
||||
|
||||
|
@ -2932,7 +2932,7 @@ static sint getBonusMalusSpecialTT(CDBCtrlSheet *cs)
|
|||
|
||||
// Get the SPECIAL_TOOLTIP DBprop
|
||||
string db= cs->getSheet() + ":SPECIAL_TOOLTIP";
|
||||
return pIM->getDbValue32 (db);
|
||||
return NLGUI::CDBManager::getInstance()->getDbValue32 (db);
|
||||
}
|
||||
|
||||
|
||||
|
@ -3111,12 +3111,12 @@ void fillSabrinaPhraseListBrick(const CSPhraseCom &phrase, IListSheetBase *listB
|
|||
uint i;
|
||||
for(i=0;i<phrase.Bricks.size();i++)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("%s:%d:SHEET", branchBase.c_str(), i));
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("%s:%d:SHEET", branchBase.c_str(), i));
|
||||
if(node)
|
||||
node->setValue32(phrase.Bricks[i].asInt());
|
||||
|
||||
// For requirements bricks, update the LOCKED state
|
||||
node= pIM->getDbProp(toString("%s:%d:LOCKED", branchBase.c_str(), i));
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(toString("%s:%d:LOCKED", branchBase.c_str(), i));
|
||||
if(node)
|
||||
{
|
||||
if(pBM->isBrickKnown(phrase.Bricks[i]))
|
||||
|
@ -3129,7 +3129,7 @@ void fillSabrinaPhraseListBrick(const CSPhraseCom &phrase, IListSheetBase *listB
|
|||
// Reset other to 0.
|
||||
for(;;i++)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("%s:%d:SHEET", branchBase.c_str(), i), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("%s:%d:SHEET", branchBase.c_str(), i), false);
|
||||
if(node)
|
||||
node->setValue32(0);
|
||||
else
|
||||
|
@ -3469,73 +3469,73 @@ void setConsoModSuccessTooltip( CDBCtrlSheet *cs )
|
|||
if( CSheetId(cs->getSheetId()).toString() == "mod_melee_success.sbrick" )
|
||||
{
|
||||
ustr = CI18N::get("uittModMeleeSuccess");
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:MELEE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:MELEE", false);
|
||||
}
|
||||
else
|
||||
if( CSheetId(cs->getSheetId()).toString() == "mod_range_success.sbrick" )
|
||||
{
|
||||
ustr = CI18N::get("uittModRangeSuccess");
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:RANGE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:RANGE", false);
|
||||
}
|
||||
else
|
||||
if( CSheetId(cs->getSheetId()).toString() == "mod_craft_success.sbrick" )
|
||||
{
|
||||
ustr = CI18N::get("uittModCraftSuccess");
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:CRAFT", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:CRAFT", false);
|
||||
}
|
||||
else
|
||||
if( CSheetId(cs->getSheetId()).toString() == "mod_defense_success.sbrick" )
|
||||
{
|
||||
ustr = CI18N::get("uittModDefenseSuccess");
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:DODGE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:DODGE", false);
|
||||
}
|
||||
else
|
||||
if( CSheetId(cs->getSheetId()).toString() == "mod_dodge_success.sbrick" )
|
||||
{
|
||||
ustr = CI18N::get("uittModDodgeSuccess");
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:DODGE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:DODGE", false);
|
||||
}
|
||||
else
|
||||
if( CSheetId(cs->getSheetId()).toString() == "mod_parry_success.sbrick" )
|
||||
{
|
||||
ustr = CI18N::get("uittModParrySuccess");
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:PARRY", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:PARRY", false);
|
||||
}
|
||||
else
|
||||
if( CSheetId(cs->getSheetId()).toString() == "mod_forage_success.sbrick" )
|
||||
{
|
||||
ustr = CI18N::get("uittModForageSuccess");
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:"+toString((uint8)ECOSYSTEM::common_ecosystem)+":FORAGE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:"+toString((uint8)ECOSYSTEM::common_ecosystem)+":FORAGE", false);
|
||||
}
|
||||
else
|
||||
if( CSheetId(cs->getSheetId()).toString() == "mod_desert_forage_success.sbrick" )
|
||||
{
|
||||
ustr = CI18N::get("uittModDesertForageSuccess");
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:"+toString((uint8)ECOSYSTEM::desert)+":FORAGE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:"+toString((uint8)ECOSYSTEM::desert)+":FORAGE", false);
|
||||
}
|
||||
else
|
||||
if( CSheetId(cs->getSheetId()).toString() == "mod_forest_forage_success.sbrick" )
|
||||
{
|
||||
ustr = CI18N::get("uittModForestForageSuccess");
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:"+toString((uint8)ECOSYSTEM::forest)+":FORAGE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:"+toString((uint8)ECOSYSTEM::forest)+":FORAGE", false);
|
||||
}
|
||||
else
|
||||
if( CSheetId(cs->getSheetId()).toString() == "mod_lacustre_forage_success.sbrick" )
|
||||
{
|
||||
ustr = CI18N::get("uittModLacustreForageSuccess");
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:"+toString((uint8)ECOSYSTEM::lacustre)+":FORAGE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:"+toString((uint8)ECOSYSTEM::lacustre)+":FORAGE", false);
|
||||
}
|
||||
else
|
||||
if( CSheetId(cs->getSheetId()).toString() == "mod_jungle_forage_success.sbrick" )
|
||||
{
|
||||
ustr = CI18N::get("uittModJungleForageSuccess");
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:"+toString((uint8)ECOSYSTEM::jungle)+":FORAGE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:"+toString((uint8)ECOSYSTEM::jungle)+":FORAGE", false);
|
||||
}
|
||||
else
|
||||
if( CSheetId(cs->getSheetId()).toString() == "mod_primary_root_forage_success.sbrick" )
|
||||
{
|
||||
ustr = CI18N::get("uittModPrimaryRootForageSuccess");
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:"+toString((uint8)ECOSYSTEM::primary_root)+":FORAGE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:"+toString((uint8)ECOSYSTEM::primary_root)+":FORAGE", false);
|
||||
}
|
||||
|
||||
if( nodeSM )
|
||||
|
@ -3577,7 +3577,7 @@ public:
|
|||
pIM->setContextHelpText(CI18N::get("uittPvpOutpostInRound"));
|
||||
else if(specialTTId==BONUS_MALUS::DeathPenalty)
|
||||
{
|
||||
CCDBNodeLeaf * node = pIM->getDbProp("SERVER:USER:DEATH_XP_MALUS", false);
|
||||
CCDBNodeLeaf * node = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:DEATH_XP_MALUS", false);
|
||||
if( node )
|
||||
{
|
||||
ucstring txt = CI18N::get("uittDeathPenalty");
|
||||
|
@ -3619,7 +3619,7 @@ public:
|
|||
}
|
||||
|
||||
ucstring txt;
|
||||
CCDBNodeLeaf *node = pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:NAME", index));
|
||||
CCDBNodeLeaf *node = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:NAME", index));
|
||||
if (node && CStringManagerClient::instance()->getDynString(node->getValue32(), txt))
|
||||
{
|
||||
pIM->setContextHelpText(CEntityCL::removeTitleFromName(txt));
|
||||
|
@ -3636,13 +3636,13 @@ public:
|
|||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
// Find the mount's db leaf
|
||||
CCDBNodeBranch *animalsNode = safe_cast<CCDBNodeBranch*>(pIM->getDB()->getNode( ICDBNode::CTextId( "SERVER:PACK_ANIMAL" ), false ));
|
||||
CCDBNodeBranch *animalsNode = safe_cast<CCDBNodeBranch*>(NLGUI::CDBManager::getInstance()->getDB()->getNode( ICDBNode::CTextId( "SERVER:PACK_ANIMAL" ), false ));
|
||||
BOMB_IF( ! animalsNode, "! animalsNode", return; );
|
||||
sint32 minTimeRemaining = -1;
|
||||
uint nbAnimals = (uint)animalsNode->getNbNodes();
|
||||
for ( uint i=0; i!=nbAnimals; ++i )
|
||||
{
|
||||
CCDBNodeLeaf *statusNode = pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d", i) + ":STATUS", false);
|
||||
CCDBNodeLeaf *statusNode = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d", i) + ":STATUS", false);
|
||||
if (statusNode && ANIMAL_STATUS::isDead((ANIMAL_STATUS::EAnimalStatus)statusNode->getValue32()) )
|
||||
{
|
||||
ICDBNode *beastNode = animalsNode->getNode( i );
|
||||
|
@ -3884,7 +3884,7 @@ public:
|
|||
string prefix= getParam(Params, "prefix");
|
||||
|
||||
CInterfaceGroup *wnd= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(wndStr));
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(dbitem);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(dbitem);
|
||||
|
||||
// common method for info and botchat
|
||||
if(wnd && node)
|
||||
|
@ -3959,7 +3959,7 @@ public:
|
|||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
CCDBNodeLeaf *pVal = pIM->getDbProp("UI:SAVE:MK_MODE", false);
|
||||
CCDBNodeLeaf *pVal = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:MK_MODE", false);
|
||||
if(pVal)
|
||||
{
|
||||
sint32 mode = pVal->getValue32() + 1;
|
||||
|
|
|
@ -458,7 +458,7 @@ static void sendSwapItemMsg(const CDBCtrlSheet *pCSSrc, const CDBCtrlSheet *pCSD
|
|||
if ((srcInvId == (uint16)INVENTORIES::guild) || (dstInvId == (uint16)INVENTORIES::guild))
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
nGuildSessionCounter = pIM->getDbProp("SERVER:GUILD:INVENTORY:SESSION")->getValue16();
|
||||
nGuildSessionCounter = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:INVENTORY:SESSION")->getValue16();
|
||||
}
|
||||
out.serial(nGuildSessionCounter); // always serial to use the fixed-sized msg.xml scheme
|
||||
|
||||
|
@ -496,7 +496,7 @@ static void displayQuantityPopup(CCtrlBase *pCaller, CDBCtrlSheet *pCSSrc, CDBCt
|
|||
pCSSrc->copyAspect(&destSheet);
|
||||
|
||||
// init the editbox ctrl. init cur default to max
|
||||
pIM->getDbProp("UI:VARIABLES:STACK_SELECTED:CUR_QUANTITY")->setValue32(availableStack);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:STACK_SELECTED:CUR_QUANTITY")->setValue32(availableStack);
|
||||
editBox->setInputStringAsInt(availableStack);
|
||||
|
||||
// enable the modal
|
||||
|
@ -592,7 +592,7 @@ static void openStackItem(CCtrlBase *pCaller, CDBCtrlSheet *pCSSrc, CDBCtrlSheet
|
|||
PlayerTrade.putItemInExchange(src, dest, quantitySrc);
|
||||
|
||||
// user changed the proposal => reset the local ACCEPTED db
|
||||
pIM->getDbProp("LOCAL:EXCHANGE:ACCEPTED")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:EXCHANGE:ACCEPTED")->setValue32(0);
|
||||
|
||||
// send msg to server
|
||||
sendExchangeAddToServer((uint16)src->getIndexInDB(), (uint8)dest->getIndexInDB(), (uint16)quantitySrc);
|
||||
|
@ -612,7 +612,7 @@ static void openStackItem(CCtrlBase *pCaller, CDBCtrlSheet *pCSSrc, CDBCtrlSheet
|
|||
PlayerTrade.restoreItem(exchangeSlot);
|
||||
|
||||
// user changed the proposal => reset the local ACCEPTED db
|
||||
pIM->getDbProp("LOCAL:EXCHANGE:ACCEPTED")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:EXCHANGE:ACCEPTED")->setValue32(0);
|
||||
|
||||
// send msg to server
|
||||
CBitMemStream out;
|
||||
|
@ -702,7 +702,7 @@ static void validateStackItem(CDBCtrlSheet *pCSSrc, CDBCtrlSheet *pCSDst, sint32
|
|||
PlayerTrade.putItemInExchange(pCSSrc, pCSDst, val);
|
||||
|
||||
// user changed the proposal => reset the local ACCEPTED db
|
||||
pIM->getDbProp("LOCAL:EXCHANGE:ACCEPTED")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:EXCHANGE:ACCEPTED")->setValue32(0);
|
||||
|
||||
// send msg to server
|
||||
sendExchangeAddToServer((uint16)pCSSrc->getIndexInDB(), (uint8)pCSDst->getIndexInDB(), (uint16)val);
|
||||
|
@ -808,7 +808,7 @@ public:
|
|||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
// get the value to drop
|
||||
sint32 val= pIM->getDbProp("UI:VARIABLES:STACK_SELECTED:CUR_QUANTITY")->getValue32();
|
||||
sint32 val= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:STACK_SELECTED:CUR_QUANTITY")->getValue32();
|
||||
CDBCtrlSheet *pCSSrc = CurrentStackSrc;
|
||||
CDBCtrlSheet *pCSDst = CurrentStackDst;
|
||||
CurrentStackSrc= NULL;
|
||||
|
@ -1120,7 +1120,7 @@ public:
|
|||
{
|
||||
PlayerTrade.restoreAllItems();
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
im->getDbProp("LOCAL:EXCHANGE:BEGUN")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:EXCHANGE:BEGUN")->setValue32(0);
|
||||
|
||||
if (!ClientCfg.Local)
|
||||
{
|
||||
|
@ -1157,7 +1157,7 @@ public:
|
|||
}
|
||||
// user changed the proposal => reset the local ACCEPTED db
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
pIM->getDbProp("LOCAL:EXCHANGE:ACCEPTED")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:EXCHANGE:ACCEPTED")->setValue32(0);
|
||||
|
||||
// Send the msg
|
||||
CBitMemStream out;
|
||||
|
@ -1317,10 +1317,10 @@ class CHandlerActiveSheath : public IActionHandler
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
// Get the user interface value.
|
||||
uint8 activeSheath = (uint8)pIM->getDbProp( pIM->getDefine("ui_set_active") )->getValue32();
|
||||
uint8 activeSheath = (uint8)NLGUI::CDBManager::getInstance()->getDbProp( pIM->getDefine("ui_set_active") )->getValue32();
|
||||
|
||||
// Write to the Local Database.
|
||||
pIM->getDbProp( "LOCAL:INVENTORY:ACTIVE_SHEATH" )->setValue32(activeSheath);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( "LOCAL:INVENTORY:ACTIVE_SHEATH" )->setValue32(activeSheath);
|
||||
|
||||
// Send to server
|
||||
if(!ClientCfg.Local)
|
||||
|
@ -1355,10 +1355,10 @@ class CHandlerReceiveActiveSheath : public IActionHandler
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
// Get the user interface value.
|
||||
uint8 activeSheath = (uint8)pIM->getDbProp( "LOCAL:INVENTORY:ACTIVE_SHEATH" )->getValue32();
|
||||
uint8 activeSheath = (uint8)NLGUI::CDBManager::getInstance()->getDbProp( "LOCAL:INVENTORY:ACTIVE_SHEATH" )->getValue32();
|
||||
|
||||
// Write to the Local Database.
|
||||
pIM->getDbProp( pIM->getDefine("ui_set_active") )->setValue32(activeSheath);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( pIM->getDefine("ui_set_active") )->setValue32(activeSheath);
|
||||
}
|
||||
};
|
||||
REGISTER_ACTION_HANDLER( CHandlerReceiveActiveSheath, "receive_active_sheath" );
|
||||
|
@ -1933,7 +1933,7 @@ class CHandlerItemMenuCheck : public IActionHandler
|
|||
if(valid)
|
||||
{
|
||||
pEquip->setGrayed(
|
||||
pIM->getDbProp("UI:VARIABLES:ISACTIVE:PHRASE_FABER")->getValueBool() &&
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:ISACTIVE:PHRASE_FABER")->getValueBool() &&
|
||||
pIS->Family!=ITEMFAMILY::ARMOR &&
|
||||
pIS->Family!=ITEMFAMILY::JEWELRY
|
||||
);
|
||||
|
@ -1943,8 +1943,8 @@ class CHandlerItemMenuCheck : public IActionHandler
|
|||
//Item Text Edition
|
||||
if (pItemTextEdition != NULL && pItemTextDisplay != NULL)
|
||||
{
|
||||
pItemTextEdition->setGrayed(pIM->getDbProp("UI:VARIABLES:ISACTIVE:PHRASE_EDIT_CUSTOM")->getValueBool());
|
||||
pItemTextDisplay->setGrayed(pIM->getDbProp("UI:VARIABLES:ISACTIVE:PHRASE_EDIT_CUSTOM")->getValueBool());
|
||||
pItemTextEdition->setGrayed(NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:ISACTIVE:PHRASE_EDIT_CUSTOM")->getValueBool());
|
||||
pItemTextDisplay->setGrayed(NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:ISACTIVE:PHRASE_EDIT_CUSTOM")->getValueBool());
|
||||
}
|
||||
|
||||
if (pCS->getGrayed())
|
||||
|
|
|
@ -430,7 +430,7 @@ class CAHToggleDodgeParry : public IActionHandler
|
|||
ucstring msg;
|
||||
// 0 - dodge mode
|
||||
// 1 - parry mode
|
||||
if (pIM->getDbProp("SERVER:DEFENSE:DEFENSE_MODE")->getValue32() == 0)
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp("SERVER:DEFENSE:DEFENSE_MODE")->getValue32() == 0)
|
||||
{
|
||||
sendMsgToServer("COMBAT:PARRY");
|
||||
msg = CI18N::get("msgUserModeParry");
|
||||
|
|
|
@ -44,7 +44,7 @@ using namespace NLMISC;
|
|||
uint8 getOutpostSelection()
|
||||
{
|
||||
uint8 nOutpost = 0;
|
||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:SELECTION",false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:SELECTION",false);
|
||||
if (pNL != NULL)
|
||||
nOutpost = (uint8)pNL->getValue32();
|
||||
return nOutpost;
|
||||
|
@ -54,7 +54,7 @@ uint32 getOutpostSheet()
|
|||
{
|
||||
uint32 sheet= 0;
|
||||
uint8 outpostSel= getOutpostSelection();
|
||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp(toString("SERVER:GUILD:OUTPOST:O%d:SHEET", outpostSel),false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:GUILD:OUTPOST:O%d:SHEET", outpostSel),false);
|
||||
if (pNL != NULL)
|
||||
sheet = pNL->getValue32();
|
||||
return sheet;
|
||||
|
@ -70,7 +70,7 @@ public:
|
|||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
// set confirm dialog flag
|
||||
pIM->getDbProp("UI:TEMP:OUTPOST:CONFIRM_DEL_OUTPOST")->setValueBool(true);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:CONFIRM_DEL_OUTPOST")->setValueBool(true);
|
||||
|
||||
// Ask if ok before.
|
||||
pIM->validMessageBox(CInterfaceManager::QuestionIconMsg, CI18N::get("uiQConfirmGiveupOutpost"),
|
||||
|
@ -88,7 +88,7 @@ public:
|
|||
uint32 sheet= 0;
|
||||
uint8 outpostSel;
|
||||
fromString(sParams, outpostSel);
|
||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp(toString("SERVER:GUILD:OUTPOST:O%d:SHEET", outpostSel),false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:GUILD:OUTPOST:O%d:SHEET", outpostSel),false);
|
||||
if (pNL == NULL)
|
||||
return;
|
||||
sheet = pNL->getValue32();
|
||||
|
@ -98,7 +98,7 @@ public:
|
|||
|
||||
// reset confirm dialog flag
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
pIM->getDbProp("UI:TEMP:OUTPOST:CONFIRM_DEL_OUTPOST")->setValueBool(false);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:CONFIRM_DEL_OUTPOST")->setValueBool(false);
|
||||
}
|
||||
};
|
||||
REGISTER_ACTION_HANDLER(COutpostDoGiveup, "outpost_do_giveup");
|
||||
|
@ -110,7 +110,7 @@ public:
|
|||
{
|
||||
// reset confirm dialog flag
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
pIM->getDbProp("UI:TEMP:OUTPOST:CONFIRM_DEL_OUTPOST")->setValueBool(false);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:CONFIRM_DEL_OUTPOST")->setValueBool(false);
|
||||
}
|
||||
};
|
||||
REGISTER_ACTION_HANDLER(COutpostCancelGiveup, "outpost_cancel_giveup");
|
||||
|
@ -125,7 +125,7 @@ public:
|
|||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
// get Squad slot Destination selected
|
||||
uint8 nSquadSlot = pIM->getDbProp("UI:TEMP:OUTPOST:SQUAD_SLOT_SELECTED")->getValue8();
|
||||
uint8 nSquadSlot = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:SQUAD_SLOT_SELECTED")->getValue8();
|
||||
|
||||
// get Squad Id to buy selected
|
||||
string sLine = getParam(sParams, "line");
|
||||
|
@ -156,7 +156,7 @@ public:
|
|||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
// get Squad slot Destination selected
|
||||
uint8 nSquadSlot = pIM->getDbProp("UI:TEMP:OUTPOST:SQUAD_SLOT_SELECTED")->getValue8();
|
||||
uint8 nSquadSlot = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:SQUAD_SLOT_SELECTED")->getValue8();
|
||||
|
||||
// send msg
|
||||
sendMsgToServer("OUTPOST:REMOVE_SQUAD", getOutpostSheet(), nSquadSlot);
|
||||
|
@ -174,7 +174,7 @@ public:
|
|||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
// get Squad slot Destination selected
|
||||
uint8 nSquadSlot = pIM->getDbProp("UI:TEMP:OUTPOST:SQUAD_SLOT_SELECTED")->getValue8();
|
||||
uint8 nSquadSlot = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:SQUAD_SLOT_SELECTED")->getValue8();
|
||||
|
||||
// send msg
|
||||
sendMsgToServer("OUTPOST:INSERT_SQUAD", getOutpostSheet(), nSquadSlot);
|
||||
|
@ -192,12 +192,12 @@ uint8 getOutpostSquadSpawnIndex()
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
// get Squad slot
|
||||
uint8 nSquadSlot = pIM->getDbProp("UI:TEMP:OUTPOST:SQUAD_SLOT_SELECTED")->getValue8();
|
||||
uint8 nSquadSlot = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:SQUAD_SLOT_SELECTED")->getValue8();
|
||||
|
||||
// So we can get the spawn index stored in the DB
|
||||
string sDBPath = "SERVER:GUILD:OUTPOST:O" + toString(getOutpostSelection()) + ":SQUADS:T";
|
||||
sDBPath += toString(nSquadSlot) + ":SPAWN";
|
||||
return pIM->getDbProp(sDBPath)->getValue8();
|
||||
return NLGUI::CDBManager::getInstance()->getDbProp(sDBPath)->getValue8();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -222,8 +222,8 @@ public:
|
|||
uint32 i;
|
||||
for (i = 0; i < OUTPOSTENUMS::OUTPOST_MAX_SPAWN_ZONE; ++i)
|
||||
{
|
||||
sint32 x = pIM->getDbProp(sDBPathSZ + toString(i) + ":X")->getValue32();
|
||||
sint32 y = pIM->getDbProp(sDBPathSZ + toString(i) + ":Y")->getValue32();
|
||||
sint32 x = NLGUI::CDBManager::getInstance()->getDbProp(sDBPathSZ + toString(i) + ":X")->getValue32();
|
||||
sint32 y = NLGUI::CDBManager::getInstance()->getDbProp(sDBPathSZ + toString(i) + ":Y")->getValue32();
|
||||
if ((x != 0) || (y != 0))
|
||||
{
|
||||
if (!bInit)
|
||||
|
@ -289,8 +289,8 @@ public:
|
|||
m.NeedToReset = true;
|
||||
for (i = 0; i < OUTPOSTENUMS::OUTPOST_MAX_SPAWN_ZONE; ++i)
|
||||
{
|
||||
sint32 x = pIM->getDbProp(sDBPathSZ + toString(i) + ":X")->getValue32();
|
||||
sint32 y = pIM->getDbProp(sDBPathSZ + toString(i) + ":Y")->getValue32();
|
||||
sint32 x = NLGUI::CDBManager::getInstance()->getDbProp(sDBPathSZ + toString(i) + ":X")->getValue32();
|
||||
sint32 y = NLGUI::CDBManager::getInstance()->getDbProp(sDBPathSZ + toString(i) + ":Y")->getValue32();
|
||||
if ((x != 0) || (y != 0))
|
||||
{
|
||||
CRespawnPointsMsg::SRespawnPoint pt;
|
||||
|
@ -326,7 +326,7 @@ public:
|
|||
if (nSpawnIndex != nSpawnSelected)
|
||||
{
|
||||
// get Squad slot
|
||||
uint8 nSquadSlot = pIM->getDbProp("UI:TEMP:OUTPOST:SQUAD_SLOT_SELECTED")->getValue8();
|
||||
uint8 nSquadSlot = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:SQUAD_SLOT_SELECTED")->getValue8();
|
||||
|
||||
sendMsgToServer("OUTPOST:SET_SQUAD_SPAWN", getOutpostSheet(), nSquadSlot, nSpawnSelected);
|
||||
}
|
||||
|
@ -354,7 +354,7 @@ static sint localToGmt(sint hour)
|
|||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
CCDBNodeLeaf *node= pIM->getDbProp("UI:SAVE:OUTPOST:TIME_ZONE", false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:OUTPOST:TIME_ZONE", false);
|
||||
if(node)
|
||||
hour-= node->getValue32();
|
||||
hour+= 48;
|
||||
|
@ -366,7 +366,7 @@ static sint gmtToLocal(sint hour)
|
|||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
CCDBNodeLeaf *node= pIM->getDbProp("UI:SAVE:OUTPOST:TIME_ZONE", false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:OUTPOST:TIME_ZONE", false);
|
||||
if(node)
|
||||
hour+= node->getValue32();
|
||||
hour+= 48;
|
||||
|
@ -405,7 +405,7 @@ public:
|
|||
fromString(sParams, attPeriod);
|
||||
|
||||
// Store in local DB (in LOCAL for consistency)
|
||||
CCDBNodeLeaf *node= pIM->getDbProp("UI:TEMP:OUTPOST:DECLARE_WAR_ATTACK_PERIOD", false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:DECLARE_WAR_ATTACK_PERIOD", false);
|
||||
if(node)
|
||||
node->setValue32(localToGmt(attPeriod));
|
||||
|
||||
|
@ -425,13 +425,13 @@ public:
|
|||
|
||||
// read current outpost sheet
|
||||
uint32 outpostSheet= 0;
|
||||
CCDBNodeLeaf *node= pIM->getDbProp("SERVER:OUTPOST_SELECTED:SHEET", false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:OUTPOST_SELECTED:SHEET", false);
|
||||
if(node)
|
||||
outpostSheet= node->getValue32();
|
||||
|
||||
// read wanted GMT attack period
|
||||
uint8 wantedAttHour= 0;
|
||||
node= pIM->getDbProp("UI:TEMP:OUTPOST:DECLARE_WAR_ATTACK_PERIOD", false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:DECLARE_WAR_ATTACK_PERIOD", false);
|
||||
if(node)
|
||||
wantedAttHour= (uint8)node->getValue32();
|
||||
|
||||
|
@ -451,19 +451,19 @@ public:
|
|||
|
||||
// read current outpost sheet
|
||||
uint32 outpostSheet= 0;
|
||||
CCDBNodeLeaf *node= pIM->getDbProp("SERVER:OUTPOST_SELECTED:SHEET", false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:OUTPOST_SELECTED:SHEET", false);
|
||||
if(node)
|
||||
outpostSheet= node->getValue32();
|
||||
|
||||
// read wanted GMT attack period
|
||||
uint8 wantedAttHour= 0;
|
||||
node= pIM->getDbProp("UI:TEMP:OUTPOST:DECLARE_WAR_ATTACK_PERIOD", false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:DECLARE_WAR_ATTACK_PERIOD", false);
|
||||
if(node)
|
||||
wantedAttHour= (uint8)node->getValue32();
|
||||
|
||||
// read result Att Period Time (NB: for final server check: ensure that the user will get what it sees)
|
||||
uint32 startAttackTime= 0;
|
||||
node= pIM->getDbProp("UI:TEMP:OUTPOST:DECLARE_WAR_ACK_TIME_RANGE_ATT", false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:DECLARE_WAR_ACK_TIME_RANGE_ATT", false);
|
||||
if(node)
|
||||
startAttackTime= node->getValue32();
|
||||
|
||||
|
@ -497,9 +497,9 @@ public:
|
|||
|
||||
// Copy SERVER DB to Local selection
|
||||
uint32 outpostSheet= 0;
|
||||
CCDBNodeLeaf *node= pIM->getDbProp("LOCAL:TARGET:CONTEXT_MENU:OUTPOST");
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:TARGET:CONTEXT_MENU:OUTPOST");
|
||||
if(node) outpostSheet= node->getValue32();
|
||||
node= pIM->getDbProp("UI:TEMP:OUTPOST:BOT_SELECTION");
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:BOT_SELECTION");
|
||||
if(node) node->setValue32(outpostSheet);
|
||||
|
||||
// Send a msg to server
|
||||
|
@ -633,7 +633,7 @@ public:
|
|||
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
||||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *dbBan = pIM->getDbProp("SERVER:CHARACTER_INFO:PVP_OUTPOST:RIGHT_TO_BANISH", false);
|
||||
CCDBNodeLeaf *dbBan = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:PVP_OUTPOST:RIGHT_TO_BANISH", false);
|
||||
|
||||
// Re-Test if can ban the selection
|
||||
bool okForBanPlayer= false;
|
||||
|
@ -656,7 +656,7 @@ public:
|
|||
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
||||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *dbBan = pIM->getDbProp("SERVER:CHARACTER_INFO:PVP_OUTPOST:RIGHT_TO_BANISH", false);
|
||||
CCDBNodeLeaf *dbBan = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:PVP_OUTPOST:RIGHT_TO_BANISH", false);
|
||||
|
||||
// Re-Test if can ban the selection
|
||||
bool okForBanPlayer= false;
|
||||
|
@ -679,7 +679,7 @@ public:
|
|||
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
||||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *dbTZ = pIM->getDbProp("UI:SAVE:OUTPOST:TIME_ZONE", false);
|
||||
CCDBNodeLeaf *dbTZ = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:OUTPOST:TIME_ZONE", false);
|
||||
if(!dbTZ)
|
||||
return;
|
||||
|
||||
|
|
|
@ -68,8 +68,8 @@ const std::string PhraseMemoryAltCtrlBase= "ui:interface:gestionsets2:header_cl
|
|||
void debugUpdateActionBar()
|
||||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
pIM->getDbProp("SERVER:USER:ACT_TSTART")->setValue64(NetMngr.getCurrentServerTick());
|
||||
pIM->getDbProp("SERVER:USER:ACT_TEND")->setValue64(NetMngr.getCurrentServerTick()+30);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:ACT_TSTART")->setValue64(NetMngr.getCurrentServerTick());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:ACT_TEND")->setValue64(NetMngr.getCurrentServerTick()+30);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1363,7 +1363,7 @@ public:
|
|||
fromString(Params, index);
|
||||
// Get the link counter. Used to verify that the client cancel the correct link according to server
|
||||
uint8 counter= 0;
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("SERVER:EXECUTE_PHRASE:LINK:%d:COUNTER", index), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:EXECUTE_PHRASE:LINK:%d:COUNTER", index), false);
|
||||
if(node)
|
||||
counter= node->getValue8();
|
||||
|
||||
|
@ -1585,7 +1585,7 @@ public:
|
|||
virtual void execute(CCtrlBase * /* pCaller */, const string &Params)
|
||||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *node= pIM->getDbProp("UI:PHRASE:SELECT_MEMORY", false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("UI:PHRASE:SELECT_MEMORY", false);
|
||||
if(node)
|
||||
{
|
||||
sint32 val;
|
||||
|
@ -1720,10 +1720,10 @@ void phraseBotChatBuyBySheet(NLMISC::CSheetId sheetId, uint16 phraseId)
|
|||
pPM->receiveBotChatConfirmBuy(phraseId, true);
|
||||
// synchronize
|
||||
uint counter= pIM->getLocalSyncActionCounter();
|
||||
pIM->getDbProp("SERVER:INVENTORY:COUNTER")->setValue32(counter);
|
||||
pIM->getDbProp("SERVER:EXCHANGE:COUNTER")->setValue32(counter);
|
||||
pIM->getDbProp("SERVER:TARGET:CONTEXT_MENU:COUNTER")->setValue32(counter);
|
||||
pIM->getDbProp("SERVER:USER:COUNTER")->setValue32(counter);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:INVENTORY:COUNTER")->setValue32(counter);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:EXCHANGE:COUNTER")->setValue32(counter);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:TARGET:CONTEXT_MENU:COUNTER")->setValue32(counter);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:COUNTER")->setValue32(counter);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ static bool isContainerAuthorized(CGroupContainer *pGC)
|
|||
// no guild or not in guild hall.
|
||||
if (shortId == "inv_guild")
|
||||
{
|
||||
if (pIM->getDbProp("SERVER:GUILD:NAME") == 0
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:NAME") == 0
|
||||
|| !getInventory().isInventoryPresent(INVENTORIES::guild))
|
||||
{
|
||||
return false; // can't open it right now
|
||||
|
@ -447,9 +447,9 @@ class CAHNextSheath : public IActionHandler
|
|||
virtual void execute (CCtrlBase *pCaller, const string &Params)
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *pNLCurSetWrite = pIM->getDbProp(pIM->getDefine("ui_set_active"));
|
||||
CCDBNodeLeaf *pNLCurSetRead = pIM->getDbProp(pIM->getDefine("set_active"));
|
||||
CCDBNodeLeaf *pNLNbSet = pIM->getDbProp(pIM->getDefine("set_nb"));
|
||||
CCDBNodeLeaf *pNLCurSetWrite = NLGUI::CDBManager::getInstance()->getDbProp(pIM->getDefine("ui_set_active"));
|
||||
CCDBNodeLeaf *pNLCurSetRead = NLGUI::CDBManager::getInstance()->getDbProp(pIM->getDefine("set_active"));
|
||||
CCDBNodeLeaf *pNLNbSet = NLGUI::CDBManager::getInstance()->getDbProp(pIM->getDefine("set_nb"));
|
||||
sint64 nVal = pNLCurSetRead->getValue64() - INVENTORIES::sheath1;
|
||||
sint64 nMax = pNLNbSet->getValue64();
|
||||
nVal++;
|
||||
|
@ -471,9 +471,9 @@ class CAHPreviousSheath : public IActionHandler
|
|||
virtual void execute (CCtrlBase *pCaller, const string &Params)
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *pNLCurSetWrite = pIM->getDbProp(pIM->getDefine("ui_set_active"));
|
||||
CCDBNodeLeaf *pNLCurSetRead = pIM->getDbProp(pIM->getDefine("set_active"));
|
||||
CCDBNodeLeaf *pNLNbSet = pIM->getDbProp(pIM->getDefine("set_nb"));
|
||||
CCDBNodeLeaf *pNLCurSetWrite = NLGUI::CDBManager::getInstance()->getDbProp(pIM->getDefine("ui_set_active"));
|
||||
CCDBNodeLeaf *pNLCurSetRead = NLGUI::CDBManager::getInstance()->getDbProp(pIM->getDefine("set_active"));
|
||||
CCDBNodeLeaf *pNLNbSet = NLGUI::CDBManager::getInstance()->getDbProp(pIM->getDefine("set_nb"));
|
||||
sint64 nVal = pNLCurSetRead->getValue64() - INVENTORIES::sheath1;
|
||||
sint64 nMax = pNLNbSet->getValue64();
|
||||
if (nVal == 0) nVal = nMax;
|
||||
|
@ -495,8 +495,8 @@ class CAHSetSheath : public IActionHandler
|
|||
virtual void execute (CCtrlBase *pCaller, const string &Params)
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *pNLCurSetWrite = pIM->getDbProp(pIM->getDefine("ui_set_active"));
|
||||
CCDBNodeLeaf *pNLNbSet = pIM->getDbProp(pIM->getDefine("set_nb"));
|
||||
CCDBNodeLeaf *pNLCurSetWrite = NLGUI::CDBManager::getInstance()->getDbProp(pIM->getDefine("ui_set_active"));
|
||||
CCDBNodeLeaf *pNLNbSet = NLGUI::CDBManager::getInstance()->getDbProp(pIM->getDefine("set_nb"));
|
||||
sint64 nVal;
|
||||
fromString(Params, nVal);
|
||||
nVal -= INVENTORIES::sheath1;
|
||||
|
@ -671,7 +671,7 @@ class CAHUIDockUndocChat : public IActionHandler
|
|||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
// change the DB (if exist)
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("UI:SAVE:ISDETACHED:")+Params, false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("UI:SAVE:ISDETACHED:")+Params, false);
|
||||
if(node)
|
||||
{
|
||||
// swap
|
||||
|
|
|
@ -82,11 +82,11 @@ void CActionPhraseFaber::fillDBWithMP(const std::string &sheetBase, const CIte
|
|||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
pIM->getDbProp(sheetBase + ":SHEET")->setValue32(item.Sheet.asInt());
|
||||
pIM->getDbProp(sheetBase + ":QUALITY")->setValue32(item.Quality);
|
||||
pIM->getDbProp(sheetBase + ":QUANTITY")->setValue32(item.Quantity);
|
||||
pIM->getDbProp(sheetBase + ":USER_COLOR")->setValue32(item.UserColor);
|
||||
pIM->getDbProp(sheetBase + ":WEIGHT")->setValue32(item.Weight);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(sheetBase + ":SHEET")->setValue32(item.Sheet.asInt());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(sheetBase + ":QUALITY")->setValue32(item.Quality);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(sheetBase + ":QUANTITY")->setValue32(item.Quantity);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(sheetBase + ":USER_COLOR")->setValue32(item.UserColor);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(sheetBase + ":WEIGHT")->setValue32(item.Weight);
|
||||
}
|
||||
|
||||
|
||||
|
@ -144,7 +144,7 @@ void CActionPhraseFaber::launchFaberCastWindow(sint32 memoryLine, uint memoryIn
|
|||
// Reset All Mps slots.
|
||||
for(uint mpSlot=0;mpSlot<MAX_MP_SLOT;mpSlot++)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("%s:%d:%d:SHEET", MPFaberDB.c_str(), itemReqLine, mpSlot), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("%s:%d:%d:SHEET", MPFaberDB.c_str(), itemReqLine, mpSlot), false);
|
||||
if(node)
|
||||
node->setValue32(0);
|
||||
}
|
||||
|
@ -156,12 +156,12 @@ void CActionPhraseFaber::launchFaberCastWindow(sint32 memoryLine, uint memoryIn
|
|||
}
|
||||
|
||||
// Reset the selected plan
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(FaberPlanDB, false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(FaberPlanDB, false);
|
||||
if(node)
|
||||
node->setValue32(0);
|
||||
|
||||
// Reset the result item
|
||||
node= pIM->getDbProp(ItemResultSheetDB, false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(ItemResultSheetDB, false);
|
||||
if(node)
|
||||
node->setValue32(0);
|
||||
|
||||
|
@ -185,23 +185,23 @@ void CActionPhraseFaber::launchFaberCastWindow(sint32 memoryLine, uint memoryIn
|
|||
// **** setup DB observer!
|
||||
// ensure remove (if setuped before), then add
|
||||
CCDBNodeBranch *branch;
|
||||
branch= pIM->getDbBranch("LOCAL:INVENTORY:BAG");
|
||||
if(branch) pIM->removeBranchObserver( "LOCAL:INVENTORY:BAG",&_DBInventoryObs);
|
||||
if(branch) pIM->addBranchObserver( "LOCAL:INVENTORY:BAG",&_DBInventoryObs);
|
||||
branch= NLGUI::CDBManager::getInstance()->getDbBranch("LOCAL:INVENTORY:BAG");
|
||||
if(branch) NLGUI::CDBManager::getInstance()->removeBranchObserver( "LOCAL:INVENTORY:BAG",&_DBInventoryObs);
|
||||
if(branch) NLGUI::CDBManager::getInstance()->addBranchObserver( "LOCAL:INVENTORY:BAG",&_DBInventoryObs);
|
||||
|
||||
// and for all pack animals
|
||||
uint i;
|
||||
for(i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
||||
{
|
||||
branch= pIM->getDbBranch(toString("LOCAL:INVENTORY:PACK_ANIMAL%d", i));
|
||||
if(branch) pIM->removeBranchObserver( toString("LOCAL:INVENTORY:PACK_ANIMAL%d", i).c_str(), &_DBInventoryObs);
|
||||
if(branch) pIM->addBranchObserver( toString("LOCAL:INVENTORY:PACK_ANIMAL%d", i).c_str(), &_DBInventoryObs);
|
||||
branch= NLGUI::CDBManager::getInstance()->getDbBranch(toString("LOCAL:INVENTORY:PACK_ANIMAL%d", i));
|
||||
if(branch) NLGUI::CDBManager::getInstance()->removeBranchObserver( toString("LOCAL:INVENTORY:PACK_ANIMAL%d", i).c_str(), &_DBInventoryObs);
|
||||
if(branch) NLGUI::CDBManager::getInstance()->addBranchObserver( toString("LOCAL:INVENTORY:PACK_ANIMAL%d", i).c_str(), &_DBInventoryObs);
|
||||
}
|
||||
|
||||
// Add observers on animal status, cause inventory may become unavailabe during the process
|
||||
for(i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
||||
{
|
||||
node= pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:STATUS",i), false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:STATUS",i), false);
|
||||
if(node)
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
|
@ -223,19 +223,19 @@ void CActionPhraseFaber::onCloseFaberCastWindow()
|
|||
|
||||
// No more need to listen inventory change
|
||||
CCDBNodeBranch *branch;
|
||||
branch= pIM->getDbBranch("LOCAL:INVENTORY:BAG");
|
||||
branch= NLGUI::CDBManager::getInstance()->getDbBranch("LOCAL:INVENTORY:BAG");
|
||||
if(branch) branch->removeBranchObserver(&_DBInventoryObs);
|
||||
// and for all pack animals
|
||||
for(uint i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
||||
{
|
||||
branch= pIM->getDbBranch(toString("LOCAL:INVENTORY:PACK_ANIMAL%d", i));
|
||||
branch= NLGUI::CDBManager::getInstance()->getDbBranch(toString("LOCAL:INVENTORY:PACK_ANIMAL%d", i));
|
||||
if(branch) branch->removeBranchObserver(&_DBInventoryObs);
|
||||
}
|
||||
|
||||
// remove observers on animal status, cause inventory may become unavailabe during the process
|
||||
for(uint i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:STATUS",i), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:STATUS",i), false);
|
||||
if(node)
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
|
@ -270,9 +270,9 @@ void CActionPhraseFaber::fillFaberPlanSelection(const std::string &brickDB, ui
|
|||
for(i=0;i<maxSelection;i++)
|
||||
{
|
||||
if(i<num)
|
||||
pIM->getDbProp(brickDB + ":" + toString(i) + ":SHEET")->setValue32(bricks[i].asInt());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(brickDB + ":" + toString(i) + ":SHEET")->setValue32(bricks[i].asInt());
|
||||
else
|
||||
pIM->getDbProp(brickDB + ":" + toString(i) + ":SHEET")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(brickDB + ":" + toString(i) + ":SHEET")->setValue32(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -302,7 +302,7 @@ CItemImage *CActionPhraseFaber::getInvMirrorItemImage(uint slotIndex, uint& inv
|
|||
if (getInventory().isInventoryAvailable(INVENTORIES::guild))
|
||||
{
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
CCDBNodeBranch *itemBranch = im->getDbBranch(SERVER_INVENTORY ":GUILD:" + toString(slotIndex));
|
||||
CCDBNodeBranch *itemBranch = NLGUI::CDBManager::getInstance()->getDbBranch(SERVER_INVENTORY ":GUILD:" + toString(slotIndex));
|
||||
static CItemImage image;
|
||||
image.build(itemBranch);
|
||||
invId = INVENTORIES::guild;
|
||||
|
@ -318,7 +318,7 @@ CItemImage *CActionPhraseFaber::getInvMirrorItemImage(uint slotIndex, uint& inv
|
|||
if (getInventory().isInventoryAvailable(INVENTORIES::player_room))
|
||||
{
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
CCDBNodeBranch *itemBranch = im->getDbBranch(SERVER_INVENTORY ":ROOM:" + toString(slotIndex));
|
||||
CCDBNodeBranch *itemBranch = NLGUI::CDBManager::getInstance()->getDbBranch(SERVER_INVENTORY ":ROOM:" + toString(slotIndex));
|
||||
static CItemImage image;
|
||||
image.build(itemBranch);
|
||||
invId = INVENTORIES::player_room;
|
||||
|
@ -370,17 +370,17 @@ void CActionPhraseFaber::validateFaberPlanSelection(CSBrickSheet *itemPlanBrick
|
|||
|
||||
|
||||
// Setup the selected plan
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(FaberPlanDB, false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(FaberPlanDB, false);
|
||||
if(node)
|
||||
node->setValue32(_ExecuteFromItemPlanBrick->Id.asInt());
|
||||
|
||||
// Setup the result item
|
||||
node= pIM->getDbProp(ItemResultSheetDB, false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(ItemResultSheetDB, false);
|
||||
if(node)
|
||||
node->setValue32(itemPlanBrick->FaberPlan.ItemBuilt.asInt());
|
||||
|
||||
// Setup the result quantity (for stacked items)
|
||||
node= pIM->getDbProp(ItemResultQuantityDB, false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(ItemResultQuantityDB, false);
|
||||
if(node)
|
||||
node->setValue32(itemPlanBrick->FaberPlan.NbItemBuilt);
|
||||
|
||||
|
@ -483,7 +483,7 @@ void CActionPhraseFaber::validateFaberPlanSelection(CSBrickSheet *itemPlanBrick
|
|||
// Reset All Mps slots.
|
||||
for(uint mpSlot=0;mpSlot<MAX_MP_SLOT;mpSlot++)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("%s:%d:%d:SHEET", MPFaberDB.c_str(), itemReqLine, mpSlot), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("%s:%d:%d:SHEET", MPFaberDB.c_str(), itemReqLine, mpSlot), false);
|
||||
if(node)
|
||||
node->setValue32(0);
|
||||
}
|
||||
|
@ -577,7 +577,7 @@ void CActionPhraseFaber::resetSelection()
|
|||
|
||||
for(uint i=0;i<MAX_MP_SELECTION_ENTRIES;i++)
|
||||
{
|
||||
pIM->getDbProp(MPSelectionDB+ ":" + toString(i) + ":SHEET")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(MPSelectionDB+ ":" + toString(i) + ":SHEET")->setValue32(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -595,7 +595,7 @@ void CActionPhraseFaber::fillSelection(const std::vector<uint> &mps)
|
|||
fillDBWithMP(MPSelectionDB+ ":" + toString(i), item);
|
||||
}
|
||||
else
|
||||
pIM->getDbProp(MPSelectionDB+ ":" + toString(i) + ":SHEET")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(MPSelectionDB+ ":" + toString(i) + ":SHEET")->setValue32(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -692,9 +692,9 @@ void CActionPhraseFaber::startMpSelection(uint itemReqLine, uint mpSlot)
|
|||
uint maxQuantity= getMaxQuantityChange(itemReqLine, mpSlot);
|
||||
|
||||
// set the max quantity as the default quantity to set up.
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(MPQuantitySelectDb + ":CUR_QUANTITY", false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(MPQuantitySelectDb + ":CUR_QUANTITY", false);
|
||||
if(node) node->setValue32(maxQuantity);
|
||||
node= pIM->getDbProp(MPQuantitySelectDb + ":MAX_QUANTITY", false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(MPQuantitySelectDb + ":MAX_QUANTITY", false);
|
||||
if(node) node->setValue32(maxQuantity);
|
||||
|
||||
// bkup for validation
|
||||
|
@ -841,7 +841,7 @@ void CActionPhraseFaber::validateMpSelectQuantity()
|
|||
|
||||
// get the quantity selected
|
||||
uint quantitySelected= 0;
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(MPQuantitySelectDb + ":CUR_QUANTITY", false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(MPQuantitySelectDb + ":CUR_QUANTITY", false);
|
||||
if(node) quantitySelected= node->getValue32();
|
||||
|
||||
// maximize (if error)
|
||||
|
@ -1056,10 +1056,10 @@ void CActionPhraseFaber::updateQuantityView(uint itemReqLine)
|
|||
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("%s:%d:SELECTED", MPQuantityDb.c_str(), itemReqLine), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("%s:%d:SELECTED", MPQuantityDb.c_str(), itemReqLine), false);
|
||||
if(node)
|
||||
node->setValue32(getTotalQuantitySetuped(itemReqLine));
|
||||
node= pIM->getDbProp(toString("%s:%d:REQUIRED", MPQuantityDb.c_str(), itemReqLine), false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(toString("%s:%d:REQUIRED", MPQuantityDb.c_str(), itemReqLine), false);
|
||||
if(node)
|
||||
node->setValue32(_MPBuild[itemReqLine].QuantityReq);
|
||||
}
|
||||
|
@ -1668,7 +1668,7 @@ void CActionPhraseFaber::updateItemResult()
|
|||
// **** setup Level
|
||||
if(minLevel==INT_MAX)
|
||||
minLevel= 0;
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(ItemResultSheetLevel, false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(ItemResultSheetLevel, false);
|
||||
if(node)
|
||||
node->setValue32(minLevel);
|
||||
|
||||
|
@ -1682,7 +1682,7 @@ void CActionPhraseFaber::updateItemResult()
|
|||
uint phraseSlot= pPM->getMemorizedPhrase(_ExecuteFromMemoryLine, _ExecuteFromMemoryIndex);
|
||||
|
||||
sint32 craftSuccessModifier = 0;
|
||||
CCDBNodeLeaf *nodeCSM= pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:CRAFT", false);
|
||||
CCDBNodeLeaf *nodeCSM= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:CRAFT", false);
|
||||
if(nodeCSM)
|
||||
{
|
||||
craftSuccessModifier = nodeCSM->getValue32();
|
||||
|
@ -1730,7 +1730,7 @@ void CActionPhraseFaber::updateItemResult()
|
|||
dominanteColor = i;
|
||||
}
|
||||
}
|
||||
node= pIM->getDbProp(ItemResultSheetColor, false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(ItemResultSheetColor, false);
|
||||
if(node)
|
||||
node->setValue32(dominanteColor);
|
||||
|
||||
|
@ -1815,7 +1815,7 @@ void CActionPhraseFaber::updateItemResult()
|
|||
|
||||
|
||||
// **** BestStat (for text over)
|
||||
node= pIM->getDbProp(ItemResultSheetStatType, false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(ItemResultSheetStatType, false);
|
||||
if(node)
|
||||
{
|
||||
float bestStatValue =-1.0f;
|
||||
|
@ -1838,7 +1838,7 @@ void CActionPhraseFaber::updateItemResult()
|
|||
|
||||
|
||||
// **** ClassType (for text over)
|
||||
node= pIM->getDbProp(ItemResultSheetClassType, false);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(ItemResultSheetClassType, false);
|
||||
if(node)
|
||||
{
|
||||
// Setup DB
|
||||
|
|
|
@ -74,7 +74,7 @@ void CPositionState::serialNodeLeaf(NLMISC::IStream &f, CCDBNodeLeaf *&dbNode)
|
|||
if (!dbPath.empty())
|
||||
{
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
dbNode = im->getDbProp(dbPath, false);
|
||||
dbNode = NLGUI::CDBManager::getInstance()->getDbProp(dbPath, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -156,8 +156,8 @@ void CUIDEntityPositionState::build(const std::string &baseDB)
|
|||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
_DBPos= pIM->getDbProp(baseDB+":POS", false);
|
||||
_Uid= pIM->getDbProp(baseDB+":UID", false);
|
||||
_DBPos= NLGUI::CDBManager::getInstance()->getDbProp(baseDB+":POS", false);
|
||||
_Uid= NLGUI::CDBManager::getInstance()->getDbProp(baseDB+":UID", false);
|
||||
// reset
|
||||
_EntitySlot= CLFECOMMON::INVALID_SLOT;
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ CTeammatePositionState::CTeammatePositionState() : CUIDEntityPositionState()
|
|||
void CTeammatePositionState::build(const std::string &baseDB)
|
||||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
_Present = pIM->getDbProp(baseDB+":NAME", false);
|
||||
_Present = NLGUI::CDBManager::getInstance()->getDbProp(baseDB+":NAME", false);
|
||||
|
||||
CUIDEntityPositionState::build(baseDB);
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ CAnimalPositionState::CAnimalPositionState() : CUIDEntityPositionState()
|
|||
void CAnimalPositionState::build(const std::string &baseDB)
|
||||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
_Status= pIM->getDbProp(baseDB+":STATUS", false);
|
||||
_Status= NLGUI::CDBManager::getInstance()->getDbProp(baseDB+":STATUS", false);
|
||||
|
||||
CUIDEntityPositionState::build(baseDB);
|
||||
}
|
||||
|
|
|
@ -107,30 +107,30 @@ void CBarManager::CBarDataEntry::connectDB(const std::string &baseDBin, const st
|
|||
// try to connect each input entry (don't create)
|
||||
if(!baseDBin.empty())
|
||||
{
|
||||
UIDIn= pIM->getDbProp(baseDBin+"UID", false);
|
||||
UIDIn= NLGUI::CDBManager::getInstance()->getDbProp(baseDBin+"UID", false);
|
||||
if(!presentDB.empty())
|
||||
PresentIn= pIM->getDbProp(baseDBin+presentDB, false);
|
||||
PresentIn= NLGUI::CDBManager::getInstance()->getDbProp(baseDBin+presentDB, false);
|
||||
if(!hpDB.empty())
|
||||
ScoreIn[SCORES::hit_points]= pIM->getDbProp(baseDBin+hpDB, false);
|
||||
ScoreIn[SCORES::hit_points]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBin+hpDB, false);
|
||||
if(!sapDB.empty())
|
||||
ScoreIn[SCORES::sap]= pIM->getDbProp(baseDBin+sapDB, false);
|
||||
ScoreIn[SCORES::sap]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBin+sapDB, false);
|
||||
if(!staDB.empty())
|
||||
ScoreIn[SCORES::stamina]= pIM->getDbProp(baseDBin+staDB, false);
|
||||
ScoreIn[SCORES::stamina]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBin+staDB, false);
|
||||
if(!focusDB.empty())
|
||||
ScoreIn[SCORES::focus]= pIM->getDbProp(baseDBin+focusDB, false);
|
||||
ScoreIn[SCORES::focus]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBin+focusDB, false);
|
||||
}
|
||||
|
||||
// try to connect each output entry (don't create)
|
||||
if(!baseDBout.empty())
|
||||
{
|
||||
if(!hpDB.empty())
|
||||
ScoreOut[SCORES::hit_points]= pIM->getDbProp(baseDBout+hpDB, false);
|
||||
ScoreOut[SCORES::hit_points]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBout+hpDB, false);
|
||||
if(!sapDB.empty())
|
||||
ScoreOut[SCORES::sap]= pIM->getDbProp(baseDBout+sapDB, false);
|
||||
ScoreOut[SCORES::sap]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBout+sapDB, false);
|
||||
if(!staDB.empty())
|
||||
ScoreOut[SCORES::stamina]= pIM->getDbProp(baseDBout+staDB, false);
|
||||
ScoreOut[SCORES::stamina]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBout+staDB, false);
|
||||
if(!focusDB.empty())
|
||||
ScoreOut[SCORES::focus]= pIM->getDbProp(baseDBout+focusDB, false);
|
||||
ScoreOut[SCORES::focus]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBout+focusDB, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ void CBarManager::initInGame()
|
|||
change MaxTeamMember if no more the case
|
||||
*/
|
||||
uint i=0;
|
||||
while( pIM->getDbProp(toString("SERVER:GROUP:%d:NAME", i), false) )
|
||||
while( NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:GROUP:%d:NAME", i), false) )
|
||||
i++;
|
||||
nlassert(i==MaxTeamMember);
|
||||
|
||||
|
@ -247,20 +247,20 @@ void CBarManager::initInGame()
|
|||
// user now can only manage 4 scores
|
||||
nlctassert(SCORES::NUM_SCORES==4);
|
||||
// Input max values
|
||||
_UserScores[SCORES::hit_points].DBInMax= pIM->getDbProp("SERVER:CHARACTER_INFO:SCORES0:Max", false);
|
||||
_UserScores[SCORES::sap].DBInMax= pIM->getDbProp("SERVER:CHARACTER_INFO:SCORES2:Max", false);
|
||||
_UserScores[SCORES::stamina].DBInMax= pIM->getDbProp("SERVER:CHARACTER_INFO:SCORES1:Max", false);
|
||||
_UserScores[SCORES::focus].DBInMax= pIM->getDbProp("SERVER:CHARACTER_INFO:SCORES3:Max", false);
|
||||
_UserScores[SCORES::hit_points].DBInMax= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SCORES0:Max", false);
|
||||
_UserScores[SCORES::sap].DBInMax= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SCORES2:Max", false);
|
||||
_UserScores[SCORES::stamina].DBInMax= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SCORES1:Max", false);
|
||||
_UserScores[SCORES::focus].DBInMax= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SCORES3:Max", false);
|
||||
// Output real values
|
||||
_UserScores[SCORES::hit_points].DBOutVal= pIM->getDbProp("UI:VARIABLES:USER:HP", false);
|
||||
_UserScores[SCORES::sap].DBOutVal= pIM->getDbProp("UI:VARIABLES:USER:SAP", false);
|
||||
_UserScores[SCORES::stamina].DBOutVal= pIM->getDbProp("UI:VARIABLES:USER:STA", false);
|
||||
_UserScores[SCORES::focus].DBOutVal= pIM->getDbProp("UI:VARIABLES:USER:FOCUS", false);
|
||||
_UserScores[SCORES::hit_points].DBOutVal= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:HP", false);
|
||||
_UserScores[SCORES::sap].DBOutVal= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:SAP", false);
|
||||
_UserScores[SCORES::stamina].DBOutVal= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:STA", false);
|
||||
_UserScores[SCORES::focus].DBOutVal= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:FOCUS", false);
|
||||
// Output ratio values
|
||||
_UserScores[SCORES::hit_points].DBOutRatio= pIM->getDbProp("UI:VARIABLES:USER:HP_RATIO", false);
|
||||
_UserScores[SCORES::sap].DBOutRatio= pIM->getDbProp("UI:VARIABLES:USER:SAP_RATIO", false);
|
||||
_UserScores[SCORES::stamina].DBOutRatio= pIM->getDbProp("UI:VARIABLES:USER:STA_RATIO", false);
|
||||
_UserScores[SCORES::focus].DBOutRatio= pIM->getDbProp("UI:VARIABLES:USER:FOCUS_RATIO", false);
|
||||
_UserScores[SCORES::hit_points].DBOutRatio= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:HP_RATIO", false);
|
||||
_UserScores[SCORES::sap].DBOutRatio= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:SAP_RATIO", false);
|
||||
_UserScores[SCORES::stamina].DBOutRatio= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:STA_RATIO", false);
|
||||
_UserScores[SCORES::focus].DBOutRatio= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:FOCUS_RATIO", false);
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -38,7 +38,7 @@ void CBotChatPageCreateGuild::begin()
|
|||
CBotChatPage::begin();
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
// clear intro text
|
||||
im->getDbProp(BOT_CHAT_BASE_DB_PATH ":CREATE_GUILD")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(BOT_CHAT_BASE_DB_PATH ":CREATE_GUILD")->setValue32(0);
|
||||
// show the dialog
|
||||
activateWindow(WIN_BOT_CHAT_PAGE_CREATE_GUILD, true);
|
||||
}
|
||||
|
|
|
@ -64,9 +64,9 @@ CBotChatPageDynamicMission::CBotChatPageDynamicMission()
|
|||
void CBotChatPageDynamicMission::invalidateMission()
|
||||
{
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
im->getDbProp(DM_DESCRIPTION_DB_PATH)->setValue32(0);
|
||||
im->getDbProp(DM_TITLE_DB_PATH)->setValue32(0);
|
||||
im->getDbProp(DM_VALID_DB_PATH)->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(DM_DESCRIPTION_DB_PATH)->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(DM_TITLE_DB_PATH)->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(DM_VALID_DB_PATH)->setValue32(0);
|
||||
_MissionValid = false;
|
||||
}
|
||||
|
||||
|
@ -80,10 +80,10 @@ void CBotChatPageDynamicMission::begin()
|
|||
// clear all choices options
|
||||
for(uint k = 0; k < DYNAMIC_MISSION_NUM_CHOICES; ++k)
|
||||
{
|
||||
im->getDbProp(toString(DM_CHOICE "%d:TITLE", (int) k))->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(toString(DM_CHOICE "%d:TITLE", (int) k))->setValue32(0);
|
||||
for(uint l = 0; l < DYNAMIC_MISSION_MAX_NUM_OPTIONS; ++l)
|
||||
{
|
||||
im->getDbProp(toString(DM_CHOICE "%d:%d:TEXT", (int) k, (int) l))->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(toString(DM_CHOICE "%d:%d:TEXT", (int) k, (int) l))->setValue32(0);
|
||||
}
|
||||
}
|
||||
activateWindow(WIN_BOT_CHAT_PAGE_DYNAMIC_MISSION, true);
|
||||
|
@ -113,7 +113,7 @@ void CBotChatPageDynamicMission::begin()
|
|||
std::fill(_Choice, _Choice + DYNAMIC_MISSION_NUM_CHOICES, -1);
|
||||
for(uint k = 0; k < DYNAMIC_MISSION_NUM_CHOICES; ++k)
|
||||
{
|
||||
im->getDbProp(toString("UI:TEMP:DYNAMIC_MISSION:CHOICE%d", (int) k))->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(toString("UI:TEMP:DYNAMIC_MISSION:CHOICE%d", (int) k))->setValue32(-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ void CBotChatPageDynamicMission::update()
|
|||
}
|
||||
else
|
||||
{
|
||||
uint32 textID = (uint32) im->getDbProp(toString(DM_CHOICE "%d:%d:TEXT", (int) k, (int) l))->getValue32();
|
||||
uint32 textID = (uint32) NLGUI::CDBManager::getInstance()->getDbProp(toString(DM_CHOICE "%d:%d:TEXT", (int) k, (int) l))->getValue32();
|
||||
// see if text has been receive
|
||||
ucstring result;
|
||||
bool received = CStringManagerClient::instance()->getDynString(textID, result);
|
||||
|
@ -173,7 +173,7 @@ void CBotChatPageDynamicMission::update()
|
|||
for(l = _ChoiceCB[k]->getNumTexts(); l < DYNAMIC_MISSION_NUM_CHOICES; ++l)
|
||||
{
|
||||
// see if text id has been received
|
||||
uint32 textID = (uint32) im->getDbProp(toString(DM_CHOICE "%d:%d:TEXT", (int) k, (int) l))->getValue32();
|
||||
uint32 textID = (uint32) NLGUI::CDBManager::getInstance()->getDbProp(toString(DM_CHOICE "%d:%d:TEXT", (int) k, (int) l))->getValue32();
|
||||
if (textID == 0 && !ClientCfg.Local) break;
|
||||
// see if text has been received
|
||||
ucstring result;
|
||||
|
@ -193,25 +193,25 @@ void CBotChatPageDynamicMission::update()
|
|||
}
|
||||
if (ClientCfg.Local)
|
||||
{
|
||||
im->getDbProp(DM_VALID_DB_PATH)->setValue32(1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(DM_VALID_DB_PATH)->setValue32(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!_MissionValid)
|
||||
{
|
||||
// activate 'regen' and 'accept' button when the description has been received
|
||||
uint32 textID = im->getDbProp(DM_TITLE_DB_PATH)->getValue32();
|
||||
uint32 textID = NLGUI::CDBManager::getInstance()->getDbProp(DM_TITLE_DB_PATH)->getValue32();
|
||||
if (textID != 0)
|
||||
{
|
||||
ucstring result;
|
||||
if (CStringManagerClient::instance()->getDynString(textID, result))
|
||||
{
|
||||
textID = im->getDbProp(DM_DESCRIPTION_DB_PATH)->getValue32();
|
||||
textID = NLGUI::CDBManager::getInstance()->getDbProp(DM_DESCRIPTION_DB_PATH)->getValue32();
|
||||
if (textID != 0)
|
||||
{
|
||||
if (CStringManagerClient::instance()->getDynString(textID, result))
|
||||
{
|
||||
im->getDbProp(DM_VALID_DB_PATH)->setValue32(1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(DM_VALID_DB_PATH)->setValue32(1);
|
||||
_MissionValid = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,8 +49,8 @@ CBotChatPageMission::CBotChatPageMission()
|
|||
void CBotChatPageMission::init()
|
||||
{
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
if (im->getDbBranch("SERVER:CHOOSE_MISSIONS"))
|
||||
im->addBranchObserver("SERVER:CHOOSE_MISSIONS", &_MissionPagesObs);
|
||||
if (NLGUI::CDBManager::getInstance()->getDbBranch("SERVER:CHOOSE_MISSIONS"))
|
||||
NLGUI::CDBManager::getInstance()->addBranchObserver("SERVER:CHOOSE_MISSIONS", &_MissionPagesObs);
|
||||
}
|
||||
|
||||
|
||||
|
@ -60,12 +60,12 @@ void CBotChatPageMission::begin()
|
|||
CBotChatPage::begin();
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
// clear intro text
|
||||
im->getDbProp(BOT_CHAT_BASE_DB_PATH ":CHOOSE_MISSION")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(BOT_CHAT_BASE_DB_PATH ":CHOOSE_MISSION")->setValue32(0);
|
||||
_MissionPagesObs.setMissionClientType(_MType);
|
||||
_MissionPagesObs.start();
|
||||
|
||||
// Select the Mission Aspect according to mission type
|
||||
im->getDbProp("UI:TEMP:MISSION:MISSION_TYPE")->setValue32(_MType);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:MISSION:MISSION_TYPE")->setValue32(_MType);
|
||||
|
||||
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(im->getElementFromId(WIN_BOT_CHAT_PAGE_MISSION));
|
||||
if (gc)
|
||||
|
@ -116,7 +116,7 @@ void CBotChatPageMission::selectMission(CDBCtrlSheet *missionSheet)
|
|||
viewTextID->setTextId(detailTextLeaf->getValue32());
|
||||
}
|
||||
// copy icon
|
||||
CCDBNodeLeaf *iconLeaf = im->getDbProp("UI:TEMP:MISSION:ICON");
|
||||
CCDBNodeLeaf *iconLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:MISSION:ICON");
|
||||
if (iconLeaf)
|
||||
{
|
||||
iconLeaf->setValue32(missionSheet->getSheetId());
|
||||
|
@ -196,43 +196,43 @@ NLMISC_COMMAND( testMissionPage, "<tmp> debug mission page", "")
|
|||
if (args.size() != 1) return false;
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
//
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:0:ICON")->setValue32(CSheetId("generic_craft.mission_icon").asInt());
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:0:TEXT")->setValue32(1);
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:0:DETAIL_TEXT")->setValue32(11);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:0:ICON")->setValue32(CSheetId("generic_craft.mission_icon").asInt());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:0:TEXT")->setValue32(1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:0:DETAIL_TEXT")->setValue32(11);
|
||||
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:1:ICON")->setValue32(CSheetId("generic_fight.mission_icon").asInt());
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:1:TEXT")->setValue32(2);
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:1:DETAIL_TEXT")->setValue32(12);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:1:ICON")->setValue32(CSheetId("generic_fight.mission_icon").asInt());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:1:TEXT")->setValue32(2);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:1:DETAIL_TEXT")->setValue32(12);
|
||||
//
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:2:ICON")->setValue32(CSheetId("generic_forage.mission_icon").asInt());
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:2:TEXT")->setValue32(3);
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:2:DETAIL_TEXT")->setValue32(13);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:2:ICON")->setValue32(CSheetId("generic_forage.mission_icon").asInt());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:2:TEXT")->setValue32(3);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:2:DETAIL_TEXT")->setValue32(13);
|
||||
//
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:3:ICON")->setValue32(CSheetId("generic_generic.mission_icon").asInt());
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:3:TEXT")->setValue32(4);
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:3:DETAIL_TEXT")->setValue32(14);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:3:ICON")->setValue32(CSheetId("generic_generic.mission_icon").asInt());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:3:TEXT")->setValue32(4);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:3:DETAIL_TEXT")->setValue32(14);
|
||||
|
||||
//
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:4:ICON")->setValue32(CSheetId("generic_rite.mission_icon").asInt());
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:4:TEXT")->setValue32(5);
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:4:DETAIL_TEXT")->setValue32(15);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:4:ICON")->setValue32(CSheetId("generic_rite.mission_icon").asInt());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:4:TEXT")->setValue32(5);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:4:DETAIL_TEXT")->setValue32(15);
|
||||
//
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:5:ICON")->setValue32(CSheetId("generic_travel.mission_icon").asInt());
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:5:TEXT")->setValue32(6);
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:5:DETAIL_TEXT")->setValue32(16);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:5:ICON")->setValue32(CSheetId("generic_travel.mission_icon").asInt());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:5:TEXT")->setValue32(6);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:5:DETAIL_TEXT")->setValue32(16);
|
||||
//
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:6:ICON")->setValue32(CSheetId("generic_craft.mission_icon").asInt());
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:6:TEXT")->setValue32(7);
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:6:DETAIL_TEXT")->setValue32(17);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:6:ICON")->setValue32(CSheetId("generic_craft.mission_icon").asInt());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:6:TEXT")->setValue32(7);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:6:DETAIL_TEXT")->setValue32(17);
|
||||
//
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:7:ICON")->setValue32(CSheetId("generic_fight.mission_icon").asInt());
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:7:TEXT")->setValue32(8);
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:7:DETAIL_TEXT")->setValue32(18);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:7:ICON")->setValue32(CSheetId("generic_fight.mission_icon").asInt());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:7:TEXT")->setValue32(8);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:7:DETAIL_TEXT")->setValue32(18);
|
||||
//
|
||||
sint32 pageId;
|
||||
fromString(args[0], pageId);
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:SESSION")->setValue32(CBotChatManager::getInstance()->getSessionID());
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:PAGE_ID")->setValue32(pageId);
|
||||
im->getDbProp("SERVER:CHOOSE_MISSIONS:HAS_NEXT")->setValue32(0); // not relevant for test ..
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:SESSION")->setValue32(CBotChatManager::getInstance()->getSessionID());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:PAGE_ID")->setValue32(pageId);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHOOSE_MISSIONS:HAS_NEXT")->setValue32(0); // not relevant for test ..
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ void CBotChatPageMissionEnd::begin()
|
|||
if ((flags & 1) || ClientCfg.Local) // is reward text needed
|
||||
{
|
||||
rewardText->setActive(true);
|
||||
im->getDbProp(BOT_CHAT_BASE_DB_PATH ":MISSION_END_REWARD")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(BOT_CHAT_BASE_DB_PATH ":MISSION_END_REWARD")->setValue32(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ void CBotChatPageMissionEnd::begin()
|
|||
rewardSlots->setActive(((flags & 2) != 0) || ClientCfg.Local);
|
||||
}
|
||||
//
|
||||
im->getDbProp(BOT_CHAT_BASE_DB_PATH ":MISSION_END")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(BOT_CHAT_BASE_DB_PATH ":MISSION_END")->setValue32(0);
|
||||
//
|
||||
ig->setActive(true);
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ void CBotChatPageNews::begin()
|
|||
CBotChatPage::begin();
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
// clear intro text
|
||||
im->getDbProp(BOT_CHAT_BASE_DB_PATH ":NEWS")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(BOT_CHAT_BASE_DB_PATH ":NEWS")->setValue32(0);
|
||||
//
|
||||
activateWindow(WIN_BOT_CHAT_PAGE_NEWS, true);
|
||||
}
|
||||
|
|
|
@ -38,14 +38,14 @@ void CBotChatPagePlayerGift::begin()
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
// clear intro text
|
||||
pIM->getDbProp(BOT_CHAT_BASE_DB_PATH ":PLAYER_GIFT")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(BOT_CHAT_BASE_DB_PATH ":PLAYER_GIFT")->setValue32(0);
|
||||
|
||||
// clear money proposal value
|
||||
CCDBNodeLeaf *moneyProposal = pIM->getDbProp(pIM->getDefine("money_proposal"));
|
||||
CCDBNodeLeaf *moneyProposal = NLGUI::CDBManager::getInstance()->getDbProp(pIM->getDefine("money_proposal"));
|
||||
if (moneyProposal) moneyProposal->setValue64(0);
|
||||
|
||||
// clear 'accept' button
|
||||
pIM->getDbProp("LOCAL:EXCHANGE:ACCEPTED")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:EXCHANGE:ACCEPTED")->setValue32(0);
|
||||
|
||||
// Default is not validated
|
||||
PlayerGiftValidated= false;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -475,7 +475,7 @@ void SCharacter3DSetup::setupFromCS_ModelCol (SLOTTYPE::EVisualSlot s, sint32 mo
|
|||
uint64 SCharacter3DSetup::getDB (const string &name)
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(name);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(name);
|
||||
if (pNL == NULL) return 0;
|
||||
return pNL->getValue64();
|
||||
}
|
||||
|
@ -484,7 +484,7 @@ uint64 SCharacter3DSetup::getDB (const string &name)
|
|||
void SCharacter3DSetup::setDB (const string &name, uint64 val)
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(name);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(name);
|
||||
if (pNL == NULL) return;
|
||||
pNL->setValue64(val);
|
||||
}
|
||||
|
|
|
@ -374,8 +374,8 @@ void CChatTargetFilter::setTargetGroup(CChatGroup::TGroupType groupType, uint32
|
|||
// set the color
|
||||
string entry="UI:SAVE:CHAT:COLORS:";
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
const bool teamActive = pIM->getDbProp("SERVER:GROUP:0:NAME")->getValueBool();
|
||||
const bool guildActive = pIM->getDbProp("SERVER:GUILD:NAME")->getValueBool();
|
||||
const bool teamActive = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GROUP:0:NAME")->getValueBool();
|
||||
const bool guildActive = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:NAME")->getValueBool();
|
||||
switch(groupType)
|
||||
{
|
||||
case CChatGroup::dyn_chat: entry+="DYN:" + NLMISC::toString(dynamicChannelDbIndex); break;
|
||||
|
@ -389,7 +389,7 @@ void CChatTargetFilter::setTargetGroup(CChatGroup::TGroupType groupType, uint32
|
|||
{
|
||||
entry+="UNIVERSE_NEW";
|
||||
if(allowUniverseWarning)
|
||||
pIM->getDbProp("UI:VARIABLES:UNIVERSE_CHANEL_WARNING_WANTED")->setValue64(1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:UNIVERSE_CHANEL_WARNING_WANTED")->setValue64(1);
|
||||
}
|
||||
break;
|
||||
case CChatGroup::region: entry+="REGION"; break;
|
||||
|
|
|
@ -51,7 +51,7 @@ uint CChatTextManager::getTextFontSize() const
|
|||
if (!_TextFontSize)
|
||||
{
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
_TextFontSize = im->getDbProp("UI:SAVE:CHAT:FONT_SIZE", false);
|
||||
_TextFontSize = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHAT:FONT_SIZE", false);
|
||||
if (!_TextFontSize) return 12;
|
||||
}
|
||||
return (uint) _TextFontSize->getValue32();
|
||||
|
@ -63,7 +63,7 @@ uint CChatTextManager::getTextMultiLineSpace() const
|
|||
if (!_TextMultilineSpace)
|
||||
{
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
_TextMultilineSpace = im->getDbProp("UI:SAVE:CHAT:MULTI_LINE_SPACE", false);
|
||||
_TextMultilineSpace = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHAT:MULTI_LINE_SPACE", false);
|
||||
if (!_TextMultilineSpace) return 1;
|
||||
}
|
||||
return (uint) _TextMultilineSpace->getValue32();
|
||||
|
@ -75,7 +75,7 @@ bool CChatTextManager::isTextShadowed() const
|
|||
if (!_TextShadowed)
|
||||
{
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
_TextShadowed = im->getDbProp("UI:SAVE:CHAT:SHADOWED_TEXT", false);
|
||||
_TextShadowed = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHADOWED_TEXT", false);
|
||||
if (!_TextShadowed) return false;
|
||||
}
|
||||
return _TextShadowed->getValueBool();
|
||||
|
@ -149,7 +149,7 @@ CViewBase *CChatTextManager::createMsgText(const ucstring &cstMsg, NLMISC::CRGBA
|
|||
vt->setModulateGlobalColor(false);
|
||||
|
||||
ucstring cur_time;
|
||||
static CCDBNodeLeaf* node = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
|
||||
static CCDBNodeLeaf* node = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
|
||||
if (node)
|
||||
{
|
||||
if (node->getValueBool())
|
||||
|
|
|
@ -607,7 +607,7 @@ void CChatGroupWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CC
|
|||
newmsg = newmsg.substr(0, pos + 1) + prefix + newmsg.substr(pos + 1);
|
||||
|
||||
// Add dynchannel number and optionally name before text if user channel
|
||||
CCDBNodeLeaf* node = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_DYN_CHANNEL_NAME_IN_CHAT_CB", false);
|
||||
CCDBNodeLeaf* node = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_DYN_CHANNEL_NAME_IN_CHAT_CB", false);
|
||||
if (node && node->getValueBool())
|
||||
{
|
||||
uint32 textId = ChatMngr.getDynamicChannelNameFromDbIndex(dynamicChatDbIndex);
|
||||
|
|
|
@ -348,7 +348,7 @@ bool CCtrlBaseButton::handleEvent (const NLGUI::CEventDescriptor& event)
|
|||
if (!_LeftLongClickHandled)
|
||||
{
|
||||
uint nVal = 50;
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp("UI:SAVE:KEY_REPEAT_SPEED");
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:KEY_REPEAT_SPEED");
|
||||
if (pNL != NULL)
|
||||
nVal = pNL->getValue32();
|
||||
uint repeatDelay = (uint)(KEY_REPEAT_MIN + (KEY_REPEAT_MAX-KEY_REPEAT_MIN) * (float)nVal / 100.0f);
|
||||
|
|
|
@ -266,7 +266,7 @@ int CDBCtrlSheet::luaBuildCrystallizedSpellListBrick(CLuaState &ls)
|
|||
{
|
||||
//if ( ! (pBM->getBrick(itemInfo.Enchantment.Bricks[i])->isCredit() || pBM->getBrick(itemInfo.Enchantment.Bricks[i])->isParameter()))
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("UI:VARIABLES:CRYSTALBRICKS:%d:SHEET", currentBrick++));
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("UI:VARIABLES:CRYSTALBRICKS:%d:SHEET", currentBrick++));
|
||||
if(node)
|
||||
node->setValue32(itemInfo.Enchantment.Bricks[i].asInt());
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ int CDBCtrlSheet::luaBuildCrystallizedSpellListBrick(CLuaState &ls)
|
|||
// Reset other to 0.
|
||||
for(;;currentBrick++)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("UI:VARIABLES:CRYSTALBRICKS:%d:SHEET", currentBrick), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("UI:VARIABLES:CRYSTALBRICKS:%d:SHEET", currentBrick), false);
|
||||
if(node)
|
||||
node->setValue32(0);
|
||||
else
|
||||
|
@ -747,7 +747,7 @@ void CDBCtrlSheet::setupSheetDbLinks ()
|
|||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
// link to the DBBranch (NB: none for macros)
|
||||
CCDBNodeBranch *dbBranch = pIM->getDbBranch( _DbBranchName );
|
||||
CCDBNodeBranch *dbBranch = NLGUI::CDBManager::getInstance()->getDbBranch( _DbBranchName );
|
||||
//nlassert(dbBranch || _DbBranchName.empty());
|
||||
|
||||
// link if possible with the database, else dummy link to the interface
|
||||
|
@ -2974,11 +2974,11 @@ void CDBCtrlSheet::setCurrSelection(CDBCtrlSheet *selected)
|
|||
{
|
||||
_CurrSelection = selected;
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
im->getDbProp("UI:SELECTED_ITEM_SHEET_ID:SHEET")->setValue64(selected ? selected->getSheetId() : 0);
|
||||
im->getDbProp("UI:SELECTED_ITEM_SHEET_ID:QUALITY")->setValue64(selected ? selected->getQuality() : 0);
|
||||
im->getDbProp("UI:SELECTED_ITEM_SHEET_ID:SLOT_TYPE")->setValue64(selected ? selected->getBehaviour() : 0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:SELECTED_ITEM_SHEET_ID:SHEET")->setValue64(selected ? selected->getSheetId() : 0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:SELECTED_ITEM_SHEET_ID:QUALITY")->setValue64(selected ? selected->getQuality() : 0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:SELECTED_ITEM_SHEET_ID:SLOT_TYPE")->setValue64(selected ? selected->getBehaviour() : 0);
|
||||
// set the selection group in the db
|
||||
im->getDbProp("UI:SELECTED_ITEM_SELECTION_GROUP")->setValue64(selected ? selected->getSelectionGroup() : -1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:SELECTED_ITEM_SELECTION_GROUP")->setValue64(selected ? selected->getSelectionGroup() : -1);
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -102,13 +102,13 @@ bool CDBGroupBuildPhrase::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|||
// Bricks and their Params
|
||||
for(i=0;i<MaxBricks;i++)
|
||||
{
|
||||
pIM->getDbProp(BrickBuildDB + ":MAIN:" + toString(i)+":SHEET");
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(BrickBuildDB + ":MAIN:" + toString(i)+":SHEET");
|
||||
for(uint j=0;j<MaxParam;j++)
|
||||
pIM->getDbProp(BrickBuildDB + ":PARAM:" + toString(i) + ":" + toString(j) + ":SHEET");
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(BrickBuildDB + ":PARAM:" + toString(i) + ":" + toString(j) + ":SHEET");
|
||||
}
|
||||
|
||||
// spellView: to update the icon, use a special phrase manager entry
|
||||
pIM->getDbProp(BrickBuildDB + ":EDITION_PHRASE:PHRASE")->setValue32(CSPhraseManager::EditionSlot);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(BrickBuildDB + ":EDITION_PHRASE:PHRASE")->setValue32(CSPhraseManager::EditionSlot);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1047,8 +1047,8 @@ void CDBGroupBuildPhrase::updateAllDisplay(const CSPhraseCom &phrase)
|
|||
pBM->getSabrinaCom().getPhraseCost(phrase.Bricks, totalCost, totalCredit);
|
||||
|
||||
// update database
|
||||
pIM->getDbProp("UI:PHRASE:BUILD:TOTAL_COST")->setValue32(totalCost);
|
||||
pIM->getDbProp("UI:PHRASE:BUILD:TOTAL_CREDIT")->setValue32(totalCredit);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:PHRASE:BUILD:TOTAL_COST")->setValue32(totalCost);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:PHRASE:BUILD:TOTAL_CREDIT")->setValue32(totalCredit);
|
||||
|
||||
// **** Update the Cost of All Root/Mandat/ops/Credits.
|
||||
if(phrase.Bricks.size())
|
||||
|
@ -1133,7 +1133,7 @@ void CDBGroupBuildPhrase::updateAllDisplay(const CSPhraseCom &phrase)
|
|||
mandatOk= false;
|
||||
}
|
||||
// set DB value accordeing to it.
|
||||
pIM->getDbProp("UI:PHRASE:BUILD:ROOT_EFFECT_VALID")->setValue32(mandatOk);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:PHRASE:BUILD:ROOT_EFFECT_VALID")->setValue32(mandatOk);
|
||||
|
||||
// update valid button
|
||||
if(_ValidateButton)
|
||||
|
@ -1187,7 +1187,7 @@ void CDBGroupBuildPhrase::updateAllDisplay(const CSPhraseCom &phrase)
|
|||
if(rootBrick && rootBrick->isCombat())
|
||||
{
|
||||
// show the weapon restriction interface
|
||||
pIM->getDbProp("UI:PHRASE:BUILD:RESTRICT_COMBAT:ENABLED")->setValue32(1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:PHRASE:BUILD:RESTRICT_COMBAT:ENABLED")->setValue32(1);
|
||||
|
||||
// If not already done, retrieve the weapon skills, and fill the sbricks SHEET
|
||||
if(_WeaponSkills.empty())
|
||||
|
@ -1218,7 +1218,7 @@ void CDBGroupBuildPhrase::updateAllDisplay(const CSPhraseCom &phrase)
|
|||
uint32 viewBrickCombatSheetId= pBM->getVisualBrickForSkill(_WeaponSkills[i]).asInt();
|
||||
|
||||
// And fill in DB
|
||||
pIM->getDbProp(toString("UI:PHRASE:BUILD:RESTRICT_COMBAT:%d:SHEET", i))->setValue32(viewBrickCombatSheetId);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(toString("UI:PHRASE:BUILD:RESTRICT_COMBAT:%d:SHEET", i))->setValue32(viewBrickCombatSheetId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1226,13 +1226,13 @@ void CDBGroupBuildPhrase::updateAllDisplay(const CSPhraseCom &phrase)
|
|||
for(uint i=0;i<_WeaponSkills.size();i++)
|
||||
{
|
||||
bool ok= pPM->skillCompatibleWithCombatPhrase(_WeaponSkills[i], phrase.Bricks);
|
||||
pIM->getDbProp(toString("UI:PHRASE:BUILD:RESTRICT_COMBAT:%d:LOCKED", i))->setValue32(!ok);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(toString("UI:PHRASE:BUILD:RESTRICT_COMBAT:%d:LOCKED", i))->setValue32(!ok);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// hide the weapon restriction interface
|
||||
pIM->getDbProp("UI:PHRASE:BUILD:RESTRICT_COMBAT:ENABLED")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:PHRASE:BUILD:RESTRICT_COMBAT:ENABLED")->setValue32(0);
|
||||
}
|
||||
|
||||
// **** Setup the phrase Desc
|
||||
|
@ -1267,7 +1267,7 @@ void CDBGroupBuildPhrase::resetSelection()
|
|||
|
||||
for(uint i=0;i<MaxSelection;i++)
|
||||
{
|
||||
pIM->getDbProp(BrickSelectionDB+ ":" + toString(i) + ":SHEET")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(BrickSelectionDB+ ":" + toString(i) + ":SHEET")->setValue32(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1280,9 +1280,9 @@ void CDBGroupBuildPhrase::fillSelection(const std::vector<CSheetId> &bricks)
|
|||
for(uint i=0;i<MaxSelection;i++)
|
||||
{
|
||||
if(i<num)
|
||||
pIM->getDbProp(BrickSelectionDB+ ":" + toString(i) + ":SHEET")->setValue32(bricks[i].asInt());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(BrickSelectionDB+ ":" + toString(i) + ":SHEET")->setValue32(bricks[i].asInt());
|
||||
else
|
||||
pIM->getDbProp(BrickSelectionDB+ ":" + toString(i) + ":SHEET")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(BrickSelectionDB+ ":" + toString(i) + ":SHEET")->setValue32(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ bool CDBGroupListSheet::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|||
if ( prop )
|
||||
{
|
||||
// get a branch in the database.
|
||||
CCDBNodeBranch *branch= pIM->getDbBranch(prop);
|
||||
CCDBNodeBranch *branch= NLGUI::CDBManager::getInstance()->getDbBranch(prop);
|
||||
if(!branch)
|
||||
{
|
||||
nlinfo ("Branch not found in the database %s", (const char*)prop);
|
||||
|
@ -123,7 +123,7 @@ bool CDBGroupListSheet::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|||
_DbBranch= branch;
|
||||
_DbBranchName= (const char*)prop;
|
||||
// add observer
|
||||
pIM->addBranchObserver(branch, &_DbBranchObs);
|
||||
NLGUI::CDBManager::getInstance()->addBranchObserver(branch, &_DbBranchObs);
|
||||
}
|
||||
|
||||
// parse the common ctrl info
|
||||
|
@ -224,7 +224,7 @@ bool CDBGroupListSheet::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|||
prop = (char*) xmlGetProp( cur, (xmlChar*)"db_animal_status" );
|
||||
if (prop)
|
||||
{
|
||||
_AnimalStatus= pIM->getDbProp((const char*)prop, false);
|
||||
_AnimalStatus= NLGUI::CDBManager::getInstance()->getDbProp((const char*)prop, false);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -65,7 +65,7 @@ bool CDBGroupListSheetBonusMalus::parse (xmlNodePtr cur, CInterfaceGroup *parent
|
|||
for(;;)
|
||||
{
|
||||
string db= toString("%s:%d:" DISABLE_LEAF, _DbBranchName.c_str(), i);
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(db, false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(db, false);
|
||||
if(!node)
|
||||
{
|
||||
break;
|
||||
|
|
|
@ -40,7 +40,7 @@ void CDBGroupListSheetMission::CSheetChildMission::init(CDBGroupListSheetText *p
|
|||
CCDBNodeLeaf *pNL;
|
||||
string sTmp = Ctrl->getSheet()+":PREREQ_STATE";
|
||||
sTmp = "LOCAL:" + sTmp.substr(6,sTmp.size());
|
||||
pNL = pIM->getDbProp(sTmp, false);
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp(sTmp, false);
|
||||
nlassert(pNL != NULL);
|
||||
CurrentPreReqState.link ( sTmp.c_str() );
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ bool CDBGroupListSheetText::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|||
if ( prop )
|
||||
{
|
||||
// get a branch in the database.
|
||||
CCDBNodeBranch *branch= pIM->getDbBranch(prop);
|
||||
CCDBNodeBranch *branch= NLGUI::CDBManager::getInstance()->getDbBranch(prop);
|
||||
if(!branch)
|
||||
{
|
||||
nlinfo ("Branch not found in the database %s", (const char*)prop);
|
||||
|
@ -107,7 +107,7 @@ bool CDBGroupListSheetText::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|||
_DbBranch= branch;
|
||||
_DbBranchName= (const char*)prop;
|
||||
// add observer
|
||||
pIM->addBranchObserver( branch, &_DbBranchObs );
|
||||
NLGUI::CDBManager::getInstance()->addBranchObserver( branch, &_DbBranchObs );
|
||||
}
|
||||
|
||||
// parse the common ctrl info
|
||||
|
@ -211,7 +211,7 @@ bool CDBGroupListSheetText::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|||
prop = (char*) xmlGetProp( cur, (xmlChar*)"db_animal_status" );
|
||||
if (prop)
|
||||
{
|
||||
_AnimalStatus= pIM->getDbProp((const char*)prop, false);
|
||||
_AnimalStatus= NLGUI::CDBManager::getInstance()->getDbProp((const char*)prop, false);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -158,19 +158,19 @@ void CDBGroupListSheetTextShare::CSheetChildShare::init(CDBGroupListSheetText *p
|
|||
CCDBNodeLeaf *pNL;
|
||||
string sTmp= Ctrl->getSheet()+":NB_MEMBER";
|
||||
sTmp = "LOCAL" + sTmp.substr(6,sTmp.size());
|
||||
pNL = pIM->getDbProp(sTmp, false);
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp(sTmp, false);
|
||||
nlassert(pNL != NULL);
|
||||
CurrentNbMember.link ( sTmp.c_str() );
|
||||
|
||||
sTmp= Ctrl->getSheet()+":CHANCE";
|
||||
sTmp = "LOCAL" + sTmp.substr(6,sTmp.size());
|
||||
pNL = pIM->getDbProp(sTmp, false);
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp(sTmp, false);
|
||||
nlassert(pNL != NULL);
|
||||
CurrentChance.link ( sTmp.c_str() );
|
||||
|
||||
sTmp= Ctrl->getSheet()+":WANTED";
|
||||
sTmp = "LOCAL" + sTmp.substr(6,sTmp.size());
|
||||
pNL = pIM->getDbProp(sTmp, false);
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp(sTmp, false);
|
||||
nlassert(pNL != NULL);
|
||||
CurrentWanted.link ( sTmp.c_str() );
|
||||
|
||||
|
@ -279,15 +279,15 @@ class CHandlerTeamShareChoose : public IActionHandler
|
|||
localDB = "LOCAL" + localDB.substr(6,localDB.size());
|
||||
|
||||
// Retrieve index
|
||||
if (pIM->getDbProp(localDB)->getValue8() == 0)
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp(localDB)->getValue8() == 0)
|
||||
{
|
||||
strMsgName = "TEAM:SHARE_VALID_ITEM";
|
||||
pIM->getDbProp(localDB)->setValue8(1); // We can do it because it is in local
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(localDB)->setValue8(1); // We can do it because it is in local
|
||||
}
|
||||
else
|
||||
{
|
||||
strMsgName = "TEAM:SHARE_INVALID_ITEM";
|
||||
pIM->getDbProp(localDB)->setValue8(0); // We can do it because it is in local
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(localDB)->setValue8(0); // We can do it because it is in local
|
||||
}
|
||||
|
||||
if (!GenericMsgHeaderMngr.pushNameToStream(strMsgName, out))
|
||||
|
@ -299,7 +299,7 @@ class CHandlerTeamShareChoose : public IActionHandler
|
|||
// Serialize item/phrase index
|
||||
out.serial(index);
|
||||
// Serialize session id
|
||||
uint8 sessionid = pIM->getDbProp("LOCAL:INVENTORY:SHARE:SESSION")->getValue8();
|
||||
uint8 sessionid = NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:SHARE:SESSION")->getValue8();
|
||||
out.serial(sessionid);
|
||||
NetMngr.push (out);
|
||||
//nlinfo("impulseCallBack : %s %d %d sent", strMsgName.c_str(), index, sessionid);
|
||||
|
@ -328,7 +328,7 @@ class CHandlerTeamShareValid : public IActionHandler
|
|||
else
|
||||
{
|
||||
// Serialize session id
|
||||
uint8 sessionid = pIM->getDbProp("LOCAL:INVENTORY:SHARE:SESSION")->getValue8();
|
||||
uint8 sessionid = NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:SHARE:SESSION")->getValue8();
|
||||
out.serial(sessionid);
|
||||
NetMngr.push (out);
|
||||
//nlinfo("impulseCallBack : %s %d sent", strMsgName.c_str(), sessionid);
|
||||
|
|
|
@ -55,7 +55,7 @@ void CDBGroupListSheetTrade::CSheetChildTrade::init(CDBGroupListSheetText *pFath
|
|||
{
|
||||
// Basic quality
|
||||
string db= Ctrl->getSheet()+":QUALITY";
|
||||
if( pIM->getDbProp(db, false) )
|
||||
if( NLGUI::CDBManager::getInstance()->getDbProp(db, false) )
|
||||
CurrentQuality.link ( db.c_str() );
|
||||
else
|
||||
{
|
||||
|
@ -69,7 +69,7 @@ void CDBGroupListSheetTrade::CSheetChildTrade::init(CDBGroupListSheetText *pFath
|
|||
{
|
||||
// Basic quantity
|
||||
string db= Ctrl->getSheet()+":QUANTITY";
|
||||
if( pIM->getDbProp(db, false) )
|
||||
if( NLGUI::CDBManager::getInstance()->getDbProp(db, false) )
|
||||
CurrentQuantity.link ( db.c_str() );
|
||||
else
|
||||
{
|
||||
|
@ -84,7 +84,7 @@ void CDBGroupListSheetTrade::CSheetChildTrade::init(CDBGroupListSheetText *pFath
|
|||
{
|
||||
// Basic price
|
||||
string priceDB= Ctrl->getSheet()+":PRICE";
|
||||
if( pIM->getDbProp(priceDB, false) )
|
||||
if( NLGUI::CDBManager::getInstance()->getDbProp(priceDB, false) )
|
||||
CurrentPrice.link ( priceDB.c_str() );
|
||||
else
|
||||
{
|
||||
|
@ -95,7 +95,7 @@ void CDBGroupListSheetTrade::CSheetChildTrade::init(CDBGroupListSheetText *pFath
|
|||
|
||||
// Faction Type
|
||||
string factionTypeDB= Ctrl->getSheet()+":FACTION_TYPE";
|
||||
if( pIM->getDbProp(factionTypeDB, false) )
|
||||
if( NLGUI::CDBManager::getInstance()->getDbProp(factionTypeDB, false) )
|
||||
CurrentFactionType.link ( factionTypeDB.c_str() );
|
||||
else
|
||||
{
|
||||
|
@ -106,7 +106,7 @@ void CDBGroupListSheetTrade::CSheetChildTrade::init(CDBGroupListSheetText *pFath
|
|||
|
||||
// Faction Point Price
|
||||
string factionPointPriceDB= Ctrl->getSheet()+":PRICE";
|
||||
if( pIM->getDbProp(factionPointPriceDB, false) )
|
||||
if( NLGUI::CDBManager::getInstance()->getDbProp(factionPointPriceDB, false) )
|
||||
CurrentFactionPointPrice.link ( factionPointPriceDB.c_str() );
|
||||
else
|
||||
{
|
||||
|
@ -121,7 +121,7 @@ void CDBGroupListSheetTrade::CSheetChildTrade::init(CDBGroupListSheetText *pFath
|
|||
{
|
||||
// seller type
|
||||
string db= Ctrl->getSheet()+":SELLER_TYPE";
|
||||
if( pIM->getDbProp(db, false) )
|
||||
if( NLGUI::CDBManager::getInstance()->getDbProp(db, false) )
|
||||
CurrentSellerType.link ( db.c_str() );
|
||||
else
|
||||
{
|
||||
|
@ -132,7 +132,7 @@ void CDBGroupListSheetTrade::CSheetChildTrade::init(CDBGroupListSheetText *pFath
|
|||
|
||||
// Retire price (only valid if sellerType is User or ResaleAndUser)
|
||||
db= Ctrl->getSheet()+":PRICE_RETIRE";
|
||||
if( pIM->getDbProp(db, false) )
|
||||
if( NLGUI::CDBManager::getInstance()->getDbProp(db, false) )
|
||||
CurrentPriceRetire.link ( db.c_str() );
|
||||
else
|
||||
{
|
||||
|
@ -143,7 +143,7 @@ void CDBGroupListSheetTrade::CSheetChildTrade::init(CDBGroupListSheetText *pFath
|
|||
|
||||
// Resale Time Left (only valid if sellerType is User or ResaleAndUser)
|
||||
db= Ctrl->getSheet()+":RESALE_TIME_LEFT";
|
||||
if( pIM->getDbProp(db, false) )
|
||||
if( NLGUI::CDBManager::getInstance()->getDbProp(db, false) )
|
||||
CurrentResaleTimeLeft.link ( db.c_str() );
|
||||
else
|
||||
{
|
||||
|
@ -154,7 +154,7 @@ void CDBGroupListSheetTrade::CSheetChildTrade::init(CDBGroupListSheetText *pFath
|
|||
|
||||
// VendorNameId
|
||||
db= Ctrl->getSheet()+":VENDOR_NAMEID";
|
||||
if( pIM->getDbProp(db, false) )
|
||||
if( NLGUI::CDBManager::getInstance()->getDbProp(db, false) )
|
||||
CurrentVendorNameId.link ( db.c_str() );
|
||||
else
|
||||
{
|
||||
|
@ -370,7 +370,7 @@ void CDBGroupListSheetTrade::CSheetChildTrade::updateViewText(CDBGroupListSheetT
|
|||
// check if we should apply fame factor
|
||||
if( zeFather->applyFamePriceFactor() )
|
||||
{
|
||||
priceFactor = CInterfaceManager::getInstance()->getDbProp("SERVER:TRADING:FAME_PRICE_FACTOR")->getValue16()/10000.0f;
|
||||
priceFactor = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:TRADING:FAME_PRICE_FACTOR")->getValue16()/10000.0f;
|
||||
}
|
||||
|
||||
// display with correct format
|
||||
|
@ -615,7 +615,7 @@ CDBGroupListSheetTrade::CDBGroupListSheetTrade(const TCtorParam ¶m)
|
|||
_ApplyFamePriceFactor = false;
|
||||
|
||||
// **** keep link to fame price factor leaf
|
||||
_FamePriceFactorLeaf = CInterfaceManager::getInstance()->getDbProp("SERVER:TRADING:FAME_PRICE_FACTOR");
|
||||
_FamePriceFactorLeaf = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:TRADING:FAME_PRICE_FACTOR");
|
||||
_LastFamePriceFactor = _FamePriceFactorLeaf->getValue16();
|
||||
}
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -192,21 +192,21 @@ void CDBViewBar::draw ()
|
|||
// ----------------------------------------------------------------------------
|
||||
void CDBViewBar::setValueDbLink (const std::string &r)
|
||||
{
|
||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp(r,false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(r,false);
|
||||
if (pNL != NULL) _Value.setNodePtr(pNL);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDBViewBar::setRangeDbLink (const std::string &r)
|
||||
{
|
||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp(r,false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(r,false);
|
||||
if (pNL != NULL) _Range.setNodePtr(pNL);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDBViewBar::setReferenceDbLink (const std::string &r)
|
||||
{
|
||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp(r,false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(r,false);
|
||||
if (pNL != NULL) _Reference.setNodePtr(pNL);
|
||||
}
|
||||
|
||||
|
|
|
@ -295,7 +295,7 @@ void CEncyclopediaManager::rebuildAlbumPage(uint32 albumName)
|
|||
pVT->setTextId(pAlbum->Name);
|
||||
|
||||
// Setup brick reward
|
||||
pIM->getDbProp("UI:VARIABLES:ENCY:ALBUMBRICK:SHEET")->setValue32(pAlbum->RewardBrick);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:ENCY:ALBUMBRICK:SHEET")->setValue32(pAlbum->RewardBrick);
|
||||
CViewText *pRBVT = dynamic_cast<CViewText*>(pIM->getElementFromId(PAGE_ENCY_ALBUM ":reward:desc"));
|
||||
if (pRBVT != NULL)
|
||||
{
|
||||
|
@ -347,7 +347,7 @@ void CEncyclopediaManager::rebuildThemaPage(uint32 themaName)
|
|||
pVT->setTextId(pThema->RewardText);
|
||||
|
||||
// Setup brick reward
|
||||
pIM->getDbProp("UI:VARIABLES:ENCY:REWARDBRICK:SHEET")->setValue32(pThema->RewardSheet);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:ENCY:REWARDBRICK:SHEET")->setValue32(pThema->RewardSheet);
|
||||
CViewText *pRBVT = dynamic_cast<CViewText*>(pIM->getElementFromId(PAGE_ENCY_THEMA ":reward:desc"));
|
||||
nlassert(pRBVT != NULL);
|
||||
STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
|
||||
|
@ -373,14 +373,14 @@ void CEncyclopediaManager::rebuildThemaPage(uint32 themaName)
|
|||
|
||||
// Setup the total number of steps
|
||||
uint32 nNbSteps = pThema->NbTask - 1; // 0th is the rite
|
||||
pIM->getDbProp("UI:VARIABLES:ENCY:STEPS")->setValue32(nNbSteps);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:ENCY:STEPS")->setValue32(nNbSteps);
|
||||
|
||||
// Count number of tasks done
|
||||
uint32 nNbTaskDone = 0;
|
||||
for (i = 0; i < pThema->NbTask; ++i)
|
||||
if (pThema->getTaskState((uint8)i) == 2) // 2 == finished
|
||||
++nNbTaskDone;
|
||||
pIM->getDbProp("UI:VARIABLES:ENCY:DONE")->setValue32(nNbTaskDone);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:ENCY:DONE")->setValue32(nNbTaskDone);
|
||||
|
||||
// setup rite & tasks
|
||||
for (i = 0; i < pThema->NbTask; ++i)
|
||||
|
|
|
@ -279,7 +279,7 @@ void CGroupCompas::draw()
|
|||
case CCompassTarget::Home:
|
||||
{
|
||||
// get pos
|
||||
CCDBNodeLeaf *pos = im->getDbProp(COMPASS_DB_PATH ":HOME_POINT");
|
||||
CCDBNodeLeaf *pos = NLGUI::CDBManager::getInstance()->getDbProp(COMPASS_DB_PATH ":HOME_POINT");
|
||||
sint32 px = (sint32) (pos->getValue64() >> 32);
|
||||
sint32 py = pos->getValue32();
|
||||
if (px != 0 || py != 0)
|
||||
|
@ -410,7 +410,7 @@ bool CGroupCompas::handleEvent (const NLGUI::CEventDescriptor &event)
|
|||
if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousewheel)
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
_RadarPos = pIM->getDbProp("UI:SAVE:RADARZOOM")->getValue32();
|
||||
_RadarPos = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:RADARZOOM")->getValue32();
|
||||
if (eventDesc.getWheel() > 0)
|
||||
{
|
||||
// Zoom out
|
||||
|
@ -422,7 +422,7 @@ bool CGroupCompas::handleEvent (const NLGUI::CEventDescriptor &event)
|
|||
if (_RadarPos < 3) _RadarPos++;
|
||||
}
|
||||
|
||||
pIM->getDbProp("UI:SAVE:RADARZOOM")->setValue32(_RadarPos);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:RADARZOOM")->setValue32(_RadarPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -491,7 +491,7 @@ bool CGroupCompas::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|||
if (ptr) _NewTargetSelectedColor = convertColor(ptr);
|
||||
//
|
||||
|
||||
_DynamicTargetPos = CInterfaceManager::getInstance()->getDbProp(COMPASS_DB_PATH ":TARGET");
|
||||
_DynamicTargetPos = NLGUI::CDBManager::getInstance()->getDbProp(COMPASS_DB_PATH ":TARGET");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -501,8 +501,8 @@ bool buildCompassTargetFromTeamMember(CCompassTarget &ct, uint teamMemberId)
|
|||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
CCDBNodeLeaf *entityNode = pIM->getDbProp(toString(TEAM_DB_PATH ":%d:UID", teamMemberId), false);
|
||||
CCDBNodeLeaf *nameNode = pIM->getDbProp(toString(TEAM_DB_PATH ":%d:NAME", teamMemberId), false);
|
||||
CCDBNodeLeaf *entityNode = NLGUI::CDBManager::getInstance()->getDbProp(toString(TEAM_DB_PATH ":%d:UID", teamMemberId), false);
|
||||
CCDBNodeLeaf *nameNode = NLGUI::CDBManager::getInstance()->getDbProp(toString(TEAM_DB_PATH ":%d:NAME", teamMemberId), false);
|
||||
if (nameNode && nameNode->getValueBool() && entityNode && entityNode->getValue32()!=0 && nameNode)
|
||||
{
|
||||
CSmartPtr<CTeammatePositionState> tracker = new CTeammatePositionState;
|
||||
|
@ -532,7 +532,7 @@ bool buildCompassTargetFromTeamMember(CCompassTarget &ct, uint teamMemberId)
|
|||
if(animalMemberId<MAX_INVENTORY_ANIMAL+1)
|
||||
{
|
||||
ANIMAL_TYPE::EAnimalType at;
|
||||
at = (ANIMAL_TYPE::EAnimalType)pIM->getDbProp("SERVER:PACK_ANIMAL:BEAST"+toString(animalMemberId-1)+":TYPE")->getValue32();
|
||||
at = (ANIMAL_TYPE::EAnimalType)NLGUI::CDBManager::getInstance()->getDbProp("SERVER:PACK_ANIMAL:BEAST"+toString(animalMemberId-1)+":TYPE")->getValue32();
|
||||
string sPrefix;
|
||||
switch(at)
|
||||
{
|
||||
|
@ -551,7 +551,7 @@ bool buildCompassTargetFromTeamMember(CCompassTarget &ct, uint teamMemberId)
|
|||
return false;
|
||||
|
||||
// get if present or not
|
||||
CCDBNodeLeaf *statusNode = pIM->getDbProp(dbBase + ":STATUS", false);
|
||||
CCDBNodeLeaf *statusNode = NLGUI::CDBManager::getInstance()->getDbProp(dbBase + ":STATUS", false);
|
||||
if (statusNode && ANIMAL_STATUS::isSpawned((ANIMAL_STATUS::EAnimalStatus)statusNode->getValue32()) )
|
||||
{
|
||||
CSmartPtr<CAnimalPositionState> tracker = new CAnimalPositionState;
|
||||
|
@ -665,7 +665,7 @@ void CGroupCompasMenu::setActive (bool state)
|
|||
Targets.push_back(ct);
|
||||
getRootMenu()->addLineAtIndex(lineIndex ++, ct.Name, "set_compas", toString ("compass=%s|id=%d|menu=%s", _TargetCompass.c_str(), (int) Targets.size() - 1, _Id.c_str()));
|
||||
// Home
|
||||
CCDBNodeLeaf *pos = im->getDbProp(COMPASS_DB_PATH ":HOME_POINT");
|
||||
CCDBNodeLeaf *pos = NLGUI::CDBManager::getInstance()->getDbProp(COMPASS_DB_PATH ":HOME_POINT");
|
||||
sint32 px = (sint32) (pos->getValue64() >> 32);
|
||||
sint32 py = pos->getValue32();
|
||||
if (px != 0 || py != 0)
|
||||
|
@ -676,7 +676,7 @@ void CGroupCompasMenu::setActive (bool state)
|
|||
getRootMenu()->addLineAtIndex(lineIndex ++, ct.Name, "set_compas", toString ("compass=%s|id=%d|menu=%s", _TargetCompass.c_str(), (int) Targets.size() - 1, _Id.c_str()));
|
||||
}
|
||||
// Respawn
|
||||
pos = im->getDbProp(COMPASS_DB_PATH ":BIND_POINT");
|
||||
pos = NLGUI::CDBManager::getInstance()->getDbProp(COMPASS_DB_PATH ":BIND_POINT");
|
||||
px = (sint32) (pos->getValue64() >> 32);
|
||||
py = pos->getValue32();
|
||||
if (px != 0 || py != 0)
|
||||
|
@ -726,14 +726,14 @@ void CGroupCompasMenu::setActive (bool state)
|
|||
{
|
||||
for(uint l = 0; l <MAX_NUM_MISSION_TARGETS; ++l)
|
||||
{
|
||||
CCDBNodeLeaf *textIDLeaf = im->getDbProp(baseDbPath + toString(":%d:TARGET%d:TITLE", (int) k, (int) l), false);
|
||||
CCDBNodeLeaf *textIDLeaf = NLGUI::CDBManager::getInstance()->getDbProp(baseDbPath + toString(":%d:TARGET%d:TITLE", (int) k, (int) l), false);
|
||||
if (textIDLeaf)
|
||||
{
|
||||
ucstring name;
|
||||
if (CStringManagerClient::instance()->getDynString(textIDLeaf->getValue32(), name))
|
||||
{
|
||||
CCDBNodeLeaf *leafPosX= im->getDbProp(baseDbPath + toString(":%d:TARGET%d:X", (int) k, (int) l), false);
|
||||
CCDBNodeLeaf *leafPosY = im->getDbProp(baseDbPath + toString(":%d:TARGET%d:Y", (int) k, (int) l), false);
|
||||
CCDBNodeLeaf *leafPosX= NLGUI::CDBManager::getInstance()->getDbProp(baseDbPath + toString(":%d:TARGET%d:X", (int) k, (int) l), false);
|
||||
CCDBNodeLeaf *leafPosY = NLGUI::CDBManager::getInstance()->getDbProp(baseDbPath + toString(":%d:TARGET%d:Y", (int) k, (int) l), false);
|
||||
if (leafPosX && leafPosY)
|
||||
{
|
||||
CCompassTarget ct;
|
||||
|
|
|
@ -586,7 +586,7 @@ void CGroupEditBox::handleEventChar(const NLGUI::CEventDescriptorKey &rEDK)
|
|||
_CursorPos = 0;
|
||||
// loose the keyboard focus
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
if (im->getDbProp("UI:SAVE:CHAT:ENTER_DONT_QUIT_CB")->getValue32() == 0)
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHAT:ENTER_DONT_QUIT_CB")->getValue32() == 0)
|
||||
{
|
||||
if(_LooseFocusOnEnter)
|
||||
pIM->setCaptureKeyboard(NULL);
|
||||
|
|
|
@ -107,7 +107,7 @@ void CGroupHTMLForum::addHTTPPostParams (HTAssocList *formfields, bool /*trusted
|
|||
string CGroupHTMLForum::home ()
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
pIM->getDbProp("UI:VARIABLES:FORUM_UPDATED")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:FORUM_UPDATED")->setValue32(0);
|
||||
return Home;
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ void CGroupHTMLMail::addHTTPPostParams (HTAssocList *formfields, bool /*trustedD
|
|||
string CGroupHTMLMail::home ()
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
pIM->getDbProp("UI:VARIABLES:MAIL_WAITING")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:MAIL_WAITING")->setValue32(0);
|
||||
return Home;
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ void addWebIGParams (string &url, bool trustedDomain)
|
|||
// Target fields
|
||||
const char *dbPath = "UI:VARIABLES:TARGET:SLOT";
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *node = im->getDbProp(dbPath, false);
|
||||
CCDBNodeLeaf *node = NLGUI::CDBManager::getInstance()->getDbProp(dbPath, false);
|
||||
if (node && (uint8)node->getValue32() != (uint8) CLFECOMMON::INVALID_SLOT)
|
||||
{
|
||||
CEntityCL *target = EntitiesMngr.entity((uint) node->getValue32());
|
||||
|
@ -195,7 +195,7 @@ struct CWebigNotificationThread : public NLMISC::IRunnable
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
if(pIM)
|
||||
{
|
||||
CCDBNodeLeaf *_CheckMailNode = pIM->getDbProp("UI:VARIABLES:MAIL_WAITING");
|
||||
CCDBNodeLeaf *_CheckMailNode = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:MAIL_WAITING");
|
||||
if(_CheckMailNode)
|
||||
{
|
||||
_CheckMailNode->setValue32(nbmail==0?0:1);
|
||||
|
@ -222,7 +222,7 @@ struct CWebigNotificationThread : public NLMISC::IRunnable
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
if(pIM)
|
||||
{
|
||||
CCDBNodeLeaf *_CheckForumNode = pIM->getDbProp("UI:VARIABLES:FORUM_UPDATED");
|
||||
CCDBNodeLeaf *_CheckForumNode = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:FORUM_UPDATED");
|
||||
if(_CheckForumNode)
|
||||
{
|
||||
_CheckForumNode->setValue32(nbforum==0?0:1);
|
||||
|
|
|
@ -48,7 +48,7 @@ void contextHelp (const std::string &name)
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
// User want context help ?
|
||||
if ( (ClientCfg.Local || !IngameDbMngr.initInProgress()) && pIM->getDbProp("UI:SAVE:ENTITY:CONTEXT_HELP")->getValueBool())
|
||||
if ( (ClientCfg.Local || !IngameDbMngr.initInProgress()) && NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:ENTITY:CONTEXT_HELP")->getValueBool())
|
||||
{
|
||||
// Look for the context help
|
||||
uint index = 0;
|
||||
|
@ -519,7 +519,7 @@ void CGroupInSceneBubbleManager::addSkillPopup (uint skillId, sint delta, uint t
|
|||
pViewSkillName->setText (sSkillName);
|
||||
|
||||
// Skill value
|
||||
CCDBNodeLeaf *skillLeaf = pIM->getDbProp("SERVER:CHARACTER_INFO:SKILLS:"+toString(skillId)+":BaseSKILL", false);
|
||||
CCDBNodeLeaf *skillLeaf = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SKILLS:"+toString(skillId)+":BaseSKILL", false);
|
||||
if (skillLeaf)
|
||||
{
|
||||
pViewSkillName = dynamic_cast<CViewText*>(group->getView("lvl"));
|
||||
|
@ -831,11 +831,11 @@ void CGroupInSceneBubbleManager::chatOpen (uint32 nUID, const ucstring &ucsText,
|
|||
|
||||
bool show = false;
|
||||
if (pChar->isUser())
|
||||
show = pIM->getDbProp ("UI:SAVE:INSCENE:USER:MESSAGES")->getValueBool();
|
||||
show = NLGUI::CDBManager::getInstance()->getDbProp ("UI:SAVE:INSCENE:USER:MESSAGES")->getValueBool();
|
||||
else if (pChar->isFriend())
|
||||
show = pIM->getDbProp ("UI:SAVE:INSCENE:FRIEND:MESSAGES")->getValueBool();
|
||||
show = NLGUI::CDBManager::getInstance()->getDbProp ("UI:SAVE:INSCENE:FRIEND:MESSAGES")->getValueBool();
|
||||
else
|
||||
show = pIM->getDbProp ("UI:SAVE:INSCENE:ENEMY:MESSAGES")->getValueBool();
|
||||
show = NLGUI::CDBManager::getInstance()->getDbProp ("UI:SAVE:INSCENE:ENEMY:MESSAGES")->getValueBool();
|
||||
|
||||
if (show)
|
||||
{
|
||||
|
|
|
@ -130,7 +130,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
|
|||
bool needPvPLogo= false;
|
||||
bool permanentContent = false;
|
||||
bool rpTags = false;
|
||||
bool displayMissionIcons = pIM->getDbProp("UI:SAVE:INSCENE:FRIEND:MISSION_ICON")->getValueBool();
|
||||
bool displayMissionIcons = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:INSCENE:FRIEND:MISSION_ICON")->getValueBool();
|
||||
|
||||
// Names
|
||||
const char *templateName;
|
||||
|
@ -151,7 +151,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
|
|||
string dbEntry = "UI:SAVE:INSCENE:SOURCE:";
|
||||
CForageSourceCL *forageSource = static_cast<CForageSourceCL*>(entity);
|
||||
|
||||
name = !entityName.empty() /*&& pIM->getDbProp(dbEntry+"NAME")->getValueBool()*/;
|
||||
name = !entityName.empty() /*&& NLGUI::CDBManager::getInstance()->getDbProp(dbEntry+"NAME")->getValueBool()*/;
|
||||
symbol = (forageSource->getKnowledge() != 0);
|
||||
title = false;
|
||||
guildName = false;
|
||||
|
@ -159,7 +159,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
|
|||
forageSourceBarDisplayed = (entity->slot() == UserEntity->selection());
|
||||
bars[Time] = forageSourceBarDisplayed;
|
||||
bars[Amount] = forageSourceBarDisplayed;
|
||||
//bool displayExtractingParams = true; //forageSource->isExtractionInProgress() /*&& pIM->getDbProp(dbEntry+"HP")*/;
|
||||
//bool displayExtractingParams = true; //forageSource->isExtractionInProgress() /*&& NLGUI::CDBManager::getInstance()->getDbProp(dbEntry+"HP")*/;
|
||||
bars[Life] = forageSourceBarDisplayed;//displayExtractingParams;
|
||||
bars[Danger] = forageSourceBarDisplayed;//displayExtractingParams;
|
||||
bars[Spawn] = forageSourceBarDisplayed;//displayExtractingParams;
|
||||
|
@ -177,22 +177,22 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
|
|||
title= true;
|
||||
guildName= false;
|
||||
templateName = "in_scene_user_info";
|
||||
rpTags = (!entityTag1.empty() || !entityTag2.empty() || !entityTag3.empty() || !entityTag4.empty() ) && pIM->getDbProp(dbEntry+"RPTAGS")->getValueBool();
|
||||
rpTags = (!entityTag1.empty() || !entityTag2.empty() || !entityTag3.empty() || !entityTag4.empty() ) && NLGUI::CDBManager::getInstance()->getDbProp(dbEntry+"RPTAGS")->getValueBool();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Base entry in database
|
||||
string dbEntry;
|
||||
getBarSettings( pIM, user, entity->isPlayer(), _friend, dbEntry, bars );
|
||||
name = !entityName.empty() && pIM->getDbProp(dbEntry+"NAME")->getValueBool();
|
||||
title = !entityTitle.empty() && pIM->getDbProp(dbEntry+"TITLE")->getValueBool();
|
||||
rpTags = (!entityTag1.empty() || !entityTag2.empty() || !entityTag3.empty() || !entityTag4.empty() ) && pIM->getDbProp(dbEntry+"RPTAGS")->getValueBool();
|
||||
name = !entityName.empty() && NLGUI::CDBManager::getInstance()->getDbProp(dbEntry+"NAME")->getValueBool();
|
||||
title = !entityTitle.empty() && NLGUI::CDBManager::getInstance()->getDbProp(dbEntry+"TITLE")->getValueBool();
|
||||
rpTags = (!entityTag1.empty() || !entityTag2.empty() || !entityTag3.empty() || !entityTag4.empty() ) && NLGUI::CDBManager::getInstance()->getDbProp(dbEntry+"RPTAGS")->getValueBool();
|
||||
// if name is empty but not title, title is displayed as name
|
||||
if (!title && entityName.empty() && !entityTitle.empty() && pIM->getDbProp(dbEntry+"NAME")->getValueBool())
|
||||
if (!title && entityName.empty() && !entityTitle.empty() && NLGUI::CDBManager::getInstance()->getDbProp(dbEntry+"NAME")->getValueBool())
|
||||
title = true;
|
||||
templateName = "in_scene_user_info";
|
||||
// special guild
|
||||
if(pIM->getDbProp(dbEntry+"GUILD_SYMBOL")->getValueBool())
|
||||
if(NLGUI::CDBManager::getInstance()->getDbProp(dbEntry+"GUILD_SYMBOL")->getValueBool())
|
||||
{
|
||||
// if symbol not still available, wait for one when VP received
|
||||
symbol = (entity->getGuildSymbol() != 0);
|
||||
|
@ -203,7 +203,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
|
|||
symbol= false;
|
||||
needGuildSymbolId = false;
|
||||
}
|
||||
if(pIM->getDbProp(dbEntry+"GUILD_NAME")->getValueBool())
|
||||
if(NLGUI::CDBManager::getInstance()->getDbProp(dbEntry+"GUILD_NAME")->getValueBool())
|
||||
{
|
||||
// if guild name not still available, wait for one when VP received
|
||||
guildName = (entity->getGuildNameID() != 0);
|
||||
|
@ -214,7 +214,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
|
|||
guildName= false;
|
||||
needGuildNameId= false;
|
||||
}
|
||||
needPvPLogo = pIM->getDbProp(dbEntry+"PVP_LOGO")->getValueBool();
|
||||
needPvPLogo = NLGUI::CDBManager::getInstance()->getDbProp(dbEntry+"PVP_LOGO")->getValueBool();
|
||||
|
||||
eventFaction = (entity->getEventFactionID() != 0);
|
||||
}
|
||||
|
@ -537,7 +537,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
|
|||
string dbLeaf = "UI:ENTITY:GUILD:"+toString (entity->slot());
|
||||
sheet->setSheet(dbLeaf);
|
||||
|
||||
pIM->getDbProp(dbLeaf+":ICON")->setValue64(entity->getGuildSymbol());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(dbLeaf+":ICON")->setValue64(entity->getGuildSymbol());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -548,7 +548,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
|
|||
CViewBase * invisibleLogo = info->getView("invisible_logo");
|
||||
if (entity->isUser() && invisibleLogo)
|
||||
{
|
||||
bool invisible = pIM->getDbProp("SERVER:USER:IS_INVISIBLE")->getValueBool();
|
||||
bool invisible = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:IS_INVISIBLE")->getValueBool();
|
||||
invisibleLogo->setActive(invisible);
|
||||
}
|
||||
|
||||
|
@ -729,9 +729,9 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
|
|||
// Init user leaf nodes
|
||||
if (entity->isUser())
|
||||
{
|
||||
_Value = pIM->getDbProp ("UI:VARIABLES:CURRENT_SMOOTH_SERVER_TICK");
|
||||
_ValueBegin = pIM->getDbProp ("UI:VARIABLES:SMOOTH_USER_ACT_START");
|
||||
_ValueEnd = pIM->getDbProp ("UI:VARIABLES:SMOOTH_USER_ACT_END");
|
||||
_Value = NLGUI::CDBManager::getInstance()->getDbProp ("UI:VARIABLES:CURRENT_SMOOTH_SERVER_TICK");
|
||||
_ValueBegin = NLGUI::CDBManager::getInstance()->getDbProp ("UI:VARIABLES:SMOOTH_USER_ACT_START");
|
||||
_ValueEnd = NLGUI::CDBManager::getInstance()->getDbProp ("UI:VARIABLES:SMOOTH_USER_ACT_END");
|
||||
}
|
||||
|
||||
// Update data
|
||||
|
@ -806,11 +806,11 @@ void CGroupInSceneUserInfo::getBarSettings( CInterfaceManager* pIM, bool isUser,
|
|||
}
|
||||
else
|
||||
{
|
||||
bars[HP] = pIM->getDbProp(dbEntry+"HP")->getValueBool();
|
||||
bars[SAP] = (isUser || isFriend) && (isUser || isPlayer) && pIM->getDbProp(dbEntry+"SAP")->getValueBool();
|
||||
bars[STA] = (isUser || isFriend) && (isUser || isPlayer) && pIM->getDbProp(dbEntry+"STA")->getValueBool();
|
||||
bars[Focus] = (isUser || isFriend) && (isUser || isPlayer) && pIM->getDbProp(dbEntry+"FOCUS")->getValueBool();
|
||||
bars[Action] = (isUser) && pIM->getDbProp(dbEntry+"ACTION")->getValueBool();
|
||||
bars[HP] = NLGUI::CDBManager::getInstance()->getDbProp(dbEntry+"HP")->getValueBool();
|
||||
bars[SAP] = (isUser || isFriend) && (isUser || isPlayer) && NLGUI::CDBManager::getInstance()->getDbProp(dbEntry+"SAP")->getValueBool();
|
||||
bars[STA] = (isUser || isFriend) && (isUser || isPlayer) && NLGUI::CDBManager::getInstance()->getDbProp(dbEntry+"STA")->getValueBool();
|
||||
bars[Focus] = (isUser || isFriend) && (isUser || isPlayer) && NLGUI::CDBManager::getInstance()->getDbProp(dbEntry+"FOCUS")->getValueBool();
|
||||
bars[Action] = (isUser) && NLGUI::CDBManager::getInstance()->getDbProp(dbEntry+"ACTION")->getValueBool();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -934,7 +934,7 @@ void CGroupInSceneUserInfo::updateDynamicData ()
|
|||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
string dbLeaf = "UI:ENTITY:GUILD:"+toString (_Entity->slot())+":ICON";
|
||||
pIM->getDbProp(dbLeaf)->setValue64(_Entity->getGuildSymbol());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(dbLeaf)->setValue64(_Entity->getGuildSymbol());
|
||||
}
|
||||
|
||||
// Set the event faction
|
||||
|
|
|
@ -117,12 +117,12 @@ static void popupLandMarkNameDialog()
|
|||
|
||||
const CUserLandMark userLM = map->getUserLandMark(LastSelectedLandMark);
|
||||
|
||||
im->getDbProp( "UI:TEMP:LANDMARKTYPE" )->setValue8(userLM.Type);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( "UI:TEMP:LANDMARKTYPE" )->setValue8(userLM.Type);
|
||||
eb->setInputString(userLM.Title);
|
||||
}
|
||||
else
|
||||
{
|
||||
im->getDbProp( "UI:TEMP:LANDMARKTYPE" )->setValue8(CUserLandMark::Misc);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( "UI:TEMP:LANDMARKTYPE" )->setValue8(CUserLandMark::Misc);
|
||||
eb->setInputString(ucstring());
|
||||
}
|
||||
|
||||
|
@ -1060,9 +1060,9 @@ void CGroupMap::updateLMPosFromDBPos(CLandMarkButton *dest ,sint32 px, sint32 py
|
|||
static CSmartPtr<CNamedEntityPositionState> buildMissionPositionState(CInterfaceManager *im, const std::string &baseDBpath, uint missionIndex, uint targetIndex)
|
||||
{
|
||||
nlassert(im);
|
||||
CCDBNodeLeaf *name = im->getDbProp(baseDBpath + NLMISC::toString(":%d:TARGET%d:TITLE", (int) missionIndex, (int) targetIndex));
|
||||
CCDBNodeLeaf *x = im->getDbProp(baseDBpath + NLMISC::toString(":%d:TARGET%d:X", (int) missionIndex, (int) targetIndex));
|
||||
CCDBNodeLeaf *y = im->getDbProp(baseDBpath +NLMISC::toString(":%d:TARGET%d:Y", (int) missionIndex, (int) targetIndex));
|
||||
CCDBNodeLeaf *name = NLGUI::CDBManager::getInstance()->getDbProp(baseDBpath + NLMISC::toString(":%d:TARGET%d:TITLE", (int) missionIndex, (int) targetIndex));
|
||||
CCDBNodeLeaf *x = NLGUI::CDBManager::getInstance()->getDbProp(baseDBpath + NLMISC::toString(":%d:TARGET%d:X", (int) missionIndex, (int) targetIndex));
|
||||
CCDBNodeLeaf *y = NLGUI::CDBManager::getInstance()->getDbProp(baseDBpath +NLMISC::toString(":%d:TARGET%d:Y", (int) missionIndex, (int) targetIndex));
|
||||
CSmartPtr<CNamedEntityPositionState> ps = new CNamedEntityPositionState;
|
||||
ps->build(name, x, y);
|
||||
return ps;
|
||||
|
@ -1096,8 +1096,8 @@ void CGroupMap::checkCoords()
|
|||
}
|
||||
}
|
||||
// also fill ptr for special landmarks (target, home & respawn)
|
||||
_TargetPos = pIM->getDbProp(COMPASS_DB_PATH ":TARGET");
|
||||
_HomePos = pIM->getDbProp(COMPASS_DB_PATH ":HOME_POINT");
|
||||
_TargetPos = NLGUI::CDBManager::getInstance()->getDbProp(COMPASS_DB_PATH ":TARGET");
|
||||
_HomePos = NLGUI::CDBManager::getInstance()->getDbProp(COMPASS_DB_PATH ":HOME_POINT");
|
||||
}
|
||||
//
|
||||
// bool mustInvalidateCoords = false;
|
||||
|
@ -1218,9 +1218,9 @@ void CGroupMap::checkCoords()
|
|||
// Reset selection
|
||||
_RespawnSelected = 0;
|
||||
if (_MapMode == MapMode_Death)
|
||||
pIM->getDbProp("UI:SAVE:RESPAWN_PT")->setValue32(_RespawnSelected);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:RESPAWN_PT")->setValue32(_RespawnSelected);
|
||||
else if (_MapMode == MapMode_SpawnSquad)
|
||||
pIM->getDbProp("UI:TEMP:OUTPOST:SQUAD_RESPAWN_PT")->setValue32(_RespawnSelected);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:SQUAD_RESPAWN_PT")->setValue32(_RespawnSelected);
|
||||
if (_RespawnLM.size() > 0)
|
||||
_RespawnSelectedBitmap->setParentPos(_RespawnLM[_RespawnSelected]);
|
||||
}
|
||||
|
@ -1259,7 +1259,7 @@ void CGroupMap::checkCoords()
|
|||
_AnimalLM[i]->setActive(true);
|
||||
// update texture from animal status
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *statusNode = pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d", i) + ":STATUS", false);
|
||||
CCDBNodeLeaf *statusNode = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d", i) + ":STATUS", false);
|
||||
if (statusNode && ANIMAL_STATUS::isInStable((ANIMAL_STATUS::EAnimalStatus)statusNode->getValue32()) )
|
||||
{
|
||||
_AnimalLM[i]->setTexture(_AnimalStableLMOptions.LandMarkTexNormal);
|
||||
|
@ -1278,7 +1278,7 @@ void CGroupMap::checkCoords()
|
|||
|
||||
// update tooltip text
|
||||
ANIMAL_TYPE::EAnimalType at;
|
||||
at = (ANIMAL_TYPE::EAnimalType)pIM->getDbProp("SERVER:PACK_ANIMAL:BEAST"+toString(i)+":TYPE")->getValue32();
|
||||
at = (ANIMAL_TYPE::EAnimalType)NLGUI::CDBManager::getInstance()->getDbProp("SERVER:PACK_ANIMAL:BEAST"+toString(i)+":TYPE")->getValue32();
|
||||
string sPrefix;
|
||||
switch(at)
|
||||
{
|
||||
|
@ -1320,7 +1320,7 @@ void CGroupMap::checkCoords()
|
|||
if (_TeammatePosStates[i]->getPos(px, py))
|
||||
{
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
uint32 val = im->getDbProp(NLMISC::toString("SERVER:GROUP:%d:NAME",i))->getValue32();
|
||||
uint32 val = NLGUI::CDBManager::getInstance()->getDbProp(NLMISC::toString("SERVER:GROUP:%d:NAME",i))->getValue32();
|
||||
STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
|
||||
ucstring res;
|
||||
|
||||
|
@ -2873,10 +2873,10 @@ void CGroupMap::targetLandmark(CCtrlButton *lm)
|
|||
fromString(sTmp, _RespawnSelected);
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
if (_MapMode == MapMode_Death)
|
||||
pIM->getDbProp("UI:SAVE:RESPAWN_PT")->setValue32(_RespawnSelected);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:RESPAWN_PT")->setValue32(_RespawnSelected);
|
||||
else if (_MapMode == MapMode_SpawnSquad)
|
||||
{
|
||||
pIM->getDbProp("UI:TEMP:OUTPOST:SQUAD_RESPAWN_PT")->setValue32(_RespawnSelected);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:SQUAD_RESPAWN_PT")->setValue32(_RespawnSelected);
|
||||
// Close window containing the map
|
||||
CInterfaceGroup *pGrp = pIM->getWindow(this);
|
||||
if (pGrp != NULL) pGrp->setActive(false);
|
||||
|
@ -3086,9 +3086,9 @@ sint32 CGroupMap::getRespawnSelected() const
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *pNL = NULL;
|
||||
if (_MapMode == MapMode_Death)
|
||||
pNL = pIM->getDbProp("UI:SAVE:RESPAWN_PT",false);
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:RESPAWN_PT",false);
|
||||
else if (_MapMode == MapMode_SpawnSquad)
|
||||
pNL = pIM->getDbProp("UI:TEMP:OUTPOST:SQUAD_RESPAWN_PT",false);
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:SQUAD_RESPAWN_PT",false);
|
||||
if (pNL != NULL)
|
||||
return pNL->getValue32();
|
||||
return 0;
|
||||
|
@ -3103,9 +3103,9 @@ void CGroupMap::setRespawnSelected(sint32 nSpawnPointIndex)
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *pNL = NULL;
|
||||
if (_MapMode == MapMode_Death)
|
||||
pNL = pIM->getDbProp("UI:SAVE:RESPAWN_PT",false);
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:RESPAWN_PT",false);
|
||||
else if (_MapMode == MapMode_SpawnSquad)
|
||||
pNL = pIM->getDbProp("UI:TEMP:OUTPOST:SQUAD_RESPAWN_PT",false);
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:SQUAD_RESPAWN_PT",false);
|
||||
if (pNL != NULL)
|
||||
pNL->setValue32(nSpawnPointIndex);
|
||||
_RespawnSelected = nSpawnPointIndex;
|
||||
|
@ -3205,7 +3205,7 @@ class CAHValidateUserLandMarkName : public IActionHandler
|
|||
|
||||
|
||||
CUserLandMark::EUserLandMarkType landMarkType = CUserLandMark::Misc;
|
||||
sint8 nLandMarkType = im->getDbProp( "UI:TEMP:LANDMARKTYPE" )->getValue8();
|
||||
sint8 nLandMarkType = NLGUI::CDBManager::getInstance()->getDbProp( "UI:TEMP:LANDMARKTYPE" )->getValue8();
|
||||
if (nLandMarkType>=0 && nLandMarkType<=CUserLandMark::UserLandMarkTypeCount)
|
||||
{
|
||||
landMarkType = (CUserLandMark::EUserLandMarkType)nLandMarkType;
|
||||
|
@ -3382,14 +3382,14 @@ class CAHRespawnMapValid : public IActionHandler
|
|||
- the user cannot reswpan....
|
||||
Instead, I chose to hide the timer text in map.xml
|
||||
*/
|
||||
/*sint64 val = im->getDbProp("UI:VARIABLES:CURRENT_SERVER_TICK")->getValue64();
|
||||
im->getDbProp("UI:VARIABLES:RESPAWN:END_DATE")->setValue64(val+10*10);
|
||||
im->getDbProp("UI:VARIABLES:OPEN_RESPAWN_AT_TIME")->setValue64(0);
|
||||
/*sint64 val = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:CURRENT_SERVER_TICK")->getValue64();
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:RESPAWN:END_DATE")->setValue64(val+10*10);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:OPEN_RESPAWN_AT_TIME")->setValue64(0);
|
||||
// must hide the window which contains this map, not the map itself!!
|
||||
CInterfaceGroup *rootWindow= gm->getRootWindow();
|
||||
if(rootWindow) rootWindow->setActive(false);
|
||||
*/
|
||||
im->getDbProp("UI:VARIABLES:RESPAWN:MSG_SENT")->setValue64(1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:RESPAWN:MSG_SENT")->setValue64(1);
|
||||
}
|
||||
};
|
||||
REGISTER_ACTION_HANDLER(CAHRespawnMapValid, "respawn_map_valid");
|
||||
|
@ -3479,36 +3479,36 @@ class CUpdateLandMarksColor : public IActionHandler{public: virtual void execute
|
|||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Misc] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:MISC")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Tribe] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:TRIBE")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Bandit] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:BANDIT")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Citizen] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:CITIZEN")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Fauna] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:FAUNA")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::FaunaExcel] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:FAUNAEXCEL")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::FaunaSup] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:FAUNASUP")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Forage] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:FORAGE")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::ForageExcel] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:FORAGEEXCEL")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::ForageSup] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:FORAGESUP")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Sap] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:SAP")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Amber] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:AMBER")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Node] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:NODE")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Fiber] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:FIBER")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Bark] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:BARK")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Seed] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:SEED")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Shell] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:SHELL")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Resin] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:RESIN")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Wood] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:WOOD")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Oil] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:OIL")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Mission] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:MISSION")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Food] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:FOOD")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Construction] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:CONSTRUCTION")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Goo] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:GOO")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Insect] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:INSECT")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Kitin] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:KITIN")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Nocive] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:NOCIVE")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Preservative] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:PRESERVATIVE")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Passage] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:PASSAGE")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Teleporter] = pIM->getDbProp("UI:SAVE:LANDMARK:COLORS:TELEPORTER")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Misc] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:MISC")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Tribe] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:TRIBE")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Bandit] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:BANDIT")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Citizen] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:CITIZEN")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Fauna] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:FAUNA")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::FaunaExcel] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:FAUNAEXCEL")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::FaunaSup] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:FAUNASUP")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Forage] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:FORAGE")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::ForageExcel] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:FORAGEEXCEL")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::ForageSup] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:FORAGESUP")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Sap] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:SAP")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Amber] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:AMBER")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Node] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:NODE")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Fiber] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:FIBER")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Bark] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:BARK")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Seed] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:SEED")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Shell] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:SHELL")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Resin] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:RESIN")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Wood] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:WOOD")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Oil] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:OIL")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Mission] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:MISSION")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Food] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:FOOD")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Construction] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:CONSTRUCTION")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Goo] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:GOO")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Insect] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:INSECT")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Kitin] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:KITIN")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Nocive] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:NOCIVE")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Preservative] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:PRESERVATIVE")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Passage] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:PASSAGE")->getValueRGBA();
|
||||
CUserLandMark::_LandMarksColor[CUserLandMark::Teleporter] = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:LANDMARK:COLORS:TELEPORTER")->getValueRGBA();
|
||||
|
||||
|
||||
|
||||
|
@ -3531,7 +3531,7 @@ NLMISC_COMMAND( testMapHome, "Debug : test display of home on map", "" )
|
|||
{
|
||||
if (!args.empty()) return false;
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
im->getDbProp(COMPASS_DB_PATH ":HOME_POINT")->setValue64((((sint64) 4787 * 1000) << 32 )| (sint64) (uint32) ((sint64) -3661 * 1000));
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(COMPASS_DB_PATH ":HOME_POINT")->setValue64((((sint64) 4787 * 1000) << 32 )| (sint64) (uint32) ((sint64) -3661 * 1000));
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
|
@ -3539,7 +3539,7 @@ NLMISC_COMMAND( testMapRespawn, "Debug : test display of respawn point on map",
|
|||
{
|
||||
if (!args.empty()) return false;
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
im->getDbProp(COMPASS_DB_PATH ":BIND_POINT")->setValue64((((sint64) 4687 * 1000) << 32 )| (sint64) (uint32) ((sint64) -3561 * 1000));
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(COMPASS_DB_PATH ":BIND_POINT")->setValue64((((sint64) 4687 * 1000) << 32 )| (sint64) (uint32) ((sint64) -3561 * 1000));
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
|
@ -3574,7 +3574,7 @@ NLMISC_COMMAND( testRespawn, "Debug : test respawn map", "" )
|
|||
|
||||
/*
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
im->getDbProp(COMPASS_DB_PATH ":BIND_POINT")->setValue64((((sint64) 4687 * 1000) << 32 )| (sint64) (uint32) ((sint64) -3561 * 1000));
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(COMPASS_DB_PATH ":BIND_POINT")->setValue64((((sint64) 4687 * 1000) << 32 )| (sint64) (uint32) ((sint64) -3561 * 1000));
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ bool CGroupPhraseSkillFilter::parse (xmlNodePtr cur, CInterfaceGroup *parentGrou
|
|||
_BrickFamilyObs[k].Owner= this;
|
||||
_BrickFamilyObs[k].BrickFamily= (BRICK_FAMILIES::TBrickFamily)k;
|
||||
sTmp = string(DB_BRICKS)+":"+NLMISC::toString((sint32)k)+":BRICKS";
|
||||
pIM->addDBObserver (&(_BrickFamilyObs[k]), sTmp);
|
||||
NLGUI::CDBManager::getInstance()->getDB()->addObserver(&(_BrickFamilyObs[k]), ICDBNode::CTextId( sTmp ));
|
||||
}
|
||||
|
||||
_MustRebuild = true;
|
||||
|
|
|
@ -89,7 +89,7 @@ bool CGroupSkills::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|||
for (uint k = 0; k < SKILLS::NUM_SKILLS; ++k)
|
||||
{
|
||||
sTmp = string(DB_SKILLS)+":"+NLMISC::toString((sint32)k)+":BaseSKILL";
|
||||
pIM->addDBObserver (&_SkillsObs, sTmp);
|
||||
NLGUI::CDBManager::getInstance()->getDB()->addObserver (&_SkillsObs, ICDBNode::CTextId( sTmp ));
|
||||
}
|
||||
|
||||
_MustRebuild = true;
|
||||
|
@ -283,7 +283,7 @@ CGroupSkills::~CGroupSkills()
|
|||
for (uint k = 0; k < SKILLS::NUM_SKILLS; ++k)
|
||||
{
|
||||
sTmp = string(DB_SKILLS)+":"+NLMISC::toString((sint32)k)+":BaseSKILL";
|
||||
pIM->removeDBObserver (&_SkillsObs, sTmp);
|
||||
NLGUI::CDBManager::getInstance()->getDB()->removeObserver(&_SkillsObs, ICDBNode::CTextId( sTmp ) );
|
||||
}
|
||||
|
||||
// first remove any nodes from the tree group
|
||||
|
|
|
@ -163,7 +163,7 @@ void CGuildManager::sortGuildMembers(TSortOrder order)
|
|||
bool CGuildManager::isProxy()
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
return pIM->getDbProp("SERVER:GUILD:PROXY")->getValueBool();
|
||||
return NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:PROXY")->getValueBool();
|
||||
}
|
||||
|
||||
|
||||
|
@ -249,14 +249,14 @@ ucstring CGuildManager::getGuildName()
|
|||
uint64 CGuildManager::getMoney()
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
return pIM->getDbProp("SERVER:GUILD:INVENTORY:MONEY")->getValue64();
|
||||
return NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:INVENTORY:MONEY")->getValue64();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
uint64 CGuildManager::getXP()
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
return pIM->getDbProp("SERVER:GUILD:XP")->getValue64();
|
||||
return NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:XP")->getValue64();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -275,12 +275,12 @@ void CGuildManager::update()
|
|||
|
||||
// Guild stuff
|
||||
uint32 oldName = _Guild.NameID;
|
||||
_Guild.NameID = pIM->getDbProp("SERVER:GUILD:NAME")->getValue32();
|
||||
_Guild.NameID = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:NAME")->getValue32();
|
||||
_Guild.Name = "";
|
||||
_InGuild = (_Guild.NameID != 0);
|
||||
if (!_InGuild)
|
||||
closeAllInterfaces();
|
||||
_Guild.Icon = pIM->getDbProp("SERVER:GUILD:ICON")->getValue64();
|
||||
_Guild.Icon = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:ICON")->getValue64();
|
||||
_Guild.QuitGuildAvailable = true;
|
||||
|
||||
// Guild Members
|
||||
|
@ -292,15 +292,15 @@ void CGuildManager::update()
|
|||
_GuildMembers.clear();
|
||||
for (uint32 i = 0; i < MAX_GUILD_MEMBER; ++i)
|
||||
{
|
||||
sint32 name = pIM->getDbProp("SERVER:GUILD:MEMBERS:"+toString(i)+":NAME")->getValue32();
|
||||
sint32 name = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:MEMBERS:"+toString(i)+":NAME")->getValue32();
|
||||
if (name != 0)
|
||||
{
|
||||
SGuildMember gm;
|
||||
gm.NameID = name;
|
||||
gm.Index = i;
|
||||
gm.Grade = (EGSPD::CGuildGrade::TGuildGrade)(pIM->getDbProp("SERVER:GUILD:MEMBERS:"+toString(i)+":GRADE")->getValue32());
|
||||
gm.Online = (TCharConnectionState)(pIM->getDbProp("SERVER:GUILD:MEMBERS:"+toString(i)+":ONLINE")->getValue32());
|
||||
gm.EnterDate = pIM->getDbProp("SERVER:GUILD:MEMBERS:"+toString(i)+":ENTER_DATE")->getValue32();
|
||||
gm.Grade = (EGSPD::CGuildGrade::TGuildGrade)(NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:MEMBERS:"+toString(i)+":GRADE")->getValue32());
|
||||
gm.Online = (TCharConnectionState)(NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:MEMBERS:"+toString(i)+":ONLINE")->getValue32());
|
||||
gm.EnterDate = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:MEMBERS:"+toString(i)+":ENTER_DATE")->getValue32();
|
||||
_GuildMembers.push_back(gm);
|
||||
}
|
||||
}
|
||||
|
@ -358,7 +358,7 @@ void CGuildManager::update()
|
|||
// If all is valid no more need update and if guild is opened update the interface
|
||||
if (bAllValid)
|
||||
{
|
||||
CCDBNodeLeaf* node = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_ONLINE_OFFLINE_NOTIFICATIONS_CB", false);
|
||||
CCDBNodeLeaf* node = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_ONLINE_OFFLINE_NOTIFICATIONS_CB", false);
|
||||
if (node && node->getValueBool())
|
||||
{
|
||||
// See if we need to show any online/offline messages
|
||||
|
@ -420,7 +420,7 @@ void CGuildManager::update()
|
|||
}
|
||||
|
||||
// set this value in the database
|
||||
pIM->getDbProp("UI:VARIABLES:USER:GUILD_GRADE")->setValue32(_Grade);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:GUILD_GRADE")->setValue32(_Grade);
|
||||
|
||||
// update the guild display
|
||||
CGroupContainer *pGuild = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_GUILD));
|
||||
|
@ -511,37 +511,37 @@ NLMISC_COMMAND(testAscensorPage, "Temp : Simulate the server that fills the data
|
|||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
uint64 prop;
|
||||
//
|
||||
im->getDbProp("LOCAL:ASCENSOR:0:NAME")->setValue32(12);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:ASCENSOR:0:NAME")->setValue32(12);
|
||||
prop = CGuildManager::iconMake(1, 1, false, CRGBA(255, 255, 0), CRGBA(0, 255, 0));
|
||||
im->getDbProp("LOCAL:ASCENSOR:0:ICON")->setValue64(prop);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:ASCENSOR:0:ICON")->setValue64(prop);
|
||||
//
|
||||
im->getDbProp("LOCAL:ASCENSOR:1:NAME")->setValue32(12);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:ASCENSOR:1:NAME")->setValue32(12);
|
||||
prop = CGuildManager::iconMake(1, 2, false, CRGBA(0, 255, 255), CRGBA(255, 0, 255));
|
||||
im->getDbProp("LOCAL:ASCENSOR:1:ICON")->setValue64(prop);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:ASCENSOR:1:ICON")->setValue64(prop);
|
||||
//
|
||||
im->getDbProp("LOCAL:ASCENSOR:2:NAME")->setValue32(12);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:ASCENSOR:2:NAME")->setValue32(12);
|
||||
prop = CGuildManager::iconMake(2, 3, false, CRGBA(255, 0, 0), CRGBA(0, 255, 0));
|
||||
im->getDbProp("LOCAL:ASCENSOR:2:ICON")->setValue64(prop);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:ASCENSOR:2:ICON")->setValue64(prop);
|
||||
//
|
||||
im->getDbProp("LOCAL:ASCENSOR:3:NAME")->setValue32(12);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:ASCENSOR:3:NAME")->setValue32(12);
|
||||
prop = CGuildManager::iconMake(2, 4, false, CRGBA(255, 255, 0), CRGBA(0, 255, 255));
|
||||
im->getDbProp("LOCAL:ASCENSOR:3:ICON")->setValue64(prop);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:ASCENSOR:3:ICON")->setValue64(prop);
|
||||
//
|
||||
im->getDbProp("LOCAL:ASCENSOR:4:NAME")->setValue32(12);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:ASCENSOR:4:NAME")->setValue32(12);
|
||||
prop = CGuildManager::iconMake(3, 5, false, CRGBA(255, 255, 0), CRGBA(255, 0, 255));
|
||||
im->getDbProp("LOCAL:ASCENSOR:4:ICON")->setValue64(prop);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:ASCENSOR:4:ICON")->setValue64(prop);
|
||||
//
|
||||
im->getDbProp("LOCAL:ASCENSOR:5:NAME")->setValue32(12);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:ASCENSOR:5:NAME")->setValue32(12);
|
||||
prop = CGuildManager::iconMake(3, 6, false, CRGBA(0, 255, 255), CRGBA(255, 255, 0));
|
||||
im->getDbProp("LOCAL:ASCENSOR:5:ICON")->setValue64(prop);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:ASCENSOR:5:ICON")->setValue64(prop);
|
||||
//
|
||||
im->getDbProp("LOCAL:ASCENSOR:6:NAME")->setValue32(12);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:ASCENSOR:6:NAME")->setValue32(12);
|
||||
prop = CGuildManager::iconMake(4, 7, false, CRGBA(0, 255, 255), CRGBA(255, 0, 255));
|
||||
im->getDbProp("SERVER:ASCENSOR:6:ICON")->setValue64(prop);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:ASCENSOR:6:ICON")->setValue64(prop);
|
||||
//
|
||||
im->getDbProp("LOCAL:ASCENSOR:7:NAME")->setValue32(12);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:ASCENSOR:7:NAME")->setValue32(12);
|
||||
prop = CGuildManager::iconMake(4, 8, false, CRGBA(255, 0, 255), CRGBA(0, 255, 255));
|
||||
im->getDbProp("LOCAL:ASCENSOR:7:ICON")->setValue64(prop);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:ASCENSOR:7:ICON")->setValue64(prop);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -593,7 +593,7 @@ void CGuildManager::openGuildWindow()
|
|||
// CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
// // Open the guild window
|
||||
//
|
||||
// CCDBNodeLeaf *node= pIM->getDbProp("CLIENT:GUILD:HAVE_JOINED", false);
|
||||
// CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("CLIENT:GUILD:HAVE_JOINED", false);
|
||||
// if(node)
|
||||
// node->setValue64(1);
|
||||
//
|
||||
|
@ -672,14 +672,14 @@ void CGuildManager::initDBObservers()
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
// add an observer on the whole guild
|
||||
pIM->addBranchObserver( "SERVER:GUILD", &_DBObs );
|
||||
NLGUI::CDBManager::getInstance()->addBranchObserver( "SERVER:GUILD", &_DBObs );
|
||||
|
||||
// add an observer on members only => need to update all
|
||||
pIM->addBranchObserver("SERVER:GUILD:MEMBERS", &_DBObsMembers);
|
||||
NLGUI::CDBManager::getInstance()->addBranchObserver("SERVER:GUILD:MEMBERS", &_DBObsMembers);
|
||||
|
||||
// observer on ascencors
|
||||
Ascensors.setListType(CHugeListObs::Ascensor);
|
||||
pIM->addBranchObserver("SERVER:ASCENSOR", &Ascensors);
|
||||
NLGUI::CDBManager::getInstance()->addBranchObserver("SERVER:ASCENSOR", &Ascensors);
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -711,13 +711,13 @@ bool CDBGroupListAscensor::CSheetChildAscensor::isInvalidated(CDBGroupListSheetT
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
|
||||
|
||||
uint32 nameID = pIM->getDbProp("LOCAL:ASCENSOR:" + toString(Index) + ":NAME")->getValue32();
|
||||
uint32 nameID = NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:ASCENSOR:" + toString(Index) + ":NAME")->getValue32();
|
||||
ucstring name;
|
||||
if (nameID && pSMC->getDynString(nameID, name))
|
||||
{
|
||||
Text->setText(name);
|
||||
|
||||
uint64 icon = pIM->getDbProp("LOCAL:ASCENSOR:" + toString(Index) + ":ICON")->getValue64();
|
||||
uint64 icon = NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:ASCENSOR:" + toString(Index) + ":ICON")->getValue64();
|
||||
|
||||
// Slot setup
|
||||
if ((icon & UINT64_CONSTANT(0x8000000000000000)) != 0)
|
||||
|
@ -793,7 +793,7 @@ class CAHGuildSheetOpen : public IActionHandler
|
|||
// *** Update Members, if necessary
|
||||
if(updateMembers)
|
||||
{
|
||||
CGuildManager::TSortOrder order = (CGuildManager::TSortOrder)(pIM->getDbProp("UI:SAVE:GUILD_LIST:SORT_ORDER")->getValue32());
|
||||
CGuildManager::TSortOrder order = (CGuildManager::TSortOrder)(NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:GUILD_LIST:SORT_ORDER")->getValue32());
|
||||
// Sort the members in Guild Manager
|
||||
pGM->sortGuildMembers(order);
|
||||
|
||||
|
@ -1007,7 +1007,7 @@ static void sendMsgSetGrade(EGSPD::CGuildGrade::TGuildGrade Grade)
|
|||
out.serial(u16MemberNb);
|
||||
uint8 u8Grade = Grade;
|
||||
out.serial(u8Grade);
|
||||
uint8 u8Counter = (uint8)pIM->getDbProp("SERVER:GUILD:COUNTER")->getValue8();
|
||||
uint8 u8Counter = (uint8)NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:COUNTER")->getValue8();
|
||||
out.serial(u8Counter);
|
||||
NetMngr.push(out);
|
||||
//nlinfo("impulseCallBack : %s %d %d %d sent", message.c_str(), u16MemberNb, u8Grade, u8Counter);
|
||||
|
@ -1026,7 +1026,7 @@ public:
|
|||
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
||||
{
|
||||
CInterfaceManager* pIM= CInterfaceManager::getInstance();
|
||||
CGuildManager::TSortOrder order = (CGuildManager::TSortOrder)(pIM->getDbProp("UI:SAVE:GUILD_LIST:SORT_ORDER")->getValue32());
|
||||
CGuildManager::TSortOrder order = (CGuildManager::TSortOrder)(NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:GUILD_LIST:SORT_ORDER")->getValue32());
|
||||
|
||||
order = (CGuildManager::TSortOrder)(order + 1);
|
||||
if (order == CGuildManager::END_SORT_ORDER)
|
||||
|
@ -1034,7 +1034,7 @@ public:
|
|||
order = CGuildManager::START_SORT_ORDER;
|
||||
}
|
||||
|
||||
pIM->getDbProp("UI:SAVE:GUILD_LIST:SORT_ORDER")->setValue32((sint32)order);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:GUILD_LIST:SORT_ORDER")->setValue32((sint32)order);
|
||||
pIM->runActionHandler("guild_sheet_open", NULL, toString("update_members=1"));
|
||||
}
|
||||
};
|
||||
|
@ -1181,7 +1181,7 @@ class CAHGuildSheetKick : public IActionHandler
|
|||
{
|
||||
uint16 u16MemberNb = (uint16)rGuildMembers[MemberNb].Index;
|
||||
out.serial(u16MemberNb);
|
||||
uint8 u8Counter = (uint8)pIM->getDbProp("SERVER:GUILD:COUNTER")->getValue8();
|
||||
uint8 u8Counter = (uint8)NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:COUNTER")->getValue8();
|
||||
out.serial(u8Counter);
|
||||
NetMngr.push(out);
|
||||
//nlinfo("impulseCallBack : %s %d %d sent", message.c_str(), u16MemberNb, u8Counter);
|
||||
|
@ -1230,8 +1230,8 @@ class CHandlerInvGuildToBag : public IActionHandler
|
|||
if (!pCSDst->isSheetValid()) return;
|
||||
string sTmp = pCSDst->getSheet();
|
||||
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(sTmp+":SHEET",false);
|
||||
CCDBNodeLeaf *pNLquantity = pIM->getDbProp(sTmp+":QUANTITY",false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(sTmp+":SHEET",false);
|
||||
CCDBNodeLeaf *pNLquantity = NLGUI::CDBManager::getInstance()->getDbProp(sTmp+":QUANTITY",false);
|
||||
if (pNL == NULL) return;
|
||||
if (pNLquantity == NULL) return;
|
||||
|
||||
|
@ -1272,7 +1272,7 @@ class CHandlerInvGuildToBag : public IActionHandler
|
|||
|
||||
if (!bPlaceFound) return;
|
||||
|
||||
uint16 Session = pIM->getDbProp("SERVER:GUILD:INVENTORY:SESSION")->getValue16();
|
||||
uint16 Session = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:INVENTORY:SESSION")->getValue16();
|
||||
|
||||
CBitMemStream out;
|
||||
const string sMsg = "GUILD:GUILD_TO_BAG";
|
||||
|
@ -1307,7 +1307,7 @@ class CHandlerInvBagToGuild : public IActionHandler
|
|||
uint8 BagIndex;
|
||||
fromString(sTmp, BagIndex);
|
||||
|
||||
uint16 Session = pIM->getDbProp("SERVER:GUILD:INVENTORY:SESSION")->getValue16();
|
||||
uint16 Session = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:INVENTORY:SESSION")->getValue16();
|
||||
|
||||
CBitMemStream out;
|
||||
const string sMsg = "GUILD:BAG_TO_GUILD";
|
||||
|
@ -1332,8 +1332,8 @@ REGISTER_ACTION_HANDLER (CHandlerInvBagToGuild, "inv_bag_to_guild");
|
|||
static void sendMoneyServerMessage(const string &sMsg)
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
uint64 nMoney = pIM->getDbProp("UI:VARIABLES:CHOOSE_MONEY")->getValue64();
|
||||
uint16 Session = pIM->getDbProp("SERVER:GUILD:INVENTORY:SESSION")->getValue16();
|
||||
uint64 nMoney = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:CHOOSE_MONEY")->getValue64();
|
||||
uint16 Session = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:INVENTORY:SESSION")->getValue16();
|
||||
CBitMemStream out;
|
||||
if (!GenericMsgHeaderMngr.pushNameToStream(sMsg, out))
|
||||
{
|
||||
|
|
|
@ -706,7 +706,7 @@ void CInterfaceConfig::dataBaseToStream (NLMISC::IStream &f)
|
|||
|
||||
// Save branch of the database
|
||||
SDBLeaf leafTmp;
|
||||
CCDBNodeBranch *pDB = pIM->getDbBranch ("UI:SAVE");
|
||||
CCDBNodeBranch *pDB = NLGUI::CDBManager::getInstance()->getDbBranch ("UI:SAVE");
|
||||
if (pDB != NULL)
|
||||
{
|
||||
// Number of leaf to save
|
||||
|
@ -742,7 +742,7 @@ void CInterfaceConfig::streamToDataBase (NLMISC::IStream &f, uint32 uiDbSaveVers
|
|||
|
||||
// Load branch of the database
|
||||
SDBLeaf leafTmp;
|
||||
CCDBNodeBranch *pDB = pIM->getDbBranch ("UI:SAVE");
|
||||
CCDBNodeBranch *pDB = NLGUI::CDBManager::getInstance()->getDbBranch ("UI:SAVE");
|
||||
if (pDB != NULL)
|
||||
{
|
||||
// Number of leaf to save
|
||||
|
@ -776,7 +776,7 @@ void CInterfaceConfig::streamToDataBase (NLMISC::IStream &f, uint32 uiDbSaveVers
|
|||
// if want read the value from file, read it, else keep the default one
|
||||
if(wantRead)
|
||||
{
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(leafTmp.Name,false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(leafTmp.Name,false);
|
||||
if (pNL != NULL)
|
||||
leafTmp.setTo(pNL);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ void CInterfaceDDX::CParam::DBToWidget()
|
|||
if (Widget == ColorButton)
|
||||
{
|
||||
CRGBA col = CRGBA::White;
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(Link,false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(Link,false);
|
||||
if (pNL != NULL)
|
||||
{
|
||||
uint32 intCol = (uint32)pNL->getValue32();
|
||||
|
@ -64,7 +64,7 @@ void CInterfaceDDX::CParam::DBToWidget()
|
|||
else if (Widget == BoolButton)
|
||||
{
|
||||
bool bVal = 0;
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(Link,false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(Link,false);
|
||||
if (pNL != NULL)
|
||||
{
|
||||
bVal = pNL->getValue32()==0?false:true;
|
||||
|
@ -78,7 +78,7 @@ void CInterfaceDDX::CParam::DBToWidget()
|
|||
else if (Widget == ScrollBarInt)
|
||||
{
|
||||
sint32 nVal = 0;
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(Link,false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(Link,false);
|
||||
if (pNL != NULL)
|
||||
{
|
||||
nVal = pNL->getValue32();
|
||||
|
@ -154,7 +154,7 @@ void CInterfaceDDX::CParam::WidgetToDB()
|
|||
CCtrlBaseButton *pBut = dynamic_cast<CCtrlBaseButton*>(Elt.getPtr());
|
||||
if (pBut != NULL)
|
||||
col = pBut->getColor();
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(Link,false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(Link,false);
|
||||
if (pNL != NULL)
|
||||
pNL->setValue32(col.R+(col.G<<8)+(col.B<<16)+(col.A<<24));
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ void CInterfaceDDX::CParam::WidgetToDB()
|
|||
CCtrlBaseButton *pBut = dynamic_cast<CCtrlBaseButton*>(Elt.getPtr());
|
||||
if (pBut != NULL)
|
||||
bVal = pBut->getPushed();
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(Link,false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(Link,false);
|
||||
if (pNL != NULL)
|
||||
{
|
||||
pNL->setValue32(bVal?1:0);
|
||||
|
@ -180,7 +180,7 @@ void CInterfaceDDX::CParam::WidgetToDB()
|
|||
CCtrlScroll *pCS = dynamic_cast<CCtrlScroll*>(Elt.getPtr());
|
||||
if (pCS != NULL)
|
||||
nVal = pCS->getValue();
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(Link,false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(Link,false);
|
||||
if (pNL != NULL)
|
||||
pNL->setValue32(nVal);
|
||||
}
|
||||
|
@ -251,7 +251,7 @@ void CInterfaceDDX::CParam::backupDB()
|
|||
if (Widget == ColorButton)
|
||||
{
|
||||
CRGBA col = CRGBA::White;
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(Link,false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(Link,false);
|
||||
if (pNL != NULL)
|
||||
{
|
||||
uint32 intCol = (uint32)pNL->getValue32();
|
||||
|
@ -261,7 +261,7 @@ void CInterfaceDDX::CParam::backupDB()
|
|||
else if (Widget == ScrollBarInt)
|
||||
{
|
||||
sint32 nVal = 0;
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(Link,false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(Link,false);
|
||||
if (pNL != NULL)
|
||||
{
|
||||
nVal = pNL->getValue32();
|
||||
|
@ -305,7 +305,7 @@ void CInterfaceDDX::CParam::restoreDB()
|
|||
|
||||
if (Widget == ColorButton)
|
||||
{
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(Link,false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(Link,false);
|
||||
if (pNL != NULL)
|
||||
pNL->setValue32(RTBackupValue);
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ void CInterfaceDDX::CParam::restoreDB()
|
|||
}
|
||||
else if (Widget == ScrollBarInt)
|
||||
{
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(Link,false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(Link,false);
|
||||
if (pNL != NULL)
|
||||
pNL->setValue32(RTBackupValue);
|
||||
}
|
||||
|
@ -606,7 +606,7 @@ bool CInterfaceDDX::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|||
CXMLAutoPtr ptrPreset((const char*)xmlGetProp (cur, (xmlChar*)"preset"));
|
||||
if(ptrPreset)
|
||||
{
|
||||
p.PresetDB = pIM->getDbProp((const char*)ptrPreset, false);
|
||||
p.PresetDB = NLGUI::CDBManager::getInstance()->getDbProp((const char*)ptrPreset, false);
|
||||
if(p.PresetDB)
|
||||
{
|
||||
// if not exist in the set, add it and register callback
|
||||
|
@ -791,7 +791,7 @@ void CInterfaceDDX::updateRealtime(CCtrlBase *pSB, bool updateOnScrollEnd)
|
|||
}
|
||||
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
|
||||
for (i = 0; i < _Parameters.size(); ++i)
|
||||
{
|
||||
|
|
|
@ -531,7 +531,7 @@ void CInterfaceElement::relativeSInt64Read (CInterfaceProperty &rIP, const strin
|
|||
sint32 decal = 0;
|
||||
if (val[0] == ':')
|
||||
decal = 1;
|
||||
if (pIM->getDbProp(val+decal, false) != NULL)
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp(val+decal, false) != NULL)
|
||||
{
|
||||
rIP.readSInt64 (val+decal, _Id+":"+prop);
|
||||
return;
|
||||
|
@ -544,7 +544,7 @@ void CInterfaceElement::relativeSInt64Read (CInterfaceProperty &rIP, const strin
|
|||
while (pIEL != NULL)
|
||||
{
|
||||
sTmp = pIEL->getId()+":"+string(val+decal);
|
||||
if (CInterfaceManager::getInstance()->getDbProp(sTmp, false) != NULL)
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp(sTmp, false) != NULL)
|
||||
{
|
||||
rIP.readSInt64 (sTmp.c_str(), _Id+":"+prop);
|
||||
return;
|
||||
|
@ -578,7 +578,7 @@ void CInterfaceElement::relativeSInt32Read (CInterfaceProperty &rIP, const strin
|
|||
sint32 decal = 0;
|
||||
if (val[0] == ':')
|
||||
decal = 1;
|
||||
if (pIM->getDbProp(val+decal, false) != NULL)
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp(val+decal, false) != NULL)
|
||||
{
|
||||
rIP.readSInt32 (val+decal, _Id+":"+prop);
|
||||
return;
|
||||
|
@ -591,7 +591,7 @@ void CInterfaceElement::relativeSInt32Read (CInterfaceProperty &rIP, const strin
|
|||
while (pIEL != NULL)
|
||||
{
|
||||
sTmp = pIEL->getId()+":"+string(val+decal);
|
||||
if (CInterfaceManager::getInstance()->getDbProp(sTmp, false) != NULL)
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp(sTmp, false) != NULL)
|
||||
{
|
||||
rIP.readSInt32 (sTmp.c_str(), _Id+":"+prop);
|
||||
return;
|
||||
|
@ -619,7 +619,7 @@ void CInterfaceElement::relativeBoolRead (CInterfaceProperty &rIP, const string
|
|||
sint32 decal = 0;
|
||||
if (val[0] == ':')
|
||||
decal = 1;
|
||||
if (pIM->getDbProp(val+decal, false) != NULL)
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp(val+decal, false) != NULL)
|
||||
{
|
||||
rIP.readBool (val+decal, _Id+":"+prop);
|
||||
return;
|
||||
|
@ -632,7 +632,7 @@ void CInterfaceElement::relativeBoolRead (CInterfaceProperty &rIP, const string
|
|||
while (pIEL != NULL)
|
||||
{
|
||||
sTmp = pIEL->getId()+":"+string(val+decal);
|
||||
if (CInterfaceManager::getInstance()->getDbProp(sTmp, false) != NULL)
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp(sTmp, false) != NULL)
|
||||
{
|
||||
rIP.readBool (sTmp.c_str(), _Id+":"+prop);
|
||||
return;
|
||||
|
@ -665,7 +665,7 @@ void CInterfaceElement::relativeRGBARead(CInterfaceProperty &rIP,const std::stri
|
|||
sint32 decal = 0;
|
||||
if (val[0] == ':')
|
||||
decal = 1;
|
||||
if (pIM->getDbProp(val+decal, false) != NULL)
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp(val+decal, false) != NULL)
|
||||
{
|
||||
rIP.readRGBA (val+decal, _Id+":"+prop);
|
||||
return;
|
||||
|
@ -678,7 +678,7 @@ void CInterfaceElement::relativeRGBARead(CInterfaceProperty &rIP,const std::stri
|
|||
while (pIEL != NULL)
|
||||
{
|
||||
sTmp = pIEL->getId()+":"+string(val+decal);
|
||||
if (CInterfaceManager::getInstance()->getDbProp(sTmp, false) != NULL)
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp(sTmp, false) != NULL)
|
||||
{
|
||||
rIP.readRGBA (sTmp.c_str(), _Id+":"+prop);
|
||||
return;
|
||||
|
|
|
@ -300,9 +300,9 @@ const char *CInterfaceExpr::evalDBEntry(const char *expr, CInterfaceExprValue &r
|
|||
expr = unpackDBentry(expr, nodes, dbEntry);
|
||||
if (!expr) return NULL;
|
||||
// TestYoyo
|
||||
//nlassert(CInterfaceManager::getInstance()->getDbProp(dbEntry, false) || CInterfaceManager::getInstance()->getDbBranch(dbEntry));
|
||||
//nlassert(NLGUI::CDBManager::getInstance()->getDbProp(dbEntry, false) || CInterfaceManager::getInstance()->getDbBranch(dbEntry));
|
||||
// get the db value
|
||||
CCDBNodeLeaf *nl = CInterfaceManager::getInstance()->getDbProp(dbEntry);
|
||||
CCDBNodeLeaf *nl = NLGUI::CDBManager::getInstance()->getDbProp(dbEntry);
|
||||
if (nl)
|
||||
{
|
||||
if (nodes)
|
||||
|
@ -318,7 +318,7 @@ const char *CInterfaceExpr::evalDBEntry(const char *expr, CInterfaceExprValue &r
|
|||
}
|
||||
else
|
||||
{
|
||||
CCDBNodeBranch *nb = CInterfaceManager::getInstance()->getDbBranch(dbEntry);
|
||||
CCDBNodeBranch *nb = NLGUI::CDBManager::getInstance()->getDbBranch(dbEntry);
|
||||
if (nodes && nb)
|
||||
{
|
||||
if (std::find(nodes->begin(), nodes->end(), nb) == nodes->end())
|
||||
|
@ -354,8 +354,8 @@ const char *CInterfaceExpr::buildDBEntryNode(const char *expr, CInterfaceExprNod
|
|||
else
|
||||
{
|
||||
// TestYoyo
|
||||
//nlassert(CInterfaceManager::getInstance()->getDbProp(dbEntry, false) || CInterfaceManager::getInstance()->getDbBranch(dbEntry));
|
||||
CCDBNodeLeaf *nl = CInterfaceManager::getInstance()->getDbProp(dbEntry);
|
||||
//nlassert(NLGUI::CDBManager::getInstance()->getDbProp(dbEntry, false) || CInterfaceManager::getInstance()->getDbBranch(dbEntry));
|
||||
CCDBNodeLeaf *nl = NLGUI::CDBManager::getInstance()->getDbProp(dbEntry);
|
||||
if (nl)
|
||||
{
|
||||
CInterfaceExprNodeDBLeaf *node = new CInterfaceExprNodeDBLeaf;
|
||||
|
@ -365,7 +365,7 @@ const char *CInterfaceExpr::buildDBEntryNode(const char *expr, CInterfaceExprNod
|
|||
}
|
||||
else
|
||||
{
|
||||
CCDBNodeBranch *nb = CInterfaceManager::getInstance()->getDbBranch(dbEntry);
|
||||
CCDBNodeBranch *nb = NLGUI::CDBManager::getInstance()->getDbBranch(dbEntry);
|
||||
if (nb)
|
||||
{
|
||||
CInterfaceExprNodeDBBranch *node = new CInterfaceExprNodeDBBranch;
|
||||
|
@ -418,8 +418,8 @@ const char *CInterfaceExpr::unpackDBentry(const char *expr, std::vector<ICDBNode
|
|||
++ expr;
|
||||
// get the db value at sub entry
|
||||
// TestYoyo
|
||||
//nlassert(CInterfaceManager::getInstance()->getDbProp(subEntry, false) || CInterfaceManager::getInstance()->getDbBranch(subEntry));
|
||||
CCDBNodeLeaf *nl = CInterfaceManager::getInstance()->getDbProp(subEntry);
|
||||
//nlassert(NLGUI::CDBManager::getInstance()->getDbProp(subEntry, false) || CInterfaceManager::getInstance()->getDbBranch(subEntry));
|
||||
CCDBNodeLeaf *nl = NLGUI::CDBManager::getInstance()->getDbProp(subEntry);
|
||||
if (nodes)
|
||||
{
|
||||
if (std::find(nodes->begin(), nodes->end(), nl) == nodes->end())
|
||||
|
|
|
@ -717,8 +717,8 @@ static DECLARE_INTERFACE_USER_FCT(userDBCount)
|
|||
while (!bExit)
|
||||
{
|
||||
sTmp = sFirstPart + NLMISC::toString(i) + sSecondPart;
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(sTmp,false);
|
||||
CCDBNodeBranch *pNB = pIM->getDbBranch(sTmp);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(sTmp,false);
|
||||
CCDBNodeBranch *pNB = NLGUI::CDBManager::getInstance()->getDbBranch(sTmp);
|
||||
if (pNL != NULL)
|
||||
{
|
||||
if (pNL->getValue64() == 0)
|
||||
|
@ -1160,7 +1160,7 @@ static DECLARE_INTERFACE_USER_FCT(oldvalue)
|
|||
nlwarning("oldvalue : 1 arg required");
|
||||
return false;
|
||||
}
|
||||
CCDBNodeLeaf *nl = CInterfaceManager::getInstance()->getDbProp(args[0].getString());
|
||||
CCDBNodeLeaf *nl = NLGUI::CDBManager::getInstance()->getDbProp(args[0].getString());
|
||||
if (!nl)
|
||||
{
|
||||
nlwarning("oldvalue : arg 0 required to be an interface leaf");
|
||||
|
|
|
@ -772,7 +772,7 @@ static DECLARE_INTERFACE_USER_FCT(isUserEntityDead)
|
|||
|
||||
// Get the Visual Property for mode
|
||||
string dbName= toString("SERVER:Entities:E0:P%d", CLFECOMMON::PROPERTY_MODE );
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(dbName, false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(dbName, false);
|
||||
if(node)
|
||||
{
|
||||
result.setBool( node->getValue64()== MBEHAV::DEATH );
|
||||
|
|
|
@ -542,7 +542,7 @@ static DECLARE_INTERFACE_USER_FCT(isRoomLeftFor)
|
|||
// see if there is room in the bags
|
||||
// get the number of bags
|
||||
std::string nbBagPath = im->getDefine("bag_nb");
|
||||
CCDBNodeLeaf *prop = im->getDbProp(nbBagPath);
|
||||
CCDBNodeLeaf *prop = NLGUI::CDBManager::getInstance()->getDbProp(nbBagPath);
|
||||
if (!prop) return false;
|
||||
uint nbItemInBags = 8 * (uint) prop->getValue32(); // there are 8 item per bag
|
||||
std::string bagsPath = im->getDefine("bag");
|
||||
|
@ -551,7 +551,7 @@ static DECLARE_INTERFACE_USER_FCT(isRoomLeftFor)
|
|||
for(k = 0; k < nbItemInBags; ++k)
|
||||
{
|
||||
std::string bagPath = bagsPath + ":" + toString(k) + ":SHEET";
|
||||
CCDBNodeLeaf *bagProp = im->getDbProp(bagPath);
|
||||
CCDBNodeLeaf *bagProp = NLGUI::CDBManager::getInstance()->getDbProp(bagPath);
|
||||
if (!bagProp) return false;
|
||||
if (bagProp->getValue32() == 0)
|
||||
{
|
||||
|
@ -583,7 +583,7 @@ static DECLARE_INTERFACE_USER_FCT(isRoomLeftFor)
|
|||
{
|
||||
std::string dbPath = im->getDefine(armourInfos[k].DefineName);
|
||||
if (dbPath.empty()) return false;
|
||||
CCDBNodeLeaf *armorProp = im->getDbProp(dbPath + ":SHEET");
|
||||
CCDBNodeLeaf *armorProp = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + ":SHEET");
|
||||
if (!armorProp) return false;
|
||||
if (armorProp->getValue32() == 0)
|
||||
{
|
||||
|
@ -685,7 +685,7 @@ static double getItemsWeight(CCDBNodeBranch *branch, uint16 startItemIndex, uint
|
|||
static double getItemsWeight(const std::string &basePath, uint16 startItemIndex, uint16 numItems)
|
||||
{
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
CCDBNodeBranch *branch = im->getDbBranch(basePath);
|
||||
CCDBNodeBranch *branch = NLGUI::CDBManager::getInstance()->getDbBranch(basePath);
|
||||
if (!branch)
|
||||
{
|
||||
nlwarning("<getItemsWeight> Branch is NULL");
|
||||
|
@ -727,7 +727,7 @@ static double getItemBranchsWeight(const std::string &basePath, uint startBranch
|
|||
for(uint branchIndex = startBranchIndex; branchIndex < startBranchIndex + numBranchs; ++branchIndex)
|
||||
{
|
||||
std::string branchName = toString("%s:%d", basePath.c_str(), branchIndex);
|
||||
CCDBNodeBranch *currBranch = im->getDbBranch(branchName);
|
||||
CCDBNodeBranch *currBranch = NLGUI::CDBManager::getInstance()->getDbBranch(branchName);
|
||||
if (!currBranch)
|
||||
{
|
||||
nlwarning("<getItemBranchsWeight> can't get branch %s:%d, or this is a leaf", basePath.c_str(), branchIndex);
|
||||
|
@ -786,7 +786,7 @@ static double getWeightOfEquipmentPieces(const SLOT_EQUIPMENT::TSlotEquipment *
|
|||
for(uint k = 0; k < numSlots; ++k)
|
||||
{
|
||||
std::string dbPath = NLMISC::toString("LOCAL:INVENTORY:8:%d:SHEET", (int) slots[k]);
|
||||
uint32 sheetID = im->getDbProp(dbPath)->getValue32();
|
||||
uint32 sheetID = NLGUI::CDBManager::getInstance()->getDbProp(dbPath)->getValue32();
|
||||
if (sheetID)
|
||||
{
|
||||
CEntitySheet *es = SheetMngr.get(CSheetId(sheetID));
|
||||
|
@ -862,7 +862,7 @@ REGISTER_INTERFACE_USER_FCT("getJewelryWeight", getJewelryWeightUserFct)
|
|||
static double getSheathsWeight()
|
||||
{
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
uint numSheaths = (uint) im->getDbProp("LOCAL:INVENTORY:NB_SHEATH")->getValue32();
|
||||
uint numSheaths = (uint) NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:NB_SHEATH")->getValue32();
|
||||
return getItemBranchsWeight("LOCAL:INVENTORY", 1, numSheaths);
|
||||
}
|
||||
|
||||
|
@ -883,7 +883,7 @@ REGISTER_INTERFACE_USER_FCT("getSheathsWeight", getSheathsWeightUserFct)
|
|||
static double getBagsWeight()
|
||||
{
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
uint numBags = (uint) im->getDbProp("LOCAL:INVENTORY:NB_BAG")->getValue32();
|
||||
uint numBags = (uint) NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:NB_BAG")->getValue32();
|
||||
return getItemsWeight("LOCAL:INVENTORY:9", 0, 8 * numBags);
|
||||
}
|
||||
|
||||
|
@ -913,7 +913,7 @@ static DECLARE_INTERFACE_USER_FCT(getBranchSheetCategory)
|
|||
return false;
|
||||
}
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
CCDBNodeBranch *branch = im->getDbBranch(args[0].getString());
|
||||
CCDBNodeBranch *branch = NLGUI::CDBManager::getInstance()->getDbBranch(args[0].getString());
|
||||
if (!branch)
|
||||
{
|
||||
nlwarning("<getBranchSheetCategory> Branch is NULL");
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "interface_manager.h"
|
||||
#include "interface_expr_node.h"
|
||||
#include "nel/gui/reflect.h"
|
||||
#include "nel/gui/db_manager.h"
|
||||
#include "nel/misc/cdb_branch.h"
|
||||
|
||||
using namespace std;
|
||||
|
@ -132,7 +133,7 @@ static bool affect(const CInterfaceExprValue &value, CInterfaceElement &destElem
|
|||
|
||||
CInterfaceLink::CInterfaceLinkUpdater::CInterfaceLinkUpdater()
|
||||
{
|
||||
CInterfaceManager::getInstance()->addFlushObserver( this );
|
||||
NLGUI::CDBManager::getInstance()->addFlushObserver( this );
|
||||
}
|
||||
|
||||
CInterfaceLink::CInterfaceLinkUpdater::~CInterfaceLinkUpdater()
|
||||
|
@ -275,7 +276,7 @@ void CInterfaceLink::createObservers(const TNodeVect &nodes)
|
|||
else
|
||||
{
|
||||
CCDBNodeBranch *br = static_cast<CCDBNodeBranch *>(*it);
|
||||
CInterfaceManager::getInstance()->addBranchObserver( br, this );
|
||||
NLGUI::CDBManager::getInstance()->addBranchObserver( br, this );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -293,7 +294,7 @@ void CInterfaceLink::removeObservers(const TNodeVect &nodes)
|
|||
else
|
||||
{
|
||||
CCDBNodeBranch *br = static_cast<CCDBNodeBranch *>(*it);
|
||||
CInterfaceManager::getInstance()->removeBranchObserver( br, this );
|
||||
NLGUI::CDBManager::getInstance()->removeBranchObserver( br, this );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -259,12 +259,12 @@ int CInterfaceManager::DebugTrackGroupsGetId( CInterfaceGroup *pIG )
|
|||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
CInterfaceManager::CInterfaceManager( NL3D::UDriver *driver, NL3D::UTextContext *textcontext ) :
|
||||
_ViewRenderer( driver, textcontext ),
|
||||
NLMISC::CCDBManager( "ROOT", NB_CDB_BANKS )
|
||||
_ViewRenderer( driver, textcontext )
|
||||
{
|
||||
this->driver = driver;
|
||||
this->textcontext = textcontext;
|
||||
_Instance = this;
|
||||
NLGUI::CDBManager::getInstance()->resizeBanks( NB_CDB_BANKS );
|
||||
interfaceLinkUpdater = new CInterfaceLink::CInterfaceLinkUpdater();
|
||||
_ScreenW = _ScreenH = 0;
|
||||
_LastInGameScreenW = _LastInGameScreenH = 0;
|
||||
|
@ -363,13 +363,6 @@ CInterfaceManager::~CInterfaceManager()
|
|||
_Templates.clear();
|
||||
_Instance = NULL;
|
||||
|
||||
if (_Database)
|
||||
{
|
||||
_Database->clear();
|
||||
delete _Database;
|
||||
_Database = NULL;
|
||||
}
|
||||
|
||||
// release the local string mapper
|
||||
delete _UIStringMapper;
|
||||
_UIStringMapper = NULL;
|
||||
|
@ -377,9 +370,11 @@ CInterfaceManager::~CInterfaceManager()
|
|||
// release the database observers
|
||||
releaseServerToLocalAutoCopyObservers();
|
||||
|
||||
/*
|
||||
removeFlushObserver( interfaceLinkUpdater );
|
||||
delete interfaceLinkUpdater;
|
||||
interfaceLinkUpdater = NULL;
|
||||
*/
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
@ -515,7 +510,7 @@ void CInterfaceManager::uninitLogin()
|
|||
CInterfaceLink::removeAllLinks();
|
||||
|
||||
ICDBNode::CTextId textId("UI");
|
||||
_Database->removeNode(textId);
|
||||
NLGUI::CDBManager::getInstance()->getDB()->removeNode(textId);
|
||||
|
||||
{
|
||||
uninitActions();
|
||||
|
@ -640,7 +635,7 @@ void CInterfaceManager::uninitOutGame()
|
|||
//nlinfo ("%d seconds for removeAllLinks", (uint32)(ryzomGetLocalTime ()-initStart)/1000);
|
||||
initStart = ryzomGetLocalTime ();
|
||||
ICDBNode::CTextId textId("UI");
|
||||
_Database->removeNode(textId);
|
||||
NLGUI::CDBManager::getInstance()->getDB()->removeNode(textId);
|
||||
//nlinfo ("%d seconds for removeNode", (uint32)(ryzomGetLocalTime ()-initStart)/1000);
|
||||
|
||||
// Init the action manager
|
||||
|
@ -800,8 +795,8 @@ void CInterfaceManager::initInGame()
|
|||
activateMasterGroup ("ui:interface", true);
|
||||
|
||||
// Update the time in the ui database
|
||||
_CheckMailNode = getDbProp("UI:VARIABLES:MAIL_WAITING");
|
||||
_CheckForumNode = getDbProp("UI:VARIABLES:FORUM_UPDATED");
|
||||
_CheckMailNode = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:MAIL_WAITING");
|
||||
_CheckForumNode = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:FORUM_UPDATED");
|
||||
|
||||
// Init the action manager
|
||||
{
|
||||
|
@ -842,7 +837,7 @@ void CInterfaceManager::initInGame()
|
|||
gc->setTarget(gc->getSavedTarget());
|
||||
}
|
||||
|
||||
CCDBNodeLeaf *node = getDbProp("UI:SAVE:CHATLOG_STATE", false);
|
||||
CCDBNodeLeaf *node = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHATLOG_STATE", false);
|
||||
if (node)
|
||||
{
|
||||
_LogState = (node->getValue32() != 0);
|
||||
|
@ -1174,7 +1169,7 @@ void CInterfaceManager::uninitInGame1 ()
|
|||
|
||||
// remove DB entry
|
||||
ICDBNode::CTextId textId("UI");
|
||||
_Database->removeNode(textId);
|
||||
NLGUI::CDBManager::getInstance()->getDB()->removeNode(textId);
|
||||
|
||||
// Uninit the action manager
|
||||
{
|
||||
|
@ -1251,7 +1246,7 @@ void CInterfaceManager::updateFrameEvents()
|
|||
pIA->update();
|
||||
}
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
//
|
||||
// Next : Test if we have to remove anims
|
||||
for (i = 0; i < (sint)_ActiveAnims.size(); ++i)
|
||||
|
@ -1265,7 +1260,7 @@ void CInterfaceManager::updateFrameEvents()
|
|||
}
|
||||
//
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
|
||||
// Handle waiting texts from server
|
||||
processServerIDString();
|
||||
|
@ -1358,7 +1353,7 @@ void CInterfaceManager::updateFrameEvents()
|
|||
(*it)->handleEvent(clockTick);
|
||||
}
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
|
||||
// Update SPhrase manager
|
||||
CSPhraseManager *pPM= CSPhraseManager::getInstance();
|
||||
|
@ -1511,17 +1506,17 @@ void CInterfaceManager::setupOptions()
|
|||
bool CInterfaceManager::parseInterface (const std::vector<std::string> &xmlFileNames, bool reload, bool isFilename)
|
||||
{
|
||||
// cache some commonly used db nodes
|
||||
_DBB_UI_DUMMY = getDbBranch( "UI:DUMMY" );
|
||||
_DB_UI_DUMMY_QUANTITY = getDbProp( "UI:DUMMY:QUANTITY", true );
|
||||
_DB_UI_DUMMY_QUALITY = getDbProp( "UI:DUMMY:QUALITY", true );
|
||||
_DB_UI_DUMMY_SHEET = getDbProp( "UI:DUMMY:SHEET", true );
|
||||
_DB_UI_DUMMY_NAMEID = getDbProp( "UI:DUMMY:NAMEID", true );
|
||||
_DB_UI_DUMMY_ENCHANT = getDbProp( "UI:DUMMY:ENCHANT", true );
|
||||
_DB_UI_DUMMY_SLOT_TYPE = getDbProp( "UI:DUMMY:SLOT_TYPE", true );
|
||||
_DB_UI_DUMMY_PHRASE = getDbProp( "UI:DUMMY:PHRASE", true );
|
||||
_DB_UI_DUMMY_WORNED = getDbProp( "UI:DUMMY:WORNED", true );
|
||||
_DB_UI_DUMMY_PREREQUISIT_VALID = getDbProp( "UI:DUMMY:PREREQUISIT_VALID", true );
|
||||
_DB_UI_DUMMY_FACTION_TYPE = getDbProp( "UI:DUMMY:FACTION_TYPE", true );
|
||||
_DBB_UI_DUMMY = NLGUI::CDBManager::getInstance()->getDbBranch( "UI:DUMMY" );
|
||||
_DB_UI_DUMMY_QUANTITY = NLGUI::CDBManager::getInstance()->getDbProp( "UI:DUMMY:QUANTITY", true );
|
||||
_DB_UI_DUMMY_QUALITY = NLGUI::CDBManager::getInstance()->getDbProp( "UI:DUMMY:QUALITY", true );
|
||||
_DB_UI_DUMMY_SHEET = NLGUI::CDBManager::getInstance()->getDbProp( "UI:DUMMY:SHEET", true );
|
||||
_DB_UI_DUMMY_NAMEID = NLGUI::CDBManager::getInstance()->getDbProp( "UI:DUMMY:NAMEID", true );
|
||||
_DB_UI_DUMMY_ENCHANT = NLGUI::CDBManager::getInstance()->getDbProp( "UI:DUMMY:ENCHANT", true );
|
||||
_DB_UI_DUMMY_SLOT_TYPE = NLGUI::CDBManager::getInstance()->getDbProp( "UI:DUMMY:SLOT_TYPE", true );
|
||||
_DB_UI_DUMMY_PHRASE = NLGUI::CDBManager::getInstance()->getDbProp( "UI:DUMMY:PHRASE", true );
|
||||
_DB_UI_DUMMY_WORNED = NLGUI::CDBManager::getInstance()->getDbProp( "UI:DUMMY:WORNED", true );
|
||||
_DB_UI_DUMMY_PREREQUISIT_VALID = NLGUI::CDBManager::getInstance()->getDbProp( "UI:DUMMY:PREREQUISIT_VALID", true );
|
||||
_DB_UI_DUMMY_FACTION_TYPE = NLGUI::CDBManager::getInstance()->getDbProp( "UI:DUMMY:FACTION_TYPE", true );
|
||||
|
||||
_DB_UI_DUMMY_QUANTITY->setValue64(0);
|
||||
_DB_UI_DUMMY_QUALITY->setValue64(0);
|
||||
|
@ -1646,10 +1641,10 @@ bool CInterfaceManager::loadConfig (const string &filename)
|
|||
|
||||
// special for in game: backup last mission because of delayed update
|
||||
{
|
||||
CCDBNodeLeaf *pNL = getDbProp("UI:SAVE:MISSION_SELECTED", false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:MISSION_SELECTED", false);
|
||||
if (pNL)
|
||||
{
|
||||
CCDBNodeLeaf *pSelectedMissionBackup = getDbProp("UI:VARIABLES:MISSION_SELECTED_PREV_SESSION", true);
|
||||
CCDBNodeLeaf *pSelectedMissionBackup = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:MISSION_SELECTED_PREV_SESSION", true);
|
||||
pSelectedMissionBackup->setValue64(pNL->getValue64());
|
||||
}
|
||||
}
|
||||
|
@ -1665,7 +1660,7 @@ bool CInterfaceManager::loadConfig (const string &filename)
|
|||
// Load user landmarks
|
||||
ContinentMngr.serialUserLandMarks(f);
|
||||
|
||||
CCDBNodeLeaf *pNL = getDbProp( "SERVER:INTERFACES:NB_BONUS_LANDMARKS" );
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp( "SERVER:INTERFACES:NB_BONUS_LANDMARKS" );
|
||||
if ( pNL )
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
|
@ -1723,7 +1718,7 @@ bool CInterfaceManager::loadConfig (const string &filename)
|
|||
_Modes[_CurrentMode].toCurrentDesktop();
|
||||
|
||||
// *** Apply the NPC icon display mode
|
||||
CNPCIconCache::getInstance().init(!ClientCfg.R2EDEnabled && getDbProp("UI:SAVE:INSCENE:FRIEND:MISSION_ICON")->getValueBool());
|
||||
CNPCIconCache::getInstance().init(!ClientCfg.R2EDEnabled && NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:INSCENE:FRIEND:MISSION_ICON")->getValueBool());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -2004,7 +1999,7 @@ void CInterfaceManager::drawViews(NL3D::UCamera camera)
|
|||
_ViewRenderer.activateWorldSpaceMatrix (false);
|
||||
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
|
||||
// If an element has captured the keyboard, make sure it is alway visible (all parent windows active)
|
||||
if (_CaptureKeyboard != NULL)
|
||||
|
@ -2037,25 +2032,25 @@ void CInterfaceManager::drawViews(NL3D::UCamera camera)
|
|||
}
|
||||
|
||||
// Update global color from database
|
||||
_GlobalColor = CRGBA ( (uint8)getDbProp("UI:SAVE:COLOR:R")->getValue32(),
|
||||
(uint8)getDbProp("UI:SAVE:COLOR:G")->getValue32(),
|
||||
(uint8)getDbProp("UI:SAVE:COLOR:B")->getValue32(),
|
||||
(uint8)getDbProp("UI:SAVE:COLOR:A")->getValue32() );
|
||||
_GlobalColor = CRGBA ( (uint8)NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:COLOR:R")->getValue32(),
|
||||
(uint8)NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:COLOR:G")->getValue32(),
|
||||
(uint8)NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:COLOR:B")->getValue32(),
|
||||
(uint8)NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:COLOR:A")->getValue32() );
|
||||
_GlobalColorForContent.R = _GlobalColor.R;
|
||||
_GlobalColorForContent.G = _GlobalColor.G;
|
||||
_GlobalColorForContent.B = _GlobalColor.B;
|
||||
_GlobalColorForContent.A = (uint8) (( (uint16) _GlobalColor.A * (uint16) _ContentAlpha) >> 8);
|
||||
|
||||
// Update global alphaS from database
|
||||
_GlobalContentAlpha = (uint8)getDbProp("UI:SAVE:CONTENT_ALPHA")->getValue32();
|
||||
_GlobalContainerAlpha = (uint8)getDbProp("UI:SAVE:CONTAINER_ALPHA")->getValue32();
|
||||
_GlobalRolloverFactorContent = (uint8)getDbProp("UI:SAVE:CONTENT_ROLLOVER_FACTOR")->getValue32();
|
||||
_GlobalRolloverFactorContainer = (uint8)getDbProp("UI:SAVE:CONTAINER_ROLLOVER_FACTOR")->getValue32();
|
||||
_GlobalContentAlpha = (uint8)NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CONTENT_ALPHA")->getValue32();
|
||||
_GlobalContainerAlpha = (uint8)NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CONTAINER_ALPHA")->getValue32();
|
||||
_GlobalRolloverFactorContent = (uint8)NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CONTENT_ROLLOVER_FACTOR")->getValue32();
|
||||
_GlobalRolloverFactorContainer = (uint8)NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CONTAINER_ROLLOVER_FACTOR")->getValue32();
|
||||
|
||||
// Update Player characteristics (for Item carac requirement Redifying)
|
||||
nlctassert(CHARACTERISTICS::NUM_CHARACTERISTICS==8);
|
||||
for (uint i=0; i<CHARACTERISTICS::NUM_CHARACTERISTICS; ++i)
|
||||
_CurrentPlayerCharac[i]= getDbValue32(toString("SERVER:CHARACTER_INFO:CHARACTERISTICS%d:VALUE", i));
|
||||
_CurrentPlayerCharac[i]= NLGUI::CDBManager::getInstance()->getDbValue32(toString("SERVER:CHARACTER_INFO:CHARACTERISTICS%d:VALUE", i));
|
||||
|
||||
// _CurrentPlayerCharac[CHARACTERISTICS::constitution]= getDbValue32("SERVER:CHARACTER_INFO:CHARACTERISTICS:Constitution");
|
||||
// _CurrentPlayerCharac[CHARACTERISTICS::constitution]= getDbValue32("SERVER:CHARACTER_INFO:CHARACTERISTICS:Constitution");
|
||||
|
@ -2077,7 +2072,7 @@ void CInterfaceManager::drawViews(NL3D::UCamera camera)
|
|||
Computed String are rendered in on big drawQuads at last part of each layer
|
||||
*/
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
//
|
||||
for (uint32 nMasterGroup = 0; nMasterGroup < _MasterGroups.size(); nMasterGroup++)
|
||||
{
|
||||
|
@ -2129,7 +2124,7 @@ void CInterfaceManager::drawViews(NL3D::UCamera camera)
|
|||
H_AUTO ( RZ_Interface_DrawViews_After )
|
||||
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
|
||||
// draw the special over extend text
|
||||
drawOverExtendViewText();
|
||||
|
@ -2178,7 +2173,7 @@ void CInterfaceManager::drawViews(NL3D::UCamera camera)
|
|||
|
||||
// flush obs
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2626,10 +2621,10 @@ void CInterfaceManager::setGlobalColor (NLMISC::CRGBA col)
|
|||
{
|
||||
if (!_RProp)
|
||||
{
|
||||
_RProp = getDbProp("UI:SAVE:COLOR:R");
|
||||
_GProp = getDbProp("UI:SAVE:COLOR:G");
|
||||
_BProp = getDbProp("UI:SAVE:COLOR:B");
|
||||
_AProp = getDbProp("UI:SAVE:COLOR:A");
|
||||
_RProp = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:COLOR:R");
|
||||
_GProp = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:COLOR:G");
|
||||
_BProp = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:COLOR:B");
|
||||
_AProp = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:COLOR:A");
|
||||
}
|
||||
_RProp ->setValue32 (col.R);
|
||||
_GProp ->setValue32 (col.G);
|
||||
|
@ -2766,7 +2761,7 @@ bool CInterfaceManager::handleEvent (const NLGUI::CEventDescriptor& event)
|
|||
{
|
||||
bool result = _CaptureKeyboard->handleEvent(event);
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
return result;
|
||||
}
|
||||
else
|
||||
|
@ -2824,7 +2819,7 @@ bool CInterfaceManager::handleEvent (const NLGUI::CEventDescriptor& event)
|
|||
{
|
||||
bool result = _CaptureKeyboard->handleEvent(event);
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -3105,7 +3100,7 @@ bool CInterfaceManager::handleEvent (const NLGUI::CEventDescriptor& event)
|
|||
}
|
||||
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
// event handled?
|
||||
return handled;
|
||||
}
|
||||
|
@ -3407,18 +3402,6 @@ void CInterfaceManager::updateAllLocalisedElements()
|
|||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bool CInterfaceManager::addDBObserver (ICDBNode::IPropertyObserver* observer, ICDBNode::CTextId id)
|
||||
{
|
||||
return _Database->addObserver(observer, id);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bool CInterfaceManager::removeDBObserver (ICDBNode::IPropertyObserver* observer, ICDBNode::CTextId id)
|
||||
{
|
||||
return _Database->removeObserver(observer, id);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CInterfaceManager::addServerString (const std::string &sTarget, uint32 id, IStringProcess *cb)
|
||||
{
|
||||
|
@ -3501,28 +3484,6 @@ void CInterfaceManager::processServerIDString()
|
|||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
sint32 CInterfaceManager::getDbValue32 (const std::string & name)
|
||||
{
|
||||
CCDBNodeLeaf *node= getDbProp(name, false);
|
||||
if(node)
|
||||
return node->getValue32();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
CCDBNodeLeaf* CInterfaceManager::getDbProp(const std::string & name, bool bCreate)
|
||||
{
|
||||
return getDbLeaf( name, bCreate );
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CInterfaceManager::delDbProp(const std::string & name)
|
||||
{
|
||||
delDbNode( name );
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
CInterfaceGroup* CInterfaceManager::getWindowUnder (sint32 x, sint32 y)
|
||||
{
|
||||
|
@ -4443,9 +4404,9 @@ NLMISC::CRGBA CInterfaceManager::getDebugInfoColor(TSystemInfoMode mode)
|
|||
if (_NeutralColor == NULL) // not initialised ?
|
||||
{
|
||||
#define SYSTEM_INFO_COLOR_DB_PATH "UI:VARIABLES:SYSTEM_INFOS:COLORS"
|
||||
_NeutralColor = getDbProp(SYSTEM_INFO_COLOR_DB_PATH ":NEUTRAL");
|
||||
_WarningColor = getDbProp(SYSTEM_INFO_COLOR_DB_PATH ":WARNING");
|
||||
_ErrorColor = getDbProp(SYSTEM_INFO_COLOR_DB_PATH ":ERROR");
|
||||
_NeutralColor = NLGUI::CDBManager::getInstance()->getDbProp(SYSTEM_INFO_COLOR_DB_PATH ":NEUTRAL");
|
||||
_WarningColor = NLGUI::CDBManager::getInstance()->getDbProp(SYSTEM_INFO_COLOR_DB_PATH ":WARNING");
|
||||
_ErrorColor = NLGUI::CDBManager::getInstance()->getDbProp(SYSTEM_INFO_COLOR_DB_PATH ":ERROR");
|
||||
}
|
||||
NLMISC::CRGBA color;
|
||||
switch(mode)
|
||||
|
@ -5099,7 +5060,7 @@ void CInterfaceManager::removeRefOnGroup (CInterfaceGroup *group)
|
|||
uint CInterfaceManager::getUserDblClickDelay()
|
||||
{
|
||||
uint nVal = 50;
|
||||
CCDBNodeLeaf *pNL = getDbProp("UI:SAVE:DOUBLE_CLICK_SPEED");
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:DOUBLE_CLICK_SPEED");
|
||||
if (pNL != NULL)
|
||||
nVal = pNL->getValue32();
|
||||
uint dbclickDelay = (uint)(DOUBLE_CLICK_MIN + (DOUBLE_CLICK_MAX-DOUBLE_CLICK_MIN) * (float)nVal / 100.0f);
|
||||
|
@ -5725,7 +5686,7 @@ void CInterfaceManager::connectYuboChat()
|
|||
_YuboChat.connect(string("chat.ryzom.com:")+toString(KlientChatPort), LoginLogin, LoginPassword);
|
||||
|
||||
// Inform the interface that the chat is present
|
||||
getDbProp("UI:VARIABLES:YUBO_CHAT_PRESENT")->setValue32(1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:YUBO_CHAT_PRESENT")->setValue32(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6049,7 +6010,7 @@ void CInterfaceManager::createLocalBranch(const std::string &fileName, NLMISC::I
|
|||
//Parse the parser output!!!
|
||||
CCDBNodeBranch *localNode = new CCDBNodeBranch("LOCAL");
|
||||
localNode->init( read.getRootNode (), progressCallBack );
|
||||
_Database->attachChild(localNode,"LOCAL");
|
||||
NLGUI::CDBManager::getInstance()->getDB()->attachChild(localNode,"LOCAL");
|
||||
|
||||
// Create the observers for auto-copy SERVER->LOCAL of inventory
|
||||
ServerToLocalAutoCopyInventory.init("INVENTORY");
|
||||
|
@ -6131,21 +6092,21 @@ void CInterfaceManager::CServerToLocalAutoCopy::init(const std::string &dbPath)
|
|||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
// Get the synchronisation Counter in Server DB
|
||||
_ServerCounter= pIM->getDbProp(string("SERVER:") + dbPath + ":COUNTER", false);
|
||||
_ServerCounter= NLGUI::CDBManager::getInstance()->getDbProp(string("SERVER:") + dbPath + ":COUNTER", false);
|
||||
|
||||
// if found
|
||||
if(_ServerCounter)
|
||||
{
|
||||
// **** Add Observers on all nodes
|
||||
// add the observers when server node change
|
||||
pIM->addDBObserver(&_ServerObserver, string("SERVER:") + dbPath);
|
||||
NLGUI::CDBManager::getInstance()->getDB()->addObserver(&_ServerObserver, ICDBNode::CTextId( string("SERVER:") + dbPath ) );
|
||||
|
||||
// add the observers when local node change
|
||||
pIM->addDBObserver(&_LocalObserver, string("LOCAL:") + dbPath);
|
||||
NLGUI::CDBManager::getInstance()->getDB()->addObserver(&_LocalObserver, ICDBNode::CTextId( string("LOCAL:") + dbPath ) );
|
||||
|
||||
// **** Init the Nodes shortcut
|
||||
// Parse all Local Nodes
|
||||
CCDBNodeBranch *localBranch= pIM->getDbBranch(string("LOCAL:") + dbPath);
|
||||
CCDBNodeBranch *localBranch= NLGUI::CDBManager::getInstance()->getDbBranch(string("LOCAL:") + dbPath);
|
||||
if(localBranch)
|
||||
{
|
||||
uint i;
|
||||
|
@ -6169,7 +6130,7 @@ void CInterfaceManager::CServerToLocalAutoCopy::init(const std::string &dbPath)
|
|||
serverLeafStr= "SERVER:" + serverLeafStr;
|
||||
|
||||
// try then to get this server node
|
||||
CCDBNodeLeaf *serverLeaf= pIM->getDbProp(serverLeafStr, false);
|
||||
CCDBNodeLeaf *serverLeaf= NLGUI::CDBManager::getInstance()->getDbProp(serverLeafStr, false);
|
||||
if(serverLeaf)
|
||||
{
|
||||
// Both server and local leaves exist, ok, append to _Nodes
|
||||
|
@ -6465,11 +6426,11 @@ bool CInterfaceManager::parseTokens(ucstring& ucstr)
|
|||
if (indexInTeam < PeopleInterraction.TeamList.getNumPeople() )
|
||||
{
|
||||
// Index is the database index (serverIndex() not used for team list)
|
||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp( NLMISC::toString(TEAM_DB_PATH ":%hu:NAME", indexInTeam ), false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp( NLMISC::toString(TEAM_DB_PATH ":%hu:NAME", indexInTeam ), false);
|
||||
if (pNL && pNL->getValueBool() )
|
||||
{
|
||||
// There is a character corresponding to this index
|
||||
pNL = CInterfaceManager::getInstance()->getDbProp( NLMISC::toString( TEAM_DB_PATH ":%hu:UID", indexInTeam ), false );
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp( NLMISC::toString( TEAM_DB_PATH ":%hu:UID", indexInTeam ), false );
|
||||
if (pNL)
|
||||
{
|
||||
CLFECOMMON::TClientDataSetIndex compressedIndex = pNL->getValue32();
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "flying_text_manager.h"
|
||||
|
||||
#include "nel/gui/input_event_listener.h"
|
||||
#include "nel/gui/db_manager.h"
|
||||
|
||||
// CLIENT
|
||||
#include "../string_manager_client.h"
|
||||
|
@ -77,7 +78,7 @@ class CGroupMenu;
|
|||
* \author Nevrax France
|
||||
* \date 2002
|
||||
*/
|
||||
class CInterfaceManager : public CInterfaceParser, public NLMISC::CCDBManager, public NLGUI::IInputEventListener
|
||||
class CInterfaceManager : public CInterfaceParser, public NLGUI::IInputEventListener
|
||||
{
|
||||
public:
|
||||
|
||||
|
@ -229,15 +230,6 @@ public:
|
|||
void addServerID (const std::string &sTarget, uint32 id, IStringProcess *cb = NULL);
|
||||
void processServerIDString();
|
||||
|
||||
|
||||
/// Get the root of the database
|
||||
NLMISC::CCDBNodeBranch *getDB() const { return _Database; }
|
||||
// yoyo: should avoid to try creating DbPropr with this system... very dangerous
|
||||
NLMISC::CCDBNodeLeaf* getDbProp (const std::string & name, bool bCreate=true);
|
||||
void delDbProp(const std::string & name);
|
||||
// return the DB as an int32. return 0 if the DB does not exist (never create)
|
||||
sint32 getDbValue32 (const std::string & name);
|
||||
|
||||
/**
|
||||
* get the window under a spot
|
||||
* \param : X coord of the spot
|
||||
|
@ -443,33 +435,6 @@ public:
|
|||
// display a system info string
|
||||
void displaySystemInfo(const ucstring &str, const std::string &Category = "SYS");
|
||||
NLMISC::CRGBA getSystemInfoColor(const std::string &Category = "SYS");
|
||||
/**
|
||||
* add an observer to a database entry
|
||||
* \param observer : pointer on the observer
|
||||
* \param id : the text id of the element to observe
|
||||
* \return true if success
|
||||
*/
|
||||
bool addDBObserver (NLMISC::ICDBNode::IPropertyObserver* observer, NLMISC::ICDBNode::CTextId id);
|
||||
|
||||
/**
|
||||
* add an observer to a database entry
|
||||
* \param observer : pointer on the observer
|
||||
* \param id : the text id of the element to observe
|
||||
* \return true if success
|
||||
*/
|
||||
bool addDBObserver (NLMISC::ICDBNode::IPropertyObserver* observer, const std::string& id)
|
||||
{
|
||||
return addDBObserver(observer, NLMISC::ICDBNode::CTextId(id));
|
||||
}
|
||||
|
||||
/** remove the observer from the dataBase
|
||||
*/
|
||||
bool removeDBObserver (NLMISC::ICDBNode::IPropertyObserver* observer, NLMISC::ICDBNode::CTextId id);
|
||||
bool removeDBObserver (NLMISC::ICDBNode::IPropertyObserver* observer, const std::string& id)
|
||||
{
|
||||
return removeDBObserver(observer, NLMISC::ICDBNode::CTextId(id));
|
||||
}
|
||||
|
||||
/// \name Global Interface Options
|
||||
// @{
|
||||
|
||||
|
@ -671,7 +636,7 @@ public:
|
|||
float getAlphaRolloverSpeed()
|
||||
{
|
||||
if (!_AlphaRolloverSpeedDB)
|
||||
_AlphaRolloverSpeedDB = getDbProp("UI:SAVE:ALPHA_ROLLOVER_SPEED");
|
||||
_AlphaRolloverSpeedDB = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:ALPHA_ROLLOVER_SPEED");
|
||||
float fTmp = ROLLOVER_MIN_DELTA_PER_MS + (ROLLOVER_MAX_DELTA_PER_MS - ROLLOVER_MIN_DELTA_PER_MS) * 0.01f * (100 - _AlphaRolloverSpeedDB->getValue32());
|
||||
return fTmp*fTmp*fTmp;
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ public:
|
|||
while(dataTok)
|
||||
{
|
||||
std::string data (dataTok);
|
||||
if (iMngr->getDbProp(data,false) == NULL) // Full path provided ? No.
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp(data,false) == NULL) // Full path provided ? No.
|
||||
{
|
||||
CInterfaceGroup *parent = parentGroup;
|
||||
while (parent != NULL)
|
||||
|
@ -131,19 +131,19 @@ public:
|
|||
sTmp = parent->getId() + data;
|
||||
else
|
||||
sTmp = parent->getId() + ":" + data;
|
||||
if (iMngr->getDbProp(sTmp,false) != NULL)
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp(sTmp,false) != NULL)
|
||||
{
|
||||
data = sTmp;
|
||||
break;
|
||||
}
|
||||
parent = parent->getParent();
|
||||
}
|
||||
if (iMngr->getDbProp(data,false) == NULL)
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp(data,false) == NULL)
|
||||
{
|
||||
std::string sTmp = std::string("data (")+std::string(dataTok)+std::string(") in a observer tag do not exist, CREATING!");
|
||||
nlinfo (sTmp.c_str());
|
||||
data = (const char*)dataTok;
|
||||
iMngr->getDbProp (data, true);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp (data, true);
|
||||
}
|
||||
}
|
||||
if ( !obs )
|
||||
|
@ -160,7 +160,7 @@ public:
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
if ( ! iMngr->addDBObserver(obs,NLMISC::ICDBNode::CTextId (data) ) )
|
||||
if ( ! NLGUI::CDBManager::getInstance()->getDB()->addObserver(obs,NLMISC::ICDBNode::CTextId (data) ) )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -52,12 +52,12 @@ bool CInterfaceProperty::link( CCDBNodeBranch *dbNode, const string &leafId, CCD
|
|||
|
||||
bool CInterfaceProperty::link (const char *DBProp)
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(DBProp, false);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(DBProp, false);
|
||||
if (_VolatileValue == NULL)
|
||||
{
|
||||
|
||||
nlinfo("prop not created : %s", DBProp);
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(DBProp);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(DBProp);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -75,7 +75,7 @@ void CInterfaceProperty::readSInt64(const char * ptr,const string& id)
|
|||
//the value is volatile, and a database entry is created
|
||||
if ( isdigit(*ptr) || *ptr=='-')
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(id);
|
||||
sint64 i;
|
||||
fromString(ptr, i);
|
||||
_VolatileValue->setValue64( i );
|
||||
|
@ -83,7 +83,7 @@ void CInterfaceProperty::readSInt64(const char * ptr,const string& id)
|
|||
//the value is volatile and points to a db entry created elsewhere
|
||||
else
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(str);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(str);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ void CInterfaceProperty::readDouble(const char * ptr,const string& id)
|
|||
string str (ptr);
|
||||
if ( isdigit(*ptr) || *ptr=='-')
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(id);
|
||||
double buf;
|
||||
fromString(ptr, buf);
|
||||
sint64 i = *(sint64*)&buf;
|
||||
|
@ -109,7 +109,7 @@ void CInterfaceProperty::readDouble(const char * ptr,const string& id)
|
|||
}
|
||||
else
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(str);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(str);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ void CInterfaceProperty::readSInt32 (const char *ptr, const string& id)
|
|||
//the value is volatile, and a database entry is created
|
||||
if ( isdigit(*ptr) || *ptr=='-')
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(id);
|
||||
sint32 i;
|
||||
fromString(ptr, i);
|
||||
_VolatileValue->setValue32( i );
|
||||
|
@ -133,7 +133,7 @@ void CInterfaceProperty::readSInt32 (const char *ptr, const string& id)
|
|||
//the value is volatile and points to a db entry created elsewhere
|
||||
else
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(str);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(str);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ void CInterfaceProperty::readRGBA (const char *value,const string& id)
|
|||
string str (value);
|
||||
if (isdigit(*value))
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(id);
|
||||
int r=0, g=0, b=0, a=255;
|
||||
sscanf (value, "%d %d %d %d", &r, &g, &b, &a);
|
||||
clamp (r, 0, 255);
|
||||
|
@ -178,7 +178,7 @@ void CInterfaceProperty::readRGBA (const char *value,const string& id)
|
|||
}
|
||||
else
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(str);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(str);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -188,52 +188,52 @@ void CInterfaceProperty::readHotSpot (const char *ptr,const string& id)
|
|||
string str(ptr);
|
||||
if ( !strcmp(ptr,"TL") )
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue->setValue64((sint64)Hotspot_TL );
|
||||
}
|
||||
else if ( !strcmp(ptr,"TM") )
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue->setValue64( (sint64)Hotspot_TM );
|
||||
}
|
||||
else if ( !strcmp(ptr,"TR") )
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue->setValue64( (sint64)Hotspot_TR );
|
||||
}
|
||||
else if ( !strcmp(ptr,"ML") )
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue->setValue64( (sint64)Hotspot_ML );
|
||||
}
|
||||
else if ( !strcmp(ptr,"MM") )
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue->setValue64( (sint64)Hotspot_MM );
|
||||
}
|
||||
else if ( !strcmp(ptr,"MR") )
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue->setValue64( (sint64)Hotspot_MR );
|
||||
}
|
||||
else if ( !strcmp(ptr,"BL") )
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue->setValue64( (sint64)Hotspot_BL );
|
||||
}
|
||||
else if ( !strcmp(ptr,"BM") )
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue->setValue64( (sint64)Hotspot_BM );
|
||||
}
|
||||
else if ( !strcmp(ptr,"BR") )
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue->setValue64( (sint64)Hotspot_BR );
|
||||
}
|
||||
|
||||
else
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(str);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(str);
|
||||
}
|
||||
|
||||
|
||||
|
@ -252,23 +252,23 @@ void CInterfaceProperty::readBool (const char* value,const string& id)
|
|||
string str (value);
|
||||
if ( !strcmp(value,"true") )
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue->setValue8( (sint8)true );
|
||||
}
|
||||
else if ( !strcmp(value,"false") )
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue->setValue8( (sint8)false );
|
||||
}
|
||||
else if ( isdigit(*value) || *value=='-')
|
||||
{
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(id);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(id);
|
||||
sint8 value8;
|
||||
fromString(value, value8);
|
||||
_VolatileValue->setValue8( value8 );
|
||||
}
|
||||
else
|
||||
_VolatileValue = CInterfaceManager::getInstance()->getDbProp(str);
|
||||
_VolatileValue = NLGUI::CDBManager::getInstance()->getDbProp(str);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -302,14 +302,14 @@ void CInventoryManager::init()
|
|||
// LOCAL DB
|
||||
initItemArray(LOCAL_INVENTORY ":BAG", Bag, MAX_BAGINV_ENTRIES);
|
||||
initItemArray(LOCAL_INVENTORY ":TEMP", TempInv, MAX_TEMPINV_ENTRIES);
|
||||
Money = im->getDbProp(LOCAL_INVENTORY ":MONEY");
|
||||
Money = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":MONEY");
|
||||
initIndirection (LOCAL_INVENTORY ":HAND:", Hands, MAX_HANDINV_ENTRIES, true);
|
||||
initIndirection (LOCAL_INVENTORY ":EQUIP:", Equip, MAX_EQUIPINV_ENTRIES, true);
|
||||
// Init observers for auto equipment
|
||||
{
|
||||
for (uint i = 0; i < MAX_BAGINV_ENTRIES; ++i)
|
||||
{
|
||||
CCDBNodeLeaf *pNL = im->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(i) + ":SHEET");
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(i) + ":SHEET");
|
||||
ICDBNode::CTextId textId;
|
||||
pNL->addObserver(&_DBBagObs, textId);
|
||||
}
|
||||
|
@ -322,7 +322,7 @@ void CInventoryManager::init()
|
|||
// SERVER DB
|
||||
initItemArray(SERVER_INVENTORY ":BAG", ServerBag, MAX_BAGINV_ENTRIES);
|
||||
initItemArray(SERVER_INVENTORY ":TEMP", ServerTempInv, MAX_TEMPINV_ENTRIES);
|
||||
ServerMoney = im->getDbProp(SERVER_INVENTORY ":MONEY");
|
||||
ServerMoney = NLGUI::CDBManager::getInstance()->getDbProp(SERVER_INVENTORY ":MONEY");
|
||||
// Init Animals
|
||||
for(uint i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
||||
initItemArray(toString(SERVER_INVENTORY ":PACK_ANIMAL%d", i), ServerPAInv[i], MAX_ANIMALINV_ENTRIES);
|
||||
|
@ -375,7 +375,7 @@ void CInventoryManager::init()
|
|||
{
|
||||
CCDBNodeLeaf *nodeTS;
|
||||
|
||||
nodeTS= im->getDbProp("SERVER:TRADING:SESSION", false);
|
||||
nodeTS= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:TRADING:SESSION", false);
|
||||
if( nodeTS )
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
|
@ -391,8 +391,8 @@ void CInventoryManager::init()
|
|||
// since different size per inventory, stop when node not found....
|
||||
for(uint j=0;;j++)
|
||||
{
|
||||
CCDBNodeLeaf *nodeIV= im->getDbProp("SERVER:" + InventoryDBs[i] + ":" + toString(j) + ":INFO_VERSION", false);
|
||||
CCDBNodeLeaf *nodeSH= im->getDbProp("SERVER:" + InventoryDBs[i] + ":" + toString(j) + ":SHEET", false);
|
||||
CCDBNodeLeaf *nodeIV= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:" + InventoryDBs[i] + ":" + toString(j) + ":INFO_VERSION", false);
|
||||
CCDBNodeLeaf *nodeSH= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:" + InventoryDBs[i] + ":" + toString(j) + ":SHEET", false);
|
||||
if( nodeIV && nodeSH )
|
||||
{
|
||||
ICDBNode::CTextId textIdIV, textIdSH;
|
||||
|
@ -418,7 +418,7 @@ void CInventoryManager::initItemArray(const std::string &dbBranchName, CItemImag
|
|||
{
|
||||
nlassert(dest);
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
CCDBNodeBranch *branch = im->getDbBranch(dbBranchName);
|
||||
CCDBNodeBranch *branch = NLGUI::CDBManager::getInstance()->getDbBranch(dbBranchName);
|
||||
if (!branch)
|
||||
{
|
||||
nlwarning("Can't init inventory image from branch %s.", dbBranchName.c_str());
|
||||
|
@ -444,7 +444,7 @@ void CInventoryManager::initIndirection(const std::string &dbbranch, sint32 *ind
|
|||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
for (uint i = 0 ; i < (uint)nbIndex; ++i)
|
||||
{
|
||||
CCDBNodeLeaf *pNL = im->getDbProp(dbbranch + toString(i) + ":INDEX_IN_BAG");
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(dbbranch + toString(i) + ":INDEX_IN_BAG");
|
||||
if (putObs)
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
|
@ -590,11 +590,11 @@ uint32 CInventoryManager::getHandItemSheet( bool rightHand ) const
|
|||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
string dbPropPath = toString("LOCAL:INVENTORY:HAND:%d:INDEX_IN_BAG",rightHand?0:1);
|
||||
// get the RightHand bag index
|
||||
sint32 itemSlot= pIM->getDbProp(dbPropPath)->getValue32();
|
||||
sint32 itemSlot= NLGUI::CDBManager::getInstance()->getDbProp(dbPropPath)->getValue32();
|
||||
// if something in hand
|
||||
if(itemSlot>0)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp("LOCAL:INVENTORY:BAG:"+toString(itemSlot-1) +":SHEET", false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:BAG:"+toString(itemSlot-1) +":SHEET", false);
|
||||
if(node)
|
||||
item= node->getValue32();
|
||||
}
|
||||
|
@ -784,7 +784,7 @@ void CInventoryManager::equip(const std::string &bagPath, const std::string &inv
|
|||
}
|
||||
|
||||
// Hands management : check if we have to unequip left hand because of incompatibility with right hand item
|
||||
sint16 oldRightIndexInBag = pIM->getDbProp(invPath + ":INDEX_IN_BAG")->getValue16();
|
||||
sint16 oldRightIndexInBag = NLGUI::CDBManager::getInstance()->getDbProp(invPath + ":INDEX_IN_BAG")->getValue16();
|
||||
if (inventory == INVENTORIES::handling && invSlot == 0)
|
||||
{
|
||||
CDBCtrlSheet *pCSLeftHand = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(CTRL_HAND_LEFT));
|
||||
|
@ -795,14 +795,14 @@ void CInventoryManager::equip(const std::string &bagPath, const std::string &inv
|
|||
|
||||
// get sheet of left item
|
||||
uint32 leftSheet = 0;
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(LOCAL_INVENTORY ":HAND:1:INDEX_IN_BAG", false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":HAND:1:INDEX_IN_BAG", false);
|
||||
if (pNL == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (pNL->getValue32() > 0)
|
||||
{
|
||||
CCDBNodeLeaf *pNL2 = pIM->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(pNL->getValue32()-1) + ":SHEET", false);
|
||||
CCDBNodeLeaf *pNL2 = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(pNL->getValue32()-1) + ":SHEET", false);
|
||||
if (pNL2 == NULL)
|
||||
{
|
||||
return;
|
||||
|
@ -814,7 +814,7 @@ void CInventoryManager::equip(const std::string &bagPath, const std::string &inv
|
|||
uint32 lastRightSheet = 0;
|
||||
if (oldRightIndexInBag > 0)
|
||||
{
|
||||
pNL = pIM->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(oldRightIndexInBag-1) + ":SHEET", false);
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(oldRightIndexInBag-1) + ":SHEET", false);
|
||||
if (pNL == NULL)
|
||||
{
|
||||
return;
|
||||
|
@ -826,7 +826,7 @@ void CInventoryManager::equip(const std::string &bagPath, const std::string &inv
|
|||
uint32 rightSheet = 0;
|
||||
if (indexInBag+1 > 0)
|
||||
{
|
||||
pNL = pIM->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(indexInBag) + ":SHEET", false);
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(indexInBag) + ":SHEET", false);
|
||||
if (pNL == NULL)
|
||||
{
|
||||
return;
|
||||
|
@ -842,7 +842,7 @@ void CInventoryManager::equip(const std::string &bagPath, const std::string &inv
|
|||
}
|
||||
|
||||
// update the equip DB pointer
|
||||
pIM->getDbProp(invPath + ":INDEX_IN_BAG")->setValue16(indexInBag+1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(invPath + ":INDEX_IN_BAG")->setValue16(indexInBag+1);
|
||||
|
||||
// Yoyo add: when the user equip an item, the action are invalid during some time
|
||||
if(indexInBag < MAX_BAGINV_ENTRIES)
|
||||
|
@ -895,7 +895,7 @@ void CInventoryManager::unequip(const std::string &invPath)
|
|||
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
sint16 oldIndexInBag = pIM->getDbProp(invPath + ":INDEX_IN_BAG")->getValue16();
|
||||
sint16 oldIndexInBag = NLGUI::CDBManager::getInstance()->getDbProp(invPath + ":INDEX_IN_BAG")->getValue16();
|
||||
if( oldIndexInBag == 0 )
|
||||
{
|
||||
return;
|
||||
|
@ -927,14 +927,14 @@ void CInventoryManager::unequip(const std::string &invPath)
|
|||
|
||||
// get sheet of left item
|
||||
uint32 leftSheet = 0;
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(LOCAL_INVENTORY ":HAND:1:INDEX_IN_BAG", false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":HAND:1:INDEX_IN_BAG", false);
|
||||
if (pNL == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (pNL->getValue32() > 0)
|
||||
{
|
||||
CCDBNodeLeaf *pNL2 = pIM->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(pNL->getValue32()-1) + ":SHEET", false);
|
||||
CCDBNodeLeaf *pNL2 = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(pNL->getValue32()-1) + ":SHEET", false);
|
||||
if (pNL2 == NULL)
|
||||
{
|
||||
return;
|
||||
|
@ -946,7 +946,7 @@ void CInventoryManager::unequip(const std::string &invPath)
|
|||
uint32 lastRightSheet = 0;
|
||||
if (oldIndexInBag > 0)
|
||||
{
|
||||
pNL = pIM->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(oldIndexInBag-1) + ":SHEET", false);
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(oldIndexInBag-1) + ":SHEET", false);
|
||||
if (pNL == NULL)
|
||||
{
|
||||
return;
|
||||
|
@ -964,7 +964,7 @@ void CInventoryManager::unequip(const std::string &invPath)
|
|||
}
|
||||
}
|
||||
|
||||
pIM->getDbProp(invPath + ":INDEX_IN_BAG")->setValue16(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(invPath + ":INDEX_IN_BAG")->setValue16(0);
|
||||
|
||||
// Update trade window if any
|
||||
if ((BotChatPageAll != NULL) && (BotChatPageAll->Trade != NULL))
|
||||
|
@ -1121,11 +1121,11 @@ void CInventoryManager::CDBEquipObs::update(ICDBNode* node)
|
|||
// If something in left hand check if we have to remove
|
||||
{
|
||||
uint32 leftSheet = 0;
|
||||
CCDBNodeLeaf *pNL3 = pIM->getDbProp(LOCAL_INVENTORY ":HAND:1:INDEX_IN_BAG", false);
|
||||
CCDBNodeLeaf *pNL3 = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":HAND:1:INDEX_IN_BAG", false);
|
||||
if (pNL3 == NULL) return;
|
||||
if (pNL3->getValue32() > 0)
|
||||
{
|
||||
CCDBNodeLeaf *pNL4 = pIM->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(pNL3->getValue32()-1) + ":SHEET", false);
|
||||
CCDBNodeLeaf *pNL4 = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(pNL3->getValue32()-1) + ":SHEET", false);
|
||||
if (pNL4 == NULL) return;
|
||||
leftSheet = pNL4->getValue32();
|
||||
}
|
||||
|
@ -1133,7 +1133,7 @@ void CInventoryManager::CDBEquipObs::update(ICDBNode* node)
|
|||
uint32 rightSheet = 0;
|
||||
if (newVal > 0)
|
||||
{
|
||||
pNL3 = pIM->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(newVal-1) + ":SHEET", false);
|
||||
pNL3 = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(newVal-1) + ":SHEET", false);
|
||||
if (pNL3 == NULL) return;
|
||||
rightSheet = pNL3->getValue32();
|
||||
}
|
||||
|
@ -1141,7 +1141,7 @@ void CInventoryManager::CDBEquipObs::update(ICDBNode* node)
|
|||
uint32 lastRightSheet = 0;
|
||||
if (oldVal > 0)
|
||||
{
|
||||
pNL3 = pIM->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(oldVal-1) + ":SHEET", false);
|
||||
pNL3 = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(oldVal-1) + ":SHEET", false);
|
||||
if (pNL3 == NULL) return;
|
||||
lastRightSheet = pNL3->getValue32();
|
||||
}
|
||||
|
@ -1161,7 +1161,7 @@ void CInventoryManager::CDBEquipObs::update(ICDBNode* node)
|
|||
// update display of left hand according to new right hand item
|
||||
if (newVal > 0)
|
||||
{
|
||||
CCDBNodeLeaf *pNL2 = pIM->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(newVal-1) + ":SHEET", false);
|
||||
CCDBNodeLeaf *pNL2 = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(newVal-1) + ":SHEET", false);
|
||||
if (pNL2 == NULL) return;
|
||||
|
||||
if (getInventory().is2HandItem(pNL2->getValue32()))
|
||||
|
@ -1199,12 +1199,12 @@ void CInventoryManager::CDBEquipObs::update(ICDBNode* node)
|
|||
CDBCtrlSheet * pCSRightHand = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(CTRL_HAND_RIGHT));
|
||||
if ( pCSRightHand && pCSRightHand->getSheetId() )
|
||||
{
|
||||
CCDBNodeLeaf *pNL3 = pIM->getDbProp(LOCAL_INVENTORY ":HAND:0:INDEX_IN_BAG", false);
|
||||
CCDBNodeLeaf *pNL3 = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":HAND:0:INDEX_IN_BAG", false);
|
||||
if (pNL3)
|
||||
{
|
||||
if (pNL3->getValue32() > 0)
|
||||
{
|
||||
CCDBNodeLeaf *pNL4 = pIM->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(pNL3->getValue32()-1) + ":SHEET", false);
|
||||
CCDBNodeLeaf *pNL4 = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":BAG:" + toString(pNL3->getValue32()-1) + ":SHEET", false);
|
||||
if (pNL4)
|
||||
{
|
||||
uint32 rightSheet = pNL4->getValue32();
|
||||
|
@ -1297,7 +1297,7 @@ bool CInventoryManager::autoEquip(sint bagEntryIndex, bool allowReplace)
|
|||
if (pCSDst == NULL) continue;
|
||||
string dstPath = getInventory().getDBIndexPath(pCSDst);
|
||||
|
||||
sint32 indexDstPath = pIM->getDbProp(dstPath+":INDEX_IN_BAG")->getValue16();
|
||||
sint32 indexDstPath = NLGUI::CDBManager::getInstance()->getDbProp(dstPath+":INDEX_IN_BAG")->getValue16();
|
||||
|
||||
// Already something in that slot?
|
||||
if (!allowReplace && indexDstPath > 0)
|
||||
|
@ -1323,7 +1323,7 @@ bool CInventoryManager::autoEquip(sint bagEntryIndex, bool allowReplace)
|
|||
CDBCtrlSheet *pCSDst = getInventory().getEquipSheet(i);
|
||||
if (pCSDst == NULL) continue;
|
||||
string dstPath = getInventory().getDBIndexPath(pCSDst);
|
||||
sint32 indexDstPath = pIM->getDbProp(dstPath+":INDEX_IN_BAG")->getValue16();
|
||||
sint32 indexDstPath = NLGUI::CDBManager::getInstance()->getDbProp(dstPath+":INDEX_IN_BAG")->getValue16();
|
||||
|
||||
// Already something in that slot?
|
||||
if (!allowReplace && indexDstPath > 0)
|
||||
|
@ -1363,14 +1363,14 @@ void CInventoryManager::dropOrDestroyItem(CDBCtrlSheet *item, CBitMemStream &out
|
|||
static void checkEquipmentIntegrity(const string &equipVal)
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(equipVal+":INDEX_IN_BAG",false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(equipVal+":INDEX_IN_BAG",false);
|
||||
if (pNL != NULL)
|
||||
{
|
||||
uint32 indexInBag = pNL->getValue16();
|
||||
if (indexInBag != 0)
|
||||
{
|
||||
string sTmp = string(LOCAL_INVENTORY) + ":BAG:" + toString(indexInBag-1) + ":SHEET";
|
||||
CCDBNodeLeaf *pNLBag = pIM->getDbProp(sTmp,false);
|
||||
CCDBNodeLeaf *pNLBag = NLGUI::CDBManager::getInstance()->getDbProp(sTmp,false);
|
||||
if (pNLBag != NULL)
|
||||
{
|
||||
if (pNLBag->getValue32() == 0) // If no more item in this slot bag
|
||||
|
@ -1389,7 +1389,7 @@ static void checkEquipmentIntegrity(const string &equipVal)
|
|||
CDBCtrlSheet *pCSDst = getInventory().getEquipSheet(i);
|
||||
if (pCSDst == NULL) continue;
|
||||
string dstPath = getInventory().getDBIndexPath(pCSDst);
|
||||
sint32 indexDstPath = pIM->getDbProp(dstPath+":INDEX_IN_BAG")->getValue16();
|
||||
sint32 indexDstPath = NLGUI::CDBManager::getInstance()->getDbProp(dstPath+":INDEX_IN_BAG")->getValue16();
|
||||
|
||||
// Update the sheet id of the control sheet
|
||||
if (indexDstPath == (sint32)indexInBag)
|
||||
|
@ -1427,7 +1427,7 @@ void CInventoryManager::checkIndexInBagIntegrity()
|
|||
double CInventoryManager::getBranchBulk(const string &basePath, uint16 startItemIndex, uint16 numItems)
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeBranch *branch = pIM->getDbBranch(basePath);
|
||||
CCDBNodeBranch *branch = NLGUI::CDBManager::getInstance()->getDbBranch(basePath);
|
||||
if (!branch)
|
||||
{
|
||||
nlwarning("<getBranchBulk> Branch is NULL");
|
||||
|
@ -1469,7 +1469,7 @@ double CInventoryManager::getBranchBulk(const string &basePath, uint16 startItem
|
|||
void CInventoryManager::getBranchSlotCounts(const std::string &basePath, uint& nbUsedSlots, uint& nbMaxSlots )
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeBranch *branch = pIM->getDbBranch(basePath);
|
||||
CCDBNodeBranch *branch = NLGUI::CDBManager::getInstance()->getDbBranch(basePath);
|
||||
if (!branch)
|
||||
{
|
||||
nlwarning("<getBranchSlotCounts> Branch is NULL");
|
||||
|
@ -1540,15 +1540,15 @@ double CInventoryManager::getMaxBagBulk(uint32 inventoryIndex)
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *pNL=NULL;
|
||||
if (inventoryIndex == 0)
|
||||
pNL = pIM->getDbProp("SERVER:STATIC_DATA:BAG_BULK_MAX");
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:STATIC_DATA:BAG_BULK_MAX");
|
||||
else if (inventoryIndex == 1)
|
||||
pNL = pIM->getDbProp("SERVER:PACK_ANIMAL:BEAST0:BULK_MAX");
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:PACK_ANIMAL:BEAST0:BULK_MAX");
|
||||
else if (inventoryIndex == 2)
|
||||
pNL = pIM->getDbProp("SERVER:PACK_ANIMAL:BEAST1:BULK_MAX");
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:PACK_ANIMAL:BEAST1:BULK_MAX");
|
||||
else if (inventoryIndex == 3)
|
||||
pNL = pIM->getDbProp("SERVER:PACK_ANIMAL:BEAST2:BULK_MAX");
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:PACK_ANIMAL:BEAST2:BULK_MAX");
|
||||
else if (inventoryIndex == 4)
|
||||
pNL = pIM->getDbProp("SERVER:PACK_ANIMAL:BEAST3:BULK_MAX");
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:PACK_ANIMAL:BEAST3:BULK_MAX");
|
||||
if (pNL != NULL)
|
||||
return pNL->getValue32();
|
||||
return 0;
|
||||
|
@ -1561,8 +1561,8 @@ bool CInventoryManager::isSpaceInAllBagsForItem(CDBCtrlSheet *item)
|
|||
CDBCtrlSheet *pCSDst = item;
|
||||
if (!pCSDst->isSheetValid()) return false;
|
||||
string sTmp = pCSDst->getSheet();
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(sTmp+":SHEET",false);
|
||||
CCDBNodeLeaf *pNLquantity = pIM->getDbProp(sTmp+":QUANTITY",false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(sTmp+":SHEET",false);
|
||||
CCDBNodeLeaf *pNLquantity = NLGUI::CDBManager::getInstance()->getDbProp(sTmp+":QUANTITY",false);
|
||||
if (pNL == NULL) return false;
|
||||
if (pNLquantity == NULL) return false;
|
||||
|
||||
|
@ -1589,7 +1589,7 @@ bool CInventoryManager::isSpaceInBagForItem(CDBCtrlSheet *item, uint32 quantity,
|
|||
CDBCtrlSheet *pCSDst = item;
|
||||
if (!pCSDst->isSheetValid()) return false;
|
||||
string sTmp = pCSDst->getSheet();
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(sTmp+":SHEET",false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(sTmp+":SHEET",false);
|
||||
if (pNL == NULL) return false;
|
||||
|
||||
// Check if we can find empty space for this item (or stack of item)
|
||||
|
@ -1635,7 +1635,7 @@ CTempInvManager::CTempInvManager()
|
|||
string sPath = string("LOCAL:INVENTORY:TEMP");
|
||||
for (uint i = 0; i < MAX_TEMPINV_ENTRIES; ++i)
|
||||
{
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(sPath+":"+toString(i)+":SHEET", false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(sPath+":"+toString(i)+":SHEET", false);
|
||||
if (pNL != NULL)
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
|
@ -1643,7 +1643,7 @@ CTempInvManager::CTempInvManager()
|
|||
}
|
||||
}
|
||||
// Add Also the Mode to observe
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(sPath+":TYPE", false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(sPath+":TYPE", false);
|
||||
if(pNL)
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
|
@ -1651,20 +1651,20 @@ CTempInvManager::CTempInvManager()
|
|||
}
|
||||
|
||||
// Forage
|
||||
pNL = pIM->getDbProp(sPath+":ENABLE_TAKE");
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp(sPath+":ENABLE_TAKE");
|
||||
if (pNL != NULL)
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
pNL->addObserver(&_DBObs, textId);
|
||||
}
|
||||
pNL = pIM->getDbProp(sPath+":0:QUANTITY");
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp(sPath+":0:QUANTITY");
|
||||
_DBForageQQObs[0].WhichOne = 0;
|
||||
if (pNL != NULL)
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
pNL->addObserver(&_DBForageQQObs[0], textId);
|
||||
}
|
||||
pNL = pIM->getDbProp(sPath+":0:QUALITY");
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp(sPath+":0:QUALITY");
|
||||
_DBForageQQObs[1].WhichOne = 1;
|
||||
if (pNL != NULL)
|
||||
{
|
||||
|
@ -1696,14 +1696,14 @@ void CTempInvManager::update()
|
|||
for (uint i = 0; i < MAX_TEMPINV_ENTRIES; i++)
|
||||
{
|
||||
string sTmp = sPath + ":" + toString(i) + ":SHEET";
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(sTmp);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(sTmp);
|
||||
// uint32 nOldSheet = pNL->getOldValue32();
|
||||
uint32 nSheet = pNL->getValue32();
|
||||
if (nSheet != 0)
|
||||
bAllEmpty = false;
|
||||
}
|
||||
|
||||
_Mode = (TEMP_INV_MODE::TInventoryMode)pIM->getDbProp("LOCAL:INVENTORY:TEMP:TYPE")->getValue8();
|
||||
_Mode = (TEMP_INV_MODE::TInventoryMode)NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:TEMP:TYPE")->getValue8();
|
||||
|
||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_TEMPINV));
|
||||
if (pGC == NULL)
|
||||
|
@ -1721,8 +1721,8 @@ void CTempInvManager::update()
|
|||
if (_Mode == TEMP_INV_MODE::Forage)
|
||||
{
|
||||
// Disable/enable "Take all" button
|
||||
bool disableTake = (pIM->getDbProp(sPath+":ENABLE_TAKE")->getValue32() == 0);
|
||||
pIM->getDbProp("UI:TEMP_INV:ALL_EMPTY")->setValue32(disableTake);
|
||||
bool disableTake = (NLGUI::CDBManager::getInstance()->getDbProp(sPath+":ENABLE_TAKE")->getValue32() == 0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP_INV:ALL_EMPTY")->setValue32(disableTake);
|
||||
if ( disableTake )
|
||||
{
|
||||
// Display begin of forage
|
||||
|
@ -1739,7 +1739,7 @@ void CTempInvManager::update()
|
|||
else
|
||||
{
|
||||
// Write to the UI db the empty state
|
||||
pIM->getDbProp("UI:TEMP_INV:ALL_EMPTY")->setValue32(bAllEmpty);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP_INV:ALL_EMPTY")->setValue32(bAllEmpty);
|
||||
}
|
||||
|
||||
if (bAllEmpty)
|
||||
|
@ -1773,7 +1773,7 @@ void CTempInvManager::update()
|
|||
void CTempInvManager::updateType()
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
_Mode = (TEMP_INV_MODE::TInventoryMode)pIM->getDbProp("LOCAL:INVENTORY:TEMP:TYPE")->getValue8();
|
||||
_Mode = (TEMP_INV_MODE::TInventoryMode)NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:TEMP:TYPE")->getValue8();
|
||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_TEMPINV));
|
||||
// Something arrived, change text
|
||||
switch(_Mode)
|
||||
|
@ -1808,7 +1808,7 @@ void CTempInvManager::updateForageQQ( uint whichOne )
|
|||
|
||||
// Display forage progress with counters
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
bool disableTake = (pIM->getDbProp("LOCAL:INVENTORY:TEMP:ENABLE_TAKE")->getValue32() == 0);
|
||||
bool disableTake = (NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:TEMP:ENABLE_TAKE")->getValue32() == 0);
|
||||
if ( disableTake )
|
||||
{
|
||||
float qt = 0.f, ql = 0.f;
|
||||
|
@ -1816,7 +1816,7 @@ void CTempInvManager::updateForageQQ( uint whichOne )
|
|||
{
|
||||
case 0:
|
||||
{
|
||||
CCDBNodeLeaf *leafQt = pIM->getDbProp("LOCAL:INVENTORY:TEMP:0:QUANTITY");
|
||||
CCDBNodeLeaf *leafQt = NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:TEMP:0:QUANTITY");
|
||||
uint16 qtX10 = (uint16)(leafQt->getValue16());
|
||||
qt = _DBForageQQObs[whichOne].FullValue = (((float)(uint)qtX10) / 10.0f);
|
||||
leafQt->setValue16( (sint16)(sint)qt );
|
||||
|
@ -1825,7 +1825,7 @@ void CTempInvManager::updateForageQQ( uint whichOne )
|
|||
break;
|
||||
case 1:
|
||||
{
|
||||
CCDBNodeLeaf *leafQl = pIM->getDbProp("LOCAL:INVENTORY:TEMP:0:QUALITY");
|
||||
CCDBNodeLeaf *leafQl = NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:TEMP:0:QUALITY");
|
||||
uint16 qlX10 = (uint16)(leafQl->getValue16());
|
||||
ql = _DBForageQQObs[whichOne].FullValue = (((float)(uint)qlX10) / 10.0f);
|
||||
leafQl->setValue16( (sint16)(sint)ql );
|
||||
|
@ -1858,14 +1858,14 @@ void CTempInvManager::open(TEMP_INV_MODE::TInventoryMode m)
|
|||
for (uint i = 0; i < MAX_TEMPINV_ENTRIES; i++)
|
||||
{
|
||||
string sTmp = sPath + ":" + toString(i) + ":SHEET";
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(sTmp);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(sTmp);
|
||||
pNL->setValue32(0);
|
||||
}
|
||||
}
|
||||
pIM->getDbProp("LOCAL:INVENTORY:TEMP:TYPE")->setValue8((uint8)_Mode);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:TEMP:TYPE")->setValue8((uint8)_Mode);
|
||||
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
|
||||
if (pGC != NULL)
|
||||
{
|
||||
|
@ -1898,7 +1898,7 @@ void CTempInvManager::close()
|
|||
for (uint i = 0; i < MAX_TEMPINV_ENTRIES; i++)
|
||||
{
|
||||
string sTmp = sPath + ":" + toString(i) + ":SHEET";
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(sTmp);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(sTmp);
|
||||
pNL->setValue32(0);
|
||||
}
|
||||
|
||||
|
@ -1988,22 +1988,22 @@ bool SBagOptions::parse(xmlNodePtr cur, CInterfaceGroup * /* parentGroup */)
|
|||
}
|
||||
|
||||
prop = xmlGetProp (cur, (xmlChar*)"filter_armor");
|
||||
if (prop) DbFilterArmor = pIM->getDbProp(prop);
|
||||
if (prop) DbFilterArmor = NLGUI::CDBManager::getInstance()->getDbProp(prop);
|
||||
|
||||
prop = xmlGetProp (cur, (xmlChar*)"filter_weapon");
|
||||
if (prop) DbFilterWeapon = pIM->getDbProp(prop);
|
||||
if (prop) DbFilterWeapon = NLGUI::CDBManager::getInstance()->getDbProp(prop);
|
||||
|
||||
prop = xmlGetProp (cur, (xmlChar*)"filter_tool");
|
||||
if (prop) DbFilterTool = pIM->getDbProp(prop);
|
||||
if (prop) DbFilterTool = NLGUI::CDBManager::getInstance()->getDbProp(prop);
|
||||
|
||||
prop = xmlGetProp (cur, (xmlChar*)"filter_mp");
|
||||
if (prop) DbFilterMP = pIM->getDbProp(prop);
|
||||
if (prop) DbFilterMP = NLGUI::CDBManager::getInstance()->getDbProp(prop);
|
||||
|
||||
prop = xmlGetProp (cur, (xmlChar*)"filter_missmp");
|
||||
if (prop) DbFilterMissMP = pIM->getDbProp(prop);
|
||||
if (prop) DbFilterMissMP = NLGUI::CDBManager::getInstance()->getDbProp(prop);
|
||||
|
||||
prop = xmlGetProp (cur, (xmlChar*)"filter_tp");
|
||||
if (prop) DbFilterTP = pIM->getDbProp(prop);
|
||||
if (prop) DbFilterTP = NLGUI::CDBManager::getInstance()->getDbProp(prop);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -2178,7 +2178,7 @@ void CDBGroupListSheetBag::CSheetChildBag::init(CDBGroupListSheetText *pFather,
|
|||
{
|
||||
// Basic quality
|
||||
string db= Ctrl->getSheet()+":QUALITY";
|
||||
if( pIM->getDbProp(db, false) )
|
||||
if( NLGUI::CDBManager::getInstance()->getDbProp(db, false) )
|
||||
CurrentQuality.link ( db.c_str() );
|
||||
else
|
||||
{
|
||||
|
@ -2749,8 +2749,8 @@ class CHandlerInvDropTo : public IActionHandler
|
|||
// Get the index in the equipment
|
||||
string invPath2 = getInventory().getDBIndexPath(pCSDst);
|
||||
|
||||
sint32 i1 = pIM->getDbProp(invPath1+":INDEX_IN_BAG")->getValue16();
|
||||
sint32 i2 = pIM->getDbProp(invPath2+":INDEX_IN_BAG")->getValue16();
|
||||
sint32 i1 = NLGUI::CDBManager::getInstance()->getDbProp(invPath1+":INDEX_IN_BAG")->getValue16();
|
||||
sint32 i2 = NLGUI::CDBManager::getInstance()->getDbProp(invPath2+":INDEX_IN_BAG")->getValue16();
|
||||
|
||||
getInventory().unequip(invPath1);
|
||||
getInventory().unequip(invPath2);
|
||||
|
@ -2849,7 +2849,7 @@ class CHandlerInvTempToBag : public IActionHandler
|
|||
|
||||
// Disable the direct click on item in Forage mode and Can't take all
|
||||
if ( (CTempInvManager::getInstance()->getMode() == TEMP_INV_MODE::Forage) &&
|
||||
(pIM->getDbProp("LOCAL:INVENTORY:TEMP:ENABLE_TAKE")->getValue32() == 0) )
|
||||
(NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:TEMP:ENABLE_TAKE")->getValue32() == 0) )
|
||||
return;
|
||||
|
||||
CDBCtrlSheet *pCSDst = dynamic_cast<CDBCtrlSheet*>(pCaller);
|
||||
|
@ -2870,7 +2870,7 @@ class CHandlerInvTempToBag : public IActionHandler
|
|||
}
|
||||
|
||||
sTmp = pCSDst->getSheet();
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(sTmp+":SHEET",false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(sTmp+":SHEET",false);
|
||||
pNL->setValue32(0);
|
||||
|
||||
CBitMemStream out;
|
||||
|
@ -2915,8 +2915,8 @@ class CHandlerInvTempAll : public IActionHandler
|
|||
|
||||
for (uint32 itemNb = 0; itemNb < MAX_TEMPINV_ENTRIES; ++itemNb)
|
||||
{
|
||||
CCDBNodeLeaf *pNL = pIM->getDbProp(LOCAL_INVENTORY ":TEMP:" + toString(itemNb) + ":SHEET");
|
||||
CCDBNodeLeaf *pNLquantity = pIM->getDbProp(LOCAL_INVENTORY ":TEMP:" + toString(itemNb) + ":QUANTITY");
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":TEMP:" + toString(itemNb) + ":SHEET");
|
||||
CCDBNodeLeaf *pNLquantity = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":TEMP:" + toString(itemNb) + ":QUANTITY");
|
||||
if (pNL == NULL || pNLquantity == NULL) continue;
|
||||
if (pNL->getValue32() == 0 || pNLquantity->getValue32() == 0) continue;
|
||||
double itemBulk = pNLquantity->getValue32() * pInv->getItemBulk(pNL->getValue32());
|
||||
|
@ -3031,7 +3031,7 @@ uint CInventoryManager::getItemSheetForSlotId(uint slotId) const
|
|||
{
|
||||
if( InventoryIndexes[i] == (slotId>>CItemInfos::SlotIdIndexBitSize) )
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp( toString( "SERVER:%s:%d:SHEET", InventoryDBs[i].c_str(), (slotId&CItemInfos::SlotIdIndexBitMask)), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp( toString( "SERVER:%s:%d:SHEET", InventoryDBs[i].c_str(), (slotId&CItemInfos::SlotIdIndexBitMask)), false);
|
||||
if(node)
|
||||
return node->getValue32();
|
||||
else
|
||||
|
@ -3353,7 +3353,7 @@ bool CInventoryManager::isInventoryPresent(INVENTORIES::TInventory invId)
|
|||
// PA present?
|
||||
if(invId>=INVENTORIES::pet_animal && invId<INVENTORIES::pet_animal+MAX_INVENTORY_ANIMAL)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:STATUS", invId-INVENTORIES::pet_animal), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:STATUS", invId-INVENTORIES::pet_animal), false);
|
||||
if(!node) return false;
|
||||
uint status= node->getValue32();
|
||||
|
||||
|
@ -3361,11 +3361,11 @@ bool CInventoryManager::isInventoryPresent(INVENTORIES::TInventory invId)
|
|||
}
|
||||
else if (invId == INVENTORIES::guild)
|
||||
{
|
||||
return (pIM->getDbProp("UI:TEMP:INVENTORY_GUILD_OPENED", true)->getValue8() != 0);
|
||||
return (NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:INVENTORY_GUILD_OPENED", true)->getValue8() != 0);
|
||||
}
|
||||
else if (invId == INVENTORIES::player_room)
|
||||
{
|
||||
return (pIM->getDbProp("UI:TEMP:INVENTORY_ROOM_OPENED", true)->getValue8() != 0);
|
||||
return (NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:INVENTORY_ROOM_OPENED", true)->getValue8() != 0);
|
||||
}
|
||||
// other inventories (Bag...) are always present
|
||||
else
|
||||
|
@ -3381,7 +3381,7 @@ bool CInventoryManager::isInventoryAvailable(INVENTORIES::TInventory invId)
|
|||
// PA available?
|
||||
if(invId>=INVENTORIES::pet_animal && invId<INVENTORIES::pet_animal+MAX_INVENTORY_ANIMAL)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:STATUS", invId-INVENTORIES::pet_animal), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:STATUS", invId-INVENTORIES::pet_animal), false);
|
||||
if(!node) return false;
|
||||
uint status= node->getValue32();
|
||||
|
||||
|
@ -3389,11 +3389,11 @@ bool CInventoryManager::isInventoryAvailable(INVENTORIES::TInventory invId)
|
|||
}
|
||||
else if (invId == INVENTORIES::guild)
|
||||
{
|
||||
return (pIM->getDbProp("UI:TEMP:INVENTORY_GUILD_OPENED", true)->getValue8() != 0);
|
||||
return (NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:INVENTORY_GUILD_OPENED", true)->getValue8() != 0);
|
||||
}
|
||||
else if (invId == INVENTORIES::player_room)
|
||||
{
|
||||
return (pIM->getDbProp("UI:TEMP:INVENTORY_ROOM_OPENED", true)->getValue8() != 0);
|
||||
return (NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:INVENTORY_ROOM_OPENED", true)->getValue8() != 0);
|
||||
}
|
||||
// other inventories (Bag...) are always available
|
||||
else
|
||||
|
@ -3433,7 +3433,7 @@ bool CInventoryManager::isInventoryEmpty(INVENTORIES::TInventory invId)
|
|||
for (uint32 i = 0; (sint)i < nNbEntries; ++i)
|
||||
{
|
||||
CCDBNodeLeaf *pNL;
|
||||
pNL = pIM->getDbProp(sPath+toString(":%d:SHEET", i), false);
|
||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp(sPath+toString(":%d:SHEET", i), false);
|
||||
if (pNL == NULL) return true;
|
||||
if (pNL->getValue32() != 0)
|
||||
return false;
|
||||
|
|
|
@ -969,7 +969,7 @@ static sint32 getTargetSlotNr()
|
|||
{
|
||||
const char *dbPath = "UI:VARIABLES:TARGET:SLOT";
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *node = im->getDbProp(dbPath, false);
|
||||
CCDBNodeLeaf *node = NLGUI::CDBManager::getInstance()->getDbProp(dbPath, false);
|
||||
if (!node) return 0;
|
||||
if ((uint8) node->getValue32() == (uint8) CLFECOMMON::INVALID_SLOT)
|
||||
{
|
||||
|
@ -982,7 +982,7 @@ static CEntityCL *getTargetEntity()
|
|||
{
|
||||
const char *dbPath = "UI:VARIABLES:TARGET:SLOT";
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *node = im->getDbProp(dbPath, false);
|
||||
CCDBNodeLeaf *node = NLGUI::CDBManager::getInstance()->getDbProp(dbPath, false);
|
||||
if (!node) return NULL;
|
||||
if ((uint8) node->getValue32() == (uint8) CLFECOMMON::INVALID_SLOT)
|
||||
{
|
||||
|
@ -2224,7 +2224,7 @@ int CLuaIHMRyzom::isPlayerNewbie(CLuaState &ls)
|
|||
{
|
||||
CLuaIHM::checkArgCount(ls, "isPlayerNewbie", 0);
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
ls.push(im->getDbProp("SERVER:USER:IS_NEWBIE")->getValueBool());
|
||||
ls.push(NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:IS_NEWBIE")->getValueBool());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -2754,7 +2754,7 @@ sint32 CLuaIHMRyzom::getDbProp(const std::string &dbProp)
|
|||
{
|
||||
//H_AUTO(Lua_CLuaIHM_getDbProp)
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(dbProp, false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(dbProp, false);
|
||||
if(node)
|
||||
return node->getValue32();
|
||||
else
|
||||
|
@ -2784,7 +2784,7 @@ void CLuaIHMRyzom::setDbProp(const std::string &dbProp, sint32 value)
|
|||
|
||||
// Write to the DB if found
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(dbProp, false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(dbProp, false);
|
||||
|
||||
if(node)
|
||||
node->setValue32(value);
|
||||
|
@ -2812,7 +2812,7 @@ void CLuaIHMRyzom::delDbProp(const string &dbProp)
|
|||
|
||||
// Write to the DB if found
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
pIM->delDbProp(dbProp);
|
||||
NLGUI::CDBManager::getInstance()->delDbProp(dbProp);
|
||||
}
|
||||
|
||||
void CLuaIHMRyzom::addDbProp(const std::string &dbProp, sint32 value)
|
||||
|
@ -2835,7 +2835,7 @@ void CLuaIHMRyzom::addDbProp(const std::string &dbProp, sint32 value)
|
|||
|
||||
// Write to the DB if found
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(dbProp, true);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(dbProp, true);
|
||||
if(node)
|
||||
node->setValue32(value);
|
||||
}
|
||||
|
@ -3666,21 +3666,21 @@ sint32 CLuaIHMRyzom::getPlayerLevel()
|
|||
// ***************************************************************************
|
||||
sint64 CLuaIHMRyzom::getPlayerVpa()
|
||||
{
|
||||
sint64 prop = CInterfaceManager::getInstance()->getDbProp("SERVER:Entities:E0:P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
||||
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
||||
return prop;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
sint64 CLuaIHMRyzom::getPlayerVpb()
|
||||
{
|
||||
sint64 prop = CInterfaceManager::getInstance()->getDbProp("SERVER:Entities:E0:P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
||||
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
||||
return prop;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
sint64 CLuaIHMRyzom::getPlayerVpc()
|
||||
{
|
||||
sint64 prop = CInterfaceManager::getInstance()->getDbProp("SERVER:Entities:E0:P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
||||
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
||||
return prop;
|
||||
}
|
||||
|
||||
|
@ -3692,7 +3692,7 @@ sint32 CLuaIHMRyzom::getTargetLevel()
|
|||
if ( target->isPlayer() )
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *pDbPlayerLevel = pIM->getDbProp( pIM->getDefine("target_player_level") );
|
||||
CCDBNodeLeaf *pDbPlayerLevel = NLGUI::CDBManager::getInstance()->getDbProp( pIM->getDefine("target_player_level") );
|
||||
return pDbPlayerLevel ? pDbPlayerLevel->getValue32() : -1;
|
||||
}
|
||||
else
|
||||
|
@ -3722,7 +3722,7 @@ sint64 CLuaIHMRyzom::getTargetVpa()
|
|||
CEntityCL *target = getTargetEntity();
|
||||
if (!target) return 0;
|
||||
|
||||
sint64 prop = CInterfaceManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", getTargetSlotNr())+":P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
||||
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", getTargetSlotNr())+":P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
||||
|
||||
return prop;
|
||||
}
|
||||
|
@ -3733,7 +3733,7 @@ sint64 CLuaIHMRyzom::getTargetVpb()
|
|||
CEntityCL *target = getTargetEntity();
|
||||
if (!target) return 0;
|
||||
|
||||
sint64 prop = CInterfaceManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", getTargetSlotNr())+":P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
||||
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", getTargetSlotNr())+":P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
||||
|
||||
return prop;
|
||||
}
|
||||
|
@ -3744,7 +3744,7 @@ sint64 CLuaIHMRyzom::getTargetVpc()
|
|||
CEntityCL *target = getTargetEntity();
|
||||
if (!target) return 0;
|
||||
|
||||
sint64 prop = CInterfaceManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", getTargetSlotNr())+":P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
||||
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", getTargetSlotNr())+":P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
||||
|
||||
return prop;
|
||||
}
|
||||
|
@ -3757,7 +3757,7 @@ sint32 CLuaIHMRyzom::getTargetForceRegion()
|
|||
if ( target->isPlayer() )
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *pDbPlayerLevel = pIM->getDbProp( pIM->getDefine("target_player_level") );
|
||||
CCDBNodeLeaf *pDbPlayerLevel = NLGUI::CDBManager::getInstance()->getDbProp( pIM->getDefine("target_player_level") );
|
||||
if (!pDbPlayerLevel) return -1;
|
||||
sint nLevel = pDbPlayerLevel->getValue32();
|
||||
if ( nLevel < 250 )
|
||||
|
@ -3785,7 +3785,7 @@ sint32 CLuaIHMRyzom::getTargetLevelForce()
|
|||
if ( target->isPlayer() )
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *pDbPlayerLevel = pIM->getDbProp( pIM->getDefine("target_player_level") );
|
||||
CCDBNodeLeaf *pDbPlayerLevel = NLGUI::CDBManager::getInstance()->getDbProp( pIM->getDefine("target_player_level") );
|
||||
if (!pDbPlayerLevel) return -1;
|
||||
sint nLevel = pDbPlayerLevel->getValue32();
|
||||
if ( nLevel < 250 )
|
||||
|
|
|
@ -408,12 +408,12 @@ void CModalContainerEditCmd::create(const std::string &name, bool bDefKey, bool
|
|||
DbComboDisp2P = prefix + DB_EDITCMD_COMBO_DISPLAY_SECOND_PARAM;
|
||||
|
||||
// Create DB entry
|
||||
pIM->getDbProp(DbComboSelCat);
|
||||
pIM->getDbProp(DbComboSelAct);
|
||||
pIM->getDbProp(DbComboSel1P);
|
||||
pIM->getDbProp(DbComboSel2P);
|
||||
pIM->getDbProp(DbComboDisp1P);
|
||||
pIM->getDbProp(DbComboDisp2P);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(DbComboSelCat);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(DbComboSelAct);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(DbComboSel1P);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(DbComboSel2P);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(DbComboDisp1P);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(DbComboDisp2P);
|
||||
|
||||
vector< pair<string,string> > vArgs;
|
||||
vArgs.push_back(pair<string,string>("id",name));
|
||||
|
@ -497,12 +497,12 @@ void CModalContainerEditCmd::activate()
|
|||
if (pCB != NULL) pCB->resetTexts();
|
||||
// Clean up
|
||||
CurAM = NULL;
|
||||
pIM->getDbProp( DbComboSelCat )->setValue32(-1);
|
||||
pIM->getDbProp( DbComboSelAct )->setValue32(-1);
|
||||
pIM->getDbProp( DbComboSel1P )->setValue32(-1);
|
||||
pIM->getDbProp( DbComboSel2P )->setValue32(-1);
|
||||
pIM->getDbProp( DbComboDisp1P )->setValue32(-1);
|
||||
pIM->getDbProp( DbComboDisp2P )->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( DbComboSelCat )->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( DbComboSelAct )->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( DbComboSel1P )->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( DbComboSel2P )->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( DbComboDisp1P )->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( DbComboDisp2P )->setValue32(-1);
|
||||
// reset name of params
|
||||
CViewText *pViewParamName = dynamic_cast<CViewText*>(pIM->getElementFromId(WinName+VIEW_EDITCMD_FIRST_PARAM_NAME));
|
||||
if (pViewParamName != NULL) pViewParamName->setText (string(""));
|
||||
|
@ -583,13 +583,13 @@ void CModalContainerEditCmd::activateFrom (const std::string &cmdName, const std
|
|||
pCB->setSelection(catCBIndex);
|
||||
onChangeCategory();
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
//pIM->runActionHandler("editcmd_change_category",NULL);
|
||||
pCB = dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId(WinName+WIN_EDITCMD_COMBO_ACTION));
|
||||
pCB->setSelection(actCBIndex);
|
||||
onChangeAction();
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
//pIM->runActionHandler("editcmd_change_action",NULL);
|
||||
|
||||
// Count number of displayed param
|
||||
|
@ -639,8 +639,8 @@ void CModalContainerEditCmd::activateFrom (const std::string &cmdName, const std
|
|||
}
|
||||
else if (rP.Type == CBaseAction::CParameter::Constant)
|
||||
{
|
||||
if (noParam == 0) pIM->getDbProp( DbComboDisp1P )->setValue32(0);
|
||||
else pIM->getDbProp( DbComboDisp2P )->setValue32(0);
|
||||
if (noParam == 0) NLGUI::CDBManager::getInstance()->getDbProp( DbComboDisp1P )->setValue32(0);
|
||||
else NLGUI::CDBManager::getInstance()->getDbProp( DbComboDisp2P )->setValue32(0);
|
||||
|
||||
// Search the param value to get the position in combo box
|
||||
bool bValFound = false;
|
||||
|
@ -664,8 +664,8 @@ void CModalContainerEditCmd::activateFrom (const std::string &cmdName, const std
|
|||
}
|
||||
else if ((rP.Type == CBaseAction::CParameter::User) || (rP.Type == CBaseAction::CParameter::UserName))
|
||||
{
|
||||
if (noParam == 0) pIM->getDbProp( DbComboDisp1P )->setValue32(1);
|
||||
else pIM->getDbProp( DbComboDisp2P )->setValue32(1);
|
||||
if (noParam == 0) NLGUI::CDBManager::getInstance()->getDbProp( DbComboDisp1P )->setValue32(1);
|
||||
else NLGUI::CDBManager::getInstance()->getDbProp( DbComboDisp2P )->setValue32(1);
|
||||
|
||||
string sEditBox;
|
||||
if (noParam == 0) sEditBox = WinName+WIN_EDITCMD_COMBO_FIRST_PARAM_EDITBOX;
|
||||
|
@ -792,9 +792,9 @@ void CModalContainerEditCmd::invalidCurrentCommand()
|
|||
void CModalContainerEditCmd::validCurrentCommand()
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
sint32 catIndex= pIM->getDbProp( DbComboSelCat )->getValue32();
|
||||
sint32 catIndex= NLGUI::CDBManager::getInstance()->getDbProp( DbComboSelCat )->getValue32();
|
||||
if(catIndex < 0) return;
|
||||
sint32 actIndex= pIM->getDbProp( DbComboSelAct )->getValue32();
|
||||
sint32 actIndex= NLGUI::CDBManager::getInstance()->getDbProp( DbComboSelAct )->getValue32();
|
||||
if(actIndex < 0) return;
|
||||
|
||||
CActionsManager *pAM;
|
||||
|
@ -829,8 +829,8 @@ void CModalContainerEditCmd::validCurrentCommand()
|
|||
// cannot use index directly because some options may be disabled in current context
|
||||
sint32 paramIndex;
|
||||
const std::vector<CBaseAction::CParameter::CValue> &rVVal = rP.Values;
|
||||
if (noParam == 0) paramIndex = pIM->getDbProp(DbComboSel1P)->getValue32();
|
||||
else paramIndex = pIM->getDbProp(DbComboSel2P)->getValue32();
|
||||
if (noParam == 0) paramIndex = NLGUI::CDBManager::getInstance()->getDbProp(DbComboSel1P)->getValue32();
|
||||
else paramIndex = NLGUI::CDBManager::getInstance()->getDbProp(DbComboSel2P)->getValue32();
|
||||
|
||||
uint currIndex = 0;
|
||||
for (uint k = 0; k < rVVal.size(); ++k)
|
||||
|
@ -917,14 +917,14 @@ bool CModalContainerEditCmd::isParamValid (sint32 nParamIndex)
|
|||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
sint32 paramType;
|
||||
if (nParamIndex == 0) paramType = pIM->getDbProp(DbComboDisp1P)->getValue32();
|
||||
else paramType = pIM->getDbProp(DbComboDisp2P)->getValue32();
|
||||
if (nParamIndex == 0) paramType = NLGUI::CDBManager::getInstance()->getDbProp(DbComboDisp1P)->getValue32();
|
||||
else paramType = NLGUI::CDBManager::getInstance()->getDbProp(DbComboDisp2P)->getValue32();
|
||||
|
||||
if (paramType == 0) // combo box list
|
||||
{
|
||||
sint32 paramListIndex;
|
||||
if (nParamIndex == 0) paramListIndex = pIM->getDbProp( DbComboSel1P )->getValue32();
|
||||
else paramListIndex = pIM->getDbProp( DbComboSel2P )->getValue32();
|
||||
if (nParamIndex == 0) paramListIndex = NLGUI::CDBManager::getInstance()->getDbProp( DbComboSel1P )->getValue32();
|
||||
else paramListIndex = NLGUI::CDBManager::getInstance()->getDbProp( DbComboSel2P )->getValue32();
|
||||
|
||||
if (paramListIndex < 0) return false;
|
||||
else return true;
|
||||
|
@ -949,11 +949,11 @@ void CModalContainerEditCmd::checkCurrentCommandValidity()
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
// Get the category selected
|
||||
sint32 catIndex= pIM->getDbProp( DbComboSelCat )->getValue32();
|
||||
sint32 catIndex= NLGUI::CDBManager::getInstance()->getDbProp( DbComboSelCat )->getValue32();
|
||||
if(catIndex < 0) return;
|
||||
|
||||
// Get the action index selected
|
||||
sint32 actIndex= pIM->getDbProp( DbComboSelAct )->getValue32();
|
||||
sint32 actIndex= NLGUI::CDBManager::getInstance()->getDbProp( DbComboSelAct )->getValue32();
|
||||
if(actIndex < 0) return;
|
||||
|
||||
CActionsManager *pAM;
|
||||
|
@ -1003,7 +1003,7 @@ void CModalContainerEditCmd::onChangeCategory()
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
// Get the category selected
|
||||
sint32 catIndex= pIM->getDbProp( DbComboSelCat )->getValue32();
|
||||
sint32 catIndex= NLGUI::CDBManager::getInstance()->getDbProp( DbComboSelCat )->getValue32();
|
||||
if(catIndex < 0)
|
||||
return;
|
||||
|
||||
|
@ -1033,11 +1033,11 @@ void CModalContainerEditCmd::onChangeCategory()
|
|||
}
|
||||
|
||||
// reset the action and dont display params
|
||||
pIM->getDbProp( DbComboSelAct )->setValue32(-1);
|
||||
pIM->getDbProp( DbComboSel1P )->setValue32(-1);
|
||||
pIM->getDbProp( DbComboSel2P )->setValue32(-1);
|
||||
pIM->getDbProp( DbComboDisp1P )->setValue32(-1);
|
||||
pIM->getDbProp( DbComboDisp2P )->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( DbComboSelAct )->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( DbComboSel1P )->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( DbComboSel2P )->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( DbComboDisp1P )->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( DbComboDisp2P )->setValue32(-1);
|
||||
// reset name of params
|
||||
CViewText *pViewParamName;
|
||||
pViewParamName = dynamic_cast<CViewText*>(pIM->getElementFromId(WinName+VIEW_EDITCMD_FIRST_PARAM_NAME));
|
||||
|
@ -1055,12 +1055,12 @@ void CModalContainerEditCmd::onChangeAction()
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
// Get the category selected
|
||||
sint32 catIndex= pIM->getDbProp( DbComboSelCat )->getValue32();
|
||||
sint32 catIndex= NLGUI::CDBManager::getInstance()->getDbProp( DbComboSelCat )->getValue32();
|
||||
if(catIndex < 0)
|
||||
return;
|
||||
|
||||
// Get the action index selected
|
||||
sint32 actIndex= pIM->getDbProp( DbComboSelAct )->getValue32();
|
||||
sint32 actIndex= NLGUI::CDBManager::getInstance()->getDbProp( DbComboSelAct )->getValue32();
|
||||
if(actIndex < 0)
|
||||
return;
|
||||
|
||||
|
@ -1072,10 +1072,10 @@ void CModalContainerEditCmd::onChangeAction()
|
|||
const vector<CBaseAction> &rVBA = CurAM->getCategories()[catIndex].BaseActions;
|
||||
const vector<CBaseAction::CParameter> &rVParams = rVBA[actIndex].Parameters;
|
||||
|
||||
pIM->getDbProp( DbComboDisp1P )->setValue32(-1);
|
||||
pIM->getDbProp( DbComboDisp2P )->setValue32(-1);
|
||||
pIM->getDbProp( DbComboSel1P )->setValue32(-1);
|
||||
pIM->getDbProp( DbComboSel2P )->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( DbComboDisp1P )->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( DbComboDisp2P )->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( DbComboSel1P )->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( DbComboSel2P )->setValue32(-1);
|
||||
// reset name of params
|
||||
CViewText *pViewParamName;
|
||||
pViewParamName = dynamic_cast<CViewText*>(pIM->getElementFromId(WinName+VIEW_EDITCMD_FIRST_PARAM_NAME));
|
||||
|
@ -1131,7 +1131,7 @@ void CModalContainerEditCmd::onChangeAction()
|
|||
}
|
||||
}
|
||||
}
|
||||
pIM->getDbProp( sDB )->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( sDB )->setValue32(0);
|
||||
}
|
||||
else if ((rP.Type == CBaseAction::CParameter::User) || (rP.Type == CBaseAction::CParameter::UserName))
|
||||
{
|
||||
|
@ -1143,7 +1143,7 @@ void CModalContainerEditCmd::onChangeAction()
|
|||
{
|
||||
pEB->setInputString(ucstring(""));
|
||||
}
|
||||
pIM->getDbProp( sDB )->setValue32(1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp( sDB )->setValue32(1);
|
||||
}
|
||||
noParam++;
|
||||
}
|
||||
|
|
|
@ -232,7 +232,7 @@ void CMacroCmdManager::initInGame()
|
|||
}
|
||||
|
||||
// Do not begin at 0
|
||||
pIM->getDbProp("SERVER:USER:ACT_NUMBER")->setValue64(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:ACT_NUMBER")->setValue64(0);
|
||||
|
||||
// Create the NewKey container. Can edit key, and can assign all actions (not only macroisable ones)
|
||||
NewKey = new CModalContainerEditCmd;
|
||||
|
@ -489,7 +489,7 @@ void CMacroCmdManager::updateMacroExecution ()
|
|||
|
||||
// Flush interface links (else bug with Macro "Select ShortCutBar/Run Shortcut"
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
|
||||
if (bWaitForServer)
|
||||
{
|
||||
|
@ -553,7 +553,7 @@ public:
|
|||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CMacroCmdManager *pMCM = CMacroCmdManager::getInstance();
|
||||
pMCM->receiveActionEnd((uint8)pIM->getDbProp("SERVER:USER:ACT_NUMBER")->getValue64());
|
||||
pMCM->receiveActionEnd((uint8)NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:ACT_NUMBER")->getValue64());
|
||||
}
|
||||
};
|
||||
REGISTER_ACTION_HANDLER( CHandlerMacroRecActEnd, "macro_receive_action_end");
|
||||
|
|
|
@ -142,16 +142,16 @@ bool CHugeListObs::init()
|
|||
break;
|
||||
}
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
_Session = im->getDbProp(dbPath + ":SESSION", false);
|
||||
_Session = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + ":SESSION", false);
|
||||
if (!_Session) return false;
|
||||
_PageID = im->getDbProp(dbPath + ":PAGE_ID", false);
|
||||
_PageID = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + ":PAGE_ID", false);
|
||||
if (!_PageID) return false;
|
||||
_HasNext = im->getDbProp(dbPath + ":HAS_NEXT", false);
|
||||
_HasNext = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + ":HAS_NEXT", false);
|
||||
if (!_HasNext) return false;
|
||||
|
||||
// optional (rolemaster Trading only)
|
||||
_RoleMasterFlagDB = im->getDbProp(dbPath + ":ROLEMASTER_FLAGS", false);
|
||||
_RoleMasterRaceDB = im->getDbProp(dbPath + ":ROLEMASTER_RACE", false);
|
||||
_RoleMasterFlagDB = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + ":ROLEMASTER_FLAGS", false);
|
||||
_RoleMasterRaceDB = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + ":ROLEMASTER_RACE", false);
|
||||
|
||||
// get all items
|
||||
for(uint k = 0; k < TRADE_PAGE_NUM_ITEMS; ++k)
|
||||
|
@ -159,25 +159,25 @@ bool CHugeListObs::init()
|
|||
switch(_Category)
|
||||
{
|
||||
case Trading:
|
||||
_Items[k].SlotType = im->getDbProp(toString((dbPath + ":%d:SLOT_TYPE").c_str(), (int) k), false);
|
||||
_Items[k].Quality = im->getDbProp(toString((dbPath + ":%d:QUALITY").c_str(), (int) k), false);
|
||||
_Items[k].SheetIDOrSkill = im->getDbProp(toString((dbPath + ":%d:SHEET").c_str(), (int) k), false);
|
||||
_Items[k].Price = im->getDbProp(toString((dbPath + ":%d:PRICE").c_str(), (int) k), false);
|
||||
_Items[k].Weight = im->getDbProp(toString((dbPath + ":%d:WEIGHT").c_str(), (int) k), false);
|
||||
_Items[k].NameId = im->getDbProp(toString((dbPath + ":%d:NAMEID").c_str(), (int) k), false);
|
||||
_Items[k].UserColor = im->getDbProp(toString((dbPath + ":%d:USER_COLOR").c_str(), (int) k), false);
|
||||
_Items[k].Enchant = im->getDbProp(toString((dbPath + ":%d:ENCHANT").c_str(), (int) k), false);
|
||||
_Items[k].RMClassType = im->getDbProp(toString((dbPath + ":%d:RM_CLASS_TYPE").c_str(), (int) k), false);
|
||||
_Items[k].RMFaberStatType = im->getDbProp(toString((dbPath + ":%d:RM_FABER_STAT_TYPE").c_str(), (int) k), false);
|
||||
_Items[k].PrerequisitValid = im->getDbProp(toString((dbPath + ":%d:PREREQUISIT_VALID").c_str(), (int) k), false);
|
||||
_Items[k].InfoVersion = im->getDbProp(toString((dbPath + ":%d:INFO_VERSION").c_str(), (int) k), false);
|
||||
_Items[k].Quantity = im->getDbProp(toString((dbPath + ":%d:QUANTITY").c_str(), (int) k), false);
|
||||
_Items[k].PriceRetire = im->getDbProp(toString((dbPath + ":%d:PRICE_RETIRE").c_str(), (int) k), false);
|
||||
_Items[k].ResaleTimeLeft = im->getDbProp(toString((dbPath + ":%d:RESALE_TIME_LEFT").c_str(), (int) k), false);
|
||||
_Items[k].VendorNameId = im->getDbProp(toString((dbPath + ":%d:VENDOR_NAMEID").c_str(), (int) k), false);
|
||||
_Items[k].FactionType = im->getDbProp(toString((dbPath + ":%d:FACTION_TYPE").c_str(), (int) k), false);
|
||||
_Items[k].FactionPointPrice = im->getDbProp(toString((dbPath + ":%d:PRICE").c_str(), (int) k), false);
|
||||
_Items[k].SellerType = im->getDbProp(toString((dbPath + ":%d:SELLER_TYPE").c_str(), (int) k), false);
|
||||
_Items[k].SlotType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:SLOT_TYPE").c_str(), (int) k), false);
|
||||
_Items[k].Quality = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:QUALITY").c_str(), (int) k), false);
|
||||
_Items[k].SheetIDOrSkill = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:SHEET").c_str(), (int) k), false);
|
||||
_Items[k].Price = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:PRICE").c_str(), (int) k), false);
|
||||
_Items[k].Weight = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:WEIGHT").c_str(), (int) k), false);
|
||||
_Items[k].NameId = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:NAMEID").c_str(), (int) k), false);
|
||||
_Items[k].UserColor = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:USER_COLOR").c_str(), (int) k), false);
|
||||
_Items[k].Enchant = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:ENCHANT").c_str(), (int) k), false);
|
||||
_Items[k].RMClassType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:RM_CLASS_TYPE").c_str(), (int) k), false);
|
||||
_Items[k].RMFaberStatType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:RM_FABER_STAT_TYPE").c_str(), (int) k), false);
|
||||
_Items[k].PrerequisitValid = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:PREREQUISIT_VALID").c_str(), (int) k), false);
|
||||
_Items[k].InfoVersion = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:INFO_VERSION").c_str(), (int) k), false);
|
||||
_Items[k].Quantity = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:QUANTITY").c_str(), (int) k), false);
|
||||
_Items[k].PriceRetire = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:PRICE_RETIRE").c_str(), (int) k), false);
|
||||
_Items[k].ResaleTimeLeft = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:RESALE_TIME_LEFT").c_str(), (int) k), false);
|
||||
_Items[k].VendorNameId = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:VENDOR_NAMEID").c_str(), (int) k), false);
|
||||
_Items[k].FactionType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:FACTION_TYPE").c_str(), (int) k), false);
|
||||
_Items[k].FactionPointPrice = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:PRICE").c_str(), (int) k), false);
|
||||
_Items[k].SellerType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:SELLER_TYPE").c_str(), (int) k), false);
|
||||
if ((_Items[k].SlotType == NULL) || (_Items[k].Quality == NULL) || (_Items[k].SheetIDOrSkill == NULL) ||
|
||||
(_Items[k].Price == NULL) || (_Items[k].Weight==NULL) || (_Items[k].InfoVersion==NULL) ||
|
||||
(_Items[k].UserColor==NULL) || (_Items[k].NameId==NULL) || (_Items[k].Quantity==NULL) ||
|
||||
|
@ -189,18 +189,18 @@ bool CHugeListObs::init()
|
|||
return false;
|
||||
break;
|
||||
case ItemForMissions:
|
||||
_Items[k].SlotType = im->getDbProp(toString((dbPath + ":%d:SLOT_TYPE").c_str(), (int) k), false);
|
||||
_Items[k].Quality = im->getDbProp(toString((dbPath + ":%d:QUALITY").c_str(), (int) k), false);
|
||||
_Items[k].SheetIDOrSkill = im->getDbProp(toString((dbPath + ":%d:SHEET").c_str(), (int) k), false);
|
||||
_Items[k].LogicTextID = im->getDbProp(toString((dbPath + ":%d:LOGIC_TEXT_ID").c_str(), (int) k), false);
|
||||
_Items[k].DescTextID = im->getDbProp(toString((dbPath + ":%d:DESC_TEXT_ID").c_str(), (int) k), false);
|
||||
_Items[k].Weight = im->getDbProp(toString((dbPath + ":%d:WEIGHT").c_str(), (int) k), false);
|
||||
_Items[k].NameId = im->getDbProp(toString((dbPath + ":%d:NAMEID").c_str(), (int) k), false);
|
||||
_Items[k].UserColor = im->getDbProp(toString((dbPath + ":%d:USER_COLOR").c_str(), (int) k), false);
|
||||
_Items[k].Enchant = im->getDbProp(toString((dbPath + ":%d:ENCHANT").c_str(), (int) k), false);
|
||||
_Items[k].RMClassType = im->getDbProp(toString((dbPath + ":%d:RM_CLASS_TYPE").c_str(), (int) k), false);
|
||||
_Items[k].RMFaberStatType = im->getDbProp(toString((dbPath + ":%d:RM_FABER_STAT_TYPE").c_str(), (int) k), false);
|
||||
_Items[k].InfoVersion = im->getDbProp(toString((dbPath + ":%d:INFO_VERSION").c_str(), (int) k), false);
|
||||
_Items[k].SlotType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:SLOT_TYPE").c_str(), (int) k), false);
|
||||
_Items[k].Quality = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:QUALITY").c_str(), (int) k), false);
|
||||
_Items[k].SheetIDOrSkill = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:SHEET").c_str(), (int) k), false);
|
||||
_Items[k].LogicTextID = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:LOGIC_TEXT_ID").c_str(), (int) k), false);
|
||||
_Items[k].DescTextID = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:DESC_TEXT_ID").c_str(), (int) k), false);
|
||||
_Items[k].Weight = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:WEIGHT").c_str(), (int) k), false);
|
||||
_Items[k].NameId = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:NAMEID").c_str(), (int) k), false);
|
||||
_Items[k].UserColor = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:USER_COLOR").c_str(), (int) k), false);
|
||||
_Items[k].Enchant = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:ENCHANT").c_str(), (int) k), false);
|
||||
_Items[k].RMClassType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:RM_CLASS_TYPE").c_str(), (int) k), false);
|
||||
_Items[k].RMFaberStatType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:RM_FABER_STAT_TYPE").c_str(), (int) k), false);
|
||||
_Items[k].InfoVersion = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:INFO_VERSION").c_str(), (int) k), false);
|
||||
if ((_Items[k].SlotType == NULL) || (_Items[k].Quality == NULL) || (_Items[k].SheetIDOrSkill == NULL) ||
|
||||
(_Items[k].LogicTextID == NULL) || (_Items[k].DescTextID == NULL) ||
|
||||
(_Items[k].Weight==NULL) || (_Items[k].InfoVersion==NULL) || (_Items[k].UserColor==NULL) ||
|
||||
|
@ -210,16 +210,16 @@ bool CHugeListObs::init()
|
|||
return false;
|
||||
break;
|
||||
case Ascensor:
|
||||
_Items[k].GuildIcon = im->getDbProp(toString((dbPath + ":%d:ICON").c_str(), (int) k), false);
|
||||
_Items[k].GuildName = im->getDbProp(toString((dbPath + ":%d:NAME").c_str(), (int) k), false);
|
||||
_Items[k].GuildIcon = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:ICON").c_str(), (int) k), false);
|
||||
_Items[k].GuildName = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:NAME").c_str(), (int) k), false);
|
||||
if ((_Items[k].GuildIcon == NULL) || (_Items[k].GuildName == NULL))
|
||||
return false;
|
||||
break;
|
||||
case Missions:
|
||||
_Items[k].MissionDetailText = im->getDbProp(toString((dbPath + ":%d:DETAIL_TEXT").c_str(), (int) k), false);
|
||||
_Items[k].MissionText = im->getDbProp(toString((dbPath + ":%d:TEXT").c_str(), (int) k), false);
|
||||
_Items[k].MissionIcon = im->getDbProp(toString((dbPath + ":%d:ICON").c_str(), (int) k), false);
|
||||
_Items[k].MissionPreReqState = im->getDbProp(toString((dbPath + ":%d:PREREQ_STATE").c_str(), (int) k), false);
|
||||
_Items[k].MissionDetailText = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:DETAIL_TEXT").c_str(), (int) k), false);
|
||||
_Items[k].MissionText = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:TEXT").c_str(), (int) k), false);
|
||||
_Items[k].MissionIcon = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:ICON").c_str(), (int) k), false);
|
||||
_Items[k].MissionPreReqState = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:PREREQ_STATE").c_str(), (int) k), false);
|
||||
if ((_Items[k].MissionText == NULL) || (_Items[k].MissionIcon == NULL) ||
|
||||
(_Items[k].MissionDetailText == NULL) || (_Items[k].MissionPreReqState == NULL))
|
||||
return false;
|
||||
|
@ -249,29 +249,29 @@ void CHugeListObs::start()
|
|||
switch(_Category)
|
||||
{
|
||||
case Trading:
|
||||
leaf = im->getDbProp(toString(DB_LOCAL_BRANCH_FOR_ITEM_FOR_MONEY ":%d:SHEET", (int) k), false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(toString(DB_LOCAL_BRANCH_FOR_ITEM_FOR_MONEY ":%d:SHEET", (int) k), false);
|
||||
if (leaf) leaf->setValue32(0);
|
||||
leaf = im->getDbProp(toString(DB_LOCAL_BRANCH_FOR_ITEM_FOR_MONEY ":%d:SLOT_TYPE", (int) k), false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(toString(DB_LOCAL_BRANCH_FOR_ITEM_FOR_MONEY ":%d:SLOT_TYPE", (int) k), false);
|
||||
if (leaf) leaf->setValue32(0);
|
||||
break;
|
||||
case ItemForMissions:
|
||||
leaf = im->getDbProp(toString(DB_LOCAL_BRANCH_FOR_ITEM_FOR_MISSION ":%d:SHEET", (int) k), false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(toString(DB_LOCAL_BRANCH_FOR_ITEM_FOR_MISSION ":%d:SHEET", (int) k), false);
|
||||
if (leaf) leaf->setValue32(0);
|
||||
leaf = im->getDbProp(toString(DB_LOCAL_BRANCH_FOR_ITEM_FOR_MISSION ":%d:SLOT_TYPE", (int) k), false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(toString(DB_LOCAL_BRANCH_FOR_ITEM_FOR_MISSION ":%d:SLOT_TYPE", (int) k), false);
|
||||
if (leaf) leaf->setValue32(0);
|
||||
break;
|
||||
case Ascensor:
|
||||
leaf = im->getDbProp(toString(DB_LOCAL_BRANCH_FOR_ASCENSOR":%d:ICON", (int) k), false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(toString(DB_LOCAL_BRANCH_FOR_ASCENSOR":%d:ICON", (int) k), false);
|
||||
if (leaf) leaf->setValue64(0);
|
||||
leaf = im->getDbProp(toString(DB_LOCAL_BRANCH_FOR_ASCENSOR":%d:NAME", (int) k), false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(toString(DB_LOCAL_BRANCH_FOR_ASCENSOR":%d:NAME", (int) k), false);
|
||||
if (leaf) leaf->setValue32(0);
|
||||
break;
|
||||
case Missions:
|
||||
leaf = im->getDbProp(toString(DB_LOCAL_BRANCH_FOR_MISSIONS":%d:ICON", (int) k), false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(toString(DB_LOCAL_BRANCH_FOR_MISSIONS":%d:ICON", (int) k), false);
|
||||
if (leaf) leaf->setValue64(0);
|
||||
leaf = im->getDbProp(toString(DB_LOCAL_BRANCH_FOR_MISSIONS":%d:TEXT", (int) k), false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(toString(DB_LOCAL_BRANCH_FOR_MISSIONS":%d:TEXT", (int) k), false);
|
||||
if (leaf) leaf->setValue32(0);
|
||||
leaf = im->getDbProp(toString(DB_LOCAL_BRANCH_FOR_MISSIONS":%d:DETAIL_TEXT", (int) k), false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(toString(DB_LOCAL_BRANCH_FOR_MISSIONS":%d:DETAIL_TEXT", (int) k), false);
|
||||
if (leaf) leaf->setValue32(0);
|
||||
break;
|
||||
default:
|
||||
|
@ -519,7 +519,7 @@ void CHugeListObs::updateUIItemPage(uint index)
|
|||
listSheet = dynamic_cast<CDBGroupListSheetText *>(im->getElementFromId(UI_LIST_OF_ITEMS_FOR_MONEY));
|
||||
}
|
||||
if (!listSheet) return;
|
||||
itemListCategoryLeaf = im->getDbProp("UI:TEMP:TYPE_OF_ITEMS_TO_BUY", false);
|
||||
itemListCategoryLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:TYPE_OF_ITEMS_TO_BUY", false);
|
||||
}
|
||||
break;
|
||||
case ItemForMissions:
|
||||
|
@ -527,7 +527,7 @@ void CHugeListObs::updateUIItemPage(uint index)
|
|||
dbPath = DB_LOCAL_BRANCH_FOR_ITEM_FOR_MISSION ":";
|
||||
listSheet = dynamic_cast<CDBGroupListSheetText *>(im->getElementFromId(UI_LIST_OF_ITEMS_FOR_MISSION));
|
||||
if (!listSheet) return;
|
||||
itemListCategoryLeaf = im->getDbProp("UI:TEMP:TYPE_OF_ITEMS_FOR_MISSION", false);
|
||||
itemListCategoryLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:TYPE_OF_ITEMS_FOR_MISSION", false);
|
||||
if (!itemListCategoryLeaf) return;
|
||||
// display the group for mission items
|
||||
CInterfaceElement *elm = im->getElementFromId(UI_GROUP_OF_ITEMS_FOR_MISSION);
|
||||
|
@ -567,86 +567,86 @@ void CHugeListObs::updateUIItemPage(uint index)
|
|||
switch(_Category)
|
||||
{
|
||||
case Trading:
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":QUALITY", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":QUALITY", false);
|
||||
if (leaf) leaf->setValue32(currItem.Quality);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SLOT_TYPE", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SLOT_TYPE", false);
|
||||
if (leaf) leaf->setValue32(currItem.SlotType);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SHEET", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SHEET", false);
|
||||
if (leaf) leaf->setValue32(currItem.SheetIDOrSkill);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":PRICE", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":PRICE", false);
|
||||
if (leaf) leaf->setValue32(currItem.Price);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":WEIGHT", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":WEIGHT", false);
|
||||
if (leaf) leaf->setValue32(currItem.Weight);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":NAMEID", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":NAMEID", false);
|
||||
if (leaf) leaf->setValue32(currItem.NameId);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":USER_COLOR", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":USER_COLOR", false);
|
||||
if (leaf) leaf->setValue32(currItem.UserColor);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":ENCHANT", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":ENCHANT", false);
|
||||
if (leaf) leaf->setValue32(currItem.Enchant);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":RM_CLASS_TYPE", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":RM_CLASS_TYPE", false);
|
||||
if (leaf) leaf->setValue32(currItem.RMClassType);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":RM_FABER_STAT_TYPE", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":RM_FABER_STAT_TYPE", false);
|
||||
if (leaf) leaf->setValue32(currItem.RMFaberStatType);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":PREREQUISIT_VALID", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":PREREQUISIT_VALID", false);
|
||||
if (leaf) leaf->setValue32(currItem.PrerequisitValid);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":INFO_VERSION", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":INFO_VERSION", false);
|
||||
if (leaf) leaf->setValue32(currItem.InfoVersion);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":QUANTITY", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":QUANTITY", false);
|
||||
if (leaf) leaf->setValue32(currItem.Quantity);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":PRICE_RETIRE", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":PRICE_RETIRE", false);
|
||||
if (leaf) leaf->setValue32(currItem.PriceRetire);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":RESALE_TIME_LEFT", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":RESALE_TIME_LEFT", false);
|
||||
if (leaf) leaf->setValue32(currItem.ResaleTimeLeft);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SELLER_TYPE", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SELLER_TYPE", false);
|
||||
if (leaf) leaf->setValue32(currItem.SellerType);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":VENDOR_NAMEID", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":VENDOR_NAMEID", false);
|
||||
if (leaf) leaf->setValue32(currItem.VendorNameId);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":FACTION_TYPE", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":FACTION_TYPE", false);
|
||||
if (leaf) leaf->setValue32(currItem.FactionType);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":PRICE", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":PRICE", false);
|
||||
if (leaf) leaf->setValue32(currItem.FactionPointPrice);
|
||||
|
||||
break;
|
||||
case ItemForMissions:
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":QUALITY", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":QUALITY", false);
|
||||
if (leaf) leaf->setValue32(currItem.Quality);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SLOT_TYPE", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SLOT_TYPE", false);
|
||||
if (leaf) leaf->setValue32(currItem.SlotType);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SHEET", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SHEET", false);
|
||||
if (leaf) leaf->setValue32(currItem.SheetIDOrSkill);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":LOGIC_TEXT_ID", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":LOGIC_TEXT_ID", false);
|
||||
if (leaf) leaf->setValue32(currItem.LogicTextID);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":DESC_TEXT_ID", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":DESC_TEXT_ID", false);
|
||||
if (leaf) leaf->setValue32(currItem.DescTextID);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":WEIGHT", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":WEIGHT", false);
|
||||
if (leaf) leaf->setValue32(currItem.Weight);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":NAMEID", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":NAMEID", false);
|
||||
if (leaf) leaf->setValue32(currItem.NameId);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":USER_COLOR", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":USER_COLOR", false);
|
||||
if (leaf) leaf->setValue32(currItem.UserColor);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":ENCHANT", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":ENCHANT", false);
|
||||
if (leaf) leaf->setValue32(currItem.Enchant);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":RM_CLASS", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":RM_CLASS", false);
|
||||
if (leaf) leaf->setValue32(currItem.RMClassType);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":RM_FABER_STAT_TYPE", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":RM_FABER_STAT_TYPE", false);
|
||||
if (leaf) leaf->setValue32(currItem.RMFaberStatType);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":INFO_VERSION", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":INFO_VERSION", false);
|
||||
if (leaf) leaf->setValue32(currItem.InfoVersion);
|
||||
break;
|
||||
case Ascensor:
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":ICON", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":ICON", false);
|
||||
if (leaf) leaf->setValue64(currItem.GuildIcon);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":NAME", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":NAME", false);
|
||||
if (leaf) leaf->setValue32(currItem.GuildName);
|
||||
break;
|
||||
case Missions:
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":TEXT", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":TEXT", false);
|
||||
if (leaf) leaf->setValue64(currItem.MissionText);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":DETAIL_TEXT", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":DETAIL_TEXT", false);
|
||||
if (leaf) leaf->setValue64(currItem.MissionDetailText);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":ICON", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":ICON", false);
|
||||
if (leaf) leaf->setValue32(currItem.MissionIcon);
|
||||
leaf = im->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":PREREQ_STATE", false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":PREREQ_STATE", false);
|
||||
if (leaf) leaf->setValue32(currItem.MissionPreReqState);
|
||||
break;
|
||||
default:
|
||||
|
@ -717,10 +717,10 @@ void CHugeListObs::setPriceInDB(uint32 value, const std::string &ls, const std::
|
|||
CSeeds money;
|
||||
money.setTotal(value);
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
im->getDbProp(ls)->setValue64(money.getLS());
|
||||
im->getDbProp(ms)->setValue64(money.getMS());
|
||||
im->getDbProp(bs)->setValue64(money.getBS());
|
||||
im->getDbProp(vbs)->setValue64(money.getVBS());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(ls)->setValue64(money.getLS());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(ms)->setValue64(money.getMS());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(bs)->setValue64(money.getBS());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(vbs)->setValue64(money.getVBS());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -934,9 +934,9 @@ class CHandlerChatGroupFilter : public IActionHandler
|
|||
}
|
||||
|
||||
// inform DB for write right.
|
||||
pIM->getDbProp("UI:VARIABLES:MAIN_CHAT:WRITE_RIGHT")->setValue32(writeRight);
|
||||
pIM->getDbProp("UI:VARIABLES:MAIN_CHAT:IS_DYN_CHAT")->setValue32(isDynChat);
|
||||
pIM->getDbProp("UI:VARIABLES:MAIN_CHAT:INDEX_DYN_CHAT")->setValue32(dynChatDbIndex);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:MAIN_CHAT:WRITE_RIGHT")->setValue32(writeRight);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:MAIN_CHAT:IS_DYN_CHAT")->setValue32(isDynChat);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:MAIN_CHAT:INDEX_DYN_CHAT")->setValue32(dynChatDbIndex);
|
||||
|
||||
|
||||
// Update Chat Group Window from user chat button
|
||||
|
@ -968,7 +968,7 @@ class CHandlerChatGroupFilter : public IActionHandler
|
|||
case CChatGroup::universe: pUserBut->setHardText("uiFilterUniverse"); break;
|
||||
case CChatGroup::dyn_chat:
|
||||
uint32 index = PeopleInterraction.TheUserChat.Filter.getTargetDynamicChannelDbIndex();
|
||||
uint32 textId = pIM->getDbProp("SERVER:DYN_CHAT:CHANNEL"+toString(index)+":NAME")->getValue32();
|
||||
uint32 textId = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:DYN_CHAT:CHANNEL"+toString(index)+":NAME")->getValue32();
|
||||
ucstring title;
|
||||
STRING_MANAGER::CStringManagerClient::instance()->getDynString(textId, title);
|
||||
if (title.empty())
|
||||
|
@ -1326,7 +1326,7 @@ void CPeopleInterraction::addContactInList(uint32 contactId, const ucstring &nam
|
|||
}
|
||||
|
||||
CInterfaceManager* pIM= CInterfaceManager::getInstance();
|
||||
CPeopleList::TSortOrder order = (CPeopleList::TSortOrder)(pIM->getDbProp("UI:SAVE:CONTACT_LIST:SORT_ORDER")->getValue32());
|
||||
CPeopleList::TSortOrder order = (CPeopleList::TSortOrder)(NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CONTACT_LIST:SORT_ORDER")->getValue32());
|
||||
FriendList.sortEx(order);
|
||||
}
|
||||
|
||||
|
@ -1351,7 +1351,7 @@ void CPeopleInterraction::addContactInList(uint32 contactId, uint32 nameID, TCha
|
|||
WaitingContacts.push_back(w);
|
||||
|
||||
CInterfaceManager* pIM= CInterfaceManager::getInstance();
|
||||
CPeopleList::TSortOrder order = (CPeopleList::TSortOrder)(pIM->getDbProp("UI:SAVE:CONTACT_LIST:SORT_ORDER")->getValue32());
|
||||
CPeopleList::TSortOrder order = (CPeopleList::TSortOrder)(NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CONTACT_LIST:SORT_ORDER")->getValue32());
|
||||
FriendList.sortEx(order);
|
||||
}
|
||||
}
|
||||
|
@ -1423,7 +1423,7 @@ void CPeopleInterraction::updateContactInList(uint32 contactId, TCharConnectionS
|
|||
// Only do work if online status has changed
|
||||
if (FriendList.getOnline(index) != online)
|
||||
{
|
||||
CCDBNodeLeaf* node = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_ONLINE_OFFLINE_NOTIFICATIONS_CB", false);
|
||||
CCDBNodeLeaf* node = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_ONLINE_OFFLINE_NOTIFICATIONS_CB", false);
|
||||
if (node && node->getValueBool())
|
||||
{
|
||||
// Only show the message if this player is not in my guild (because then the guild manager will show a message)
|
||||
|
@ -1979,7 +1979,7 @@ class CHandlerTeamTarget : public IActionHandler
|
|||
{
|
||||
// Get the team name id.
|
||||
CLFECOMMON::TClientDataSetIndex entityId= CLFECOMMON::INVALID_CLIENT_DATASET_INDEX;
|
||||
CCDBNodeLeaf *prop = pIM->getDbProp(toString(TEAM_DB_PATH ":%d:UID", peopleIndex), false);
|
||||
CCDBNodeLeaf *prop = NLGUI::CDBManager::getInstance()->getDbProp(toString(TEAM_DB_PATH ":%d:UID", peopleIndex), false);
|
||||
if (prop)
|
||||
entityId= prop->getValue32();
|
||||
|
||||
|
@ -2082,7 +2082,7 @@ public:
|
|||
{
|
||||
if (ClientCfg.Local)
|
||||
{
|
||||
CInterfaceManager::getInstance()->getDbProp(TEAM_DB_PATH ":SUCCESSOR_INDEX")->setValue32(peopleIndex);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(TEAM_DB_PATH ":SUCCESSOR_INDEX")->setValue32(peopleIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2350,8 +2350,8 @@ public:
|
|||
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
||||
{
|
||||
CInterfaceManager* pIM= CInterfaceManager::getInstance();
|
||||
nlinfo("Load Order : %d", pIM->getDbProp("UI:SAVE:CONTACT_LIST:SORT_ORDER")->getValue32());
|
||||
CPeopleList::TSortOrder order = (CPeopleList::TSortOrder)(pIM->getDbProp("UI:SAVE:CONTACT_LIST:SORT_ORDER")->getValue32());
|
||||
nlinfo("Load Order : %d", NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CONTACT_LIST:SORT_ORDER")->getValue32());
|
||||
CPeopleList::TSortOrder order = (CPeopleList::TSortOrder)(NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CONTACT_LIST:SORT_ORDER")->getValue32());
|
||||
|
||||
order = (CPeopleList::TSortOrder)(order + 1);
|
||||
if (order == CPeopleList::END_SORT_ORDER)
|
||||
|
@ -2360,7 +2360,7 @@ public:
|
|||
}
|
||||
|
||||
nlinfo("Save Order : %d", order);
|
||||
pIM->getDbProp("UI:SAVE:CONTACT_LIST:SORT_ORDER")->setValue32((sint32)order);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CONTACT_LIST:SORT_ORDER")->setValue32((sint32)order);
|
||||
CPeopleList *pl = PeopleInterraction.getPeopleListFromCurrentMenu();
|
||||
if (pl)
|
||||
pl->sortEx(order);
|
||||
|
@ -2645,8 +2645,8 @@ public:
|
|||
CViewTextMenu *pMenuUniverse = dynamic_cast<CViewTextMenu*>(pMenu->getElement("ui:interface:user_chat_target_menu:universe"));
|
||||
CViewTextMenu *pMenuTeam = dynamic_cast<CViewTextMenu*>(pMenu->getElement("ui:interface:user_chat_target_menu:team"));
|
||||
CViewTextMenu *pMenuGuild = dynamic_cast<CViewTextMenu*>(pMenu->getElement("ui:interface:user_chat_target_menu:guild"));
|
||||
const bool teamActive = pIM->getDbProp("SERVER:GROUP:0:PRESENT")->getValueBool();
|
||||
const bool guildActive = pIM->getDbProp("SERVER:GUILD:NAME")->getValueBool();
|
||||
const bool teamActive = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GROUP:0:PRESENT")->getValueBool();
|
||||
const bool guildActive = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:NAME")->getValueBool();
|
||||
if (pMenuAround) pMenuAround->setGrayed (false);
|
||||
if (pMenuRegion) pMenuRegion->setGrayed (false);
|
||||
if (pMenuUniverse) pMenuUniverse->setGrayed (false);
|
||||
|
@ -2668,7 +2668,7 @@ public:
|
|||
bool active = (textId != 0);
|
||||
if (active)
|
||||
{
|
||||
uint32 canWrite = im->getDbProp("SERVER:DYN_CHAT:CHANNEL"+s+":WRITE_RIGHT")->getValue32();
|
||||
uint32 canWrite = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:DYN_CHAT:CHANNEL"+s+":WRITE_RIGHT")->getValue32();
|
||||
if (canWrite != 0)
|
||||
{
|
||||
ucstring title;
|
||||
|
@ -2787,7 +2787,7 @@ class CHandlerLeaveTeamChat : public IActionHandler
|
|||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
if( im )
|
||||
{
|
||||
if( !im->getDbProp("UI:VARIABLES:IS_TEAM_PRESENT")->getValueBool() )
|
||||
if( !NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:IS_TEAM_PRESENT")->getValueBool() )
|
||||
{
|
||||
ChatMngr.updateChatModeAndButton(CChatGroup::say);
|
||||
}
|
||||
|
@ -2893,8 +2893,8 @@ class CHandlerSelectChatSource : public IActionHandler
|
|||
{
|
||||
// This is neither the ChatGroup, nor the UserChat. Should not be here.
|
||||
// Just open the STD chat menu, and quit
|
||||
im->getDbProp("UI:VARIABLES:GC_POPUP")->setValue64(cw->getContainer()->isPopuped() || cw->getContainer()->getLayerSetup() == 0 ? 1 : 0);
|
||||
im->getDbProp("UI:VARIABLES:GC_HAS_HELP")->setValue64(!cw->getContainer()->getHelpPage().empty());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:GC_POPUP")->setValue64(cw->getContainer()->isPopuped() || cw->getContainer()->getLayerSetup() == 0 ? 1 : 0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:GC_HAS_HELP")->setValue64(!cw->getContainer()->getHelpPage().empty());
|
||||
CInterfaceManager::getInstance()->enableModalWindow(pCaller, STD_CHAT_SOURCE_MENU);
|
||||
return;
|
||||
}
|
||||
|
@ -2995,8 +2995,8 @@ class CHandlerSelectChatSource : public IActionHandler
|
|||
|
||||
|
||||
// *** active the menu
|
||||
im->getDbProp("UI:VARIABLES:GC_POPUP")->setValue64(cw->getContainer()->isPopuped() || cw->getContainer()->getLayerSetup() == 0 ? 1 : 0);
|
||||
im->getDbProp("UI:VARIABLES:GC_HAS_HELP")->setValue64(!cw->getContainer()->getHelpPage().empty());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:GC_POPUP")->setValue64(cw->getContainer()->isPopuped() || cw->getContainer()->getLayerSetup() == 0 ? 1 : 0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:GC_HAS_HELP")->setValue64(!cw->getContainer()->getHelpPage().empty());
|
||||
im->enableModalWindow(pCaller, menu);
|
||||
}
|
||||
};
|
||||
|
@ -3313,7 +3313,7 @@ NLMISC_COMMAND(chatLog, "", "")
|
|||
if (pIM->getLogState())
|
||||
pIM->displaySystemInfo(CI18N::get("uiLogTurnedOn"));
|
||||
|
||||
CCDBNodeLeaf *node = pIM->getDbProp("UI:SAVE:CHATLOG_STATE", false);
|
||||
CCDBNodeLeaf *node = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHATLOG_STATE", false);
|
||||
if (node)
|
||||
{
|
||||
node->setValue32(pIM->getLogState() ? 1 : 0);
|
||||
|
|
|
@ -174,7 +174,7 @@ class CPlayerTradeStartHandler : public IActionHandler
|
|||
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
|
||||
{
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
if (im->getDbProp("LOCAL:EXCHANGE:BEGUN")->getValue8() != 0)
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:EXCHANGE:BEGUN")->getValue8() != 0)
|
||||
{
|
||||
//PlayerTrade.reset();
|
||||
|
||||
|
|
|
@ -128,11 +128,11 @@ void CSBrickManager::initInGame()
|
|||
{
|
||||
//get the known brick entries in the database
|
||||
sprintf(buf,"SERVER:BRICK_FAMILY:%d:BRICKS",i);
|
||||
_FamiliesBits[i] = pIM->getDbProp(buf);
|
||||
_FamiliesBits[i] = NLGUI::CDBManager::getInstance()->getDbProp(buf);
|
||||
}
|
||||
|
||||
// Add a branch observer on brick family
|
||||
pIM->addBranchObserver( "SERVER:BRICK_FAMILY", &_BrickFamilyObs);
|
||||
NLGUI::CDBManager::getInstance()->addBranchObserver( "SERVER:BRICK_FAMILY", &_BrickFamilyObs);
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -147,7 +147,7 @@ void CSBrickManager::uninitInGame()
|
|||
}
|
||||
|
||||
// remove branch observer on brick family
|
||||
CCDBNodeBranch *branch= pIM->getDbBranch("SERVER:BRICK_FAMILY");
|
||||
CCDBNodeBranch *branch= NLGUI::CDBManager::getInstance()->getDbBranch("SERVER:BRICK_FAMILY");
|
||||
if(branch)
|
||||
branch->removeBranchObserver(&_BrickFamilyObs);
|
||||
}
|
||||
|
|
|
@ -148,17 +148,17 @@ void CSkillManager::initInGame()
|
|||
// get now the nodes on Skill values
|
||||
for(i=0;i<SKILLS::NUM_SKILLS;i++)
|
||||
{
|
||||
_SkillValues[i]= pIM->getDbProp(toString("SERVER:CHARACTER_INFO:SKILLS:%d:SKILL", i), false);
|
||||
_SkillBaseValues[i]= pIM->getDbProp(toString("SERVER:CHARACTER_INFO:SKILLS:%d:BaseSKILL", i), false);
|
||||
_SkillValues[i]= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:CHARACTER_INFO:SKILLS:%d:SKILL", i), false);
|
||||
_SkillBaseValues[i]= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:CHARACTER_INFO:SKILLS:%d:BaseSKILL", i), false);
|
||||
}
|
||||
|
||||
// compute max child values
|
||||
computeMaxChildValues(); // must be called after setting all _SkillBaseValues
|
||||
|
||||
// Get a node used to inform interface that a skill has changed
|
||||
_TrackSkillChange= pIM->getDbProp("UI:VARIABLES:TRACK_SKILL_CHANGE", true);
|
||||
_TrackSkillChange= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:TRACK_SKILL_CHANGE", true);
|
||||
// Add a branch observer on skill value change
|
||||
pIM->addBranchObserver( "SERVER:CHARACTER_INFO:SKILLS", &_SkillChangeObs );
|
||||
NLGUI::CDBManager::getInstance()->addBranchObserver( "SERVER:CHARACTER_INFO:SKILLS", &_SkillChangeObs );
|
||||
|
||||
}
|
||||
|
||||
|
@ -779,15 +779,15 @@ void CSkillManager::tryToUnblockTitleFromCiv(bool show_message)
|
|||
|
||||
if (IngameDbMngr.initInProgress())
|
||||
{
|
||||
if (im->getDbProp("UI:SAVE:FAME:CIV_ALLEGIANCE")->getValue32() != civNeeded)
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:FAME:CIV_ALLEGIANCE")->getValue32() != civNeeded)
|
||||
_TitlesUnblocked[i].UnblockedCiv = false;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
CCDBNodeLeaf * civLeaf = im->getDbProp("SERVER:FAME:CIV_ALLEGIANCE");
|
||||
CCDBNodeLeaf * civLeaf = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:FAME:CIV_ALLEGIANCE");
|
||||
uint8 civDBValue = civLeaf->getValue8();
|
||||
im->getDbProp("UI:SAVE:FAME:CIV_ALLEGIANCE")->setValue32((uint32)civDBValue);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:FAME:CIV_ALLEGIANCE")->setValue32((uint32)civDBValue);
|
||||
|
||||
if( civDBValue != civNeeded )
|
||||
{
|
||||
|
@ -818,15 +818,15 @@ void CSkillManager::tryToUnblockTitleFromCult(bool show_message)
|
|||
|
||||
if (IngameDbMngr.initInProgress())
|
||||
{
|
||||
if (im->getDbProp("UI:SAVE:FAME:CULT_ALLEGIANCE")->getValue32() != cultNeeded)
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:FAME:CULT_ALLEGIANCE")->getValue32() != cultNeeded)
|
||||
_TitlesUnblocked[i].UnblockedCult = false;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
CCDBNodeLeaf * cultLeaf = im->getDbProp("SERVER:FAME:CULT_ALLEGIANCE");
|
||||
CCDBNodeLeaf * cultLeaf = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:FAME:CULT_ALLEGIANCE");
|
||||
uint8 cultDBValue = cultLeaf->getValue8();
|
||||
im->getDbProp("UI:SAVE:FAME:CULT_ALLEGIANCE")->setValue32((uint32)cultDBValue);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:FAME:CULT_ALLEGIANCE")->setValue32((uint32)cultDBValue);
|
||||
|
||||
if( cultDBValue != cultNeeded )
|
||||
{
|
||||
|
@ -943,7 +943,7 @@ void CSkillManager::tryToUnblockTitleFromItems(bool show_message)
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
// get inventory in bag
|
||||
CCDBNodeBranch *nb = pIM->getDbBranch(branch);
|
||||
CCDBNodeBranch *nb = NLGUI::CDBManager::getInstance()->getDbBranch(branch);
|
||||
if (!nb)
|
||||
return;
|
||||
|
||||
|
@ -978,7 +978,7 @@ void CSkillManager::tryToUnblockTitleFromItems(bool show_message)
|
|||
sint32 qualityItem = 0;
|
||||
|
||||
// get sheetid
|
||||
CCDBNodeLeaf *node = pIM->getDbProp(branch + ":" + toString(itemSlot) + ":SHEET", false);
|
||||
CCDBNodeLeaf *node = NLGUI::CDBManager::getInstance()->getDbProp(branch + ":" + toString(itemSlot) + ":SHEET", false);
|
||||
if (node)
|
||||
sheetItem = (uint32)node->getValue32();
|
||||
|
||||
|
@ -987,7 +987,7 @@ void CSkillManager::tryToUnblockTitleFromItems(bool show_message)
|
|||
continue;
|
||||
|
||||
// get quality
|
||||
node = pIM->getDbProp(branch + ":" + toString(itemSlot) + ":QUALITY", false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp(branch + ":" + toString(itemSlot) + ":QUALITY", false);
|
||||
if (node)
|
||||
qualityItem = node->getValue32();
|
||||
|
||||
|
@ -1061,7 +1061,7 @@ public:
|
|||
{
|
||||
if (i == pSM->_CurrentTitle)
|
||||
{
|
||||
pIM->getDbProp("UI:TITLE")->setValue32(j);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:TITLE")->setValue32(j);
|
||||
break;
|
||||
}
|
||||
j++;
|
||||
|
|
|
@ -114,7 +114,7 @@ void CSPhraseManager::initInGame()
|
|||
_BookDbLeaves.resize(PHRASE_MAX_BOOK_SLOT, NULL);
|
||||
for(i=0;i<PHRASE_MAX_BOOK_SLOT;i++)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(PHRASE_DB_BOOK + ":" + toString(i) + ":PHRASE");
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(PHRASE_DB_BOOK + ":" + toString(i) + ":PHRASE");
|
||||
node->setValue32(0);
|
||||
_BookDbLeaves[i]= node;
|
||||
}
|
||||
|
@ -123,10 +123,10 @@ void CSPhraseManager::initInGame()
|
|||
|
||||
for(i=0;i<PHRASE_MAX_MEMORY_SLOT;i++)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(PHRASE_DB_MEMORY + ":" + toString(i) + ":PHRASE");
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(PHRASE_DB_MEMORY + ":" + toString(i) + ":PHRASE");
|
||||
node->setValue32(0);
|
||||
_MemoryDbLeaves[i]= node;
|
||||
CCDBNodeLeaf *node_alt= pIM->getDbProp(PHRASE_DB_MEMORY_ALT + ":" + toString(i) + ":PHRASE");
|
||||
CCDBNodeLeaf *node_alt= NLGUI::CDBManager::getInstance()->getDbProp(PHRASE_DB_MEMORY_ALT + ":" + toString(i) + ":PHRASE");
|
||||
node_alt->setValue32(0);
|
||||
_MemoryAltDbLeaves[i]= node_alt;
|
||||
}
|
||||
|
@ -144,15 +144,15 @@ void CSPhraseManager::initInGame()
|
|||
for(uint j=0;j<NumProgressType;j++)
|
||||
{
|
||||
// SHEET
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(PHRASE_DB_PROGRESSION[j] + ":" + toString(i) + ":SHEET");
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(PHRASE_DB_PROGRESSION[j] + ":" + toString(i) + ":SHEET");
|
||||
node->setValue32(0);
|
||||
_ProgressionDbSheets[j][i]= node;
|
||||
// LEVEL
|
||||
node= pIM->getDbProp(PHRASE_DB_PROGRESSION[j] + ":" + toString(i) + ":LEVEL");
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(PHRASE_DB_PROGRESSION[j] + ":" + toString(i) + ":LEVEL");
|
||||
node->setValue32(0);
|
||||
_ProgressionDbLevels[j][i]= node;
|
||||
// LOCKED
|
||||
node= pIM->getDbProp(PHRASE_DB_PROGRESSION[j] + ":" + toString(i) + ":LOCKED");
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(PHRASE_DB_PROGRESSION[j] + ":" + toString(i) + ":LOCKED");
|
||||
node->setValue32(0);
|
||||
_ProgressionDbLocks[j][i]= node;
|
||||
}
|
||||
|
@ -160,10 +160,10 @@ void CSPhraseManager::initInGame()
|
|||
|
||||
// init the UI Next Execute slot
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(PHRASE_DB_EXECUTE_NEXT);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(PHRASE_DB_EXECUTE_NEXT);
|
||||
node->setValue32(0);
|
||||
_NextExecuteLeaf= node;
|
||||
node= pIM->getDbProp(PHRASE_DB_EXECUTE_NEXT_IS_CYCLIC);
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp(PHRASE_DB_EXECUTE_NEXT_IS_CYCLIC);
|
||||
node->setValue32(0);
|
||||
_NextExecuteIsCyclicLeaf= node;
|
||||
}
|
||||
|
@ -172,8 +172,8 @@ void CSPhraseManager::initInGame()
|
|||
_BotChatPhrasePriceLeaves.resize(PHRASE_MAX_BOTCHAT_SLOT, NULL);
|
||||
for(i=0;i<PHRASE_MAX_BOTCHAT_SLOT;i++)
|
||||
{
|
||||
CCDBNodeLeaf *nodeSheet= pIM->getDbProp(PHRASE_DB_BOTCHAT+ ":" + toString(i) + ":SHEET");
|
||||
CCDBNodeLeaf *nodePrice= pIM->getDbProp(PHRASE_DB_BOTCHAT+ ":" + toString(i) + ":PRICE");
|
||||
CCDBNodeLeaf *nodeSheet= NLGUI::CDBManager::getInstance()->getDbProp(PHRASE_DB_BOTCHAT+ ":" + toString(i) + ":SHEET");
|
||||
CCDBNodeLeaf *nodePrice= NLGUI::CDBManager::getInstance()->getDbProp(PHRASE_DB_BOTCHAT+ ":" + toString(i) + ":PRICE");
|
||||
_BotChatPhraseSheetLeaves[i]= nodeSheet;
|
||||
_BotChatPhrasePriceLeaves[i]= nodePrice;
|
||||
}
|
||||
|
@ -787,7 +787,7 @@ void CSPhraseManager::buildPhraseFromSheet(CSPhraseCom &phrase, sint32 sheetI
|
|||
bool CSPhraseManager::isPhraseNextExecuteCounterSync() const
|
||||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
sint32 srvVal= pIM->getDbProp(PHRASE_DB_COUNTER_NEXT)->getValue32();
|
||||
sint32 srvVal= NLGUI::CDBManager::getInstance()->getDbProp(PHRASE_DB_COUNTER_NEXT)->getValue32();
|
||||
return srvVal==(sint32)_PhraseNextExecuteCounter;
|
||||
}
|
||||
|
||||
|
@ -795,7 +795,7 @@ bool CSPhraseManager::isPhraseNextExecuteCounterSync() const
|
|||
bool CSPhraseManager::isPhraseCycleExecuteCounterSync() const
|
||||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
sint32 srvVal= pIM->getDbProp(PHRASE_DB_COUNTER_CYCLE)->getValue32();
|
||||
sint32 srvVal= NLGUI::CDBManager::getInstance()->getDbProp(PHRASE_DB_COUNTER_CYCLE)->getValue32();
|
||||
return srvVal==(sint32)_PhraseCycleExecuteCounter;
|
||||
}
|
||||
|
||||
|
@ -1098,7 +1098,7 @@ void CSPhraseManager::buildPhraseDesc(ucstring &text, const CSPhraseCom &phrase,
|
|||
// **** Compute Phrase Elements from phrase
|
||||
// get the current action malus (0-100)
|
||||
uint32 totalActionMalus= 0;
|
||||
CCDBNodeLeaf *actMalus= pIM->getDbProp("UI:VARIABLES:TOTAL_MALUS_EQUIP", false);
|
||||
CCDBNodeLeaf *actMalus= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:TOTAL_MALUS_EQUIP", false);
|
||||
// root brick must not be Power or aura, because Action malus don't apply to them
|
||||
// (ie leave 0 ActionMalus for Aura or Powers
|
||||
if(actMalus && !rootBrick->isSpecialPower())
|
||||
|
@ -1134,11 +1134,11 @@ void CSPhraseManager::buildPhraseDesc(ucstring &text, const CSPhraseCom &phrase,
|
|||
uint32 rightHandSheet = inv->getRightHandItemSheet();
|
||||
if( inv->isRangeWeaponItem(rightHandSheet) )
|
||||
{
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:RANGE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:RANGE", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:MELEE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:MELEE", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1146,19 +1146,19 @@ void CSPhraseManager::buildPhraseDesc(ucstring &text, const CSPhraseCom &phrase,
|
|||
// phrase usable only in melee fight
|
||||
if( usableWithMelee )
|
||||
{
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:MELEE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:MELEE", false);
|
||||
}
|
||||
else
|
||||
// phrase usable only in range fight
|
||||
if( usableWithRange )
|
||||
{
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:RANGE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:RANGE", false);
|
||||
}
|
||||
}
|
||||
else
|
||||
if(rootBrick->isMagic())
|
||||
{
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:MAGIC", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:MAGIC", false);
|
||||
}
|
||||
if(nodeSM)
|
||||
{
|
||||
|
@ -1190,14 +1190,14 @@ void CSPhraseManager::buildPhraseDesc(ucstring &text, const CSPhraseCom &phrase,
|
|||
// Replace forage success rate in any ecotype
|
||||
successModifier = 0;
|
||||
sint32 commonModifier = 0;
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:0:FORAGE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:0:FORAGE", false);
|
||||
if(nodeSM)
|
||||
{
|
||||
commonModifier = nodeSM->getValue32();
|
||||
}
|
||||
//desert
|
||||
success= getForageExtractionPhraseSuccessRate(phrase, SKILLS::SHFDAEM);
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:1:FORAGE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:1:FORAGE", false);
|
||||
if(nodeSM) successModifier = nodeSM->getValue32();
|
||||
if( successModifier == 0 )
|
||||
successModifier = commonModifier;
|
||||
|
@ -1207,7 +1207,7 @@ void CSPhraseManager::buildPhraseDesc(ucstring &text, const CSPhraseCom &phrase,
|
|||
|
||||
//forest
|
||||
success= getForageExtractionPhraseSuccessRate(phrase, SKILLS::SHFFAEM);
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:2:FORAGE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:2:FORAGE", false);
|
||||
if(nodeSM) successModifier = nodeSM->getValue32();
|
||||
if( successModifier == 0 )
|
||||
successModifier = commonModifier;
|
||||
|
@ -1217,7 +1217,7 @@ void CSPhraseManager::buildPhraseDesc(ucstring &text, const CSPhraseCom &phrase,
|
|||
|
||||
// lake
|
||||
success= getForageExtractionPhraseSuccessRate(phrase, SKILLS::SHFLAEM);
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:3:FORAGE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:3:FORAGE", false);
|
||||
if(nodeSM) successModifier = nodeSM->getValue32();
|
||||
if( successModifier == 0 )
|
||||
successModifier = commonModifier;
|
||||
|
@ -1227,7 +1227,7 @@ void CSPhraseManager::buildPhraseDesc(ucstring &text, const CSPhraseCom &phrase,
|
|||
|
||||
// jungle
|
||||
success= getForageExtractionPhraseSuccessRate(phrase, SKILLS::SHFJAEM);
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:4:FORAGE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:4:FORAGE", false);
|
||||
if(nodeSM) successModifier = nodeSM->getValue32();
|
||||
if( successModifier == 0 )
|
||||
successModifier = commonModifier;
|
||||
|
@ -1237,7 +1237,7 @@ void CSPhraseManager::buildPhraseDesc(ucstring &text, const CSPhraseCom &phrase,
|
|||
|
||||
//prime roots
|
||||
success= getForageExtractionPhraseSuccessRate(phrase, SKILLS::SHFPAEM);
|
||||
nodeSM = pIM->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:6:FORAGE", false);
|
||||
nodeSM = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SUCCESS_MODIFIER:ECO:6:FORAGE", false);
|
||||
if(nodeSM) successModifier = nodeSM->getValue32();
|
||||
if( successModifier == 0 )
|
||||
successModifier = commonModifier;
|
||||
|
@ -1628,7 +1628,7 @@ float CSPhraseManager::getPhraseSumBrickProp(const CSPhraseCom &phrase, uint
|
|||
else if(propId==CSBrickManager::getInstance()->StaPropId && brick->Properties[j].PropId==CSBrickManager::getInstance()->StaWeightFactorId)
|
||||
{
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
uint32 weight = (uint32) im->getDbProp("SERVER:USER:DEFAULT_WEIGHT_HANDS")->getValue32() / 10; // weight must be in dg here
|
||||
uint32 weight = (uint32) NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:DEFAULT_WEIGHT_HANDS")->getValue32() / 10; // weight must be in dg here
|
||||
CDBCtrlSheet *ctrlSheet = dynamic_cast<CDBCtrlSheet *>(im->getElementFromId("ui:interface:gestionsets:hands:handr"));
|
||||
if (ctrlSheet)
|
||||
{
|
||||
|
@ -2351,18 +2351,18 @@ public:
|
|||
if(T1>pPM->_PhraseDebugEndNextAction)
|
||||
{
|
||||
// copy counter
|
||||
pIM->getDbProp(PHRASE_DB_COUNTER_NEXT)->setValue32(pPM->_PhraseNextExecuteCounter);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(PHRASE_DB_COUNTER_NEXT)->setValue32(pPM->_PhraseNextExecuteCounter);
|
||||
}
|
||||
if(T1>pPM->_PhraseDebugEndCyclicAction)
|
||||
{
|
||||
// copy counter
|
||||
pIM->getDbProp(PHRASE_DB_COUNTER_CYCLE)->setValue32(pPM->_PhraseCycleExecuteCounter);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(PHRASE_DB_COUNTER_CYCLE)->setValue32(pPM->_PhraseCycleExecuteCounter);
|
||||
}
|
||||
|
||||
sint64 st= pIM->getDbProp("UI:VARIABLES:CURRENT_SERVER_TICK")->getValue64();
|
||||
sint64 stEnd= pIM->getDbProp("SERVER:USER:ACT_TEND")->getValue64();
|
||||
sint64 st= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:CURRENT_SERVER_TICK")->getValue64();
|
||||
sint64 stEnd= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:ACT_TEND")->getValue64();
|
||||
if(stEnd && st>stEnd+20)
|
||||
pIM->getDbProp("SERVER:USER:ACT_TEND")->setValue64(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:ACT_TEND")->setValue64(0);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -2569,11 +2569,11 @@ CSheetId getRightHandItem()
|
|||
|
||||
CSheetId item;
|
||||
// get the RightHand bag index
|
||||
sint32 itemSlot= pIM->getDbProp("LOCAL:INVENTORY:HAND:0:INDEX_IN_BAG")->getValue32();
|
||||
sint32 itemSlot= NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:HAND:0:INDEX_IN_BAG")->getValue32();
|
||||
// if something in hand
|
||||
if(itemSlot>0)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp("LOCAL:INVENTORY:BAG:"+toString(itemSlot-1) +":SHEET", false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:BAG:"+toString(itemSlot-1) +":SHEET", false);
|
||||
if(node)
|
||||
item= node->getValue32();
|
||||
}
|
||||
|
@ -2637,11 +2637,11 @@ uint32 getRightHandEffectiveLevel()
|
|||
|
||||
// **** get the right hand item 'required skill'
|
||||
// get the RightHand bag index
|
||||
sint32 itemSlot= pIM->getDbProp("LOCAL:INVENTORY:HAND:0:INDEX_IN_BAG")->getValue32();
|
||||
sint32 itemSlot= NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:HAND:0:INDEX_IN_BAG")->getValue32();
|
||||
// if something in hand
|
||||
if(itemSlot>0)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp("LOCAL:INVENTORY:BAG:"+toString(itemSlot-1) +":QUALITY", false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:BAG:"+toString(itemSlot-1) +":QUALITY", false);
|
||||
if(node)
|
||||
// if the right hand item quality is less than our skill value, take it....
|
||||
effectiveLevel= min(effectiveLevel, (uint32)node->getValue32());
|
||||
|
@ -2658,11 +2658,11 @@ static sint getRightHandEnchantValue()
|
|||
|
||||
sint ret= 0;
|
||||
// get the RightHand bag index
|
||||
sint32 itemSlot= pIM->getDbProp("LOCAL:INVENTORY:HAND:0:INDEX_IN_BAG")->getValue32();
|
||||
sint32 itemSlot= NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:HAND:0:INDEX_IN_BAG")->getValue32();
|
||||
// if something in hand
|
||||
if(itemSlot>0)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp("LOCAL:INVENTORY:BAG:"+toString(itemSlot-1) +":ENCHANT", false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:BAG:"+toString(itemSlot-1) +":ENCHANT", false);
|
||||
if(node)
|
||||
ret= node->getValue32();
|
||||
}
|
||||
|
@ -4477,7 +4477,7 @@ uint32 CSPhraseManager::getTotalActionMalus(const CSPhraseCom &phrase) const
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CSBrickManager *pBM= CSBrickManager::getInstance();
|
||||
uint32 totalActionMalus= 0;
|
||||
CCDBNodeLeaf *actMalus= pIM->getDbProp("UI:VARIABLES:TOTAL_MALUS_EQUIP", false);
|
||||
CCDBNodeLeaf *actMalus= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:TOTAL_MALUS_EQUIP", false);
|
||||
// root brick must not be Power or aura, because Action malus don't apply to them
|
||||
// (ie leave 0 ActionMalus for Aura or Powers
|
||||
if (!phrase.Bricks.empty())
|
||||
|
@ -4494,7 +4494,7 @@ uint32 CSPhraseManager::getTotalActionMalus(const CSPhraseCom &phrase) const
|
|||
CCDBNodeLeaf *CSPhraseManager::getRegenTickRangeDbLeaf(uint powerIndex) const
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *dbLeaf = pIM->getDbProp(toString("SERVER:FLAGS:BRICK_TICK_RANGE:%d:TICK_RANGE", (int) powerIndex), false);
|
||||
CCDBNodeLeaf *dbLeaf = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:FLAGS:BRICK_TICK_RANGE:%d:TICK_RANGE", (int) powerIndex), false);
|
||||
return dbLeaf;
|
||||
}
|
||||
|
||||
|
|
|
@ -124,8 +124,8 @@ void CViewRadar::draw ()
|
|||
|
||||
float maxSqrRadius= (float)sqr(_WorldSize/2);
|
||||
|
||||
const bool displayMissionSpots = pIM->getDbProp("UI:SAVE:INSCENE:FRIEND:MISSION_ICON")->getValueBool();
|
||||
const bool displayMiniMissionSpots = pIM->getDbProp("UI:SAVE:INSCENE:FRIEND:MINI_MISSION_ICON")->getValueBool();
|
||||
const bool displayMissionSpots = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:INSCENE:FRIEND:MISSION_ICON")->getValueBool();
|
||||
const bool displayMiniMissionSpots = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:INSCENE:FRIEND:MINI_MISSION_ICON")->getValueBool();
|
||||
|
||||
for (sint32 i = 1; i < 256; ++i)
|
||||
{
|
||||
|
|
|
@ -213,7 +213,7 @@ string CViewTextID::getTextIdDbLink() const
|
|||
// ***************************************************************************
|
||||
void CViewTextID::setTextIdDbLink(const string &link)
|
||||
{
|
||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp(link,false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(link,false);
|
||||
if (pNL == NULL)
|
||||
{
|
||||
nlwarning("cant set textidlink for %s",link.c_str());
|
||||
|
|
|
@ -209,7 +209,7 @@ void initEula()
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
if (!ClientCfg.SkipEULA && CFile::fileExists(getLogDirectory() + "show_eula"))
|
||||
{
|
||||
pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_EULA);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_EULA);
|
||||
|
||||
// if we display the eula, it means we make a patch so we clean the cache directory
|
||||
// (clear cache after each patch)
|
||||
|
@ -260,7 +260,7 @@ void initCatDisplay()
|
|||
(InfoOnPatch.ReqCat.size() > 0))
|
||||
{
|
||||
createOptionalCatUI();
|
||||
pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CATDISP);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CATDISP);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -272,7 +272,7 @@ void initCatDisplay()
|
|||
void initReboot()
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_REBOOT);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_REBOOT);
|
||||
}
|
||||
|
||||
|
||||
|
@ -361,7 +361,7 @@ void loginMainLoop()
|
|||
// while (loginFinished == false)
|
||||
{
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
|
||||
// Update the DT T0 and T1 global variables
|
||||
updateClientTime();
|
||||
|
@ -380,7 +380,7 @@ void loginMainLoop()
|
|||
pIM->updateFrameEvents();
|
||||
pIM->updateFrameViews(NULL);
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
|
||||
|
||||
|
||||
|
@ -399,7 +399,7 @@ void loginMainLoop()
|
|||
// Display
|
||||
Driver->swapBuffers();
|
||||
|
||||
// sint32 screen = pIM->getDbProp("UI:VARIABLES:SCREEN")->getValue32();
|
||||
// sint32 screen = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->getValue32();
|
||||
if (LoginSM.getCurrentState() == CLoginStateMachine::st_check_patch)
|
||||
// if (screen == UI_VARIABLES_SCREEN_CHECKING) // If we are in checking mode
|
||||
{
|
||||
|
@ -487,7 +487,7 @@ void loginMainLoop()
|
|||
{
|
||||
LoginSM.pushEvent(CLoginStateMachine::ev_patch_needed);
|
||||
// createOptionalCatUI();
|
||||
// pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CATDISP);
|
||||
// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CATDISP);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -525,10 +525,10 @@ void loginMainLoop()
|
|||
if (pPM->isScanDataThreadEnded(res))
|
||||
{
|
||||
// if interface consider it was running before
|
||||
if(pIM->getDbProp("UI:VARIABLES:DATASCAN_RUNNING")->getValue32()!=0)
|
||||
if(NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:DATASCAN_RUNNING")->getValue32()!=0)
|
||||
{
|
||||
// no more running
|
||||
pIM->getDbProp("UI:VARIABLES:DATASCAN_RUNNING")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:DATASCAN_RUNNING")->setValue32(0);
|
||||
|
||||
if(res)
|
||||
{
|
||||
|
@ -722,8 +722,8 @@ void initLoginScreen()
|
|||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CPatchManager *pPM = CPatchManager::getInstance();
|
||||
pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CHECKPASS);
|
||||
pIM->getDbProp("UI:VARIABLES:DISPLAY_ACCOUNT_BUTTONS")->setValue32(ClientCfg.DisplayAccountButtons);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CHECKPASS);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:DISPLAY_ACCOUNT_BUTTONS")->setValue32(ClientCfg.DisplayAccountButtons);
|
||||
|
||||
// Active inputs
|
||||
Actions.enable(true);
|
||||
|
@ -813,7 +813,7 @@ bool login()
|
|||
|
||||
pIM->initLogin();
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
|
||||
bool tmpDI = ClientCfg.DisableDirectInput;
|
||||
ClientCfg.DisableDirectInput = true;
|
||||
|
@ -828,7 +828,7 @@ bool login()
|
|||
|
||||
// if (ClientCfg.TestBrowser)
|
||||
// {
|
||||
// pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_WEBSTART);
|
||||
// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_WEBSTART);
|
||||
//
|
||||
// // hide 'back to login' button
|
||||
// CInterfaceElement *backToLogin = pIM->getElementFromId(CTRL_BUTTON_BACKTOLOGIN);
|
||||
|
@ -848,8 +848,8 @@ bool login()
|
|||
// }
|
||||
// else
|
||||
// {
|
||||
//// pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CHECKPASS);
|
||||
//// pIM->getDbProp("UI:VARIABLES:DISPLAY_ACCOUNT_BUTTONS")->setValue32(ClientCfg.DisplayAccountButtons);
|
||||
//// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CHECKPASS);
|
||||
//// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:DISPLAY_ACCOUNT_BUTTONS")->setValue32(ClientCfg.DisplayAccountButtons);
|
||||
// }
|
||||
|
||||
// Active inputs
|
||||
|
@ -1020,7 +1020,7 @@ void initPatchCheck()
|
|||
CBGDownloaderAccess::getInstance().requestDownloadThreadPriority(BGDownloader::ThreadPriority_Normal, false);
|
||||
CBGDownloaderAccess::getInstance().startTask(taskDesc, getBGDownloaderCommandLine(), true /* showDownloader */);
|
||||
}
|
||||
pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CHECKING);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CHECKING);
|
||||
|
||||
setPatcherStateText("ui:login:checking", ucstring());
|
||||
setPatcherProgressText("ui:login:checking", ucstring());
|
||||
|
@ -1029,7 +1029,7 @@ void initPatchCheck()
|
|||
void initShardDisplay()
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_SHARDDISP);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_SHARDDISP);
|
||||
|
||||
CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(GROUP_LIST_SHARD));
|
||||
if (pList == NULL)
|
||||
|
@ -1113,7 +1113,7 @@ void onlogin(bool vanishScreen = true)
|
|||
}
|
||||
|
||||
if(vanishScreen)
|
||||
pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(-1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(-1);
|
||||
|
||||
// Check the login/pass
|
||||
|
||||
|
@ -1138,12 +1138,12 @@ void onlogin(bool vanishScreen = true)
|
|||
// pPM->init(R2PatchURLs, R2BackupPatchURL, R2ServerVersion);
|
||||
//
|
||||
// pPM->startCheckThread();
|
||||
// pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CHECKING);
|
||||
// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CHECKING);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // go directly to web browser
|
||||
// pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_WEBSTART);
|
||||
// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_WEBSTART);
|
||||
//
|
||||
// CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
// // start the browser
|
||||
|
@ -1155,7 +1155,7 @@ void onlogin(bool vanishScreen = true)
|
|||
}
|
||||
else
|
||||
{
|
||||
// pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_SHARDDISP);
|
||||
// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_SHARDDISP);
|
||||
}
|
||||
|
||||
// CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(GROUP_LIST_SHARD));
|
||||
|
@ -1230,7 +1230,7 @@ void onlogin(bool vanishScreen = true)
|
|||
pIM->messageBoxWithHelp("Error : " + res, "ui:login");
|
||||
|
||||
LoginSM.pushEvent(CLoginStateMachine::ev_bad_login);
|
||||
// pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CHECKPASS);
|
||||
// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CHECKPASS);
|
||||
//
|
||||
// if (LoginLogin.empty())
|
||||
// pIM->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_LOGIN "|select_all=false");
|
||||
|
@ -1317,7 +1317,7 @@ class CAHLoginTab : public IActionHandler
|
|||
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
if (pIM->getDbProp("UI:VARIABLES:SCREEN")->getValue32() == UI_VARIABLES_SCREEN_CHECKPASS)
|
||||
if (NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->getValue32() == UI_VARIABLES_SCREEN_CHECKPASS)
|
||||
{
|
||||
CCtrlBase *pCB = pIM->getCaptureKeyboard();
|
||||
if (pCB != NULL)
|
||||
|
@ -1331,7 +1331,7 @@ class CAHLoginTab : public IActionHandler
|
|||
pIM->setCaptureKeyboard(pNewCB);
|
||||
}
|
||||
}
|
||||
else if (pIM->getDbProp("UI:VARIABLES:SCREEN")->getValue32() == UI_VARIABLES_SCREEN_CREATE_ACCOUNT)
|
||||
else if (NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->getValue32() == UI_VARIABLES_SCREEN_CREATE_ACCOUNT)
|
||||
{
|
||||
CCtrlBase *pCB = pIM->getCaptureKeyboard();
|
||||
if (pCB != NULL)
|
||||
|
@ -1466,7 +1466,7 @@ class CAHLoginConnect : public IActionHandler
|
|||
// if (ClientCfg.PatchWanted)
|
||||
// {
|
||||
// pPM->startCheckThread();
|
||||
// pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CHECKING);
|
||||
// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CHECKING);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
|
@ -1511,7 +1511,7 @@ class CAHLoginConnect2 : public IActionHandler
|
|||
// (Shards[ShardSelected].Version != pPM->getClientVersion()))
|
||||
// {
|
||||
// pPM->startCheckThread();
|
||||
// pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CHECKING);
|
||||
// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CHECKING);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
|
@ -1571,7 +1571,7 @@ void initPatch()
|
|||
// release lock on bnp, so that they can be written
|
||||
NLMISC::CBigFile::getInstance().removeAll();
|
||||
}
|
||||
pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_PATCHING);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_PATCHING);
|
||||
|
||||
CInterfaceElement *closeBtn = pIM->getElementFromId(CTRL_BUTTON_CLOSE_PATCH);
|
||||
if (closeBtn)
|
||||
|
@ -1629,7 +1629,7 @@ class CAHLoginPatch : public IActionHandler
|
|||
// if (ClientCfg.PatchWanted)
|
||||
// {
|
||||
// pPM->startPatchThread(vCategories);
|
||||
// pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_PATCHING);
|
||||
// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_PATCHING);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
|
@ -1758,7 +1758,7 @@ class CAHAcceptEula : public IActionHandler
|
|||
// {
|
||||
// // open web browser
|
||||
// CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
// pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_WEBSTART);
|
||||
// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_WEBSTART);
|
||||
//
|
||||
// // start the browser
|
||||
// CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(pIM->getElementFromId(GROUP_BROWSER));
|
||||
|
@ -2122,8 +2122,8 @@ void initDataScan()
|
|||
|
||||
// Start Scanning
|
||||
pPM->startScanDataThread();
|
||||
pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_DATASCAN);
|
||||
pIM->getDbProp("UI:VARIABLES:DATASCAN_RUNNING")->setValue32(1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_DATASCAN);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:DATASCAN_RUNNING")->setValue32(1);
|
||||
|
||||
}
|
||||
|
||||
|
@ -2152,7 +2152,7 @@ class CAHOnScanDataClose : public IActionHandler
|
|||
CPatchManager *pPM = CPatchManager::getInstance();
|
||||
|
||||
// if the scan is still running
|
||||
if(pIM->getDbProp("UI:VARIABLES:DATASCAN_RUNNING")->getValue32()!=0)
|
||||
if(NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:DATASCAN_RUNNING")->getValue32()!=0)
|
||||
{
|
||||
// request to stop the thread
|
||||
pPM->askForStopScanDataThread();
|
||||
|
@ -2164,7 +2164,7 @@ class CAHOnScanDataClose : public IActionHandler
|
|||
{
|
||||
LoginSM.pushEvent(CLoginStateMachine::ev_close_data_scan);
|
||||
// Come Back to Login Screen.
|
||||
// pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CHECKPASS);
|
||||
// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CHECKPASS);
|
||||
//
|
||||
// // Give focus to password if some login entered
|
||||
// string loginEB;
|
||||
|
@ -2358,7 +2358,7 @@ bool initCreateAccount()
|
|||
}
|
||||
|
||||
|
||||
pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CREATE_ACCOUNT);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CREATE_ACCOUNT);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -2643,7 +2643,7 @@ class CAHOnBackToLogin: public IActionHandler
|
|||
|
||||
// CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
// // need to reset password and current screen
|
||||
// pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CHECKPASS);
|
||||
// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CHECKPASS);
|
||||
}
|
||||
};
|
||||
REGISTER_ACTION_HANDLER (CAHOnBackToLogin, "on_back_to_login");
|
||||
|
@ -3035,7 +3035,7 @@ void loginIntro()
|
|||
const ucstring nmsg("");
|
||||
ProgressBar.newMessage (nmsg);
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
}
|
||||
}
|
||||
beginLoading(StartBackground);
|
||||
|
|
|
@ -242,7 +242,7 @@ public:
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
if(pIM)
|
||||
{
|
||||
CCDBNodeLeaf *pNodeLeaf = pIM->getDbProp("SERVER:DEBUG_INFO:Ping", false);
|
||||
CCDBNodeLeaf *pNodeLeaf = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:DEBUG_INFO:Ping", false);
|
||||
if(pNodeLeaf)
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
|
@ -260,7 +260,7 @@ public:
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
if(pIM)
|
||||
{
|
||||
CCDBNodeLeaf *pNodeLeaf = pIM->getDbProp("SERVER:DEBUG_INFO:Ping", false);
|
||||
CCDBNodeLeaf *pNodeLeaf = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:DEBUG_INFO:Ping", false);
|
||||
if(pNodeLeaf)
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
|
@ -1642,7 +1642,7 @@ bool mainLoop()
|
|||
|
||||
// flush observers
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1660,7 +1660,7 @@ bool mainLoop()
|
|||
// NetWork Update.
|
||||
NetMngr.update();
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
// lets some CPU.
|
||||
NetMngr.send();
|
||||
nlSleep(100);
|
||||
|
@ -1770,7 +1770,7 @@ bool mainLoop()
|
|||
|
||||
NetMngr.update();
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
bool prevDatabaseInitStatus = IngameDbMngr.initInProgress();
|
||||
IngameDbMngr.setChangesProcessed();
|
||||
bool newDatabaseInitStatus = IngameDbMngr.initInProgress();
|
||||
|
@ -1841,7 +1841,7 @@ bool mainLoop()
|
|||
// update bot chat
|
||||
CBotChatManager::getInstance()->update();
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
|
||||
// updateItemEdition
|
||||
CInterfaceItemEdition::getInstance()->update();
|
||||
|
@ -2296,7 +2296,7 @@ bool mainLoop()
|
|||
deltaTime = smoothFPS.getSmoothValue ();
|
||||
if (deltaTime > 0.0)
|
||||
{
|
||||
CCDBNodeLeaf*pNL = pIMinstance->getDbProp("UI:VARIABLES:FPS");
|
||||
CCDBNodeLeaf*pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:FPS");
|
||||
pNL->setValue64((sint64)(1.f/deltaTime));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -813,10 +813,10 @@ void getSeedsFromDB(CSeeds &dest)
|
|||
string bs = im->getDefine("money_3");
|
||||
string vbs = im->getDefine("money_4");
|
||||
|
||||
dest = CSeeds(im->getDbProp(ls)->getValue32(),
|
||||
im->getDbProp(ms)->getValue32(),
|
||||
im->getDbProp(bs)->getValue32(),
|
||||
im->getDbProp(vbs)->getValue32());
|
||||
dest = CSeeds(NLGUI::CDBManager::getInstance()->getDbProp(ls)->getValue32(),
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(ms)->getValue32(),
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(bs)->getValue32(),
|
||||
NLGUI::CDBManager::getInstance()->getDbProp(vbs)->getValue32());
|
||||
} // getSeedsFromDB //
|
||||
|
||||
|
||||
|
|
|
@ -294,7 +294,7 @@ void CUserControls::update()
|
|||
// update camera collision once per frame
|
||||
View.updateCameraCollision();
|
||||
|
||||
CInterfaceManager::getInstance()->getDbProp("UI:VARIABLES:MK_MOVE")->setValue32(autowalkState());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:MK_MOVE")->setValue32(autowalkState());
|
||||
}// update //
|
||||
|
||||
|
||||
|
|
|
@ -775,7 +775,7 @@ void CInterfaceChatDisplayer::displayChat(TDataSetIndex compressedSenderIndex, c
|
|||
PeopleInterraction.ChatInput.DynamicChat[dbIndex].displayMessage(finalString, col, 2, &windowVisible);
|
||||
|
||||
// Add dynchannel info before text so that the chat log will show the correct string.
|
||||
CCDBNodeLeaf* node = pIM->getDbProp("UI:SAVE:CHAT:SHOW_DYN_CHANNEL_NAME_IN_CHAT_CB", false);
|
||||
CCDBNodeLeaf* node = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_DYN_CHANNEL_NAME_IN_CHAT_CB", false);
|
||||
if (pIM->getLogState())
|
||||
{
|
||||
// Add dyn chan number before string
|
||||
|
@ -1185,10 +1185,10 @@ static void setupBotChatBotGift(CInterfaceGroup *botChatGroup)
|
|||
{
|
||||
// create dummy item in the db
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
im->getDbProp("SERVER:INVENTORY:20:0:SHEET")->setValue32(CSheetId("ai_flesh_poisson.item").asInt());
|
||||
im->getDbProp("SERVER:INVENTORY:20:0:QUALITY")->setValue32(0);
|
||||
im->getDbProp("SERVER:INVENTORY:20:1:SHEET")->setValue32(CSheetId("fyros_sword_lvl_01_05.item").asInt());
|
||||
im->getDbProp("SERVER:INVENTORY:20:1:QUALITY")->setValue32(2);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:INVENTORY:20:0:SHEET")->setValue32(CSheetId("ai_flesh_poisson.item").asInt());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:INVENTORY:20:0:QUALITY")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:INVENTORY:20:1:SHEET")->setValue32(CSheetId("fyros_sword_lvl_01_05.item").asInt());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:INVENTORY:20:1:QUALITY")->setValue32(2);
|
||||
CBotChat::setBotGift(botChatGroup, ucstring("Thanks to have succeeded the mission"), ucstring("Here's your reward"), ucstring("The bot has taken the object quest from your inventory"));
|
||||
}
|
||||
*/
|
||||
|
@ -1360,9 +1360,9 @@ void impulseBeginCast(NLMISC::CBitMemStream &impulse)
|
|||
impulse.serial(end);
|
||||
if (PermanentlyBanned) return;
|
||||
CInterfaceManager* iMngr = CInterfaceManager::getInstance();
|
||||
iMngr->getDbProp("UI:VARIABLES:SPELL_CAST")->setValue32(1);
|
||||
iMngr->getDbProp("UI:VARIABLES:CAST_BEGIN")->setValue32(begin);
|
||||
iMngr->getDbProp("UI:VARIABLES:CAST_END")->setValue32(end);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SPELL_CAST")->setValue32(1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:CAST_BEGIN")->setValue32(begin);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:CAST_END")->setValue32(end);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1836,7 +1836,7 @@ void impulseTeamContactStatus(NLMISC::CBitMemStream &impulse)
|
|||
|
||||
// Resort the contact list if needed
|
||||
CInterfaceManager* pIM= CInterfaceManager::getInstance();
|
||||
CPeopleList::TSortOrder order = (CPeopleList::TSortOrder)(pIM->getDbProp("UI:SAVE:CONTACT_LIST:SORT_ORDER")->getValue32());
|
||||
CPeopleList::TSortOrder order = (CPeopleList::TSortOrder)(NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CONTACT_LIST:SORT_ORDER")->getValue32());
|
||||
|
||||
if (order == CPeopleList::sort_online)
|
||||
{
|
||||
|
@ -2409,7 +2409,7 @@ void impulseJournalCantAbandon (NLMISC::CBitMemStream &impulse)
|
|||
{
|
||||
if (PermanentlyBanned) return;
|
||||
/// reactivate abandon button
|
||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:TEMP:MISSION_ABANDON_BUTTON",false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:MISSION_ABANDON_BUTTON",false);
|
||||
if (pNL != NULL)
|
||||
pNL->setValue64(1);
|
||||
}
|
||||
|
@ -2551,7 +2551,7 @@ void impulseGuildOpenGuildWindow(NLMISC::CBitMemStream &impulse)
|
|||
void impulseGuildOpenInventory (NLMISC::CBitMemStream &impulse)
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
pIM->getDbProp("UI:TEMP:INVENTORY_GUILD_OPENED")->setValue32(1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:INVENTORY_GUILD_OPENED")->setValue32(1);
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
|
@ -2560,7 +2560,7 @@ void impulseGuildOpenInventory (NLMISC::CBitMemStream &impulse)
|
|||
void impulseGuildCloseInventory (NLMISC::CBitMemStream &impulse)
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
pIM->getDbProp("UI:TEMP:INVENTORY_GUILD_OPENED")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:INVENTORY_GUILD_OPENED")->setValue32(0);
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
|
@ -3124,7 +3124,7 @@ void impulseItemOpenRoomInventory(NLMISC::CBitMemStream &impulse)
|
|||
if (PermanentlyBanned) return;
|
||||
// This is a message because we may do other things there
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
pIM->getDbProp("UI:TEMP:INVENTORY_ROOM_OPENED")->setValue32(1);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:INVENTORY_ROOM_OPENED")->setValue32(1);
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
|
@ -3134,7 +3134,7 @@ void impulseItemCloseRoomInventory(NLMISC::CBitMemStream &impulse)
|
|||
if (PermanentlyBanned) return;
|
||||
// This is a message because we may do other things there
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
pIM->getDbProp("UI:TEMP:INVENTORY_ROOM_OPENED")->setValue32(0);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:INVENTORY_ROOM_OPENED")->setValue32(0);
|
||||
|
||||
// deactivate the pop up window
|
||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:inv_room"));
|
||||
|
@ -3198,17 +3198,17 @@ void impulseOutpostDeclareWarAck(NLMISC::CBitMemStream &impulse)
|
|||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
// ack reception
|
||||
CCDBNodeLeaf *node= pIM->getDbProp("UI:TEMP:OUTPOST:DECLARE_WAR_ACK_RECEIVED");
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:DECLARE_WAR_ACK_RECEIVED");
|
||||
if(node)
|
||||
node->setValueBool(true);
|
||||
// set result of ACK
|
||||
node= pIM->getDbProp("UI:TEMP:OUTPOST:DECLARE_WAR_ACK_OK");
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:DECLARE_WAR_ACK_OK");
|
||||
if(node)
|
||||
node->setValueBool(canValidate);
|
||||
node= pIM->getDbProp("UI:TEMP:OUTPOST:DECLARE_WAR_ACK_TEXTID");
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:DECLARE_WAR_ACK_TEXTID");
|
||||
if(node)
|
||||
node->setValue32(docTextId);
|
||||
node= pIM->getDbProp("UI:TEMP:OUTPOST:DECLARE_WAR_ACK_TIME_RANGE_ATT");
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:DECLARE_WAR_ACK_TIME_RANGE_ATT");
|
||||
if(node)
|
||||
node->setValue32(timeStartAttack);
|
||||
}
|
||||
|
@ -3407,7 +3407,7 @@ void impulseUserPopup(NLMISC::CBitMemStream &impulse)
|
|||
|
||||
// setup TEMP DB for title
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *node= pIM->getDbProp("UI:TEMP:SERVER_POPUP:TITLE");
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:SERVER_POPUP:TITLE");
|
||||
if(node) node->setValue32(titleTextId);
|
||||
|
||||
// Open the Popup only when the 2 dyn strings are available
|
||||
|
@ -3862,22 +3862,22 @@ bool CNetManager::update()
|
|||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
if (im)
|
||||
{
|
||||
CCDBNodeLeaf *node = im->getDbProp("UI:VARIABLES:PING", false);
|
||||
CCDBNodeLeaf *node = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:PING", false);
|
||||
if (node)
|
||||
node->setValue32(getPing());
|
||||
node = im->getDbProp("UI:VARIABLES:UPLOAD", false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:UPLOAD", false);
|
||||
if (node)
|
||||
node->setValue32((sint32)(getMeanUpload()*1024.f/8.f));
|
||||
node = im->getDbProp("UI:VARIABLES:DOWNLOAD", false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:DOWNLOAD", false);
|
||||
if (node)
|
||||
node->setValue32((sint32)(getMeanDownload()*1024.f/8.f));
|
||||
node = im->getDbProp("UI:VARIABLES:PACKETLOST", false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:PACKETLOST", false);
|
||||
if (node)
|
||||
node->setValue32((sint32)getMeanPacketLoss());
|
||||
node = im->getDbProp("UI:VARIABLES:SERVERSTATE", false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SERVERSTATE", false);
|
||||
if (node)
|
||||
node->setValue32((sint32)getConnectionState());
|
||||
node = im->getDbProp("UI:VARIABLES:CONNECTION_QUALITY", false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:CONNECTION_QUALITY", false);
|
||||
if (node)
|
||||
node->setValue32((sint32)getConnectionQuality());
|
||||
}
|
||||
|
|
|
@ -46,15 +46,15 @@ void COutpostManager::startPvpJoinProposal(bool playerGuildInConflict, bool play
|
|||
// setup TEMP DB
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
CCDBNodeLeaf *node= pIM->getDbProp("UI:TEMP:OUTPOST:PVP_PROPOSAL_PLAYER_GUILD_IN_CONFLICT");
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:PVP_PROPOSAL_PLAYER_GUILD_IN_CONFLICT");
|
||||
if(node) node->setValueBool(playerGuildInConflict);
|
||||
node= pIM->getDbProp("UI:TEMP:OUTPOST:PVP_PROPOSAL_PLAYER_GUILD_IS_ATTACKER");
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:PVP_PROPOSAL_PLAYER_GUILD_IS_ATTACKER");
|
||||
if(node) node->setValueBool(playerGuildIsAttacker);
|
||||
node= pIM->getDbProp("UI:TEMP:OUTPOST:PVP_PROPOSAL_ATTACKER");
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:PVP_PROPOSAL_ATTACKER");
|
||||
if(node) node->setValue32(attackerGuildNameId);
|
||||
node= pIM->getDbProp("UI:TEMP:OUTPOST:PVP_PROPOSAL_DEFENDER");
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:PVP_PROPOSAL_DEFENDER");
|
||||
if(node) node->setValue32(ownerGuildNameId);
|
||||
node= pIM->getDbProp("UI:TEMP:OUTPOST:PVP_PROPOSAL_TICK_END");
|
||||
node= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:PVP_PROPOSAL_TICK_END");
|
||||
if(node) node->setValue32(_EndTickForPvpJoinProposal);
|
||||
|
||||
// open Popup
|
||||
|
|
|
@ -844,9 +844,9 @@ void CPlayerCL::updateVisualPropertyVpa(const NLMISC::TGameCycle &/* gameCycle *
|
|||
sint64 vB, vC;
|
||||
string propName;
|
||||
propName = toString("SERVER:Entities:E%d:P%d", _Slot, CLFECOMMON::PROPERTY_VPB);
|
||||
vB = IM->getDbProp(propName)->getValue64();
|
||||
vB = NLGUI::CDBManager::getInstance()->getDbProp(propName)->getValue64();
|
||||
propName = toString("SERVER:Entities:E%d:P%d", _Slot, CLFECOMMON::PROPERTY_VPC);
|
||||
vC = IM->getDbProp(propName)->getValue64();
|
||||
vC = NLGUI::CDBManager::getInstance()->getDbProp(propName)->getValue64();
|
||||
updateVisualPropertyVpb(0, vB);
|
||||
updateVisualPropertyVpc(0, vC);
|
||||
|
||||
|
@ -1015,7 +1015,7 @@ void CPlayerCL::updateVisualPropertyPvpMode(const NLMISC::TGameCycle &gameCycle,
|
|||
if(isTarget())
|
||||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *pDB= pIM->getDbProp("UI:VARIABLES:USER:TRACK_TARGET_PVP_CHANGE_MODE");
|
||||
CCDBNodeLeaf *pDB= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:TRACK_TARGET_PVP_CHANGE_MODE");
|
||||
if(pDB)
|
||||
{
|
||||
sint32 val= pDB->getValue32();
|
||||
|
@ -1265,7 +1265,7 @@ void CPlayerCL::load() // virtual
|
|||
if(!_WaitForAppearance)
|
||||
{
|
||||
// Visual properties A
|
||||
sint64 prop = IM->getDbProp("SERVER:Entities:E"+toString("%d", _Slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
||||
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", _Slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
||||
updateVisualPropertyVpa(0, prop); // Vpa udapte vpb and vpc too.
|
||||
}
|
||||
}// load //
|
||||
|
|
|
@ -122,7 +122,7 @@ CPlayerR2CL::~CPlayerR2CL()
|
|||
CGenderInfo * CPlayerR2CL::getGenderInfo()
|
||||
{
|
||||
string propName = toString("SERVER:Entities:E%d:P%d", _Slot, CLFECOMMON::PROPERTY_VPB);
|
||||
sint64 vA = CInterfaceManager::getInstance ()->getDbProp(propName)->getValue64();
|
||||
sint64 vA = NLGUI::CDBManager::getInstance()->getDbProp(propName)->getValue64();
|
||||
SPropVisualA visualA = *(SPropVisualA *)(&vA);
|
||||
EGSPD::CPeople::TPeople ePeople = _Sheet->Race;
|
||||
bool bMale = (_Sheet->Gender == GSGENDER::male);
|
||||
|
@ -624,9 +624,9 @@ void CPlayerR2CL::updateVisualPropertyVpa(const NLMISC::TGameCycle &/* gameCycle
|
|||
sint64 vB, vC;
|
||||
string propName;
|
||||
propName = toString("SERVER:Entities:E%d:P%d", _Slot, CLFECOMMON::PROPERTY_VPB);
|
||||
vB = IM->getDbProp(propName)->getValue64();
|
||||
vB = NLGUI::CDBManager::getInstance()->getDbProp(propName)->getValue64();
|
||||
propName = toString("SERVER:Entities:E%d:P%d", _Slot, CLFECOMMON::PROPERTY_VPC);
|
||||
vC = IM->getDbProp(propName)->getValue64();
|
||||
vC = NLGUI::CDBManager::getInstance()->getDbProp(propName)->getValue64();
|
||||
updateVisualPropertyVpb(0, vB);
|
||||
updateVisualPropertyVpc(0, vC);
|
||||
|
||||
|
@ -1033,7 +1033,7 @@ void CPlayerR2CL::load() // virtual
|
|||
if(!_WaitForAppearance)
|
||||
{
|
||||
// Visual properties A
|
||||
sint64 prop = IM->getDbProp("SERVER:Entities:E"+toString("%d", _Slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
||||
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", _Slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
||||
updateVisualPropertyVpa(0, prop); // Vpa udapte vpb and vpc too.
|
||||
}
|
||||
}// load //
|
||||
|
|
|
@ -395,7 +395,7 @@ void CProgress::internalProgress (float value)
|
|||
// \todo GUIGUI : Remove this when possible.
|
||||
NetMngr.update();
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
|
||||
// update system dependent progress bar
|
||||
static uint previousValue = 0;
|
||||
|
|
|
@ -756,7 +756,7 @@ void CDisplayerVisualEntity::updateRaceAndSex()
|
|||
// update sex
|
||||
SPropVisualA vA;
|
||||
const string propNameA = toString("SERVER:Entities:E%d:P%d", _Entity->slot(), CLFECOMMON::PROPERTY_VPA);
|
||||
CCDBNodeLeaf *leafA = CInterfaceManager::getInstance()->getDbProp(propNameA);
|
||||
CCDBNodeLeaf *leafA = NLGUI::CDBManager::getInstance()->getDbProp(propNameA);
|
||||
if (!leafA)
|
||||
{
|
||||
nlwarning("Can't find DB leaf %s", propNameA.c_str());
|
||||
|
@ -792,9 +792,9 @@ void CDisplayerVisualEntity::updateEntity()
|
|||
const string propNameA = toString("SERVER:Entities:E%d:P%d", _Entity->slot(), CLFECOMMON::PROPERTY_VPA);
|
||||
const string propNameB = toString("SERVER:Entities:E%d:P%d", _Entity->slot(), CLFECOMMON::PROPERTY_VPB);
|
||||
const string propNameC = toString("SERVER:Entities:E%d:P%d", _Entity->slot(), CLFECOMMON::PROPERTY_VPC);
|
||||
leafA = CInterfaceManager::getInstance()->getDbProp(propNameA);
|
||||
leafB = CInterfaceManager::getInstance()->getDbProp(propNameB);
|
||||
leafC = CInterfaceManager::getInstance()->getDbProp(propNameC);
|
||||
leafA = NLGUI::CDBManager::getInstance()->getDbProp(propNameA);
|
||||
leafB = NLGUI::CDBManager::getInstance()->getDbProp(propNameB);
|
||||
leafC = NLGUI::CDBManager::getInstance()->getDbProp(propNameC);
|
||||
if (!leafA)
|
||||
{
|
||||
nlwarning("Can't find DB leaf %s", propNameA.c_str());
|
||||
|
@ -1085,9 +1085,9 @@ std::string CDisplayerVisualEntity::getVisualProperties() const
|
|||
const std::string propNameB = toString("SERVER:Entities:E%d:P%d", _Entity->slot(), CLFECOMMON::PROPERTY_VPB);
|
||||
const std::string propNameC = toString("SERVER:Entities:E%d:P%d", _Entity->slot(), CLFECOMMON::PROPERTY_VPC);
|
||||
|
||||
CCDBNodeLeaf *leafA = CInterfaceManager::getInstance()->getDbProp(propNameA);
|
||||
CCDBNodeLeaf *leafB = CInterfaceManager::getInstance()->getDbProp(propNameB);
|
||||
CCDBNodeLeaf *leafC = CInterfaceManager::getInstance()->getDbProp(propNameC);
|
||||
CCDBNodeLeaf *leafA = NLGUI::CDBManager::getInstance()->getDbProp(propNameA);
|
||||
CCDBNodeLeaf *leafB = NLGUI::CDBManager::getInstance()->getDbProp(propNameB);
|
||||
CCDBNodeLeaf *leafC = NLGUI::CDBManager::getInstance()->getDbProp(propNameC);
|
||||
if (!leafA)
|
||||
{
|
||||
nlwarning("Can't find DB leaf %s", propNameA.c_str());
|
||||
|
|
|
@ -330,12 +330,12 @@ void CEditorConfig::setDisplayInfo(const std::string& formName, bool displayInfo
|
|||
//H_AUTO(R2_CEditorConfig_setDisplayInfo)
|
||||
CInterfaceManager *IM = CInterfaceManager::getInstance ();
|
||||
uint32 index = _NameToId[formName];
|
||||
uint32 newValue = static_cast<uint32>(IM->getDbProp("UI:SAVE:R2:DISPLAYINFO")->getValue32());
|
||||
uint32 newValue = static_cast<uint32>(NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:R2:DISPLAYINFO")->getValue32());
|
||||
if (displayInfo == false )
|
||||
newValue &= ~(1 << index);
|
||||
else
|
||||
newValue |= (1 << index);
|
||||
IM->getDbProp("UI:SAVE:R2:DISPLAYINFO")->setValue32(static_cast<sint32>(newValue));
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:R2:DISPLAYINFO")->setValue32(static_cast<sint32>(newValue));
|
||||
|
||||
}
|
||||
|
||||
|
@ -343,7 +343,7 @@ void CEditorConfig::setDisplayInfo(uint32 displayInfo)
|
|||
{
|
||||
//H_AUTO(R2_CEditorConfig_setDisplayInfo)
|
||||
CInterfaceManager *IM = CInterfaceManager::getInstance ();
|
||||
IM->getDbProp("UI:SAVE:R2:DISPLAYINFO")->setValue32(static_cast<sint32>(displayInfo));
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:R2:DISPLAYINFO")->setValue32(static_cast<sint32>(displayInfo));
|
||||
}
|
||||
|
||||
|
||||
|
@ -356,7 +356,7 @@ bool CEditorConfig::mustDisplayInfo(const std::string& formName) const
|
|||
if (found == _NameToId.end())
|
||||
return false;
|
||||
uint32 index = (*found).second;
|
||||
uint32 newValue = static_cast<uint32>(IM->getDbProp("UI:SAVE:R2:DISPLAYINFO")->getValue32());
|
||||
uint32 newValue = static_cast<uint32>(NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:R2:DISPLAYINFO")->getValue32());
|
||||
uint32 ok = (newValue >> index) & 0x00000001;
|
||||
if (ok != 0)
|
||||
return true;
|
||||
|
@ -376,7 +376,7 @@ uint32 CEditorConfig::getDisplayInfo() const
|
|||
{
|
||||
//H_AUTO(R2_CEditorConfig_getDisplayInfo)
|
||||
CInterfaceManager *IM = CInterfaceManager::getInstance ();
|
||||
return static_cast<uint32>(IM->getDbProp("UI:SAVE:R2:DISPLAYINFO")->getValue32());
|
||||
return static_cast<uint32>(NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:R2:DISPLAYINFO")->getValue32());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1728,7 +1728,7 @@ void CEditor::waitScenarioScreen()
|
|||
|
||||
}
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
|
||||
// check if we can send another dated block
|
||||
if (NetMngr.getCurrentServerTick() != serverTick)
|
||||
|
@ -1774,7 +1774,7 @@ void CEditor::waitScenarioScreen()
|
|||
|
||||
getUI().updateFrameViews(NULL);
|
||||
IngameDbMngr.flushObserverCalls();
|
||||
CInterfaceManager::getInstance()->flushObserverCalls();
|
||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||
|
||||
// Movie shooter
|
||||
globalMenuMovieShooter();
|
||||
|
@ -2741,14 +2741,14 @@ uint CEditor::getMaxNumPlotItems()
|
|||
CCDBNodeLeaf *CEditor::getRefPlotItemSheetDBLeaf(uint index)
|
||||
{
|
||||
//H_AUTO(R2_CEditor_getRefPlotItemSheetDBLeaf)
|
||||
return getUI().getDbProp(toString("LOCAL:R2:REFERENCE_PLOT_ITEMS:%d:SHEET", (int) index), false);
|
||||
return NLGUI::CDBManager::getInstance()->getDbProp(toString("LOCAL:R2:REFERENCE_PLOT_ITEMS:%d:SHEET", (int) index), false);
|
||||
}
|
||||
|
||||
// *********************************************************************************************************
|
||||
CCDBNodeLeaf *CEditor::getPlotItemSheetDBLeaf(uint index)
|
||||
{
|
||||
//H_AUTO(R2_CEditor_getPlotItemSheetDBLeaf)
|
||||
return getUI().getDbProp(toString("LOCAL:R2:PLOT_ITEMS:%d:SHEET", (int) index), false);
|
||||
return NLGUI::CDBManager::getInstance()->getDbProp(toString("LOCAL:R2:PLOT_ITEMS:%d:SHEET", (int) index), false);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2761,7 +2761,7 @@ void CEditor::setReferencePlotItemSheet(uint index, uint32 sheetId)
|
|||
{
|
||||
leaf->setValue32(sheetId);
|
||||
}
|
||||
leaf = getUI().getDbProp(toString("LOCAL:R2:AVAILABLE_PLOT_ITEMS:%d:SHEET", (int) index), false);
|
||||
leaf = NLGUI::CDBManager::getInstance()->getDbProp(toString("LOCAL:R2:AVAILABLE_PLOT_ITEMS:%d:SHEET", (int) index), false);
|
||||
if (leaf)
|
||||
{
|
||||
leaf->setValue32(sheetId);
|
||||
|
@ -4841,24 +4841,24 @@ CEntityCL *CEditor::createEntity(uint slot, const NLMISC::CSheetId &sheetId, con
|
|||
sint64 *prop = 0;
|
||||
CCDBNodeLeaf *node = 0;
|
||||
// Set The property 'CLFECOMMON::PROPERTY_POSITION'.
|
||||
node = im->getDbProp("SERVER:Entities:E" + NLMISC::toString("%d", slot)+":P" + NLMISC::toString("%d", CLFECOMMON::PROPERTY_POSX), false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + NLMISC::toString("%d", slot)+":P" + NLMISC::toString("%d", CLFECOMMON::PROPERTY_POSX), false);
|
||||
if(node)
|
||||
{
|
||||
sint64 x = (sint64)(pos.x*1000.0);
|
||||
sint64 y = (sint64)(pos.y*1000.0);
|
||||
sint64 z = (sint64)(pos.z*1000.0);
|
||||
node->setValue64(x);
|
||||
node = im->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_POSY), false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_POSY), false);
|
||||
if(node)
|
||||
{
|
||||
node->setValue64(y);
|
||||
node = im->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_POSZ), false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_POSZ), false);
|
||||
if(node)
|
||||
node->setValue64(z);
|
||||
}
|
||||
}
|
||||
// Set The property 'PROPERTY_ORIENTATION'.
|
||||
node = im->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_ORIENTATION), false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_ORIENTATION), false);
|
||||
if(node)
|
||||
{
|
||||
union
|
||||
|
@ -4870,7 +4870,7 @@ CEntityCL *CEditor::createEntity(uint slot, const NLMISC::CSheetId &sheetId, con
|
|||
node->setValue64(heading64);
|
||||
}
|
||||
// Set Mode
|
||||
node = im->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_MODE), false);
|
||||
node = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_MODE), false);
|
||||
if(node)
|
||||
{
|
||||
MBEHAV::EMode m = MBEHAV::NORMAL;
|
||||
|
@ -4915,7 +4915,7 @@ CEntityCL *CEditor::createEntity(uint slot, const NLMISC::CSheetId &sheetId, con
|
|||
}
|
||||
|
||||
// Set the database.
|
||||
im->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->setValue64(*prop);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->setValue64(*prop);
|
||||
|
||||
// Set Visual Properties
|
||||
SPropVisualB visualB;
|
||||
|
@ -4924,7 +4924,7 @@ CEntityCL *CEditor::createEntity(uint slot, const NLMISC::CSheetId &sheetId, con
|
|||
sint64 *propB = 0;
|
||||
propB = (sint64 *)&visualB;
|
||||
// Set the database.
|
||||
im->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->setValue64(*propB);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->setValue64(*propB);
|
||||
|
||||
// Apply Changes.
|
||||
EntitiesMngr.updateVisualProperty(0, slot, CLFECOMMON::PROPERTY_VPA);
|
||||
|
@ -7191,13 +7191,13 @@ class CAHCreateEntity : public IActionHandler
|
|||
}
|
||||
|
||||
prop = (sint64 *)&vA;
|
||||
im->getDbProp("SERVER:Entities:E"+toString("%d", entity->slot())+":P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->setValue64(*prop);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", entity->slot())+":P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->setValue64(*prop);
|
||||
|
||||
prop = (sint64 *)&vB;
|
||||
im->getDbProp("SERVER:Entities:E"+toString("%d", entity->slot())+":P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->setValue64(*prop);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", entity->slot())+":P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->setValue64(*prop);
|
||||
|
||||
prop = (sint64 *)&vC;
|
||||
im->getDbProp("SERVER:Entities:E"+toString("%d", entity->slot())+":P"+toString("%d", CLFECOMMON::PROPERTY_VPC))->setValue64(*prop);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", entity->slot())+":P"+toString("%d", CLFECOMMON::PROPERTY_VPC))->setValue64(*prop);
|
||||
|
||||
EntitiesMngr.updateVisualProperty(0, entity->slot(), CLFECOMMON::PROPERTY_VPA);
|
||||
EntitiesMngr.updateVisualProperty(0, entity->slot(), CLFECOMMON::PROPERTY_VPB);
|
||||
|
@ -7205,7 +7205,7 @@ class CAHCreateEntity : public IActionHandler
|
|||
}
|
||||
}
|
||||
|
||||
getEditor().setCurrentTool(new CToolCreateEntity(ghostSlot, paletteId, im->getDbProp("UI:TEMP:R2_DRAW_ARRAY")->getValueBool()));
|
||||
getEditor().setCurrentTool(new CToolCreateEntity(ghostSlot, paletteId, NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:R2_DRAW_ARRAY")->getValueBool()));
|
||||
}
|
||||
};
|
||||
REGISTER_ACTION_HANDLER(CAHCreateEntity, "r2ed_create_entity");
|
||||
|
@ -7624,9 +7624,9 @@ class CAHR2DMGiftValidate : public IActionHandler
|
|||
{
|
||||
uint32 sheetId = 0;
|
||||
uint8 quantity = 0;
|
||||
CCDBNodeLeaf *sheetLeaf = im->getDbProp(toString("LOCAL:R2:DM_GIFT:%d:SHEET", (int) k));
|
||||
CCDBNodeLeaf *sheetLeaf = NLGUI::CDBManager::getInstance()->getDbProp(toString("LOCAL:R2:DM_GIFT:%d:SHEET", (int) k));
|
||||
if (sheetLeaf) sheetId = (uint32) sheetLeaf->getValue32();
|
||||
CCDBNodeLeaf *quantityLeaf = im->getDbProp(toString("LOCAL:R2:DM_GIFT:%d:QUANTITY", (int) k));
|
||||
CCDBNodeLeaf *quantityLeaf = NLGUI::CDBManager::getInstance()->getDbProp(toString("LOCAL:R2:DM_GIFT:%d:QUANTITY", (int) k));
|
||||
if (quantityLeaf) quantity = (uint8) quantityLeaf->getValue8();
|
||||
out.serial(sheetId);
|
||||
out.serial(quantity);
|
||||
|
|
|
@ -550,7 +550,7 @@ void CTool::handleMouseOverPlayer(bool over)
|
|||
{
|
||||
//H_AUTO(R2_CTool_handleMouseOverPlayer)
|
||||
// If the mouse is over the player make the player transparent
|
||||
CCDBNodeLeaf *pNL = getUI().getDbProp("UI:SAVE:USER_CHAR_FADE", false);
|
||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:USER_CHAR_FADE", false);
|
||||
if ((pNL != NULL) && (pNL->getValue32() == 1) && UserEntity->selectable())
|
||||
{
|
||||
// If the nearest entity is the player, hide!
|
||||
|
|
|
@ -240,9 +240,9 @@ std::string CToolCreateEntity::cloneEntityIntoScenario(CEntityCL *clonee,
|
|||
const string propNameA = toString("SERVER:Entities:E%d:P%d", clonee->slot(), CLFECOMMON::PROPERTY_VPA);
|
||||
const string propNameB = toString("SERVER:Entities:E%d:P%d", clonee->slot(), CLFECOMMON::PROPERTY_VPB);
|
||||
const string propNameC = toString("SERVER:Entities:E%d:P%d", clonee->slot(), CLFECOMMON::PROPERTY_VPC);
|
||||
CCDBNodeLeaf *leafA = CInterfaceManager::getInstance()->getDbProp(propNameA);
|
||||
CCDBNodeLeaf *leafB = CInterfaceManager::getInstance()->getDbProp(propNameB);
|
||||
CCDBNodeLeaf *leafC = CInterfaceManager::getInstance()->getDbProp(propNameC);
|
||||
CCDBNodeLeaf *leafA = NLGUI::CDBManager::getInstance()->getDbProp(propNameA);
|
||||
CCDBNodeLeaf *leafB = NLGUI::CDBManager::getInstance()->getDbProp(propNameB);
|
||||
CCDBNodeLeaf *leafC = NLGUI::CDBManager::getInstance()->getDbProp(propNameC);
|
||||
if (!leafA)
|
||||
{
|
||||
nlwarning("Can't find DB leaf %s", propNameA.c_str());
|
||||
|
@ -821,7 +821,7 @@ class CAHR2EDToggleDrawArray : public IActionHandler
|
|||
CCtrlBaseButton *but = dynamic_cast<CCtrlBaseButton *>(pCaller);
|
||||
if (but)
|
||||
{
|
||||
im->getDbProp("UI:TEMP:R2_DRAW_ARRAY")->setValueBool(but->getPushed());
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:R2_DRAW_ARRAY")->setValueBool(but->getPushed());
|
||||
CToolCreateEntity *tce = dynamic_cast<CToolCreateEntity *>(getEditor().getCurrentTool());
|
||||
if (tce)
|
||||
{
|
||||
|
|
|
@ -335,8 +335,8 @@ void releaseMainLoopReselect()
|
|||
pIM->releaseServerToLocalAutoCopyObservers();
|
||||
// Then remove the SERVER and LOCAL database (NB: "UI" node was removed by uninitIngame1())
|
||||
ICDBNode::CTextId serverId("SERVER"), localId("LOCAL");
|
||||
pIM->getDB()->removeNode(serverId);
|
||||
pIM->getDB()->removeNode(localId);
|
||||
NLGUI::CDBManager::getInstance()->getDB()->removeNode(serverId);
|
||||
NLGUI::CDBManager::getInstance()->getDB()->removeNode(localId);
|
||||
nlassert(IngameDbMngr.getNodePtr()==NULL); // actually it is the "SERVER" node kept by CRefPtr => should be NULL
|
||||
IngameDbMngr.clear(); // still important for CDBBranch statics data release
|
||||
// NB: "SERVER" and "LOCAL" node will be recreated by initMainLoop
|
||||
|
@ -635,6 +635,7 @@ void release()
|
|||
CPdrTokenRegistry::releaseInstance();
|
||||
NLNET::IModuleManager::releaseInstance();
|
||||
delete &CLuaManager::getInstance();
|
||||
NLGUI::CDBManager::release();
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -250,15 +250,15 @@ void initClientTime()
|
|||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
// get a direct link to the database
|
||||
pIM->getDbProp("UI:VARIABLES:CURRENT_TIME");
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:CURRENT_TIME");
|
||||
InterfaceTime->link("UI:VARIABLES:CURRENT_TIME");
|
||||
pIM->getDbProp("UI:VARIABLES:CURRENT_SERVER_TICK");
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:CURRENT_SERVER_TICK");
|
||||
InterfaceServerTick->link("UI:VARIABLES:CURRENT_SERVER_TICK");
|
||||
pIM->getDbProp("UI:VARIABLES:CURRENT_SMOOTH_SERVER_TICK");
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:CURRENT_SMOOTH_SERVER_TICK");
|
||||
InterfaceSmoothServerTick->link("UI:VARIABLES:CURRENT_SMOOTH_SERVER_TICK");
|
||||
pIM->getDbProp("UI:VARIABLES:CURRENT_DAY");
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:CURRENT_DAY");
|
||||
InterfaceDay->link("UI:VARIABLES:CURRENT_DAY");
|
||||
pIM->getDbProp("UI:VARIABLES:DAY_BEFORE_ZC_DISTRIB");
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:DAY_BEFORE_ZC_DISTRIB");
|
||||
InterfaceDayBeforeNextZCDistrib->link("UI:VARIABLES:DAY_BEFORE_ZC_DISTRIB");
|
||||
}
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ CUserEntity::~CUserEntity()
|
|||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
{
|
||||
CCDBNodeLeaf *node = pIM->getDbProp("SERVER:USER:IS_INVISIBLE", false);
|
||||
CCDBNodeLeaf *node = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:IS_INVISIBLE", false);
|
||||
if (node)
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
|
@ -210,7 +210,7 @@ CUserEntity::~CUserEntity()
|
|||
|
||||
for(uint i=0;i<EGSPD::CSPType::EndSPType;i++)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("SERVER:USER:SKILL_POINTS_%d:VALUE", i), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:USER:SKILL_POINTS_%d:VALUE", i), false);
|
||||
if(node)
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
|
@ -224,7 +224,7 @@ CUserEntity::~CUserEntity()
|
|||
uint32 fameIndexInDatabase = CStaticFames::getInstance().getDatabaseIndex(factionIndex);
|
||||
string sDBPath = toString("SERVER:FAME:PLAYER%d:VALUE",fameIndexInDatabase);
|
||||
|
||||
CCDBNodeLeaf * node = pIM->getDbProp(sDBPath, false);
|
||||
CCDBNodeLeaf * node = NLGUI::CDBManager::getInstance()->getDbProp(sDBPath, false);
|
||||
if(node)
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
|
@ -340,11 +340,11 @@ bool CUserEntity::build(const CEntitySheet *sheet) // virtual
|
|||
visualC.PropertySubData.BreastSize = 7;
|
||||
// Set the Database
|
||||
sint64 *prop = (sint64 *)&visualA;
|
||||
CInterfaceManager::getInstance()->getDbProp("SERVER:Entities:E0:P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->setValue64(*prop); // Set the database
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->setValue64(*prop); // Set the database
|
||||
prop = (sint64 *)&visualB;
|
||||
CInterfaceManager::getInstance()->getDbProp("SERVER:Entities:E0:P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->setValue64(*prop); // Set the database
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->setValue64(*prop); // Set the database
|
||||
prop = (sint64 *)&visualC;
|
||||
CInterfaceManager::getInstance()->getDbProp("SERVER:Entities:E0:P"+toString("%d", CLFECOMMON::PROPERTY_VPC))->setValue64(*prop); // Set the database
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P"+toString("%d", CLFECOMMON::PROPERTY_VPC))->setValue64(*prop); // Set the database
|
||||
// Apply Changes.
|
||||
updateVisualProperty(0, CLFECOMMON::PROPERTY_VPA);
|
||||
}
|
||||
|
@ -360,7 +360,7 @@ bool CUserEntity::build(const CEntitySheet *sheet) // virtual
|
|||
// Add observer on invisible property
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
{
|
||||
CCDBNodeLeaf *node = pIM->getDbProp("SERVER:USER:IS_INVISIBLE", false);
|
||||
CCDBNodeLeaf *node = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:IS_INVISIBLE", false);
|
||||
if (node)
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
|
@ -372,7 +372,7 @@ bool CUserEntity::build(const CEntitySheet *sheet) // virtual
|
|||
for(uint i=0;i<EGSPD::CSPType::EndSPType;i++)
|
||||
{
|
||||
_SkillPointObs[i].SpType= i;
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("SERVER:USER:SKILL_POINTS_%d:VALUE", i), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:USER:SKILL_POINTS_%d:VALUE", i), false);
|
||||
if(node)
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
|
@ -391,7 +391,7 @@ bool CUserEntity::build(const CEntitySheet *sheet) // virtual
|
|||
if( fameObs )
|
||||
{
|
||||
fameObs->FactionIndex = factionIndex;
|
||||
CCDBNodeLeaf * node = pIM->getDbProp(sDBPath, false);
|
||||
CCDBNodeLeaf * node = NLGUI::CDBManager::getInstance()->getDbProp(sDBPath, false);
|
||||
if(node)
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
|
@ -619,14 +619,14 @@ void CUserEntity::updateVisualPropertyPvpMode(const NLMISC::TGameCycle &gameCycl
|
|||
// Additionaly, inform interface of the change
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
// For PVP ZoneFaction
|
||||
CCDBNodeLeaf *pDB= pIM->getDbProp("UI:VARIABLES:USER:TRACK_PVP_CHANGE_MODE");
|
||||
CCDBNodeLeaf *pDB= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:TRACK_PVP_CHANGE_MODE");
|
||||
if(pDB)
|
||||
{
|
||||
sint32 val= pDB->getValue32();
|
||||
pDB->setValue32(val+1);
|
||||
}
|
||||
// For Any PVP change
|
||||
pDB= pIM->getDbProp("UI:VARIABLES:USER:TRACK_PVP_CHANGE_ANY");
|
||||
pDB= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:TRACK_PVP_CHANGE_ANY");
|
||||
if(pDB)
|
||||
{
|
||||
sint32 val= pDB->getValue32();
|
||||
|
@ -641,7 +641,7 @@ void CUserEntity::updateVisualPropertyOutpostInfos(const NLMISC::TGameCycle &gam
|
|||
CPlayerCL::updateVisualPropertyOutpostInfos(gameCycle, prop);
|
||||
// For Any PVP change
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *pDB= pIM->getDbProp("UI:VARIABLES:USER:TRACK_PVP_CHANGE_ANY");
|
||||
CCDBNodeLeaf *pDB= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:TRACK_PVP_CHANGE_ANY");
|
||||
if(pDB)
|
||||
{
|
||||
sint32 val= pDB->getValue32();
|
||||
|
@ -656,7 +656,7 @@ void CUserEntity::updateVisualPropertyPvpClan(const NLMISC::TGameCycle &gameCycl
|
|||
CPlayerCL::updateVisualPropertyPvpClan(gameCycle, prop);
|
||||
// For Any PVP change
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *pDB= pIM->getDbProp("UI:VARIABLES:USER:TRACK_PVP_CHANGE_ANY");
|
||||
CCDBNodeLeaf *pDB= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:TRACK_PVP_CHANGE_ANY");
|
||||
if(pDB)
|
||||
{
|
||||
sint32 val= pDB->getValue32();
|
||||
|
@ -791,7 +791,7 @@ bool CUserEntity::mode(MBEHAV::EMode m)
|
|||
{
|
||||
// Compute the angle
|
||||
const string propName = toString("SERVER:Entities:E%d:P%d", _Slot, CLFECOMMON::PROPERTY_ORIENTATION);
|
||||
sint64 ang = CInterfaceManager::getInstance()->getDbProp(propName)->getValue64();
|
||||
sint64 ang = NLGUI::CDBManager::getInstance()->getDbProp(propName)->getValue64();
|
||||
_TargetAngle = *(float *)(&ang);
|
||||
|
||||
// Initialize controls for the combat.
|
||||
|
@ -2220,7 +2220,7 @@ void CUserEntity::setDead() // virtual
|
|||
uint kamiFameIndex = CStaticFames::getInstance().getFactionIndex("kami");
|
||||
if (pIM && kamiFameIndex != CStaticFames::INVALID_FACTION_INDEX)
|
||||
{
|
||||
CCDBNodeLeaf *pLeafKamiFame = pIM->getDbProp(toString("SERVER:FAME:PLAYER%d:VALUE", kamiFameIndex - 1), false);
|
||||
CCDBNodeLeaf *pLeafKamiFame = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:FAME:PLAYER%d:VALUE", kamiFameIndex - 1), false);
|
||||
if (pLeafKamiFame != NULL)
|
||||
kamiFame = pLeafKamiFame->getValue8();
|
||||
}
|
||||
|
@ -2230,7 +2230,7 @@ void CUserEntity::setDead() // virtual
|
|||
uint karavanFameIndex = CStaticFames::getInstance().getFactionIndex("karavan");
|
||||
if (pIM && karavanFameIndex != CStaticFames::INVALID_FACTION_INDEX)
|
||||
{
|
||||
CCDBNodeLeaf *pLeafKaravanFame = pIM->getDbProp(toString("SERVER:FAME:PLAYER%d:VALUE", karavanFameIndex - 1), false);
|
||||
CCDBNodeLeaf *pLeafKaravanFame = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:FAME:PLAYER%d:VALUE", karavanFameIndex - 1), false);
|
||||
if (pLeafKaravanFame != NULL)
|
||||
karavanFame = pLeafKaravanFame->getValue8();
|
||||
}
|
||||
|
@ -2610,7 +2610,7 @@ void CUserEntity::selection(const CLFECOMMON::TCLEntityId &slot) // virtual
|
|||
// **** Update Target interface
|
||||
//get the new target slot and set it in the database
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
pIM->getDbProp("UI:VARIABLES:TARGET:SLOT")->setValue64(slot);
|
||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:TARGET:SLOT")->setValue64(slot);
|
||||
|
||||
// Get the new target UID, and set in Database
|
||||
uint tgtSlot= _Selection;
|
||||
|
@ -2624,7 +2624,7 @@ void CUserEntity::selection(const CLFECOMMON::TCLEntityId &slot) // virtual
|
|||
}
|
||||
|
||||
// Set the User Target
|
||||
CCDBNodeLeaf *prop = pIM->getDbProp("UI:VARIABLES:TARGET:UID", false);
|
||||
CCDBNodeLeaf *prop = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:TARGET:UID", false);
|
||||
if(prop)
|
||||
prop->setValue32(tgtEntityId);
|
||||
|
||||
|
@ -2635,23 +2635,23 @@ void CUserEntity::selection(const CLFECOMMON::TCLEntityId &slot) // virtual
|
|||
// clear the entries for mission option
|
||||
for(uint k = 0; k < NUM_MISSION_OPTIONS; ++k)
|
||||
{
|
||||
CCDBNodeLeaf *missionOption = pIM->getDbProp(toString("LOCAL:TARGET:CONTEXT_MENU:MISSIONS_OPTIONS:%d:TITLE", (int) k), false);
|
||||
CCDBNodeLeaf *missionOption = NLGUI::CDBManager::getInstance()->getDbProp(toString("LOCAL:TARGET:CONTEXT_MENU:MISSIONS_OPTIONS:%d:TITLE", (int) k), false);
|
||||
if (missionOption)
|
||||
{
|
||||
missionOption->setValue32(0);
|
||||
}
|
||||
CCDBNodeLeaf *playerGiftNeeded = pIM->getDbProp(toString("LOCAL:TARGET:CONTEXT_MENU:MISSIONS_OPTIONS:%d:PLAYER_GIFT_NEEDED", (int) k), false);
|
||||
CCDBNodeLeaf *playerGiftNeeded = NLGUI::CDBManager::getInstance()->getDbProp(toString("LOCAL:TARGET:CONTEXT_MENU:MISSIONS_OPTIONS:%d:PLAYER_GIFT_NEEDED", (int) k), false);
|
||||
if (playerGiftNeeded)
|
||||
{
|
||||
playerGiftNeeded->setValue32(0);
|
||||
}
|
||||
//
|
||||
missionOption = pIM->getDbProp(toString("SERVER:TARGET:CONTEXT_MENU:MISSIONS_OPTIONS:%d:TITLE", (int) k), false);
|
||||
missionOption = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:TARGET:CONTEXT_MENU:MISSIONS_OPTIONS:%d:TITLE", (int) k), false);
|
||||
if (missionOption)
|
||||
{
|
||||
missionOption->setValue32(0);
|
||||
}
|
||||
playerGiftNeeded = pIM->getDbProp(toString("SERVER:TARGET:CONTEXT_MENU:MISSIONS_OPTIONS:%d:PLAYER_GIFT_NEEDED", (int) k), false);
|
||||
playerGiftNeeded = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:TARGET:CONTEXT_MENU:MISSIONS_OPTIONS:%d:PLAYER_GIFT_NEEDED", (int) k), false);
|
||||
if (playerGiftNeeded)
|
||||
{
|
||||
playerGiftNeeded->setValue32(0);
|
||||
|
@ -2694,22 +2694,22 @@ void CUserEntity::selection(const CLFECOMMON::TCLEntityId &slot) // virtual
|
|||
}
|
||||
|
||||
// clear web page
|
||||
prop= pIM->getDbProp("LOCAL:TARGET:CONTEXT_MENU:WEB_PAGE_URL", false);
|
||||
prop= NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:TARGET:CONTEXT_MENU:WEB_PAGE_URL", false);
|
||||
if(prop) prop->setValue32(0);
|
||||
prop= pIM->getDbProp("LOCAL:TARGET:CONTEXT_MENU:WEB_PAGE_TITLE", false);
|
||||
prop= NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:TARGET:CONTEXT_MENU:WEB_PAGE_TITLE", false);
|
||||
if(prop) prop->setValue32(0);
|
||||
|
||||
// clear mission ring
|
||||
for(uint k = 0; k < BOTCHATTYPE::MaxR2MissionEntryDatabase; ++k)
|
||||
{
|
||||
prop= pIM->getDbProp(toString("LOCAL:TARGET:CONTEXT_MENU:MISSION_RING:%d:TITLE", k), false);
|
||||
prop= NLGUI::CDBManager::getInstance()->getDbProp(toString("LOCAL:TARGET:CONTEXT_MENU:MISSION_RING:%d:TITLE", k), false);
|
||||
if(prop) prop->setValue32(0);
|
||||
}
|
||||
|
||||
// clear programs
|
||||
prop= pIM->getDbProp("LOCAL:TARGET:CONTEXT_MENU:PROGRAMMES", false);
|
||||
prop= NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:TARGET:CONTEXT_MENU:PROGRAMMES", false);
|
||||
if(prop) prop->setValue32(0);
|
||||
prop= pIM->getDbProp("SERVER:TARGET:CONTEXT_MENU:PROGRAMMES");
|
||||
prop= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:TARGET:CONTEXT_MENU:PROGRAMMES");
|
||||
if(prop) prop->setValue32(0);
|
||||
// increment db counter for context menu
|
||||
pIM->incLocalSyncActionCounter();
|
||||
|
@ -2977,7 +2977,7 @@ bool CUserEntity::sit(bool s)
|
|||
if(ok)
|
||||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *node= pIM->getDbProp("UI:VARIABLES:PLAYER_STAND", false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:PLAYER_STAND", false);
|
||||
if(node)
|
||||
node->setValue32(_Mode != MBEHAV::SIT);
|
||||
}
|
||||
|
@ -3014,13 +3014,13 @@ void CUserEntity::setAFK(bool b, string afkTxt)
|
|||
return;
|
||||
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
//sint64 start = pIM->getDbProp("SERVER:USER:ACT_TSTART")->getValue64();
|
||||
//sint64 end = pIM->getDbProp("SERVER:USER:ACT_TEND")->getValue64();
|
||||
//sint64 type = pIM->getDbProp("SERVER:USER:ACT_TYPE")->getValue64();
|
||||
//sint64 num = pIM->getDbProp("SERVER:USER:ACT_NUMBER")->getValue64();
|
||||
//sint64 start = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:ACT_TSTART")->getValue64();
|
||||
//sint64 end = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:ACT_TEND")->getValue64();
|
||||
//sint64 type = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:ACT_TYPE")->getValue64();
|
||||
//sint64 num = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:ACT_NUMBER")->getValue64();
|
||||
if( pIM )
|
||||
{
|
||||
if( pIM->getDbProp("SERVER:USER:ACT_TYPE")->getValue64() != 0 )
|
||||
if( NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:ACT_TYPE")->getValue64() != 0 )
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3268,7 +3268,7 @@ bool CUserEntity::isBusy() const
|
|||
|
||||
// TODO : put the right DB entry !
|
||||
|
||||
CCDBNodeLeaf *nod = IM->getDbProp("SERVER:INVENTORY:EXCHANGE:BEGUN", false);
|
||||
CCDBNodeLeaf *nod = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:INVENTORY:EXCHANGE:BEGUN", false);
|
||||
if(nod)
|
||||
{
|
||||
if(nod->getValueBool())
|
||||
|
@ -3283,7 +3283,7 @@ bool CUserEntity::isBusy() const
|
|||
uint i;
|
||||
for(i=0; i<nbSlot; ++i)
|
||||
{
|
||||
nod = IM->getDbProp(NLMISC::toString("SERVER:INVENTORY:%d:%d:SHEET", INVENTORIES::pickup, i), false);
|
||||
nod = NLGUI::CDBManager::getInstance()->getDbProp(NLMISC::toString("SERVER:INVENTORY:%d:%d:SHEET", INVENTORIES::pickup, i), false);
|
||||
if(nod)
|
||||
{
|
||||
if(nod->getValue32() != 0)
|
||||
|
@ -3296,7 +3296,7 @@ bool CUserEntity::isBusy() const
|
|||
// Check Harvest
|
||||
for(i=0; i<nbSlot; ++i)
|
||||
{
|
||||
nod = IM->getDbProp(NLMISC::toString("SERVER:INVENTORY:%d:%d:SHEET", INVENTORIES::harvest, i), false);
|
||||
nod = NLGUI::CDBManager::getInstance()->getDbProp(NLMISC::toString("SERVER:INVENTORY:%d:%d:SHEET", INVENTORIES::harvest, i), false);
|
||||
if(nod)
|
||||
{
|
||||
if(nod->getValue32() != 0)
|
||||
|
@ -3457,7 +3457,7 @@ void CUserEntity::CSpeedFactor::init()
|
|||
{
|
||||
_Value = 1.0f; // Default speed factor is 1.
|
||||
CInterfaceManager *IM = CInterfaceManager::getInstance ();
|
||||
CCDBNodeLeaf *pNodeLeaf = IM->getDbProp("SERVER:USER:SPEED_FACTOR", false);
|
||||
CCDBNodeLeaf *pNodeLeaf = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:SPEED_FACTOR", false);
|
||||
if(pNodeLeaf)
|
||||
{
|
||||
/* if(!pNodeLeaf->addToLeaves(this))
|
||||
|
@ -3483,7 +3483,7 @@ void CUserEntity::CMountHunger::init()
|
|||
void CUserEntity::CMountSpeeds::init()
|
||||
{
|
||||
CInterfaceManager *IM = CInterfaceManager::getInstance ();
|
||||
CCDBNodeLeaf *pNodeLeaf = IM->getDbProp( "SERVER:USER:MOUNT_WALK_SPEED", false );
|
||||
CCDBNodeLeaf *pNodeLeaf = NLGUI::CDBManager::getInstance()->getDbProp( "SERVER:USER:MOUNT_WALK_SPEED", false );
|
||||
BOMB_IF( ! pNodeLeaf, "MOUNT_WALK_SPEED not found", return );
|
||||
if(pNodeLeaf)
|
||||
{
|
||||
|
@ -3491,7 +3491,7 @@ void CUserEntity::CMountSpeeds::init()
|
|||
pNodeLeaf->addObserver(this, textId);
|
||||
_WalkSpeed = ((float)pNodeLeaf->getValue32()) / 1000.0f; // may have been received before
|
||||
}
|
||||
pNodeLeaf = IM->getDbProp( "SERVER:USER:MOUNT_RUN_SPEED", false );
|
||||
pNodeLeaf = NLGUI::CDBManager::getInstance()->getDbProp( "SERVER:USER:MOUNT_RUN_SPEED", false );
|
||||
BOMB_IF( ! pNodeLeaf, "MOUNT_RUN_SPEED not found", return );
|
||||
if(pNodeLeaf)
|
||||
{
|
||||
|
@ -3506,7 +3506,7 @@ void CUserEntity::CMountSpeeds::init()
|
|||
void CUserEntity::CSpeedFactor::release()
|
||||
{
|
||||
CInterfaceManager *IM = CInterfaceManager::getInstance ();
|
||||
CCDBNodeLeaf *pNodeLeaf = IM->getDbProp("SERVER:USER:SPEED_FACTOR", false);
|
||||
CCDBNodeLeaf *pNodeLeaf = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:SPEED_FACTOR", false);
|
||||
if(pNodeLeaf)
|
||||
{
|
||||
/* if(!pNodeLeaf->addToLeaves(this))
|
||||
|
@ -3524,14 +3524,14 @@ void CUserEntity::CMountHunger::release()
|
|||
void CUserEntity::CMountSpeeds::release()
|
||||
{
|
||||
CInterfaceManager *IM = CInterfaceManager::getInstance ();
|
||||
CCDBNodeLeaf *pNodeLeaf = IM->getDbProp( "SERVER:USER:MOUNT_WALK_SPEED", false );
|
||||
CCDBNodeLeaf *pNodeLeaf = NLGUI::CDBManager::getInstance()->getDbProp( "SERVER:USER:MOUNT_WALK_SPEED", false );
|
||||
BOMB_IF( ! pNodeLeaf, "MOUNT_WALK_SPEED not found", return );
|
||||
if(pNodeLeaf)
|
||||
{
|
||||
ICDBNode::CTextId textId;
|
||||
pNodeLeaf->removeObserver(this, textId);
|
||||
}
|
||||
pNodeLeaf = IM->getDbProp( "SERVER:USER:MOUNT_RUN_SPEED", false );
|
||||
pNodeLeaf = NLGUI::CDBManager::getInstance()->getDbProp( "SERVER:USER:MOUNT_RUN_SPEED", false );
|
||||
BOMB_IF( ! pNodeLeaf, "MOUNT_RUN_SPEED not found", return );
|
||||
if(pNodeLeaf)
|
||||
{
|
||||
|
@ -3572,7 +3572,7 @@ bool CUserEntity::CMountHunger::canRun() const
|
|||
|
||||
// Find the mount's db leaf and check hunger
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeBranch *animalsNode = safe_cast<CCDBNodeBranch*>(pIM->getDB()->getNode( ICDBNode::CTextId( "SERVER:PACK_ANIMAL" ), false ));
|
||||
CCDBNodeBranch *animalsNode = safe_cast<CCDBNodeBranch*>(NLGUI::CDBManager::getInstance()->getDB()->getNode( ICDBNode::CTextId( "SERVER:PACK_ANIMAL" ), false ));
|
||||
BOMB_IF( ! animalsNode, "! animalsNode", return false; );
|
||||
uint nbAnimals = (uint)animalsNode->getNbNodes();
|
||||
for ( uint i=0; i!=nbAnimals; ++i )
|
||||
|
@ -3597,8 +3597,8 @@ bool CUserEntity::CMountHunger::canRun() const
|
|||
void CUserEntity::CMountSpeeds::update(ICDBNode * /* node */) // virtual
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
_WalkSpeed = ((float)(pIM->getDbProp("SERVER:USER:MOUNT_WALK_SPEED")->getValue32())) / 1000.0f;
|
||||
_RunSpeed = ((float)(pIM->getDbProp("SERVER:USER:MOUNT_RUN_SPEED")->getValue32())) / 1000.0f;
|
||||
_WalkSpeed = ((float)(NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:MOUNT_WALK_SPEED")->getValue32())) / 1000.0f;
|
||||
_RunSpeed = ((float)(NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:MOUNT_RUN_SPEED")->getValue32())) / 1000.0f;
|
||||
}
|
||||
|
||||
|
||||
|
@ -3621,7 +3621,7 @@ CCDBNodeBranch *CUserEntity::getBeastDBEntry( CLFECOMMON::TClientDataSetIndex ui
|
|||
{
|
||||
// Find animal entry corresponding to datasetId
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeBranch *animalsNode = safe_cast<CCDBNodeBranch*>(pIM->getDB()->getNode( ICDBNode::CTextId( "SERVER:PACK_ANIMAL" ), false ));
|
||||
CCDBNodeBranch *animalsNode = safe_cast<CCDBNodeBranch*>(NLGUI::CDBManager::getInstance()->getDB()->getNode( ICDBNode::CTextId( "SERVER:PACK_ANIMAL" ), false ));
|
||||
BOMB_IF( ! animalsNode, "! animalsNode", return NULL );
|
||||
uint nbAnimals = (uint)animalsNode->getNbNodes();
|
||||
for ( uint i=0; i!=nbAnimals; ++i )
|
||||
|
@ -3713,7 +3713,7 @@ void CUserEntity::load() // virtual
|
|||
if(!_WaitForAppearance)
|
||||
{
|
||||
// Visual properties A
|
||||
sint64 prop = IM->getDbProp("SERVER:Entities:E"+toString("%d", _Slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
||||
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", _Slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
||||
updateVisualPropertyVpa(0, prop); // Vpa udapte vpb and vpc too.
|
||||
}
|
||||
}// load //
|
||||
|
@ -4063,7 +4063,7 @@ void CUserEntity::switchVelocity(bool userRequest)
|
|||
pIM->displaySystemInfo(msg, cat);
|
||||
|
||||
// Write to the UI database, to update views
|
||||
CCDBNodeLeaf *node= pIM->getDbProp("UI:VARIABLES:PLAYER_RUNNING", false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:PLAYER_RUNNING", false);
|
||||
if(node)
|
||||
node->setValue32(_Run);
|
||||
}
|
||||
|
@ -4292,7 +4292,7 @@ void CUserEntity::setR2CharMode(R2::TCharMode mode)
|
|||
bool CUserEntity::isInNpcControl() const
|
||||
{
|
||||
CInterfaceManager* pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *sheet = pIM->getDbProp("SERVER:USER:NPC_CONTROL:SHEET", false);
|
||||
CCDBNodeLeaf *sheet = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:NPC_CONTROL:SHEET", false);
|
||||
return sheet && NLMISC::CSheetId(sheet->getValue32())!=NLMISC::CSheetId::Unknown;
|
||||
}
|
||||
|
||||
|
@ -4300,9 +4300,9 @@ bool CUserEntity::isInNpcControl() const
|
|||
void CUserEntity::updateNpcContolSpeed()
|
||||
{
|
||||
CInterfaceManager* pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *sheet = pIM->getDbProp("SERVER:USER:NPC_CONTROL:SHEET", false);
|
||||
CCDBNodeLeaf *walk = pIM->getDbProp("SERVER:USER:NPC_CONTROL:WALK", false);
|
||||
CCDBNodeLeaf *run = pIM->getDbProp("SERVER:USER:NPC_CONTROL:RUN", false);
|
||||
CCDBNodeLeaf *sheet = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:NPC_CONTROL:SHEET", false);
|
||||
CCDBNodeLeaf *walk = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:NPC_CONTROL:WALK", false);
|
||||
CCDBNodeLeaf *run = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:NPC_CONTROL:RUN", false);
|
||||
if (!sheet || !walk || !run)
|
||||
{
|
||||
return;
|
||||
|
@ -4422,7 +4422,7 @@ sint CUserEntity::getLevel() const
|
|||
sint level = -1;
|
||||
for(uint i=0;i<EGSPD::CSPType::EndSPType;i++)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(toString("SERVER:USER:SKILL_POINTS_%d:VALUE", i), false);
|
||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:USER:SKILL_POINTS_%d:VALUE", i), false);
|
||||
if(node)
|
||||
{
|
||||
level = std::max(level, (sint) node->getValue32());
|
||||
|
|
|
@ -197,8 +197,7 @@ const float WEATHER_BLEND_SPEED = 1.f / 8.f; // number of seconds to blend betwe
|
|||
// ***************************************************************************
|
||||
static uint16 getServerWeather()
|
||||
{
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *node = im->getDbProp("SERVER:WEATHER:VALUE");
|
||||
CCDBNodeLeaf *node = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:WEATHER:VALUE");
|
||||
if (!node) return 0;
|
||||
return (uint16) node->getValue16();
|
||||
}
|
||||
|
@ -243,8 +242,7 @@ float getBlendedWeather(uint64 day,
|
|||
|
||||
uint8 getSeasonDBValue()
|
||||
{
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *serverSeason = im->getDbProp("SERVER:SEASON:VALUE");
|
||||
CCDBNodeLeaf *serverSeason = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:SEASON:VALUE");
|
||||
return serverSeason ? serverSeason->getValue8() : 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue