fix(Core/TotemAI): Active totems should interrupt its spell casting i… (#12864)
...f current victim is dead.
This commit is contained in:
parent
db760ee2ed
commit
93ae148a75
1 changed files with 16 additions and 1 deletions
|
|
@ -60,8 +60,23 @@ void TotemAI::UpdateAI(uint32 /*diff*/)
|
|||
if (me->ToTotem()->GetTotemType() != TOTEM_ACTIVE)
|
||||
return;
|
||||
|
||||
if (!me->IsAlive() || me->IsNonMeleeSpellCast(false))
|
||||
if (!me->IsAlive())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (me->IsNonMeleeSpellCast(false))
|
||||
{
|
||||
if (Unit* victim = ObjectAccessor::GetUnit(*me, i_victimGuid))
|
||||
{
|
||||
if (!victim || !victim->IsAlive())
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Search spell
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(me->ToTotem()->GetSpell());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue