Merge pull request #6698 from 4m1g0/cleanup1

Scripts/Codestyle: Use proper headers, code style and cleanup (Blackfathom Deeps, Maraudon and Onyxias Lair)
This commit is contained in:
QAston
2012-06-17 19:11:05 -07:00
12 changed files with 323 additions and 311 deletions
@@ -15,11 +15,13 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "ScriptPCH.h" #include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "blackfathom_deeps.h" #include "blackfathom_deeps.h"
#include "ScriptedEscortAI.h" #include "ScriptedEscortAI.h"
enum eSpells enum Spells
{ {
SPELL_BLESSING_OF_BLACKFATHOM = 8733, SPELL_BLESSING_OF_BLACKFATHOM = 8733,
SPELL_RAVAGE = 8391, SPELL_RAVAGE = 8391,
@@ -94,11 +96,11 @@ public:
uint32 frostNovaTimer; uint32 frostNovaTimer;
uint32 frostBoltVolleyTimer; uint32 frostBoltVolleyTimer;
bool bFlee; bool Flee;
void Reset() void Reset()
{ {
bFlee = false; Flee = false;
ravageTimer = urand(5000, 8000); ravageTimer = urand(5000, 8000);
frostNovaTimer = urand(9000, 12000); frostNovaTimer = urand(9000, 12000);
@@ -140,7 +142,7 @@ public:
{ {
if (ravageTimer <= diff) if (ravageTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_RAVAGE); DoCastVictim(SPELL_RAVAGE);
ravageTimer = urand(9000, 14000); ravageTimer = urand(9000, 14000);
} else ravageTimer -= diff; } else ravageTimer -= diff;
break; break;
@@ -148,9 +150,9 @@ public:
case NPC_MURKSHALLOW_SOFTSHELL: case NPC_MURKSHALLOW_SOFTSHELL:
case NPC_BARBED_CRUSTACEAN: case NPC_BARBED_CRUSTACEAN:
{ {
if (!bFlee && HealthBelowPct(15)) if (!Flee && HealthBelowPct(15))
{ {
bFlee = true; Flee = true;
me->DoFleeToGetAssistance(); me->DoFleeToGetAssistance();
} }
break; break;
@@ -160,10 +162,7 @@ public:
if (frostBoltVolleyTimer <= diff) if (frostBoltVolleyTimer <= diff)
{ {
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
if (target)
DoCast(target, SPELL_FROST_BOLT_VOLLEY); DoCast(target, SPELL_FROST_BOLT_VOLLEY);
}
frostBoltVolleyTimer = urand(5000, 8000); frostBoltVolleyTimer = urand(5000, 8000);
} }
else frostBoltVolleyTimer -= diff; else frostBoltVolleyTimer -= diff;
@@ -190,7 +189,7 @@ public:
}; };
}; };
enum eMorridune enum Morridune
{ {
SAY_MORRIDUNE_1 = -1048003, SAY_MORRIDUNE_1 = -1048003,
SAY_MORRIDUNE_2 = -1048004 SAY_MORRIDUNE_2 = -1048004
@@ -15,7 +15,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "ScriptPCH.h" #include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "blackfathom_deeps.h" #include "blackfathom_deeps.h"
enum Spells enum Spells
@@ -42,14 +43,14 @@ public:
} }
uint32 poisonCloudTimer; uint32 poisonCloudTimer;
bool bIsEnraged; bool IsEnraged;
InstanceScript* instance; InstanceScript* instance;
void Reset() void Reset()
{ {
poisonCloudTimer = urand(5000, 9000); poisonCloudTimer = urand(5000, 9000);
bIsEnraged = false; IsEnraged = false;
if (instance) if (instance)
instance->SetData(TYPE_AKU_MAI, NOT_STARTED); instance->SetData(TYPE_AKU_MAI, NOT_STARTED);
} }
@@ -77,10 +78,10 @@ public:
poisonCloudTimer = urand(25000, 50000); poisonCloudTimer = urand(25000, 50000);
} else poisonCloudTimer -= diff; } else poisonCloudTimer -= diff;
if (!bIsEnraged && HealthBelowPct(30)) if (!IsEnraged && HealthBelowPct(30))
{ {
DoCast(me, SPELL_FRENZIED_RAGE); DoCast(me, SPELL_FRENZIED_RAGE);
bIsEnraged = true; IsEnraged = true;
} }
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
@@ -15,7 +15,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "ScriptPCH.h" #include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "blackfathom_deeps.h" #include "blackfathom_deeps.h"
enum Spells enum Spells
@@ -15,7 +15,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "ScriptPCH.h" #include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "blackfathom_deeps.h" #include "blackfathom_deeps.h"
enum Spells enum Spells
@@ -23,7 +23,8 @@ SDComment:
SDCategory: Blackfathom Deeps SDCategory: Blackfathom Deeps
EndScriptData */ EndScriptData */
#include "ScriptPCH.h" #include "ScriptMgr.h"
#include "InstanceScript.h"
#include "blackfathom_deeps.h" #include "blackfathom_deeps.h"
#define MAX_ENCOUNTER 4 #define MAX_ENCOUNTER 4
@@ -23,7 +23,8 @@ SDComment:
SDCategory: Maraudon SDCategory: Maraudon
EndScriptData */ EndScriptData */
#include "ScriptPCH.h" #include "ScriptMgr.h"
#include "ScriptedCreature.h"
enum Spells enum Spells
{ {
@@ -46,15 +47,15 @@ public:
{ {
celebras_the_cursedAI(Creature* creature) : ScriptedAI(creature) {} celebras_the_cursedAI(Creature* creature) : ScriptedAI(creature) {}
uint32 Wrath_Timer; uint32 WrathTimer;
uint32 EntanglingRoots_Timer; uint32 EntanglingRootsTimer;
uint32 CorruptForces_Timer; uint32 CorruptForcesTimer;
void Reset() void Reset()
{ {
Wrath_Timer = 8000; WrathTimer = 8000;
EntanglingRoots_Timer = 2000; EntanglingRootsTimer = 2000;
CorruptForces_Timer = 30000; CorruptForcesTimer = 30000;
} }
void EnterCombat(Unit* /*who*/) { } void EnterCombat(Unit* /*who*/) { }
@@ -70,32 +71,30 @@ public:
return; return;
//Wrath //Wrath
if (Wrath_Timer <= diff) if (WrathTimer <= diff)
{ {
Unit* target = NULL; if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (target)
DoCast(target, SPELL_WRATH); DoCast(target, SPELL_WRATH);
Wrath_Timer = 8000; WrathTimer = 8000;
} }
else Wrath_Timer -= diff; else WrathTimer -= diff;
//EntanglingRoots //EntanglingRoots
if (EntanglingRoots_Timer <= diff) if (EntanglingRootsTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_ENTANGLINGROOTS); DoCastVictim(SPELL_ENTANGLINGROOTS);
EntanglingRoots_Timer = 20000; EntanglingRootsTimer = 20000;
} }
else EntanglingRoots_Timer -= diff; else EntanglingRootsTimer -= diff;
//CorruptForces //CorruptForces
if (CorruptForces_Timer <= diff) if (CorruptForcesTimer <= diff)
{ {
me->InterruptNonMeleeSpells(false); me->InterruptNonMeleeSpells(false);
DoCast(me, SPELL_CORRUPT_FORCES); DoCast(me, SPELL_CORRUPT_FORCES);
CorruptForces_Timer = 20000; CorruptForcesTimer = 20000;
} }
else CorruptForces_Timer -= diff; else CorruptForcesTimer -= diff;
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
@@ -23,7 +23,8 @@ SDComment:
SDCategory: Maraudon SDCategory: Maraudon
EndScriptData */ EndScriptData */
#include "ScriptPCH.h" #include "ScriptMgr.h"
#include "ScriptedCreature.h"
enum Spells enum Spells
{ {
@@ -46,15 +47,15 @@ public:
{ {
boss_landslideAI(Creature* creature) : ScriptedAI(creature) {} boss_landslideAI(Creature* creature) : ScriptedAI(creature) {}
uint32 KnockAway_Timer; uint32 KnockAwayTimer;
uint32 Trample_Timer; uint32 TrampleTimer;
uint32 Landslide_Timer; uint32 LandslideTimer;
void Reset() void Reset()
{ {
KnockAway_Timer = 8000; KnockAwayTimer = 8000;
Trample_Timer = 2000; TrampleTimer = 2000;
Landslide_Timer = 0; LandslideTimer = 0;
} }
void EnterCombat(Unit* /*who*/) void EnterCombat(Unit* /*who*/)
@@ -66,32 +67,32 @@ public:
if (!UpdateVictim()) if (!UpdateVictim())
return; return;
//KnockAway_Timer //KnockAwayTimer
if (KnockAway_Timer <= diff) if (KnockAwayTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_KNOCKAWAY); DoCastVictim(SPELL_KNOCKAWAY);
KnockAway_Timer = 15000; KnockAwayTimer = 15000;
} }
else KnockAway_Timer -= diff; else KnockAwayTimer -= diff;
//Trample_Timer //TrampleTimer
if (Trample_Timer <= diff) if (TrampleTimer <= diff)
{ {
DoCast(me, SPELL_TRAMPLE); DoCast(me, SPELL_TRAMPLE);
Trample_Timer = 8000; TrampleTimer = 8000;
} }
else Trample_Timer -= diff; else TrampleTimer -= diff;
//Landslide //Landslide
if (HealthBelowPct(50)) if (HealthBelowPct(50))
{ {
if (Landslide_Timer <= diff) if (LandslideTimer <= diff)
{ {
me->InterruptNonMeleeSpells(false); me->InterruptNonMeleeSpells(false);
DoCast(me, SPELL_LANDSLIDE); DoCast(me, SPELL_LANDSLIDE);
Landslide_Timer = 60000; LandslideTimer = 60000;
} }
else Landslide_Timer -= diff; else LandslideTimer -= diff;
} }
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
@@ -23,7 +23,9 @@ SDComment:
SDCategory: Maraudon SDCategory: Maraudon
EndScriptData */ EndScriptData */
#include "ScriptPCH.h" #include "ScriptMgr.h"
#include "ScriptedCreature.h"
enum Spells enum Spells
{ {
SPELL_TOXICVOLLEY = 21687, SPELL_TOXICVOLLEY = 21687,
@@ -44,24 +46,22 @@ public:
{ {
boss_noxxionAI(Creature* creature) : ScriptedAI(creature) {} boss_noxxionAI(Creature* creature) : ScriptedAI(creature) {}
uint32 ToxicVolley_Timer; uint32 ToxicVolleyTimer;
uint32 Uppercut_Timer; uint32 UppercutTimer;
uint32 Adds_Timer; uint32 AddsTimer;
uint32 Invisible_Timer; uint32 InvisibleTimer;
bool Invisible; bool Invisible;
void Reset() void Reset()
{ {
ToxicVolley_Timer = 7000; ToxicVolleyTimer = 7000;
Uppercut_Timer = 16000; UppercutTimer = 16000;
Adds_Timer = 19000; AddsTimer = 19000;
Invisible_Timer = 15000; //Too much too low? InvisibleTimer = 15000; //Too much too low?
Invisible = false; Invisible = false;
} }
void EnterCombat(Unit* /*who*/) void EnterCombat(Unit* /*who*/) {}
{
}
void SummonAdds(Unit* victim) void SummonAdds(Unit* victim)
{ {
@@ -71,7 +71,7 @@ public:
void UpdateAI(const uint32 diff) void UpdateAI(const uint32 diff)
{ {
if (Invisible && Invisible_Timer <= diff) if (Invisible && InvisibleTimer <= diff)
{ {
//Become visible again //Become visible again
me->setFaction(14); me->setFaction(14);
@@ -83,7 +83,7 @@ public:
} }
else if (Invisible) else if (Invisible)
{ {
Invisible_Timer -= diff; InvisibleTimer -= diff;
//Do nothing while invisible //Do nothing while invisible
return; return;
} }
@@ -92,24 +92,24 @@ public:
if (!UpdateVictim()) if (!UpdateVictim())
return; return;
//ToxicVolley_Timer //ToxicVolleyTimer
if (ToxicVolley_Timer <= diff) if (ToxicVolleyTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_TOXICVOLLEY); DoCastVictim(SPELL_TOXICVOLLEY);
ToxicVolley_Timer = 9000; ToxicVolleyTimer = 9000;
} }
else ToxicVolley_Timer -= diff; else ToxicVolleyTimer -= diff;
//Uppercut_Timer //UppercutTimer
if (Uppercut_Timer <= diff) if (UppercutTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_UPPERCUT); DoCastVictim(SPELL_UPPERCUT);
Uppercut_Timer = 12000; UppercutTimer = 12000;
} }
else Uppercut_Timer -= diff; else UppercutTimer -= diff;
//Adds_Timer //AddsTimer
if (!Invisible && Adds_Timer <= diff) if (!Invisible && AddsTimer <= diff)
{ {
//Interrupt any spell casting //Interrupt any spell casting
//me->m_canMove = true; //me->m_canMove = true;
@@ -124,11 +124,11 @@ public:
SummonAdds(me->getVictim()); SummonAdds(me->getVictim());
SummonAdds(me->getVictim()); SummonAdds(me->getVictim());
Invisible = true; Invisible = true;
Invisible_Timer = 15000; InvisibleTimer = 15000;
Adds_Timer = 40000; AddsTimer = 40000;
} }
else Adds_Timer -= diff; else AddsTimer -= diff;
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
@@ -23,7 +23,8 @@ SDComment:
SDCategory: Maraudon SDCategory: Maraudon
EndScriptData */ EndScriptData */
#include "ScriptPCH.h" #include "ScriptMgr.h"
#include "ScriptedCreature.h"
enum Spells enum Spells
{ {
@@ -47,17 +48,17 @@ public:
{ {
boss_ptheradrasAI(Creature* creature) : ScriptedAI(creature) {} boss_ptheradrasAI(Creature* creature) : ScriptedAI(creature) {}
uint32 Dustfield_Timer; uint32 DustfieldTimer;
uint32 Boulder_Timer; uint32 BoulderTimer;
uint32 Thrash_Timer; uint32 ThrashTimer;
uint32 RepulsiveGaze_Timer; uint32 RepulsiveGazeTimer;
void Reset() void Reset()
{ {
Dustfield_Timer = 8000; DustfieldTimer = 8000;
Boulder_Timer = 2000; BoulderTimer = 2000;
Thrash_Timer = 5000; ThrashTimer = 5000;
RepulsiveGaze_Timer = 23000; RepulsiveGazeTimer = 23000;
} }
void EnterCombat(Unit* /*who*/) {} void EnterCombat(Unit* /*who*/) {}
@@ -72,40 +73,38 @@ public:
if (!UpdateVictim()) if (!UpdateVictim())
return; return;
//Dustfield_Timer //DustfieldTimer
if (Dustfield_Timer <= diff) if (DustfieldTimer <= diff)
{ {
DoCast(me, SPELL_DUSTFIELD); DoCast(me, SPELL_DUSTFIELD);
Dustfield_Timer = 14000; DustfieldTimer = 14000;
} }
else Dustfield_Timer -= diff; else DustfieldTimer -= diff;
//Boulder_Timer //BoulderTimer
if (Boulder_Timer <= diff) if (BoulderTimer <= diff)
{ {
Unit* target = NULL; if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (target)
DoCast(target, SPELL_BOULDER); DoCast(target, SPELL_BOULDER);
Boulder_Timer = 10000; BoulderTimer = 10000;
} }
else Boulder_Timer -= diff; else BoulderTimer -= diff;
//RepulsiveGaze_Timer //RepulsiveGazeTimer
if (RepulsiveGaze_Timer <= diff) if (RepulsiveGazeTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_REPULSIVEGAZE); DoCastVictim(SPELL_REPULSIVEGAZE);
RepulsiveGaze_Timer = 20000; RepulsiveGazeTimer = 20000;
} }
else RepulsiveGaze_Timer -= diff; else RepulsiveGazeTimer -= diff;
//Thrash_Timer //ThrashTimer
if (Thrash_Timer <= diff) if (ThrashTimer <= diff)
{ {
DoCast(me, SPELL_THRASH); DoCast(me, SPELL_THRASH);
Thrash_Timer = 18000; ThrashTimer = 18000;
} }
else Thrash_Timer -= diff; else ThrashTimer -= diff;
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
@@ -25,10 +25,15 @@ SDComment: <Known bugs>
SDCategory: Onyxia's Lair SDCategory: Onyxia's Lair
EndScriptData */ EndScriptData */
#include "ScriptPCH.h" #include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "Cell.h"
#include "CellImpl.h"
#include "GridNotifiers.h"
#include "GridNotifiersImpl.h"
#include "onyxias_lair.h" #include "onyxias_lair.h"
enum eYells enum Yells
{ {
SAY_AGGRO = -1249000, SAY_AGGRO = -1249000,
SAY_KILL = -1249001, SAY_KILL = -1249001,
@@ -37,7 +42,7 @@ enum eYells
EMOTE_BREATH = -1249004, EMOTE_BREATH = -1249004,
}; };
enum eSpells enum Spells
{ {
// Phase 1 spells // Phase 1 spells
SPELL_WING_BUFFET = 18500, SPELL_WING_BUFFET = 18500,
@@ -67,15 +72,15 @@ enum eSpells
SPELL_BELLOWING_ROAR = 18431, SPELL_BELLOWING_ROAR = 18431,
}; };
struct sOnyxMove struct OnyxMove
{ {
uint32 uiLocId; uint8 LocId;
uint32 uiLocIdEnd; uint8 LocIdEnd;
uint32 uiSpellId; uint32 SpellId;
float fX, fY, fZ; float fX, fY, fZ;
}; };
static sOnyxMove aMoveData[]= static OnyxMove MoveData[8]=
{ {
{0, 1, SPELL_BREATH_WEST_TO_EAST, -33.5561f, -182.682f, -56.9457f}, //west {0, 1, SPELL_BREATH_WEST_TO_EAST, -33.5561f, -182.682f, -56.9457f}, //west
{1, 0, SPELL_BREATH_EAST_TO_WEST, -31.4963f, -250.123f, -55.1278f}, //east {1, 0, SPELL_BREATH_EAST_TO_WEST, -31.4963f, -250.123f, -55.1278f}, //east
@@ -87,11 +92,11 @@ static sOnyxMove aMoveData[]=
{7, 6, SPELL_BREATH_NORTH_TO_SOUTH, 22.8763f, -217.152f, -55.0548f}, //north {7, 6, SPELL_BREATH_NORTH_TO_SOUTH, 22.8763f, -217.152f, -55.0548f}, //north
}; };
const Position MiddleRoomLocation = {-23.6155f, -215.357f, -55.7344f, 0.0f}; Position const MiddleRoomLocation = {-23.6155f, -215.357f, -55.7344f, 0.0f};
const Position Phase2Location = {-80.924f, -214.299f, -82.942f, 0.0f}; Position const Phase2Location = {-80.924f, -214.299f, -82.942f, 0.0f};
static Position aSpawnLocations[3]= Position const SpawnLocations[3]=
{ {
//Whelps //Whelps
{-30.127f, -254.463f, -89.440f, 0.0f}, {-30.127f, -254.463f, -89.440f, 0.0f},
@@ -121,58 +126,58 @@ public:
InstanceScript* instance; InstanceScript* instance;
SummonList Summons; SummonList Summons;
uint32 m_uiPhase; uint32 Phase;
uint32 m_uiFlameBreathTimer; uint32 FlameBreathTimer;
uint32 m_uiCleaveTimer; uint32 CleaveTimer;
uint32 m_uiTailSweepTimer; uint32 TailSweepTimer;
uint32 m_uiWingBuffetTimer; uint32 WingBuffetTimer;
uint32 m_uiMovePoint; uint8 MovePoint;
uint32 m_uiMovementTimer; uint32 MovementTimer;
sOnyxMove* m_pPointData; OnyxMove* PointData;
uint32 m_uiFireballTimer; uint32 FireballTimer;
uint32 m_uiWhelpTimer; uint32 WhelpTimer;
uint32 m_uiLairGuardTimer; uint32 LairGuardTimer;
uint32 m_uiDeepBreathTimer; uint32 DeepBreathTimer;
uint32 m_uiBellowingRoarTimer; uint32 BellowingRoarTimer;
uint8 m_uiSummonWhelpCount; uint8 SummonWhelpCount;
bool m_bIsMoving; bool IsMoving;
void Reset() void Reset()
{ {
if (!IsCombatMovementAllowed()) if (!IsCombatMovementAllowed())
SetCombatMovement(true); SetCombatMovement(true);
m_uiPhase = PHASE_START; Phase = PHASE_START;
m_uiFlameBreathTimer = urand(10000, 20000); FlameBreathTimer = urand(10000, 20000);
m_uiTailSweepTimer = urand(15000, 20000); TailSweepTimer = urand(15000, 20000);
m_uiCleaveTimer = urand(2000, 5000); CleaveTimer = urand(2000, 5000);
m_uiWingBuffetTimer = urand(10000, 20000); WingBuffetTimer = urand(10000, 20000);
m_uiMovePoint = urand(0, 5); MovePoint = urand(0, 5);
m_uiMovementTimer = 14000; MovementTimer = 14000;
m_pPointData = GetMoveData(); PointData = GetMoveData();
m_uiFireballTimer = 15000; FireballTimer = 15000;
m_uiWhelpTimer = 60000; WhelpTimer = 60000;
m_uiLairGuardTimer = 60000; LairGuardTimer = 60000;
m_uiDeepBreathTimer = 85000; DeepBreathTimer = 85000;
m_uiBellowingRoarTimer = 30000; BellowingRoarTimer = 30000;
Summons.DespawnAll(); Summons.DespawnAll();
m_uiSummonWhelpCount = 0; SummonWhelpCount = 0;
m_bIsMoving = false; IsMoving = false;
if (instance) if (instance)
{ {
instance->SetData(DATA_ONYXIA, NOT_STARTED); instance->SetData(DATA_ONYXIA, NOT_STARTED);
instance->SetData(DATA_ONYXIA_PHASE, m_uiPhase); instance->SetData(DATA_ONYXIA_PHASE, Phase);
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
} }
} }
@@ -206,7 +211,7 @@ public:
switch (summoned->GetEntry()) switch (summoned->GetEntry())
{ {
case NPC_WHELP: case NPC_WHELP:
++m_uiSummonWhelpCount; ++SummonWhelpCount;
break; break;
case NPC_LAIRGUARD: case NPC_LAIRGUARD:
summoned->setActive(true); summoned->setActive(true);
@@ -225,17 +230,17 @@ public:
DoScriptText(SAY_KILL, me); DoScriptText(SAY_KILL, me);
} }
void SpellHit(Unit* /*pCaster*/, const SpellInfo* pSpell) void SpellHit(Unit* /*pCaster*/, const SpellInfo* Spell)
{ {
if (pSpell->Id == SPELL_BREATH_EAST_TO_WEST || if (Spell->Id == SPELL_BREATH_EAST_TO_WEST ||
pSpell->Id == SPELL_BREATH_WEST_TO_EAST || Spell->Id == SPELL_BREATH_WEST_TO_EAST ||
pSpell->Id == SPELL_BREATH_SE_TO_NW || Spell->Id == SPELL_BREATH_SE_TO_NW ||
pSpell->Id == SPELL_BREATH_NW_TO_SE || Spell->Id == SPELL_BREATH_NW_TO_SE ||
pSpell->Id == SPELL_BREATH_SW_TO_NE || Spell->Id == SPELL_BREATH_SW_TO_NE ||
pSpell->Id == SPELL_BREATH_NE_TO_SW) Spell->Id == SPELL_BREATH_NE_TO_SW)
{ {
m_pPointData = GetMoveData(); PointData = GetMoveData();
m_uiMovePoint = m_pPointData->uiLocIdEnd; MovePoint = PointData->LocIdEnd;
me->SetSpeed(MOVE_FLIGHT, 1.5f); me->SetSpeed(MOVE_FLIGHT, 1.5f);
me->GetMotionMaster()->MovePoint(8, MiddleRoomLocation); me->GetMotionMaster()->MovePoint(8, MiddleRoomLocation);
@@ -249,16 +254,16 @@ public:
switch (id) switch (id)
{ {
case 8: case 8:
m_pPointData = GetMoveData(); PointData = GetMoveData();
if (m_pPointData) if (PointData)
{ {
me->SetSpeed(MOVE_FLIGHT, 1.0f); me->SetSpeed(MOVE_FLIGHT, 1.0f);
me->GetMotionMaster()->MovePoint(m_pPointData->uiLocId, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ); me->GetMotionMaster()->MovePoint(PointData->LocId, PointData->fX, PointData->fY, PointData->fZ);
} }
break; break;
case 9: case 9:
me->GetMotionMaster()->MoveChase(me->getVictim()); me->GetMotionMaster()->MoveChase(me->getVictim());
m_uiBellowingRoarTimer = 1000; BellowingRoarTimer = 1000;
break; break;
case 10: case 10:
me->SetCanFly(true); me->SetCanFly(true);
@@ -266,39 +271,39 @@ public:
me->SetSpeed(MOVE_FLIGHT, 1.0f); me->SetSpeed(MOVE_FLIGHT, 1.0f);
DoScriptText(SAY_PHASE_2_TRANS, me); DoScriptText(SAY_PHASE_2_TRANS, me);
if (instance) if (instance)
instance->SetData(DATA_ONYXIA_PHASE, m_uiPhase); instance->SetData(DATA_ONYXIA_PHASE, Phase);
m_uiWhelpTimer = 5000; WhelpTimer = 5000;
m_uiLairGuardTimer = 15000; LairGuardTimer = 15000;
break; break;
case 11: case 11:
if (m_pPointData) if (PointData)
me->GetMotionMaster()->MovePoint(m_pPointData->uiLocId, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ); me->GetMotionMaster()->MovePoint(PointData->LocId, PointData->fX, PointData->fY, PointData->fZ);
me->GetMotionMaster()->Clear(false); me->GetMotionMaster()->Clear(false);
me->GetMotionMaster()->MoveIdle(); me->GetMotionMaster()->MoveIdle();
break; break;
default: default:
m_bIsMoving = false; IsMoving = false;
break; break;
} }
} }
} }
void SpellHitTarget(Unit* target, const SpellInfo* pSpell) void SpellHitTarget(Unit* target, const SpellInfo* Spell)
{ {
//Workaround - Couldn't find a way to group this spells (All Eruption) //Workaround - Couldn't find a way to group this spells (All Eruption)
if (((pSpell->Id >= 17086 && pSpell->Id <= 17095) || if (((Spell->Id >= 17086 && Spell->Id <= 17095) ||
(pSpell->Id == 17097) || (Spell->Id == 17097) ||
(pSpell->Id >= 18351 && pSpell->Id <= 18361) || (Spell->Id >= 18351 && Spell->Id <= 18361) ||
(pSpell->Id >= 18564 && pSpell->Id <= 18576) || (Spell->Id >= 18564 && Spell->Id <= 18576) ||
(pSpell->Id >= 18578 && pSpell->Id <= 18607) || (Spell->Id >= 18578 && Spell->Id <= 18607) ||
(pSpell->Id == 18609) || (Spell->Id == 18609) ||
(pSpell->Id >= 18611 && pSpell->Id <= 18628) || (Spell->Id >= 18611 && Spell->Id <= 18628) ||
(pSpell->Id >= 21132 && pSpell->Id <= 21133) || (Spell->Id >= 21132 && Spell->Id <= 21133) ||
(pSpell->Id >= 21135 && pSpell->Id <= 21139) || (Spell->Id >= 21135 && Spell->Id <= 21139) ||
(pSpell->Id >= 22191 && pSpell->Id <= 22202) || (Spell->Id >= 22191 && Spell->Id <= 22202) ||
(pSpell->Id >= 22267 && pSpell->Id <= 22268)) && (Spell->Id >= 22267 && Spell->Id <= 22268)) &&
(target->GetTypeId() == TYPEID_PLAYER)) (target->GetTypeId() == TYPEID_PLAYER))
{ {
if (instance) if (instance)
@@ -308,14 +313,14 @@ public:
} }
} }
sOnyxMove* GetMoveData() OnyxMove* GetMoveData()
{ {
uint32 uiMaxCount = sizeof(aMoveData)/sizeof(sOnyxMove); uint8 MaxCount = sizeof(MoveData)/sizeof(OnyxMove);
for (uint32 i = 0; i < uiMaxCount; ++i) for (uint8 i = 0; i < MaxCount; ++i)
{ {
if (aMoveData[i].uiLocId == m_uiMovePoint) if (MoveData[i].LocId == MovePoint)
return &aMoveData[i]; return &MoveData[i];
} }
return NULL; return NULL;
@@ -323,84 +328,84 @@ public:
void SetNextRandomPoint() void SetNextRandomPoint()
{ {
uint32 uiMaxCount = sizeof(aMoveData)/sizeof(sOnyxMove); uint8 MaxCount = sizeof(MoveData)/sizeof(OnyxMove);
uint32 iTemp = rand()%(uiMaxCount-1); uint8 iTemp = urand(0, MaxCount-1);
if (iTemp >= m_uiMovePoint) if (iTemp >= MovePoint)
++iTemp; ++iTemp;
m_uiMovePoint = iTemp; MovePoint = iTemp;
} }
void UpdateAI(const uint32 uiDiff) void UpdateAI(const uint32 Diff)
{ {
if (!UpdateVictim()) if (!UpdateVictim())
return; return;
//Common to PHASE_START && PHASE_END //Common to PHASE_START && PHASE_END
if (m_uiPhase == PHASE_START || m_uiPhase == PHASE_END) if (Phase == PHASE_START || Phase == PHASE_END)
{ {
//Specific to PHASE_START || PHASE_END //Specific to PHASE_START || PHASE_END
if (m_uiPhase == PHASE_START) if (Phase == PHASE_START)
{ {
if (HealthBelowPct(60)) if (HealthBelowPct(60))
{ {
SetCombatMovement(false); SetCombatMovement(false);
m_uiPhase = PHASE_BREATH; Phase = PHASE_BREATH;
me->GetMotionMaster()->MovePoint(10, Phase2Location); me->GetMotionMaster()->MovePoint(10, Phase2Location);
return; return;
} }
} }
else else
{ {
if (m_uiBellowingRoarTimer <= uiDiff) if (BellowingRoarTimer <= Diff)
{ {
DoCastVictim(SPELL_BELLOWING_ROAR); DoCastVictim(SPELL_BELLOWING_ROAR);
// Eruption // Eruption
GameObject* pFloor = NULL; GameObject* Floor = NULL;
Trinity::GameObjectInRangeCheck check(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 15); Trinity::GameObjectInRangeCheck check(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 15);
Trinity::GameObjectLastSearcher<Trinity::GameObjectInRangeCheck> searcher(me, pFloor, check); Trinity::GameObjectLastSearcher<Trinity::GameObjectInRangeCheck> searcher(me, Floor, check);
me->VisitNearbyGridObject(30, searcher); me->VisitNearbyGridObject(30, searcher);
if (instance && pFloor) if (instance && Floor)
instance->SetData64(DATA_FLOOR_ERUPTION_GUID, pFloor->GetGUID()); instance->SetData64(DATA_FLOOR_ERUPTION_GUID, Floor->GetGUID());
m_uiBellowingRoarTimer = 30000; BellowingRoarTimer = 30000;
} }
else else
m_uiBellowingRoarTimer -= uiDiff; BellowingRoarTimer -= Diff;
} }
if (m_uiFlameBreathTimer <= uiDiff) if (FlameBreathTimer <= Diff)
{ {
DoCastVictim(SPELL_FLAME_BREATH); DoCastVictim(SPELL_FLAME_BREATH);
m_uiFlameBreathTimer = urand(10000, 20000); FlameBreathTimer = urand(10000, 20000);
} }
else else
m_uiFlameBreathTimer -= uiDiff; FlameBreathTimer -= Diff;
if (m_uiTailSweepTimer <= uiDiff) if (TailSweepTimer <= Diff)
{ {
DoCastAOE(SPELL_TAIL_SWEEP); DoCastAOE(SPELL_TAIL_SWEEP);
m_uiTailSweepTimer = urand(15000, 20000); TailSweepTimer = urand(15000, 20000);
} }
else else
m_uiTailSweepTimer -= uiDiff; TailSweepTimer -= Diff;
if (m_uiCleaveTimer <= uiDiff) if (CleaveTimer <= Diff)
{ {
DoCastVictim(SPELL_CLEAVE); DoCastVictim(SPELL_CLEAVE);
m_uiCleaveTimer = urand(2000, 5000); CleaveTimer = urand(2000, 5000);
} }
else else
m_uiCleaveTimer -= uiDiff; CleaveTimer -= Diff;
if (m_uiWingBuffetTimer <= uiDiff) if (WingBuffetTimer <= Diff)
{ {
DoCastVictim(SPELL_WING_BUFFET); DoCastVictim(SPELL_WING_BUFFET);
m_uiWingBuffetTimer = urand(15000, 30000); WingBuffetTimer = urand(15000, 30000);
} }
else else
m_uiWingBuffetTimer -= uiDiff; WingBuffetTimer -= Diff;
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
@@ -408,86 +413,86 @@ public:
{ {
if (HealthBelowPct(40)) if (HealthBelowPct(40))
{ {
m_uiPhase = PHASE_END; Phase = PHASE_END;
if (instance) if (instance)
instance->SetData(DATA_ONYXIA_PHASE, m_uiPhase); instance->SetData(DATA_ONYXIA_PHASE, Phase);
DoScriptText(SAY_PHASE_3_TRANS, me); DoScriptText(SAY_PHASE_3_TRANS, me);
SetCombatMovement(true); SetCombatMovement(true);
me->SetCanFly(false); me->SetCanFly(false);
m_bIsMoving = false; IsMoving = false;
me->GetMotionMaster()->MovePoint(9, me->GetHomePosition()); me->GetMotionMaster()->MovePoint(9, me->GetHomePosition());
return; return;
} }
if (m_uiDeepBreathTimer <= uiDiff) if (DeepBreathTimer <= Diff)
{ {
if (!m_bIsMoving) if (!IsMoving)
{ {
if (me->IsNonMeleeSpellCasted(false)) if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(false); me->InterruptNonMeleeSpells(false);
DoScriptText(EMOTE_BREATH, me); DoScriptText(EMOTE_BREATH, me);
DoCast(me, m_pPointData->uiSpellId); DoCast(me, PointData->SpellId);
m_uiDeepBreathTimer = 70000; DeepBreathTimer = 70000;
} }
} }
else else
m_uiDeepBreathTimer -= uiDiff; DeepBreathTimer -= Diff;
if (m_uiMovementTimer <= uiDiff) if (MovementTimer <= Diff)
{ {
if (!m_bIsMoving) if (!IsMoving)
{ {
SetNextRandomPoint(); SetNextRandomPoint();
m_pPointData = GetMoveData(); PointData = GetMoveData();
if (!m_pPointData) if (!PointData)
return; return;
me->GetMotionMaster()->MovePoint(m_pPointData->uiLocId, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ); me->GetMotionMaster()->MovePoint(PointData->LocId, PointData->fX, PointData->fY, PointData->fZ);
m_bIsMoving = true; IsMoving = true;
m_uiMovementTimer = 25000; MovementTimer = 25000;
} }
} }
else else
m_uiMovementTimer -= uiDiff; MovementTimer -= Diff;
if (m_uiFireballTimer <= uiDiff) if (FireballTimer <= Diff)
{ {
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE) if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE)
{ {
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_FIREBALL); DoCast(target, SPELL_FIREBALL);
m_uiFireballTimer = 8000; FireballTimer = 8000;
} }
} }
else else
m_uiFireballTimer -= uiDiff; FireballTimer -= Diff;
if (m_uiLairGuardTimer <= uiDiff) if (LairGuardTimer <= Diff)
{ {
me->SummonCreature(NPC_LAIRGUARD, aSpawnLocations[2].GetPositionX(), aSpawnLocations[2].GetPositionY(), aSpawnLocations[2].GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_DESPAWN); me->SummonCreature(NPC_LAIRGUARD, SpawnLocations[2], TEMPSUMMON_CORPSE_DESPAWN);
m_uiLairGuardTimer = 30000; LairGuardTimer = 30000;
} }
else else
m_uiLairGuardTimer -= uiDiff; LairGuardTimer -= Diff;
if (m_uiWhelpTimer <= uiDiff) if (WhelpTimer <= Diff)
{ {
me->SummonCreature(NPC_WHELP, aSpawnLocations[0].GetPositionX(), aSpawnLocations[0].GetPositionY(), aSpawnLocations[0].GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_DESPAWN); me->SummonCreature(NPC_WHELP, SpawnLocations[0], TEMPSUMMON_CORPSE_DESPAWN);
me->SummonCreature(NPC_WHELP, aSpawnLocations[1].GetPositionX(), aSpawnLocations[1].GetPositionY(), aSpawnLocations[1].GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_DESPAWN); me->SummonCreature(NPC_WHELP, SpawnLocations[1], TEMPSUMMON_CORPSE_DESPAWN);
if (m_uiSummonWhelpCount >= RAID_MODE(20, 40)) if (SummonWhelpCount >= RAID_MODE(20, 40))
{ {
m_uiSummonWhelpCount = 0; SummonWhelpCount = 0;
m_uiWhelpTimer = 90000; WhelpTimer = 90000;
} }
else else
m_uiWhelpTimer = 500; WhelpTimer = 500;
} }
else else
m_uiWhelpTimer -= uiDiff; WhelpTimer -= Diff;
} }
} }
}; };
@@ -22,7 +22,12 @@ SDComment:
SDCategory: Onyxia's Lair SDCategory: Onyxia's Lair
EndScriptData */ EndScriptData */
#include "ScriptPCH.h" #include "ScriptMgr.h"
#include "InstanceScript.h"
#include "Cell.h"
#include "CellImpl.h"
#include "GridNotifiers.h"
#include "GridNotifiersImpl.h"
#include "onyxias_lair.h" #include "onyxias_lair.h"
class instance_onyxias_lair : public InstanceMapScript class instance_onyxias_lair : public InstanceMapScript
@@ -44,27 +49,27 @@ public:
std::map<uint64, uint32> FloorEruptionGUID[2]; std::map<uint64, uint32> FloorEruptionGUID[2];
std::queue<uint64> FloorEruptionGUIDQueue; std::queue<uint64> FloorEruptionGUIDQueue;
uint64 m_uiOnyxiasGUID; uint64 OnyxiasGUID;
uint32 m_uiOnyxiaLiftoffTimer; uint32 OnyxiaLiftoffTimer;
uint32 m_uiManyWhelpsCounter; uint32 ManyWhelpsCounter;
uint32 m_uiEruptTimer; uint32 EruptTimer;
uint8 m_auiEncounter[MAX_ENCOUNTER]; uint8 Encounter[MAX_ENCOUNTER];
bool m_bAchievManyWhelpsHandleIt; bool AchievManyWhelpsHandleIt;
bool m_bAchievSheDeepBreathMore; bool AchievSheDeepBreathMore;
void Initialize() void Initialize()
{ {
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); memset(&Encounter, 0, sizeof(Encounter));
m_uiOnyxiasGUID = 0; OnyxiasGUID = 0;
m_uiOnyxiaLiftoffTimer = 0; OnyxiaLiftoffTimer = 0;
m_uiManyWhelpsCounter = 0; ManyWhelpsCounter = 0;
m_bAchievManyWhelpsHandleIt = false; AchievManyWhelpsHandleIt = false;
m_bAchievSheDeepBreathMore = true; AchievSheDeepBreathMore = true;
m_uiEruptTimer = 0; EruptTimer = 0;
} }
void OnCreatureCreate(Creature* creature) void OnCreatureCreate(Creature* creature)
@@ -72,7 +77,7 @@ public:
switch (creature->GetEntry()) switch (creature->GetEntry())
{ {
case NPC_ONYXIA: case NPC_ONYXIA:
m_uiOnyxiasGUID = creature->GetGUID(); OnyxiasGUID = creature->GetGUID();
break; break;
} }
} }
@@ -93,7 +98,7 @@ public:
if (Creature* temp = go->SummonCreature(NPC_WHELP, goPos, TEMPSUMMON_CORPSE_DESPAWN)) if (Creature* temp = go->SummonCreature(NPC_WHELP, goPos, TEMPSUMMON_CORPSE_DESPAWN))
{ {
temp->SetInCombatWithZone(); temp->SetInCombatWithZone();
++m_uiManyWhelpsCounter; ++ManyWhelpsCounter;
} }
break; break;
} }
@@ -139,88 +144,88 @@ public:
FloorEruptionGUID[1].erase(floorEruptedGUID); FloorEruptionGUID[1].erase(floorEruptedGUID);
} }
void SetData(uint32 uiType, uint32 uiData) void SetData(uint32 Type, uint32 Data)
{ {
switch (uiType) switch (Type)
{ {
case DATA_ONYXIA: case DATA_ONYXIA:
m_auiEncounter[0] = uiData; Encounter[0] = Data;
if (uiData == IN_PROGRESS) if (Data == IN_PROGRESS)
SetData(DATA_SHE_DEEP_BREATH_MORE, IN_PROGRESS); SetData(DATA_SHE_DEEP_BREATH_MORE, IN_PROGRESS);
break; break;
case DATA_ONYXIA_PHASE: case DATA_ONYXIA_PHASE:
if (uiData == PHASE_BREATH) //Used to mark the liftoff phase if (Data == PHASE_BREATH) //Used to mark the liftoff phase
{ {
m_bAchievManyWhelpsHandleIt = false; AchievManyWhelpsHandleIt = false;
m_uiManyWhelpsCounter = 0; ManyWhelpsCounter = 0;
m_uiOnyxiaLiftoffTimer = 10*IN_MILLISECONDS; OnyxiaLiftoffTimer = 10*IN_MILLISECONDS;
} }
break; break;
case DATA_SHE_DEEP_BREATH_MORE: case DATA_SHE_DEEP_BREATH_MORE:
if (uiData == IN_PROGRESS) if (Data == IN_PROGRESS)
{ {
m_bAchievSheDeepBreathMore = true; AchievSheDeepBreathMore = true;
} }
else if (uiData == FAIL) else if (Data == FAIL)
{ {
m_bAchievSheDeepBreathMore = false; AchievSheDeepBreathMore = false;
} }
break; break;
} }
if (uiType < MAX_ENCOUNTER && uiData == DONE) if (Type < MAX_ENCOUNTER && Data == DONE)
SaveToDB(); SaveToDB();
} }
void SetData64(uint32 uiType, uint64 uiData) void SetData64(uint32 Type, uint64 Data)
{ {
switch (uiType) switch (Type)
{ {
case DATA_FLOOR_ERUPTION_GUID: case DATA_FLOOR_ERUPTION_GUID:
FloorEruptionGUID[1] = FloorEruptionGUID[0]; FloorEruptionGUID[1] = FloorEruptionGUID[0];
FloorEruptionGUIDQueue.push(uiData); FloorEruptionGUIDQueue.push(Data);
m_uiEruptTimer = 2500; EruptTimer = 2500;
break; break;
} }
} }
uint32 GetData(uint32 uiType) uint32 GetData(uint32 Type)
{ {
switch (uiType) switch (Type)
{ {
case DATA_ONYXIA: case DATA_ONYXIA:
return m_auiEncounter[0]; return Encounter[0];
} }
return 0; return 0;
} }
uint64 GetData64(uint32 uiData) uint64 GetData64(uint32 Data)
{ {
switch (uiData) switch (Data)
{ {
case DATA_ONYXIA_GUID: case DATA_ONYXIA_GUID:
return m_uiOnyxiasGUID; return OnyxiasGUID;
} }
return 0; return 0;
} }
void Update(uint32 uiDiff) void Update(uint32 Diff)
{ {
if (GetData(DATA_ONYXIA) == IN_PROGRESS) if (GetData(DATA_ONYXIA) == IN_PROGRESS)
{ {
if (m_uiOnyxiaLiftoffTimer && m_uiOnyxiaLiftoffTimer <= uiDiff) if (OnyxiaLiftoffTimer && OnyxiaLiftoffTimer <= Diff)
{ {
m_uiOnyxiaLiftoffTimer = 0; OnyxiaLiftoffTimer = 0;
if (m_uiManyWhelpsCounter >= 50) if (ManyWhelpsCounter >= 50)
m_bAchievManyWhelpsHandleIt = true; AchievManyWhelpsHandleIt = true;
} else m_uiOnyxiaLiftoffTimer -= uiDiff; } else OnyxiaLiftoffTimer -= Diff;
} }
if (!FloorEruptionGUIDQueue.empty()) if (!FloorEruptionGUIDQueue.empty())
{ {
if (m_uiEruptTimer <= uiDiff) if (EruptTimer <= Diff)
{ {
uint32 treeHeight = 0; uint32 treeHeight = 0;
do do
@@ -229,10 +234,10 @@ public:
FloorEruption(FloorEruptionGUIDQueue.front()); FloorEruption(FloorEruptionGUIDQueue.front());
FloorEruptionGUIDQueue.pop(); FloorEruptionGUIDQueue.pop();
} while (!FloorEruptionGUIDQueue.empty() && (*FloorEruptionGUID[1].find(FloorEruptionGUIDQueue.front())).second == treeHeight); } while (!FloorEruptionGUIDQueue.empty() && (*FloorEruptionGUID[1].find(FloorEruptionGUIDQueue.front())).second == treeHeight);
m_uiEruptTimer = 1000; EruptTimer = 1000;
} }
else else
m_uiEruptTimer -= uiDiff; EruptTimer -= Diff;
} }
} }
@@ -242,10 +247,10 @@ public:
{ {
case ACHIEV_CRITERIA_MANY_WHELPS_10_PLAYER: // Criteria for achievement 4403: Many Whelps! Handle It! (10 player) Hatch 50 eggs in 10s case ACHIEV_CRITERIA_MANY_WHELPS_10_PLAYER: // Criteria for achievement 4403: Many Whelps! Handle It! (10 player) Hatch 50 eggs in 10s
case ACHIEV_CRITERIA_MANY_WHELPS_25_PLAYER: // Criteria for achievement 4406: Many Whelps! Handle It! (25 player) Hatch 50 eggs in 10s case ACHIEV_CRITERIA_MANY_WHELPS_25_PLAYER: // Criteria for achievement 4406: Many Whelps! Handle It! (25 player) Hatch 50 eggs in 10s
return m_bAchievManyWhelpsHandleIt; return AchievManyWhelpsHandleIt;
case ACHIEV_CRITERIA_DEEP_BREATH_10_PLAYER: // Criteria for achievement 4404: She Deep Breaths More (10 player) Everybody evade Deep Breath case ACHIEV_CRITERIA_DEEP_BREATH_10_PLAYER: // Criteria for achievement 4404: She Deep Breaths More (10 player) Everybody evade Deep Breath
case ACHIEV_CRITERIA_DEEP_BREATH_25_PLAYER: // Criteria for achievement 4407: She Deep Breaths More (25 player) Everybody evade Deep Breath case ACHIEV_CRITERIA_DEEP_BREATH_25_PLAYER: // Criteria for achievement 4407: She Deep Breaths More (25 player) Everybody evade Deep Breath
return m_bAchievSheDeepBreathMore; return AchievSheDeepBreathMore;
} }
return false; return false;
} }
@@ -18,13 +18,13 @@
#ifndef DEF_ONYXIAS_LAIR_H #ifndef DEF_ONYXIAS_LAIR_H
#define DEF_ONYXIAS_LAIR_H #define DEF_ONYXIAS_LAIR_H
enum eData64 enum Data64
{ {
DATA_ONYXIA_GUID, DATA_ONYXIA_GUID,
DATA_FLOOR_ERUPTION_GUID DATA_FLOOR_ERUPTION_GUID
}; };
enum eInstanceData enum InstanceData
{ {
DATA_ONYXIA, DATA_ONYXIA,
MAX_ENCOUNTER, MAX_ENCOUNTER,
@@ -34,7 +34,7 @@ enum eInstanceData
DATA_MANY_WHELPS_COUNT DATA_MANY_WHELPS_COUNT
}; };
enum eCreatures enum Creatures
{ {
NPC_WHELP = 11262, NPC_WHELP = 11262,
NPC_LAIRGUARD = 36561, NPC_LAIRGUARD = 36561,
@@ -42,20 +42,20 @@ enum eCreatures
NPC_ONYXIA = 10184 NPC_ONYXIA = 10184
}; };
enum eOnyxiaPhases enum OnyxiaPhases
{ {
PHASE_START = 1, PHASE_START = 1,
PHASE_BREATH = 2, PHASE_BREATH = 2,
PHASE_END = 3 PHASE_END = 3
}; };
enum eGameObjects enum GameObjects
{ {
GO_WHELP_SPAWNER = 176510, GO_WHELP_SPAWNER = 176510,
GO_WHELP_EGG = 176511 GO_WHELP_EGG = 176511
}; };
enum eAchievementData enum AchievementData
{ {
ACHIEV_CRITERIA_MANY_WHELPS_10_PLAYER = 12565, // Criteria for achievement 4403: Many Whelps! Handle It! (10 player) Hatch 50 eggs in 10s ACHIEV_CRITERIA_MANY_WHELPS_10_PLAYER = 12565, // Criteria for achievement 4403: Many Whelps! Handle It! (10 player) Hatch 50 eggs in 10s
ACHIEV_CRITERIA_MANY_WHELPS_25_PLAYER = 12568, // Criteria for achievement 4406: Many Whelps! Handle It! (25 player) Hatch 50 eggs in 10s ACHIEV_CRITERIA_MANY_WHELPS_25_PLAYER = 12568, // Criteria for achievement 4406: Many Whelps! Handle It! (25 player) Hatch 50 eggs in 10s