mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-13 10:49:05 +00:00
Avoid redundant per-frame calls to getDbProp("UI:ENTITY:GUILD:#:ICON")
This commit is contained in:
parent
e936b06a01
commit
041bf4cd99
2 changed files with 11 additions and 2 deletions
|
@ -41,6 +41,7 @@ uint CGroupInSceneUserInfo::_BatLength = 0;
|
||||||
CCDBNodeLeaf *CGroupInSceneUserInfo::_Value = NULL;
|
CCDBNodeLeaf *CGroupInSceneUserInfo::_Value = NULL;
|
||||||
CCDBNodeLeaf *CGroupInSceneUserInfo::_ValueBegin = NULL;
|
CCDBNodeLeaf *CGroupInSceneUserInfo::_ValueBegin = NULL;
|
||||||
CCDBNodeLeaf *CGroupInSceneUserInfo::_ValueEnd = NULL;
|
CCDBNodeLeaf *CGroupInSceneUserInfo::_ValueEnd = NULL;
|
||||||
|
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> CGroupInSceneUserInfo::_GuildIconLeaf[256];
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
NLMISC_REGISTER_OBJECT(CViewBase, CGroupInSceneUserInfo, std::string, "in_scene_user_info");
|
NLMISC_REGISTER_OBJECT(CViewBase, CGroupInSceneUserInfo, std::string, "in_scene_user_info");
|
||||||
|
@ -943,8 +944,13 @@ void CGroupInSceneUserInfo::updateDynamicData ()
|
||||||
if (_Entity->getGuildSymbol() != 0)
|
if (_Entity->getGuildSymbol() != 0)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
string dbLeaf = "UI:ENTITY:GUILD:"+toString (_Entity->slot())+":ICON";
|
if (!_GuildIconLeaf[_Entity->slot()])
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp(dbLeaf)->setValue64(_Entity->getGuildSymbol());
|
{
|
||||||
|
string dbLeaf = "UI:ENTITY:GUILD:"+toString (_Entity->slot())+":ICON";
|
||||||
|
_GuildIconLeaf[_Entity->slot()] = NLGUI::CDBManager::getInstance()->getDbProp(dbLeaf);
|
||||||
|
}
|
||||||
|
nlassert(&*_GuildIconLeaf[_Entity->slot()]);
|
||||||
|
(&*_GuildIconLeaf[_Entity->slot()])->setValue64(_Entity->getGuildSymbol());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the event faction
|
// Set the event faction
|
||||||
|
|
|
@ -97,6 +97,9 @@ protected:
|
||||||
static NLMISC::CCDBNodeLeaf *_ValueBegin;
|
static NLMISC::CCDBNodeLeaf *_ValueBegin;
|
||||||
static NLMISC::CCDBNodeLeaf *_ValueEnd;
|
static NLMISC::CCDBNodeLeaf *_ValueEnd;
|
||||||
|
|
||||||
|
// Guild icon leafs
|
||||||
|
static NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _GuildIconLeaf[256];
|
||||||
|
|
||||||
// Special guild
|
// Special guild
|
||||||
bool _NeedGuildNameId;
|
bool _NeedGuildNameId;
|
||||||
bool _NeedGuildSymbolId;
|
bool _NeedGuildSymbolId;
|
||||||
|
|
Loading…
Reference in a new issue