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

Merge pull request #3435 from IvanSavenko/bugfixing

[1.4.3] Bugfixing
This commit is contained in:
Ivan Savenko
2024-01-06 13:06:07 +02:00
committed by GitHub
14 changed files with 52 additions and 31 deletions

View File

@@ -181,6 +181,7 @@ void BattleFlowProcessor::trySummonGuardians(const CBattleInfoCallback & battle,
// send empty event to client
// temporary(?) workaround to force animations to trigger
StacksInjured fakeEvent;
fakeEvent.battleID = battle.getBattle()->getBattleID();
gameHandler->sendAndApply(&fakeEvent);
}
@@ -676,8 +677,7 @@ void BattleFlowProcessor::stackTurnTrigger(const CBattleInfoCallback & battle, c
}
if(st->hasBonusOfType(BonusType::MANA_DRAIN) && !st->drainedMana)
{
const PlayerColor opponent = battle.otherPlayer(battle.battleGetOwner(st));
const CGHeroInstance * opponentHero = battle.battleGetFightingHero(opponent);
const CGHeroInstance * opponentHero = battle.battleGetFightingHero(battle.otherSide(st->unitSide()));
if(opponentHero)
{
ui32 manaDrained = st->valOfBonuses(BonusType::MANA_DRAIN);