Fix check for opponent side for mana drain

This commit is contained in:
Ivan Savenko committed 2024-01-05 17:56:00 +02:00
1 parent 51b7de4b98
commit 296310e32e
2 files changed
+5 -6

No files matched your search

+1 -2
View File
@@ -677,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);