|
@@ -607,8 +607,7 @@ public:
|
|
|
|
|
|
std::shared_ptr<const Bonus> getBonus(const CSelector &selector) const; //returns any bonus visible on node that matches (or nullptr if none matches)
|
|
|
|
|
|
- //legacy interface
|
|
|
- int valOfBonuses(Bonus::BonusType type, const CSelector &selector) const;
|
|
|
+ //Optimized interface (with auto-caching)
|
|
|
int valOfBonuses(Bonus::BonusType type, int subtype = -1) const; //subtype -> subtype of bonus, if -1 then anyt;
|
|
|
bool hasBonusOfType(Bonus::BonusType type, int subtype = -1) const;//determines if hero has a bonus of given type (and optionally subtype)
|
|
|
bool hasBonusFrom(Bonus::BonusSource source, ui32 sourceID) const;
|