mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-29 20:30:54 +00:00
Avoid redundant per-frame calls to getDbProp("SERVER:USER:DEFAULT_WEIGHT_HANDS")
--HG-- branch : kaetemi-optimize
This commit is contained in:
parent
a75bd5d23a
commit
19a8b48355
2 changed files with 4 additions and 1 deletions
|
@ -1656,7 +1656,8 @@ 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) NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:DEFAULT_WEIGHT_HANDS")->getValue32() / 10; // weight must be in dg here
|
||||
if (!_ServerUserDefaultWeightHandsLeaf) _ServerUserDefaultWeightHandsLeaf = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:DEFAULT_WEIGHT_HANDS");
|
||||
uint32 weight = (uint32)(&*_ServerUserDefaultWeightHandsLeaf)->getValue32() / 10; // weight must be in dg here
|
||||
CDBCtrlSheet *ctrlSheet = dynamic_cast<CDBCtrlSheet *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:gestionsets:hands:handr"));
|
||||
if (ctrlSheet)
|
||||
{
|
||||
|
|
|
@ -653,6 +653,8 @@ private:
|
|||
|
||||
mutable NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _TotalMalusEquipLeaf;
|
||||
|
||||
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _ServerUserDefaultWeightHandsLeaf;
|
||||
|
||||
// @}
|
||||
|
||||
/// return the skill of the root
|
||||
|
|
Loading…
Reference in a new issue