From 65ce8409a3ac417b5a635684519b0dd61885cc6a Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Fri, 22 Mar 2019 01:27:26 +0100 Subject: [PATCH] Core/Spells: Harvest Soul will now use GetTickNumber instead of a own variable --- src/server/scripts/Spells/spell_warlock.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index 09582df86c..6ebea4384d 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -1634,7 +1634,6 @@ class spell_warl_soul_harvest : public AuraScript bool Load() override { - _tickCounts = 0; return true; } @@ -1645,8 +1644,7 @@ class spell_warl_soul_harvest : public AuraScript void HandleDummy(AuraEffect const* aurEff) { - _tickCounts++; - if (!(_tickCounts % 3)) + if (!(aurEff->GetTickNumber() % 3)) GetTarget()->CastSpell(GetTarget(), SPELL_WARLOCK_SOUL_HARVEST_ENERGIZE, true, nullptr, aurEff); } @@ -1654,8 +1652,6 @@ class spell_warl_soul_harvest : public AuraScript { OnEffectPeriodic += AuraEffectPeriodicFn(spell_warl_soul_harvest::HandleDummy, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); } -private: - uint8 _tickCounts; }; void AddSC_warlock_spell_scripts()