diff options
author | ariel- <ariel-@users.noreply.github.com> | 2018-01-22 03:55:04 -0300 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2018-01-22 03:55:14 -0300 |
commit | 514c847881a9fff504e90f1186a1209c0b8a3674 (patch) | |
tree | b715947153af0f8440223bf07b3fb7cc12c177c0 /src | |
parent | 73cc613dc86d7d72d78f22affe2faba6786bccc5 (diff) |
Core/Unit: fixed Global cooldown cancelation on spell interrupt
Thanks to Nyeriah for the heads up
Diffstat (limited to 'src')
-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 a7293b65120..ec8c3290e16 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -3252,12 +3252,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); + } } } |