Missed one

This commit is contained in:
kaetemi 2013-07-28 18:22:35 +02:00
parent bff229da69
commit 7a8db939ad

View file

@ -1124,7 +1124,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 = (CCDBNodeLeaf *)_TotalMalusEquipLeaf ? &*_TotalMalusEquipLeaf
CCDBNodeLeaf *actMalus = _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
@ -4506,8 +4506,8 @@ uint32 CSPhraseManager::getTotalActionMalus(const CSPhraseCom &phrase) const
CInterfaceManager *pIM = CInterfaceManager::getInstance();
CSBrickManager *pBM= CSBrickManager::getInstance();
uint32 totalActionMalus= 0;
CCDBNodeLeaf *actMalus = (CCDBNodeLeaf *)_TotalMalusEquipLeaf ? &*_TotalMalusEquipLeaf
: (_TotalMalusEquipLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:TOTAL_MALUS_EQUIP", false));
CCDBNodeLeaf *actMalus = _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())