mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 07:36:23 +00:00
fix(Core/Unit): add melee spell breaking for spells with cast time (#19376)
melee spells breaking
This commit is contained in:
@@ -3959,6 +3959,16 @@ void Unit::SetCurrentCastedSpell(Spell* pSpell)
|
||||
InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
|
||||
m_AutoRepeatFirstCast = true;
|
||||
}
|
||||
|
||||
// melee spells breaking
|
||||
if (m_currentSpells[CURRENT_MELEE_SPELL])
|
||||
{
|
||||
// break melee spells if cast time
|
||||
if (pSpell->GetCastTime() > 0)
|
||||
{
|
||||
InterruptSpell(CURRENT_MELEE_SPELL);
|
||||
}
|
||||
}
|
||||
if (pSpell->GetCastTime() > 0)
|
||||
AddUnitState(UNIT_STATE_CASTING);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user