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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user