diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 3feda5d89..882166c96 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -7459,6 +7459,10 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8 if (HasSpellCooldown(spellInfo->Id)) { + // Notify client so it can clean up the pending spell cast. + // Without this the client orphans the cast and blocks auto-attack. + Spell::SendCastResult(ToPlayer(), spellInfo, cast_count, + SPELL_FAILED_NOT_READY); continue; } @@ -7505,7 +7509,11 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8 } if (HasSpellCooldown(spellInfo->Id)) + { + Spell::SendCastResult(ToPlayer(), spellInfo, cast_count, + SPELL_FAILED_NOT_READY); continue; + } Spell* spell = new Spell(this, spellInfo, (count > 0) ? TRIGGERED_FULL_MASK : TRIGGERED_NONE); spell->m_CastItem = item; diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h index a23d3b43c..e41d27757 100644 --- a/src/server/game/Spells/Spell.h +++ b/src/server/game/Spells/Spell.h @@ -509,6 +509,7 @@ public: void SendPetCastResult(SpellCastResult result); void SendSpellStart(); void SendSpellGo(); + void SendSpellCooldown(); void SendLogExecute(); void ExecuteLogEffectTakeTargetPower(uint8 effIndex, Unit* target, uint32 PowerType, uint32 powerTaken, float gainMultiplier);