mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
fix(Core/Spells): Don't send SMSG_CAST_FAILED for interrupted spells … (#19082)
fix(Core/Spells): Don't send SMSG_CAST_FAILED for interrupted spells after they were launched or channelling was started (this clears cooldown on client) https: //github.com/TrinityCore/TrinityCore/commit/63bc405faeb7afcf99de6f7531e4ea59065165f4 Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
@@ -3710,7 +3710,6 @@ void Spell::cancel(bool bySelf)
|
||||
return;
|
||||
|
||||
uint32 oldState = m_spellState;
|
||||
bool autoRepeat = m_autoRepeat;
|
||||
m_spellState = SPELL_STATE_FINISHED;
|
||||
|
||||
m_autoRepeat = false;
|
||||
@@ -3723,12 +3722,9 @@ void Spell::cancel(bool bySelf)
|
||||
if (m_caster->ToPlayer()->NeedSendSpectatorData())
|
||||
ArenaSpectator::SendCommand_Spell(m_caster->FindMap(), m_caster->GetGUID(), "SPE", m_spellInfo->Id, bySelf ? 99998 : 99999);
|
||||
}
|
||||
[[fallthrough]]; /// @todo: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
|
||||
[[fallthrough]];
|
||||
case SPELL_STATE_DELAYED:
|
||||
SendInterrupted(0);
|
||||
// xinef: fixes bugged gcd reset in some cases
|
||||
if (!autoRepeat)
|
||||
SendCastResult(SPELL_FAILED_INTERRUPTED);
|
||||
SendInterrupted(SPELL_FAILED_INTERRUPTED);
|
||||
break;
|
||||
|
||||
case SPELL_STATE_CASTING:
|
||||
@@ -3740,8 +3736,7 @@ void Spell::cancel(bool bySelf)
|
||||
unit->RemoveOwnedAura(m_spellInfo->Id, m_originalCasterGUID, 0, AURA_REMOVE_BY_CANCEL);
|
||||
|
||||
SendChannelUpdate(0);
|
||||
SendInterrupted(0);
|
||||
SendCastResult(SPELL_FAILED_INTERRUPTED);
|
||||
SendInterrupted(SPELL_FAILED_INTERRUPTED);
|
||||
}
|
||||
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->ToPlayer()->NeedSendSpectatorData())
|
||||
|
||||
Reference in New Issue
Block a user