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);
|
InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
|
||||||
m_AutoRepeatFirstCast = true;
|
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)
|
if (pSpell->GetCastTime() > 0)
|
||||||
AddUnitState(UNIT_STATE_CASTING);
|
AddUnitState(UNIT_STATE_CASTING);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user