mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Added subtype for SPELL_DURATION
This commit is contained in:
@@ -697,7 +697,11 @@ int32_t CGHeroInstance::getEffectPower(const spells::Spell * spell) const
|
||||
|
||||
int32_t CGHeroInstance::getEnchantPower(const spells::Spell * spell) const
|
||||
{
|
||||
return getPrimSkillLevel(PrimarySkill::SPELL_POWER) + valOfBonuses(BonusType::SPELL_DURATION);
|
||||
int32_t spellpower = getPrimSkillLevel(PrimarySkill::SPELL_POWER);
|
||||
int32_t durationCommon = valOfBonuses(BonusType::SPELL_DURATION, BonusSubtypeID());
|
||||
int32_t durationSpecific = valOfBonuses(BonusType::SPELL_DURATION, BonusSubtypeID(spell->getId()));
|
||||
|
||||
return spellpower + durationCommon + durationSpecific;
|
||||
}
|
||||
|
||||
int64_t CGHeroInstance::getEffectValue(const spells::Spell * spell) const
|
||||
|
||||
Reference in New Issue
Block a user