Merge remote-tracking branch 'origin/master' into 4.3.4

Conflicts:
	src/server/game/Entities/Creature/GossipDef.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Player/Player.h
	src/server/game/Handlers/QuestHandler.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
	src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
	src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_kilnara.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp
	src/server/scripts/EasternKingdoms/boss_kruul.cpp
	src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp
	src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp
	src/server/scripts/EasternKingdoms/zone_ghostlands.cpp
	src/server/scripts/EasternKingdoms/zone_hinterlands.cpp
	src/server/scripts/EasternKingdoms/zone_ironforge.cpp
	src/server/scripts/EasternKingdoms/zone_loch_modan.cpp
	src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp
	src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
	src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
	src/server/scripts/EasternKingdoms/zone_swamp_of_sorrows.cpp
	src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp
	src/server/scripts/Kalimdor/zone_azshara.cpp
	src/server/scripts/Kalimdor/zone_darkshore.cpp
	src/server/scripts/Kalimdor/zone_desolace.cpp
	src/server/scripts/Kalimdor/zone_durotar.cpp
	src/server/scripts/Kalimdor/zone_felwood.cpp
	src/server/scripts/Kalimdor/zone_feralas.cpp
	src/server/scripts/Kalimdor/zone_mulgore.cpp
	src/server/scripts/Kalimdor/zone_orgrimmar.cpp
	src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp
	src/server/scripts/Kalimdor/zone_tanaris.cpp
	src/server/scripts/Kalimdor/zone_thousand_needles.cpp
	src/server/scripts/Kalimdor/zone_thunder_bluff.cpp
	src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
	src/server/scripts/Northrend/zone_dalaran.cpp
	src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
	src/server/scripts/Spells/spell_druid.cpp
	src/server/scripts/Spells/spell_generic.cpp
	src/server/scripts/Spells/spell_mage.cpp
	src/server/scripts/Spells/spell_paladin.cpp
	src/server/scripts/Spells/spell_priest.cpp
	src/server/scripts/Spells/spell_shaman.cpp
	src/server/scripts/Spells/spell_warlock.cpp
	src/server/scripts/Spells/spell_warrior.cpp
	src/server/scripts/World/item_scripts.cpp
This commit is contained in:
Nay committed 2013-07-14 16:10:20 +01:00
commit b56b282eee
603 files changed
+14632 -11728

No files matched your search

@@ -86,7 +86,7 @@ class npc_av_marshal_or_warmaster : public CreatureScript
{
npc_av_marshal_or_warmasterAI(Creature* creature) : ScriptedAI(creature) { }
void Reset()
void Reset() OVERRIDE
{
events.Reset();
events.ScheduleEvent(EVENT_CHARGE_TARGET, urand(2 * IN_MILLISECONDS, 12 * IN_MILLISECONDS));
@@ -99,12 +99,12 @@ class npc_av_marshal_or_warmaster : public CreatureScript
_hasAura = false;
}
void JustRespawned()
void JustRespawned() OVERRIDE
{
Reset();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
// I have a feeling this isn't blizzlike, but owell, I'm only passing by and cleaning up.
if (!_hasAura)
@@ -170,7 +170,7 @@ class npc_av_marshal_or_warmaster : public CreatureScript
bool _hasAura;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_av_marshal_or_warmasterAI(creature);
}
@@ -56,13 +56,13 @@ public:
uint64 balindaGUID;
uint32 resetTimer;
void Reset()
void Reset() OVERRIDE
{
waterBoltTimer = 3 * IN_MILLISECONDS;
resetTimer = 5 * IN_MILLISECONDS;
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -86,7 +86,7 @@ public:
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_water_elementalAI(creature);
}
@@ -110,7 +110,7 @@ public:
SummonList summons;
void Reset()
void Reset() OVERRIDE
{
arcaneExplosionTimer = urand(5 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
coneOfColdTimer = 8 * IN_MILLISECONDS;
@@ -122,17 +122,17 @@ public:
summons.DespawnAll();
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(YELL_AGGRO);
}
void JustRespawned()
void JustRespawned() OVERRIDE
{
Reset();
}
void JustSummoned(Creature* summoned)
void JustSummoned(Creature* summoned) OVERRIDE
{
CAST_AI(npc_water_elemental::npc_water_elementalAI, summoned->AI())->balindaGUID = me->GetGUID();
summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0, 50, true));
@@ -140,12 +140,12 @@ public:
summons.Summon(summoned);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
summons.DespawnAll();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -196,7 +196,7 @@ public:
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_balindaAI(creature);
}
@@ -54,7 +54,7 @@ public:
uint32 YellTimer;
uint32 ResetTimer;
void Reset()
void Reset() OVERRIDE
{
WhirlwindTimer = urand(1 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
Whirlwind2Timer = urand(1 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
@@ -64,18 +64,18 @@ public:
YellTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS); //20 to 30 seconds
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(YELL_AGGRO);
}
void JustRespawned()
void JustRespawned() OVERRIDE
{
Reset();
Talk(YELL_RESPAWN);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -125,7 +125,7 @@ public:
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_drektharAI(creature);
}
@@ -49,7 +49,7 @@ public:
uint32 MortalStrikeTimer;
uint32 ResetTimer;
void Reset()
void Reset() OVERRIDE
{
CleaveTimer = urand(1 * IN_MILLISECONDS, 9 * IN_MILLISECONDS);
FrighteningShoutTimer = urand(2 * IN_MILLISECONDS, 19 * IN_MILLISECONDS);
@@ -59,17 +59,17 @@ public:
ResetTimer = 5 * IN_MILLISECONDS;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(YELL_AGGRO);
}
void JustRespawned()
void JustRespawned() OVERRIDE
{
Reset();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -119,7 +119,7 @@ public:
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_galvangarAI(creature);
}
@@ -50,7 +50,7 @@ public:
uint32 ResetTimer;
uint32 YellTimer;
void Reset()
void Reset() OVERRIDE
{
AvatarTimer = 3 * IN_MILLISECONDS;
ThunderclapTimer = 4 * IN_MILLISECONDS;
@@ -59,12 +59,12 @@ public:
YellTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(YELL_AGGRO);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -108,7 +108,7 @@ public:
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_vanndarAI(creature);
}
@@ -29,7 +29,7 @@ class go_shadowforge_brazier : public GameObjectScript
public:
go_shadowforge_brazier() : GameObjectScript("go_shadowforge_brazier") { }
bool OnGossipHello(Player* /*player*/, GameObject* go)
bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE
{
if (InstanceScript* instance = go->GetInstanceScript())
{
@@ -48,7 +48,7 @@ public:
};
// npc_grimstone
enum eGrimstone
enum Grimstone
{
NPC_GRIMSTONE = 10096,
NPC_THELDREN = 16059,
@@ -82,7 +82,7 @@ class at_ring_of_law : public AreaTriggerScript
public:
at_ring_of_law() : AreaTriggerScript("at_ring_of_law") { }
bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/)
bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) OVERRIDE
{
if (InstanceScript* instance = player->GetInstanceScript())
{
@@ -115,7 +115,7 @@ class npc_grimstone : public CreatureScript
public:
npc_grimstone() : CreatureScript("npc_grimstone") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_grimstoneAI(creature);
}
@@ -142,7 +142,7 @@ public:
bool CanWalk;
void Reset()
void Reset() OVERRIDE
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -181,7 +181,7 @@ public:
MobDeath_Timer = 2500;
}
void WaypointReached(uint32 waypointId)
void WaypointReached(uint32 waypointId) OVERRIDE
{
switch (waypointId)
{
@@ -222,7 +222,7 @@ public:
instance->HandleGameObject(instance->GetData64(id), open);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!instance)
return;
@@ -352,9 +352,9 @@ class npc_phalanx : public CreatureScript
public:
npc_phalanx() : CreatureScript("npc_phalanx") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_phalanxAI (creature);
return new npc_phalanxAI(creature);
}
struct npc_phalanxAI : public ScriptedAI
@@ -365,14 +365,14 @@ public:
uint32 FireballVolley_Timer;
uint32 MightyBlow_Timer;
void Reset()
void Reset() OVERRIDE
{
ThunderClap_Timer = 12000;
FireballVolley_Timer = 0;
MightyBlow_Timer = 15000;
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
@@ -430,7 +430,7 @@ class npc_kharan_mighthammer : public CreatureScript
public:
npc_kharan_mighthammer() : CreatureScript("npc_kharan_mighthammer") { }
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)
@@ -479,7 +479,7 @@ public:
return true;
}
bool OnGossipHello(Player* player, Creature* creature)
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -524,7 +524,7 @@ class npc_lokhtos_darkbargainer : public CreatureScript
public:
npc_lokhtos_darkbargainer() : CreatureScript("npc_lokhtos_darkbargainer") { }
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF + 1)
@@ -538,7 +538,7 @@ public:
return true;
}
bool OnGossipHello(Player* player, Creature* creature)
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -577,7 +577,7 @@ class npc_dughal_stormwing : public CreatureScript
public:
npc_dughal_stormwing() : CreatureScript("npc_dughal_stormwing") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
npc_dughal_stormwingAI* dughal_stormwingAI = new npc_dughal_stormwingAI(creature);
@@ -588,7 +588,7 @@ public:
return dughal_stormwingAI;
}
bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)
bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF + 1)
@@ -601,7 +601,7 @@ public:
return true;
}
bool OnGossipHello(Player* player, Creature* creature)
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (player->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE && instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS)
{
@@ -615,7 +615,7 @@ public:
{
npc_dughal_stormwingAI(Creature* creature) : npc_escortAI(creature) {}
void WaypointReached(uint32 waypointId)
void WaypointReached(uint32 waypointId) OVERRIDE
{
switch (waypointId)
{
@@ -634,10 +634,10 @@ public:
}
}
void EnterCombat(Unit* who) {}
void Reset() {}
void EnterCombat(Unit* who) OVERRIDE {}
void Reset() OVERRIDE {}
void JustDied(Unit* killer)
void JustDied(Unit* killer) OVERRIDE
{
if (IsBeingEscorted && killer == me)
{
@@ -648,7 +648,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return;
if ((instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_FAILED || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_ENDED)&& instance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_ENDED)
@@ -680,7 +680,11 @@ public:
#define SAY_WINDSOR_4_3 "Good work! We're almost there, $N. This way."
#define SAY_WINDSOR_6 "This is it, $N. My stuff should be in that room. Cover me, I'm going in!"
#define SAY_WINDSOR_9 "Ah, there it is!"
#define NPC_REGINALD_WINDSOR 9682
enum MarshalWindsor
{
NPC_REGINALD_WINDSOR = 9682
};
/*
Player* playerStart;
@@ -689,7 +693,7 @@ class npc_marshal_windsor : public CreatureScript
public:
npc_marshal_windsor() : CreatureScript("npc_marshal_windsor") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
npc_marshal_windsorAI* marshal_windsorAI = new npc_marshal_windsorAI(creature);
@@ -717,7 +721,7 @@ public:
return marshal_windsorAI;
}
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE
{
if (quest->GetQuestId() == 4322)
{
@@ -739,7 +743,7 @@ public:
instance = creature->GetInstanceScript();
}
void WaypointReached(uint32 waypointId)
void WaypointReached(uint32 waypointId) OVERRIDE
{
switch (waypointId)
{
@@ -784,7 +788,7 @@ public:
}
}
void EnterCombat(Unit* who)
void EnterCombat(Unit* who) OVERRIDE
{
switch (urand(0, 2))
{
@@ -800,14 +804,14 @@ public:
}
}
void Reset() {}
void Reset() OVERRIDE {}
void JustDied(Unit* slayer)
void JustDied(Unit* slayer) OVERRIDE
{
instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_FAILED);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED)
return;
@@ -859,8 +863,12 @@ public:
#define SAY_REGINALD_WINDSOR_14_2 "Excellent work, $N. Let's find the exit. I think I know the way. Follow me!"
#define SAY_REGINALD_WINDSOR_20_1 "We made it!"
#define SAY_REGINALD_WINDSOR_20_2 "Meet me at Maxwell's encampment. We'll go over the next stages of the plan there and figure out a way to decode my tablets without the decryption ring."
#define NPC_SHILL_DINGER 9678
#define NPC_CREST_KILLER 9680
enum MarshalReginaldWindor
{
NPC_SHILL_DINGER = 9678,
NPC_CREST_KILLER = 9680
};
/*
int wp = 0;
@@ -869,7 +877,7 @@ class npc_marshal_reginald_windsor : public CreatureScript
public:
npc_marshal_reginald_windsor() : CreatureScript("npc_marshal_reginald_windsor") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
npc_marshal_reginald_windsorAI* marshal_reginald_windsorAI = new npc_marshal_reginald_windsorAI(creature);
@@ -918,7 +926,7 @@ public:
{
}
void WaypointReached(uint32 waypointId)
void WaypointReached(uint32 waypointId) OVERRIDE
{
wp = waypointId;
switch (waypointId)
@@ -976,7 +984,8 @@ public:
}
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) OVERRIDE
{
if (HasEscortState(STATE_ESCORT_ESCORTING))
return;
@@ -995,7 +1004,7 @@ public:
}
}
void EnterCombat(Unit* who)
void EnterCombat(Unit* who) OVERRIDE
{
switch (urand(0, 2))
{
@@ -1010,14 +1019,14 @@ public:
break;
}
}
void Reset() {}
void Reset() OVERRIDE {}
void JustDied(Unit* slayer)
void JustDied(Unit* slayer) OVERRIDE
{
instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_FAILED);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED)
return;
@@ -1026,10 +1035,10 @@ public:
{
if (!instance->GetData(DATA_GATE_J) && instance->GetData(DATA_JAZ) == ENCOUNTER_STATE_NOT_STARTED)
{
instance->SetData(DATA_CREATURE_JAZ, 1);
instance->SetData(DATA_NPC_JAZ, 1);
instance->SetData(DATA_JAZ, ENCOUNTER_STATE_IN_PROGRESS);
}
if (instance->GetData(DATA_CREATURE_JAZ) && instance->GetData(DATA_CREATURE_OGRABISI) && instance->GetData(DATA_JAZ) == ENCOUNTER_STATE_IN_PROGRESS)
if (instance->GetData(DATA_NPC_JAZ) && instance->GetData(DATA_NPC_OGRABISI) && instance->GetData(DATA_JAZ) == ENCOUNTER_STATE_IN_PROGRESS)
{
SetEscortPaused(false);
instance->SetData(DATA_JAZ, ENCOUNTER_STATE_ENDED);
@@ -1039,10 +1048,10 @@ public:
{
if (!instance->GetData(DATA_GATE_S) && instance->GetData(DATA_SHILL) == ENCOUNTER_STATE_NOT_STARTED)
{
instance->SetData(DATA_CREATURE_SHILL, 1);
instance->SetData(DATA_NPC_SHILL, 1);
instance->SetData(DATA_SHILL, ENCOUNTER_STATE_IN_PROGRESS);
}
if (instance->GetData(DATA_CREATURE_SHILL) && instance->GetData(DATA_SHILL) == ENCOUNTER_STATE_IN_PROGRESS)
if (instance->GetData(DATA_NPC_SHILL) && instance->GetData(DATA_SHILL) == ENCOUNTER_STATE_IN_PROGRESS)
{
instance->SetData(DATA_SHILL, ENCOUNTER_STATE_ENDED);
SetEscortPaused(false);
@@ -1052,11 +1061,11 @@ public:
{
if (!instance->GetData(DATA_GATE_C) && instance->GetData(DATA_CREST) == ENCOUNTER_STATE_NOT_STARTED)
{
instance->SetData(DATA_CREATURE_CREST, 1);
instance->SetData(DATA_NPC_CREST, 1);
me->Say(SAY_REGINALD_WINDSOR_13_2, LANG_UNIVERSAL, PlayerGUID);
instance->SetData(DATA_CREST, ENCOUNTER_STATE_IN_PROGRESS);
}
if (instance->GetData(DATA_CREATURE_CREST) && instance->GetData(DATA_CREST) == ENCOUNTER_STATE_IN_PROGRESS)
if (instance->GetData(DATA_NPC_CREST) && instance->GetData(DATA_CREST) == ENCOUNTER_STATE_IN_PROGRESS)
{
SetEscortPaused(false);
instance->SetData(DATA_CREST, ENCOUNTER_STATE_ENDED);
@@ -1078,7 +1087,7 @@ class npc_tobias_seecher : public CreatureScript
public:
npc_tobias_seecher() : CreatureScript("npc_tobias_seecher") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
npc_tobias_seecherAI* tobias_seecherAI = new npc_tobias_seecherAI(creature);
@@ -1091,7 +1100,7 @@ public:
return tobias_seecherAI;
}
bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)
bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF + 1)
@@ -1104,7 +1113,7 @@ public:
return true;
}
bool OnGossipHello(Player* player, Creature* creature)
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (player->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE && instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS)
{
@@ -1118,10 +1127,10 @@ public:
{
npc_tobias_seecherAI(Creature* creature) : npc_escortAI(creature) {}
void EnterCombat(Unit* who) {}
void Reset() {}
void EnterCombat(Unit* who) OVERRIDE {}
void Reset() OVERRIDE {}
void JustDied(Unit* killer)
void JustDied(Unit* killer) OVERRIDE
{
if (IsBeingEscorted && killer == me)
{
@@ -1132,7 +1141,7 @@ public:
}
}
void WaypointReached(uint32 waypointId)
void WaypointReached(uint32 waypointId) OVERRIDE
{
switch (waypointId)
{
@@ -1151,7 +1160,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED)
return;
@@ -1196,7 +1205,7 @@ class npc_rocknot : public CreatureScript
public:
npc_rocknot() : CreatureScript("npc_rocknot") { }
bool OnQuestReward(Player* /*player*/, Creature* creature, Quest const* quest, uint32 /*item*/)
bool OnQuestReward(Player* /*player*/, Creature* creature, Quest const* quest, uint32 /*item*/) OVERRIDE
{
InstanceScript* instance = creature->GetInstanceScript();
if (!instance)
@@ -1226,7 +1235,7 @@ public:
return true;
}
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_rocknotAI(creature);
}
@@ -1243,7 +1252,7 @@ public:
uint32 BreakKeg_Timer;
uint32 BreakDoor_Timer;
void Reset()
void Reset() OVERRIDE
{
if (HasEscortState(STATE_ESCORT_ESCORTING))
return;
@@ -1258,7 +1267,7 @@ public:
go->SetGoState((GOState)state);
}
void WaypointReached(uint32 waypointId)
void WaypointReached(uint32 waypointId) OVERRIDE
{
if (!instance)
return;
@@ -1284,7 +1293,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!instance)
return;
@@ -19,11 +19,14 @@
#ifndef DEF_BRD_H
#define DEF_BRD_H
#define FACTION_NEUTRAL 734
#define FACTION_HOSTILE 754
#define FACTION_FRIEND 35
enum FactionIds
{
FACTION_NEUTRAL = 734,
FACTION_HOSTILE = 754,
FACTION_FRIEND = 35
};
enum eTypes
enum DataTypes
{
TYPE_RING_OF_LAW = 1,
TYPE_VAULT = 2,
@@ -57,4 +60,5 @@ enum eTypes
DATA_SF_BRAZIER_S = 26,
DATA_MOIRA = 27,
};
#endif
@@ -29,9 +29,9 @@ class boss_ambassador_flamelash : public CreatureScript
public:
boss_ambassador_flamelash() : CreatureScript("boss_ambassador_flamelash") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_ambassador_flamelashAI (creature);
return new boss_ambassador_flamelashAI(creature);
}
struct boss_ambassador_flamelashAI : public ScriptedAI
@@ -41,13 +41,13 @@ public:
uint32 FireBlast_Timer;
uint32 Spirit_Timer;
void Reset()
void Reset() OVERRIDE
{
FireBlast_Timer = 2000;
Spirit_Timer = 24000;
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void SummonSpirits(Unit* victim)
{
@@ -55,7 +55,7 @@ public:
Spirit->AI()->AttackStart(victim);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
@@ -33,9 +33,9 @@ class boss_anubshiah : public CreatureScript
public:
boss_anubshiah() : CreatureScript("boss_anubshiah") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_anubshiahAI (creature);
return new boss_anubshiahAI(creature);
}
struct boss_anubshiahAI : public ScriptedAI
@@ -48,7 +48,7 @@ public:
uint32 DemonArmor_Timer;
uint32 EnvelopingWeb_Timer;
void Reset()
void Reset() OVERRIDE
{
ShadowBolt_Timer = 7000;
CurseOfTongues_Timer = 24000;
@@ -57,9 +57,9 @@ public:
EnvelopingWeb_Timer = 16000;
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
@@ -37,9 +37,9 @@ class boss_emperor_dagran_thaurissan : public CreatureScript
public:
boss_emperor_dagran_thaurissan() : CreatureScript("boss_emperor_dagran_thaurissan") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_draganthaurissanAI (creature);
return new boss_draganthaurissanAI(creature);
}
struct boss_draganthaurissanAI : public ScriptedAI
@@ -54,25 +54,25 @@ public:
uint32 AvatarOfFlame_Timer;
//uint32 Counter;
void Reset()
void Reset() OVERRIDE
{
HandOfThaurissan_Timer = 4000;
AvatarOfFlame_Timer = 25000;
//Counter= 0;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
me->CallForHelp(VISIBLE_RANGE);
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
if (Creature* Moira = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(DATA_MOIRA) : 0))
{
@@ -81,7 +81,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
@@ -31,9 +31,9 @@ class boss_general_angerforge : public CreatureScript
public:
boss_general_angerforge() : CreatureScript("boss_general_angerforge") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_general_angerforgeAI (creature);
return new boss_general_angerforgeAI(creature);
}
struct boss_general_angerforgeAI : public ScriptedAI
@@ -46,7 +46,7 @@ public:
uint32 Adds_Timer;
bool Medics;
void Reset()
void Reset() OVERRIDE
{
MightyBlow_Timer = 8000;
HamString_Timer = 12000;
@@ -55,7 +55,7 @@ public:
Medics = false;
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void SummonAdds(Unit* victim)
{
@@ -69,7 +69,7 @@ public:
SummonedMedic->AI()->AttackStart(victim);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
@@ -30,9 +30,9 @@ class boss_gorosh_the_dervish : public CreatureScript
public:
boss_gorosh_the_dervish() : CreatureScript("boss_gorosh_the_dervish") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_gorosh_the_dervishAI (creature);
return new boss_gorosh_the_dervishAI(creature);
}
struct boss_gorosh_the_dervishAI : public ScriptedAI
@@ -42,17 +42,17 @@ public:
uint32 WhirlWind_Timer;
uint32 MortalStrike_Timer;
void Reset()
void Reset() OVERRIDE
{
WhirlWind_Timer = 12000;
MortalStrike_Timer = 22000;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
@@ -31,9 +31,9 @@ class boss_grizzle : public CreatureScript
public:
boss_grizzle() : CreatureScript("boss_grizzle") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_grizzleAI (creature);
return new boss_grizzleAI(creature);
}
struct boss_grizzleAI : public ScriptedAI
@@ -43,15 +43,15 @@ public:
uint32 GroundTremor_Timer;
uint32 Frenzy_Timer;
void Reset()
void Reset() OVERRIDE
{
GroundTremor_Timer = 12000;
Frenzy_Timer =0;
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
@@ -32,9 +32,9 @@ class boss_high_interrogator_gerstahn : public CreatureScript
public:
boss_high_interrogator_gerstahn() : CreatureScript("boss_high_interrogator_gerstahn") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_high_interrogator_gerstahnAI (creature);
return new boss_high_interrogator_gerstahnAI(creature);
}
struct boss_high_interrogator_gerstahnAI : public ScriptedAI
@@ -46,7 +46,7 @@ public:
uint32 PsychicScream_Timer;
uint32 ShadowShield_Timer;
void Reset()
void Reset() OVERRIDE
{
ShadowWordPain_Timer = 4000;
ManaBurn_Timer = 14000;
@@ -54,9 +54,9 @@ public:
ShadowShield_Timer = 8000;
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
@@ -25,7 +25,7 @@ enum Spells
SPELL_WARSTOMP = 24375
};
enum eEnums
enum Misc
{
DATA_THRONE_DOOR = 24 // not id or guid of doors but number of enum in blackrock_depths.h
};
@@ -35,9 +35,9 @@ class boss_magmus : public CreatureScript
public:
boss_magmus() : CreatureScript("boss_magmus") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_magmusAI (creature);
return new boss_magmusAI(creature);
}
struct boss_magmusAI : public ScriptedAI
@@ -47,15 +47,15 @@ public:
uint32 FieryBurst_Timer;
uint32 WarStomp_Timer;
void Reset()
void Reset() OVERRIDE
{
FieryBurst_Timer = 5000;
WarStomp_Timer =0;
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
@@ -81,7 +81,7 @@ public:
DoMeleeAttackIfReady();
}
// When he die open door to last chamber
void JustDied(Unit* killer)
void JustDied(Unit* killer) OVERRIDE
{
if (InstanceScript* instance = killer->GetInstanceScript())
instance->HandleGameObject(instance->GetData64(DATA_THRONE_DOOR), true);
@@ -34,9 +34,9 @@ class boss_moira_bronzebeard : public CreatureScript
public:
boss_moira_bronzebeard() : CreatureScript("boss_moira_bronzebeard") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_moira_bronzebeardAI (creature);
return new boss_moira_bronzebeardAI(creature);
}
struct boss_moira_bronzebeardAI : public ScriptedAI
@@ -48,7 +48,7 @@ public:
uint32 ShadowWordPain_Timer;
uint32 Smite_Timer;
void Reset()
void Reset() OVERRIDE
{
Heal_Timer = 12000; //These times are probably wrong
MindBlast_Timer = 16000;
@@ -56,9 +56,9 @@ public:
Smite_Timer = 8000;
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
@@ -48,7 +48,7 @@ class boss_gloomrel : public CreatureScript
public:
boss_gloomrel() : CreatureScript("boss_gloomrel") { }
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)
@@ -77,7 +77,7 @@ public:
return true;
}
bool OnGossipHello(Player* player, Creature* creature)
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (player->GetQuestRewardStatus(QUEST_SPECTRAL_CHALICE) == 1 && player->GetSkillValue(SKILL_MINING) >= DATA_SKILLPOINT_MIN && !player->HasSpell(SPELL_SMELT_DARK_IRON))
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
@@ -107,7 +107,7 @@ class boss_doomrel : public CreatureScript
public:
boss_doomrel() : CreatureScript("boss_doomrel") { }
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)
@@ -130,7 +130,7 @@ public:
return true;
}
bool OnGossipHello(Player* player, Creature* creature)
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHALLENGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->SEND_GOSSIP_MENU(2601, creature->GetGUID());
@@ -138,9 +138,9 @@ public:
return true;
}
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_doomrelAI (creature);
return new boss_doomrelAI(creature);
}
struct boss_doomrelAI : public ScriptedAI
@@ -157,7 +157,7 @@ public:
uint32 DemonArmor_Timer;
bool Voidwalkers;
void Reset()
void Reset() OVERRIDE
{
ShadowVolley_Timer = 10000;
Immolate_Timer = 18000;
@@ -179,11 +179,11 @@ public:
}
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
}
void EnterEvadeMode()
void EnterEvadeMode() OVERRIDE
{
me->RemoveAllAuras();
me->DeleteThreatList();
@@ -196,13 +196,13 @@ public:
instance->SetData64(DATA_EVENSTARTER, 0);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_GHOSTKILL, 1);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -22,11 +22,10 @@
#include "blackrock_depths.h"
#define TIMER_TOMBOFTHESEVEN 15000
#define MAX_ENCOUNTER 6
enum eEnums
enum Creatures
{
MAX_ENCOUNTER = 6,
NPC_EMPEROR = 9019,
NPC_PHALANX = 9502,
NPC_ANGERREL = 9035,
@@ -37,8 +36,11 @@ enum eEnums
NPC_GLOOMREL = 9037,
NPC_DOOMREL = 9039,
NPC_MAGMUS = 9938,
NPC_MOIRA = 8929,
NPC_MOIRA = 8929
};
enum GameObjects
{
GO_ARENA1 = 161525,
GO_ARENA2 = 161522,
GO_ARENA3 = 161524,
@@ -67,7 +69,7 @@ class instance_blackrock_depths : public InstanceMapScript
public:
instance_blackrock_depths() : InstanceMapScript("instance_blackrock_depths", 230) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
return new instance_blackrock_depths_InstanceMapScript(map);
}
@@ -210,7 +212,7 @@ public:
}
}
void SetData64(uint32 type, uint64 data)
void SetData64(uint32 type, uint64 data) OVERRIDE
{
TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Blackrock Depths: SetData64 update (Type: %u Data " UI64FMTD ")", type, data);
@@ -226,7 +228,7 @@ public:
}
}
void SetData(uint32 type, uint32 data)
void SetData(uint32 type, uint32 data) OVERRIDE
{
TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data);
@@ -273,7 +275,7 @@ public:
}
}
uint32 GetData(uint32 type) const
uint32 GetData(uint32 type) const OVERRIDE
{
switch (type)
{
@@ -298,7 +300,7 @@ public:
return 0;
}
uint64 GetData64(uint32 data) const
uint64 GetData64(uint32 data) const OVERRIDE
{
switch (data)
{
@@ -45,12 +45,12 @@ public:
{
boss_drakkisathAI(Creature* creature) : BossAI(creature, DATA_GENERAL_DRAKKISATH) {}
void Reset()
void Reset() OVERRIDE
{
_Reset();
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(EVENT_FIRE_NOVA, 6000);
@@ -59,12 +59,12 @@ public:
events.ScheduleEvent(EVENT_THUNDERCLAP, 17000);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -100,7 +100,7 @@ public:
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_drakkisathAI(creature);
}
@@ -48,29 +48,29 @@ public:
{
boss_gizrul_the_slavenerAI(Creature* creature) : BossAI(creature, DATA_GIZRUL_THE_SLAVENER) {}
void Reset()
void Reset() OVERRIDE
{
_Reset();
}
void IsSummonedBy(Unit* /*summoner*/)
void IsSummonedBy(Unit* /*summoner*/) OVERRIDE
{
me->GetMotionMaster()->MovePath(GIZRUL_PATH, false);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(EVENT_FATAL_BITE, urand(17000,20000));
events.ScheduleEvent(EVENT_INFECTED_BITE, urand(10000,12000));
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -100,7 +100,7 @@ public:
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_gizrul_the_slavenerAI(creature);
}
@@ -57,7 +57,7 @@ public:
bool SummonedRend;
void Reset()
void Reset() OVERRIDE
{
SummonedRend = false;
if (instance->GetBossState(DATA_GYTH) == IN_PROGRESS)
@@ -67,7 +67,7 @@ public:
}
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
@@ -77,12 +77,12 @@ public:
events.ScheduleEvent(EVENT_KNOCK_AWAY, urand(12000, 18000));
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
instance->SetBossState(DATA_GYTH, DONE);
}
void SetData(uint32 /*type*/, uint32 data)
void SetData(uint32 /*type*/, uint32 data) OVERRIDE
{
switch (data)
{
@@ -94,7 +94,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!SummonedRend && HealthBelowPct(5))
@@ -160,7 +160,7 @@ public:
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_gythAI(creature);
}
@@ -47,20 +47,20 @@ public:
{
boss_halyconAI(Creature* creature) : BossAI(creature, DATA_HALYCON) {}
void Reset()
void Reset() OVERRIDE
{
_Reset();
Summoned = false;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(EVENT_REND, urand(17000,20000));
events.ScheduleEvent(EVENT_THRASH, urand(10000,12000));
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
me->SummonCreature(NPC_GIZRUL_THE_SLAVENER, SummonLocation, TEMPSUMMON_TIMED_DESPAWN, 300000);
Talk(EMOTE_DEATH);
@@ -68,7 +68,7 @@ public:
Summoned = true;
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -99,7 +99,7 @@ public:
bool Summoned;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_halyconAI(creature);
}
@@ -37,7 +37,7 @@ class boss_highlord_omokk : public CreatureScript
public:
boss_highlord_omokk() : CreatureScript("boss_highlord_omokk") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_highlordomokkAI(creature);
}
@@ -46,24 +46,24 @@ public:
{
boss_highlordomokkAI(Creature* creature) : BossAI(creature, DATA_HIGHLORD_OMOKK) {}
void Reset()
void Reset() OVERRIDE
{
_Reset();
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(EVENT_FRENZY, 20000);
events.ScheduleEvent(EVENT_KNOCK_AWAY, 18000);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -38,7 +38,7 @@ class boss_mother_smolderweb : public CreatureScript
public:
boss_mother_smolderweb() : CreatureScript("boss_mother_smolderweb") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_mothersmolderwebAI(creature);
}
@@ -47,30 +47,30 @@ public:
{
boss_mothersmolderwebAI(Creature* creature) : BossAI(creature, DATA_MOTHER_SMOLDERWEB) {}
void Reset()
void Reset() OVERRIDE
{
_Reset();
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(EVENT_CRYSTALIZE, 20 * IN_MILLISECONDS);
events.ScheduleEvent(EVENT_MOTHERS_MILK, 10 * IN_MILLISECONDS);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
}
void DamageTaken(Unit* /*done_by*/, uint32 &damage)
void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE
{
if (me->GetHealth() <= damage)
DoCast(me, SPELL_SUMMON_SPIRE_SPIDERLING, true);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -50,7 +50,7 @@ class boss_overlord_wyrmthalak : public CreatureScript
public:
boss_overlord_wyrmthalak() : CreatureScript("boss_overlord_wyrmthalak") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_overlordwyrmthalakAI(creature);
}
@@ -61,13 +61,13 @@ public:
bool Summoned;
void Reset()
void Reset() OVERRIDE
{
_Reset();
Summoned = false;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(EVENT_BLAST_WAVE, 20 * IN_MILLISECONDS);
@@ -76,12 +76,12 @@ public:
events.ScheduleEvent(EVENT_KNOCK_AWAY, 12 * IN_MILLISECONDS);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -77,7 +77,7 @@ public:
{
boss_pyroguard_emberseerAI(Creature* creature) : BossAI(creature, DATA_PYROGAURD_EMBERSEER) {}
void Reset()
void Reset() OVERRIDE
{
if (instance)
{
@@ -98,7 +98,7 @@ public:
}
}
void SetData(uint32 /*type*/, uint32 data)
void SetData(uint32 /*type*/, uint32 data) OVERRIDE
{
switch (data)
{
@@ -122,7 +122,7 @@ public:
}
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
// ### TODO Check combat timing ###
events.ScheduleEvent(EVENT_FIRENOVA, 6000);
@@ -130,7 +130,7 @@ public:
events.ScheduleEvent(EVENT_PYROBLAST, 14000);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
{
@@ -143,7 +143,7 @@ public:
}
}
void SpellHit(Unit* /*caster*/, SpellInfo const* spell)
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) OVERRIDE
{
if (spell->Id == SPELL_ENCAGE_EMBERSEER)
{
@@ -205,7 +205,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
{
@@ -314,7 +314,7 @@ public:
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_pyroguard_emberseerAI(creature);
}
@@ -342,19 +342,19 @@ public:
{
npc_blackhand_incarceratorAI(Creature* creature) : ScriptedAI(creature) {}
void Reset()
void Reset() OVERRIDE
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_IMMUNE_TO_NPC);
if (Creature* Emberseer = me->FindNearestCreature(NPC_PYROGAURD_EMBERSEER, 30.0f, true))
Emberseer->AI()->SetData(1, 3);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
me->DespawnOrUnsummon(10000);
}
void SetData(uint32 data, uint32 value)
void SetData(uint32 data, uint32 value) OVERRIDE
{
if (data == 1 && value == 1)
{
@@ -369,7 +369,7 @@ public:
}
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
// Used to close doors
if (Creature* Emberseer = me->FindNearestCreature(NPC_PYROGAURD_EMBERSEER, 30.0f, true))
@@ -388,7 +388,7 @@ public:
_events.ScheduleEvent(EVENT_ENCAGE, urand(10000, 20000));
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -401,11 +401,14 @@ public:
switch (eventId)
{
case EVENT_ENCAGED_EMBERSEER:
if(me->GetPositionX() == me->GetHomePosition().GetPositionX())
if(!me->HasAura(SPELL_ENCAGE_EMBERSEER))
{
if (me->GetPositionX() == me->GetHomePosition().GetPositionX())
if (!me->HasAura(SPELL_ENCAGE_EMBERSEER))
if (Creature* Emberseer = me->FindNearestCreature(NPC_PYROGAURD_EMBERSEER, 30.0f, true))
DoCast(Emberseer, SPELL_ENCAGE_EMBERSEER);
break;
}
}
}
return;
@@ -429,6 +432,7 @@ public:
break;
}
}
DoMeleeAttackIfReady();
}
@@ -436,7 +440,7 @@ public:
EventMap _events;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_blackhand_incarceratorAI(creature);
}
@@ -42,24 +42,24 @@ public:
{
boss_quatermasterzigrisAI(Creature* creature) : BossAI(creature, DATA_QUARTERMASTER_ZIGRIS) {}
void Reset()
void Reset() OVERRIDE
{
_Reset();
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(EVENT_SHOOT, 1000);
events.ScheduleEvent(EVENT_STUN_BOMB, 16000);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -87,7 +87,7 @@ public:
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_quatermasterzigrisAI(creature);
}
@@ -166,29 +166,29 @@ public:
{
boss_rend_blackhandAI(Creature* creature) : BossAI(creature, DATA_WARCHIEF_REND_BLACKHAND) { }
void Reset()
void Reset() OVERRIDE
{
_Reset();
gythEvent = false;
victorGUID = 0;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(EVENT_WHIRLWIND, urand (13000, 15000));
events.ScheduleEvent(EVENT_CLEAVE, urand (15000, 17000));
events.ScheduleEvent(EVENT_MORTAL_STRIKE, urand (17000, 19000));
events.ScheduleEvent(EVENT_WHIRLWIND, urand(13000, 15000));
events.ScheduleEvent(EVENT_CLEAVE, urand(15000, 17000));
events.ScheduleEvent(EVENT_MORTAL_STRIKE, urand(17000, 19000));
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
if (Creature* victor = me->FindNearestCreature(NPC_LORD_VICTOR_NEFARIUS, 75.0f, true))
victor->AI()->SetData(1, 2);
}
void SetData(uint32 type, uint32 data)
void SetData(uint32 type, uint32 data) OVERRIDE
{
if (instance && type == AREATRIGGER && data == AREATRIGGER_BLACKROCK_STADIUM)
{
@@ -208,7 +208,7 @@ public:
}
}
void MovementInform(uint32 type, uint32 id)
void MovementInform(uint32 type, uint32 id) OVERRIDE
{
if (type == WAYPOINT_MOTION_TYPE)
{
@@ -226,7 +226,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (gythEvent)
{
@@ -435,7 +435,7 @@ public:
uint64 portcullisGUID;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_rend_blackhandAI(creature);
}
@@ -39,7 +39,7 @@ class boss_shadow_hunter_voshgajin : public CreatureScript
public:
boss_shadow_hunter_voshgajin() : CreatureScript("boss_shadow_hunter_voshgajin") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_shadowvoshAI(creature);
}
@@ -48,13 +48,13 @@ public:
{
boss_shadowvoshAI(Creature* creature) : BossAI(creature, DATA_SHADOW_HUNTER_VOSHGAJIN) {}
void Reset()
void Reset() OVERRIDE
{
_Reset();
//DoCast(me, SPELL_ICEARMOR, true);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(EVENT_CURSE_OF_BLOOD, 2 * IN_MILLISECONDS);
@@ -62,12 +62,12 @@ public:
events.ScheduleEvent(EVENT_CLEAVE, 14 * IN_MILLISECONDS);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -39,7 +39,7 @@ class boss_the_beast : public CreatureScript
public:
boss_the_beast() : CreatureScript("boss_the_beast") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_thebeastAI(creature);
}
@@ -48,12 +48,12 @@ public:
{
boss_thebeastAI(Creature* creature) : BossAI(creature, DATA_THE_BEAST) {}
void Reset()
void Reset() OVERRIDE
{
_Reset();
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(EVENT_FLAME_BREAK, 12 * IN_MILLISECONDS);
@@ -61,12 +61,12 @@ public:
events.ScheduleEvent(EVENT_TERRIFYING_ROAR, 23 * IN_MILLISECONDS);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -48,12 +48,12 @@ public:
{
boss_urok_doomhowlAI(Creature* creature) : BossAI(creature, DATA_UROK_DOOMHOWL) {}
void Reset()
void Reset() OVERRIDE
{
_Reset();
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(SPELL_REND, urand(17000,20000));
@@ -61,12 +61,12 @@ public:
Talk(SAY_AGGRO);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -96,7 +96,7 @@ public:
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_urok_doomhowlAI(creature);
}
@@ -45,7 +45,7 @@ class boss_warmaster_voone : public CreatureScript
public:
boss_warmaster_voone() : CreatureScript("boss_warmaster_voone") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_warmastervooneAI(creature);
}
@@ -54,12 +54,12 @@ public:
{
boss_warmastervooneAI(Creature* creature) : BossAI(creature, DATA_WARMASTER_VOONE) {}
void Reset()
void Reset() OVERRIDE
{
_Reset();
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(EVENT_SNAP_KICK, 8 * IN_MILLISECONDS);
@@ -70,12 +70,12 @@ public:
events.ScheduleEvent(EVENT_THROW_AXE, 1 * IN_MILLISECONDS);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -280,7 +280,7 @@ public:
}
}
void SetData(uint32 type, uint32 data)
void SetData(uint32 type, uint32 data) OVERRIDE
{
switch (type)
{
@@ -295,7 +295,7 @@ public:
}
}
uint64 GetData64(uint32 type) const
uint64 GetData64(uint32 type) const OVERRIDE
{
switch (type)
{
@@ -592,7 +592,7 @@ public:
uint64 go_portcullis_tobossrooms;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
return new instance_blackrock_spireMapScript(map);
}
@@ -607,7 +607,7 @@ class at_dragonspire_hall : public AreaTriggerScript
public:
at_dragonspire_hall() : AreaTriggerScript("at_dragonspire_hall") { }
bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/)
bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) OVERRIDE
{
if (player && player->IsAlive())
{
@@ -631,7 +631,7 @@ class at_blackrock_stadium : public AreaTriggerScript
public:
at_blackrock_stadium() : AreaTriggerScript("at_blackrock_stadium") { }
bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/)
bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) OVERRIDE
{
if (player && player->IsAlive())
{
@@ -52,7 +52,7 @@ public:
{
boss_broodlordAI(Creature* creature) : BossAI(creature, BOSS_BROODLORD) { }
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (instance->GetBossState(BOSS_VAELASTRAZ) != DONE)
{
@@ -70,7 +70,7 @@ public:
events.ScheduleEvent(EVENT_CHECK, 1000);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -114,9 +114,9 @@ public:
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_broodlordAI (creature);
return new boss_broodlordAI(creature);
}
};
@@ -173,7 +173,7 @@ public:
EnterEvadeMode();
}
void Reset()
void Reset() OVERRIDE
{
_Reset();
@@ -181,7 +181,7 @@ public:
Enraged = false;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (instance && instance->GetBossState(BOSS_FLAMEGOR) != DONE)
{
@@ -197,7 +197,7 @@ public:
events.ScheduleEvent(EVENT_FRENZY, 15000);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -280,9 +280,9 @@ public:
bool Enraged;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_chromaggusAI (creature);
return new boss_chromaggusAI(creature);
}
};
@@ -43,7 +43,7 @@ public:
{
boss_ebonrocAI(Creature* creature) : BossAI(creature, BOSS_EBONROC) { }
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (instance && instance->GetBossState(BOSS_BROODLORD) != DONE)
{
@@ -57,7 +57,7 @@ public:
events.ScheduleEvent(EVENT_SHADOWOFEBONROC, urand(8000, 10000));
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -90,9 +90,9 @@ public:
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_ebonrocAI (creature);
return new boss_ebonrocAI(creature);
}
};
@@ -43,7 +43,7 @@ public:
{
boss_firemawAI(Creature* creature) : BossAI(creature, BOSS_FIREMAW) { }
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (instance && instance->GetBossState(BOSS_BROODLORD) != DONE)
{
@@ -57,7 +57,7 @@ public:
events.ScheduleEvent(EVENT_FLAMEBUFFET, 5000);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -92,9 +92,9 @@ public:
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_firemawAI (creature);
return new boss_firemawAI(creature);
}
};
@@ -48,7 +48,7 @@ public:
{
boss_flamegorAI(Creature* creature) : BossAI(creature, BOSS_FLAMEGOR) { }
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (instance && instance->GetBossState(BOSS_BROODLORD) != DONE)
{
@@ -62,7 +62,7 @@ public:
events.ScheduleEvent(EVENT_FRENZY, 10000);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -98,9 +98,9 @@ public:
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_flamegorAI (creature);
return new boss_flamegorAI(creature);
}
};
@@ -168,7 +168,7 @@ public:
{
boss_victor_nefariusAI(Creature* creature) : BossAI(creature, BOSS_NEFARIAN) { }
void Reset()
void Reset() OVERRIDE
{
if (me->GetMapId() == 469)
{
@@ -185,7 +185,7 @@ public:
}
}
void JustReachedHome()
void JustReachedHome() OVERRIDE
{
Reset();
}
@@ -207,7 +207,7 @@ public:
events.ScheduleEvent(EVENT_SPAWN_ADD, 10000);
}
void SummonedCreatureDies(Creature* summon, Unit* /*killer*/)
void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) OVERRIDE
{
if (summon->GetEntry() != NPC_NEFARIAN)
{
@@ -218,9 +218,9 @@ public:
}
}
void JustSummoned(Creature* /*summon*/) {}
void JustSummoned(Creature* /*summon*/) OVERRIDE {}
void SetData(uint32 type, uint32 data)
void SetData(uint32 type, uint32 data) OVERRIDE
{
if (instance && type == 1 && data == 1)
{
@@ -234,7 +234,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
{
@@ -360,7 +360,7 @@ public:
}
}
void sGossipSelect(Player* player, uint32 sender, uint32 action)
void sGossipSelect(Player* player, uint32 sender, uint32 action) OVERRIDE
{
if (sender == GOSSIP_ID && action == GOSSIP_OPTION_ID)
{
@@ -374,9 +374,9 @@ public:
uint32 SpawnedAdds;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_victor_nefariusAI (creature);
return new boss_victor_nefariusAI(creature);
}
};
@@ -389,19 +389,19 @@ public:
{
boss_nefarianAI(Creature* creature) : BossAI(creature, BOSS_NEFARIAN) { }
void Reset()
void Reset() OVERRIDE
{
Phase3 = false;
canDespawn = false;
DespawnTimer = 30000;
}
void JustReachedHome()
void JustReachedHome() OVERRIDE
{
canDespawn = true;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
events.ScheduleEvent(EVENT_SHADOWFLAME, 12000);
events.ScheduleEvent(EVENT_FEAR, urand(25000, 35000));
@@ -412,13 +412,13 @@ public:
Talk(SAY_RANDOM);
}
void JustDied(Unit* /*Killer*/)
void JustDied(Unit* /*Killer*/) OVERRIDE
{
_JustDied();
Talk(SAY_DEATH);
}
void KilledUnit(Unit* victim)
void KilledUnit(Unit* victim) OVERRIDE
{
if (rand()%5)
return;
@@ -426,7 +426,7 @@ public:
Talk(SAY_SLAY, victim->GetGUID());
}
void MovementInform(uint32 type, uint32 id)
void MovementInform(uint32 type, uint32 id) OVERRIDE
{
if (type != POINT_MOTION_TYPE)
return;
@@ -439,7 +439,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (canDespawn && DespawnTimer <= diff)
{
@@ -570,9 +570,9 @@ public:
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_nefarianAI (creature);
return new boss_nefarianAI(creature);
}
};
@@ -70,7 +70,7 @@ public:
{
boss_razorgoreAI(Creature* creature) : BossAI(creature, BOSS_RAZORGORE) { }
void Reset()
void Reset() OVERRIDE
{
_Reset();
@@ -79,7 +79,7 @@ public:
instance->SetData(DATA_EGG_EVENT, NOT_STARTED);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
Talk(SAY_DEATH);
@@ -100,19 +100,19 @@ public:
me->SetHealth(me->GetMaxHealth());
}
void DoAction(int32 action)
void DoAction(int32 action) OVERRIDE
{
if (action == ACTION_PHASE_TWO)
DoChangePhase();
}
void DamageTaken(Unit* /*who*/, uint32& damage)
void DamageTaken(Unit* /*who*/, uint32& damage) OVERRIDE
{
if (!secondPhase)
damage = 0;
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -154,9 +154,9 @@ public:
bool secondPhase;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_razorgoreAI (creature);
return new boss_razorgoreAI(creature);
}
};
@@ -165,7 +165,7 @@ class go_orb_of_domination : public GameObjectScript
public:
go_orb_of_domination() : GameObjectScript("go_orb_of_domination") { }
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if (InstanceScript* instance = go->GetInstanceScript())
if (instance->GetData(DATA_EGG_EVENT) != DONE)
@@ -193,13 +193,13 @@ class spell_egg_event : public SpellScriptLoader
instance->SetData(DATA_EGG_EVENT, SPECIAL);
}
void Register()
void Register() OVERRIDE
{
OnHit += SpellHitFn(spell_egg_eventSpellScript::HandleOnHit);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_egg_eventSpellScript();
}
@@ -75,7 +75,7 @@ public:
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
void Reset()
void Reset() OVERRIDE
{
_Reset();
@@ -85,7 +85,7 @@ public:
HasYelled = false;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
@@ -109,7 +109,7 @@ public:
events.ScheduleEvent(EVENT_SPEECH_1, 1000);
}
void KilledUnit(Unit* victim)
void KilledUnit(Unit* victim) OVERRIDE
{
if (rand()%5)
return;
@@ -117,7 +117,7 @@ public:
Talk(SAY_KILLTARGET, victim->GetGUID());
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
events.Update(diff);
@@ -216,7 +216,7 @@ public:
DoMeleeAttackIfReady();
}
void sGossipSelect(Player* player, uint32 sender, uint32 action)
void sGossipSelect(Player* player, uint32 sender, uint32 action) OVERRIDE
{
if (sender == GOSSIP_ID && action == 0)
{
@@ -230,9 +230,9 @@ public:
bool HasYelled;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_vaelAI (creature);
return new boss_vaelAI(creature);
}
};
@@ -215,7 +215,7 @@ public:
return true;
}
uint64 GetData64(uint32 id) const
uint64 GetData64(uint32 id) const OVERRIDE
{
switch (id)
{
@@ -233,7 +233,7 @@ public:
return 0;
}
void SetData(uint32 type, uint32 data)
void SetData(uint32 type, uint32 data) OVERRIDE
{
if (type == DATA_EGG_EVENT)
{
@@ -343,7 +343,7 @@ public:
uint64 NefarianGUID;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
return new instance_blackwing_lair_InstanceMapScript(map);
}
@@ -25,7 +25,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "deadmines.h"
enum eSpels
enum Spels
{
SPELL_TRASH = 3391,
SPELL_SMITE_STOMP = 6432,
@@ -43,9 +43,9 @@ class boss_mr_smite : public CreatureScript
public:
boss_mr_smite() : CreatureScript("boss_mr_smite") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_mr_smiteAI (creature);
return new boss_mr_smiteAI(creature);
}
struct boss_mr_smiteAI : public ScriptedAI
@@ -66,7 +66,7 @@ public:
uint32 uiPhase;
uint32 uiTimer;
void Reset()
void Reset() OVERRIDE
{
uiTrashTimer = urand(5000, 9000);
uiSlamTimer = 9000;
@@ -80,7 +80,7 @@ public:
SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
@@ -94,7 +94,7 @@ public:
return true;
}
void UpdateAI(uint32 uiDiff)
void UpdateAI(uint32 uiDiff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -166,7 +166,7 @@ public:
DoMeleeAttackIfReady();
}
void MovementInform(uint32 uiType, uint32 /*uiId*/)
void MovementInform(uint32 uiType, uint32 /*uiId*/) OVERRIDE
{
if (uiType != POINT_MOTION_TYPE)
return;
@@ -39,7 +39,7 @@ class item_defias_gunpowder : public ItemScript
public:
item_defias_gunpowder() : ItemScript("item_defias_gunpowder") { }
bool OnUse(Player* player, Item* item, SpellCastTargets const& targets)
bool OnUse(Player* player, Item* item, SpellCastTargets const& targets) OVERRIDE
{
InstanceScript* instance = player->GetInstanceScript();
@@ -200,7 +200,7 @@ class instance_deadmines : public InstanceMapScript
}
}
void SetData(uint32 type, uint32 data)
void SetData(uint32 type, uint32 data) OVERRIDE
{
switch (type)
{
@@ -216,7 +216,7 @@ class instance_deadmines : public InstanceMapScript
}
}
uint32 GetData(uint32 type) const
uint32 GetData(uint32 type) const OVERRIDE
{
switch (type)
{
@@ -227,7 +227,7 @@ class instance_deadmines : public InstanceMapScript
return 0;
}
uint64 GetData64(uint32 data) const
uint64 GetData64(uint32 data) const OVERRIDE
{
switch (data)
{
@@ -247,7 +247,7 @@ class instance_deadmines : public InstanceMapScript
}
};
InstanceScript* GetInstanceScript(InstanceMap* map) const
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
return new instance_deadmines_InstanceMapScript(map);
}
@@ -88,12 +88,12 @@ class npc_blastmaster_emi_shortfuse : public CreatureScript
public:
npc_blastmaster_emi_shortfuse() : CreatureScript("npc_blastmaster_emi_shortfuse") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_blastmaster_emi_shortfuseAI(creature);
}
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF+1)
@@ -109,7 +109,7 @@ public:
return true;
}
bool OnGossipHello(Player* player, Creature* creature)
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
InstanceScript* instance = creature->GetInstanceScript();
@@ -138,7 +138,7 @@ public:
std::list<uint64> SummonList;
std::list<uint64> GoSummonList;
void Reset()
void Reset() OVERRIDE
{
if (!HasEscortState(STATE_ESCORT_ESCORTING))
{
@@ -264,7 +264,7 @@ public:
}
}
void WaypointReached(uint32 waypointId)
void WaypointReached(uint32 waypointId) OVERRIDE
{
//just in case
if (GetPlayerForEscort())
@@ -308,7 +308,7 @@ public:
}
}
void SetData(uint32 uiI, uint32 uiValue)
void SetData(uint32 uiI, uint32 uiValue) OVERRIDE
{
switch (uiI)
{
@@ -408,7 +408,7 @@ public:
}
}
void UpdateEscortAI(const uint32 uiDiff)
void UpdateEscortAI(const uint32 uiDiff) OVERRIDE
{
if (uiPhase)
{
@@ -537,7 +537,7 @@ public:
DoMeleeAttackIfReady();
}
void JustSummoned(Creature* summon)
void JustSummoned(Creature* summon) OVERRIDE
{
SummonList.push_back(summon->GetGUID());
AggroAllPlayers(summon);
@@ -551,7 +551,7 @@ class boss_grubbis : public CreatureScript
public:
boss_grubbis() : CreatureScript("boss_grubbis") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_grubbisAI(creature);
}
@@ -573,7 +573,7 @@ public:
creature->AI()->SetData(2, 1);
}
void UpdateAI(uint32 /*diff*/)
void UpdateAI(uint32 /*diff*/) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -581,7 +581,7 @@ public:
DoMeleeAttackIfReady();
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
if (!me->IsSummon())
return;
@@ -18,14 +18,14 @@
#ifndef DEF_GNOMEREGAN_H
#define DEF_GNOMEREGAN_H
enum eGameObjects
enum GameObjectIds
{
GO_CAVE_IN_LEFT = 146085,
GO_CAVE_IN_RIGHT = 146086,
GO_RED_ROCKET = 103820
};
enum eCreatures
enum CreatureIds
{
NPC_BLASTMASTER_EMI_SHORTFUSE = 7998,
NPC_CAVERNDEEP_AMBUSHER = 6207,
@@ -33,12 +33,12 @@ enum eCreatures
NPC_CHOMPER = 6215
};
enum eData
enum Data
{
TYPE_EVENT = 1
};
enum eData64
enum Data64
{
DATA_GO_CAVE_IN_LEFT,
DATA_GO_CAVE_IN_RIGHT,
@@ -27,7 +27,7 @@ class instance_gnomeregan : public InstanceMapScript
public:
instance_gnomeregan() : InstanceMapScript("instance_gnomeregan", 90) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
return new instance_gnomeregan_InstanceMapScript(map);
}
@@ -102,7 +102,7 @@ public:
}
}
void SetData(uint32 uiType, uint32 uiData)
void SetData(uint32 uiType, uint32 uiData) OVERRIDE
{
switch (uiType)
{
@@ -114,7 +114,7 @@ public:
}
}
uint32 GetData(uint32 uiType) const
uint32 GetData(uint32 uiType) const OVERRIDE
{
switch (uiType)
{
@@ -123,7 +123,7 @@ public:
return 0;
}
uint64 GetData64(uint32 uiType) const
uint64 GetData64(uint32 uiType) const OVERRIDE
{
switch (uiType)
{
@@ -53,9 +53,9 @@ class boss_curator : public CreatureScript
public:
boss_curator() : CreatureScript("boss_curator") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_curatorAI (creature);
return new boss_curatorAI(creature);
}
struct boss_curatorAI : public ScriptedAI
@@ -69,7 +69,7 @@ public:
bool Enraged;
bool Evocating;
void Reset()
void Reset() OVERRIDE
{
AddTimer = 10000;
HatefulBoltTimer = 15000; //This time may be wrong
@@ -80,22 +80,22 @@ public:
me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ARCANE, true);
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -45,9 +45,9 @@ class boss_maiden_of_virtue : public CreatureScript
public:
boss_maiden_of_virtue() : CreatureScript("boss_maiden_of_virtue") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_maiden_of_virtueAI (creature);
return new boss_maiden_of_virtueAI(creature);
}
struct boss_maiden_of_virtueAI : public ScriptedAI
@@ -62,7 +62,7 @@ public:
bool Enraged;
void Reset()
void Reset() OVERRIDE
{
Repentance_Timer = 25000+(rand()%15000);
Holyfire_Timer = 8000+(rand()%17000);
@@ -73,23 +73,23 @@ public:
Enraged = false;
}
void KilledUnit(Unit* /*Victim*/)
void KilledUnit(Unit* /*Victim*/) OVERRIDE
{
if (urand(0, 1) == 0)
Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -53,9 +53,9 @@ class boss_attumen : public CreatureScript
public:
boss_attumen() : CreatureScript("boss_attumen") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_attumenAI (creature);
return new boss_attumenAI(creature);
}
struct boss_attumenAI : public ScriptedAI
@@ -79,34 +79,34 @@ public:
uint32 ChargeTimer; //only when mounted
uint32 ResetTimer;
void Reset()
void Reset() OVERRIDE
{
ResetTimer = 0;
}
void EnterEvadeMode()
void EnterEvadeMode() OVERRIDE
{
ScriptedAI::EnterEvadeMode();
ResetTimer = 2000;
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
if (Unit* midnight = Unit::GetUnit(*me, Midnight))
midnight->Kill(midnight);
}
void UpdateAI(uint32 diff);
void UpdateAI(uint32 diff) OVERRIDE;
void SpellHit(Unit* /*source*/, const SpellInfo* spell)
void SpellHit(Unit* /*source*/, const SpellInfo* spell) OVERRIDE
{
if (spell->Mechanic == MECHANIC_DISARM)
Talk(SAY_DISARMED);
@@ -119,7 +119,7 @@ class boss_midnight : public CreatureScript
public:
boss_midnight() : CreatureScript("boss_midnight") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_midnightAI(creature);
}
@@ -132,7 +132,7 @@ public:
uint8 Phase;
uint32 Mount_Timer;
void Reset()
void Reset() OVERRIDE
{
Phase = 1;
Attumen = 0;
@@ -142,9 +142,9 @@ public:
me->SetVisible(true);
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
if (Phase == 2)
{
@@ -153,7 +153,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -27,20 +27,51 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "karazhan.h"
enum Moroes
enum Yells
{
SAY_AGGRO = 0,
SAY_SPECIAL = 1,
SAY_KILL = 2,
SAY_DEATH = 3,
SPELL_VANISH = 29448,
SPELL_GARROTE = 37066,
SPELL_BLIND = 34694,
SPELL_GOUGE = 29425,
SPELL_FRENZY = 37023,
SAY_DEATH = 3
};
enum Spells
{
SPELL_VANISH = 29448,
SPELL_GARROTE = 37066,
SPELL_BLIND = 34694,
SPELL_GOUGE = 29425,
SPELL_FRENZY = 37023,
// Adds
SPELL_MANABURN = 29405,
SPELL_MINDFLY = 29570,
SPELL_SWPAIN = 34441,
SPELL_SHADOWFORM = 29406,
SPELL_HAMMEROFJUSTICE = 13005,
SPELL_JUDGEMENTOFCOMMAND = 29386,
SPELL_SEALOFCOMMAND = 29385,
SPELL_DISPELMAGIC = 15090,
SPELL_GREATERHEAL = 29564,
SPELL_HOLYFIRE = 29563,
SPELL_PWSHIELD = 29408,
SPELL_CLEANSE = 29380,
SPELL_GREATERBLESSOFMIGHT = 29381,
SPELL_HOLYLIGHT = 29562,
SPELL_DIVINESHIELD = 41367,
SPELL_HAMSTRING = 9080,
SPELL_MORTALSTRIKE = 29572,
SPELL_WHIRLWIND = 29573,
SPELL_DISARM = 8379,
SPELL_HEROICSTRIKE = 29567,
SPELL_SHIELDBASH = 11972,
SPELL_SHIELDWALL = 29390
};
#define POS_Z 81.73f
@@ -67,9 +98,9 @@ class boss_moroes : public CreatureScript
public:
boss_moroes() : CreatureScript("boss_moroes") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_moroesAI (creature);
return new boss_moroesAI(creature);
}
struct boss_moroesAI : public ScriptedAI
@@ -96,7 +127,7 @@ public:
bool InVanish;
bool Enrage;
void Reset()
void Reset() OVERRIDE
{
Vanish_Timer = 30000;
Blind_Timer = 35000;
@@ -121,7 +152,7 @@ public:
DoZoneInCombat();
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
StartEvent();
@@ -130,12 +161,12 @@ public:
DoZoneInCombat();
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
@@ -228,7 +259,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -324,7 +355,7 @@ struct boss_moroes_guestAI : public ScriptedAI
instance = creature->GetInstanceScript();
}
void Reset()
void Reset() OVERRIDE
{
if (instance)
instance->SetData(TYPE_MOROES, NOT_STARTED);
@@ -354,7 +385,7 @@ struct boss_moroes_guestAI : public ScriptedAI
return me;
}
void UpdateAI(uint32 /*diff*/)
void UpdateAI(uint32 /*diff*/) OVERRIDE
{
if (instance && !instance->GetData(TYPE_MOROES))
EnterEvadeMode();
@@ -363,42 +394,14 @@ struct boss_moroes_guestAI : public ScriptedAI
}
};
#define SPELL_MANABURN 29405
#define SPELL_MINDFLY 29570
#define SPELL_SWPAIN 34441
#define SPELL_SHADOWFORM 29406
#define SPELL_HAMMEROFJUSTICE 13005
#define SPELL_JUDGEMENTOFCOMMAND 29386
#define SPELL_SEALOFCOMMAND 29385
#define SPELL_DISPELMAGIC 15090 //Self or other guest+Moroes
#define SPELL_GREATERHEAL 29564 //Self or other guest+Moroes
#define SPELL_HOLYFIRE 29563
#define SPELL_PWSHIELD 29408
#define SPELL_CLEANSE 29380 //Self or other guest+Moroes
#define SPELL_GREATERBLESSOFMIGHT 29381 //Self or other guest+Moroes
#define SPELL_HOLYLIGHT 29562 //Self or other guest+Moroes
#define SPELL_DIVINESHIELD 41367
#define SPELL_HAMSTRING 9080
#define SPELL_MORTALSTRIKE 29572
#define SPELL_WHIRLWIND 29573
#define SPELL_DISARM 8379
#define SPELL_HEROICSTRIKE 29567
#define SPELL_SHIELDBASH 11972
#define SPELL_SHIELDWALL 29390
class boss_baroness_dorothea_millstipe : public CreatureScript
{
public:
boss_baroness_dorothea_millstipe() : CreatureScript("boss_baroness_dorothea_millstipe") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_baroness_dorothea_millstipeAI (creature);
return new boss_baroness_dorothea_millstipeAI(creature);
}
struct boss_baroness_dorothea_millstipeAI : public boss_moroes_guestAI
@@ -410,7 +413,7 @@ public:
uint32 MindFlay_Timer;
uint32 ShadowWordPain_Timer;
void Reset()
void Reset() OVERRIDE
{
ManaBurn_Timer = 7000;
MindFlay_Timer = 1000;
@@ -421,7 +424,7 @@ public:
boss_moroes_guestAI::Reset();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -459,9 +462,9 @@ class boss_baron_rafe_dreuger : public CreatureScript
public:
boss_baron_rafe_dreuger() : CreatureScript("boss_baron_rafe_dreuger") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_baron_rafe_dreugerAI (creature);
return new boss_baron_rafe_dreugerAI(creature);
}
struct boss_baron_rafe_dreugerAI : public boss_moroes_guestAI
@@ -473,7 +476,7 @@ public:
uint32 SealOfCommand_Timer;
uint32 JudgementOfCommand_Timer;
void Reset()
void Reset() OVERRIDE
{
HammerOfJustice_Timer = 1000;
SealOfCommand_Timer = 7000;
@@ -482,7 +485,7 @@ public:
boss_moroes_guestAI::Reset();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -516,9 +519,9 @@ class boss_lady_catriona_von_indi : public CreatureScript
public:
boss_lady_catriona_von_indi() : CreatureScript("boss_lady_catriona_von_indi") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_lady_catriona_von_indiAI (creature);
return new boss_lady_catriona_von_indiAI(creature);
}
struct boss_lady_catriona_von_indiAI : public boss_moroes_guestAI
@@ -531,7 +534,7 @@ public:
uint32 HolyFire_Timer;
uint32 PowerWordShield_Timer;
void Reset()
void Reset() OVERRIDE
{
DispelMagic_Timer = 11000;
GreaterHeal_Timer = 1500;
@@ -543,7 +546,7 @@ public:
boss_moroes_guestAI::Reset();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -586,9 +589,9 @@ class boss_lady_keira_berrybuck : public CreatureScript
public:
boss_lady_keira_berrybuck() : CreatureScript("boss_lady_keira_berrybuck") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_lady_keira_berrybuckAI (creature);
return new boss_lady_keira_berrybuckAI(creature);
}
struct boss_lady_keira_berrybuckAI : public boss_moroes_guestAI
@@ -601,7 +604,7 @@ public:
uint32 HolyLight_Timer;
uint32 DivineShield_Timer;
void Reset()
void Reset() OVERRIDE
{
Cleanse_Timer = 13000;
GreaterBless_Timer = 1000;
@@ -613,7 +616,7 @@ public:
boss_moroes_guestAI::Reset();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -660,9 +663,9 @@ class boss_lord_robin_daris : public CreatureScript
public:
boss_lord_robin_daris() : CreatureScript("boss_lord_robin_daris") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_lord_robin_darisAI (creature);
return new boss_lord_robin_darisAI(creature);
}
struct boss_lord_robin_darisAI : public boss_moroes_guestAI
@@ -674,7 +677,7 @@ public:
uint32 MortalStrike_Timer;
uint32 WhirlWind_Timer;
void Reset()
void Reset() OVERRIDE
{
Hamstring_Timer = 7000;
MortalStrike_Timer = 10000;
@@ -683,7 +686,7 @@ public:
boss_moroes_guestAI::Reset();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -716,9 +719,9 @@ class boss_lord_crispin_ference : public CreatureScript
public:
boss_lord_crispin_ference() : CreatureScript("boss_lord_crispin_ference") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_lord_crispin_ferenceAI (creature);
return new boss_lord_crispin_ferenceAI(creature);
}
struct boss_lord_crispin_ferenceAI : public boss_moroes_guestAI
@@ -731,7 +734,7 @@ public:
uint32 ShieldBash_Timer;
uint32 ShieldWall_Timer;
void Reset()
void Reset() OVERRIDE
{
Disarm_Timer = 6000;
HeroicStrike_Timer = 10000;
@@ -741,7 +744,7 @@ public:
boss_moroes_guestAI::Reset();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -69,7 +69,7 @@ class boss_netherspite : public CreatureScript
public:
boss_netherspite() : CreatureScript("boss_netherspite") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_netherspiteAI(creature);
}
@@ -127,7 +127,7 @@ public:
return sqrt((xa-xb)*(xa-xb) + (ya-yb)*(ya-yb));
}
void Reset()
void Reset() OVERRIDE
{
Berserk = false;
NetherInfusionTimer = 540000;
@@ -257,19 +257,19 @@ public:
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
HandleDoors(false);
SwitchToPortalPhase();
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
HandleDoors(true);
DestroyPortals();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -69,9 +69,9 @@ class boss_nightbane : public CreatureScript
public:
boss_nightbane() : CreatureScript("boss_nightbane") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_nightbaneAI (creature);
return new boss_nightbaneAI(creature);
}
struct boss_nightbaneAI : public ScriptedAI
@@ -109,7 +109,7 @@ public:
uint32 WaitTimer;
uint32 MovePhase;
void Reset()
void Reset() OVERRIDE
{
BellowingRoarTimer = 30000;
CharredEarthTimer = 15000;
@@ -160,7 +160,7 @@ public:
}
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (instance)
instance->SetData(TYPE_NIGHTBANE, IN_PROGRESS);
@@ -169,13 +169,13 @@ public:
Talk(YELL_AGGRO);
}
void AttackStart(Unit* who)
void AttackStart(Unit* who) OVERRIDE
{
if (!Intro && !Flying)
ScriptedAI::AttackStart(who);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
instance->SetData(TYPE_NIGHTBANE, DONE);
@@ -183,13 +183,14 @@ public:
HandleTerraceDoors(true);
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) OVERRIDE
{
if (!Intro && !Flying)
ScriptedAI::MoveInLineOfSight(who);
}
void MovementInform(uint32 type, uint32 id)
void MovementInform(uint32 type, uint32 id) OVERRIDE
{
if (type != POINT_MOTION_TYPE)
return;
@@ -235,7 +236,7 @@ public:
}
}
void JustSummoned(Creature* summoned)
void JustSummoned(Creature* summoned) OVERRIDE
{
summoned->AI()->AttackStart(me->GetVictim());
}
@@ -260,7 +261,7 @@ public:
Skeletons = false;
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
/* The timer for this was never setup apparently, not sure if the code works properly:
if (WaitTimer <= diff)
@@ -102,9 +102,9 @@ class netherspite_infernal : public CreatureScript
public:
netherspite_infernal() : CreatureScript("netherspite_infernal") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new netherspite_infernalAI (creature);
return new netherspite_infernalAI(creature);
}
struct netherspite_infernalAI : public ScriptedAI
@@ -117,11 +117,12 @@ public:
uint64 malchezaar;
InfernalPoint *point;
void Reset() {}
void EnterCombat(Unit* /*who*/) {}
void MoveInLineOfSight(Unit* /*who*/) {}
void Reset() OVERRIDE {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (HellfireTimer)
{
@@ -143,14 +144,14 @@ public:
}
}
void KilledUnit(Unit* who)
void KilledUnit(Unit* who) OVERRIDE
{
if (Unit* unit = Unit::GetUnit(*me, malchezaar))
if (Creature* creature = unit->ToCreature())
creature->AI()->KilledUnit(who);
}
void SpellHit(Unit* /*who*/, const SpellInfo* spell)
void SpellHit(Unit* /*who*/, const SpellInfo* spell) OVERRIDE
{
if (spell->Id == SPELL_INFERNAL_RELAY)
{
@@ -161,7 +162,7 @@ public:
}
}
void DamageTaken(Unit* done_by, uint32 &damage)
void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE
{
if (done_by->GetGUID() != malchezaar)
damage = 0;
@@ -176,9 +177,9 @@ class boss_malchezaar : public CreatureScript
public:
boss_malchezaar() : CreatureScript("boss_malchezaar") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_malchezaarAI (creature);
return new boss_malchezaarAI(creature);
}
struct boss_malchezaarAI : public ScriptedAI
@@ -210,7 +211,7 @@ public:
uint32 phase;
void Reset()
void Reset() OVERRIDE
{
AxesCleanup();
ClearWeapons();
@@ -242,12 +243,12 @@ public:
instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), true);
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
@@ -263,7 +264,7 @@ public:
instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), true);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
@@ -386,7 +387,7 @@ public:
Talk(SAY_SUMMON);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -84,9 +84,9 @@ class boss_shade_of_aran : public CreatureScript
public:
boss_shade_of_aran() : CreatureScript("boss_shade_of_aran") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_aranAI (creature);
return new boss_aranAI(creature);
}
struct boss_aranAI : public ScriptedAI
@@ -123,7 +123,7 @@ public:
bool Drinking;
bool DrinkInturrupted;
void Reset()
void Reset() OVERRIDE
{
SecondarySpellTimer = 5000;
NormalCastTimer = 0;
@@ -155,12 +155,12 @@ public:
}
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
@@ -171,7 +171,7 @@ public:
}
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
@@ -217,7 +217,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -478,13 +478,13 @@ public:
DoMeleeAttackIfReady();
}
void DamageTaken(Unit* /*pAttacker*/, uint32 &damage)
void DamageTaken(Unit* /*pAttacker*/, uint32 &damage) OVERRIDE
{
if (!DrinkInturrupted && Drinking && damage)
DrinkInturrupted = true;
}
void SpellHit(Unit* /*pAttacker*/, const SpellInfo* Spell)
void SpellHit(Unit* /*pAttacker*/, const SpellInfo* Spell) OVERRIDE
{
//We only care about interrupt effects and only if they are durring a spell currently being casted
if ((Spell->Effects[0].Effect != SPELL_EFFECT_INTERRUPT_CAST &&
@@ -513,9 +513,9 @@ class npc_aran_elemental : public CreatureScript
public:
npc_aran_elemental() : CreatureScript("npc_aran_elemental") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new water_elementalAI (creature);
return new water_elementalAI(creature);
}
struct water_elementalAI : public ScriptedAI
@@ -524,14 +524,14 @@ public:
uint32 CastTimer;
void Reset()
void Reset() OVERRIDE
{
CastTimer = 2000 + (rand()%3000);
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -34,8 +34,11 @@ enum TerestianIllhoof
SAY_DEATH = 2,
SAY_AGGRO = 3,
SAY_SACRIFICE = 4,
SAY_SUMMON = 5,
SAY_SUMMON = 5
};
enum Spells
{
SPELL_SUMMON_DEMONCHAINS = 30120, // Summons demonic chains that maintain the ritual of sacrifice.
SPELL_DEMON_CHAINS = 30206, // Instant - Visual Effect
SPELL_ENRAGE = 23537, // Increases the caster's attack speed by 50% and the Physical damage it deals by 219 to 281 for 10 min.
@@ -51,11 +54,14 @@ enum TerestianIllhoof
SPELL_FIREBOLT = 30050, // Blasts a target for 150 Fire damage.
SPELL_BROKEN_PACT = 30065, // All damage taken increased by 25%.
SPELL_AMPLIFY_FLAMES = 30053, // Increases the Fire damage taken by an enemy by 500 for 25 sec.
};
CREATURE_DEMONCHAINS = 17248,
CREATURE_FIENDISHIMP = 17267,
CREATURE_PORTAL = 17265,
CREATURE_KILREK = 17229,
enum Creatures
{
NPC_DEMONCHAINS = 17248,
NPC_FIENDISHIMP = 17267,
NPC_PORTAL = 17265,
NPC_KILREK = 17229
};
@@ -64,9 +70,9 @@ class npc_kilrek : public CreatureScript
public:
npc_kilrek() : CreatureScript("npc_kilrek") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_kilrekAI (creature);
return new npc_kilrekAI(creature);
}
struct npc_kilrekAI : public ScriptedAI
@@ -82,13 +88,13 @@ public:
uint32 AmplifyTimer;
void Reset()
void Reset() OVERRIDE
{
TerestianGUID = 0;
AmplifyTimer = 2000;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (!instance)
{
@@ -97,7 +103,7 @@ public:
}
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
{
@@ -111,7 +117,7 @@ public:
} else ERROR_INST_DATA(me);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
@@ -135,7 +141,7 @@ class npc_demon_chain : public CreatureScript
public:
npc_demon_chain() : CreatureScript("npc_demon_chain") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_demon_chainAI(creature);
}
@@ -146,16 +152,17 @@ public:
uint64 SacrificeGUID;
void Reset()
void Reset() OVERRIDE
{
SacrificeGUID = 0;
}
void EnterCombat(Unit* /*who*/) {}
void AttackStart(Unit* /*who*/) {}
void MoveInLineOfSight(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void AttackStart(Unit* /*who*/) OVERRIDE {}
void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
if (SacrificeGUID)
{
@@ -172,9 +179,9 @@ class npc_fiendish_portal : public CreatureScript
public:
npc_fiendish_portal() : CreatureScript("npc_fiendish_portal") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_fiendish_portalAI (creature);
return new npc_fiendish_portalAI(creature);
}
struct npc_fiendish_portalAI : public PassiveAI
@@ -183,12 +190,12 @@ public:
SummonList summons;
void Reset()
void Reset() OVERRIDE
{
DespawnAllImp();
}
void JustSummoned(Creature* summon)
void JustSummoned(Creature* summon) OVERRIDE
{
summons.Summon(summon);
DoZoneInCombat(summon);
@@ -201,16 +208,14 @@ public:
};
};
#define SPELL_FIREBOLT 30050 // Blasts a target for 181-209 Fire damage.
class npc_fiendish_imp : public CreatureScript
{
public:
npc_fiendish_imp() : CreatureScript("npc_fiendish_imp") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_fiendish_impAI (creature);
return new npc_fiendish_impAI(creature);
}
struct npc_fiendish_impAI : public ScriptedAI
@@ -219,16 +224,16 @@ public:
uint32 FireboltTimer;
void Reset()
void Reset() OVERRIDE
{
FireboltTimer = 2000;
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
@@ -250,9 +255,9 @@ class boss_terestian_illhoof : public CreatureScript
public:
boss_terestian_illhoof() : CreatureScript("boss_terestian_illhoof") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_terestianAI (creature);
return new boss_terestianAI(creature);
}
struct boss_terestianAI : public ScriptedAI
@@ -277,7 +282,7 @@ public:
bool SummonedPortals;
bool Berserk;
void Reset()
void Reset() OVERRIDE
{
for (uint8 i = 0; i < 2; ++i)
{
@@ -318,14 +323,14 @@ public:
else DoCast(me, SPELL_SUMMON_IMP, true);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
void JustSummoned(Creature* summoned)
void JustSummoned(Creature* summoned) OVERRIDE
{
if (summoned->GetEntry() == CREATURE_PORTAL)
if (summoned->GetEntry() == NPC_PORTAL)
{
PortalGUID[PortalsCount] = summoned->GetGUID();
++PortalsCount;
@@ -338,12 +343,12 @@ public:
}
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
for (uint8 i = 0; i < 2; ++i)
{
@@ -362,7 +367,7 @@ public:
instance->SetData(TYPE_TERESTIAN, DONE);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -375,7 +380,7 @@ public:
DoCast(target, SPELL_SACRIFICE, true);
DoCast(target, SPELL_SUMMON_DEMONCHAINS, true);
if (Creature* Chains = me->FindNearestCreature(CREATURE_DEMONCHAINS, 5000))
if (Creature* Chains = me->FindNearestCreature(NPC_DEMONCHAINS, 5000))
{
CAST_AI(npc_demon_chain::npc_demon_chainAI, Chains->AI())->SacrificeGUID = target->GetGUID();
Chains->CastSpell(Chains, SPELL_DEMON_CHAINS, true);
@@ -116,7 +116,7 @@ class boss_dorothee : public CreatureScript
public:
boss_dorothee() : CreatureScript("boss_dorothee") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_dorotheeAI(creature);
}
@@ -139,7 +139,7 @@ public:
bool SummonedTito;
bool TitoDied;
void Reset()
void Reset() OVERRIDE
{
AggroTimer = 500;
@@ -151,19 +151,19 @@ public:
TitoDied = false;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_DOROTHEE_AGGRO);
}
void JustReachedHome()
void JustReachedHome() OVERRIDE
{
me->DespawnOrUnsummon();
}
void SummonTito();
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DOROTHEE_DEATH);
@@ -171,7 +171,7 @@ public:
SummonCroneIfReady(instance, me);
}
void AttackStart(Unit* who)
void AttackStart(Unit* who) OVERRIDE
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -179,7 +179,8 @@ public:
ScriptedAI::AttackStart(who);
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) OVERRIDE
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -187,7 +188,7 @@ public:
ScriptedAI::MoveInLineOfSight(who);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (AggroTimer)
{
@@ -230,7 +231,7 @@ class npc_tito : public CreatureScript
public:
npc_tito() : CreatureScript("npc_tito") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_titoAI(creature);
}
@@ -242,15 +243,15 @@ public:
uint64 DorotheeGUID;
uint32 YipTimer;
void Reset()
void Reset() OVERRIDE
{
DorotheeGUID = 0;
YipTimer = 10000;
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
if (DorotheeGUID)
{
@@ -263,7 +264,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -296,7 +297,7 @@ class boss_strawman : public CreatureScript
public:
boss_strawman() : CreatureScript("boss_strawman") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_strawmanAI(creature);
}
@@ -314,14 +315,14 @@ public:
uint32 BrainBashTimer;
uint32 BrainWipeTimer;
void Reset()
void Reset() OVERRIDE
{
AggroTimer = 13000;
BrainBashTimer = 5000;
BrainWipeTimer = 7000;
}
void AttackStart(Unit* who)
void AttackStart(Unit* who) OVERRIDE
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -329,7 +330,8 @@ public:
ScriptedAI::AttackStart(who);
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) OVERRIDE
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -337,17 +339,17 @@ public:
ScriptedAI::MoveInLineOfSight(who);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_STRAWMAN_AGGRO);
}
void JustReachedHome()
void JustReachedHome() OVERRIDE
{
me->DespawnOrUnsummon();
}
void SpellHit(Unit* /*caster*/, const SpellInfo* Spell)
void SpellHit(Unit* /*caster*/, const SpellInfo* Spell) OVERRIDE
{
if ((Spell->SchoolMask == SPELL_SCHOOL_MASK_FIRE) && (!(rand()%10)))
{
@@ -360,7 +362,7 @@ public:
}
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_STRAWMAN_DEATH);
@@ -368,12 +370,12 @@ public:
SummonCroneIfReady(instance, me);
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_STRAWMAN_SLAY);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (AggroTimer)
{
@@ -410,7 +412,7 @@ class boss_tinhead : public CreatureScript
public:
boss_tinhead() : CreatureScript("boss_tinhead") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_tinheadAI(creature);
}
@@ -430,7 +432,7 @@ public:
uint8 RustCount;
void Reset()
void Reset() OVERRIDE
{
AggroTimer = 15000;
CleaveTimer = 5000;
@@ -439,17 +441,17 @@ public:
RustCount = 0;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_TINHEAD_AGGRO);
}
void JustReachedHome()
void JustReachedHome() OVERRIDE
{
me->DespawnOrUnsummon();
}
void AttackStart(Unit* who)
void AttackStart(Unit* who) OVERRIDE
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -457,7 +459,8 @@ public:
ScriptedAI::AttackStart(who);
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) OVERRIDE
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -465,7 +468,7 @@ public:
ScriptedAI::MoveInLineOfSight(who);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_TINHEAD_DEATH);
@@ -473,12 +476,12 @@ public:
SummonCroneIfReady(instance, me);
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_TINHEAD_SLAY);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (AggroTimer)
{
@@ -519,7 +522,7 @@ class boss_roar : public CreatureScript
public:
boss_roar() : CreatureScript("boss_roar") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_roarAI(creature);
}
@@ -538,7 +541,7 @@ public:
uint32 ShredTimer;
uint32 ScreamTimer;
void Reset()
void Reset() OVERRIDE
{
AggroTimer = 20000;
MangleTimer = 5000;
@@ -546,7 +549,8 @@ public:
ScreamTimer = 15000;
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) OVERRIDE
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -554,7 +558,7 @@ public:
ScriptedAI::MoveInLineOfSight(who);
}
void AttackStart(Unit* who)
void AttackStart(Unit* who) OVERRIDE
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -562,17 +566,17 @@ public:
ScriptedAI::AttackStart(who);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_ROAR_AGGRO);
}
void JustReachedHome()
void JustReachedHome() OVERRIDE
{
me->DespawnOrUnsummon();
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_ROAR_DEATH);
@@ -580,12 +584,12 @@ public:
SummonCroneIfReady(instance, me);
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_ROAR_SLAY);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (AggroTimer)
{
@@ -627,7 +631,7 @@ class boss_crone : public CreatureScript
public:
boss_crone() : CreatureScript("boss_crone") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_croneAI(creature);
}
@@ -644,30 +648,30 @@ public:
uint32 CycloneTimer;
uint32 ChainLightningTimer;
void Reset()
void Reset() OVERRIDE
{
CycloneTimer = 30000;
ChainLightningTimer = 10000;
}
void JustReachedHome()
void JustReachedHome() OVERRIDE
{
me->DespawnOrUnsummon();
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_CRONE_SLAY);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_CRONE_AGGRO);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_CRONE_DEATH);
@@ -682,7 +686,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -713,7 +717,7 @@ class npc_cyclone : public CreatureScript
public:
npc_cyclone() : CreatureScript("npc_cyclone") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_cycloneAI(creature);
}
@@ -724,18 +728,19 @@ public:
uint32 MoveTimer;
void Reset()
void Reset() OVERRIDE
{
MoveTimer = 1000;
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void MoveInLineOfSight(Unit* /*who*/) OVERRIDE
void MoveInLineOfSight(Unit* /*who*/)
{
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!me->HasAura(SPELL_KNOCKBACK))
DoCast(me, SPELL_KNOCKBACK, true);
@@ -778,7 +783,7 @@ class npc_grandmother : public CreatureScript
public:
npc_grandmother() : CreatureScript("npc_grandmother") { }
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF)
@@ -792,7 +797,7 @@ public:
return true;
}
bool OnGossipHello(Player* player, Creature* creature)
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_GRANDMA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
player->SEND_GOSSIP_MENU(8990, creature->GetGUID());
@@ -806,7 +811,7 @@ class boss_bigbadwolf : public CreatureScript
public:
boss_bigbadwolf() : CreatureScript("boss_bigbadwolf") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_bigbadwolfAI(creature);
}
@@ -829,7 +834,7 @@ public:
bool IsChasing;
void Reset()
void Reset() OVERRIDE
{
ChaseTimer = 30000;
FearTimer = urand(25000, 35000);
@@ -841,22 +846,22 @@ public:
IsChasing = false;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_WOLF_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_WOLF_SLAY);
}
void JustReachedHome()
void JustReachedHome() OVERRIDE
{
me->DespawnOrUnsummon();
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
DoPlaySoundToSet(me, SOUND_WOLF_DEATH);
@@ -871,7 +876,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -1008,7 +1013,7 @@ class boss_julianne : public CreatureScript
public:
boss_julianne() : CreatureScript("boss_julianne") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_julianneAI(creature);
}
@@ -1045,7 +1050,7 @@ public:
bool SummonedRomulo;
bool RomuloDead;
void Reset()
void Reset() OVERRIDE
{
RomuloGUID = 0;
Phase = PHASE_JULIANNE;
@@ -1068,9 +1073,9 @@ public:
RomuloDead = false;
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void AttackStart(Unit* who)
void AttackStart(Unit* who) OVERRIDE
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -1078,7 +1083,8 @@ public:
ScriptedAI::AttackStart(who);
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) OVERRIDE
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -1086,12 +1092,12 @@ public:
ScriptedAI::MoveInLineOfSight(who);
}
void JustReachedHome()
void JustReachedHome() OVERRIDE
{
me->DespawnOrUnsummon();
}
void SpellHit(Unit* /*caster*/, const SpellInfo* Spell)
void SpellHit(Unit* /*caster*/, const SpellInfo* Spell) OVERRIDE
{
if (Spell->Id == SPELL_DRINK_POISON)
{
@@ -1100,9 +1106,9 @@ public:
}
}
void DamageTaken(Unit* /*done_by*/, uint32 &damage);
void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE;
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_JULIANNE_DEATH02);
@@ -1116,12 +1122,12 @@ public:
}
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_JULIANNE_SLAY);
}
void UpdateAI(uint32 diff);
void UpdateAI(uint32 diff) OVERRIDE;
};
};
@@ -1130,7 +1136,7 @@ class boss_romulo : public CreatureScript
public:
boss_romulo() : CreatureScript("boss_romulo") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_romuloAI(creature);
}
@@ -1160,7 +1166,7 @@ public:
bool IsFakingDeath;
bool JulianneDead;
void Reset()
void Reset() OVERRIDE
{
JulianneGUID = 0;
Phase = PHASE_ROMULO;
@@ -1175,12 +1181,12 @@ public:
JulianneDead = false;
}
void JustReachedHome()
void JustReachedHome() OVERRIDE
{
me->DespawnOrUnsummon();
}
void DamageTaken(Unit* /*done_by*/, uint32 &damage)
void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE
{
if (damage < me->GetHealth())
return;
@@ -1234,7 +1240,7 @@ public:
TC_LOG_ERROR(LOG_FILTER_TSCR, "boss_romuloAI: DamageTaken reach end of code, that should not happen.");
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_ROMULO_AGGRO);
if (JulianneGUID)
@@ -1248,7 +1254,8 @@ public:
}
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) OVERRIDE
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -1256,7 +1263,7 @@ public:
ScriptedAI::MoveInLineOfSight(who);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_ROMULO_DEATH);
@@ -1271,12 +1278,12 @@ public:
}
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_ROMULO_SLAY);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim() || IsFakingDeath)
return;
@@ -49,7 +49,7 @@ class instance_karazhan : public InstanceMapScript
public:
instance_karazhan() : InstanceMapScript("instance_karazhan", 532) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
return new instance_karazhan_InstanceMapScript(map);
}
@@ -127,7 +127,7 @@ public:
}
}
void SetData(uint32 type, uint32 uiData)
void SetData(uint32 type, uint32 uiData) OVERRIDE
{
switch (type)
{
@@ -182,7 +182,7 @@ public:
}
}
void SetData64(uint32 identifier, uint64 data)
void SetData64(uint32 identifier, uint64 data) OVERRIDE
{
switch (identifier)
{
@@ -241,7 +241,7 @@ public:
return strSaveData;
}
uint32 GetData(uint32 uiData) const
uint32 GetData(uint32 uiData) const OVERRIDE
{
switch (uiData)
{
@@ -264,7 +264,7 @@ public:
return 0;
}
uint64 GetData64(uint32 uiData) const
uint64 GetData64(uint32 uiData) const OVERRIDE
{
switch (uiData)
{
@@ -36,6 +36,28 @@ EndContentData */
#include "ScriptedEscortAI.h"
#include "Player.h"
enum Spells
{
// Barnes
SPELL_SPOTLIGHT = 25824,
SPELL_TUXEDO = 32616,
// Berthold
SPELL_TELEPORT = 39567,
// Image of Medivh
SPELL_FIRE_BALL = 30967,
SPELL_UBER_FIREBALL = 30971,
SPELL_CONFLAGRATION_BLAST = 30977,
SPELL_MANA_SHIELD = 31635
};
enum Creatures
{
NPC_ARCANAGOS = 17652,
NPC_SPOTLIGHT = 19525
};
/*######
# npc_barnesAI
######*/
@@ -96,11 +118,6 @@ float Spawns[6][2]=
{17534, -10900}, // Julianne
};
#define CREATURE_SPOTLIGHT 19525
#define SPELL_SPOTLIGHT 25824
#define SPELL_TUXEDO 32616
#define SPAWN_Z 90.5f
#define SPAWN_Y -1758
#define SPAWN_O 4.738f
@@ -131,7 +148,7 @@ public:
bool PerformanceReady;
bool RaidWiped;
void Reset()
void Reset() OVERRIDE
{
m_uiSpotlightGUID = 0;
@@ -159,9 +176,9 @@ public:
Start(false, false);
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void WaypointReached(uint32 waypointId)
void WaypointReached(uint32 waypointId) OVERRIDE
{
if (!instance)
return;
@@ -176,13 +193,13 @@ public:
TalkCount = 0;
SetEscortPaused(true);
if (Creature* pSpotlight = me->SummonCreature(CREATURE_SPOTLIGHT,
if (Creature* spotlight = me->SummonCreature(NPC_SPOTLIGHT,
me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0.0f,
TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000))
{
pSpotlight->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
pSpotlight->CastSpell(pSpotlight, SPELL_SPOTLIGHT, false);
m_uiSpotlightGUID = pSpotlight->GetGUID();
spotlight->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
spotlight->CastSpell(spotlight, SPELL_SPOTLIGHT, false);
m_uiSpotlightGUID = spotlight->GetGUID();
}
break;
case 8:
@@ -266,7 +283,7 @@ public:
RaidWiped = false;
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
npc_escortAI::UpdateAI(diff);
@@ -326,7 +343,7 @@ public:
}
};
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
npc_barnesAI* pBarnesAI = CAST_AI(npc_barnes::npc_barnesAI, creature->AI());
@@ -361,7 +378,7 @@ public:
return true;
}
bool OnGossipHello(Player* player, Creature* creature)
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (InstanceScript* instance = creature->GetInstanceScript())
{
@@ -393,7 +410,7 @@ public:
return true;
}
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_barnesAI(creature);
}
@@ -403,11 +420,6 @@ public:
# npc_berthold
####*/
enum eBerthold
{
SPELL_TELEPORT = 39567
};
#define GOSSIP_ITEM_TELEPORT "Teleport me to the Guardian's Library"
class npc_berthold : public CreatureScript
@@ -415,7 +427,7 @@ class npc_berthold : public CreatureScript
public:
npc_berthold() : CreatureScript("npc_berthold") { }
bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action)
bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF + 1)
@@ -425,7 +437,7 @@ public:
return true;
}
bool OnGossipHello(Player* player, Creature* creature)
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (InstanceScript* instance = creature->GetInstanceScript())
{
@@ -453,11 +465,6 @@ public:
#define SAY_DIALOG_ARCANAGOS_8 "What have you done, wizard? This cannot be! I'm burning from... within!"
#define SAY_DIALOG_MEDIVH_9 "He should not have angered me. I must go... recover my strength now..."
#define NPC_ARCANAGOS 17652
#define SPELL_FIRE_BALL 30967
#define SPELL_UBER_FIREBALL 30971
#define SPELL_CONFLAGRATION_BLAST 30977
#define SPELL_MANA_SHIELD 31635
static float MedivPos[4] = {-11161.49f, -1902.24f, 91.48f, 1.94f};
static float ArcanagosPos[4] = {-11169.75f, -1881.48f, 95.39f, 4.83f};
@@ -467,7 +474,7 @@ class npc_image_of_medivh : public CreatureScript
public:
npc_image_of_medivh() : CreatureScript("npc_image_of_medivh") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_image_of_medivhAI(creature);
}
@@ -490,7 +497,7 @@ public:
bool EventStarted;
void Reset()
void Reset() OVERRIDE
{
ArcanagosGUID = 0;
@@ -505,9 +512,9 @@ public:
me->RemoveCorpse();
}
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void MovementInform(uint32 type, uint32 id)
void MovementInform(uint32 type, uint32 id) OVERRIDE
{
if (type != POINT_MOTION_TYPE)
return;
@@ -613,7 +620,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (YellTimer <= diff)
{
@@ -19,7 +19,7 @@
#ifndef DEF_KARAZHAN_H
#define DEF_KARAZHAN_H
enum eEnums
enum DataTypes
{
TYPE_ATTUMEN = 1,
TYPE_MOROES = 2,
@@ -94,7 +94,7 @@ class boss_felblood_kaelthas : public CreatureScript
public:
boss_felblood_kaelthas() : CreatureScript("boss_felblood_kaelthas") { }
CreatureAI* GetAI(Creature* c) const
CreatureAI* GetAI(Creature* c) const OVERRIDE
{
return new boss_felblood_kaelthasAI(c);
}
@@ -132,7 +132,7 @@ public:
// 1 = Fireball; Summon Phoenix; Flamestrike
// 2 = Gravity Lapses
void Reset()
void Reset() OVERRIDE
{
/// @todo Timers
FireballTimer = 0;
@@ -154,7 +154,7 @@ public:
instance->SetData(DATA_KAELTHAS_EVENT, NOT_STARTED);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
@@ -168,13 +168,13 @@ public:
escapeOrb->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
}
void DamageTaken(Unit* /*done_by*/, uint32 &damage)
void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE
{
if (damage > me->GetHealth())
RemoveGravityLapse(); // Remove Gravity Lapse so that players fall to ground if they kill him when in air.
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (!instance)
return;
@@ -182,7 +182,8 @@ public:
instance->SetData(DATA_KAELTHAS_EVENT, IN_PROGRESS);
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) OVERRIDE
{
if (!HasTaunted && me->IsWithinDistInMap(who, 40.0f))
{
@@ -280,7 +281,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
@@ -437,7 +438,7 @@ class npc_felkael_flamestrike : public CreatureScript
public:
npc_felkael_flamestrike() : CreatureScript("npc_felkael_flamestrike") { }
CreatureAI* GetAI(Creature* c) const
CreatureAI* GetAI(Creature* c) const OVERRIDE
{
return new npc_felkael_flamestrikeAI(c);
}
@@ -450,7 +451,7 @@ public:
uint32 FlameStrikeTimer;
void Reset()
void Reset() OVERRIDE
{
FlameStrikeTimer = 5000;
@@ -460,9 +461,10 @@ public:
DoCast(me, SPELL_FLAMESTRIKE2, true);
}
void EnterCombat(Unit* /*who*/) {}
void MoveInLineOfSight(Unit* /*who*/) {}
void UpdateAI(uint32 diff)
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
void UpdateAI(uint32 diff) OVERRIDE
{
if (FlameStrikeTimer <= diff)
{
@@ -478,7 +480,7 @@ class npc_felkael_phoenix : public CreatureScript
public:
npc_felkael_phoenix() : CreatureScript("npc_felkael_phoenix") { }
CreatureAI* GetAI(Creature* c) const
CreatureAI* GetAI(Creature* c) const OVERRIDE
{
return new npc_felkael_phoenixAI(c);
}
@@ -496,7 +498,7 @@ public:
bool Rebirth;
bool FakeDeath;
void Reset()
void Reset() OVERRIDE
{
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE);
me->SetDisableGravity(true);
@@ -507,9 +509,9 @@ public:
FakeDeath = false;
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void DamageTaken(Unit* /*killer*/, uint32 &damage)
void DamageTaken(Unit* /*killer*/, uint32 &damage) OVERRIDE
{
if (damage < me->GetHealth())
return;
@@ -543,12 +545,12 @@ public:
}
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
me->SummonCreature(CREATURE_PHOENIX_EGG, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
//If we are fake death, we cast revbirth and after that we kill the phoenix to spawn the egg.
if (FakeDeath)
@@ -591,7 +593,7 @@ class npc_felkael_phoenix_egg : public CreatureScript
public:
npc_felkael_phoenix_egg() : CreatureScript("npc_felkael_phoenix_egg") { }
CreatureAI* GetAI(Creature* c) const
CreatureAI* GetAI(Creature* c) const OVERRIDE
{
return new npc_felkael_phoenix_eggAI(c);
}
@@ -602,15 +604,16 @@ public:
uint32 HatchTimer;
void Reset()
void Reset() OVERRIDE
{
HatchTimer = 10000;
}
void EnterCombat(Unit* /*who*/) {}
void MoveInLineOfSight(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (HatchTimer <= diff)
{
@@ -626,7 +629,7 @@ class npc_arcane_sphere : public CreatureScript
public:
npc_arcane_sphere() : CreatureScript("npc_arcane_sphere") { }
CreatureAI* GetAI(Creature* c) const
CreatureAI* GetAI(Creature* c) const OVERRIDE
{
return new npc_arcane_sphereAI(c);
}
@@ -638,7 +641,7 @@ public:
uint32 DespawnTimer;
uint32 ChangeTargetTimer;
void Reset()
void Reset() OVERRIDE
{
DespawnTimer = 30000;
ChangeTargetTimer = urand(6000, 12000);
@@ -649,9 +652,9 @@ public:
DoCast(me, SPELL_ARCANE_SPHERE_PASSIVE, true);
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (DespawnTimer <= diff)
me->Kill(me);
@@ -49,19 +49,34 @@ static Speech PlayerDeath[]=
{9},
};
enum eEnums
enum Yells
{
SAY_AGGRO = 0,
SAY_DEATH = 10,
};
SPELL_DISPEL_MAGIC = 27609,
SPELL_FLASH_HEAL = 17843,
SPELL_SW_PAIN_NORMAL = 14032,
SPELL_SW_PAIN_HEROIC = 15654,
SPELL_SHIELD = 44291,
SPELL_RENEW_NORMAL = 44174,
SPELL_RENEW_HEROIC = 46192,
enum Spells
{
SPELL_DISPEL_MAGIC = 27609,
SPELL_FLASH_HEAL = 17843,
SPELL_SW_PAIN_NORMAL = 14032,
SPELL_SW_PAIN_HEROIC = 15654,
SPELL_SHIELD = 44291,
SPELL_RENEW_NORMAL = 44174,
SPELL_RENEW_HEROIC = 46192,
// Apoko
SPELL_WINDFURY_TOTEM = 27621,
SPELL_WAR_STOMP = 46026,
SPELL_PURGE = 27626,
SPELL_LESSER_HEALING_WAVE = 44256,
SPELL_FROST_SHOCK = 21401,
SPELL_FIRE_NOVA_TOTEM = 44257,
SPELL_EARTHBIND_TOTEM = 15786
};
enum Misc
{
MAX_ACTIVE_LACKEY = 4
};
@@ -93,7 +108,7 @@ class boss_priestess_delrissa : public CreatureScript
public:
boss_priestess_delrissa() : CreatureScript("boss_priestess_delrissa") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_priestess_delrissaAI(creature);
}
@@ -121,7 +136,7 @@ public:
uint32 DispelTimer;
uint32 ResetTimer;
void Reset()
void Reset() OVERRIDE
{
PlayersKilled = 0;
@@ -136,13 +151,13 @@ public:
}
//this mean she at some point evaded
void JustReachedHome()
void JustReachedHome() OVERRIDE
{
if (instance)
instance->SetData(DATA_DELRISSA_EVENT, FAIL);
}
void EnterCombat(Unit* who)
void EnterCombat(Unit* who) OVERRIDE
{
Talk(SAY_AGGRO);
@@ -211,7 +226,7 @@ public:
}
}
void KilledUnit(Unit* victim)
void KilledUnit(Unit* victim) OVERRIDE
{
if (victim->GetTypeId() != TYPEID_PLAYER)
return;
@@ -222,7 +237,7 @@ public:
++PlayersKilled;
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
@@ -238,7 +253,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -333,7 +348,7 @@ public:
};
};
enum eHealingPotion
enum HealingPotion
{
SPELL_HEALING_POTION = 15503
};
@@ -355,7 +370,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
bool UsedPotion;
void Reset()
void Reset() OVERRIDE
{
UsedPotion = false;
@@ -373,7 +388,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
}
}
void EnterCombat(Unit* who)
void EnterCombat(Unit* who) OVERRIDE
{
if (!who)
return;
@@ -403,7 +418,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
}
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
if (!instance)
return;
@@ -435,7 +450,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
}
}
void KilledUnit(Unit* victim)
void KilledUnit(Unit* victim) OVERRIDE
{
if (!instance)
return;
@@ -456,7 +471,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UsedPotion && HealthBelowPct(25))
{
@@ -472,7 +487,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
}
};
enum eRogueSpells
enum RogueSpells
{
SPELL_KIDNEY_SHOT = 27615,
SPELL_GOUGE = 12540,
@@ -487,7 +502,7 @@ class boss_kagani_nightstrike : public CreatureScript
public:
boss_kagani_nightstrike() : CreatureScript("boss_kagani_nightstrike") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_kagani_nightstrikeAI(creature);
}
@@ -504,7 +519,7 @@ public:
uint32 Wait_Timer;
bool InVanish;
void Reset()
void Reset() OVERRIDE
{
Gouge_Timer = 5500;
Kick_Timer = 7000;
@@ -517,7 +532,7 @@ public:
boss_priestess_lackey_commonAI::Reset();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -575,7 +590,7 @@ public:
};
};
enum eWarlockSpells
enum WarlockSpells
{
SPELL_IMMOLATE = 44267,
SPELL_SHADOW_BOLT = 12471,
@@ -591,7 +606,7 @@ class boss_ellris_duskhallow : public CreatureScript
public:
boss_ellris_duskhallow() : CreatureScript("boss_ellris_duskhallow") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_ellris_duskhallowAI(creature);
}
@@ -607,7 +622,7 @@ public:
uint32 Curse_of_Agony_Timer;
uint32 Fear_Timer;
void Reset()
void Reset() OVERRIDE
{
Immolate_Timer = 6000;
Shadow_Bolt_Timer = 3000;
@@ -618,12 +633,12 @@ public:
boss_priestess_lackey_commonAI::Reset();
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
DoCast(me, SPELL_SUMMON_IMP);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -671,7 +686,7 @@ public:
};
};
enum eKickDown
enum KickDown
{
SPELL_KNOCKDOWN = 11428,
SPELL_SNAP_KICK = 46182
@@ -682,7 +697,7 @@ class boss_eramas_brightblaze : public CreatureScript
public:
boss_eramas_brightblaze() : CreatureScript("boss_eramas_brightblaze") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_eramas_brightblazeAI(creature);
}
@@ -695,7 +710,7 @@ public:
uint32 Knockdown_Timer;
uint32 Snap_Kick_Timer;
void Reset()
void Reset() OVERRIDE
{
Knockdown_Timer = 6000;
Snap_Kick_Timer = 4500;
@@ -703,7 +718,7 @@ public:
boss_priestess_lackey_commonAI::Reset();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -727,7 +742,7 @@ public:
};
};
enum eMageSpells
enum MageSpells
{
SPELL_POLYMORPH = 13323,
SPELL_ICE_BLOCK = 27619,
@@ -743,7 +758,7 @@ class boss_yazzai : public CreatureScript
public:
boss_yazzai() : CreatureScript("boss_yazzai") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_yazzaiAI(creature);
}
@@ -764,7 +779,7 @@ public:
uint32 Frostbolt_Timer;
uint32 Blink_Timer;
void Reset()
void Reset() OVERRIDE
{
HasIceBlocked = false;
@@ -780,7 +795,7 @@ public:
boss_priestess_lackey_commonAI::Reset();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -857,7 +872,7 @@ public:
};
};
enum eWarriorSpells
enum WarriorSpells
{
SPELL_INTERCEPT_STUN = 27577,
SPELL_DISARM = 27581,
@@ -873,7 +888,7 @@ class boss_warlord_salaris : public CreatureScript
public:
boss_warlord_salaris() : CreatureScript("boss_warlord_salaris") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_warlord_salarisAI(creature);
}
@@ -890,7 +905,7 @@ public:
uint32 Hamstring_Timer;
uint32 Mortal_Strike_Timer;
void Reset()
void Reset() OVERRIDE
{
Intercept_Stun_Timer = 500;
Disarm_Timer = 6000;
@@ -902,12 +917,12 @@ public:
boss_priestess_lackey_commonAI::Reset();
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
DoCast(me, SPELL_BATTLE_SHOUT);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -976,7 +991,7 @@ public:
};
};
enum eHunterSpells
enum HunterSpells
{
SPELL_AIMED_SHOT = 44271,
SPELL_SHOOT = 15620,
@@ -993,7 +1008,7 @@ class boss_garaxxas : public CreatureScript
public:
boss_garaxxas() : CreatureScript("boss_garaxxas") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_garaxxasAI(creature);
}
@@ -1015,7 +1030,7 @@ public:
uint32 Wing_Clip_Timer;
uint32 Freezing_Trap_Timer;
void Reset()
void Reset() OVERRIDE
{
Aimed_Shot_Timer = 6000;
Shoot_Timer = 2500;
@@ -1031,12 +1046,12 @@ public:
boss_priestess_lackey_commonAI::Reset();
}
void JustSummoned(Creature* summoned)
void JustSummoned(Creature* summoned) OVERRIDE
{
m_uiPetGUID = summoned->GetGUID();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -1099,23 +1114,12 @@ public:
};
};
enum Spells
{
SPELL_WINDFURY_TOTEM = 27621,
SPELL_WAR_STOMP = 46026,
SPELL_PURGE = 27626,
SPELL_LESSER_HEALING_WAVE = 44256,
SPELL_FROST_SHOCK = 21401,
SPELL_FIRE_NOVA_TOTEM = 44257,
SPELL_EARTHBIND_TOTEM = 15786
};
class boss_apoko : public CreatureScript
{
public:
boss_apoko() : CreatureScript("boss_apoko") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_apokoAI(creature);
}
@@ -1132,7 +1136,7 @@ public:
uint32 Healing_Wave_Timer;
uint32 Frost_Shock_Timer;
void Reset()
void Reset() OVERRIDE
{
Totem_Timer = 2000;
Totem_Amount = 1;
@@ -1144,7 +1148,7 @@ public:
boss_priestess_lackey_commonAI::Reset();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -1198,7 +1202,7 @@ public:
};
};
enum eEngineerSpells
enum EngineerSpells
{
SPELL_GOBLIN_DRAGON_GUN = 44272,
SPELL_ROCKET_LAUNCH = 44137,
@@ -1213,7 +1217,7 @@ class boss_zelfan : public CreatureScript
public:
boss_zelfan() : CreatureScript("boss_zelfan") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_zelfanAI(creature);
}
@@ -1229,7 +1233,7 @@ public:
uint32 High_Explosive_Sheep_Timer;
uint32 Fel_Iron_Bomb_Timer;
void Reset()
void Reset() OVERRIDE
{
Goblin_Dragon_Gun_Timer = 20000;
Rocket_Launch_Timer = 7000;
@@ -1240,7 +1244,7 @@ public:
boss_priestess_lackey_commonAI::Reset();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -1298,9 +1302,9 @@ class npc_high_explosive_sheep : public CreatureScript
public:
npc_high_explosive_sheep() : CreatureScript("npc_high_explosive_sheep") { }
//CreatureAI* GetAI(Creature* creature) const
//CreatureAI* GetAI(Creature* creature) const OVERRIDE
//{
// return new npc_high_explosive_sheepAI (creature);
// return new npc_high_explosive_sheepAI(creature);
//};
};
*/
@@ -64,9 +64,9 @@ class boss_selin_fireheart : public CreatureScript
public:
boss_selin_fireheart() : CreatureScript("boss_selin_fireheart") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_selin_fireheartAI (creature);
return new boss_selin_fireheartAI(creature);
};
struct boss_selin_fireheartAI : public ScriptedAI
@@ -105,7 +105,7 @@ public:
uint64 CrystalGUID; // This will help us create a pointer to the crystal we are draining. We store GUIDs, never units in case unit is deleted/offline (offline if player of course).
void Reset()
void Reset() OVERRIDE
{
if (instance)
{
@@ -197,19 +197,19 @@ public:
}
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_SELIN_EVENT, IN_PROGRESS);
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_KILL);
}
void MovementInform(uint32 type, uint32 id)
void MovementInform(uint32 type, uint32 id) OVERRIDE
{
if (type == POINT_MOTION_TYPE && id == 1)
{
@@ -231,7 +231,7 @@ public:
}
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
@@ -242,7 +242,7 @@ public:
ShatterRemainingCrystals();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -325,22 +325,23 @@ class npc_fel_crystal : public CreatureScript
public:
npc_fel_crystal() : CreatureScript("npc_fel_crystal") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_fel_crystalAI (creature);
return new npc_fel_crystalAI(creature);
};
struct npc_fel_crystalAI : public ScriptedAI
{
npc_fel_crystalAI(Creature* creature) : ScriptedAI(creature) {}
void Reset() {}
void EnterCombat(Unit* /*who*/) {}
void AttackStart(Unit* /*who*/) {}
void MoveInLineOfSight(Unit* /*who*/) {}
void UpdateAI(uint32 /*diff*/) {}
void Reset() OVERRIDE {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void AttackStart(Unit* /*who*/) OVERRIDE {}
void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
void JustDied(Unit* /*killer*/)
void UpdateAI(uint32 /*diff*/) OVERRIDE {}
void JustDied(Unit* /*killer*/) OVERRIDE
{
if (InstanceScript* instance = me->GetInstanceScript())
{
@@ -27,35 +27,44 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "magisters_terrace.h"
enum eEnums
enum Yells
{
SAY_AGGRO = 0,
SAY_ENERGY = 1,
SAY_OVERLOAD = 2,
SAY_KILL = 3,
EMOTE_DISCHARGE_ENERGY = 4,
EMOTE_DISCHARGE_ENERGY = 4
//is this text for real?
//#define SAY_DEATH "What...happen...ed."
};
//Pure energy spell info
enum Spells
{
// Pure energy spell info
SPELL_ENERGY_BOLT = 46156,
SPELL_ENERGY_FEEDBACK = 44335,
//Vexallus spell info
// Vexallus spell info
SPELL_CHAIN_LIGHTNING = 44318,
SPELL_H_CHAIN_LIGHTNING = 46380, //heroic spell
SPELL_H_CHAIN_LIGHTNING = 46380, // heroic spell
SPELL_OVERLOAD = 44353,
SPELL_ARCANE_SHOCK = 44319,
SPELL_H_ARCANE_SHOCK = 46381, //heroic spell
SPELL_H_ARCANE_SHOCK = 46381, // heroic spell
SPELL_SUMMON_PURE_ENERGY = 44322, //mod scale -10
H_SPELL_SUMMON_PURE_ENERGY1 = 46154, //mod scale -5
H_SPELL_SUMMON_PURE_ENERGY2 = 46159, //mod scale -5
SPELL_SUMMON_PURE_ENERGY = 44322, // mod scale -10
H_SPELL_SUMMON_PURE_ENERGY1 = 46154, // mod scale -5
H_SPELL_SUMMON_PURE_ENERGY2 = 46159 // mod scale -5
//Creatures
};
enum Creatures
{
NPC_PURE_ENERGY = 24745,
};
enum Misc
{
INTERVAL_MODIFIER = 15,
INTERVAL_SWITCH = 6
};
@@ -65,9 +74,9 @@ class boss_vexallus : public CreatureScript
public:
boss_vexallus() : CreatureScript("boss_vexallus") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_vexallusAI (creature);
return new boss_vexallusAI(creature);
};
struct boss_vexallusAI : public BossAI
@@ -85,7 +94,7 @@ public:
uint32 IntervalHealthAmount;
bool Enraged;
void Reset()
void Reset() OVERRIDE
{
summons.DespawnAll();
ChainLightningTimer = 8000;
@@ -98,19 +107,19 @@ public:
instance->SetData(DATA_VEXALLUS_EVENT, NOT_STARTED);
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
summons.DespawnAll();
if (instance)
instance->SetData(DATA_VEXALLUS_EVENT, DONE);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
@@ -118,7 +127,7 @@ public:
instance->SetData(DATA_VEXALLUS_EVENT, IN_PROGRESS);
}
void JustSummoned(Creature* summoned)
void JustSummoned(Creature* summoned) OVERRIDE
{
if (Unit* temp = SelectTarget(SELECT_TARGET_RANDOM, 0))
summoned->GetMotionMaster()->MoveFollow(temp, 0, 0);
@@ -127,7 +136,7 @@ public:
summoned->CastSpell(summoned, SPELL_ENERGY_BOLT, false, 0, 0, me->GetGUID());
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -201,9 +210,9 @@ class npc_pure_energy : public CreatureScript
public:
npc_pure_energy() : CreatureScript("npc_pure_energy") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_pure_energyAI (creature);
return new npc_pure_energyAI(creature);
};
struct npc_pure_energyAI : public ScriptedAI
@@ -213,9 +222,9 @@ public:
me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
}
void Reset() {}
void Reset() OVERRIDE {}
void JustDied(Unit* slayer)
void JustDied(Unit* slayer) OVERRIDE
{
if (Unit* temp = me->GetOwner())
{
@@ -224,9 +233,10 @@ public:
}
}
void EnterCombat(Unit* /*who*/) {}
void MoveInLineOfSight(Unit* /*who*/) {}
void AttackStart(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
void AttackStart(Unit* /*who*/) OVERRIDE {}
};
};
@@ -37,11 +37,19 @@ EndContentData */
## npc_kalecgos
######*/
enum eEnums
enum Spells
{
SPELL_TRANSFORM_TO_KAEL = 44670,
SPELL_ORB_KILL_CREDIT = 46307,
NPC_KAEL = 24848, //human form entry
SPELL_ORB_KILL_CREDIT = 46307
};
enum Creatures
{
NPC_KAEL = 24848 //human form entry
};
enum Misc
{
POINT_ID_LAND = 1
};
@@ -60,7 +68,7 @@ class npc_kalecgos : public CreatureScript
public:
npc_kalecgos() : CreatureScript("npc_kalecgos") { }
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)
@@ -89,7 +97,7 @@ public:
return true;
}
bool OnGossipHello(Player* player, Creature* creature)
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -100,7 +108,7 @@ public:
return true;
}
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_kalecgosAI(creature);
}
@@ -111,7 +119,7 @@ public:
uint32 m_uiTransformTimer;
void Reset()
void Reset() OVERRIDE
{
m_uiTransformTimer = 0;
@@ -120,7 +128,7 @@ public:
me->GetMotionMaster()->MovePoint(POINT_ID_LAND, afKaelLandPoint[0], afKaelLandPoint[1], afKaelLandPoint[2]);
}
void MovementInform(uint32 uiType, uint32 uiPointId)
void MovementInform(uint32 uiType, uint32 uiPointId) OVERRIDE
{
if (uiType != POINT_MOTION_TYPE)
return;
@@ -154,7 +162,7 @@ public:
}
}
void UpdateAI(uint32 uiDiff)
void UpdateAI(uint32 uiDiff) OVERRIDE
{
if (m_uiTransformTimer)
{
@@ -59,7 +59,7 @@ class boss_baron_geddon : public CreatureScript
{
}
void EnterCombat(Unit* victim)
void EnterCombat(Unit* victim) OVERRIDE
{
BossAI::EnterCombat(victim);
events.ScheduleEvent(EVENT_INFERNO, 45000);
@@ -67,7 +67,7 @@ class boss_baron_geddon : public CreatureScript
events.ScheduleEvent(EVENT_LIVING_BOMB, 35000);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -113,9 +113,9 @@ class boss_baron_geddon : public CreatureScript
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_baron_geddonAI (creature);
return new boss_baron_geddonAI(creature);
}
};
@@ -57,14 +57,14 @@ class boss_garr : public CreatureScript
{
}
void EnterCombat(Unit* victim)
void EnterCombat(Unit* victim) OVERRIDE
{
BossAI::EnterCombat(victim);
events.ScheduleEvent(EVENT_ANTIMAGIC_PULSE, 25000);
events.ScheduleEvent(EVENT_MAGMA_SHACKLES, 15000);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -95,7 +95,7 @@ class boss_garr : public CreatureScript
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_garrAI(creature);
}
@@ -112,12 +112,12 @@ class npc_firesworn : public CreatureScript
uint32 immolateTimer;
void Reset()
void Reset() OVERRIDE
{
immolateTimer = 4000; //These times are probably wrong
}
void DamageTaken(Unit* /*attacker*/, uint32& damage)
void DamageTaken(Unit* /*attacker*/, uint32& damage) OVERRIDE
{
uint32 const health10pct = me->CountPctFromMaxHealth(10);
uint32 health = me->GetHealth();
@@ -129,7 +129,7 @@ class npc_firesworn : public CreatureScript
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -147,7 +147,7 @@ class npc_firesworn : public CreatureScript
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_fireswornAI(creature);
}
@@ -53,7 +53,7 @@ class boss_gehennas : public CreatureScript
{
}
void EnterCombat(Unit* victim)
void EnterCombat(Unit* victim) OVERRIDE
{
BossAI::EnterCombat(victim);
events.ScheduleEvent(EVENT_GEHENNAS_CURSE, 12000);
@@ -61,7 +61,7 @@ class boss_gehennas : public CreatureScript
events.ScheduleEvent(EVENT_SHADOW_BOLT, 6000);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -98,7 +98,7 @@ class boss_gehennas : public CreatureScript
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_gehennasAI(creature);
}
@@ -63,19 +63,19 @@ class boss_golemagg : public CreatureScript
{
}
void Reset()
void Reset() OVERRIDE
{
BossAI::Reset();
DoCast(me, SPELL_MAGMASPLASH, true);
}
void EnterCombat(Unit* victim)
void EnterCombat(Unit* victim) OVERRIDE
{
BossAI::EnterCombat(victim);
events.ScheduleEvent(EVENT_PYROBLAST, 7000);
}
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/)
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) OVERRIDE
{
if (!HealthBelowPct(10) || me->HasAura(SPELL_ENRAGE))
return;
@@ -84,7 +84,7 @@ class boss_golemagg : public CreatureScript
events.ScheduleEvent(EVENT_EARTHQUAKE, 3000);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -116,7 +116,7 @@ class boss_golemagg : public CreatureScript
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_golemaggAI(creature);
}
@@ -134,12 +134,12 @@ class npc_core_rager : public CreatureScript
instance = creature->GetInstanceScript();
}
void Reset()
void Reset() OVERRIDE
{
mangleTimer = 7*IN_MILLISECONDS; // These times are probably wrong
}
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/)
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) OVERRIDE
{
if (HealthAbovePct(50) || !instance)
return;
@@ -155,7 +155,7 @@ class npc_core_rager : public CreatureScript
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -177,7 +177,7 @@ class npc_core_rager : public CreatureScript
uint32 mangleTimer;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_core_ragerAI(creature);
}
@@ -53,7 +53,7 @@ class boss_lucifron : public CreatureScript
{
}
void EnterCombat(Unit* victim)
void EnterCombat(Unit* victim) OVERRIDE
{
BossAI::EnterCombat(victim);
events.ScheduleEvent(EVENT_IMPENDING_DOOM, 10000);
@@ -61,7 +61,7 @@ class boss_lucifron : public CreatureScript
events.ScheduleEvent(EVENT_SHADOW_SHOCK, 6000);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -96,7 +96,7 @@ class boss_lucifron : public CreatureScript
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_lucifronAI(creature);
}
@@ -59,13 +59,13 @@ class boss_magmadar : public CreatureScript
{
}
void Reset()
void Reset() OVERRIDE
{
BossAI::Reset();
DoCast(me, SPELL_MAGMA_SPIT, true);
}
void EnterCombat(Unit* victim)
void EnterCombat(Unit* victim) OVERRIDE
{
BossAI::EnterCombat(victim);
events.ScheduleEvent(EVENT_FRENZY, 30000);
@@ -73,7 +73,7 @@ class boss_magmadar : public CreatureScript
events.ScheduleEvent(EVENT_LAVA_BOMB, 12000);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -110,7 +110,7 @@ class boss_magmadar : public CreatureScript
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_magmadarAI(creature);
}
@@ -78,13 +78,13 @@ class boss_majordomo : public CreatureScript
{
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
if (urand(0, 99) < 25)
Talk(SAY_SLAY);
}
void EnterCombat(Unit* who)
void EnterCombat(Unit* who) OVERRIDE
{
BossAI::EnterCombat(who);
Talk(SAY_AGGRO);
@@ -94,7 +94,7 @@ class boss_majordomo : public CreatureScript
events.ScheduleEvent(EVENT_TELEPORT, 20000);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (instance && instance->GetBossState(BOSS_MAJORDOMO_EXECUTUS) != DONE)
{
@@ -174,7 +174,7 @@ class boss_majordomo : public CreatureScript
}
}
void DoAction(int32 action)
void DoAction(int32 action) OVERRIDE
{
if (action == ACTION_START_RAGNAROS)
{
@@ -191,21 +191,21 @@ class boss_majordomo : public CreatureScript
}
};
bool OnGossipHello(Player* player, Creature* creature)
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(GOSSIP_HELLO, creature->GetGUID());
return true;
}
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 /*action*/)
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 /*action*/) OVERRIDE
{
player->CLOSE_GOSSIP_MENU();
creature->AI()->DoAction(ACTION_START_RAGNAROS);
return true;
}
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_majordomoAI(creature);
}
@@ -87,7 +87,7 @@ class boss_ragnaros : public CreatureScript
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
void Reset()
void Reset() OVERRIDE
{
BossAI::Reset();
_emergeTimer = 90000;
@@ -97,7 +97,7 @@ class boss_ragnaros : public CreatureScript
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
}
void EnterCombat(Unit* victim)
void EnterCombat(Unit* victim) OVERRIDE
{
BossAI::EnterCombat(victim);
events.ScheduleEvent(EVENT_ERUPTION, 15000);
@@ -109,13 +109,13 @@ class boss_ragnaros : public CreatureScript
events.ScheduleEvent(EVENT_SUBMERGE, 180000);
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
if (urand(0, 99) < 25)
Talk(SAY_KILL);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (_introState != 2)
{
@@ -304,7 +304,7 @@ class boss_ragnaros : public CreatureScript
bool _isBanished;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_ragnarosAI(creature);
}
@@ -322,13 +322,13 @@ class npc_son_of_flame : public CreatureScript
instance = me->GetInstanceScript();
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_RAGNAROS_ADDS, 1);
}
void UpdateAI(uint32 /*diff*/)
void UpdateAI(uint32 /*diff*/) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -340,7 +340,7 @@ class npc_son_of_flame : public CreatureScript
InstanceScript* instance;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_son_of_flameAI(creature);
}
@@ -56,7 +56,7 @@ class boss_shazzrah : public CreatureScript
{
}
void EnterCombat(Unit* target)
void EnterCombat(Unit* target) OVERRIDE
{
BossAI::EnterCombat(target);
events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, 6000);
@@ -66,7 +66,7 @@ class boss_shazzrah : public CreatureScript
events.ScheduleEvent(EVENT_BLINK, 30000);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -117,7 +117,7 @@ class boss_shazzrah : public CreatureScript
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_shazzrahAI(creature);
}
@@ -67,7 +67,7 @@ class boss_sulfuron : public CreatureScript
{
}
void EnterCombat(Unit* victim)
void EnterCombat(Unit* victim) OVERRIDE
{
BossAI::EnterCombat(victim);
events.ScheduleEvent(EVENT_DARK_STRIKE, 10000);
@@ -77,7 +77,7 @@ class boss_sulfuron : public CreatureScript
events.ScheduleEvent(EVENT_FLAMESPEAR, 2000);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -127,7 +127,7 @@ class boss_sulfuron : public CreatureScript
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_sulfuronAI(creature);
}
@@ -144,17 +144,17 @@ class npc_flamewaker_priest : public CreatureScript
{
}
void Reset()
void Reset() OVERRIDE
{
events.Reset();
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
events.Reset();
}
void EnterCombat(Unit* victim)
void EnterCombat(Unit* victim) OVERRIDE
{
ScriptedAI::EnterCombat(victim);
events.ScheduleEvent(EVENT_HEAL, urand(15000, 30000));
@@ -162,7 +162,7 @@ class npc_flamewaker_priest : public CreatureScript
events.ScheduleEvent(EVENT_IMMOLATE, 8000);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -203,7 +203,7 @@ class npc_flamewaker_priest : public CreatureScript
EventMap events;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_flamewaker_priestAI(creature);
}
@@ -106,7 +106,7 @@ class instance_molten_core : public InstanceMapScript
}
}
void SetData(uint32 type, uint32 data)
void SetData(uint32 type, uint32 data) OVERRIDE
{
if (type == DATA_RAGNAROS_ADDS)
{
@@ -117,7 +117,7 @@ class instance_molten_core : public InstanceMapScript
}
}
uint32 GetData(uint32 type) const
uint32 GetData(uint32 type) const OVERRIDE
{
switch (type)
{
@@ -128,7 +128,7 @@ class instance_molten_core : public InstanceMapScript
return 0;
}
uint64 GetData64(uint32 type) const
uint64 GetData64(uint32 type) const OVERRIDE
{
switch (type)
{
@@ -252,7 +252,7 @@ class instance_molten_core : public InstanceMapScript
bool _summonedExecutus;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
return new instance_molten_core_InstanceMapScript(map);
}
@@ -92,7 +92,7 @@ class npc_unworthy_initiate : public CreatureScript
public:
npc_unworthy_initiate() : CreatureScript("npc_unworthy_initiate") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_unworthy_initiateAI(creature);
}
@@ -114,7 +114,7 @@ public:
EventMap events;
void Reset()
void Reset() OVERRIDE
{
anchorGUID = 0;
phase = PHASE_CHAINED;
@@ -125,7 +125,7 @@ public:
me->LoadEquipment(0, true);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
events.ScheduleEvent(EVENT_ICY_TOUCH, 1000, GCD_CAST);
events.ScheduleEvent(EVENT_PLAGUE_STRIKE, 3000, GCD_CAST);
@@ -133,7 +133,7 @@ public:
events.ScheduleEvent(EVENT_DEATH_COIL, 5000, GCD_CAST);
}
void MovementInform(uint32 type, uint32 id)
void MovementInform(uint32 type, uint32 id) OVERRIDE
{
if (type != POINT_MOTION_TYPE)
return;
@@ -166,7 +166,7 @@ public:
Talk(SAY_EVENT_START);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
switch (phase)
{
@@ -281,7 +281,7 @@ class npc_unworthy_initiate_anchor : public CreatureScript
public:
npc_unworthy_initiate_anchor() : CreatureScript("npc_unworthy_initiate_anchor") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_unworthy_initiate_anchorAI(creature);
}
@@ -292,13 +292,13 @@ public:
uint64 prisonerGUID;
void SetGUID(uint64 guid, int32 /*id*/)
void SetGUID(uint64 guid, int32 /*id*/) OVERRIDE
{
if (!prisonerGUID)
prisonerGUID = guid;
}
uint64 GetGUID(int32 /*id*/) const
uint64 GetGUID(int32 /*id*/) const OVERRIDE
{
return prisonerGUID;
}
@@ -310,7 +310,7 @@ class go_acherus_soul_prison : public GameObjectScript
public:
go_acherus_soul_prison() : GameObjectScript("go_acherus_soul_prison") { }
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if (Creature* anchor = go->FindNearestCreature(29521, 15))
if (uint64 prisonerGUID = anchor->AI()->GetGUID())
@@ -352,7 +352,7 @@ class npc_death_knight_initiate : public CreatureScript
public:
npc_death_knight_initiate() : CreatureScript("npc_death_knight_initiate") { }
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF)
@@ -379,7 +379,7 @@ public:
return true;
}
bool OnGossipHello(Player* player, Creature* creature)
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (player->GetQuestStatus(QUEST_DEATH_CHALLENGE) == QUEST_STATUS_INCOMPLETE && creature->IsFullHealth())
{
@@ -395,7 +395,7 @@ public:
return true;
}
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_death_knight_initiateAI(creature);
}
@@ -412,7 +412,7 @@ public:
uint32 m_uiDuelTimer;
bool m_bIsDuelInProgress;
void Reset()
void Reset() OVERRIDE
{
lose = false;
me->RestoreFaction();
@@ -425,7 +425,7 @@ public:
m_bIsDuelInProgress = false;
}
void SpellHit(Unit* pCaster, const SpellInfo* pSpell)
void SpellHit(Unit* pCaster, const SpellInfo* pSpell) OVERRIDE
{
if (!m_bIsDuelInProgress && pSpell->Id == SPELL_DUEL)
{
@@ -434,7 +434,7 @@ public:
}
}
void DamageTaken(Unit* pDoneBy, uint32 &uiDamage)
void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) OVERRIDE
{
if (m_bIsDuelInProgress && pDoneBy->IsControlledByPlayer())
{
@@ -457,7 +457,7 @@ public:
}
}
void UpdateAI(uint32 uiDiff)
void UpdateAI(uint32 uiDiff) OVERRIDE
{
if (!UpdateVictim())
{
@@ -520,7 +520,7 @@ class npc_dark_rider_of_acherus : public CreatureScript
public:
npc_dark_rider_of_acherus() : CreatureScript("npc_dark_rider_of_acherus") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_dark_rider_of_acherusAI(creature);
}
@@ -534,7 +534,7 @@ public:
bool Intro;
uint64 TargetGUID;
void Reset()
void Reset() OVERRIDE
{
PhaseTimer = 4000;
Phase = 0;
@@ -542,7 +542,7 @@ public:
TargetGUID = 0;
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!Intro || !TargetGUID)
return;
@@ -612,7 +612,7 @@ class npc_salanar_the_horseman : public CreatureScript
public:
npc_salanar_the_horseman() : CreatureScript("npc_salanar_the_horseman") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_salanar_the_horsemanAI(creature);
}
@@ -621,7 +621,7 @@ public:
{
npc_salanar_the_horsemanAI(Creature* creature) : ScriptedAI(creature) {}
void SpellHit(Unit* caster, const SpellInfo* spell)
void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
{
if (spell->Id == SPELL_DELIVER_STOLEN_HORSE)
{
@@ -643,7 +643,8 @@ public:
}
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) OVERRIDE
{
ScriptedAI::MoveInLineOfSight(who);
@@ -684,7 +685,7 @@ class npc_ros_dark_rider : public CreatureScript
public:
npc_ros_dark_rider() : CreatureScript("npc_ros_dark_rider") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_ros_dark_riderAI(creature);
}
@@ -693,12 +694,12 @@ public:
{
npc_ros_dark_riderAI(Creature* creature) : ScriptedAI(creature) {}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
me->ExitVehicle();
}
void Reset()
void Reset() OVERRIDE
{
Creature* deathcharger = me->FindNearestCreature(28782, 30);
if (!deathcharger)
@@ -711,7 +712,7 @@ public:
me->EnterVehicle(deathcharger);
}
void JustDied(Unit* killer)
void JustDied(Unit* killer) OVERRIDE
{
Creature* deathcharger = me->FindNearestCreature(28782, 30);
if (!deathcharger)
@@ -739,7 +740,7 @@ class npc_dkc1_gothik : public CreatureScript
public:
npc_dkc1_gothik() : CreatureScript("npc_dkc1_gothik") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_dkc1_gothikAI(creature);
}
@@ -748,7 +749,8 @@ public:
{
npc_dkc1_gothikAI(Creature* creature) : ScriptedAI(creature) {}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) OVERRIDE
{
ScriptedAI::MoveInLineOfSight(who);
@@ -782,7 +784,7 @@ class npc_scarlet_ghoul : public CreatureScript
public:
npc_scarlet_ghoul() : CreatureScript("npc_scarlet_ghoul") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_scarlet_ghoulAI(creature);
}
@@ -818,7 +820,7 @@ public:
}
}
void UpdateAI(uint32 /*diff*/)
void UpdateAI(uint32 /*diff*/) OVERRIDE
{
if (!me->IsInCombat())
{
@@ -884,7 +886,7 @@ class npc_scarlet_miner_cart : public CreatureScript
me->SetDisplayId(me->GetCreatureTemplate()->Modelid1); // Modelid2 is a horse.
}
void JustSummoned(Creature* summon)
void JustSummoned(Creature* summon) OVERRIDE
{
if (summon->GetEntry() == NPC_MINER)
{
@@ -893,13 +895,13 @@ class npc_scarlet_miner_cart : public CreatureScript
}
}
void SummonedCreatureDespawn(Creature* summon)
void SummonedCreatureDespawn(Creature* summon) OVERRIDE
{
if (summon->GetEntry() == NPC_MINER)
_minerGUID = 0;
}
void DoAction(int32 /*param*/)
void DoAction(int32 /*param*/) OVERRIDE
{
if (Creature* miner = ObjectAccessor::GetCreature(*me, _minerGUID))
{
@@ -913,7 +915,7 @@ class npc_scarlet_miner_cart : public CreatureScript
}
}
void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply)
void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply) OVERRIDE
{
if (apply)
{
@@ -933,7 +935,7 @@ class npc_scarlet_miner_cart : public CreatureScript
uint64 _playerGUID;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_scarlet_miner_cartAI(creature);
}
@@ -965,14 +967,14 @@ class npc_scarlet_miner : public CreatureScript
uint32 IntroPhase;
uint64 carGUID;
void Reset()
void Reset() OVERRIDE
{
carGUID = 0;
IntroTimer = 0;
IntroPhase = 0;
}
void IsSummonedBy(Unit* summoner)
void IsSummonedBy(Unit* summoner) OVERRIDE
{
carGUID = summoner->GetGUID();
}
@@ -1010,14 +1012,14 @@ class npc_scarlet_miner : public CreatureScript
}
}
void SetGUID(uint64 guid, int32 /*id = 0*/)
void SetGUID(uint64 guid, int32 /*id = 0*/) OVERRIDE
{
InitWaypoint();
Start(false, false, guid);
SetDespawnAtFar(false);
}
void WaypointReached(uint32 waypointId)
void WaypointReached(uint32 waypointId) OVERRIDE
{
switch (waypointId)
{
@@ -1044,7 +1046,7 @@ class npc_scarlet_miner : public CreatureScript
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (IntroPhase)
{
@@ -1071,7 +1073,7 @@ class npc_scarlet_miner : public CreatureScript
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_scarlet_minerAI(creature);
}
@@ -44,9 +44,9 @@ class npc_crusade_persuaded : public CreatureScript
public:
npc_crusade_persuaded() : CreatureScript("npc_crusade_persuaded") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_crusade_persuadedAI (creature);
return new npc_crusade_persuadedAI(creature);
}
struct npc_crusade_persuadedAI : public ScriptedAI
@@ -57,7 +57,7 @@ public:
uint32 speechCounter;
uint64 playerGUID;
void Reset()
void Reset() OVERRIDE
{
speechTimer = 0;
speechCounter = 0;
@@ -66,7 +66,7 @@ public:
me->RestoreFaction();
}
void SpellHit(Unit* caster, const SpellInfo* spell)
void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
{
if (spell->Id == SPELL_PERSUASIVE_STRIKE && caster->GetTypeId() == TYPEID_PLAYER && me->IsAlive() && !speechCounter)
{
@@ -90,7 +90,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (speechCounter)
{
@@ -191,7 +191,7 @@ class npc_koltira_deathweaver : public CreatureScript
public:
npc_koltira_deathweaver() : CreatureScript("npc_koltira_deathweaver") { }
bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest)
bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest) OVERRIDE
{
if (quest->GetQuestId() == QUEST_BREAKOUT)
{
@@ -210,7 +210,7 @@ public:
me->SetReactState(REACT_DEFENSIVE);
}
void Reset()
void Reset() OVERRIDE
{
if (!HasEscortState(STATE_ESCORT_ESCORTING))
{
@@ -224,7 +224,7 @@ public:
}
}
void WaypointReached(uint32 waypointId)
void WaypointReached(uint32 waypointId) OVERRIDE
{
switch (waypointId)
{
@@ -258,7 +258,7 @@ public:
}
}
void JustSummoned(Creature* summoned)
void JustSummoned(Creature* summoned) OVERRIDE
{
if (Player* player = GetPlayerForEscort())
summoned->AI()->AttackStart(player);
@@ -275,7 +275,7 @@ public:
me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1642.329f, -6045.818f, 127.583f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
}
void UpdateAI(uint32 uiDiff)
void UpdateAI(uint32 uiDiff) OVERRIDE
{
npc_escortAI::UpdateAI(uiDiff);
@@ -347,7 +347,7 @@ public:
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_koltira_deathweaverAI(creature);
}
@@ -368,9 +368,9 @@ class npc_scarlet_courier : public CreatureScript
public:
npc_scarlet_courier() : CreatureScript("npc_scarlet_courier") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_scarlet_courierAI (creature);
return new npc_scarlet_courierAI(creature);
}
struct npc_scarlet_courierAI : public ScriptedAI
@@ -380,21 +380,21 @@ public:
uint32 uiStage;
uint32 uiStage_timer;
void Reset()
void Reset() OVERRIDE
{
me->Mount(14338); // not sure about this id
uiStage = 1;
uiStage_timer = 3000;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_TREE2);
me->Dismount();
uiStage = 0;
}
void MovementInform(uint32 type, uint32 id)
void MovementInform(uint32 type, uint32 id) OVERRIDE
{
if (type != POINT_MOTION_TYPE)
return;
@@ -403,7 +403,7 @@ public:
uiStage = 2;
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (uiStage && !me->IsInCombat())
{
@@ -460,9 +460,9 @@ class npc_high_inquisitor_valroth : public CreatureScript
public:
npc_high_inquisitor_valroth() : CreatureScript("npc_high_inquisitor_valroth") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_high_inquisitor_valrothAI (creature);
return new npc_high_inquisitor_valrothAI(creature);
}
struct npc_high_inquisitor_valrothAI : public ScriptedAI
@@ -473,20 +473,20 @@ public:
uint32 uiInquisitor_Penance_timer;
uint32 uiValroth_Smite_timer;
void Reset()
void Reset() OVERRIDE
{
uiRenew_timer = 1000;
uiInquisitor_Penance_timer = 2000;
uiValroth_Smite_timer = 1000;
}
void EnterCombat(Unit* who)
void EnterCombat(Unit* who) OVERRIDE
{
Talk(SAY_VALROTH_AGGRO);
DoCast(who, SPELL_VALROTH_SMITE);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (uiRenew_timer <= diff)
{
@@ -518,7 +518,7 @@ public:
Talk(SAY_VALROTH_RAND);
}
void JustDied(Unit* killer)
void JustDied(Unit* killer) OVERRIDE
{
Talk(SAY_VALROTH_DEATH);
killer->CastSpell(me, SPELL_SUMMON_VALROTH_REMAINS, true);
@@ -596,7 +596,7 @@ class npc_a_special_surprise : public CreatureScript
public:
npc_a_special_surprise() : CreatureScript("npc_a_special_surprise") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_a_special_surpriseAI(creature);
}
@@ -609,7 +609,7 @@ public:
uint32 ExecuteSpeech_Counter;
uint64 PlayerGUID;
void Reset()
void Reset() OVERRIDE
{
ExecuteSpeech_Timer = 0;
ExecuteSpeech_Counter = 0;
@@ -667,7 +667,8 @@ public:
return false;
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) OVERRIDE
{
if (PlayerGUID || who->GetTypeId() != TYPEID_PLAYER || !who->IsWithinDist(me, INTERACTION_DISTANCE))
return;
@@ -676,7 +677,7 @@ public:
PlayerGUID = who->GetGUID();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (PlayerGUID && !me->GetVictim() && me->IsAlive())
{
@@ -275,7 +275,7 @@ class npc_highlord_darion_mograine : public CreatureScript
public:
npc_highlord_darion_mograine() : CreatureScript("npc_highlord_darion_mograine") { }
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)
@@ -289,7 +289,7 @@ public:
return true;
}
bool OnGossipHello(Player* player, Creature* creature)
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -302,7 +302,7 @@ public:
return true;
}
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_highlord_darion_mograineAI(creature);
}
@@ -353,7 +353,7 @@ public:
uint64 uiGhoulGUID[ENCOUNTER_GHOUL_NUMBER];
uint64 uiWarriorGUID[ENCOUNTER_WARRIOR_NUMBER];
void Reset()
void Reset() OVERRIDE
{
if (!HasEscortState(STATE_ESCORT_ESCORTING))
{
@@ -453,7 +453,7 @@ public:
}
}
void AttackStart(Unit* who)
void AttackStart(Unit* who) OVERRIDE
{
if (!who)
return;
@@ -470,7 +470,8 @@ public:
}
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) OVERRIDE
{
if (!who)
return;
@@ -485,7 +486,7 @@ public:
SetEscortPaused(bOnHold);
}
void WaypointReached(uint32 waypointId)
void WaypointReached(uint32 waypointId) OVERRIDE
{
switch (waypointId)
{
@@ -600,13 +601,13 @@ public:
}
}
void EnterEvadeMode()
void EnterEvadeMode() OVERRIDE
{
if (!bIsBattle)//do not reset self if we are in battle
npc_escortAI::EnterEvadeMode();
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
npc_escortAI::UpdateAI(diff);
@@ -1652,18 +1653,18 @@ class npc_the_lich_king_tirion_dawn : public CreatureScript
public:
npc_the_lich_king_tirion_dawn() : CreatureScript("npc_the_lich_king_tirion_dawn") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_the_lich_king_tirion_dawnAI (creature);
return new npc_the_lich_king_tirion_dawnAI(creature);
}
struct npc_the_lich_king_tirion_dawnAI : public ScriptedAI
{
npc_the_lich_king_tirion_dawnAI(Creature* creature) : ScriptedAI(creature) { Reset(); }
void Reset() {}
void AttackStart(Unit* /*who*/) {} // very sample, just don't make them aggreesive
void UpdateAI(uint32 /*diff*/) {}
void JustDied(Unit* /*killer*/) {}
void Reset() OVERRIDE {}
void AttackStart(Unit* /*who*/) {} // very sample, just don't make them aggreesive OVERRIDE
void UpdateAI(uint32 /*diff*/) OVERRIDE {}
void JustDied(Unit* /*killer*/) OVERRIDE {}
};
};
@@ -39,9 +39,9 @@ class npc_valkyr_battle_maiden : public CreatureScript
public:
npc_valkyr_battle_maiden() : CreatureScript("npc_valkyr_battle_maiden") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_valkyr_battle_maidenAI (creature);
return new npc_valkyr_battle_maidenAI(creature);
}
struct npc_valkyr_battle_maidenAI : public PassiveAI
@@ -52,7 +52,7 @@ public:
float x, y, z;
uint32 phase;
void Reset()
void Reset() OVERRIDE
{
me->setActive(true);
me->SetVisible(false);
@@ -69,7 +69,7 @@ public:
me->SetPosition(x, y, z, 0.0f);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (FlyBackTimer <= diff)
{
@@ -26,16 +26,19 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
enum eEnums
enum Yells
{
SAY_AGGRO = 0,
SAY_SPECIALAE = 1,
SAY_SPECIALAE = 1
};
enum Spells
{
SPELL_POLYMORPH = 13323,
SPELL_AOESILENCE = 8988,
SPELL_ARCANEEXPLOSION = 9433,
SPELL_FIREAOE = 9435,
SPELL_ARCANEBUBBLE = 9438,
SPELL_ARCANEBUBBLE = 9438
};
class boss_arcanist_doan : public CreatureScript
@@ -43,9 +46,9 @@ class boss_arcanist_doan : public CreatureScript
public:
boss_arcanist_doan() : CreatureScript("boss_arcanist_doan") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_arcanist_doanAI (creature);
return new boss_arcanist_doanAI(creature);
}
struct boss_arcanist_doanAI : public ScriptedAI
@@ -58,7 +61,7 @@ public:
bool bCanDetonate;
bool bShielded;
void Reset()
void Reset() OVERRIDE
{
Polymorph_Timer = 20000;
AoESilence_Timer = 15000;
@@ -67,12 +70,12 @@ public:
bShielded = false;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -38,9 +38,9 @@ class boss_azshir_the_sleepless : public CreatureScript
public:
boss_azshir_the_sleepless() : CreatureScript("boss_azshir_the_sleepless") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_azshir_the_sleeplessAI (creature);
return new boss_azshir_the_sleeplessAI(creature);
}
struct boss_azshir_the_sleeplessAI : public ScriptedAI
@@ -51,16 +51,16 @@ public:
uint32 CallOftheGrave_Timer;
uint32 Terrify_Timer;
void Reset()
void Reset() OVERRIDE
{
SoulSiphon_Timer = 1;
CallOftheGrave_Timer = 30000;
Terrify_Timer = 20000;
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -26,12 +26,15 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
enum eEnums
enum Yells
{
SAY_AGGRO = 0,
SAY_HEALTH = 1,
SAY_KILL = 2,
SAY_KILL = 2
};
enum Spells
{
SPELL_FLAMESHOCK = 8053,
SPELL_SHADOWBOLT = 1106,
SPELL_FLAMESPIKE = 8814,
@@ -43,9 +46,9 @@ class boss_bloodmage_thalnos : public CreatureScript
public:
boss_bloodmage_thalnos() : CreatureScript("boss_bloodmage_thalnos") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_bloodmage_thalnosAI (creature);
return new boss_bloodmage_thalnosAI(creature);
}
struct boss_bloodmage_thalnosAI : public ScriptedAI
@@ -58,7 +61,7 @@ public:
uint32 FlameSpike_Timer;
uint32 FireNova_Timer;
void Reset()
void Reset() OVERRIDE
{
HpYell = false;
FlameShock_Timer = 10000;
@@ -67,17 +70,17 @@ public:
FireNova_Timer = 40000;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*Victim*/)
void KilledUnit(Unit* /*Victim*/) OVERRIDE
{
Talk(SAY_KILL);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -146,9 +146,9 @@ class npc_wisp_invis : public CreatureScript
public:
npc_wisp_invis() : CreatureScript("npc_wisp_invis") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_wisp_invisAI (creature);
return new npc_wisp_invisAI(creature);
}
struct npc_wisp_invisAI : public ScriptedAI
@@ -162,8 +162,8 @@ public:
uint32 delay;
uint32 spell;
uint32 spell2;
void Reset() {}
void EnterCombat(Unit* /*who*/) {}
void Reset() OVERRIDE {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void SetType(uint32 _type)
{
switch (Creaturetype = _type)
@@ -189,13 +189,14 @@ public:
DoCast(me, spell);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE
{
if (spell->Id == SPELL_WISP_FLIGHT_PORT && Creaturetype == 4)
me->SetDisplayId(2027);
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) OVERRIDE
{
if (!who || Creaturetype != 1 || !who->isTargetableForAttack())
return;
@@ -204,7 +205,7 @@ public:
DoCast(who, SPELL_SQUASH_SOUL);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (delay)
{
@@ -225,9 +226,9 @@ class npc_head : public CreatureScript
public:
npc_head() : CreatureScript("npc_head") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_headAI (creature);
return new npc_headAI(creature);
}
struct npc_headAI : public ScriptedAI
@@ -243,7 +244,7 @@ public:
bool withbody;
bool die;
void Reset()
void Reset() OVERRIDE
{
Phase = 0;
bodyGUID = 0;
@@ -253,7 +254,7 @@ public:
laugh = urand(15000, 30000);
}
void EnterCombat(Unit* /*who*/) { }
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void SaySound(uint8 textEntry, Unit* target = 0)
{
@@ -268,7 +269,7 @@ public:
laugh += 3000;
}
void DamageTaken(Unit* /*done_by*/, uint32 &damage)
void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE
{
if (withbody)
return;
@@ -299,7 +300,7 @@ public:
}
}
void SpellHit(Unit* caster, const SpellInfo* spell)
void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
{
if (!withbody)
return;
@@ -325,7 +326,7 @@ public:
}
void Disappear();
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!withbody)
{
@@ -374,9 +375,9 @@ class boss_headless_horseman : public CreatureScript
public:
boss_headless_horseman() : CreatureScript("boss_headless_horseman") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_headless_horsemanAI (creature);
return new boss_headless_horsemanAI(creature);
}
struct boss_headless_horsemanAI : public ScriptedAI
@@ -410,7 +411,7 @@ public:
bool wp_reached;
bool burned;
void Reset()
void Reset() OVERRIDE
{
Phase = 1;
conflagrate = 15000;
@@ -453,7 +454,7 @@ public:
Phase = 0;
}
void MovementInform(uint32 type, uint32 i)
void MovementInform(uint32 type, uint32 i) OVERRIDE
{
if (type != POINT_MOTION_TYPE || !IsFlying || i != id)
return;
@@ -494,25 +495,26 @@ public:
++id;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_HORSEMAN_EVENT, IN_PROGRESS);
DoZoneInCombat();
}
void AttackStart(Unit* who)
void AttackStart(Unit* who) OVERRIDE
{
ScriptedAI::AttackStart(who);
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) OVERRIDE
{
if (withhead && Phase != 0)
ScriptedAI::MoveInLineOfSight(who);
}
void KilledUnit(Unit* player)
void KilledUnit(Unit* player) OVERRIDE
{
if (player->GetTypeId() == TYPEID_PLAYER)
{
@@ -558,13 +560,13 @@ public:
return NULL;
}
void SpellHitTarget(Unit* unit, const SpellInfo* spell)
void SpellHitTarget(Unit* unit, const SpellInfo* spell) OVERRIDE
{
if (spell->Id == SPELL_CONFLAGRATION && unit->HasAura(SPELL_CONFLAGRATION))
SaySound(SAY_CONFLAGRATION, unit);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
me->StopMoving();
//me->GetMotionMaster()->MoveIdle();
@@ -581,7 +583,7 @@ public:
sLFGMgr->FinishDungeon(players.begin()->GetSource()->GetGroup()->GetGUID(), 285);
}
void SpellHit(Unit* caster, const SpellInfo* spell)
void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
{
if (withhead)
return;
@@ -611,7 +613,7 @@ public:
}
}
void DamageTaken(Unit* /*done_by*/, uint32 &damage)
void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE
{
if (damage >= me->GetHealth() && withhead)
{
@@ -640,7 +642,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (withhead)
{
@@ -783,9 +785,9 @@ class npc_pulsing_pumpkin : public CreatureScript
public:
npc_pulsing_pumpkin() : CreatureScript("npc_pulsing_pumpkin") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_pulsing_pumpkinAI (creature);
return new npc_pulsing_pumpkinAI(creature);
}
struct npc_pulsing_pumpkinAI : public ScriptedAI
@@ -795,7 +797,7 @@ public:
bool sprouted;
uint64 debuffGUID;
void Reset()
void Reset() OVERRIDE
{
float x, y, z;
me->GetPosition(x, y, z); //this visual aura some under ground
@@ -815,9 +817,9 @@ public:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE
{
if (spell->Id == SPELL_SPROUTING)
{
@@ -843,13 +845,14 @@ public:
}
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
if (!sprouted)
Despawn();
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) OVERRIDE
{
if (!who || !me->IsValidAttackTarget(who) || me->GetVictim())
return;
@@ -859,7 +862,7 @@ public:
DoStartMovement(who);
}
void UpdateAI(uint32 /*diff*/)
void UpdateAI(uint32 /*diff*/) OVERRIDE
{
if (sprouted && UpdateVictim())
DoMeleeAttackIfReady();
@@ -872,7 +875,7 @@ class go_loosely_turned_soil : public GameObjectScript
public:
go_loosely_turned_soil() : GameObjectScript("go_loosely_turned_soil") { }
bool OnGossipHello(Player* player, GameObject* soil)
bool OnGossipHello(Player* player, GameObject* soil) OVERRIDE
{
InstanceScript* instance = player->GetInstanceScript();
if (instance)
@@ -55,7 +55,7 @@ class boss_herod : public CreatureScript
public:
boss_herod() : CreatureScript("boss_herod") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_herodAI(creature);
}
@@ -69,31 +69,31 @@ public:
uint32 Cleave_Timer;
uint32 Whirlwind_Timer;
void Reset()
void Reset() OVERRIDE
{
Enrage = false;
Cleave_Timer = 12000;
Whirlwind_Timer = 60000;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
DoCast(me, SPELL_RUSHINGCHARGE);
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
for (uint8 i = 0; i < 20; ++i)
me->SummonCreature(ENTRY_SCARLET_TRAINEE, 1939.18f, -431.58f, 17.09f, 6.22f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -134,7 +134,7 @@ class npc_scarlet_trainee : public CreatureScript
public:
npc_scarlet_trainee() : CreatureScript("npc_scarlet_trainee") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_scarlet_traineeAI(creature);
}
@@ -148,11 +148,11 @@ public:
uint32 Start_Timer;
void Reset() {}
void WaypointReached(uint32 /*waypointId*/) {}
void EnterCombat(Unit* /*who*/) {}
void Reset() OVERRIDE {}
void WaypointReached(uint32 /*waypointId*/) OVERRIDE {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (Start_Timer)
{
@@ -26,7 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
enum eSpells
enum Spells
{
SPELL_CURSEOFBLOOD = 8282,
SPELL_DISPELMAGIC = 15090,
@@ -41,9 +41,9 @@ class boss_high_inquisitor_fairbanks : public CreatureScript
public:
boss_high_inquisitor_fairbanks() : CreatureScript("boss_high_inquisitor_fairbanks") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_high_inquisitor_fairbanksAI (creature);
return new boss_high_inquisitor_fairbanksAI(creature);
}
struct boss_high_inquisitor_fairbanksAI : public ScriptedAI
@@ -58,7 +58,7 @@ public:
uint32 Dispel_Timer;
bool PowerWordShield;
void Reset()
void Reset() OVERRIDE
{
CurseOfBlood_Timer = 10000;
DispelMagic_Timer = 30000;
@@ -71,13 +71,13 @@ public:
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 7);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
me->SetStandState(UNIT_STAND_STATE_STAND);
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -26,9 +26,13 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
enum eEnums
enum Yells
{
SAY_AGGRO = 0,
};
enum Spells
{
SPELL_SUMMONSCARLETHOUND = 17164,
SPELL_BLOODLUST = 6742
};
@@ -38,9 +42,9 @@ class boss_houndmaster_loksey : public CreatureScript
public:
boss_houndmaster_loksey() : CreatureScript("boss_houndmaster_loksey") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_houndmaster_lokseyAI (creature);
return new boss_houndmaster_lokseyAI(creature);
}
struct boss_houndmaster_lokseyAI : public ScriptedAI
@@ -49,17 +53,17 @@ public:
uint32 BloodLust_Timer;
void Reset()
void Reset() OVERRIDE
{
BloodLust_Timer = 20000;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -46,9 +46,9 @@ class boss_interrogator_vishas : public CreatureScript
public:
boss_interrogator_vishas() : CreatureScript("boss_interrogator_vishas") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_interrogator_vishasAI (creature);
return new boss_interrogator_vishasAI(creature);
}
struct boss_interrogator_vishasAI : public ScriptedAI
@@ -64,22 +64,22 @@ public:
bool Yell60;
uint32 ShadowWordPain_Timer;
void Reset()
void Reset() OVERRIDE
{
ShadowWordPain_Timer = 5000;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*Victim*/)
void KilledUnit(Unit* /*Victim*/) OVERRIDE
{
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
if (!instance)
return;
@@ -89,7 +89,7 @@ public:
vorrel->AI()->Talk(SAY_TRIGGER_VORREL);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -63,9 +63,9 @@ class boss_scarlet_commander_mograine : public CreatureScript
public:
boss_scarlet_commander_mograine() : CreatureScript("boss_scarlet_commander_mograine") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_scarlet_commander_mograineAI (creature);
return new boss_scarlet_commander_mograineAI(creature);
}
struct boss_scarlet_commander_mograineAI : public ScriptedAI
@@ -84,7 +84,7 @@ public:
bool _bHeal;
bool _bFakeDeath;
void Reset()
void Reset() OVERRIDE
{
CrusaderStrike_Timer = 10000;
HammerOfJustice_Timer = 10000;
@@ -103,7 +103,7 @@ public:
_bFakeDeath = false;
}
void JustReachedHome()
void JustReachedHome() OVERRIDE
{
if (instance)
{
@@ -112,7 +112,7 @@ public:
}
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_MO_AGGRO);
DoCast(me, SPELL_RETRIBUTIONAURA);
@@ -120,12 +120,12 @@ public:
me->CallForHelp(VISIBLE_RANGE);
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_MO_KILL);
}
void DamageTaken(Unit* /*doneBy*/, uint32 &damage)
void DamageTaken(Unit* /*doneBy*/, uint32 &damage) OVERRIDE
{
if (damage < me->GetHealth() || _bHasDied || _bFakeDeath)
return;
@@ -162,7 +162,7 @@ public:
}
}
void SpellHit(Unit* /*who*/, const SpellInfo* spell)
void SpellHit(Unit* /*who*/, const SpellInfo* spell) OVERRIDE
{
//When hit with ressurection say text
if (spell->Id == SPELL_SCARLETRESURRECTION)
@@ -175,7 +175,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -229,9 +229,9 @@ class boss_high_inquisitor_whitemane : public CreatureScript
public:
boss_high_inquisitor_whitemane() : CreatureScript("boss_high_inquisitor_whitemane") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_high_inquisitor_whitemaneAI (creature);
return new boss_high_inquisitor_whitemaneAI(creature);
}
struct boss_high_inquisitor_whitemaneAI : public ScriptedAI
@@ -251,7 +251,7 @@ public:
bool _bCanResurrectCheck;
bool _bCanResurrect;
void Reset()
void Reset() OVERRIDE
{
Wait_Timer = 7000;
Heal_Timer = 10000;
@@ -266,7 +266,7 @@ public:
instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED);
}
void AttackStart(Unit* who)
void AttackStart(Unit* who) OVERRIDE
{
if (instance && instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == NOT_STARTED)
return;
@@ -274,23 +274,23 @@ public:
ScriptedAI::AttackStart(who);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_WH_INTRO);
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_WH_KILL);
}
void DamageTaken(Unit* /*attacker*/, uint32& damage)
void DamageTaken(Unit* /*attacker*/, uint32& damage) OVERRIDE
{
if (!_bCanResurrectCheck && damage >= me->GetHealth())
damage = me->GetHealth() - 1;
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -39,9 +39,9 @@ class boss_scorn : public CreatureScript
public:
boss_scorn() : CreatureScript("boss_scorn") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_scornAI (creature);
return new boss_scornAI(creature);
}
struct boss_scornAI : public ScriptedAI
@@ -53,7 +53,7 @@ public:
uint32 MindFlay_Timer;
uint32 FrostNova_Timer;
void Reset()
void Reset() OVERRIDE
{
LichSlap_Timer = 45000;
FrostboltVolley_Timer = 30000;
@@ -61,9 +61,9 @@ public:
FrostNova_Timer = 30000;
}
void EnterCombat(Unit* /*who*/) {}
void EnterCombat(Unit* /*who*/) OVERRIDE {}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -42,7 +42,7 @@ class instance_scarlet_monastery : public InstanceMapScript
public:
instance_scarlet_monastery() : InstanceMapScript("instance_scarlet_monastery", 189) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
return new instance_scarlet_monastery_InstanceMapScript(map);
}
@@ -100,7 +100,7 @@ public:
}
}
void SetData(uint32 type, uint32 data)
void SetData(uint32 type, uint32 data) OVERRIDE
{
switch (type)
{
@@ -132,7 +132,7 @@ public:
}
}
uint64 GetData64(uint32 type) const
uint64 GetData64(uint32 type) const OVERRIDE
{
switch (type)
{
@@ -147,7 +147,7 @@ public:
return 0;
}
uint32 GetData(uint32 type) const
uint32 GetData(uint32 type) const OVERRIDE
{
if (type == TYPE_MOGRAINE_AND_WHITE_EVENT)
return encounter[0];
@@ -16,10 +16,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DEF_SCARLET_M
#define DEF_SCARLET_M
#ifndef SCARLET_M_
#define SCARLET_M_
enum eEnums
enum DataTypes
{
TYPE_MOGRAINE_AND_WHITE_EVENT = 1,
@@ -32,4 +32,5 @@ enum eEnums
DATA_VORREL = 7
};
#endif
#endif // SCARLET_M_
@@ -56,21 +56,21 @@ class boss_darkmaster_gandling : public CreatureScript
{
boss_darkmaster_gandlingAI(Creature* creature) : BossAI(creature, DATA_DARKMASTERGANDLING) {}
void Reset()
void Reset() OVERRIDE
{
_Reset();
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_GANDLING)))
gate->SetGoState(GO_STATE_ACTIVE);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_GANDLING)))
gate->SetGoState(GO_STATE_ACTIVE);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(EVENT_ARCANEMISSILES, 4500);
@@ -82,13 +82,13 @@ class boss_darkmaster_gandling : public CreatureScript
gate->SetGoState(GO_STATE_READY);
}
void IsSummonedBy(Unit* /*summoner*/)
void IsSummonedBy(Unit* /*summoner*/) OVERRIDE
{
Talk(YELL_SUMMONED);
me->GetMotionMaster()->MoveRandom(5);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -126,9 +126,9 @@ class boss_darkmaster_gandling : public CreatureScript
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_darkmaster_gandlingAI (creature);
return new boss_darkmaster_gandlingAI(creature);
}
};
@@ -211,13 +211,13 @@ class spell_shadow_portal : public SpellScriptLoader
}
}
void Register()
void Register() OVERRIDE
{
OnEffectHitTarget += SpellEffectFn(spell_shadow_portal_SpellScript::HandleCast, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_shadow_portal_SpellScript();
}
@@ -341,13 +341,13 @@ class spell_shadow_portal_rooms : public SpellScriptLoader
}
}
void Register()
void Register() OVERRIDE
{
OnEffectHit += SpellEffectFn(spell_shadow_portal_rooms_SpellScript::HandleSendEvent, EFFECT_1, SPELL_EFFECT_SEND_EVENT);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_shadow_portal_rooms_SpellScript();
}
@@ -31,26 +31,26 @@ class boss_death_knight_darkreaver : public CreatureScript
public:
boss_death_knight_darkreaver() : CreatureScript("boss_death_knight_darkreaver") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_death_knight_darkreaverAI (creature);
return new boss_death_knight_darkreaverAI(creature);
}
struct boss_death_knight_darkreaverAI : public ScriptedAI
{
boss_death_knight_darkreaverAI(Creature* creature) : ScriptedAI(creature) {}
void Reset()
void Reset() OVERRIDE
{
}
void DamageTaken(Unit* /*done_by*/, uint32 &damage)
void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE
{
if (me->GetHealth() <= damage)
DoCast(me, 23261, true); //Summon Darkreaver's Fallen Charger
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
}
};
@@ -53,7 +53,7 @@ class boss_doctor_theolen_krastinov : public CreatureScript
{
boss_theolenkrastinovAI(Creature* creature) : BossAI(creature, DATA_DOCTORTHEOLENKRASTINOV) {}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(EVENT_REND, 8000);
@@ -61,7 +61,7 @@ class boss_doctor_theolen_krastinov : public CreatureScript
events.ScheduleEvent(EVENT_FRENZY, 1000);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -97,9 +97,9 @@ class boss_doctor_theolen_krastinov : public CreatureScript
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_theolenkrastinovAI (creature);
return new boss_theolenkrastinovAI(creature);
}
};
@@ -50,7 +50,7 @@ class boss_illucia_barov : public CreatureScript
{
boss_illuciabarovAI(Creature* creature) : BossAI(creature, DATA_LADYILLUCIABAROV) {}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(EVENT_CURSEOFAGONY, 18000);
@@ -59,7 +59,7 @@ class boss_illucia_barov : public CreatureScript
events.ScheduleEvent(EVENT_FEAR, 30000);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -98,9 +98,9 @@ class boss_illucia_barov : public CreatureScript
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_illuciabarovAI (creature);
return new boss_illuciabarovAI(creature);
}
};
@@ -55,14 +55,14 @@ class boss_instructor_malicia : public CreatureScript
uint32 FlashCounter;
uint32 TouchCounter;
void Reset()
void Reset() OVERRIDE
{
_Reset();
FlashCounter = 0;
TouchCounter = 0;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(EVENT_CALLOFGRAVES, 4000);
@@ -72,7 +72,7 @@ class boss_instructor_malicia : public CreatureScript
events.ScheduleEvent(EVENT_HEALINGTOUCH, 45000);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -135,9 +135,9 @@ class boss_instructor_malicia : public CreatureScript
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_instructormaliciaAI (creature);
return new boss_instructormaliciaAI(creature);
}
};
@@ -26,20 +26,23 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#define SPELL_CURSEOFBLOOD 24673
//#define SPELL_ILLUSION 17773
enum Spells
{
SPELL_CURSEOFBLOOD = 24673,
//SPELL_ILLUSION = 17773,
//Spells of Illusion of Jandice Barov
#define SPELL_CLEAVE 15584
// Spells of Illusion of Jandice Barov
SPELL_CLEAVE = 15584
};
class boss_jandice_barov : public CreatureScript
{
public:
boss_jandice_barov() : CreatureScript("boss_jandice_barov") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_jandicebarovAI (creature);
return new boss_jandicebarovAI(creature);
}
struct boss_jandicebarovAI : public ScriptedAI
@@ -52,7 +55,7 @@ public:
uint32 Invisible_Timer;
bool Invisible;
void Reset()
void Reset() OVERRIDE
{
CurseOfBlood_Timer = 15000;
Illusion_Timer = 30000;
@@ -60,7 +63,7 @@ public:
Invisible = false;
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
}
@@ -70,7 +73,7 @@ public:
Illusion->AI()->AttackStart(victim);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
if (Invisible && Invisible_Timer <= diff)
{
@@ -159,9 +162,9 @@ class npc_illusionofjandicebarov : public CreatureScript
public:
npc_illusionofjandicebarov() : CreatureScript("npc_illusionofjandicebarov") { }
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_illusionofjandicebarovAI (creature);
return new npc_illusionofjandicebarovAI(creature);
}
struct npc_illusionofjandicebarovAI : public ScriptedAI
@@ -170,17 +173,17 @@ public:
uint32 Cleave_Timer;
void Reset()
void Reset() OVERRIDE
{
Cleave_Timer = urand(2000, 8000);
me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
@@ -57,7 +57,7 @@ enum Events
EVENT_KIRTONOS_TRANSFORM = 14
};
enum eMisc
enum Misc
{
WEAPON_KIRTONOS_STAFF = 11365,
POINT_KIRTONOS_LAND = 13,
@@ -78,12 +78,12 @@ class boss_kirtonos_the_herald : public CreatureScript
{
boss_kirtonos_the_heraldAI(Creature* creature) : BossAI(creature, DATA_KIRTONOS) { }
void Reset()
void Reset() OVERRIDE
{
_Reset();
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) OVERRIDE
{
events.ScheduleEvent(EVENT_SWOOP, urand(8000, 8000));
events.ScheduleEvent(EVENT_WING_FLAP, urand(15000, 15000));
@@ -96,7 +96,7 @@ class boss_kirtonos_the_herald : public CreatureScript
_EnterCombat();
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) OVERRIDE
{
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_KIRTONOS)))
gate->SetGoState(GO_STATE_ACTIVE);
@@ -108,7 +108,7 @@ class boss_kirtonos_the_herald : public CreatureScript
_JustDied();
}
void EnterEvadeMode()
void EnterEvadeMode() OVERRIDE
{
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_KIRTONOS)))
gate->SetGoState(GO_STATE_ACTIVE);
@@ -120,7 +120,7 @@ class boss_kirtonos_the_herald : public CreatureScript
me->DespawnOrUnsummon(5000);
}
void IsSummonedBy(Unit* /*summoner*/)
void IsSummonedBy(Unit* /*summoner*/) OVERRIDE
{
events.ScheduleEvent(INTRO_1, 500);
me->SetDisableGravity(true);
@@ -129,12 +129,12 @@ class boss_kirtonos_the_herald : public CreatureScript
Talk(EMOTE_SUMMONED);
}
void JustSummoned(Creature* summon)
void JustSummoned(Creature* summon) OVERRIDE
{
BossAI::JustSummoned(summon);
}
void MovementInform(uint32 type, uint32 id)
void MovementInform(uint32 type, uint32 id) OVERRIDE
{
if (type == WAYPOINT_MOTION_TYPE && id == POINT_KIRTONOS_LAND)
{
@@ -142,7 +142,7 @@ class boss_kirtonos_the_herald : public CreatureScript
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) OVERRIDE
{
events.Update(diff);
@@ -251,7 +251,7 @@ class boss_kirtonos_the_herald : public CreatureScript
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_kirtonos_the_heraldAI(creature);
}
@@ -277,7 +277,7 @@ class go_brazier_of_the_herald : public GameObjectScript
public:
go_brazier_of_the_herald() : GameObjectScript("go_brazier_of_the_herald") { }
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
go->UseDoorOrButton();
go->PlayDirectSound(SOUND_SCREECH, 0);
Loaded 100 of 603 files, more files were not shown because too many files have changed in this diff. Show more