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 <[email protected]>
This commit is contained in:
@@ -83,7 +83,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
|
||||
@@ -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)))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -796,7 +796,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*who*/)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoCast(SPELL_HALLUCINATION_2);
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
void JustDied(Unit* /*who*/)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
DoScriptText(SAY_SLAY, me);
|
||||
}
|
||||
|
||||
void JustDied(Unit*)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
_JustDied();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
_JustDied();
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
summon->AI()->DoZoneInCombat();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
_JustDied();
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
DoScriptText(SAY_SLAY, me);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
_JustDied();
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*who*/)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
_JustDied();
|
||||
me->CastSpell(me, SPELL_DIES, true);
|
||||
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
DoScriptText(SAY_SLAY, me);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
_JustDied();
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)))
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)))
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user