1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

vcmi: split bonus to enumerator and HeroBonus.h

This commit is contained in:
Konstantin
2023-05-01 01:20:01 +03:00
committed by Konstantin P
parent 9f5ee885b4
commit 05eccbc2bb
123 changed files with 1321 additions and 1350 deletions

View File

@@ -271,7 +271,7 @@ bool CBattleInfoEssentials::battleCanFlee(const PlayerColor & player) const
return false;
//eg. one of heroes is wearing shakles of war
if(myHero->hasBonusOfType(Bonus::BATTLE_NO_FLEEING))
if(myHero->hasBonusOfType(BonusType::BATTLE_NO_FLEEING))
return false;
//we are besieged defender
@@ -394,7 +394,7 @@ PlayerColor CBattleInfoEssentials::battleGetOwner(const battle::Unit * unit) con
PlayerColor initialOwner = getBattle()->getSidePlayer(unit->unitSide());
static CSelector selector = Selector::type()(Bonus::HYPNOTIZED);
static CSelector selector = Selector::type()(BonusType::HYPNOTIZED);
static std::string cachingString = "type_103s-1";
if(unit->hasBonus(selector, cachingString))