1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-14 02:33:51 +02:00
Minor fixes.
This commit is contained in:
DjWarmonger 2011-03-08 07:40:14 +00:00
parent 043700f310
commit 869214f44b
2 changed files with 17 additions and 17 deletions

View File

@ -839,7 +839,9 @@ void CCreatureHandler::loadStackExp(Bonus & b, BonusList & bl, std::string & src
case 'e': case 'e':
b.type = Bonus::DOUBLE_DAMAGE_CHANCE; break; b.type = Bonus::DOUBLE_DAMAGE_CHANCE; break;
case 'g': case 'g':
b.type = Bonus::SPELL_DAMAGE_REDUCTION; break; b.type = Bonus::SPELL_DAMAGE_REDUCTION;
b.subtype = -1; //all magic schools
break;
case 'R': case 'R':
b.type = Bonus::ADDITIONAL_RETALIATION; break; b.type = Bonus::ADDITIONAL_RETALIATION; break;

View File

@ -798,9 +798,8 @@ DLL_EXPORT void SetObjectProperty::applyGs( CGameState *gs )
return; return;
} }
if(what == ObjProperty::OWNER) CArmedInstance *cai = dynamic_cast<CArmedInstance *>(obj);
{ if(what == ObjProperty::OWNER && cai)
if(CArmedInstance *cai = dynamic_cast<CArmedInstance *>(obj))
{ {
if(obj->ID == TOWNI_TYPE) if(obj->ID == TOWNI_TYPE)
{ {
@ -816,8 +815,7 @@ DLL_EXPORT void SetObjectProperty::applyGs( CGameState *gs )
obj->setProperty(what,val); obj->setProperty(what,val);
nodeToMove->attachTo(cai->whereShouldBeAttached(gs)); nodeToMove->attachTo(cai->whereShouldBeAttached(gs));
} }
} else //not an armed instance
else
{ {
obj->setProperty(what,val); obj->setProperty(what,val);
} }