mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
fix(Core/TotemAI): Active totems should interrupt its spell casting i… (#12864)
...f current victim is dead.
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user