diff options
author | ariel- <ariel-@users.noreply.github.com> | 2018-01-22 03:55:04 -0300 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-06-16 19:43:20 +0200 |
commit | df585571f108b3c44d3db1ab82683151f798cbf7 (patch) | |
tree | 5a676bb007ec01e7ae38953404bf9b12d210000c | |
parent | 861cf261c5dfc29d6980908ec36ebe7aad68a462 (diff) |
Core/Unit: fixed Global cooldown cancelation on spell interrupt
Thanks to Nyeriah for the heads up
(cherry picked from commit 514c847881a9fff504e90f1186a1209c0b8a3674)
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 8f0851fec38..280ecf86d33 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -3078,12 +3078,13 @@ void Unit::InterruptSpell(CurrentSpellTypes spellType, bool withDelayed, bool wi if (GetTypeId() == TYPEID_PLAYER) ToPlayer()->SendAutoRepeatCancel(this); - m_currentSpells[spellType] = nullptr; - if (spell->getState() != SPELL_STATE_FINISHED) spell->cancel(); else + { + m_currentSpells[spellType] = nullptr; spell->SetReferencedFromCurrent(false); + } if (GetTypeId() == TYPEID_UNIT && IsAIEnabled) ToCreature()->AI()->OnSpellCastInterrupt(spell->GetSpellInfo()); |