mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Improvements to bonus system node types / propagators
- Node type is now set on construction and never changes - Added army propagator that also checks for TOWN and HERO - Renamed existing propagators to be in sync with enumeration
This commit is contained in:
@@ -244,7 +244,7 @@ int CGHeroInstance::movementPointsLimitCached(bool onLand, const TurnInfo * ti)
|
||||
}
|
||||
|
||||
CGHeroInstance::CGHeroInstance(IGameInfoCallback * cb)
|
||||
: CArmedInstance(cb),
|
||||
: CArmedInstance(cb, BonusNodeType::HERO, false),
|
||||
CArtifactSet(cb),
|
||||
tacticFormationEnabled(false),
|
||||
inTownGarrison(false),
|
||||
@@ -259,7 +259,6 @@ CGHeroInstance::CGHeroInstance(IGameInfoCallback * cb)
|
||||
turnInfoCache(std::make_unique<TurnInfoCache>(this)),
|
||||
manaPerKnowledgeCached(this, Selector::type()(BonusType::MANA_PER_KNOWLEDGE_PERCENTAGE))
|
||||
{
|
||||
setNodeType(HERO);
|
||||
ID = Obj::HERO;
|
||||
secSkills.emplace_back(SecondarySkill::NONE, -1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user