Scripts/Ulduar: Add script for Hodir encounter.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -39,7 +39,7 @@ public:
|
||||
|
||||
struct instance_ulduar_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_ulduar_InstanceMapScript(InstanceMap* map) : InstanceScript(map) {}
|
||||
instance_ulduar_InstanceMapScript(InstanceMap* map) : InstanceScript(map) { }
|
||||
|
||||
uint32 uiEncounter[MAX_ENCOUNTER];
|
||||
std::string m_strInstData;
|
||||
@@ -73,6 +73,8 @@ public:
|
||||
uint64 uiHodirChestGUID;
|
||||
uint64 uiFreyaChestGUID;
|
||||
|
||||
uint32 TeamInInstance;
|
||||
|
||||
std::set<uint64> mRubbleSpawns;
|
||||
|
||||
void Initialize()
|
||||
@@ -103,6 +105,7 @@ public:
|
||||
uiFreyaChestGUID = 0;
|
||||
uiLeviathanGateGUID = 0;
|
||||
uiVezaxDoorGUID = 0;
|
||||
TeamInInstance = 0;
|
||||
|
||||
memset(uiEncounter, 0, sizeof(uiEncounter));
|
||||
memset(uiAssemblyGUIDs, 0, sizeof(uiAssemblyGUIDs));
|
||||
@@ -120,9 +123,23 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnPlayerEnter(Player* player)
|
||||
{
|
||||
if (!TeamInInstance)
|
||||
TeamInInstance = player->GetTeam();
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
switch(creature->GetEntry())
|
||||
if (!TeamInInstance)
|
||||
{
|
||||
Map::PlayerList const& Players = instance->GetPlayers();
|
||||
if (!Players.isEmpty())
|
||||
if (Player* player = Players.begin()->getSource())
|
||||
TeamInInstance = player->GetTeam();
|
||||
}
|
||||
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case NPC_LEVIATHAN:
|
||||
uiLeviathanGUID = creature->GetGUID();
|
||||
@@ -199,13 +216,46 @@ public:
|
||||
case NPC_ALGALON:
|
||||
uiAlgalonGUID = creature->GetGUID();
|
||||
break;
|
||||
// Hodir's Helper NPCs
|
||||
case NPC_EIVI_NIGHTFEATHER:
|
||||
if (TeamInInstance == HORDE)
|
||||
creature->UpdateEntry(NPC_TOR_GREYCLOUD, HORDE);
|
||||
break;
|
||||
case NPC_ELLIE_NIGHTFEATHER:
|
||||
if (TeamInInstance == HORDE)
|
||||
creature->UpdateEntry(NPC_KAR_GREYCLOUD, HORDE);
|
||||
break;
|
||||
case NPC_ELEMENTALIST_MAHFUUN:
|
||||
if (TeamInInstance == HORDE)
|
||||
creature->UpdateEntry(NPC_SPIRITWALKER_TARA, HORDE);
|
||||
break;
|
||||
case NPC_ELEMENTALIST_AVUUN:
|
||||
if (TeamInInstance == HORDE)
|
||||
creature->UpdateEntry(NPC_SPIRITWALKER_YONA, HORDE);
|
||||
break;
|
||||
case NPC_MISSY_FLAMECUFFS:
|
||||
if (TeamInInstance == HORDE)
|
||||
creature->UpdateEntry(NPC_AMIRA_BLAZEWEAVER, HORDE);
|
||||
break;
|
||||
case NPC_SISSY_FLAMECUFFS:
|
||||
if (TeamInInstance == HORDE)
|
||||
creature->UpdateEntry(NPC_VEESHA_BLAZEWEAVER, HORDE);
|
||||
break;
|
||||
case NPC_FIELD_MEDIC_PENNY:
|
||||
if (TeamInInstance == HORDE)
|
||||
creature->UpdateEntry(NPC_BATTLE_PRIEST_ELIZA, HORDE);
|
||||
break;
|
||||
case NPC_FIELD_MEDIC_JESSI:
|
||||
if (TeamInInstance == HORDE)
|
||||
creature->UpdateEntry(NPC_BATTLE_PRIEST_GINA, HORDE);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* go)
|
||||
{
|
||||
switch(go->GetEntry())
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_KOLOGARN_CHEST_HERO:
|
||||
case GO_KOLOGARN_CHEST:
|
||||
@@ -221,7 +271,7 @@ public:
|
||||
break;
|
||||
case GO_THORIM_CHEST_HERO:
|
||||
case GO_THORIM_CHEST:
|
||||
uiThorimChestGUID =go->GetGUID();
|
||||
uiThorimChestGUID = go->GetGUID();
|
||||
break;
|
||||
case GO_HODIR_CHEST_HERO:
|
||||
case GO_HODIR_CHEST:
|
||||
@@ -276,22 +326,22 @@ public:
|
||||
void ProcessEvent(GameObject* /*go*/, uint32 eventId)
|
||||
{
|
||||
// Flame Leviathan's Tower Event triggers
|
||||
Creature* pFlameLeviathan = instance->GetCreature(uiLeviathanGUID);
|
||||
Creature* FlameLeviathan = instance->GetCreature(uiLeviathanGUID);
|
||||
|
||||
if (pFlameLeviathan && pFlameLeviathan->isAlive()) //No leviathan, no event triggering ;)
|
||||
switch(eventId)
|
||||
if (FlameLeviathan && FlameLeviathan->isAlive()) //No leviathan, no event triggering ;)
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_TOWER_OF_STORM_DESTROYED:
|
||||
pFlameLeviathan->AI()->DoAction(1);
|
||||
FlameLeviathan->AI()->DoAction(1);
|
||||
break;
|
||||
case EVENT_TOWER_OF_FROST_DESTROYED:
|
||||
pFlameLeviathan->AI()->DoAction(2);
|
||||
FlameLeviathan->AI()->DoAction(2);
|
||||
break;
|
||||
case EVENT_TOWER_OF_FLAMES_DESTROYED:
|
||||
pFlameLeviathan->AI()->DoAction(3);
|
||||
FlameLeviathan->AI()->DoAction(3);
|
||||
break;
|
||||
case EVENT_TOWER_OF_LIFE_DESTROYED:
|
||||
pFlameLeviathan->AI()->DoAction(4);
|
||||
FlameLeviathan->AI()->DoAction(4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#ifndef DEF_ULDUAR_H
|
||||
#define DEF_ULDUAR_H
|
||||
|
||||
enum eTypes
|
||||
enum UlduarTypes
|
||||
{
|
||||
MAX_ENCOUNTER = 15,
|
||||
|
||||
@@ -51,7 +51,7 @@ enum eTypes
|
||||
DATA_RIGHT_ARM,
|
||||
};
|
||||
|
||||
enum eNPCs
|
||||
enum UlduarNPCs
|
||||
{
|
||||
NPC_LEVIATHAN = 33113,
|
||||
NPC_IGNIS = 33118,
|
||||
@@ -81,9 +81,27 @@ enum eNPCs
|
||||
NPC_LEVIATHAN_MKII = 33432,
|
||||
NPC_VX_001 = 33651,
|
||||
NPC_AERIAL_COMMAND_UNIT = 33670,
|
||||
|
||||
// Hodir's Helper NPCs
|
||||
NPC_TOR_GREYCLOUD = 32941,
|
||||
NPC_KAR_GREYCLOUD = 33333,
|
||||
NPC_EIVI_NIGHTFEATHER = 33325,
|
||||
NPC_ELLIE_NIGHTFEATHER = 32901,
|
||||
NPC_SPIRITWALKER_TARA = 33332,
|
||||
NPC_SPIRITWALKER_YONA = 32950,
|
||||
NPC_ELEMENTALIST_MAHFUUN = 33328,
|
||||
NPC_ELEMENTALIST_AVUUN = 32900,
|
||||
NPC_AMIRA_BLAZEWEAVER = 33331,
|
||||
NPC_VEESHA_BLAZEWEAVER = 32946,
|
||||
NPC_MISSY_FLAMECUFFS = 32893,
|
||||
NPC_SISSY_FLAMECUFFS = 33327,
|
||||
NPC_BATTLE_PRIEST_ELIZA = 32948,
|
||||
NPC_BATTLE_PRIEST_GINA = 33330,
|
||||
NPC_FIELD_MEDIC_PENNY = 32897,
|
||||
NPC_FIELD_MEDIC_JESSI = 33326,
|
||||
};
|
||||
|
||||
enum eGameObjects
|
||||
enum UlduarGameObjects
|
||||
{
|
||||
GO_KOLOGARN_CHEST_HERO = 195047,
|
||||
GO_KOLOGARN_CHEST = 195046,
|
||||
@@ -106,7 +124,7 @@ enum eGameObjects
|
||||
GO_RAZOR_BROKEN_HARPOON = 194565,
|
||||
};
|
||||
|
||||
enum eTowerEvents
|
||||
enum UlduarTowerEvents
|
||||
{
|
||||
EVENT_TOWER_OF_STORM_DESTROYED = 21031,
|
||||
EVENT_TOWER_OF_FROST_DESTROYED = 21032,
|
||||
@@ -114,7 +132,7 @@ enum eTowerEvents
|
||||
EVENT_TOWER_OF_LIFE_DESTROYED = 21030
|
||||
};
|
||||
|
||||
enum eAchievementCriteria
|
||||
enum UlduarAchievementCriteria
|
||||
{
|
||||
ACHIEVEMENT_UNBROKEN_10 = 10044, // Leviathan
|
||||
ACHIEVEMENT_UNBROKEN_25 = 10045,
|
||||
|
||||
Reference in New Issue
Block a user