chore(Scripts/Misc): Cleanup some more JustDied hooks (#9768)

This commit is contained in:
Kitzunu
2021-12-31 16:00:40 +01:00
committed by GitHub
parent 0556f0b3d5
commit 69683a3472
22 changed files with 34 additions and 31 deletions

View File

@@ -347,7 +347,7 @@ public:
me->CallForHelp(500.0f);
}
void JustDied(Unit* /*pKiller*/) override
void JustDied(Unit* /*killer*/) override
{
RespawnDragons(true);
_JustDied();

View File

@@ -494,7 +494,7 @@ public:
if (me->IsDamageEnoughForLootingAndReward())
halion->LowerPlayerDamageReq(halion->GetMaxHealth());
if (halion->IsAlive())
if (killer && halion->IsAlive())
Unit::Kill(killer, halion);
}

View File

@@ -570,7 +570,7 @@ public:
ScriptedAI::MoveInLineOfSight(who);
}
void JustDied(Unit* ) override
void JustDied(Unit* /*killer*/) override
{
if (me->GetEntry() == NPC_UNSTOPPABLE_ABOMINATION && me->GetInstanceScript())
{

View File

@@ -473,7 +473,7 @@ public:
}
}
void JustDied(Unit* ) override
void JustDied(Unit* /*killer*/) override
{
Talk(me->GetEntry() == NPC_STALAGG ? SAY_STAL_DEATH : SAY_FEUG_DEATH);
Talk(me->GetEntry() == NPC_STALAGG ? EMOTE_STAL_DEATH : EMOTE_FEUG_DEATH);

View File

@@ -1169,7 +1169,7 @@ public:
uint32 timer;
void JustDied(Unit* ) override
void JustDied(Unit* /*killer*/) override
{
if (me->GetEntry() == NPC_MR_BIGGLESWORTH && me->GetInstanceScript())
{

View File

@@ -718,7 +718,7 @@ public:
void JustDied(Unit* killer) override
{
if (me->GetEntry() == killer->GetEntry())
if (killer && me->GetEntry() == killer->GetEntry())
return;
me->Yell("Matron, flee! They are ruthless....", LANG_UNIVERSAL);
me->PlayDirectSound(SOUND_STONEBARK_DEATH);
@@ -824,7 +824,7 @@ public:
void JustDied(Unit* killer) override
{
if (me->GetEntry() == killer->GetEntry())
if (killer && me->GetEntry() == killer->GetEntry())
return;
me->Yell("Matron, one has fallen!", LANG_UNIVERSAL);
me->PlayDirectSound(SOUND_BRIGHTLEAF_DEATH);
@@ -945,7 +945,7 @@ public:
void JustDied(Unit* killer) override
{
if (me->GetEntry() == killer->GetEntry())
if (killer && me->GetEntry() == killer->GetEntry())
return;
me->Yell("Freya! They come for you.", LANG_UNIVERSAL);
me->PlayDirectSound(SOUND_IRONBRANCH_DEATH);
@@ -1011,7 +1011,7 @@ public:
{
boss_freya_iron_rootAI(Creature* pCreature) : NullCreatureAI(pCreature) { }
void JustDied(Unit*) override
void JustDied(Unit* /*killer*/) override
{
if (!me->IsSummon())
return;
@@ -1139,7 +1139,7 @@ public:
AttackStart(target);
}
void JustDied(Unit*) override
void JustDied(Unit* /*killer*/) override
{
if (Creature* freya = ObjectAccessor::GetCreature(*me, _freyaGUID))
{

View File

@@ -782,7 +782,7 @@ public:
me->m_Events.AddEvent(new BoomEvent(me), me->m_Events.CalculateTime(1 * IN_MILLISECONDS));
}
void JustDied(Unit*) override
void JustDied(Unit* /*killer*/) override
{
me->m_Events.AddEvent(new BoomEvent(me), me->m_Events.CalculateTime(1 * IN_MILLISECONDS));
}

View File

@@ -87,7 +87,7 @@ public:
void JustDied(Unit* killer) override
{
if (killer->GetGUID() != me->GetGUID())
if (killer && killer->GetGUID() != me->GetGUID())
if (InstanceScript* pInstance = me->GetInstanceScript())
pInstance->SetData(DATA_ON_THE_ROCKS_ACHIEV, 0);

View File

@@ -149,7 +149,7 @@ public:
pInstance->SetData(EVENT_EMALON, IN_PROGRESS);
}
void JustDied(Unit* ) override
void JustDied(Unit* /*killer*/) override
{
summons.DespawnAll();
events.Reset();

View File

@@ -97,7 +97,7 @@ public:
pInstance->SetData(EVENT_KORALON, IN_PROGRESS);
}
void JustDied(Unit* ) override
void JustDied(Unit* /*killer*/) override
{
if (pInstance)
pInstance->SetData(EVENT_KORALON, DONE);

View File

@@ -41,7 +41,7 @@ public:
uint32 faction;
EventMap events;
void JustDied(Unit* ) override
void JustDied(Unit* /*killer*/) override
{
if (me->GetEntry() == NPC_KEEP_CANNON)
{