diff options
-rw-r--r-- | src/server/game/Handlers/SpellHandler.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 272905b22f7..48fb3685060 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -306,12 +306,6 @@ void WorldSession::HandleCastSpellOpcode(WorldPackets::Spells::CastSpell& cast) // Check possible spell cast overrides spellInfo = caster->GetCastSpellInfo(spellInfo); - // Client is resending autoshot cast opcode when other spell is cast during shoot rotation - // Skip it to prevent "interrupt" message - if (spellInfo->IsAutoRepeatRangedSpell() && caster->GetCurrentSpell(CURRENT_AUTOREPEAT_SPELL) - && caster->GetCurrentSpell(CURRENT_AUTOREPEAT_SPELL)->m_spellInfo == spellInfo) - return; - // can't use our own spells when we're in possession of another unit, if (_player->isPossessing()) return; @@ -319,6 +313,14 @@ void WorldSession::HandleCastSpellOpcode(WorldPackets::Spells::CastSpell& cast) // client provided targets SpellCastTargets targets(caster, cast.Cast); + // Client is resending autoshot cast opcode when other spell is cast during shoot rotation + // Skip it to prevent "interrupt" message + // Also check targets! target may have changed and we need to interrupt current spell + if (spellInfo->IsAutoRepeatRangedSpell()) + if (Spell* spell = caster->GetCurrentSpell(CURRENT_AUTOREPEAT_SPELL)) + if (spell->m_spellInfo == spellInfo && spell->m_targets.GetUnitTargetGUID() == targets.GetUnitTargetGUID()) + return; + // auto-selection buff level base at target level (in spellInfo) if (targets.GetUnitTarget()) { |