diff options
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_druid.cpp | 9 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 5 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 0a4b7ae303e..1fda9d3ebf2 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -825,6 +825,12 @@ class spell_dru_innervate : public SpellScriptLoader void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/) { + if (!aurEff->GetTotalTicks()) + { + amount = 0; + return; + } + if (Unit* caster = GetCaster()) amount = int32(CalculatePct(caster->GetCreatePowers(POWER_MANA), amount) / aurEff->GetTotalTicks()); else @@ -855,6 +861,9 @@ class spell_dru_insect_swarm : public SpellScriptLoader void CalculateAmount(AuraEffect const* aurEff, int32 & amount, bool & /*canBeRecalculated*/) { + if (!aurEff->GetTotalTicks()) + return; + if (Unit* caster = GetCaster()) if (AuraEffect const* relicAurEff = caster->GetAuraEffect(SPELL_DRUID_ITEM_T8_BALANCE_RELIC, EFFECT_0)) amount += relicAurEff->GetAmount() / aurEff->GetTotalTicks(); diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 1b06b8c3a4a..4a95c19c628 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -1339,7 +1339,7 @@ class spell_gen_gift_of_naaru : public AuraScript void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/) { - if (!GetCaster()) + if (!GetCaster() || !aurEff->GetTotalTicks()) return; float heal = 0.0f; @@ -1410,6 +1410,9 @@ class spell_gen_lifeblood : public AuraScript void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/) { + if (!aurEff->GetTotalTicks()) + return; + if (Unit* owner = GetUnitOwner()) amount += int32(CalculatePct(owner->GetMaxHealth(), 1.5f / aurEff->GetTotalTicks())); } |
