diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2017-12-14 11:42:42 -0300 |
|---|---|---|
| committer | funjoker <funjoker109@gmail.com> | 2021-03-15 20:17:31 +0100 |
| commit | 5f9e0d92d563c983c229db1569414916b3dce51e (patch) | |
| tree | 79c906bdf9d526646c26f827db677a566460bf43 /src/server/scripts/Spells | |
| parent | fe362cf2c9d5c71db4698480ce26cb35dbc58f28 (diff) | |
Core/Auras: periodics refactor part 1:
- Don't skip ticks if diff is greater than amplitude
- Fixed spells without ampltude in DBC
(cherry picked from commit 5d91beb1dbc795382a12ec05f6e72c76b195b141)
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; |
