feat(Core/Unit): Add KillSelf overload (#14785)

Co-authored-by: jackpoz <giacomopoz@gmail.com>
This commit is contained in:
Skjalf
2023-01-28 17:57:23 -03:00
committed by GitHub
parent 6ae8ffa8e6
commit b4e3f1310b
28 changed files with 31 additions and 30 deletions

View File

@@ -253,7 +253,7 @@ public:
me->AddAura(DUNGEON_MODE(SPELL_EMPOWERING_SHADOWS_N, SPELL_EMPOWERING_SHADOWS_H), Vorpil);
Vorpil->ModifyHealth(int32(Vorpil->CountPctFromMaxHealth(4)));
me->CastSpell(me, SPELL_SHADOW_NOVA, true);
Unit::Kill(me, me);
me->KillSelf();
return;
}

View File

@@ -205,7 +205,7 @@ public:
if ((member = ObjectAccessor::GetCreature(*me, councilGUIDs[i])))
if (member->IsAlive())
Unit::Kill(me, member);
Unit::Kill(me, me);
me->KillSelf();
}
}

View File

@@ -172,7 +172,7 @@ public:
{
if (Creature* kali = me->FindNearestCreature(NPC_WARLORD_KALITHRESH, 100.0f))
kali->CastSpell(kali, SPELL_WARLORDS_RAGE_PROC, true);
Unit::Kill(me, me);
me->KillSelf();
}
}
}

View File

@@ -121,7 +121,7 @@ public:
}
else if (summons.size() == 0)
{
Unit::Kill(me, me);
me->KillSelf();
}
}

View File

@@ -340,7 +340,7 @@ public:
{
if (summon->GetEntry() == NPC_HARBINGER_SKYRISS)
{
Unit::Kill(me, me);
me->KillSelf();
me->setActive(false);
instance->SetBossState(DATA_WARDEN_MELLICHAR, DONE);
if (Creature* creature = summons.GetCreatureWithEntry(NPC_MILLHOUSE))