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