diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp index 1292cdaee1..93de16fc80 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp @@ -139,7 +139,7 @@ public: summons.Summon(summoned); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { summons.DespawnAll(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp index fea8657496..073c4fde82 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp @@ -71,7 +71,7 @@ public: DoScriptText(SAY_SLAY, me); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (Creature* Moira = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(DATA_MOIRA) : 0)) { diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp index 52d7848777..3d2cc62714 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp @@ -80,9 +80,9 @@ public: DoMeleeAttackIfReady(); } // When he die open door to last chamber - void JustDied(Unit* who) + void JustDied(Unit* killer) { - if (InstanceScript* instance = who->GetInstanceScript()) + if (InstanceScript* instance = killer->GetInstanceScript()) instance->HandleGameObject(instance->GetData64(DATA_THRONE_DOOR), true); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp index de520fa8a5..211930e4f1 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp @@ -193,7 +193,7 @@ public: instance->SetData64(DATA_EVENSTARTER, 0); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(DATA_GHOSTKILL, 1); diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp index ff17e989cd..ff40094deb 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp @@ -64,7 +64,7 @@ public: events.ScheduleEvent(EVENT_THUNDERCLAP, 17 * IN_MILLISECONDS); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { _JustDied(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp index 22f3513b15..214ce4e02f 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp @@ -79,7 +79,7 @@ public: events.ScheduleEvent(EVENT_AGGRO, 60 * IN_MILLISECONDS); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { _JustDied(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp index a944ee6daf..c5d566c51c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp @@ -63,7 +63,7 @@ public: events.ScheduleEvent(EVENT_MIGHTY_BLOW, 14 * IN_MILLISECONDS); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { _JustDied(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp index bc9de52d91..027952dc74 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp @@ -73,7 +73,7 @@ public: events.ScheduleEvent(EVENT_SLOW, 24 * IN_MILLISECONDS); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { _JustDied(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp index 973ffe7e53..c455b1d404 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp @@ -59,7 +59,7 @@ public: events.ScheduleEvent(EVENT_MOTHERS_MILK, 10 * IN_MILLISECONDS); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { _JustDied(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp index b7492998d5..0c23f55bd3 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp @@ -77,7 +77,7 @@ public: events.ScheduleEvent(EVENT_KNOCK_AWAY, 12 * IN_MILLISECONDS); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { _JustDied(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp index d76d0d7f47..411b800cd0 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp @@ -62,7 +62,7 @@ public: events.ScheduleEvent(EVENT_PYROBLAST, 14 * IN_MILLISECONDS); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { _JustDied(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp index 4fb7e513f5..d1eb60fbb7 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp @@ -60,7 +60,7 @@ public: events.ScheduleEvent(EVENT_STUN_BOMB, 16 * IN_MILLISECONDS); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { _JustDied(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp index ce19a03571..1f7e3697a6 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp @@ -61,7 +61,7 @@ public: events.ScheduleEvent(EVENT_THUNDERCLAP, 9 * IN_MILLISECONDS); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { _JustDied(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp index f93466cbec..99e87dc617 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp @@ -62,7 +62,7 @@ public: events.ScheduleEvent(EVENT_CLEAVE, 14 * IN_MILLISECONDS); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { _JustDied(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp index 88a09d5713..843679b460 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp @@ -61,7 +61,7 @@ public: events.ScheduleEvent(EVENT_TERRIFYING_ROAR, 23 * IN_MILLISECONDS); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { _JustDied(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp index 2dc05799e5..a3891ef859 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp @@ -70,7 +70,7 @@ public: events.ScheduleEvent(EVENT_THROW_AXE, 1 * IN_MILLISECONDS); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { _JustDied(); } diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp index 1e539449fe..5d4cc442a4 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp @@ -111,7 +111,7 @@ public: DoScriptText(SAY_SLAY, me, Victim); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); } diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp index a4fb4ad22a..24fc74cc7c 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp @@ -75,7 +75,7 @@ public: DoZoneInCombat(); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp index 6de67e9371..96bda019f6 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp @@ -80,7 +80,7 @@ public: DoScriptText(RAND(SAY_KILL1, SAY_KILL2), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp index 5446f4c015..e19efc7c4e 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp @@ -78,7 +78,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp index 9d863544c2..bbf87ac3e7 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp @@ -89,7 +89,7 @@ public: DoScriptText(RAND(SAY_KILL1, SAY_KILL2), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); if (Unit* pMidnight = Unit::GetUnit(*me, Midnight)) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp index 65fb675972..90fdb16538 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp @@ -135,7 +135,7 @@ public: DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2, SAY_KILL_3), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index 596f07fec6..4700ad71fa 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -243,7 +243,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index 120bd03b71..d95b4aa3ae 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -161,7 +161,7 @@ public: DoScriptText(RAND(SAY_KILL1, SAY_KILL2), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp index a192a1de26..f2def74011 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp @@ -94,7 +94,7 @@ public: } } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance) { diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp index a2c32e2c3e..6bcec6c6db 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp @@ -548,7 +548,7 @@ public: } - void JustDied(Unit* /*slayer*/) + void JustDied(Unit* /*killer*/) { me->SummonCreature(CREATURE_PHOENIX_EGG, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000); } diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp index bae2dd71b6..327c611b2d 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp @@ -101,7 +101,7 @@ public: DoScriptText(SAY_KILL, me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(DATA_VEXALLUS_EVENT, DONE); diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp index f3797f0feb..0160f35f14 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp @@ -321,7 +321,7 @@ class mob_son_of_flame : public CreatureScript instance = me->GetInstanceScript(); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(DATA_RAGNAROS_ADDS, 1); diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 4319fef0b0..ceab845f0a 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -829,13 +829,9 @@ public: if (owner->GetTypeId() == TYPEID_PLAYER && CAST_PLR(owner)->isInCombat()) { if (CAST_PLR(owner)->getAttackerForHelper() && CAST_PLR(owner)->getAttackerForHelper()->GetEntry() == GHOSTS) - { AttackStart(CAST_PLR(owner)->getAttackerForHelper()); - } else - { FindMinions(owner); - } } } } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp index 4517b1741d..fd97813633 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp @@ -78,7 +78,7 @@ public: DoScriptText(SAY_KILL, me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (!instance) return; diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp index 32da9334ad..85faa14900 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp @@ -126,7 +126,7 @@ public: summoned->AI()->AttackStart(target); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(TYPE_BARON, DONE); diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp index 46aa3c9617..106719d654 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp @@ -67,7 +67,7 @@ public: { } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(TYPE_BARONESS, IN_PROGRESS); diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp index 2e97281b98..01299ae06b 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp @@ -103,7 +103,7 @@ public: SummonRifleman_Timer = 15000; } - void JustDied(Unit* /*Victim*/) + void JustDied(Unit* /*killer*/) { me->SummonCreature(11054, ADD_1X, ADD_1Y, ADD_1Z, ADD_1O, TEMPSUMMON_TIMED_DESPAWN, 240000); me->SummonCreature(11054, ADD_2X, ADD_2Y, ADD_2Z, ADD_2O, TEMPSUMMON_TIMED_DESPAWN, 240000); diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp index b2637c496b..21e3e19d89 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp @@ -105,7 +105,7 @@ public: me->UpdateEntry(NPC_DATHROHAN); } - void JustDied(Unit* /*Victim*/) + void JustDied(Unit* /*killer*/) { static uint32 uiCount = sizeof(m_aSummonPoint)/sizeof(SummonDef); diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp index b9b1ea6458..37e0bd5757 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp @@ -75,7 +75,7 @@ public: ScriptedAI::MoveInLineOfSight(who); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { me->SetDisplayId(MODEL_HUMAN); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp index 61f1a100cf..f8a10f0615 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp @@ -65,7 +65,7 @@ public: { } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(TYPE_PALLID, IN_PROGRESS); diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp index e8030248f4..c9a43edb66 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp @@ -67,7 +67,7 @@ public: { } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(TYPE_NERUB, IN_PROGRESS); diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp index 99806e6cfd..ebeda24833 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp @@ -96,30 +96,34 @@ public: { } - void JustDied(Unit* Killer) + void JustDied(Unit* killer) { - if (instance) + if (!instance) + return; + + switch (me->GetEntry()) { - switch (me->GetEntry()) - { - case SH_AELMAR: - instance->SetData(TYPE_SH_AELMAR, 2); - break; - case SH_CATHELA: - instance->SetData(TYPE_SH_CATHELA, 2); - break; - case SH_GREGOR: - instance->SetData(TYPE_SH_GREGOR, 2); - break; - case SH_NEMAS: - instance->SetData(TYPE_SH_NEMAS, 2); - break; - case SH_VICAR: - instance->SetData(TYPE_SH_VICAR, 2); - break; - } - if (instance->GetData(TYPE_SH_QUEST) && Killer->GetTypeId() == TYPEID_PLAYER) - CAST_PLR(Killer)->KilledMonsterCredit(SH_QUEST_CREDIT, 0); + case SH_AELMAR: + instance->SetData(TYPE_SH_AELMAR, 2); + break; + case SH_CATHELA: + instance->SetData(TYPE_SH_CATHELA, 2); + break; + case SH_GREGOR: + instance->SetData(TYPE_SH_GREGOR, 2); + break; + case SH_NEMAS: + instance->SetData(TYPE_SH_NEMAS, 2); + break; + case SH_VICAR: + instance->SetData(TYPE_SH_VICAR, 2); + break; + } + + if (instance->GetData(TYPE_SH_QUEST)) + { + if (Player* player = killer->ToPlayer()) + player->KilledMonsterCredit(SH_QUEST_CREDIT, 0); } } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp index a2fe87beb0..3bb1ce7959 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp @@ -63,7 +63,7 @@ public: { } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { for (uint8 i = 0; i < 30; ++i) { diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp index 48bf4ae230..7e167093e0 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp @@ -165,7 +165,7 @@ public: summoned->CastSpell(summoned, SPELL_SOUL_FREED, false); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (Tagged) me->SummonCreature(ENTRY_FREED, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 300000); @@ -230,7 +230,7 @@ public: Tagged = true; } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (Tagged) { diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp index 3352c4c06d..43c94f8a57 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp @@ -132,7 +132,7 @@ public: DoScriptText(RAND(YELL_KILL1, YELL_KILL2, YELL_KILL3), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(YELL_DEATH, me); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp index 086a927d07..c3398799f1 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp @@ -167,7 +167,7 @@ public: DoScriptText(RAND(YELL_SAC_KILL_1, YELL_SAC_KILL_2), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { // only if ALY death if (SisterDeath) @@ -462,7 +462,7 @@ public: } } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (SisterDeath) { diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp index 2fb50fec89..72ad110075 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp @@ -184,7 +184,7 @@ public: DoScriptText(YELL_BIRTH, me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(YELL_DEATH, me); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp index 7922d5fbc2..9a9f37d165 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp @@ -131,7 +131,7 @@ class boss_akilzon : public CreatureScript instance->SetData(DATA_AKILZONEVENT, IN_PROGRESS); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { me->MonsterYell(SAY_ONDEATH, LANG_UNIVERSAL, 0); DoPlaySoundToSet(me, SOUND_ONDEATH); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp index 3d53274a0d..3baa6ebdf6 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp @@ -324,7 +324,7 @@ class boss_halazzi : public CreatureScript } } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(DATA_HALAZZIEVENT, DONE); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp index 269c6fa092..f63ebe77a1 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp @@ -293,7 +293,7 @@ class boss_hexlord_malacrass : public CreatureScript } } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(DATA_HEXLORDEVENT, DONE); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp index f2e6647dc5..f9161fb422 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp @@ -159,7 +159,7 @@ class boss_janalai : public CreatureScript HatchAllEggs(1); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp index 2a2fdf1346..48a406f22a 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp @@ -276,7 +276,7 @@ class boss_nalorakk : public CreatureScript DoZoneInCombat(); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(DATA_NALORAKKEVENT, DONE); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp index f7d5ae25e7..2df202af08 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp @@ -252,7 +252,7 @@ class boss_zuljin : public CreatureScript } } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(DATA_ZULJINEVENT, DONE); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index 35b9781ea4..bfb22483b0 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -136,7 +136,7 @@ class npc_zulaman_hostage : public CreatureScript void EnterCombat(Unit* /*who*/) {} - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { Player* player = Unit::GetPlayer(*me, PlayerGUID); if (player) diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp index 638e267549..7d2215f831 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp @@ -94,7 +94,7 @@ class boss_jeklik : public CreatureScript DoCast(me, SPELL_BAT_FORM); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp index 0ef5c7ac74..cbe1178e6c 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp @@ -309,7 +309,7 @@ class mob_ohgan : public CreatureScript void EnterCombat(Unit* /*who*/) {} - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(DATA_OHGAN, DONE); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp index b5149701d1..44ab5d851f 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp @@ -88,7 +88,7 @@ class boss_marli : public CreatureScript DoScriptText(SAY_AGGRO, me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); if (instance) diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp index 0504d791a2..d85f99b029 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp @@ -108,7 +108,7 @@ class boss_thekal : public CreatureScript DoScriptText(SAY_AGGRO, me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); if (instance) diff --git a/src/server/scripts/EasternKingdoms/arathi_highlands.cpp b/src/server/scripts/EasternKingdoms/arathi_highlands.cpp index f6a62fbf09..d4d35b107b 100644 --- a/src/server/scripts/EasternKingdoms/arathi_highlands.cpp +++ b/src/server/scripts/EasternKingdoms/arathi_highlands.cpp @@ -98,7 +98,7 @@ class npc_professor_phizzlethorpe : public CreatureScript case 20: Talk(EMOTE_PROGRESS_8); Talk(SAY_PROGRESS_9, player->GetGUID()); - CAST_PLR(player)->GroupEventHappens(QUEST_SUNKEN_TREASURE, me); + player->GroupEventHappens(QUEST_SUNKEN_TREASURE, me); break; } } diff --git a/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp b/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp index 9fa8dad116..731067a774 100644 --- a/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp @@ -54,9 +54,9 @@ public: void EnterCombat(Unit* /*who*/) {} - void JustDied(Unit* Killer) + void JustDied(Unit* killer) { - if (Killer->GetTypeId() == TYPEID_PLAYER) + if (Player* player = killer->ToPlayer()) me->SummonCreature(11064, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 60000); } }; diff --git a/src/server/scripts/EasternKingdoms/eversong_woods.cpp b/src/server/scripts/EasternKingdoms/eversong_woods.cpp index 2655165e59..016dd60b39 100644 --- a/src/server/scripts/EasternKingdoms/eversong_woods.cpp +++ b/src/server/scripts/EasternKingdoms/eversong_woods.cpp @@ -247,7 +247,7 @@ public: CAST_PLR(Killed)->FailQuest(QUEST_SECOND_TRIAL); } - void JustDied(Unit* Killer); + void JustDied(Unit* killer); }; }; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp index 68a81b65d4..e0a0ff1dc5 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp @@ -125,9 +125,9 @@ public: } } - void JustDied(Unit* victim) + void JustDied(Unit* killer) { - hyjal_trashAI::JustDied(victim); + hyjal_trashAI::JustDied(killer); if (instance && IsEvent) instance->SetData(DATA_ANETHERONEVENT, DONE); DoPlaySoundToSet(me, SOUND_ONDEATH); @@ -272,7 +272,7 @@ public: { } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp index 2a7a3a4c8b..e22dbd972e 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp @@ -343,9 +343,9 @@ public: ++SoulChargeCount; } - void JustDied(Unit* victim) + void JustDied(Unit* killer) { - hyjal_trashAI::JustDied(victim); + hyjal_trashAI::JustDied(killer); DoScriptText(SAY_DEATH, me); if (instance) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp index 77326b5cbc..24fe1b5957 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp @@ -121,9 +121,9 @@ public: } } - void JustDied(Unit* victim) + void JustDied(Unit* killer) { - hyjal_trashAI::JustDied(victim); + hyjal_trashAI::JustDied(killer); if (instance && IsEvent) instance->SetData(DATA_AZGALOREVENT, DONE); DoPlaySoundToSet(me, SOUND_ONDEATH); @@ -251,7 +251,7 @@ public: AttackStart(who); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp index a30eb440e7..de8759b396 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp @@ -113,9 +113,9 @@ public: } } - void JustDied(Unit* victim) + void JustDied(Unit* killer) { - hyjal_trashAI::JustDied(victim); + hyjal_trashAI::JustDied(killer); if (instance && IsEvent) instance->SetData(DATA_KAZROGALEVENT, DONE); DoPlaySoundToSet(me, SOUND_ONDEATH); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp index 40ff774185..f328b55f76 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp @@ -115,9 +115,9 @@ public: } } - void JustDied(Unit* victim) + void JustDied(Unit* killer) { - hyjal_trashAI::JustDied(victim); + hyjal_trashAI::JustDied(killer); if (instance && IsEvent) instance->SetData(DATA_RAGEWINTERCHILLEVENT, DONE); DoPlaySoundToSet(me, SOUND_ONDEATH); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp index 011dbd32af..e63b33faf7 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp @@ -377,10 +377,11 @@ void hyjal_trashAI::UpdateAI(const uint32 /*diff*/) } } -void hyjal_trashAI::JustDied(Unit* /*victim*/) +void hyjal_trashAI::JustDied(Unit* /*killer*/) { if (!instance) return; + if (IsEvent && !me->isWorldBoss()) instance->SetData(DATA_TRASH, 0);//signal trash is dead @@ -1194,7 +1195,7 @@ public: } } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { if (instance && IsEvent) instance->SetData(DATA_TRASH, 0);//signal trash is dead @@ -1313,14 +1314,14 @@ public: } } - void JustDied(Unit* victim) + void JustDied(Unit* killer) { float x, y, z; me->GetPosition(x, y, z); z = me->GetMap()->GetHeight(me->GetPhaseMask(), x, y, z); me->GetMotionMaster()->MovePoint(0, x, y, z); me->SetPosition(x, y, z, 0); - hyjal_trashAI::JustDied(victim); + hyjal_trashAI::JustDied(killer); } void UpdateAI(const uint32 diff) @@ -1422,7 +1423,7 @@ public: uint32 ExplodeTimer; - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp index 5d1c65c63e..5b47c2ee07 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp @@ -93,7 +93,7 @@ public: ScriptedAI::MoveInLineOfSight(who); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp index caf2a225e7..a4e805b3b7 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp @@ -100,7 +100,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp index 93fb6153b7..f59c9f0ef4 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp @@ -84,7 +84,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp index 6a18c0b493..c2a41cb29d 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp @@ -153,9 +153,9 @@ public: SpellCorrupt_Timer = 3000; } - void JustDied(Unit* Killer) + void JustDied(Unit* killer) { - if (Killer->GetEntry() == me->GetEntry()) + if (killer->GetEntry() == me->GetEntry()) return; DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp index ab03d8895f..c27507cdce 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp @@ -88,7 +88,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp index cd49a2470e..82bd0a9e9b 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp @@ -84,7 +84,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp index 934b876d7c..45825a81eb 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp @@ -142,7 +142,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); } diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp index 38d9ce3156..d704396527 100644 --- a/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp +++ b/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp @@ -59,7 +59,7 @@ public: void EnterCombat(Unit* /*who*/) { } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { me->SummonCreature(13716, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 600000); } diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp index 41e0e0f2a0..ce73c7ceb6 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp @@ -168,7 +168,7 @@ public: Enraged = false; } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance) { @@ -261,7 +261,7 @@ public: VemDead = false; } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance) { diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp index 5dd603a7f9..11efccd14b 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp @@ -949,7 +949,7 @@ public: uint32 KillSelfTimer; uint64 Portal; - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (Unit* p = Unit::GetUnit(*me, Portal)) p->Kill(p); @@ -1025,7 +1025,7 @@ public: uint32 EvadeTimer; uint64 Portal; - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (Unit* p = Unit::GetUnit(*me, Portal)) p->Kill(p); @@ -1136,7 +1136,7 @@ public: uint32 EvadeTimer; uint64 Portal; - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (Unit* p = Unit::GetUnit(*me, Portal)) p->Kill(p); @@ -1252,7 +1252,7 @@ public: uint32 BeamTimer; uint64 Portal; - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (Unit* p = Unit::GetUnit(*me, Portal)) p->Kill(p); diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp index 0d934305ba..8c6c0fa0ad 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp @@ -84,7 +84,7 @@ public: DoScriptText(SAY_AGGRO, me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); } diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp index 3f91ba62f0..4df4bf7333 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp @@ -105,7 +105,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (!IsImage) DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp index 74d2317734..abaab9d830 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp @@ -120,7 +120,7 @@ struct boss_twinemperorsAI : public ScriptedAI } } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { Creature* pOtherBoss = GetOtherBoss(); if (pOtherBoss) diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp index 558b634b8d..556247d85a 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp @@ -242,7 +242,7 @@ public: DoZoneInCombat(); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { for (int ni=0; ni<3; ++ni) { diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp index 538a38f4a3..9e3d924032 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp @@ -322,7 +322,7 @@ public: AttackStartCaster(victim, 10);//keep back & toss bombs/shoot } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { /*if (instance) instance->SetData(0, DONE);*/ diff --git a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp index f60777c431..ffc2fb3fb6 100644 --- a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp +++ b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp @@ -59,7 +59,7 @@ public: { } - void JustDied(Unit* Killer) + void JustDied(Unit* killer) { uint32 spawnCreatureID = 0; @@ -67,8 +67,8 @@ public: { case 0: spawnCreatureID = 17681; - if (Killer->GetTypeId() == TYPEID_PLAYER) - CAST_PLR(Killer)->KilledMonsterCredit(spawnCreatureID, 0); + if (Player* player = killer->ToPlayer()) + player->KilledMonsterCredit(spawnCreatureID, 0); break; case 1: case 2: diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp index 516d3b2162..8f34fa5652 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp @@ -83,7 +83,7 @@ public: } } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance) { diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp index 7b8157486e..ea757e86f4 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp @@ -105,7 +105,7 @@ class boss_elder_nadox : public CreatureScript DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_SLAY_3, me); //SAY_SLAY_3 on death? @@ -229,7 +229,7 @@ class mob_ahnkahar_nerubian : public CreatureScript uiSprintTimer = 10000; } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (me->GetEntry() == MOB_AHNKAHAR_GUARDIAN_ENTRY) if (Creature* Nadox = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ELDER_NADOX))) diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp index ceefcece71..d6e5009776 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp @@ -149,7 +149,7 @@ public: DoScriptText(RAND(TEXT_SLAY_1, TEXT_SLAY_2, TEXT_SLAY_3), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(TEXT_DEATH, me); if (instance) @@ -390,9 +390,9 @@ public: } } - void JustDied(Unit* Killer) + void JustDied(Unit* killer) { - if (!Killer || !instance) + if (!killer || !instance) return; if (bWalking) @@ -402,7 +402,7 @@ public: if (!CAST_AI(boss_jedoga_shadowseeker::boss_jedoga_shadowseekerAI, boss->AI())->bOpFerok) CAST_AI(boss_jedoga_shadowseeker::boss_jedoga_shadowseekerAI, boss->AI())->bOpFerokFail = true; - if (Killer->GetTypeId() == TYPEID_PLAYER) + if (killer->GetTypeId() == TYPEID_PLAYER) boss->AI()->DoAction(ACTION_INITIAND_KILLED); } @@ -410,8 +410,8 @@ public: bWalking = false; } - if (Killer->GetTypeId() == TYPEID_PLAYER) - instance->SetData64(DATA_PL_JEDOGA_TARGET, Killer->GetGUID()); + if (killer->GetTypeId() == TYPEID_PLAYER) + instance->SetData64(DATA_PL_JEDOGA_TARGET, killer->GetGUID()); } void EnterCombat(Unit* who) diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp index 6a0ccc5477..328d1ab1cd 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp @@ -364,7 +364,7 @@ public: void EnterCombat(Unit* /*who*/) {} void MoveInLineOfSight(Unit* /*who*/) {} - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { DoCast(me, SPELL_FLAME_SPHERE_DEATH_EFFECT); } diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp index 1e5567bda8..6587631f24 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp @@ -99,7 +99,7 @@ public: me->ModifyHealth(int32(me->CountPctFromMaxHealth(10))); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(DATA_HADRONOX_EVENT, DONE); diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp index e96ef4ff36..95acc79231 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp @@ -161,7 +161,7 @@ class boss_dred : public CreatureScript return 0; } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(DATA_DRED_EVENT, DONE); @@ -211,7 +211,7 @@ class npc_drakkari_gutripper : public CreatureScript DoMeleeAttackIfReady(); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (Creature* Dred = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DRED))) Dred->AI()->DoAction(ACTION_RAPTOR_KILLED); @@ -261,7 +261,7 @@ class npc_drakkari_scytheclaw : public CreatureScript DoMeleeAttackIfReady(); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (Creature* Dred = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DRED))) Dred->AI()->DoAction(ACTION_RAPTOR_KILLED); diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp index 89ab4205e8..2abb60d5de 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp @@ -796,7 +796,7 @@ public: { } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { DoCast(SPELL_HALLUCINATION_2); } diff --git a/src/server/scripts/Northrend/Gundrak/boss_eck.cpp b/src/server/scripts/Northrend/Gundrak/boss_eck.cpp index b79e4d1edf..3e803c24d6 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_eck.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_eck.cpp @@ -152,7 +152,7 @@ public: InstanceScript* instance; - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (instance) { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp index a97c6f7d13..58856f9fb4 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp @@ -328,7 +328,7 @@ class npc_stinky_icc : public CreatureScript DoMeleeAttackIfReady(); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (Creature* festergut = me->GetCreature(*me, _instance->GetData64(DATA_FESTERGUT))) if (festergut->isAlive()) diff --git a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp index d473643d90..1671eab0b3 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp @@ -99,7 +99,7 @@ public: DoScriptText(SAY_SLAY, me); } - void JustDied(Unit*) + void JustDied(Unit* /*killer*/) { _JustDied(); diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp index 8c6afba18f..132ecdafa5 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp @@ -234,7 +234,7 @@ class boss_gothik : public CreatureScript DoScriptText(SAY_KILL, me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { LiveTriggerGUID.clear(); DeadTriggerGUID.clear(); diff --git a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp index 9ab102e2e2..d84cfb8949 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp @@ -86,7 +86,7 @@ public: return 0; } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { _JustDied(); DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp index 93f4b58120..98cbb95f10 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp @@ -338,7 +338,7 @@ public: DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { _JustDied(); DoScriptText(SAY_DEATH, me); @@ -760,7 +760,7 @@ class npc_kelthuzad_abomination : public CreatureScript } } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(DATA_ABOMINATION_KILLED, instance->GetData(DATA_ABOMINATION_KILLED) + 1); diff --git a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp index e593adfbc6..75be596fd7 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp @@ -124,7 +124,7 @@ public: summon->AI()->DoZoneInCombat(); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { _JustDied(); DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp index 37c32edf0d..b826a53071 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp @@ -80,7 +80,7 @@ public: DoScriptText(SAY_SLAY, me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { _JustDied(); DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp index 9e05178a8b..37fb5f3f4a 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp @@ -145,7 +145,7 @@ public: } } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { _JustDied(); me->CastSpell(me, SPELL_DIES, true); diff --git a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp index 86b7713966..ccc8e9a566 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp @@ -158,7 +158,7 @@ public: DoScriptText(SAY_SLAY, me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { _JustDied(); DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp index 5e87ffb897..7552ba4f38 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp @@ -101,7 +101,7 @@ class boss_anomalus : public CreatureScript instance->SetData(DATA_ANOMALUS_EVENT, IN_PROGRESS); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp index f7c523d152..0967c38c2e 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp @@ -251,7 +251,7 @@ class boss_steelbreaker : public CreatureScript } } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { DoScriptText(RAND(SAY_STEELBREAKER_DEATH_1, SAY_STEELBREAKER_DEATH_2), me); if (IsEncounterComplete(instance, me)) @@ -375,7 +375,7 @@ class boss_runemaster_molgeim : public CreatureScript } } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { DoScriptText(RAND(SAY_MOLGEIM_DEATH_1, SAY_MOLGEIM_DEATH_2), me); if (IsEncounterComplete(instance, me)) @@ -616,7 +616,7 @@ class boss_stormcaller_brundir : public CreatureScript } } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { DoScriptText(RAND(SAY_BRUNDIR_DEATH_1, SAY_BRUNDIR_DEATH_2), me); if (IsEncounterComplete(instance, me)) diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp index 1c478cd83e..6c2c08f07a 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp @@ -204,7 +204,7 @@ class boss_auriaya : public CreatureScript } } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); _JustDied(); @@ -376,7 +376,7 @@ class npc_sanctum_sentry : public CreatureScript DoMeleeAttackIfReady(); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (Creature* Auriaya = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_AURIAYA))) Auriaya->AI()->DoAction(ACTION_CRAZY_CAT_LADY); @@ -451,7 +451,7 @@ class npc_feral_defender : public CreatureScript DoMeleeAttackIfReady(); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { DoCast(me, SPELL_SUMMON_ESSENCE); if (Creature* Auriaya = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_AURIAYA))) diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp index fe221465ca..5d68da4e75 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp @@ -328,7 +328,7 @@ class boss_flame_leviathan : public CreatureScript DoScriptText(SAY_AGGRO, me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { _JustDied(); // Set Field Flags 67108928 = 64 | 67108864 = UNIT_FLAG_UNK_6 | UNIT_FLAG_SKINNABLE @@ -887,7 +887,7 @@ class npc_colossus : public CreatureScript InstanceScript* instance; - void JustDied(Unit* /*Who*/) + void JustDied(Unit* /*killer*/) { if (me->GetHomePosition().IsInDist(Center, 50.f)) instance->SetData(DATA_COLOSSUS, instance->GetData(DATA_COLOSSUS)+1); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp index 159e2a9702..4ea38a7642 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp @@ -245,7 +245,7 @@ class npc_iron_roots : public CreatureScript me->SetInCombatWith(summoner); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (Player* target = ObjectAccessor::GetPlayer(*me, summonerGUID)) { @@ -590,7 +590,7 @@ class boss_freya : public CreatureScript waveCount++; } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { //! Freya's chest is dynamically spawned on death by different spells. const uint32 summonSpell[2][4] = @@ -710,12 +710,12 @@ class boss_elder_brightleaf : public CreatureScript DoScriptText(RAND(SAY_BRIGHTLEAF_SLAY_1, SAY_BRIGHTLEAF_SLAY_2), me); } - void JustDied(Unit* who) + void JustDied(Unit* killer) { _JustDied(); DoScriptText(SAY_BRIGHTLEAF_DEATH, me); - if (who && who->GetTypeId() == TYPEID_PLAYER) + if (killer && killer->GetTypeId() == TYPEID_PLAYER) { if (Creature* Ironbranch = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_IRONBRANCH))) Ironbranch->AI()->DoAction(ACTION_ELDER_DEATH); @@ -830,12 +830,12 @@ class boss_elder_stonebark : public CreatureScript DoScriptText(RAND(SAY_STONEBARK_SLAY_1, SAY_STONEBARK_SLAY_2), me); } - void JustDied(Unit* who) + void JustDied(Unit* killer) { _JustDied(); DoScriptText(SAY_STONEBARK_DEATH, me); - if (who && who->GetTypeId() == TYPEID_PLAYER) + if (killer && killer->GetTypeId() == TYPEID_PLAYER) { if (Creature* Ironbranch = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_IRONBRANCH))) Ironbranch->AI()->DoAction(ACTION_ELDER_DEATH); @@ -956,12 +956,12 @@ class boss_elder_ironbranch : public CreatureScript DoScriptText(RAND(SAY_IRONBRANCH_SLAY_1, SAY_IRONBRANCH_SLAY_2), me); } - void JustDied(Unit* who) + void JustDied(Unit* killer) { _JustDied(); DoScriptText(SAY_IRONBRANCH_DEATH, me); - if (who && who->GetTypeId() == TYPEID_PLAYER) + if (killer && killer->GetTypeId() == TYPEID_PLAYER) { if (Creature* Brightleaf = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_BRIGHTLEAF))) Brightleaf->AI()->DoAction(ACTION_ELDER_DEATH); @@ -1138,7 +1138,7 @@ class npc_ancient_water_spirit : public CreatureScript DoMeleeAttackIfReady(); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (Creature* Freya = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_FREYA))) { @@ -1204,7 +1204,7 @@ class npc_storm_lasher : public CreatureScript DoMeleeAttackIfReady(); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (Creature* Freya = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_FREYA))) { @@ -1251,7 +1251,7 @@ class npc_snaplasher : public CreatureScript DoMeleeAttackIfReady(); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (Creature* Freya = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_FREYA))) { diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp index c7918f8524..61f82d898b 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp @@ -211,7 +211,7 @@ class boss_general_vezax : public CreatureScript DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { _JustDied(); DoScriptText(SAY_DEATH, me); @@ -323,7 +323,7 @@ class boss_saronite_animus : public CreatureScript events.ScheduleEvent(EVENT_PROFOUND_OF_DARKNESS, 3000); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (Creature* Vezax = me->GetCreature(*me, instance->GetData64(BOSS_VEZAX))) Vezax->AI()->DoAction(ACTION_ANIMUS_DIE); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp index 60c4ec68e8..c9fe1c5b70 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp @@ -651,7 +651,7 @@ class npc_hodir_priest : public CreatureScript DoSpellAttackIfReady(SPELL_SMITE); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (Creature* Hodir = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(BOSS_HODIR) : 0)) Hodir->AI()->DoAction(ACTION_I_HAVE_THE_COOLEST_FRIENDS); @@ -713,7 +713,7 @@ class npc_hodir_shaman : public CreatureScript DoSpellAttackIfReady(SPELL_LAVA_BURST); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (Creature* Hodir = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(BOSS_HODIR) : 0)) Hodir->AI()->DoAction(ACTION_I_HAVE_THE_COOLEST_FRIENDS); @@ -774,7 +774,7 @@ class npc_hodir_druid : public CreatureScript DoSpellAttackIfReady(SPELL_WRATH); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (Creature* Hodir = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(BOSS_HODIR) : 0)) Hodir->AI()->DoAction(ACTION_I_HAVE_THE_COOLEST_FRIENDS); @@ -854,7 +854,7 @@ class npc_hodir_mage : public CreatureScript DoSpellAttackIfReady(SPELL_FIREBALL); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (Creature* Hodir = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(BOSS_HODIR) : 0)) Hodir->AI()->DoAction(ACTION_I_HAVE_THE_COOLEST_FRIENDS); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp index d8a3ef0b8d..5a7afc34f1 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp @@ -148,7 +148,7 @@ class boss_ignis : public CreatureScript instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEVEMENT_IGNIS_START_EVENT); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { _JustDied(); DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp index dd4a1c23d3..d89d640b08 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp @@ -135,7 +135,7 @@ class boss_kologarn : public CreatureScript eyebeamTarget = 0; } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); DoCast(SPELL_KOLOGARN_PACIFY); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp index 85b5c13c6e..a1323b0789 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp @@ -211,7 +211,7 @@ class boss_razorscale_controller : public CreatureScript } } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { _JustDied(); } @@ -354,7 +354,7 @@ class boss_razorscale : public CreatureScript events.ScheduleEvent(EVENT_FLIGHT, 0, 0, PHASE_GROUND); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { _JustDied(); if (Creature* controller = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(DATA_RAZORSCALE_CONTROL) : 0)) diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp index 72741ee067..084cd3e0f8 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp @@ -73,7 +73,7 @@ public: DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); _JustDied(); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp index 724eb45d58..727f40aef8 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp @@ -244,7 +244,7 @@ class boss_xt002 : public CreatureScript DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); _JustDied(); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp index 17ad7b3643..3db9a785f7 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp @@ -115,7 +115,7 @@ public: } } - void JustDied(Unit* Killer) + void JustDied(Unit* killer) { if (!ghost && instance) { @@ -138,7 +138,7 @@ public: if (temp) { temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - temp->AI()->AttackStart(Killer); + temp->AI()->AttackStart(killer); } } } @@ -273,7 +273,7 @@ public: } } - void JustDied(Unit* Killer) + void JustDied(Unit* killer) { if (!ghost && instance) { @@ -297,7 +297,7 @@ public: if (temp) { temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - temp->AI()->AttackStart(Killer); + temp->AI()->AttackStart(killer); } } } diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp index 2f4079d4e3..dc58e51a5a 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp @@ -189,7 +189,7 @@ class mob_tempest_minion : public CreatureScript OverchargedTimer = 0; } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (Creature* emalon = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_EMALON) : 0)) { diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp index 1736861fdc..e9d2c85e13 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp @@ -778,7 +778,7 @@ struct violet_hold_trashAI : public npc_escortAI } } - void JustDied(Unit* /*unit*/) + void JustDied(Unit* /*killer*/) { if (Creature* portal = Unit::GetCreature((*me), instance->GetData64(DATA_TELEPORTATION_PORTAL))) CAST_AI(npc_teleportation_portal_vh::npc_teleportation_portalAI, portal->AI())->SummonedMobDied(me); diff --git a/src/server/scripts/Northrend/borean_tundra.cpp b/src/server/scripts/Northrend/borean_tundra.cpp index 17cd3ac0c0..f83538b344 100644 --- a/src/server/scripts/Northrend/borean_tundra.cpp +++ b/src/server/scripts/Northrend/borean_tundra.cpp @@ -355,21 +355,22 @@ public: void EnterCombat(Unit* /*who*/) {} void MoveInLineOfSight(Unit* /*who*/) {} - void JustDied(Unit* Killer) + void JustDied(Unit* killer) { - if (Killer->GetTypeId() == TYPEID_PLAYER) + Player* player = killer->ToPlayer(); + if (!player) + return; + + if (player->GetQuestStatus(11611) == QUEST_STATUS_INCOMPLETE) { - if (CAST_PLR(Killer)->GetQuestStatus(11611) == QUEST_STATUS_INCOMPLETE) + uint8 uiRand = urand(0, 99); + if (uiRand < 25) { - uint8 uiRand = urand(0, 99); - if (uiRand < 25) - { - Killer->CastSpell(me, 45532, true); - CAST_PLR(Killer)->KilledMonsterCredit(WARSONG_PEON, 0); - } - else if (uiRand < 75) - Killer->CastSpell(me, nerubarVictims[urand(0, 2)], true); + player->CastSpell(me, 45532, true); + player->KilledMonsterCredit(WARSONG_PEON, 0); } + else if (uiRand < 75) + player->CastSpell(me, nerubarVictims[urand(0, 2)], true); } } }; @@ -591,7 +592,7 @@ public: void EnterCombat(Unit* /*who*/) {} void MoveInLineOfSight(Unit* /*who*/) {} - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (GameObject* go_caribou = me->GetMap()->GetGameObject(go_caribouGUID)) go_caribou->SetLootState(GO_JUST_DEACTIVATED); @@ -1445,8 +1446,8 @@ public: pLeryssa->SetWalk(false); pLeryssa->GetMotionMaster()->MovePoint(0, 3722.114502f, 3564.201660f, 477.441437f); - if (killer->GetTypeId() == TYPEID_PLAYER) - CAST_PLR(killer)->RewardPlayerAndGroupAtEvent(NPC_PRINCE_VALANAR, 0); + if (Player* player = killer->ToPlayer()) + player->RewardPlayerAndGroupAtEvent(NPC_PRINCE_VALANAR, 0); } }; @@ -1627,7 +1628,10 @@ public: StartFollow(pCaster->ToPlayer(), 0, NULL); me->UpdateEntry(NPC_CAPTURED_BERLY_SORCERER, TEAM_NEUTRAL); DoCast(me, SPELL_COSMETIC_ENSLAVE_CHAINS_SELF, true); - CAST_PLR(pCaster)->KilledMonsterCredit(NPC_CAPTURED_BERLY_SORCERER, 0); + + if (Player* player = pCaster->ToPlayer()) + player->KilledMonsterCredit(NPC_CAPTURED_BERLY_SORCERER, 0); + bEnslaved = true; } } @@ -2111,14 +2115,17 @@ public: void JustDied(Unit* killer) { - if (killer->GetTypeId() == TYPEID_PLAYER && - CAST_PLR(killer)->GetQuestStatus(QUEST_YOU_RE_NOT_SO_BIG_NOW) == QUEST_STATUS_INCOMPLETE && + Player* player = killer->ToPlayer(); + if (!player) + return; + + if (player->GetQuestStatus(QUEST_YOU_RE_NOT_SO_BIG_NOW) == QUEST_STATUS_INCOMPLETE && (me->HasAura(SPELL_AURA_NOTSOBIG_1) || me->HasAura(SPELL_AURA_NOTSOBIG_2) || me->HasAura(SPELL_AURA_NOTSOBIG_3) || me->HasAura(SPELL_AURA_NOTSOBIG_4))) { Quest const* qInfo = sObjectMgr->GetQuestTemplate(QUEST_YOU_RE_NOT_SO_BIG_NOW); if (qInfo) - CAST_PLR(killer)->KilledMonsterCredit(qInfo->RequiredNpcOrGo[0], 0); + player->KilledMonsterCredit(qInfo->RequiredNpcOrGo[0], 0); } } }; diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp index 11725965d6..ae1a7296de 100644 --- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp +++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp @@ -233,7 +233,7 @@ public: DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); //When Exarch Maladar is defeated D'ore appear. diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp index 9fa0bedde6..a4bba5f28f 100644 --- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp +++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp @@ -145,7 +145,7 @@ public: DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEAD, me); summons.DespawnAll(); diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp index 2b4574ef6a..487a1dd41e 100644 --- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp +++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp @@ -68,7 +68,7 @@ public: VoidBlast_Counter = 0; } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); } diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp index 89bf5c6c34..37544f9377 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp @@ -97,7 +97,7 @@ public: DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); } diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp index bfb9ee4e8c..768c4bf12d 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp @@ -118,7 +118,7 @@ public: DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp index 784adad166..d92e76685d 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp @@ -136,7 +136,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp index 0e1fe24f3d..6eac36f71c 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp @@ -96,7 +96,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp index 7e99b968b2..e47810c74f 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp @@ -232,7 +232,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); destroyPortals(); diff --git a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp index 956b28f4c9..7ae09e925a 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp @@ -130,7 +130,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(DATA_GURTOGGBLOODBOILEVENT, DONE); diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp index e9dd3e516b..f5b2e3efa9 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp @@ -149,7 +149,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(DATA_MOTHERSHAHRAZEVENT, DONE); diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp index c83fa4ac62..70f27d6caf 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp @@ -643,7 +643,7 @@ public: DoCast(me, AURA_OF_ANGER, true); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(ANGER_SAY_DEATH, me); } diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp index 00113181a3..4edd8b23a4 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp @@ -293,7 +293,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(DATA_TERONGOREFIENDEVENT, DONE); diff --git a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp index 7d88a3b0ad..5b2bb8e7bf 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp @@ -98,7 +98,7 @@ public: events.DelayEvents(5000, GCD_YELL); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(DATA_HIGHWARLORDNAJENTUSEVENT, DONE); diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp index 89e0073c5c..a0e85e1b33 100644 --- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp +++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp @@ -498,7 +498,7 @@ public: DoScriptText(SAY_GATH_SLAY, me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_GATH_DEATH, me); } @@ -632,7 +632,7 @@ public: DoScriptText(SAY_ZERE_SLAY, me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_ZERE_DEATH, me); } @@ -732,7 +732,7 @@ public: DoScriptText(SAY_MALA_SLAY, me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_MALA_DEATH, me); } @@ -818,7 +818,7 @@ public: DoScriptText(SAY_VERA_SLAY, me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_VERA_DEATH, me); } diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp index 287b5ff8a4..9af79de742 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp @@ -354,7 +354,7 @@ public: instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { if (instance) { @@ -494,7 +494,7 @@ public: instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { if (instance) { @@ -621,7 +621,7 @@ public: instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { if (instance) { diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp index 4f679da6d9..7abd2bbc8a 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp @@ -203,7 +203,7 @@ public: Summons.Despawn(summon); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { if (CorruptedForm) DoScriptText(SAY_CORRUPT_DEATH, me); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp index c498c41a06..b614a5afa3 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp @@ -226,7 +226,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp index ad71850446..35d5ab7793 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp @@ -109,7 +109,7 @@ public: return 0; } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { Unit* unit = Unit::GetUnit((*me), victimGUID); if (unit && unit->HasAura(SPELL_INSIDIOUS_WHISPER)) @@ -399,7 +399,7 @@ public: } } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); @@ -641,7 +641,7 @@ public: DoScriptText(RAND(SAY_DEMON_SLAY1, SAY_DEMON_SLAY2, SAY_DEMON_SLAY3), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { //invisibility (blizzlike, at the end of the fight he doesn't die, he disappears) DoCast(me, 8149, true); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp index e1147f9c18..865fb14380 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp @@ -140,7 +140,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp index 383f146756..48c5a36061 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp @@ -79,7 +79,7 @@ public: instance->SetData(TYPE_HYDROMANCER_THESPIA, NOT_STARTED); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEAD, me); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp index b27bbe36dc..77f521e509 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp @@ -88,7 +88,7 @@ public: instance->SetData(TYPE_MEKGINEER_STEAMRIGGER, NOT_STARTED); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp index 8c700313ca..cae1117805 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp @@ -157,7 +157,7 @@ public: me->RemoveAurasDueToSpell(SPELL_WARLORDS_RAGE_PROC); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp index c76be6bbb5..f7079e5c66 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp @@ -88,7 +88,7 @@ public: } } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { for (std::list::const_iterator i = Striders.begin(); i != Striders.end(); ++i) if (Creature* strider = Unit::GetCreature(*me, *i)) diff --git a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp index ff116d880b..0e654ade99 100644 --- a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp +++ b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp @@ -109,7 +109,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp index ee8e64029f..de4b23d5f6 100644 --- a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp +++ b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp @@ -173,7 +173,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); @@ -363,7 +363,7 @@ public: } } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance) { @@ -478,7 +478,7 @@ public: } } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance) { @@ -598,7 +598,7 @@ public: } } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance) { @@ -708,7 +708,7 @@ public: } } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance) { diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp index 42398b9557..f6b7518661 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp @@ -121,7 +121,7 @@ class boss_broggok : public CreatureScript DoMeleeAttackIfReady(); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (instance) { diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp index 082d7df10d..01873afeaa 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp @@ -185,7 +185,7 @@ class boss_kelidan_the_breaker : public CreatureScript } } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DIE, me); @@ -326,10 +326,10 @@ class mob_shadowmoon_channeler : public CreatureScript DoStartMovement(who); } - void JustDied(Unit* Killer) + void JustDied(Unit* killer) { if (Creature* Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100)) - CAST_AI(boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, Kelidan->AI())->ChannelerDied(Killer); + CAST_AI(boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, Kelidan->AI())->ChannelerDied(killer); } void UpdateAI(const uint32 diff) diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp index 186b26b2b6..dc9f83b073 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp @@ -94,7 +94,7 @@ class boss_the_maker : public CreatureScript DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DIE, me); diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp index 72123683d6..2ab2b2b5b2 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp @@ -113,7 +113,7 @@ class boss_omor_the_unscarred : public CreatureScript ++SummonedCount; } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DIE, me); } diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp index 1867f90bb8..a5cdebea75 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp @@ -236,9 +236,9 @@ class boss_vazruden : public CreatureScript DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me); } - void JustDied(Unit* who) + void JustDied(Unit* killer) { - if (who && who != me) + if (killer && killer != me) DoScriptText(SAY_DIE, me); } @@ -480,10 +480,10 @@ class mob_hellfire_sentry : public CreatureScript void EnterCombat(Unit* /*who*/) {} - void JustDied(Unit* who) + void JustDied(Unit* killer) { if (Creature* herald = me->FindNearestCreature(ENTRY_VAZRUDEN_HERALD, 150)) - CAST_AI(boss_vazruden_the_herald::boss_vazruden_the_heraldAI, herald->AI())->SentryDownBy(who); + CAST_AI(boss_vazruden_the_herald::boss_vazruden_the_heraldAI, herald->AI())->SentryDownBy(killer); } void UpdateAI(const uint32 diff) diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp index 55ad59e39c..2c00a68321 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp @@ -109,7 +109,7 @@ class boss_watchkeeper_gargolmar : public CreatureScript DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DIE, me); } diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index bdfc3dd3bf..1b29abf1af 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -322,7 +322,7 @@ class boss_magtheridon : public CreatureScript DoScriptText(SAY_PLAYER_KILLED, me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(DATA_MAGTHERIDON_EVENT, DONE); @@ -533,7 +533,7 @@ class mob_hellfire_channeler : public CreatureScript DoCast(me, SPELL_SOUL_TRANSFER, true); } - void JustDied(Unit* /*who*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(DATA_CHANNELER_EVENT, DONE); diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp index 59c56114bf..7dfdc40a78 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp @@ -224,7 +224,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DIE, me); @@ -356,7 +356,7 @@ class mob_fel_orc_convert : public CreatureScript } } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance) { diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp index 1d5218ae34..5371473e21 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp @@ -295,7 +295,7 @@ class boss_warbringer_omrogg : public CreatureScript } } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { Unit* pLeftHead = Unit::GetUnit(*me, LeftHeadGUID); Unit* pRightHead = Unit::GetUnit(*me, RightHeadGUID); diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp index a6b1d4772b..f92a163f55 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp @@ -137,7 +137,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript } } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); removeAdds(); diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index 63fb4f1716..074ce08ca3 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -145,7 +145,7 @@ class boss_alar : public CreatureScript me->setActive(true); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(DATA_ALAREVENT, DONE); diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp index f6a5d42918..010b741cae 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp @@ -151,7 +151,7 @@ class boss_high_astromancer_solarian : public CreatureScript DoScriptText(RAND(SAY_KILL1, SAY_KILL2, SAY_KILL3), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { me->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize); me->SetDisplayId(MODEL_HUMAN); diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp index a70aabe3d8..318d9c629b 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp @@ -450,7 +450,7 @@ class boss_kaelthas : public CreatureScript summons.Despawn(summon); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -1137,7 +1137,7 @@ class boss_lord_sanguinar : public CreatureScript DoScriptText(SAY_SANGUINAR_AGGRO, me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { if (instance && instance->GetData(DATA_KAELTHASEVENT) == 3) DoScriptText(SAY_SANGUINAR_DEATH, me); diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp index bad35d0a68..275a72e75a 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp @@ -85,7 +85,7 @@ class boss_void_reaver : public CreatureScript DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); DoZoneInCombat(); diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp index b8b0ffd4d2..a1287a5740 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp @@ -86,7 +86,7 @@ class boss_gatewatcher_iron_hand : public CreatureScript DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH_1, me); //TODO: Add door check/open code diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp index 7e435187be..59837fdbed 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp @@ -101,7 +101,7 @@ class boss_nethermancer_sepethrea : public CreatureScript DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); if (instance) diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp index cdc3b799b2..3a4d449707 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp @@ -103,7 +103,7 @@ class boss_pathaleon_the_calculator : public CreatureScript DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp index 24ea29702f..d675b43896 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp @@ -128,7 +128,7 @@ class npc_millhouse_manastorm : public CreatureScript Talk(SAY_KILL); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { Talk(SAY_DEATH); diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp index de86ec8672..c2eeaf9fe7 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp @@ -112,7 +112,7 @@ class boss_harbinger_skyriss : public CreatureScript void EnterCombat(Unit* /*who*/) {} - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); if (instance) diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp index 178495ff25..ba61a1bfb1 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp @@ -107,7 +107,7 @@ class boss_high_botanist_freywinn : public CreatureScript DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); } diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp index 09674fa98d..3acde2455d 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp @@ -169,7 +169,7 @@ class boss_warp_splinter : public CreatureScript DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); } diff --git a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp index dbdd369dc8..147d2d6035 100644 --- a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp +++ b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp @@ -97,7 +97,7 @@ class boss_doomlord_kazzak : public CreatureScript Talk(SAY_KILL); } - void JustDied(Unit* /*victim*/) + void JustDied(Unit* /*killer*/) { Talk(SAY_DEATH); } diff --git a/src/server/scripts/Outland/boss_doomwalker.cpp b/src/server/scripts/Outland/boss_doomwalker.cpp index 664ad215c7..67834601d6 100644 --- a/src/server/scripts/Outland/boss_doomwalker.cpp +++ b/src/server/scripts/Outland/boss_doomwalker.cpp @@ -79,7 +79,7 @@ class boss_doomwalker : public CreatureScript Talk(SAY_SLAY); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*killer*/) { Talk(SAY_DEATH); } diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp index f9aaf87fa8..46257f32ee 100644 --- a/src/server/scripts/Outland/shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/shadowmoon_valley.cpp @@ -1398,27 +1398,25 @@ public: DoMeleeAttackIfReady(); } - void JustDied(Unit* slayer) + void JustDied(Unit* killer) { - if (slayer) - switch (slayer->GetTypeId()) - { - case TYPEID_UNIT: - if (Unit* owner = slayer->GetOwner()) - if (owner->GetTypeId() == TYPEID_PLAYER) - CAST_PLR(owner)->GroupEventHappens(QUEST_BATTLE_OF_THE_CRIMSON_WATCH, me); - break; - - case TYPEID_PLAYER: - CAST_PLR(slayer)->GroupEventHappens(QUEST_BATTLE_OF_THE_CRIMSON_WATCH, me); - break; - default: - break; - } + switch (killer->GetTypeId()) + { + case TYPEID_UNIT: + if (Unit* owner = killer->GetOwner()) + if (owner->GetTypeId() == TYPEID_PLAYER) + CAST_PLR(owner)->GroupEventHappens(QUEST_BATTLE_OF_THE_CRIMSON_WATCH, me); + break; + case TYPEID_PLAYER: + CAST_PLR(killer)->GroupEventHappens(QUEST_BATTLE_OF_THE_CRIMSON_WATCH, me); + break; + default: + break; + } if (Creature* LordIllidan = (Unit::GetCreature(*me, LordIllidanGUID))) { - DoScriptText(END_TEXT, LordIllidan, slayer); + DoScriptText(END_TEXT, LordIllidan, killer); LordIllidan->AI()->EnterEvadeMode(); } } @@ -1599,7 +1597,8 @@ public: } void EnterCombat(Unit* /*who*/) {} - void JustDied(Unit* /*slayer*/) + + void JustDied(Unit* /*killer*/) { me->RemoveCorpse(); if (Creature* LordIllidan = (Unit::GetCreature(*me, LordIllidanGUID))) diff --git a/src/server/scripts/Outland/terokkar_forest.cpp b/src/server/scripts/Outland/terokkar_forest.cpp index b8f4be9e59..6c2214cde3 100644 --- a/src/server/scripts/Outland/terokkar_forest.cpp +++ b/src/server/scripts/Outland/terokkar_forest.cpp @@ -306,24 +306,26 @@ public: void EnterCombat(Unit* /*who*/) { } void MoveInLineOfSight(Unit* /*who*/) { } - void JustDied(Unit* Killer) + void JustDied(Unit* killer) { - if (Killer->GetTypeId() == TYPEID_PLAYER) - { - if (CAST_PLR(Killer)->GetQuestStatus(10873) == QUEST_STATUS_INCOMPLETE) - { - if (rand()%100 < 25) - { - me->SummonCreature(QUEST_TARGET, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); - CAST_PLR(Killer)->KilledMonsterCredit(QUEST_TARGET, 0); - } - else - me->SummonCreature(netherwebVictims[rand()%6], 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + Player* player = killer->ToPlayer(); + if (!player) + return; - if (rand()%100 < 75) - me->SummonCreature(netherwebVictims[rand()%6], 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); - me->SummonCreature(netherwebVictims[rand()%6], 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + if (player->GetQuestStatus(10873) == QUEST_STATUS_INCOMPLETE) + { + if (rand()%100 < 25) + { + me->SummonCreature(QUEST_TARGET, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + player->KilledMonsterCredit(QUEST_TARGET, 0); } + else + me->SummonCreature(netherwebVictims[rand()%6], 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + + if (rand()%100 < 75) + me->SummonCreature(netherwebVictims[rand()%6], 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + + me->SummonCreature(netherwebVictims[rand()%6], 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); } } };