1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-24 03:47:18 +02:00

* damage estimation should be better

This commit is contained in:
mateuszb 2009-09-21 12:48:28 +00:00
parent 75c6db7197
commit 027b948a07

View File

@ -626,7 +626,8 @@ std::pair<ui32, ui32> CCallback::battleEstimateDamage(int attackerID, int defend
defenderHero = gs->getHero(gs->curB->hero1);
}
const CStack * attacker = gs->curB->stacks[attackerID], * defender = gs->curB->stacks[defenderID];
const CStack * attacker = gs->curB->getStack(attackerID, false),
* defender = gs->curB->getStack(defenderID);
return BattleInfo::calculateDmgRange(attacker, defender, attackerHero, defenderHero, battleCanShoot(attacker->ID, defender->position), 0);
}