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

Move rest of commonly-accessed UnitState queries to bonus cache

This commit is contained in:
Ivan Savenko
2024-12-25 21:25:06 +00:00
parent 05397e2aaf
commit 157d6d30c8
9 changed files with 55 additions and 24 deletions

View File

@@ -404,7 +404,7 @@ PlayerColor CBattleInfoEssentials::battleGetOwner(const battle::Unit * unit) con
PlayerColor initialOwner = getBattle()->getSidePlayer(unit->unitSide());
if(unit->hasBonusOfType(BonusType::HYPNOTIZED))
if(unit->isHypnotized())
return otherPlayer(initialOwner);
else
return initialOwner;