*Updated blackrock_depths - thanks for nofantasy

--HG--
branch : trunk
This commit is contained in:
Blaymoira
2009-01-18 19:48:01 +01:00
parent d97bb39393
commit 137d270f0a
16 changed files with 827 additions and 1142 deletions
+10
View File
@@ -0,0 +1,10 @@
UPDATE `creature_template` SET `ScriptName`='npc_grimstone' WHERE `entry`=10096;
UPDATE `creature_template` SET `ScriptName`='mob_phalanx' WHERE `entry`=9502;
UPDATE `creature_template` SET `ScriptName`='npc_rocknot' WHERE `entry`=9503;
DELETE FROM `areatrigger_scripts` WHERE `entry`=1526;
INSERT INTO `areatrigger_scripts` VALUES (1526,'at_ring_of_law');
DELETE FROM `script_texts` WHERE `entry`=-1230000;
INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES
(-1230000,'Ah, hits the spot!',0,0,0,'rocknot SAY_GOT_BEER');
+3 -9
View File
@@ -102,24 +102,18 @@ scripts/zone/black_temple/def_black_temple.h \
scripts/zone/black_temple/illidari_council.cpp \
scripts/zone/black_temple/instance_black_temple.cpp \
scripts/zone/blackrock_depths/blackrock_depths.cpp \
scripts/zone/blackrock_depths/instance_blackrock_depths.cpp \
scripts/zone/blackrock_depths/def_blackrock_depths.h \
scripts/zone/blackrock_depths/boss_ambassador_flamelash.cpp \
scripts/zone/blackrock_depths/boss_angerrel.cpp \
scripts/zone/blackrock_depths/boss_anubshiah.cpp \
scripts/zone/blackrock_depths/boss_doomrel.cpp \
scripts/zone/blackrock_depths/boss_doperel.cpp \
scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp \
scripts/zone/blackrock_depths/boss_general_angerforge.cpp \
scripts/zone/blackrock_depths/boss_gloomrel.cpp \
scripts/zone/blackrock_depths/boss_gorosh_the_dervish.cpp \
scripts/zone/blackrock_depths/boss_grizzle.cpp \
scripts/zone/blackrock_depths/boss_haterel.cpp \
scripts/zone/blackrock_depths/boss_high_interrogator_gerstahn.cpp \
scripts/zone/blackrock_depths/boss_magmus.cpp \
scripts/zone/blackrock_depths/boss_moira_bronzebeard.cpp \
scripts/zone/blackrock_depths/boss_seethrel.cpp \
scripts/zone/blackrock_depths/boss_vilerel.cpp \
scripts/zone/blackrock_depths/boss_tomb_of_seven.cpp \
scripts/zone/blackrock_depths/def_blackrock_depths.h \
scripts/zone/blackrock_depths/instance_blackrock_depths.cpp \
scripts/zone/blackrock_spire/boss_drakkisath.cpp \
scripts/zone/blackrock_spire/boss_gyth.cpp \
scripts/zone/blackrock_spire/boss_halycon.cpp \
+13 -23
View File
@@ -163,21 +163,16 @@ extern void AddSC_instance_black_temple();
//Blackrock Depths
extern void AddSC_blackrock_depths();
extern void AddSC_boss_ambassador_flamelash();
extern void AddSC_boss_angerrel();
extern void AddSC_boss_anubshiah();
extern void AddSC_boss_doomrel();
extern void AddSC_boss_doperel();
extern void AddSC_boss_draganthaurissan();
extern void AddSC_boss_general_angerforge();
extern void AddSC_boss_gloomrel();
extern void AddSC_boss_gorosh_the_dervish();
extern void AddSC_boss_grizzle();
extern void AddSC_boss_haterel();
extern void AddSC_boss_high_interrogator_gerstahn();
extern void AddSC_boss_magmus();
extern void AddSC_boss_moira_bronzebeard();
extern void AddSC_boss_seethrel();
extern void AddSC_boss_vilerel();
extern void AddSC_boss_tomb_of_seven();
extern void AddSC_instance_blackrock_depths();
//Blackrock Spire
extern void AddSC_boss_drakkisath();
@@ -1372,22 +1367,17 @@ void ScriptsInit()
//Blackfathom Depths
//Blackrock Depths
AddSC_blackrock_depths();
AddSC_boss_ambassador_flamelash();
AddSC_boss_angerrel();
AddSC_boss_anubshiah();
AddSC_boss_doomrel();
AddSC_boss_doperel();
AddSC_boss_draganthaurissan();
AddSC_boss_general_angerforge();
AddSC_boss_gloomrel();
AddSC_boss_gorosh_the_dervish();
AddSC_boss_grizzle();
AddSC_boss_haterel();
AddSC_boss_high_interrogator_gerstahn();
AddSC_boss_magmus();
AddSC_boss_moira_bronzebeard();
AddSC_boss_seethrel();
AddSC_boss_vilerel();
AddSC_boss_ambassador_flamelash();
AddSC_boss_anubshiah();
AddSC_boss_draganthaurissan();
AddSC_boss_general_angerforge();
AddSC_boss_gorosh_the_dervish();
AddSC_boss_grizzle();
AddSC_boss_high_interrogator_gerstahn();
AddSC_boss_magmus();
AddSC_boss_moira_bronzebeard();
AddSC_boss_tomb_of_seven();
AddSC_instance_blackrock_depths();
//Blackrock Spire
AddSC_boss_drakkisath();
+6 -30
View File
@@ -2099,23 +2099,11 @@
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_ambassador_flamelash.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_angerrel.cpp"
>
</File>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_anubshiah.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_doomrel.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_doperel.cpp"
>
</File>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_emperor_dagran_thaurissan.cpp"
>
@@ -2123,11 +2111,7 @@
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_general_angerforge.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_gloomrel.cpp"
>
</File>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_gorosh_the_dervish.cpp"
>
@@ -2135,11 +2119,7 @@
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_grizzle.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_haterel.cpp"
>
</File>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_high_interrogator_gerstahn.cpp"
>
@@ -2151,13 +2131,9 @@
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_moira_bronzebeard.cpp"
>
</File>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_seethrel.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_vilerel.cpp"
RelativePath="..\scripts\zone\blackrock_depths\boss_tomb_of_seven.cpp"
>
</File>
</Filter>
+6 -30
View File
@@ -2276,23 +2276,11 @@
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_ambassador_flamelash.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_angerrel.cpp"
>
</File>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_anubshiah.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_doomrel.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_doperel.cpp"
>
</File>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_emperor_dagran_thaurissan.cpp"
>
@@ -2300,11 +2288,7 @@
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_general_angerforge.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_gloomrel.cpp"
>
</File>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_gorosh_the_dervish.cpp"
>
@@ -2312,11 +2296,7 @@
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_grizzle.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_haterel.cpp"
>
</File>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_high_interrogator_gerstahn.cpp"
>
@@ -2328,13 +2308,9 @@
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_moira_bronzebeard.cpp"
>
</File>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_seethrel.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_vilerel.cpp"
RelativePath="..\scripts\zone\blackrock_depths\boss_tomb_of_seven.cpp"
>
</File>
</Filter>
+1 -25
View File
@@ -2262,22 +2262,10 @@
RelativePath="..\scripts\zone\blackrock_depths\boss_ambassador_flamelash.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_angerrel.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_anubshiah.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_doomrel.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_doperel.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_emperor_dagran_thaurissan.cpp"
>
@@ -2286,10 +2274,6 @@
RelativePath="..\scripts\zone\blackrock_depths\boss_general_angerforge.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_gloomrel.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_gorosh_the_dervish.cpp"
>
@@ -2298,10 +2282,6 @@
RelativePath="..\scripts\zone\blackrock_depths\boss_grizzle.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_haterel.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_high_interrogator_gerstahn.cpp"
>
@@ -2315,11 +2295,7 @@
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_seethrel.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\blackrock_depths\boss_vilerel.cpp"
RelativePath="..\scripts\zone\blackrock_depths\boss_tomb_of_seven.cpp"
>
</File>
<File
@@ -17,11 +17,13 @@
/* ScriptData
SDName: Blackrock_Depths
SD%Complete: 95
SDComment: Quest support: 4001, 4342, 7604, 4322. Vendor Lokhtos Darkbargainer.
SDComment: Quest support: 4001, 4342, 7604, 4322. Vendor Lokhtos Darkbargainer. Need to rewrite the Jail Break support
SDCategory: Blackrock Depths
EndScriptData */
/* ContentData
at_ring_of_law
npc_grimstone
mob_phalanx
npc_kharan_mighthammer
npc_lokhtos_darkbargainer
@@ -29,12 +31,305 @@ npc_dughal_stormwing
npc_marshal_windsor
npc_marshal_reginald_windsor
npc_tobias_seecher
npc_rocknot
EndContentData */
#include "precompiled.h"
#include "../../npc/npc_escortAI.h"
#include "def_blackrock_depths.h"
#define C_GRIMSTONE 10096
#define C_THELDREN 16059
//4 or 6 in total? 1+2+1 / 2+2+2 / 3+3. Depending on this, code should be changed.
#define MOB_AMOUNT 4
uint32 RingMob[]=
{
8925, // Dredge Worm
8926, // Deep Stinger
8927, // Dark Screecher
8928, // Burrowing Thundersnout
8933, // Cave Creeper
8932, // Borer Beetle
};
uint32 RingBoss[]=
{
9027, // Gorosh
9028, // Grizzle
9029, // Eviscerator
9030, // Ok'thor
9031, // Anub'shiah
9032, // Hedrum
};
float RingLocations[6][3]=
{
{604.802673, -191.081985, -54.058590}, // ring
{604.072998, -222.106918, -52.743759}, // first gate
{621.400391, -214.499054, -52.814453}, // hiding in corner
{601.300781, -198.556992, -53.950256}, // ring
{631.818359, -180.548126, -52.654770}, // second gate
{627.390381, -201.075974, -52.692917} // hiding in corner
};
bool AreaTrigger_at_ring_of_law(Player *player, AreaTriggerEntry *at)
{
ScriptedInstance* pInstance = ((ScriptedInstance*)player->GetInstanceData());
if (pInstance)
{
if (pInstance->GetData(TYPE_RING_OF_LAW) == IN_PROGRESS || pInstance->GetData(TYPE_RING_OF_LAW) == DONE)
return false;
pInstance->SetData(TYPE_RING_OF_LAW,IN_PROGRESS);
player->SummonCreature(C_GRIMSTONE,625.559,-205.618,-52.735,2.609,TEMPSUMMON_DEAD_DESPAWN,0);
return false;
}
return false;
}
/*######
## npc_grimstone
######*/
//TODO: implement quest part of event (different end boss)
struct TRINITY_DLL_DECL npc_grimstoneAI : public npc_escortAI
{
npc_grimstoneAI(Creature *c) : npc_escortAI(c)
{
pInstance = ((ScriptedInstance*)c->GetInstanceData());
MobSpawnId = rand()%6;
Reset();
}
ScriptedInstance* pInstance;
uint8 EventPhase;
uint32 Event_Timer;
uint8 MobSpawnId;
uint8 MobCount;
uint32 MobDeath_Timer;
uint64 RingMobGUID[4];
uint64 RingBossGUID;
bool CanWalk;
void Reset()
{
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
EventPhase = 0;
Event_Timer = 1000;
MobCount = 0;
MobDeath_Timer = 0;
for(uint8 i = 0; i < MOB_AMOUNT; i++)
RingMobGUID[i] = 0;
RingBossGUID = 0;
CanWalk = false;
}
void Aggro(Unit *who) { }
void DoGate(uint32 id, uint32 state)
{
if (GameObject *go = GameObject::GetGameObject(*m_creature,pInstance->GetData64(id)))
go->SetGoState(state);
debug_log("SD2: npc_grimstone, arena gate update state.");
}
//TODO: move them to center
void SummonRingMob()
{
if (Creature* tmp = m_creature->SummonCreature(RingMob[MobSpawnId],608.960,-235.322,-53.907,1.857,TEMPSUMMON_DEAD_DESPAWN,0))
RingMobGUID[MobCount] = tmp->GetGUID();
++MobCount;
if (MobCount == MOB_AMOUNT)
MobDeath_Timer = 2500;
}
//TODO: move them to center
void SummonRingBoss()
{
if (Creature* tmp = m_creature->SummonCreature(RingBoss[rand()%6],644.300,-175.989,-53.739,3.418,TEMPSUMMON_DEAD_DESPAWN,0))
RingBossGUID = tmp->GetGUID();
MobDeath_Timer = 2500;
}
void WaypointReached(uint32 i)
{
switch(i)
{
case 0:
DoScriptText(-1000000, m_creature);//2
CanWalk = false;
Event_Timer = 5000;
break;
case 1:
DoScriptText(-1000000, m_creature);//4
CanWalk = false;
Event_Timer = 5000;
break;
case 2:
CanWalk = false;
break;
case 3:
DoScriptText(-1000000, m_creature);//5
break;
case 4:
DoScriptText(-1000000, m_creature);//6
CanWalk = false;
Event_Timer = 5000;
break;
case 5:
if (pInstance)
{
pInstance->SetData(TYPE_RING_OF_LAW,DONE);
debug_log("SD2: npc_grimstone: event reached end and set complete.");
}
break;
}
}
void UpdateAI(const uint32 diff)
{
if (!pInstance)
return;
if (MobDeath_Timer)
{
if (MobDeath_Timer <= diff)
{
MobDeath_Timer = 2500;
if (RingBossGUID)
{
Creature *boss = (Creature*)Unit::GetUnit(*m_creature,RingBossGUID);
if (boss && !boss->isAlive() && boss->isDead())
{
RingBossGUID = 0;
Event_Timer = 5000;
MobDeath_Timer = 0;
return;
}
return;
}
for(uint8 i = 0; i < MOB_AMOUNT; i++)
{
Creature *mob = (Creature*)Unit::GetUnit(*m_creature,RingMobGUID[i]);
if (mob && !mob->isAlive() && mob->isDead())
{
RingMobGUID[i] = 0;
--MobCount;
//seems all are gone, so set timer to continue and discontinue this
if (!MobCount)
{
Event_Timer = 5000;
MobDeath_Timer = 0;
}
}
}
}else MobDeath_Timer -= diff;
}
if (Event_Timer)
{
if (Event_Timer <= diff)
{
switch(EventPhase)
{
case 0:
DoScriptText(-1000000, m_creature);//1
DoGate(DATA_ARENA4,1);
Start(false, false, false);
CanWalk = true;
Event_Timer = 0;
break;
case 1:
CanWalk = true;
Event_Timer = 0;
break;
case 2:
Event_Timer = 2000;
break;
case 3:
DoGate(DATA_ARENA1,0);
Event_Timer = 3000;
break;
case 4:
CanWalk = true;
m_creature->SetVisibility(VISIBILITY_OFF);
SummonRingMob();
Event_Timer = 8000;
break;
case 5:
SummonRingMob();
SummonRingMob();
Event_Timer = 8000;
break;
case 6:
SummonRingMob();
Event_Timer = 0;
break;
case 7:
m_creature->SetVisibility(VISIBILITY_ON);
DoGate(DATA_ARENA1,1);
DoScriptText(-1000000, m_creature);//4
CanWalk = true;
Event_Timer = 0;
break;
case 8:
DoGate(DATA_ARENA2,0);
Event_Timer = 5000;
break;
case 9:
m_creature->SetVisibility(VISIBILITY_OFF);
SummonRingBoss();
Event_Timer = 0;
break;
case 10:
//if quest, complete
DoGate(DATA_ARENA2,1);
DoGate(DATA_ARENA3,0);
DoGate(DATA_ARENA4,0);
CanWalk = true;
Event_Timer = 0;
break;
}
++EventPhase;
}else Event_Timer -= diff;
}
if (CanWalk)
npc_escortAI::UpdateAI(diff);
}
};
CreatureAI* GetAI_npc_grimstone(Creature *_Creature)
{
npc_grimstoneAI* Grimstone_AI = new npc_grimstoneAI(_Creature);
for(uint8 i = 0; i < 6; ++i)
Grimstone_AI->AddWaypoint(i, RingLocations[i][0], RingLocations[i][1], RingLocations[i][2]);
return (CreatureAI*)Grimstone_AI;
}
/*######
## mob_phalanx
######*/
@@ -107,19 +402,33 @@ CreatureAI* GetAI_mob_phalanx(Creature *_Creature)
#define QUEST_4001 4001
#define QUEST_4342 4342
#define GOSSIP_ITEM_KHARAN_1 "I need to know where the princess are, Kharan!"
#define GOSSIP_ITEM_KHARAN_2 "All is not lost, Kharan!"
#define GOSSIP_ITEM_KHARAN_3 "Gor'shak is my friend, you can trust me."
#define GOSSIP_ITEM_KHARAN_4 "Not enough, you need to tell me more."
#define GOSSIP_ITEM_KHARAN_5 "So what happened?"
#define GOSSIP_ITEM_KHARAN_6 "Continue..."
#define GOSSIP_ITEM_KHARAN_7 "So you suspect that someone on the inside was involved? That they were tipped off?"
#define GOSSIP_ITEM_KHARAN_8 "Continue with your story please."
#define GOSSIP_ITEM_KHARAN_9 "Indeed."
#define GOSSIP_ITEM_KHARAN_10 "The door is open, Kharan. You are a free man."
bool GossipHello_npc_kharan_mighthammer(Player *player, Creature *_Creature)
{
if( _Creature->isQuestGiver() )
player->PrepareQuestMenu( _Creature->GetGUID() );
if( player->GetQuestStatus(QUEST_4001) == QUEST_STATUS_INCOMPLETE )
player->ADD_GOSSIP_ITEM( 0, "I need to know where the princess are, Kharan!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->ADD_GOSSIP_ITEM( 0, GOSSIP_ITEM_KHARAN_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
if( player->GetQuestStatus(4342) == QUEST_STATUS_INCOMPLETE )
player->ADD_GOSSIP_ITEM( 0, "All is not lost, Kharan!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
player->ADD_GOSSIP_ITEM( 0, GOSSIP_ITEM_KHARAN_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
if( player->GetTeam() == HORDE ) player->SEND_GOSSIP_MENU(2473, _Creature->GetGUID());
if( player->GetTeam() == ALLIANCE ) player->SEND_GOSSIP_MENU(2474, _Creature->GetGUID());
if (player->GetTeam() == HORDE)
player->SEND_GOSSIP_MENU(2473, _Creature->GetGUID());
else
player->SEND_GOSSIP_MENU(2474, _Creature->GetGUID());
return true;
}
@@ -129,42 +438,44 @@ bool GossipSelect_npc_kharan_mighthammer(Player *player, Creature *_Creature, ui
switch (action)
{
case GOSSIP_ACTION_INFO_DEF+1:
player->ADD_GOSSIP_ITEM(0, "Gor'shak is my friend, you can trust me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_KHARAN_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
player->SEND_GOSSIP_MENU(2475, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
player->ADD_GOSSIP_ITEM(0, "Not enough, you need to tell me more.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_KHARAN_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
player->SEND_GOSSIP_MENU(2476, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+3:
player->ADD_GOSSIP_ITEM(0, "So what happened?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_KHARAN_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
player->SEND_GOSSIP_MENU(2477, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+4:
player->ADD_GOSSIP_ITEM(0, "Continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_KHARAN_6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
player->SEND_GOSSIP_MENU(2478, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+5:
player->ADD_GOSSIP_ITEM(0, "So you suspect that someone on the inside was involved? That they were tipped off?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_KHARAN_7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
player->SEND_GOSSIP_MENU(2479, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+6:
player->ADD_GOSSIP_ITEM(0, "Continue with your story please.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7);
player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_KHARAN_8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7);
player->SEND_GOSSIP_MENU(2480, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+7:
player->ADD_GOSSIP_ITEM(0, "Indeed.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+8);
player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_KHARAN_9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+8);
player->SEND_GOSSIP_MENU(2481, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+8:
player->ADD_GOSSIP_ITEM(0, "The door is open, Kharan. You are a free man.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9);
player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_KHARAN_10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9);
player->SEND_GOSSIP_MENU(2482, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+9:
player->CLOSE_GOSSIP_MENU();
if( player->GetTeam() == HORDE ) player->AreaExploredOrEventHappens(QUEST_4001);
if( player->GetTeam() == ALLIANCE ) player->AreaExploredOrEventHappens(QUEST_4342);
if (player->GetTeam() == HORDE)
player->AreaExploredOrEventHappens(QUEST_4001);
else
player->AreaExploredOrEventHappens(QUEST_4342);
break;
}
return true;
@@ -179,19 +490,22 @@ bool GossipSelect_npc_kharan_mighthammer(Player *player, Creature *_Creature, ui
#define QUEST_A_BINDING_CONTRACT 7604
#define SPELL_CREATE_THORIUM_BROTHERHOOD_CONTRACT_DND 23059
#define GOSSIP_ITEM_SHOW_ACCESS "Show me what I have access to, Lothos."
#define GOSSIP_ITEM_GET_CONTRACT "Get Thorium Brotherhood Contract"
bool GossipHello_npc_lokhtos_darkbargainer(Player *player, Creature *_Creature)
{
if (_Creature->isQuestGiver())
player->PrepareQuestMenu( _Creature->GetGUID() );
if (_Creature->isVendor() && player->GetReputationRank(59) >= REP_FRIENDLY)
player->ADD_GOSSIP_ITEM( 1, "Show me what I have access to, Lothos.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
player->ADD_GOSSIP_ITEM( 1, GOSSIP_ITEM_SHOW_ACCESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
if (player->GetQuestRewardStatus(QUEST_A_BINDING_CONTRACT) != 1 &&
!player->HasItemCount(ITEM_THRORIUM_BROTHERHOOD_CONTRACT, 1, true) &&
player->HasItemCount(ITEM_SULFURON_INGOT, 1))
{
player->ADD_GOSSIP_ITEM(0, "Get Thorium Brotherhood Contract", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_GET_CONTRACT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
}
if (player->GetReputationRank(59) < REP_FRIENDLY)
@@ -209,10 +523,9 @@ bool GossipSelect_npc_lokhtos_darkbargainer(Player *player, Creature *_Creature,
player->CLOSE_GOSSIP_MENU();
player->CastSpell(player, SPELL_CREATE_THORIUM_BROTHERHOOD_CONTRACT_DND, false);
}
if (action == GOSSIP_ACTION_TRADE)
{
player->SEND_VENDORLIST( _Creature->GetGUID() );
}
if (action == GOSSIP_ACTION_TRADE)
player->SEND_VENDORLIST( _Creature->GetGUID() );
return true;
}
@@ -225,7 +538,7 @@ bool GossipSelect_npc_lokhtos_darkbargainer(Player *player, Creature *_Creature,
#define GOSSIP_DUGHAL "You're free, Dughal! Get out of here!"
ScriptedInstance *pInstance;
/*
struct TRINITY_DLL_DECL npc_dughal_stormwingAI : public npc_escortAI
{
npc_dughal_stormwingAI(Creature *c) : npc_escortAI(c) { Reset(); }
@@ -308,7 +621,7 @@ bool GossipSelect_npc_dughal_stormwing(Player *player, Creature *_Creature, uint
}
return true;
}
*/
/*######
## npc_marshal_windsor
######*/
@@ -325,7 +638,7 @@ bool GossipSelect_npc_dughal_stormwing(Player *player, Creature *_Creature, uint
#define MOB_ENTRY_REGINALD_WINDSOR 9682
Player* PlayerStart;
/*
struct TRINITY_DLL_DECL npc_marshal_windsorAI : public npc_escortAI
{
npc_marshal_windsorAI(Creature *c) : npc_escortAI(c)
@@ -354,7 +667,7 @@ struct TRINITY_DLL_DECL npc_marshal_windsorAI : public npc_escortAI
pInstance->SetData(DATA_SUPPLY_ROOM, ENCOUNTER_STATE_IN_PROGRESS);
break;
case 13:
m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING);/*EMOTE_STATE_WORK*/
m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING);//EMOTE_STATE_WORK
break;
case 14:
pInstance->SetData(DATA_GATE_SR,0);
@@ -364,7 +677,7 @@ struct TRINITY_DLL_DECL npc_marshal_windsorAI : public npc_escortAI
m_creature->Say(SAY_WINDSOR_9, LANG_UNIVERSAL, PlayerGUID);
break;
case 17:
m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING);/*EMOTE_STATE_WORK*/
m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING);//EMOTE_STATE_WORK
break;
case 18:
pInstance->SetData(DATA_GATE_SC,0);
@@ -468,7 +781,7 @@ bool QuestAccept_npc_marshal_windsor(Player *player, Creature *creature, Quest c
}
return false;
}
*/
/*######
## npc_marshal_reginald_windsor
######*/
@@ -491,7 +804,7 @@ bool QuestAccept_npc_marshal_windsor(Player *player, Creature *creature, Quest c
#define MOB_ENTRY_CREST_KILLER 9680
int wp = 0;
/*
struct TRINITY_DLL_DECL npc_marshal_reginald_windsorAI : public npc_escortAI
{
npc_marshal_reginald_windsorAI(Creature *c) : npc_escortAI(c)
@@ -681,13 +994,13 @@ CreatureAI* GetAI_npc_marshal_reginald_windsor(Creature *_Creature)
return (CreatureAI*)marshal_reginald_windsorAI;
}
*/
/*######
## npc_tobias_seecher
######*/
#define SAY_TOBIAS_FREE "Thank you! I will run for safety immediately!"
/*
struct TRINITY_DLL_DECL npc_tobias_seecherAI : public npc_escortAI
{
npc_tobias_seecherAI(Creature *c) :npc_escortAI(c) {Reset();}
@@ -775,6 +1088,172 @@ bool GossipSelect_npc_tobias_seecher(Player *player, Creature *_Creature, uint32
}
return true;
}
*/
/*######
## npc_rocknot
######*/
#define SAY_GOT_BEER -1230000
#define SPELL_DRUNKEN_RAGE 14872
#define QUEST_ALE 4295
float BarWpLocations[8][3]=
{
{883.294861, -188.926300, -43.703655},
{872.763550, -185.605621, -43.703655}, //b1
{867.923401, -188.006393, -43.703655}, //b2
{863.295898, -190.795212, -43.703655}, //b3
{856.139587, -194.652756, -43.703655}, //b4
{851.878906, -196.928131, -43.703655}, //b5
{877.035217, -187.048080, -43.703655},
{891.198000, -197.924000, -43.620400} //home
};
uint32 BarWpWait[8]=
{
0,
5000,
5000,
5000,
5000,
15000,
0,
0
};
struct TRINITY_DLL_DECL npc_rocknotAI : public npc_escortAI
{
npc_rocknotAI(Creature *c) : npc_escortAI(c)
{
pInstance = ((ScriptedInstance*)c->GetInstanceData());
Reset();
}
ScriptedInstance* pInstance;
uint32 BreakKeg_Timer;
uint32 BreakDoor_Timer;
void Reset()
{
if (IsBeingEscorted)
return;
BreakKeg_Timer = 0;
BreakDoor_Timer = 0;
}
void Aggro(Unit *who) { }
void DoGo(uint32 id, uint32 state)
{
if (GameObject *go = GameObject::GetGameObject(*m_creature,pInstance->GetData64(id)))
go->SetGoState(state);
}
void WaypointReached(uint32 i)
{
if (!pInstance)
return;
switch(i)
{
case 1:
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_KICK);
break;
case 2:
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKUNARMED);
break;
case 3:
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKUNARMED);
break;
case 4:
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_KICK);
break;
case 5:
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_KICK);
BreakKeg_Timer = 2000;
break;
}
}
void UpdateAI(const uint32 diff)
{
if (!pInstance)
return;
if (BreakKeg_Timer)
{
if (BreakKeg_Timer <= diff)
{
DoGo(DATA_GO_BAR_KEG,0);
BreakKeg_Timer = 0;
BreakDoor_Timer = 1000;
}else BreakKeg_Timer -= diff;
}
if (BreakDoor_Timer)
{
if (BreakDoor_Timer <= diff)
{
DoGo(DATA_GO_BAR_DOOR,2);
DoGo(DATA_GO_BAR_KEG_TRAP,0); //doesn't work very well, leaving code here for future
//spell by trap has effect61, this indicate the bar go hostile
if (Unit *tmp = Unit::GetUnit(*m_creature,pInstance->GetData64(DATA_PHALANX)))
tmp->setFaction(14);
//for later, this event(s) has alot more to it.
//optionally, DONE can trigger bar to go hostile.
pInstance->SetData(TYPE_BAR,DONE);
BreakDoor_Timer = 0;
}else BreakDoor_Timer -= diff;
}
npc_escortAI::UpdateAI(diff);
}
};
CreatureAI* GetAI_npc_rocknot(Creature *_Creature)
{
npc_rocknotAI* Rocknot_AI = new npc_rocknotAI(_Creature);
for(uint8 i = 0; i < 8; ++i)
Rocknot_AI->AddWaypoint(i, BarWpLocations[i][0], BarWpLocations[i][1], BarWpLocations[i][2], BarWpWait[i]);
return (CreatureAI*)Rocknot_AI;
}
bool ChooseReward_npc_rocknot(Player *player, Creature *_Creature, const Quest *_Quest, uint32 item)
{
ScriptedInstance* pInstance = ((ScriptedInstance*)_Creature->GetInstanceData());
if (!pInstance)
return true;
if (pInstance->GetData(TYPE_BAR) == DONE || pInstance->GetData(TYPE_BAR) == SPECIAL)
return true;
if (_Quest->GetQuestId() == QUEST_ALE)
{
if (pInstance->GetData(TYPE_BAR) != IN_PROGRESS)
pInstance->SetData(TYPE_BAR,IN_PROGRESS);
pInstance->SetData(TYPE_BAR,SPECIAL);
//keep track of amount in instance script, returns SPECIAL if amount ok and event in progress
if (pInstance->GetData(TYPE_BAR) == SPECIAL)
{
DoScriptText(SAY_GOT_BEER, _Creature);
_Creature->CastSpell(_Creature,SPELL_DRUNKEN_RAGE,false);
((npc_escortAI*)(_Creature->AI()))->Start(false, false, false);
}
}
return true;
}
/*######
##
@@ -784,6 +1263,16 @@ void AddSC_blackrock_depths()
{
Script *newscript;
newscript = new Script;
newscript->Name = "at_ring_of_law";
newscript->pAreaTrigger = &AreaTrigger_at_ring_of_law;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "npc_grimstone";
newscript->GetAI = &GetAI_npc_grimstone;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name="phalanx";
newscript->GetAI = &GetAI_mob_phalanx;
@@ -800,7 +1289,7 @@ void AddSC_blackrock_depths()
newscript->pGossipHello = &GossipHello_npc_lokhtos_darkbargainer;
newscript->pGossipSelect = &GossipSelect_npc_lokhtos_darkbargainer;
newscript->RegisterSelf();
/*
newscript = new Script;
newscript->Name="npc_dughal_stormwing";
newscript->pGossipHello = &GossipHello_npc_dughal_stormwing;
@@ -824,5 +1313,5 @@ void AddSC_blackrock_depths()
newscript = new Script;
newscript->Name="npc_marshal_reginald_windsor";
newscript->GetAI = &GetAI_npc_marshal_reginald_windsor;
newscript->RegisterSelf();
newscript->RegisterSelf();*/
}
@@ -1,91 +0,0 @@
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: Boss_Angerrel
SD%Complete: 100
SDComment:
SDCategory: Blackrock Depths
EndScriptData */
#include "precompiled.h"
#define SPELL_SUNDERARMOR 24317
#define SPELL_SHIELDBLOCK 12169
#define SPELL_STRIKE 15580
struct TRINITY_DLL_DECL boss_angerrelAI : public ScriptedAI
{
boss_angerrelAI(Creature *c) : ScriptedAI(c) {Reset();}
uint32 SunderArmor_Timer;
uint32 ShieldBlock_Timer;
uint32 Strike_Timer;
void Reset()
{
SunderArmor_Timer = 8000;
ShieldBlock_Timer = 15000;
Strike_Timer = 12000;
}
void Aggro(Unit *who)
{
}
void UpdateAI(const uint32 diff)
{
//Return since we have no target
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
return;
//SunderArmor_Timer
if (SunderArmor_Timer < diff)
{
DoCast(m_creature->getVictim(),SPELL_SUNDERARMOR);
SunderArmor_Timer = 28000;
}else SunderArmor_Timer -= diff;
//ShieldBlock_Timer
if (ShieldBlock_Timer < diff)
{
DoCast(m_creature,SPELL_SHIELDBLOCK);
ShieldBlock_Timer = 25000;
}else ShieldBlock_Timer -= diff;
//Strike_Timer
if (Strike_Timer < diff)
{
DoCast(m_creature->getVictim(),SPELL_STRIKE);
Strike_Timer = 10000;
}else Strike_Timer -= diff;
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI_boss_angerrel(Creature *_Creature)
{
return new boss_angerrelAI (_Creature);
}
void AddSC_boss_angerrel()
{
Script *newscript;
newscript = new Script;
newscript->Name="boss_angerrel";
newscript->GetAI = &GetAI_boss_angerrel;
newscript->RegisterSelf();
}
@@ -1,139 +0,0 @@
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: Boss_Doomrel
SD%Complete: 100
SDComment:
SDCategory: Blackrock Depths
EndScriptData */
#include "precompiled.h"
#define SPELL_SHADOWBOLTVOLLEY 17228
#define SPELL_IMMOLATE 15505
#define SPELL_CURSEOFWEAKNESS 17227
#define SPELL_DEMONARMOR 11735
struct TRINITY_DLL_DECL boss_doomrelAI : public ScriptedAI
{
boss_doomrelAI(Creature *c) : ScriptedAI(c) {Reset();}
uint32 ShadowVolley_Timer;
uint32 Immolate_Timer;
uint32 CurseOfWeakness_Timer;
uint32 DemonArmor_Timer;
bool Voidwalkers;
int Rand;
int RandX;
int RandY;
Creature* Summoned;
void Reset()
{
ShadowVolley_Timer = 10000;
Immolate_Timer = 18000;
CurseOfWeakness_Timer = 5000;
DemonArmor_Timer = 16000;
Voidwalkers = false;
}
void Aggro(Unit *who)
{
}
void SummonVoidwalkers(Unit* victim)
{
Rand = rand()%5;
switch (rand()%2)
{
case 0: RandX = 0 - Rand; break;
case 1: RandX = 0 + Rand; break;
}
Rand = 0;
Rand = rand()%5;
switch (rand()%2)
{
case 0: RandY = 0 - Rand; break;
case 1: RandY = 0 + Rand; break;
}
Rand = 0;
Summoned = DoSpawnCreature(16119, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000);
if(Summoned)
((CreatureAI*)Summoned->AI())->AttackStart(victim);
}
void UpdateAI(const uint32 diff)
{
//Return since we have no target
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
return;
//ShadowVolley_Timer
if (ShadowVolley_Timer < diff)
{
DoCast(m_creature->getVictim(),SPELL_SHADOWBOLTVOLLEY);
ShadowVolley_Timer = 12000;
}else ShadowVolley_Timer -= diff;
//Immolate_Timer
if (Immolate_Timer < diff)
{
Unit* target = NULL;
target = SelectUnit(SELECT_TARGET_RANDOM,0);
if (target)DoCast(target,SPELL_IMMOLATE);
Immolate_Timer = 25000;
}else Immolate_Timer -= diff;
//CurseOfWeakness_Timer
if (CurseOfWeakness_Timer < diff)
{
DoCast(m_creature->getVictim(),SPELL_CURSEOFWEAKNESS);
CurseOfWeakness_Timer = 45000;
}else CurseOfWeakness_Timer -= diff;
//DemonArmor_Timer
if (DemonArmor_Timer < diff)
{
DoCast(m_creature,SPELL_DEMONARMOR);
DemonArmor_Timer = 300000;
}else DemonArmor_Timer -= diff;
//Summon Voidwalkers
if (!Voidwalkers && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 51 )
{
SummonVoidwalkers(m_creature->getVictim());
SummonVoidwalkers(m_creature->getVictim());
SummonVoidwalkers(m_creature->getVictim());
Voidwalkers = true;
}
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI_boss_doomrel(Creature *_Creature)
{
return new boss_doomrelAI (_Creature);
}
void AddSC_boss_doomrel()
{
Script *newscript;
newscript = new Script;
newscript->Name="boss_doomrel";
newscript->GetAI = &GetAI_boss_doomrel;
newscript->RegisterSelf();
}
@@ -1,91 +0,0 @@
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: Boss_Doperel
SD%Complete: 100
SDComment:
SDCategory: Blackrock Depths
EndScriptData */
#include "precompiled.h"
#define SPELL_SINISTERSTRIKE 15581
#define SPELL_BACKSTAB 15582
#define SPELL_GOUGE 13579
struct TRINITY_DLL_DECL boss_doperelAI : public ScriptedAI
{
boss_doperelAI(Creature *c) : ScriptedAI(c) {Reset();}
uint32 SinisterStrike_Timer;
uint32 BackStab_Timer;
uint32 Gouge_Timer;
void Reset()
{
SinisterStrike_Timer = 8000;
BackStab_Timer = 12000;
Gouge_Timer = 6000;
}
void Aggro(Unit *who)
{
}
void UpdateAI(const uint32 diff)
{
//Return since we have no target
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
return;
//SinisterStrike_Timer
if (SinisterStrike_Timer < diff)
{
DoCast(m_creature->getVictim(),SPELL_SINISTERSTRIKE);
SinisterStrike_Timer = 7000;
}else SinisterStrike_Timer -= diff;
//BackStab_Timer
if (BackStab_Timer < diff)
{
DoCast(m_creature->getVictim(),SPELL_BACKSTAB);
BackStab_Timer = 6000;
}else BackStab_Timer -= diff;
//Gouge_Timer
if (Gouge_Timer < diff)
{
DoCast(m_creature->getVictim(),SPELL_GOUGE);
Gouge_Timer = 8000;
}else Gouge_Timer -= diff;
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI_boss_doperel(Creature *_Creature)
{
return new boss_doperelAI (_Creature);
}
void AddSC_boss_doperel()
{
Script *newscript;
newscript = new Script;
newscript->Name="boss_doperel";
newscript->GetAI = &GetAI_boss_doperel;
newscript->RegisterSelf();
}
@@ -1,142 +0,0 @@
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: Boss_Gloomrel
SD%Complete: 80
SDComment: Learning Smelt Dark Iron if tribute quest rewarded. Missing event and re-spawn GO Spectral Chalice
SDCategory: Blackrock Depths
EndScriptData */
#include "precompiled.h"
#define SPELL_HAMSTRING 9080
#define SPELL_CLEAVE 15579
#define SPELL_MORTALSTRIKE 15708
struct TRINITY_DLL_DECL boss_gloomrelAI : public ScriptedAI
{
boss_gloomrelAI(Creature *c) : ScriptedAI(c) {Reset();}
uint32 HamString_Timer;
uint32 Cleave_Timer;
uint32 MortalStrike_Timer;
void Reset()
{
HamString_Timer = 19000;
Cleave_Timer = 6000;
MortalStrike_Timer = 10000;
m_creature->setFaction(734);
}
void Aggro(Unit *who)
{
}
void UpdateAI(const uint32 diff)
{
//Return since we have no target
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
return;
//HamString_Timer
if (HamString_Timer < diff)
{
DoCast(m_creature->getVictim(),SPELL_HAMSTRING);
HamString_Timer = 14000;
}else HamString_Timer -= diff;
//Cleave_Timer
if (Cleave_Timer < diff)
{
DoCast(m_creature->getVictim(),SPELL_CLEAVE);
Cleave_Timer = 8000;
}else Cleave_Timer -= diff;
//MortalStrike_Timer
if (MortalStrike_Timer < diff)
{
DoCast(m_creature->getVictim(),SPELL_MORTALSTRIKE);
MortalStrike_Timer = 12000;
}else MortalStrike_Timer -= diff;
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI_boss_gloomrel(Creature *_Creature)
{
return new boss_gloomrelAI (_Creature);
}
bool GossipHello_boss_gloomrel(Player *player, Creature *_Creature)
{
if (player->GetQuestRewardStatus(4083) == 1 && player->GetSkillValue(SKILL_MINING) >= 230 && !player->HasSpell(14891) )
player->ADD_GOSSIP_ITEM(0, "Teach me the art of smelting dark iron", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
if (player->GetQuestRewardStatus(4083) == 0 && player->GetSkillValue(SKILL_MINING) >= 230)
player->ADD_GOSSIP_ITEM(0, "I want to pay tribute", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
player->ADD_GOSSIP_ITEM(0, "Challenge", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
player->SEND_GOSSIP_MENU(2602, _Creature->GetGUID());
return true;
}
bool GossipSelect_boss_gloomrel(Player *player, Creature *_Creature, uint32 sender, uint32 action )
{
switch (action)
{
case GOSSIP_ACTION_INFO_DEF+1:
player->ADD_GOSSIP_ITEM( 0, "Continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
player->SEND_GOSSIP_MENU(2606, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+11:
player->CLOSE_GOSSIP_MENU();
_Creature->CastSpell(player, 14894, false);
break;
case GOSSIP_ACTION_INFO_DEF+2:
player->ADD_GOSSIP_ITEM( 0, "[PH] Continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
player->SEND_GOSSIP_MENU(2604, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+22:
player->CLOSE_GOSSIP_MENU();
//re-spawn object here
break;
case GOSSIP_ACTION_INFO_DEF+3:
player->ADD_GOSSIP_ITEM( 0, "[PH] Continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 33);
player->SEND_GOSSIP_MENU(2605, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+33:
player->CLOSE_GOSSIP_MENU();
//start event here, below code just temporary
_Creature->setFaction(754);
break;
}
return true;
}
void AddSC_boss_gloomrel()
{
Script *newscript;
newscript = new Script;
newscript->Name="boss_gloomrel";
newscript->GetAI = &GetAI_boss_gloomrel;
newscript->pGossipHello = &GossipHello_boss_gloomrel;
newscript->pGossipSelect = &GossipSelect_boss_gloomrel;
newscript->RegisterSelf();
}
@@ -1,105 +0,0 @@
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: Boss_Haterel
SD%Complete: 100
SDComment:
SDCategory: Blackrock Depths
EndScriptData */
#include "precompiled.h"
#define SPELL_SHADOWBOLT 17483 //Not sure if right ID
#define SPELL_MANABURN 10876
#define SPELL_SHADOWSHIELD 22417
#define SPELL_STRIKE 15580
struct TRINITY_DLL_DECL boss_haterelAI : public ScriptedAI
{
boss_haterelAI(Creature *c) : ScriptedAI(c) {Reset();}
uint32 ShadowBolt_Timer;
uint32 ManaBurn_Timer;
uint32 ShadowShield_Timer;
uint32 Strike_Timer;
void Reset()
{
ShadowBolt_Timer = 15000;
ManaBurn_Timer = 3000;
ShadowShield_Timer = 8000;
Strike_Timer = 12000;
}
void Aggro(Unit *who)
{
}
void UpdateAI(const uint32 diff)
{
//Return since we have no target
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
return;
//ShadowBolt_Timer
if (ShadowBolt_Timer < diff)
{
Unit* target = NULL;
target = SelectUnit(SELECT_TARGET_RANDOM,0);
if (target) DoCast(target,SPELL_SHADOWBOLT);
ShadowBolt_Timer = 7000;
}else ShadowBolt_Timer -= diff;
//ManaBurn_Timer
if (ManaBurn_Timer < diff)
{
Unit* target = NULL;
target = SelectUnit(SELECT_TARGET_RANDOM,0);
if (target) DoCast(target,SPELL_MANABURN);
ManaBurn_Timer = 13000;
}else ManaBurn_Timer -= diff;
//ShadowShield_Timer
if (ShadowShield_Timer < diff)
{
DoCast(m_creature,SPELL_SHADOWSHIELD);
ShadowShield_Timer = 25000;
}else ShadowShield_Timer -= diff;
//Strike_Timer
if (Strike_Timer < diff)
{
DoCast(m_creature->getVictim(),SPELL_STRIKE);
Strike_Timer = 10000;
}else Strike_Timer -= diff;
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI_boss_haterel(Creature *_Creature)
{
return new boss_haterelAI (_Creature);
}
void AddSC_boss_haterel()
{
Script *newscript;
newscript = new Script;
newscript->Name="boss_haterel";
newscript->GetAI = &GetAI_boss_haterel;
newscript->RegisterSelf();
}
@@ -1,115 +0,0 @@
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: Boss_Seethrel
SD%Complete: 100
SDComment:
SDCategory: Blackrock Depths
EndScriptData */
#include "precompiled.h"
#define SPELL_FROSTBOLT 16799
#define SPELL_FROSTARMOR 15784 //This is actually a buff he gives himself
#define SPELL_BLIZZARD 19099
#define SPELL_FROSTNOVA 15063
#define SPELL_FROSTWARD 15004
struct TRINITY_DLL_DECL boss_seethrelAI : public ScriptedAI
{
boss_seethrelAI(Creature *c) : ScriptedAI(c) {Reset();}
uint32 FrostArmor_Timer;
uint32 Frostbolt_Timer;
uint32 Blizzard_Timer;
uint32 FrostNova_Timer;
uint32 FrostWard_Timer;
void Reset()
{
FrostArmor_Timer = 2000;
Frostbolt_Timer = 6000;
Blizzard_Timer = 18000;
FrostNova_Timer = 12000;
FrostWard_Timer = 25000;
m_creature->CastSpell(m_creature,SPELL_FROSTARMOR,true);
}
void Aggro(Unit *who)
{
}
void UpdateAI(const uint32 diff)
{
//Return since we have no target
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
return;
//FrostArmor_Timer
if (FrostArmor_Timer < diff)
{
DoCast(m_creature, SPELL_FROSTARMOR);
FrostArmor_Timer = 180000;
}else FrostArmor_Timer -= diff;
//Frostbolt_Timer
if (Frostbolt_Timer < diff)
{
DoCast(m_creature->getVictim(),SPELL_FROSTBOLT);
Frostbolt_Timer = 15000;
}else Frostbolt_Timer -= diff;
//Blizzard_Timer
if (Blizzard_Timer < diff)
{
Unit* target = NULL;
target = SelectUnit(SELECT_TARGET_RANDOM,0);
if (target) DoCast(target,SPELL_BLIZZARD);
Blizzard_Timer = 22000;
}else Blizzard_Timer -= diff;
//FrostNova_Timer
if (FrostNova_Timer < diff)
{
DoCast(m_creature->getVictim(),SPELL_FROSTNOVA);
FrostNova_Timer = 14000;
}else FrostNova_Timer -= diff;
//FrostWard_Timer
if (FrostWard_Timer < diff)
{
DoCast(m_creature,SPELL_FROSTWARD);
FrostWard_Timer = 68000;
}else FrostWard_Timer -= diff;
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI_boss_seethrel(Creature *_Creature)
{
return new boss_seethrelAI (_Creature);
}
void AddSC_boss_seethrel()
{
Script *newscript;
newscript = new Script;
newscript->Name="boss_seethrel";
newscript->GetAI = &GetAI_boss_seethrel;
newscript->RegisterSelf();
}
@@ -1,101 +0,0 @@
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: Boss_Vilerel
SD%Complete: 100
SDComment:
SDCategory: Blackrock Depths
EndScriptData */
#include "precompiled.h"
#define SPELL_MINDBLAST 15587
#define SPELL_HEAL 15586
#define SPELL_PRAYEROFHEALING 15585
#define SPELL_SHIELD 10901
struct TRINITY_DLL_DECL boss_vilerelAI : public ScriptedAI
{
boss_vilerelAI(Creature *c) : ScriptedAI(c) {Reset();}
uint32 MindBlast_Timer;
uint32 Heal_Timer;
uint32 PrayerOfHealing_Timer;
uint32 Shield_Timer;
void Reset()
{
MindBlast_Timer = 10000;
Heal_Timer = 35000;
PrayerOfHealing_Timer = 25000;
Shield_Timer = 3000;
}
void Aggro(Unit *who)
{
}
void UpdateAI(const uint32 diff)
{
//Return since we have no target
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
return;
//MindBlast_Timer
if (MindBlast_Timer < diff)
{
DoCast(m_creature->getVictim(),SPELL_MINDBLAST);
MindBlast_Timer = 7000;
}else MindBlast_Timer -= diff;
//Heal_Timer
if (Heal_Timer < diff)
{
DoCast(m_creature,SPELL_HEAL);
Heal_Timer = 20000;
}else Heal_Timer -= diff;
//PrayerOfHealing_Timer
if (PrayerOfHealing_Timer < diff)
{
DoCast(m_creature,SPELL_PRAYEROFHEALING);
PrayerOfHealing_Timer = 30000;
}else PrayerOfHealing_Timer -= diff;
//Shield_Timer
if (Shield_Timer < diff)
{
DoCast(m_creature,SPELL_SHIELD);
Shield_Timer = 30000;
}else Shield_Timer -= diff;
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI_boss_vilerel(Creature *_Creature)
{
return new boss_vilerelAI (_Creature);
}
void AddSC_boss_vilerel()
{
Script *newscript;
newscript = new Script;
newscript->Name="boss_vilerel";
newscript->GetAI = &GetAI_boss_vilerel;
newscript->RegisterSelf();
}
@@ -1,35 +1,26 @@
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* This program is free software licensed under GPL version 2
* Please see the included DOCS/LICENSE.TXT for more information */
#ifndef DEF_BLACKROCK_DEPTHS_H
#define DEF_BLACKROCK_DEPTHS_H
#define DATA_DUGHAL 0
#define DATA_SUPPLY_ROOM 1
#define DATA_JAZ 2
#define DATA_SHILL 3
#define DATA_CREST 4
#define DATA_TOBIAS 5
#define DATA_QUEST_JAIL_BREAK 6
#define ENCOUNTER_STATE_NOT_STARTED 100
#define ENCOUNTER_STATE_BEFORE_START 101
#define ENCOUNTER_STATE_IN_PROGRESS 102
#define ENCOUNTER_STATE_OBJECTIVE_COMPLETED 103
#define ENCOUNTER_STATE_ENDED 104
#define ENCOUNTER_STATE_FAILED 105
#define DATA_GATE_D 111
#define DATA_GATE_SR 112
#define DATA_GATE_J 113
#define DATA_GATE_S 114
#define DATA_GATE_C 115
#define DATA_GATE_T 116
#define DATA_GATE_SC 117
#define DATA_CREATURE_JAZ 118
#define DATA_CREATURE_OGRABISI 119
#define DATA_CREATURE_CREST 120
#define DATA_CREATURE_SHILL 121
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* This program is free software licensed under GPL version 2
* Please see the included DOCS/LICENSE.TXT for more information */
#ifndef DEF_BRD_H
#define DEF_BRD_H
#define TYPE_RING_OF_LAW 1
#define TYPE_VAULT 2
#define TYPE_BAR 3
#define TYPE_TOMB_OF_SEVEN 4
#define TYPE_LYCEUM 5
#define TYPE_IRON_HALL 6
#define DATA_EMPEROR 10
#define DATA_PHALANX 11
#define DATA_ARENA1 12
#define DATA_ARENA2 13
#define DATA_ARENA3 14
#define DATA_ARENA4 15
#define DATA_GO_BAR_KEG 16
#define DATA_GO_BAR_KEG_TRAP 17
#define DATA_GO_BAR_DOOR 18
#endif
@@ -32,209 +32,276 @@ update `instance_template` set `script`='instance_blackrock_depths' where `map`=
#include "precompiled.h"
#include "def_blackrock_depths.h"
#define ENCOUNTERS 7
#define ENCOUNTERS 6
#define C_EMPEROR 9019
#define C_PHALANX 9502
#define GO_ARENA1 161525
#define GO_ARENA2 161522
#define GO_ARENA3 161524
#define GO_ARENA4 161523
#define GO_SHADOW_LOCK 161460
#define GO_SHADOW_MECHANISM 161461
#define GO_SHADOW_GIANT_DOOR 157923
#define GO_SHADOW_DUMMY 161516
#define GO_BAR_KEG_SHOT 170607
#define GO_BAR_KEG_TRAP 171941
#define GO_BAR_DOOR 170571
#define GO_TOMB_ENTER 170576
#define GO_TOMB_EXIT 170577
#define GO_LYCEUM 170558
#define GO_GOLEM_ROOM_N 170573
#define GO_GOLEM_ROOM_S 170574
#define GO_THONE_ROOM 170575
struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
{
instance_blackrock_depths(Map *map) : ScriptedInstance(map) {Initialize();};
uint32 Encounter[ENCOUNTERS];
std::string str_data;
uint64 EmperorGUID;
uint64 PhalanxGUID;
uint64 GoArena1GUID;
uint64 GoArena2GUID;
uint64 GoArena3GUID;
uint64 GoArena4GUID;
uint64 GoShadowLockGUID;
uint64 GoShadowMechGUID;
uint64 GoShadowGiantGUID;
uint64 GoShadowDummyGUID;
uint64 GoBarKegGUID;
uint64 GoBarKegTrapGUID;
uint64 GoBarDoorGUID;
uint64 GoTombEnterGUID;
uint64 GoTombExitGUID;
uint64 GoLyceumGUID;
uint64 GoGolemNGUID;
uint64 GoGolemSGUID;
uint64 GoThoneGUID;
uint64 GateDughal;
uint64 SupplyRoomGate;
uint64 GateJaz;
uint64 GateShill;
uint64 GateCrest;
uint64 GateTobias;
uint64 SupplyCrate;
uint64 Jaz;
uint64 Ograbisi;
uint64 ShillDinger;
uint64 CrestKiller;
uint32 state;
bool Encounters[ENCOUNTERS];
uint32 BarAleCount;
void Initialize()
{
GateDughal = 0;
SupplyRoomGate = 0;
GateJaz = 0;
GateShill = 0;
GateCrest = 0;
GateTobias = 0;
SupplyCrate = 0;
Jaz = 0;
Ograbisi = 0;
ShillDinger = 0;
CrestKiller = 0;
state = 0;
for(uint8 i = 0; i < ENCOUNTERS; i++)
Encounters[i] = false;
}
bool IsEncounterInProgress() const
{
EmperorGUID = 0;
PhalanxGUID = 0;
GoArena1GUID = 0;
GoArena2GUID = 0;
GoArena3GUID = 0;
GoArena4GUID = 0;
GoShadowLockGUID = 0;
GoShadowMechGUID = 0;
GoShadowGiantGUID = 0;
GoShadowDummyGUID = 0;
GoBarKegGUID = 0;
GoBarKegTrapGUID = 0;
GoBarDoorGUID = 0;
GoTombEnterGUID = 0;
GoTombExitGUID = 0;
GoLyceumGUID = 0;
GoGolemNGUID = 0;
GoGolemSGUID = 0;
GoThoneGUID = 0;
BarAleCount = 0;
for(uint8 i = 0; i < ENCOUNTERS; i++)
if(Encounters[i]) return true;
Encounter[i] = NOT_STARTED;
}
Player* GetPlayerInMap()
{
Map::PlayerList const& players = instance->GetPlayers();
return false;
}
if (!players.isEmpty())
{
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
if (Player* plr = itr->getSource())
return plr;
}
}
debug_log("SD2: Instance Blackrock Depths: GetPlayerInMap, but PlayerList is empty!");
return NULL;
}
void OnCreatureCreate(Creature *creature, uint32 creature_entry)
{
switch(creature->GetEntry())
{
case C_EMPEROR: EmperorGUID = creature->GetGUID(); break;
case C_PHALANX: PhalanxGUID = creature->GetGUID(); break;
}
}
void OpenGO(uint64 DoorGUID, bool open)
{
if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID))
Door->SetUInt32Value(GAMEOBJECT_STATE, open ? 0 : 1);
}
void OnObjectCreate(GameObject* go)
{
switch(go->GetEntry())
{
case GO_ARENA1: GoArena1GUID = go->GetGUID(); break;
case GO_ARENA2: GoArena2GUID = go->GetGUID(); break;
case GO_ARENA3: GoArena3GUID = go->GetGUID(); break;
case GO_ARENA4: GoArena4GUID = go->GetGUID(); break;
case GO_SHADOW_LOCK: GoShadowLockGUID = go->GetGUID(); break;
case GO_SHADOW_MECHANISM: GoShadowMechGUID = go->GetGUID(); break;
case GO_SHADOW_GIANT_DOOR: GoShadowGiantGUID = go->GetGUID(); break;
case GO_SHADOW_DUMMY: GoShadowDummyGUID = go->GetGUID(); break;
case GO_BAR_KEG_SHOT: GoBarKegGUID = go->GetGUID(); break;
case GO_BAR_KEG_TRAP: GoBarKegTrapGUID = go->GetGUID(); break;
case GO_BAR_DOOR: GoBarDoorGUID = go->GetGUID(); break;
case GO_TOMB_ENTER: GoTombEnterGUID = go->GetGUID(); break;
case GO_TOMB_EXIT: GoTombExitGUID = go->GetGUID(); break;
case GO_LYCEUM: GoLyceumGUID = go->GetGUID(); break;
case GO_GOLEM_ROOM_N: GoGolemNGUID = go->GetGUID(); break;
case GO_GOLEM_ROOM_S: GoGolemSGUID = go->GetGUID(); break;
case GO_THONE_ROOM: GoThoneGUID = go->GetGUID(); break;
}
}
void SetData(uint32 type, uint32 data)
{
Player *player = GetPlayerInMap();
void CloseGO(uint64 DoorGUID, bool close)
{
if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID))
Door->SetUInt32Value(GAMEOBJECT_STATE, close ? 1 : 0);
}
if (!player)
{
debug_log("SD2: Instance Blackrock Depths: SetData (Type: %u Data %u) cannot find any player.", type, data);
return;
}
debug_log("SD2: Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data);
switch(type)
{
case TYPE_RING_OF_LAW:
Encounter[0] = data;
break;
case TYPE_VAULT:
Encounter[1] = data;
break;
case TYPE_BAR:
if (data == SPECIAL)
++BarAleCount;
else
Encounter[2] = data;
break;
case TYPE_TOMB_OF_SEVEN:
Encounter[3] = data;
break;
case TYPE_LYCEUM:
Encounter[4] = data;
break;
case TYPE_IRON_HALL:
Encounter[5] = data;
break;
}
if (data == DONE)
{
OUT_SAVE_INST_DATA;
std::ostringstream saveStream;
saveStream << Encounter[0] << " " << Encounter[1] << " " << Encounter[2] << " "
<< Encounter[3] << " " << Encounter[4] << " " << Encounter[5];
str_data = saveStream.str();
SaveToDB();
OUT_SAVE_INST_DATA_COMPLETE;
}
}
uint32 GetData(uint32 type)
{
switch(type)
{
case DATA_DUGHAL: return Encounters[0];break;
case DATA_SUPPLY_ROOM: return Encounters[1];break;
case DATA_JAZ: return Encounters[2];break;
case DATA_SHILL: return Encounters[3];break;
case DATA_CREST: return Encounters[4];break;
case DATA_TOBIAS: return Encounters[5];break;
case DATA_QUEST_JAIL_BREAK: return Encounters[6];break;
case DATA_GATE_D: return GateDughal; break;
case DATA_GATE_T: return GateTobias; break;
case DATA_GATE_C: return GateCrest; break;
case DATA_GATE_J: return GateJaz; break;
case DATA_GATE_S: return GateShill; break;
case DATA_CREATURE_JAZ:
if((((Creature*)Jaz)->isDead()))
state = 1;
case TYPE_RING_OF_LAW:
return Encounter[0];
case TYPE_VAULT:
return Encounter[1];
case TYPE_BAR:
if (Encounter[2] == IN_PROGRESS && BarAleCount == 3)
return SPECIAL;
else
state = 0;
break;
case DATA_CREATURE_OGRABISI:
if((((Creature*)Ograbisi)->isDead()))
state = 1;
else
state = 0;
break;
case DATA_CREATURE_CREST:
if((((Creature*)CrestKiller)->isDead()))
state = 1;
else
state = 0;
break;
case DATA_CREATURE_SHILL:
if((((Creature*)ShillDinger)->isDead()))
state = 1;
else
state = 0;
break;
return Encounter[2];
case TYPE_TOMB_OF_SEVEN:
return Encounter[3];
case TYPE_LYCEUM:
return Encounter[4];
case TYPE_IRON_HALL:
return Encounter[5];
}
return 0;
}
void OnObjectCreate(GameObject *go)
uint64 GetData64(uint32 data)
{
switch(go->GetEntry())
switch(data)
{
case 170561: SupplyRoomGate = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break;
case 170562: GateDughal = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break;
case 170566: GateTobias = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break;
case 170567: GateCrest = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break;
case 170568: GateJaz = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break;
case 170569: GateShill = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break;
case 166872: SupplyCrate = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break;
case DATA_EMPEROR:
return EmperorGUID;
case DATA_PHALANX:
return PhalanxGUID;
case DATA_ARENA1:
return GoArena1GUID;
case DATA_ARENA2:
return GoArena2GUID;
case DATA_ARENA3:
return GoArena3GUID;
case DATA_ARENA4:
return GoArena4GUID;
case DATA_GO_BAR_KEG:
return GoBarKegGUID;
case DATA_GO_BAR_KEG_TRAP:
return GoBarKegTrapGUID;
case DATA_GO_BAR_DOOR:
return GoBarDoorGUID;
}
return 0;
}
void OnCreatureCreate(Creature *creature, uint32 creature_entry)
const char* Save()
{
switch(creature_entry)
{
case 9680: CrestKiller = creature->GetGUID(); break;
case 9677: Ograbisi = creature->GetGUID(); break;
case 9681: Jaz = creature->GetGUID(); break;
case 9678: ShillDinger = creature->GetGUID(); break;
}
return str_data.c_str();
}
void Load(const char* in)
{
if (!in)
{
OUT_LOAD_INST_DATA_FAIL;
return;
}
OUT_LOAD_INST_DATA(in);
void SetData(uint32 type, uint32 data)
{
switch(type)
{
case DATA_DUGHAL: Encounters[0] = data; break;
case DATA_SUPPLY_ROOM: Encounters[1] = data; break;
case DATA_JAZ: Encounters[2] = data; break;
case DATA_SHILL: Encounters[3] = data; break;
case DATA_CREST: Encounters[4] = data; break;
case DATA_TOBIAS: Encounters[5] = data; break;
case DATA_QUEST_JAIL_BREAK: Encounters[6] = data; break;
case DATA_GATE_SR:
if(SupplyRoomGate)
{
if(data == NOT_STARTED)
OpenGO(SupplyRoomGate, true);
else
CloseGO(SupplyRoomGate, true);
}
break;
case DATA_GATE_SC:
if(SupplyCrate)
{
if(data == NOT_STARTED)
OpenGO(SupplyCrate, true);
else
CloseGO(SupplyCrate, true);
}
break;
case DATA_CREATURE_JAZ:
if(data)
{
(((Creature*)Jaz)->setFaction(54));
(((Creature*)Ograbisi)->setFaction(54));
(((Creature*)Ograbisi)->Say("Ograbisi needs new hat", LANG_UNIVERSAL, NULL));
}
else
{
(((Creature*)Jaz)->setFaction(35));
(((Creature*)Ograbisi)->setFaction(35));
}
break;
case DATA_CREATURE_SHILL:
if(data)
(((Creature*)ShillDinger)->setFaction(54));
else
(((Creature*)ShillDinger)->setFaction(35));
break;
case DATA_CREATURE_CREST:
if(data)
(((Creature*)CrestKiller)->setFaction(54));
else
(((Creature*)CrestKiller)->setFaction(35));
break;
}
}
std::istringstream loadStream(in);
loadStream >> Encounter[0] >> Encounter[1] >> Encounter[2] >> Encounter[3]
>> Encounter[4] >> Encounter[5];
for(uint8 i = 0; i < ENCOUNTERS; ++i)
if (Encounter[i] == IN_PROGRESS)
Encounter[i] = NOT_STARTED;
OUT_LOAD_INST_DATA_COMPLETE;
}
};
InstanceData* GetInstanceData_instance_blackrock_depths(Map* map)
{
return new instance_blackrock_depths(map);
return new instance_blackrock_depths(map);
}
void AddSC_instance_blackrock_depths()
{
Script *newscript;
newscript = new Script;
newscript->Name = "instance_blackrock_depths";
newscript->GetInstanceData = &GetInstanceData_instance_blackrock_depths;
newscript->RegisterSelf();
}
void AddSC_instance_blackrock_depths()
{
Script *newscript;
newscript = new Script;
newscript->Name = "instance_blackrock_depths";
newscript->GetInstanceData = &GetInstanceData_instance_blackrock_depths;
newscript->RegisterSelf();
}