aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Northrend
diff options
context:
space:
mode:
authorGyx <2359980687@qq.com>2012-03-31 18:56:37 +0800
committerGyx <2359980687@qq.com>2012-03-31 18:56:37 +0800
commitd9088c083cdf42124ac956d704c5fa7b5d98e185 (patch)
tree83115239db55a0e572505d368c2c0fbbf525b3f0 /src/server/scripts/Northrend
parent7efb63725853b7c2221a800bf6204dcf5635c63c (diff)
Core/Script: Code style and some rewriting.
JustDied(Unit* Killer) -> JustDied(Unit* killer) JustDied(Unit* /*Killer*/) -> JustDied(Unit* /*killer*/) JustDied(Unit* /*unit*/) -> JustDied(Unit* /*killer*/) JustDied(Unit* /*slayer*/)) -> JustDied(Unit* /*killer*/) JustDied(Unit* /*victim*/) -> JustDied(Unit* /*killer*/) JustDied(Unit* victim) -> JustDied(Unit* killer) JustDied(Unit* /*who*/) -> JustDied(Unit* /*killer*/) JustDied(Unit* who) -> JustDied(Unit* killer) JustDied(Unit*) -> JustDied(Unit* /*killer*/) Signed-off-by: Gyx <2359980687@qq.com>
Diffstat (limited to 'src/server/scripts/Northrend')
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp2
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp4
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp12
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp2
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp2
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp6
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp2
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_eck.cpp2
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp4
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_noth.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp2
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp6
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp6
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp4
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp22
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp4
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp8
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp4
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp2
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp8
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp2
-rw-r--r--src/server/scripts/Northrend/VioletHold/violet_hold.cpp2
-rw-r--r--src/server/scripts/Northrend/borean_tundra.cpp43
33 files changed, 89 insertions, 82 deletions
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp
index 516d3b21622..8f34fa56525 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 7b8157486e8..ea757e86f4d 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 ceefcece71e..d6e50097765 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 6a0ccc54773..328d1ab1cd4 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 1e5567bda82..6587631f249 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 e96ef4ff366..95acc79231d 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 89ab4205e87..2abb60d5de2 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 b79e4d1edfd..3e803c24d61 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 a97c6f7d138..58856f9fb44 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 d473643d900..1671eab0b32 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 8c6afba18fd..132ecdafa5a 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 9ab102e2e2b..d84cfb8949e 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 93f4b58120f..98cbb95f10d 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 e593adfbc66..75be596fd77 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 37c32edf0db..b826a530719 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 9e05178a8b9..37fb5f3f4a9 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 86b77139661..ccc8e9a5663 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 5e87ffb8973..7552ba4f389 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 f7c523d1521..0967c38c2e7 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 1c478cd83e9..6c2c08f07a0 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 fe221465ca0..5d68da4e75a 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 159e2a9702b..4ea38a7642d 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 c7918f85245..61f82d898b9 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 60c4ec68e82..c9fe1c5b707 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 d8a3ef0b8df..5a7afc34f13 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 dd4a1c23d39..d89d640b083 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 85b5c13c6ee..a1323b07899 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 72741ee0679..084cd3e0f86 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 724eb45d586..727f40aef81 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 17ad7b36439..3db9a785f74 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 2f4079d4e3c..dc58e51a5a1 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 1736861fdc6..e9d2c85e13e 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 17cd3ac0c09..f83538b344c 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);
}
}
};