Ruins of Ahn'Qiraj: Instance script + cleanup + boss placeholder's completion
First step of AQ20 remaking process --HG-- branch : trunk
This commit is contained in:
@@ -254,6 +254,7 @@ SET(trinityscript_LIB_SRCS
|
||||
scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp
|
||||
scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp
|
||||
scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp
|
||||
scripts/kalimdor/ruins_of_ahnqiraj/def_ruins_of_ahnqiraj.h
|
||||
scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp
|
||||
scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp
|
||||
scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp
|
||||
|
||||
@@ -22,26 +22,35 @@ SDCategory: Ruins of Ahn'Qiraj
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "def_ruins_of_ahnqiraj.h"
|
||||
|
||||
/*
|
||||
To do:
|
||||
make him fly from 70-100%
|
||||
*/
|
||||
|
||||
#define SPELL_STINGERSPRAY 25749
|
||||
#define SPELL_POISONSTINGER 25748 //only used in phase1
|
||||
#define SPELL_SUMMONSWARMER 25844 //might be 25708
|
||||
// #define SPELL_PARALYZE 23414 doesnt work correct (core)
|
||||
enum Spells
|
||||
{
|
||||
SPELL_STINGERSPRAY = 25749,
|
||||
SPELL_POISONSTINGER = 25748, //only used in phase1
|
||||
SPELL_SUMMONSWARMER = 25844, //might be 25708
|
||||
SPELL_PARALYZE = 23414 //doesnt work correct (core)
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL boss_ayamissAI : public ScriptedAI
|
||||
{
|
||||
boss_ayamissAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_ayamissAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
Unit *pTarget;
|
||||
uint32 STINGERSPRAY_Timer;
|
||||
uint32 POISONSTINGER_Timer;
|
||||
uint32 SUMMONSWARMER_Timer;
|
||||
uint32 phase;
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -50,11 +59,23 @@ struct TRINITY_DLL_DECL boss_ayamissAI : public ScriptedAI
|
||||
POISONSTINGER_Timer = 30000;
|
||||
SUMMONSWARMER_Timer = 60000;
|
||||
phase=1;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_AYAMISS_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
pTarget = who;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_AYAMISS_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_AYAMISS_EVENT, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
@@ -22,6 +22,51 @@ SDCategory: Ruins of Ahn'Qiraj
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "def_ruins_of_ahnqiraj.h"
|
||||
|
||||
#define EMOTE_TARGET -1509002
|
||||
enum Yells
|
||||
{
|
||||
EMOTE_TARGET = -1509002
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL boss_buruAI : public ScriptedAI
|
||||
{
|
||||
boss_buruAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_BURU_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_BURU_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_BURU_EVENT, DONE);
|
||||
}
|
||||
};
|
||||
CreatureAI* GetAI_boss_buru(Creature* pCreature)
|
||||
{
|
||||
return new boss_buruAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_buru()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_buru";
|
||||
newscript->GetAI = &GetAI_boss_buru;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
|
||||
@@ -22,31 +22,51 @@ SDCategory: Ruins of Ahn'Qiraj
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "def_ruins_of_ahnqiraj.h"
|
||||
|
||||
#define SPELL_MORTALWOUND 25646
|
||||
#define SPELL_SANDTRAP 25656
|
||||
#define SPELL_ENRAGE 28798
|
||||
enum Spells
|
||||
{
|
||||
SPELL_MORTALWOUND = 25646,
|
||||
SPELL_SANDTRAP = 25656,
|
||||
SPELL_ENRAGE = 28798,
|
||||
SPELL_SUMMON_PLAYER = 26446,
|
||||
SPELL_TRASH = 3391,
|
||||
SPELL_WIDE_SLASH = 25814
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL boss_kurinnaxxAI : public ScriptedAI
|
||||
{
|
||||
boss_kurinnaxxAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
Unit *pTarget;
|
||||
uint32 MORTALWOUND_Timer;
|
||||
uint32 SANDTRAP_Timer;
|
||||
uint32 i;
|
||||
boss_kurinnaxxAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
uint32 uiMortalWoundTimer;
|
||||
uint32 uiSandtrapTimer;
|
||||
bool bIsEnraged;
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
i=0;
|
||||
pTarget = NULL;
|
||||
MORTALWOUND_Timer = 30000;
|
||||
SANDTRAP_Timer = 30000;
|
||||
bIsEnraged = false;
|
||||
uiMortalWoundTimer = urand(2000,7000);
|
||||
uiSandtrapTimer = 30000;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_KURINNAXX_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_KURINNAXX_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
pTarget = who;
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_KURINNAXX_EVENT, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -55,25 +75,26 @@ struct TRINITY_DLL_DECL boss_kurinnaxxAI : public ScriptedAI
|
||||
return;
|
||||
|
||||
//If we are <30% cast enrage
|
||||
if (i==0 && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 30 && !m_creature->IsNonMeleeSpellCasted(false))
|
||||
if (!bIsEnraged && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 30 && !m_creature->IsNonMeleeSpellCasted(false))
|
||||
{
|
||||
i=1;
|
||||
DoCast(m_creature->getVictim(),SPELL_ENRAGE);
|
||||
bIsEnraged = true;
|
||||
DoCast(m_creature,SPELL_ENRAGE);
|
||||
}
|
||||
|
||||
//MORTALWOUND_Timer
|
||||
if (MORTALWOUND_Timer < diff)
|
||||
//uiMortalWoundTimer
|
||||
if (uiMortalWoundTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_MORTALWOUND);
|
||||
MORTALWOUND_Timer = 30000;
|
||||
}else MORTALWOUND_Timer -= diff;
|
||||
uiMortalWoundTimer = urand(2000,7000);;
|
||||
}else uiMortalWoundTimer -= diff;
|
||||
|
||||
//SANDTRAP_Timer
|
||||
if (SANDTRAP_Timer < diff)
|
||||
//uiSandtrapTimer
|
||||
if (uiSandtrapTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_SANDTRAP);
|
||||
SANDTRAP_Timer = 30000;
|
||||
}else SANDTRAP_Timer -= diff;
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget,SPELL_SANDTRAP);
|
||||
uiSandtrapTimer = 30000;
|
||||
}else uiSandtrapTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
@@ -22,19 +22,29 @@ SDCategory: Ruins of Ahn'Qiraj
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "def_ruins_of_ahnqiraj.h"
|
||||
|
||||
#define EMOTE_AGGRO -1509000
|
||||
#define EMOTE_MANA_FULL -1509001
|
||||
enum Emotes
|
||||
{
|
||||
EMOTE_AGGRO = -1509000,
|
||||
EMOTE_MANA_FULL = -1509001
|
||||
};
|
||||
|
||||
#define SPELL_TRAMPLE 15550
|
||||
#define SPELL_DRAINMANA 27256
|
||||
#define SPELL_ARCANEERUPTION 25672
|
||||
#define SPELL_SUMMONMANA 25681
|
||||
#define SPELL_GRDRSLEEP 24360 //Greater Dreamless Sleep
|
||||
enum Spells
|
||||
{
|
||||
SPELL_TRAMPLE = 15550,
|
||||
SPELL_DRAINMANA = 27256,
|
||||
SPELL_ARCANEERUPTION = 25672,
|
||||
SPELL_SUMMONMANA = 25681,
|
||||
SPELL_GRDRSLEEP = 24360 //Greater Dreamless Sleep
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL boss_moamAI : public ScriptedAI
|
||||
{
|
||||
boss_moamAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_moamAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
Unit *pTarget;
|
||||
uint32 TRAMPLE_Timer;
|
||||
@@ -42,6 +52,8 @@ struct TRINITY_DLL_DECL boss_moamAI : public ScriptedAI
|
||||
uint32 SUMMONMANA_Timer;
|
||||
uint32 i;
|
||||
uint32 j;
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -50,12 +62,24 @@ struct TRINITY_DLL_DECL boss_moamAI : public ScriptedAI
|
||||
pTarget = NULL;
|
||||
TRAMPLE_Timer = 30000;
|
||||
DRAINMANA_Timer = 30000;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MOAM_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
DoScriptText(EMOTE_AGGRO, m_creature);
|
||||
pTarget = who;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MOAM_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MOAM_EVENT, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
@@ -22,17 +22,58 @@ SDCategory: Ruins of Ahn'Qiraj
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "def_ruins_of_ahnqiraj.h"
|
||||
|
||||
#define SAY_SURPREME2 -1509019
|
||||
#define SAY_SURPREME3 -1509020
|
||||
enum Yells
|
||||
{
|
||||
SAY_SURPREME2 = -1509019,
|
||||
SAY_SURPREME3 = -1509020,
|
||||
SAY_RAND_INTRO1 = -1509021,
|
||||
SAY_RAND_INTRO2 = -1509022,
|
||||
SAY_RAND_INTRO3 = -1509023,
|
||||
SAY_RAND_INTRO4 = -1509024, //possibly old?
|
||||
SAY_AGGRO = -1509025,
|
||||
SAY_SLAY = -1509026,
|
||||
SAY_DEATH = -1509027
|
||||
};
|
||||
|
||||
#define SAY_RAND_INTRO1 -1509021
|
||||
#define SAY_RAND_INTRO2 -1509022
|
||||
#define SAY_RAND_INTRO3 -1509023
|
||||
#define SAY_RAND_INTRO4 -1509024 //possibly old?
|
||||
|
||||
#define SAY_AGGRO -1509025
|
||||
|
||||
#define SAY_SLAY -1509026
|
||||
#define SAY_DEATH -1509027
|
||||
struct TRINITY_DLL_DECL boss_ossirianAI : public ScriptedAI
|
||||
{
|
||||
boss_ossirianAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_OSSIRIAN_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_OSSIRIAN_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_OSSIRIAN_EVENT, DONE);
|
||||
}
|
||||
};
|
||||
CreatureAI* GetAI_boss_ossirian(Creature* pCreature)
|
||||
{
|
||||
return new boss_ossirianAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_ossirian()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_ossirian";
|
||||
newscript->GetAI = &GetAI_boss_ossirian;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
@@ -22,24 +22,64 @@ SDCategory: Ruins of Ahn'Qiraj
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "def_ruins_of_ahnqiraj.h"
|
||||
|
||||
#define SAY_ANDOROV_INTRO -1509003
|
||||
#define SAY_ANDOROV_ATTACK -1509004
|
||||
enum Yells
|
||||
{
|
||||
SAY_ANDOROV_INTRO = -1509003,
|
||||
SAY_ANDOROV_ATTACK = -1509004,
|
||||
SAY_WAVE3 = -1509005,
|
||||
SAY_WAVE4 = -1509006,
|
||||
SAY_WAVE5 = -1509007,
|
||||
SAY_WAVE6 = -1509008,
|
||||
SAY_WAVE7 = -1509009,
|
||||
SAY_INTRO = -1509010,
|
||||
SAY_UNK1 = -1509011,
|
||||
SAY_UNK2 = -1509012,
|
||||
SAY_UNK3 = -1509013,
|
||||
SAY_UNK4 = -1509014,
|
||||
SAY_DEAGGRO = -1509015,
|
||||
SAY_KILLS_ANDOROV = -1509016,
|
||||
SAY_COMPLETE_QUEST = -1509017 //Yell when realm complete quest 8743 for world event
|
||||
};
|
||||
|
||||
#define SAY_WAVE3 -1509005
|
||||
#define SAY_WAVE4 -1509006
|
||||
#define SAY_WAVE5 -1509007
|
||||
#define SAY_WAVE6 -1509008
|
||||
#define SAY_WAVE7 -1509009
|
||||
#define SAY_INTRO -1509010
|
||||
|
||||
#define SAY_UNK1 -1509011
|
||||
#define SAY_UNK2 -1509012
|
||||
#define SAY_UNK3 -1509013
|
||||
#define SAY_UNK4 -1509014
|
||||
|
||||
#define SAY_DEAGGRO -1509015
|
||||
#define SAY_KILLS_ANDOROV -1509016
|
||||
|
||||
#define SAY_COMPLETE_QUEST -1509017 //Yell when realm complete quest 8743 for world event
|
||||
struct TRINITY_DLL_DECL boss_rajaxxAI : public ScriptedAI
|
||||
{
|
||||
boss_rajaxxAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_RAJAXX_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_RAJAXX_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_RAJAXX_EVENT, DONE);
|
||||
}
|
||||
};
|
||||
CreatureAI* GetAI_boss_rajaxx(Creature* pCreature)
|
||||
{
|
||||
return new boss_rajaxxAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_rajaxx()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_rajaxx";
|
||||
newscript->GetAI = &GetAI_boss_rajaxx;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
#ifndef DEF_RUINS_OF_AHNQIRAJ_H
|
||||
#define DEF_RUINS_OF_AHNQIRAJ_H
|
||||
|
||||
enum Data
|
||||
{
|
||||
DATA_KURINNAXX_EVENT,
|
||||
DATA_RAJAXX_EVENT,
|
||||
DATA_MOAM_EVENT,
|
||||
DATA_BURU_EVENT,
|
||||
DATA_AYAMISS_EVENT,
|
||||
DATA_OSSIRIAN_EVENT
|
||||
};
|
||||
|
||||
enum Data64
|
||||
{
|
||||
DATA_KURINNAXX,
|
||||
DATA_RAJAXX,
|
||||
DATA_MOAM,
|
||||
DATA_BURU,
|
||||
DATA_AYAMISS,
|
||||
DATA_OSSIRIAN
|
||||
};
|
||||
|
||||
enum Bosses
|
||||
{
|
||||
CREATURE_KURINAXX = 15348,
|
||||
CREATURE_RAJAXX = 15341,
|
||||
CREATURE_MOAM = 15340,
|
||||
CREATURE_BURU = 15370,
|
||||
CREATURE_AYAMISS = 15369,
|
||||
CREATURE_OSSIRIAN = 15339
|
||||
};
|
||||
|
||||
#endif
|
||||
+179
@@ -22,4 +22,183 @@ SDCategory: Ruins of Ahn'Qiraj
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "def_ruins_of_ahnqiraj.h"
|
||||
#define MAX_ENCOUNTER 6
|
||||
|
||||
/* Ruins of Ahn'Qiraj encounters:
|
||||
0 - Kurinnaxx
|
||||
1 - General Rajaxx
|
||||
2 - Moam
|
||||
3 - Buru the Gorger
|
||||
4 - Ayamiss the Hunter
|
||||
5 - Ossirian the Unscarred */
|
||||
|
||||
struct TRINITY_DLL_DECL instance_ruins_of_ahn_qiraj : public ScriptedInstance
|
||||
{
|
||||
instance_ruins_of_ahn_qiraj(Map* pMap) : ScriptedInstance(pMap) { Initialize(); }
|
||||
|
||||
uint64 uiKurinaxx;
|
||||
uint64 uiRajaxx;
|
||||
uint64 uiMoam;
|
||||
uint64 uiBuru;
|
||||
uint64 uiAyamiss;
|
||||
uint64 uiOssirian;
|
||||
|
||||
uint8 m_auiEncounter[MAX_ENCOUNTER];
|
||||
std::string str_data;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
uiKurinaxx = 0;
|
||||
uiRajaxx = 0;
|
||||
uiMoam = 0;
|
||||
uiBuru = 0;
|
||||
uiAyamiss = 0;
|
||||
uiOssirian = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool add)
|
||||
{
|
||||
switch (pCreature->GetEntry())
|
||||
{
|
||||
case CREATURE_KURINAXX:
|
||||
uiKurinaxx = pCreature->GetGUID();
|
||||
break;
|
||||
case CREATURE_RAJAXX:
|
||||
uiRajaxx = pCreature->GetGUID();
|
||||
break;
|
||||
case CREATURE_MOAM:
|
||||
uiMoam = pCreature->GetGUID();
|
||||
break;
|
||||
case CREATURE_BURU:
|
||||
uiBuru = pCreature->GetGUID();
|
||||
break;
|
||||
case CREATURE_AYAMISS:
|
||||
uiAyamiss = pCreature->GetGUID();
|
||||
break;
|
||||
case CREATURE_OSSIRIAN:
|
||||
uiOssirian = pCreature->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 identifier)
|
||||
{
|
||||
switch(identifier)
|
||||
{
|
||||
case DATA_KURINNAXX_EVENT: return m_auiEncounter[0];
|
||||
case DATA_RAJAXX_EVENT: return m_auiEncounter[1];
|
||||
case DATA_MOAM_EVENT: return m_auiEncounter[2];
|
||||
case DATA_BURU_EVENT: return m_auiEncounter[3];
|
||||
case DATA_AYAMISS_EVENT: return m_auiEncounter[4];
|
||||
case DATA_OSSIRIAN_EVENT: return m_auiEncounter[5];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetData(uint32 identifier, uint32 data)
|
||||
{
|
||||
switch(identifier)
|
||||
{
|
||||
case DATA_KURINNAXX_EVENT:
|
||||
m_auiEncounter[0] = data;
|
||||
break;
|
||||
case DATA_RAJAXX_EVENT:
|
||||
m_auiEncounter[1] = data;
|
||||
break;
|
||||
case DATA_MOAM_EVENT:
|
||||
m_auiEncounter[2] = data;
|
||||
break;
|
||||
case DATA_BURU_EVENT:
|
||||
m_auiEncounter[3] = data;
|
||||
break;
|
||||
case DATA_AYAMISS_EVENT:
|
||||
m_auiEncounter[4] = data;
|
||||
break;
|
||||
case DATA_OSSIRIAN_EVENT:
|
||||
m_auiEncounter[5] = data;
|
||||
break;
|
||||
}
|
||||
|
||||
if (data == DONE)
|
||||
SaveToDB();
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 uiIdentifier)
|
||||
{
|
||||
switch(uiIdentifier)
|
||||
{
|
||||
case DATA_KURINNAXX: return uiKurinaxx;
|
||||
case DATA_RAJAXX: return uiRajaxx;
|
||||
case DATA_MOAM: return uiMoam;
|
||||
case DATA_BURU: return uiBuru;
|
||||
case DATA_AYAMISS: return uiAyamiss;
|
||||
case DATA_OSSIRIAN: return uiOssirian;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string GetSaveData()
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << "R A " << m_auiEncounter[0] << " " << m_auiEncounter[1] << " "
|
||||
<< m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5];
|
||||
|
||||
str_data = saveStream.str();
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return str_data;
|
||||
}
|
||||
|
||||
void Load(const char* in)
|
||||
{
|
||||
if (!in)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
|
||||
char dataHead1, dataHead2;
|
||||
uint16 data0,data1,data2, data3, data4, data5;
|
||||
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2 >> data3 >> data4 >> data5;
|
||||
|
||||
if (dataHead1 == 'R' && dataHead2 == 'A')
|
||||
{
|
||||
m_auiEncounter[0] = data0;
|
||||
m_auiEncounter[1] = data1;
|
||||
m_auiEncounter[2] = data2;
|
||||
m_auiEncounter[3] = data3;
|
||||
m_auiEncounter[4] = data4;
|
||||
m_auiEncounter[5] = data5;
|
||||
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
|
||||
}else OUT_LOAD_INST_DATA_FAIL;
|
||||
}
|
||||
};
|
||||
|
||||
InstanceData* GetInstanceData_instance_ruins_of_ahn_qiraj(Map* pMap)
|
||||
{
|
||||
return new instance_ruins_of_ahn_qiraj(pMap);
|
||||
}
|
||||
|
||||
void AddSC_instance_ruins_of_ahnqiraj()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "instance_ruins_of_ahnqiraj";
|
||||
newscript->GetInstanceData = &GetInstanceData_instance_ruins_of_ahn_qiraj;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
@@ -224,6 +224,13 @@ extern void AddSC_boss_onyxia(); //Onyxia's Lair
|
||||
extern void AddSC_boss_amnennar_the_coldbringer(); //Razorfen Downs
|
||||
extern void AddSC_razorfen_downs();
|
||||
extern void AddSC_razorfen_kraul(); //Razorfen Kraul
|
||||
extern void AddSC_boss_kurinnaxx(); //Ruins of ahn'qiraj
|
||||
extern void AddSC_boss_rajaxx();
|
||||
extern void AddSC_boss_moam();
|
||||
extern void AddSC_boss_buru();
|
||||
extern void AddSC_boss_ayamiss();
|
||||
extern void AddSC_boss_ossirian();
|
||||
extern void AddSC_instance_ruins_of_ahnqiraj();
|
||||
extern void AddSC_boss_cthun(); //Temple of ahn'qiraj
|
||||
extern void AddSC_boss_fankriss();
|
||||
extern void AddSC_boss_huhuran();
|
||||
@@ -659,6 +666,13 @@ void AddScripts()
|
||||
AddSC_boss_amnennar_the_coldbringer(); //Razorfen Downs
|
||||
AddSC_razorfen_downs();
|
||||
AddSC_razorfen_kraul(); //Razorfen Kraul
|
||||
AddSC_boss_kurinnaxx(); //Ruins of ahn'qiraj
|
||||
AddSC_boss_rajaxx();
|
||||
AddSC_boss_moam();
|
||||
AddSC_boss_buru();
|
||||
AddSC_boss_ayamiss();
|
||||
AddSC_boss_ossirian();
|
||||
AddSC_instance_ruins_of_ahnqiraj();
|
||||
AddSC_boss_cthun(); //Temple of ahn'qiraj
|
||||
AddSC_boss_fankriss();
|
||||
AddSC_boss_huhuran();
|
||||
|
||||
Reference in New Issue
Block a user