1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

* fixed crash on saving when some objects havebeen removed

* support for multi-target attacks/spells in the protocol
* version bumped to 0.7d
This commit is contained in:
Michał W. Urbańczyk
2009-03-21 12:49:58 +00:00
parent 0cf1b2588d
commit b2c4f3e0fd
11 changed files with 86 additions and 53 deletions

View File

@@ -428,7 +428,8 @@ DLL_EXPORT void BattleAttack::applyGs( CGameState *gs )
attacker->counterAttacks--;
if(shot())
attacker->shots--;
bsa.applyGs(gs);
BOOST_FOREACH(BattleStackAttacked &stackAttacked, bsa)
stackAttacked.applyGs(gs);
}
DLL_EXPORT void StartAction::applyGs( CGameState *gs )
@@ -464,8 +465,14 @@ DLL_EXPORT void SpellCasted::applyGs( CGameState *gs )
DLL_EXPORT void SetStackEffect::applyGs( CGameState *gs )
{
CStack *s = gs->curB->getStack(stack);
s->effects.push_back(effect);
BOOST_FOREACH(ui32 id, stacks)
{
CStack *s = gs->curB->getStack(id);
if(s)
s->effects.push_back(effect);
else
tlog1 << "Cannot find stack " << id << std::endl;
}
}
DLL_EXPORT void YourTurn::applyGs( CGameState *gs )