|
|
|
@ -941,6 +941,8 @@ void CSPhraseManager::reset()
|
|
|
|
|
CSkillManager *pSM= CSkillManager::getInstance();
|
|
|
|
|
pBM->removeBrickLearnedCallback(&_ProgressionUpdate);
|
|
|
|
|
pSM->removeSkillChangeCallback(&_ProgressionUpdate);
|
|
|
|
|
|
|
|
|
|
_TotalMalusEquipLeaf = NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
@ -1122,7 +1124,9 @@ 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= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:TOTAL_MALUS_EQUIP", false);
|
|
|
|
|
CCDBNodeLeaf *actMalus = (CCDBNodeLeaf *)_TotalMalusEquipLeaf ? &*_TotalMalusEquipLeaf
|
|
|
|
|
: (_TotalMalusEquipLeaf = 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())
|
|
|
|
@ -4501,7 +4505,8 @@ uint32 CSPhraseManager::getTotalActionMalus(const CSPhraseCom &phrase) const
|
|
|
|
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
|
|
|
|
CSBrickManager *pBM= CSBrickManager::getInstance();
|
|
|
|
|
uint32 totalActionMalus= 0;
|
|
|
|
|
CCDBNodeLeaf *actMalus= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:TOTAL_MALUS_EQUIP", false);
|
|
|
|
|
CCDBNodeLeaf *actMalus = (CCDBNodeLeaf *)_TotalMalusEquipLeaf ? &*_TotalMalusEquipLeaf
|
|
|
|
|
: (_TotalMalusEquipLeaf = 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())
|
|
|
|
|