diff options
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_druid.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 80cee09da89..5719b684ccd 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -555,6 +555,12 @@ public: 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 diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 0d39c1181ad..496c7da3676 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -1319,7 +1319,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; |
