* Rename InstanceData to InstanceScript
* Rename *mgr to their new names in scripts project * Mass convert all the scripts (NEEDS THOROUGH TESTING, because it was done automatically) Please, report bugs on issue tracker. --HG-- branch : trunk rename : src/server/game/Instances/InstanceData.cpp => src/server/game/Instances/InstanceScript.cpp rename : src/server/game/Instances/InstanceData.h => src/server/game/Instances/InstanceScript.h
This commit is contained in:
@@ -31,221 +31,231 @@ enum eSpells
|
||||
#define GOSSIP_ITEM_MORRIDUNE "Please port me to Darnassus"
|
||||
|
||||
const Position HomePosition = {-815.817,-145.299,-25.870, 0};
|
||||
|
||||
bool GoHello_blackfathom_altar(Player *pPlayer, GameObject* /*pGo*/)
|
||||
␍class go_blackfathom_altar : public GameObjectScript
|
||||
{
|
||||
if (!pPlayer->HasAura(SPELL_BLESSING_OF_BLACKFATHOM))
|
||||
pPlayer->AddAura(SPELL_BLESSING_OF_BLACKFATHOM,pPlayer);
|
||||
return true;
|
||||
}
|
||||
public:
|
||||
go_blackfathom_altar() : GameObjectScript("go_blackfathom_altar") { }
|
||||
|
||||
bool GoHello_blackfathom_fire(Player * /*pPlayer*/, GameObject* pGo)
|
||||
{
|
||||
ScriptedInstance *pInstance = pGo->GetInstanceData();
|
||||
|
||||
if (pInstance)
|
||||
bool OnGossipHello(Player *pPlayer, GameObject* /*pGo*/)
|
||||
{
|
||||
pGo->SetGoState(GO_STATE_ACTIVE);
|
||||
pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1);
|
||||
pInstance->SetData(DATA_FIRE, pInstance->GetData(DATA_FIRE) + 1);
|
||||
if (!pPlayer->HasAura(SPELL_BLESSING_OF_BLACKFATHOM))
|
||||
pPlayer->AddAura(SPELL_BLESSING_OF_BLACKFATHOM,pPlayer);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
struct npc_blackfathom_deeps_eventAI : public ScriptedAI
|
||||
};
|
||||
␍class go_blackfathom_fire : public GameObjectScript
|
||||
{
|
||||
npc_blackfathom_deeps_eventAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
public:
|
||||
go_blackfathom_fire() : GameObjectScript("go_blackfathom_fire") { }
|
||||
|
||||
bool OnGossipHello(Player * /*pPlayer*/, GameObject* pGo)
|
||||
{
|
||||
if (pCreature->isSummon())
|
||||
InstanceScript *pInstance = pGo->GetInstanceScript();
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
pCreature->SetHomePosition(HomePosition);
|
||||
AttackPlayer();
|
||||
pGo->SetGoState(GO_STATE_ACTIVE);
|
||||
pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1);
|
||||
pInstance->SetData(DATA_FIRE, pInstance->GetData(DATA_FIRE) + 1);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
};
|
||||
␍class npc_blackfathom_deeps_event : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_blackfathom_deeps_event() : CreatureScript("npc_blackfathom_deeps_event") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new npc_blackfathom_deeps_eventAI (pCreature);
|
||||
}
|
||||
|
||||
struct npc_blackfathom_deeps_eventAI : public ScriptedAI
|
||||
{
|
||||
npc_blackfathom_deeps_eventAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
if (pCreature->isSummon())
|
||||
{
|
||||
pCreature->SetHomePosition(HomePosition);
|
||||
AttackPlayer();
|
||||
}
|
||||
|
||||
pInstance = pCreature->GetInstanceScript();
|
||||
}
|
||||
|
||||
pInstance = pCreature->GetInstanceData();
|
||||
}
|
||||
InstanceScript* pInstance;
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
uint32 uiRavageTimer;
|
||||
uint32 uiFrostNovaTimer;
|
||||
uint32 uiFrostBoltVolleyTimer;
|
||||
|
||||
uint32 uiRavageTimer;
|
||||
uint32 uiFrostNovaTimer;
|
||||
uint32 uiFrostBoltVolleyTimer;
|
||||
bool bFlee;
|
||||
|
||||
bool bFlee;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
bFlee = false;
|
||||
|
||||
uiRavageTimer = urand(5000,8000);
|
||||
uiFrostNovaTimer = urand(9000,12000);
|
||||
uiFrostBoltVolleyTimer = urand(2000,4000);
|
||||
}
|
||||
|
||||
void AttackPlayer()
|
||||
{
|
||||
Map::PlayerList const &PlList = me->GetMap()->GetPlayers();
|
||||
|
||||
if (PlList.isEmpty())
|
||||
return;
|
||||
|
||||
for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
|
||||
void Reset()
|
||||
{
|
||||
if (Player* pPlayer = i->getSource())
|
||||
{
|
||||
if (pPlayer->isGameMaster())
|
||||
continue;
|
||||
bFlee = false;
|
||||
|
||||
if (pPlayer->isAlive())
|
||||
{
|
||||
me->SetInCombatWith(pPlayer);
|
||||
pPlayer->SetInCombatWith(me);
|
||||
me->AddThreat(pPlayer, 0.0f);
|
||||
}
|
||||
}
|
||||
uiRavageTimer = urand(5000,8000);
|
||||
uiFrostNovaTimer = urand(9000,12000);
|
||||
uiFrostBoltVolleyTimer = urand(2000,4000);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
switch (me->GetEntry())
|
||||
void AttackPlayer()
|
||||
{
|
||||
case NPC_AKU_MAI_SNAPJAW:
|
||||
Map::PlayerList const &PlList = me->GetMap()->GetPlayers();
|
||||
|
||||
if (PlList.isEmpty())
|
||||
return;
|
||||
|
||||
for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
|
||||
{
|
||||
if (uiRavageTimer <= uiDiff)
|
||||
if (Player* pPlayer = i->getSource())
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_RAVAGE);
|
||||
uiRavageTimer = urand(9000,14000);
|
||||
} else uiRavageTimer -= uiDiff;
|
||||
break;
|
||||
}
|
||||
case NPC_MURKSHALLOW_SOFTSHELL:
|
||||
case NPC_BARBED_CRUSTACEAN:
|
||||
{
|
||||
if (!bFlee && HealthBelowPct(15))
|
||||
{
|
||||
bFlee = true;
|
||||
me->DoFleeToGetAssistance();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NPC_AKU_MAI_SERVANT:
|
||||
{
|
||||
if (uiFrostBoltVolleyTimer <= uiDiff)
|
||||
{
|
||||
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
if (pPlayer->isGameMaster())
|
||||
continue;
|
||||
|
||||
if (pPlayer->isAlive())
|
||||
{
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_FROST_BOLT_VOLLEY);
|
||||
me->SetInCombatWith(pPlayer);
|
||||
pPlayer->SetInCombatWith(me);
|
||||
me->AddThreat(pPlayer, 0.0f);
|
||||
}
|
||||
uiFrostBoltVolleyTimer = urand(5000,8000);
|
||||
} else uiFrostBoltVolleyTimer -= uiDiff;
|
||||
if (uiFrostNovaTimer <= uiDiff)
|
||||
{
|
||||
DoCastAOE(SPELL_FROST_NOVA,false);
|
||||
uiFrostNovaTimer = urand(25000,30000);
|
||||
} else uiFrostNovaTimer -= uiDiff;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case NPC_AKU_MAI_SNAPJAW:
|
||||
{
|
||||
if (uiRavageTimer <= uiDiff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_RAVAGE);
|
||||
uiRavageTimer = urand(9000,14000);
|
||||
} else uiRavageTimer -= uiDiff;
|
||||
break;
|
||||
}
|
||||
case NPC_MURKSHALLOW_SOFTSHELL:
|
||||
case NPC_BARBED_CRUSTACEAN:
|
||||
{
|
||||
if (!bFlee && HealthBelowPct(15))
|
||||
{
|
||||
bFlee = true;
|
||||
me->DoFleeToGetAssistance();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NPC_AKU_MAI_SERVANT:
|
||||
{
|
||||
if (uiFrostBoltVolleyTimer <= uiDiff)
|
||||
{
|
||||
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
{
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_FROST_BOLT_VOLLEY);
|
||||
}
|
||||
uiFrostBoltVolleyTimer = urand(5000,8000);
|
||||
} else uiFrostBoltVolleyTimer -= uiDiff;
|
||||
if (uiFrostNovaTimer <= uiDiff)
|
||||
{
|
||||
DoCastAOE(SPELL_FROST_NOVA,false);
|
||||
uiFrostNovaTimer = urand(25000,30000);
|
||||
} else uiFrostNovaTimer -= uiDiff;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
{
|
||||
if (me->isSummon()) //we are not a normal spawn.
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_EVENT, pInstance->GetData(DATA_EVENT) + 1);
|
||||
}
|
||||
};
|
||||
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
{
|
||||
if (me->isSummon()) //we are not a normal spawn.
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_EVENT, pInstance->GetData(DATA_EVENT) + 1);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_blackfathom_deeps_event(Creature* pCreature)
|
||||
{
|
||||
return new npc_blackfathom_deeps_eventAI (pCreature);
|
||||
}
|
||||
|
||||
enum eMorridune
|
||||
{
|
||||
SAY_MORRIDUNE_1 = -1048003,
|
||||
SAY_MORRIDUNE_2 = -1048004
|
||||
};
|
||||
|
||||
struct npc_morriduneAI : public npc_escortAI
|
||||
␍class npc_morridune : public CreatureScript
|
||||
{
|
||||
npc_morriduneAI(Creature* pCreature) : npc_escortAI(pCreature)
|
||||
{
|
||||
DoScriptText(SAY_MORRIDUNE_1,pCreature);
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
Start(false,false,NULL);
|
||||
}
|
||||
public:
|
||||
npc_morridune() : CreatureScript("npc_morridune") { }
|
||||
|
||||
void WaypointReached(uint32 uiPoint)
|
||||
bool OnGossipSelect(Player* pPlayer, Creature* /*pCreature*/, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
switch(uiPoint)
|
||||
switch(uiAction)
|
||||
{
|
||||
case 4:
|
||||
SetEscortPaused(true);
|
||||
me->SetOrientation(1.775791);
|
||||
me->SendMovementFlagUpdate();
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
DoScriptText(SAY_MORRIDUNE_2,me);
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
pPlayer->TeleportTo(1,9952.239,2284.277,1341.394,1.595);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MORRIDUNE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new npc_morriduneAI (pCreature);
|
||||
}
|
||||
|
||||
struct npc_morriduneAI : public npc_escortAI
|
||||
{
|
||||
npc_morriduneAI(Creature* pCreature) : npc_escortAI(pCreature)
|
||||
{
|
||||
DoScriptText(SAY_MORRIDUNE_1,pCreature);
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
Start(false,false,NULL);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPoint)
|
||||
{
|
||||
switch(uiPoint)
|
||||
{
|
||||
case 4:
|
||||
SetEscortPaused(true);
|
||||
me->SetOrientation(1.775791);
|
||||
me->SendMovementFlagUpdate();
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
DoScriptText(SAY_MORRIDUNE_2,me);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_morridune(Creature* pCreature)
|
||||
{
|
||||
return new npc_morriduneAI (pCreature);
|
||||
}
|
||||
|
||||
bool GossipHello_npc_morridune(Player* pPlayer, Creature* pCreature)
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MORRIDUNE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_morridune(Player* pPlayer, Creature* /*pCreature*/, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
switch(uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
pPlayer->TeleportTo(1,9952.239,2284.277,1341.394,1.595);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void AddSC_blackfathom_deeps()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "go_blackfathom_altar";
|
||||
newscript->pGOHello = &GoHello_blackfathom_altar;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "go_blackfathom_fire";
|
||||
newscript->pGOHello = &GoHello_blackfathom_fire;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_blackfathom_deeps_event";
|
||||
newscript->GetAI = &GetAI_npc_blackfathom_deeps_event;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_morridune";
|
||||
newscript->GetAI = &GetAI_npc_morridune;
|
||||
newscript->pGossipHello = &GossipHello_npc_morridune;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_morridune;
|
||||
newscript->RegisterSelf();
|
||||
new go_blackfathom_altar();
|
||||
new go_blackfathom_fire();
|
||||
new npc_blackfathom_deeps_event();
|
||||
new npc_morridune();
|
||||
}
|
||||
|
||||
@@ -23,71 +23,73 @@ enum Spells
|
||||
SPELL_POISON_CLOUD = 3815,
|
||||
SPELL_FRENZIED_RAGE = 3490
|
||||
};
|
||||
|
||||
struct boss_aku_maiAI : public ScriptedAI
|
||||
␍class boss_aku_mai : public CreatureScript
|
||||
{
|
||||
boss_aku_maiAI(Creature *c) : ScriptedAI(c)
|
||||
public:
|
||||
boss_aku_mai() : CreatureScript("boss_aku_mai") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
return new boss_aku_maiAI (pCreature);
|
||||
}
|
||||
|
||||
uint32 uiPoisonCloudTimer;
|
||||
bool bIsEnraged;
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
void Reset()
|
||||
struct boss_aku_maiAI : public ScriptedAI
|
||||
{
|
||||
uiPoisonCloudTimer = urand(5000,9000);
|
||||
bIsEnraged = false;
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_AKU_MAI, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_AKU_MAI, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_AKU_MAI, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiPoisonCloudTimer < diff)
|
||||
boss_aku_maiAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
DoCastVictim(SPELL_POISON_CLOUD);
|
||||
uiPoisonCloudTimer = urand(25000,50000);
|
||||
} else uiPoisonCloudTimer -= diff;
|
||||
|
||||
if (!bIsEnraged && HealthBelowPct(30))
|
||||
{
|
||||
DoCast(me,SPELL_FRENZIED_RAGE);
|
||||
bIsEnraged = true;
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
uint32 uiPoisonCloudTimer;
|
||||
bool bIsEnraged;
|
||||
|
||||
InstanceScript *pInstance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiPoisonCloudTimer = urand(5000,9000);
|
||||
bIsEnraged = false;
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_AKU_MAI, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_AKU_MAI, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_AKU_MAI, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiPoisonCloudTimer < diff)
|
||||
{
|
||||
DoCastVictim(SPELL_POISON_CLOUD);
|
||||
uiPoisonCloudTimer = urand(25000,50000);
|
||||
} else uiPoisonCloudTimer -= diff;
|
||||
|
||||
if (!bIsEnraged && HealthBelowPct(30))
|
||||
{
|
||||
DoCast(me,SPELL_FRENZIED_RAGE);
|
||||
bIsEnraged = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_aku_mai(Creature* pCreature)
|
||||
{
|
||||
return new boss_aku_maiAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_aku_mai()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_aku_mai";
|
||||
newscript->GetAI = &GetAI_boss_aku_mai;
|
||||
newscript->RegisterSelf();
|
||||
new boss_aku_mai();
|
||||
}
|
||||
|
||||
@@ -22,63 +22,65 @@ enum Spells
|
||||
{
|
||||
SPELL_NET = 6533
|
||||
};
|
||||
|
||||
struct boss_gelihastAI : public ScriptedAI
|
||||
␍class boss_gelihast : public CreatureScript
|
||||
{
|
||||
boss_gelihastAI(Creature *c) : ScriptedAI(c)
|
||||
public:
|
||||
boss_gelihast() : CreatureScript("boss_gelihast") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
return new boss_gelihastAI (pCreature);
|
||||
}
|
||||
|
||||
uint32 uiNetTimer;
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
void Reset()
|
||||
struct boss_gelihastAI : public ScriptedAI
|
||||
{
|
||||
uiNetTimer = urand(2000,4000);
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_GELIHAST, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_GELIHAST, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_GELIHAST, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiNetTimer < diff)
|
||||
boss_gelihastAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
DoCastVictim(SPELL_NET);
|
||||
uiNetTimer = urand(4000,7000);
|
||||
} else uiNetTimer -= diff;
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint32 uiNetTimer;
|
||||
|
||||
InstanceScript *pInstance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiNetTimer = urand(2000,4000);
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_GELIHAST, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_GELIHAST, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_GELIHAST, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiNetTimer < diff)
|
||||
{
|
||||
DoCastVictim(SPELL_NET);
|
||||
uiNetTimer = urand(4000,7000);
|
||||
} else uiNetTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_gelihast(Creature* pCreature)
|
||||
{
|
||||
return new boss_gelihastAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_gelihast()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_gelihast";
|
||||
newscript->GetAI = &GetAI_boss_gelihast;
|
||||
newscript->RegisterSelf();
|
||||
new boss_gelihast();
|
||||
}
|
||||
|
||||
@@ -31,77 +31,79 @@ enum Yells
|
||||
SAY_SLEEP = -1048001,
|
||||
SAY_DEATH = -1048000
|
||||
};
|
||||
|
||||
struct boss_kelrisAI : public ScriptedAI
|
||||
␍class boss_kelris : public CreatureScript
|
||||
{
|
||||
boss_kelrisAI(Creature *c) : ScriptedAI(c)
|
||||
public:
|
||||
boss_kelris() : CreatureScript("boss_kelris") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
return new boss_kelrisAI (pCreature);
|
||||
}
|
||||
|
||||
uint32 uiMindBlastTimer;
|
||||
uint32 uiSleepTimer;
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
void Reset()
|
||||
struct boss_kelrisAI : public ScriptedAI
|
||||
{
|
||||
uiMindBlastTimer = urand(2000,5000);
|
||||
uiSleepTimer = urand(9000,12000);
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_KELRIS, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_KELRIS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_KELRIS, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiMindBlastTimer < diff)
|
||||
boss_kelrisAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
DoCastVictim(SPELL_MIND_BLAST);
|
||||
uiMindBlastTimer = urand(7000,9000);
|
||||
} else uiMindBlastTimer -= diff;
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
if (uiSleepTimer < diff)
|
||||
uint32 uiMindBlastTimer;
|
||||
uint32 uiSleepTimer;
|
||||
|
||||
InstanceScript *pInstance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
uiMindBlastTimer = urand(2000,5000);
|
||||
uiSleepTimer = urand(9000,12000);
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_KELRIS, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_KELRIS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_KELRIS, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiMindBlastTimer < diff)
|
||||
{
|
||||
DoScriptText(SAY_SLEEP, me);
|
||||
DoCast(pTarget, SPELL_SLEEP);
|
||||
}
|
||||
uiSleepTimer = urand(15000,20000);
|
||||
} else uiSleepTimer -= diff;
|
||||
DoCastVictim(SPELL_MIND_BLAST);
|
||||
uiMindBlastTimer = urand(7000,9000);
|
||||
} else uiMindBlastTimer -= diff;
|
||||
|
||||
if (uiSleepTimer < diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
{
|
||||
DoScriptText(SAY_SLEEP, me);
|
||||
DoCast(pTarget, SPELL_SLEEP);
|
||||
}
|
||||
uiSleepTimer = urand(15000,20000);
|
||||
} else uiSleepTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_kelris(Creature* pCreature)
|
||||
{
|
||||
return new boss_kelrisAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_kelris()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_kelris";
|
||||
newscript->GetAI = &GetAI_boss_kelris;
|
||||
newscript->RegisterSelf();
|
||||
new boss_kelris();
|
||||
}
|
||||
|
||||
@@ -50,212 +50,215 @@ const Position SpawnsLocation[] =
|
||||
{-862.193, -174.251, -25.871, 6.182},
|
||||
{-863.895, -458.899, -33.891, 5.637}
|
||||
};
|
||||
|
||||
struct instance_blackfathom_deeps : public ScriptedInstance
|
||||
␍class instance_blackfathom_deeps : public InstanceMapScript
|
||||
{
|
||||
instance_blackfathom_deeps(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
|
||||
public:
|
||||
instance_blackfathom_deeps() : InstanceMapScript("instance_blackfathom_deeps") { }
|
||||
|
||||
uint64 m_uiTwilightLordKelrisGUID;
|
||||
uint64 m_uiShrine1GUID;
|
||||
uint64 m_uiShrine2GUID;
|
||||
uint64 m_uiShrine3GUID;
|
||||
uint64 m_uiShrine4GUID;
|
||||
uint64 m_uiShrineOfGelihastGUID;
|
||||
uint64 m_uiAltarOfTheDeepsGUID;
|
||||
uint64 m_uiMainDoorGUID;
|
||||
|
||||
uint8 m_auiEncounter[MAX_ENCOUNTER];
|
||||
uint8 m_uiCountFires;
|
||||
uint8 uiDeathTimes;
|
||||
|
||||
void Initialize()
|
||||
InstanceScript* GetInstanceData_InstanceMapScript(Map* pMap)
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
m_uiTwilightLordKelrisGUID = 0;
|
||||
m_uiShrine1GUID = 0;
|
||||
m_uiShrine2GUID = 0;
|
||||
m_uiShrine3GUID = 0;
|
||||
m_uiShrine4GUID = 0;
|
||||
m_uiShrineOfGelihastGUID = 0;
|
||||
m_uiAltarOfTheDeepsGUID = 0;
|
||||
m_uiMainDoorGUID = 0;
|
||||
m_uiCountFires = 0;
|
||||
uiDeathTimes = 0;
|
||||
return new instance_blackfathom_deeps_InstanceMapScript(pMap);
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
|
||||
struct instance_blackfathom_deeps_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
switch (pCreature->GetEntry())
|
||||
instance_blackfathom_deeps_InstanceMapScript(Map* pMap) : InstanceScript(pMap) {Initialize();};
|
||||
|
||||
uint64 m_uiTwilightLordKelrisGUID;
|
||||
uint64 m_uiShrine1GUID;
|
||||
uint64 m_uiShrine2GUID;
|
||||
uint64 m_uiShrine3GUID;
|
||||
uint64 m_uiShrine4GUID;
|
||||
uint64 m_uiShrineOfGelihastGUID;
|
||||
uint64 m_uiAltarOfTheDeepsGUID;
|
||||
uint64 m_uiMainDoorGUID;
|
||||
|
||||
uint8 m_auiEncounter[MAX_ENCOUNTER];
|
||||
uint8 m_uiCountFires;
|
||||
uint8 uiDeathTimes;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
case NPC_TWILIGHT_LORD_KELRIS:
|
||||
m_uiTwilightLordKelrisGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case NPC_LORGUS_JETT:
|
||||
pCreature->SetHomePosition(LorgusPosition[urand(0,3)]);
|
||||
break;
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
m_uiTwilightLordKelrisGUID = 0;
|
||||
m_uiShrine1GUID = 0;
|
||||
m_uiShrine2GUID = 0;
|
||||
m_uiShrine3GUID = 0;
|
||||
m_uiShrine4GUID = 0;
|
||||
m_uiShrineOfGelihastGUID = 0;
|
||||
m_uiAltarOfTheDeepsGUID = 0;
|
||||
m_uiMainDoorGUID = 0;
|
||||
m_uiCountFires = 0;
|
||||
uiDeathTimes = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
|
||||
{
|
||||
switch(pGo->GetEntry())
|
||||
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
|
||||
{
|
||||
case GO_FIRE_OF_AKU_MAI_1:
|
||||
m_uiShrine1GUID = pGo->GetGUID();
|
||||
break;
|
||||
case GO_FIRE_OF_AKU_MAI_2:
|
||||
m_uiShrine2GUID = pGo->GetGUID();
|
||||
break;
|
||||
case GO_FIRE_OF_AKU_MAI_3:
|
||||
m_uiShrine3GUID = pGo->GetGUID();
|
||||
break;
|
||||
case GO_FIRE_OF_AKU_MAI_4:
|
||||
m_uiShrine4GUID = pGo->GetGUID();
|
||||
break;
|
||||
case GO_SHRINE_OF_GELIHAST:
|
||||
m_uiShrineOfGelihastGUID = pGo->GetGUID();
|
||||
if (m_auiEncounter[0] != DONE)
|
||||
pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1);
|
||||
break;
|
||||
case GO_ALTAR_OF_THE_DEEPS:
|
||||
m_uiAltarOfTheDeepsGUID = pGo->GetGUID();
|
||||
if (m_auiEncounter[3] != DONE)
|
||||
pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1);
|
||||
break;
|
||||
case GO_AKU_MAI_DOOR:
|
||||
if (m_auiEncounter[2] == DONE)
|
||||
HandleGameObject(NULL,true,pGo);
|
||||
m_uiMainDoorGUID = pGo->GetGUID();
|
||||
break;
|
||||
switch (pCreature->GetEntry())
|
||||
{
|
||||
case NPC_TWILIGHT_LORD_KELRIS:
|
||||
m_uiTwilightLordKelrisGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case NPC_LORGUS_JETT:
|
||||
pCreature->SetHomePosition(LorgusPosition[urand(0,3)]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 uiType, uint32 uiData)
|
||||
{
|
||||
switch(uiType)
|
||||
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
|
||||
{
|
||||
case TYPE_GELIHAST:
|
||||
m_auiEncounter[0] = uiData;
|
||||
if (uiData == DONE)
|
||||
if (GameObject *pGo = instance->GetGameObject(m_uiShrineOfGelihastGUID))
|
||||
pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1);
|
||||
break;
|
||||
case TYPE_AKU_MAI:
|
||||
m_auiEncounter[3] = uiData;
|
||||
if (uiData == DONE)
|
||||
if (GameObject *pGo = instance->GetGameObject(m_uiAltarOfTheDeepsGUID))
|
||||
switch(pGo->GetEntry())
|
||||
{
|
||||
case GO_FIRE_OF_AKU_MAI_1:
|
||||
m_uiShrine1GUID = pGo->GetGUID();
|
||||
break;
|
||||
case GO_FIRE_OF_AKU_MAI_2:
|
||||
m_uiShrine2GUID = pGo->GetGUID();
|
||||
break;
|
||||
case GO_FIRE_OF_AKU_MAI_3:
|
||||
m_uiShrine3GUID = pGo->GetGUID();
|
||||
break;
|
||||
case GO_FIRE_OF_AKU_MAI_4:
|
||||
m_uiShrine4GUID = pGo->GetGUID();
|
||||
break;
|
||||
case GO_SHRINE_OF_GELIHAST:
|
||||
m_uiShrineOfGelihastGUID = pGo->GetGUID();
|
||||
if (m_auiEncounter[0] != DONE)
|
||||
pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1);
|
||||
break;
|
||||
case GO_ALTAR_OF_THE_DEEPS:
|
||||
m_uiAltarOfTheDeepsGUID = pGo->GetGUID();
|
||||
if (m_auiEncounter[3] != DONE)
|
||||
pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1);
|
||||
break;
|
||||
case GO_AKU_MAI_DOOR:
|
||||
if (m_auiEncounter[2] == DONE)
|
||||
HandleGameObject(NULL,true,pGo);
|
||||
m_uiMainDoorGUID = pGo->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 uiType, uint32 uiData)
|
||||
{
|
||||
switch(uiType)
|
||||
{
|
||||
case TYPE_GELIHAST:
|
||||
m_auiEncounter[0] = uiData;
|
||||
if (uiData == DONE)
|
||||
if (GameObject *pGo = instance->GetGameObject(m_uiShrineOfGelihastGUID))
|
||||
pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1);
|
||||
break;
|
||||
case TYPE_AKU_MAI:
|
||||
m_auiEncounter[3] = uiData;
|
||||
if (uiData == DONE)
|
||||
if (GameObject *pGo = instance->GetGameObject(m_uiAltarOfTheDeepsGUID))
|
||||
{
|
||||
pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1);
|
||||
pGo->SummonCreature(NPC_MORRIDUNE,SpawnsLocation[4], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
}
|
||||
break;
|
||||
case DATA_FIRE:
|
||||
m_uiCountFires = uiData;
|
||||
switch (m_uiCountFires)
|
||||
{
|
||||
pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1);
|
||||
pGo->SummonCreature(NPC_MORRIDUNE,SpawnsLocation[4], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
}
|
||||
break;
|
||||
case DATA_FIRE:
|
||||
m_uiCountFires = uiData;
|
||||
switch (m_uiCountFires)
|
||||
{
|
||||
case 1:
|
||||
if (GameObject* pGO = instance->GetGameObject(m_uiShrine1GUID))
|
||||
{
|
||||
pGO->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (GameObject* pGO = instance->GetGameObject(m_uiShrine1GUID))
|
||||
{
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
case 1:
|
||||
if (GameObject* pGO = instance->GetGameObject(m_uiShrine1GUID))
|
||||
{
|
||||
pGO->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (GameObject* pGO = instance->GetGameObject(m_uiShrine1GUID))
|
||||
{
|
||||
pGO->SummonCreature(NPC_AKU_MAI_SERVANT, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_AKU_MAI_SERVANT, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (GameObject* pGO = instance->GetGameObject(m_uiShrine1GUID))
|
||||
{
|
||||
pGO->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case DATA_EVENT:
|
||||
uiDeathTimes = uiData;
|
||||
if (uiDeathTimes == 18)
|
||||
HandleGameObject(m_uiMainDoorGUID,true);
|
||||
break;
|
||||
break;
|
||||
case 2:
|
||||
if (GameObject* pGO = instance->GetGameObject(m_uiShrine1GUID))
|
||||
{
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
{
|
||||
pGO->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (GameObject* pGO = instance->GetGameObject(m_uiShrine1GUID))
|
||||
{
|
||||
pGO->SummonCreature(NPC_AKU_MAI_SERVANT, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_AKU_MAI_SERVANT, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (GameObject* pGO = instance->GetGameObject(m_uiShrine1GUID))
|
||||
{
|
||||
pGO->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
pGO->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case DATA_EVENT:
|
||||
uiDeathTimes = uiData;
|
||||
if (uiDeathTimes == 18)
|
||||
HandleGameObject(m_uiMainDoorGUID,true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 uiType)
|
||||
{
|
||||
switch(uiType)
|
||||
uint32 GetData(uint32 uiType)
|
||||
{
|
||||
case TYPE_GELIHAST:
|
||||
return m_auiEncounter[0];
|
||||
case TYPE_KELRIS:
|
||||
return m_auiEncounter[1];
|
||||
case TYPE_SHRINE:
|
||||
return m_auiEncounter[2];
|
||||
case TYPE_AKU_MAI:
|
||||
return m_auiEncounter[3];
|
||||
case DATA_FIRE:
|
||||
return m_uiCountFires;
|
||||
case DATA_EVENT:
|
||||
return uiDeathTimes;
|
||||
switch(uiType)
|
||||
{
|
||||
case TYPE_GELIHAST:
|
||||
return m_auiEncounter[0];
|
||||
case TYPE_KELRIS:
|
||||
return m_auiEncounter[1];
|
||||
case TYPE_SHRINE:
|
||||
return m_auiEncounter[2];
|
||||
case TYPE_AKU_MAI:
|
||||
return m_auiEncounter[3];
|
||||
case DATA_FIRE:
|
||||
return m_uiCountFires;
|
||||
case DATA_EVENT:
|
||||
return uiDeathTimes;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 uiData)
|
||||
{
|
||||
switch(uiData)
|
||||
uint64 GetData64(uint32 uiData)
|
||||
{
|
||||
case DATA_TWILIGHT_LORD_KELRIS:
|
||||
return m_uiTwilightLordKelrisGUID;
|
||||
case DATA_SHRINE1:
|
||||
return m_uiShrine1GUID;
|
||||
case DATA_SHRINE2:
|
||||
return m_uiShrine2GUID;
|
||||
case DATA_SHRINE3:
|
||||
return m_uiShrine3GUID;
|
||||
case DATA_SHRINE4:
|
||||
return m_uiShrine4GUID;
|
||||
case DATA_SHRINE_OF_GELIHAST:
|
||||
return m_uiShrineOfGelihastGUID;
|
||||
case DATA_MAINDOOR:
|
||||
return m_uiMainDoorGUID;
|
||||
}
|
||||
switch(uiData)
|
||||
{
|
||||
case DATA_TWILIGHT_LORD_KELRIS:
|
||||
return m_uiTwilightLordKelrisGUID;
|
||||
case DATA_SHRINE1:
|
||||
return m_uiShrine1GUID;
|
||||
case DATA_SHRINE2:
|
||||
return m_uiShrine2GUID;
|
||||
case DATA_SHRINE3:
|
||||
return m_uiShrine3GUID;
|
||||
case DATA_SHRINE4:
|
||||
return m_uiShrine4GUID;
|
||||
case DATA_SHRINE_OF_GELIHAST:
|
||||
return m_uiShrineOfGelihastGUID;
|
||||
case DATA_MAINDOOR:
|
||||
return m_uiMainDoorGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
InstanceData* GetInstanceData_instance_blackfathom_deeps(Map* pMap)
|
||||
{
|
||||
return new instance_blackfathom_deeps(pMap);
|
||||
}
|
||||
|
||||
void AddSC_instance_blackfathom_deeps()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "instance_blackfathom_deeps";
|
||||
newscript->GetInstanceData = &GetInstanceData_instance_blackfathom_deeps;
|
||||
newscript->RegisterSelf();
|
||||
new instance_blackfathom_deeps();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user