Merge pull request #3445 from Bootz/master

Scriptwork/Clean-up (Av,Brd,Brs)
This commit is contained in:
megamage
2011-10-12 12:01:05 -07:00
30 changed files with 447 additions and 616 deletions
@@ -52,33 +52,31 @@ class mob_av_marshal_or_warmaster : public CreatureScript
public: public:
mob_av_marshal_or_warmaster() mob_av_marshal_or_warmaster()
: CreatureScript("mob_av_marshal_or_warmaster") : CreatureScript("mob_av_marshal_or_warmaster") {}
{
}
struct mob_av_marshal_or_warmasterAI : public ScriptedAI struct mob_av_marshal_or_warmasterAI : public ScriptedAI
{ {
mob_av_marshal_or_warmasterAI(Creature* c) : ScriptedAI(c) {} mob_av_marshal_or_warmasterAI(Creature* creature) : ScriptedAI(creature) {}
uint32 uiChargeTimer; uint32 ChargeTimer;
uint32 uiCleaveTimer; uint32 CleaveTimer;
uint32 uiDemoralizingShoutTimer; uint32 DemoralizingShoutTimer;
uint32 uiWhirlwind1Timer; uint32 Whirlwind1Timer;
uint32 uiWhirlwind2Timer; uint32 Whirlwind2Timer;
uint32 uiEnrageTimer; uint32 EnrageTimer;
uint32 uiResetTimer; uint32 ResetTimer;
bool bHasAura; bool bHasAura;
void Reset() void Reset()
{ {
uiChargeTimer = urand(2*IN_MILLISECONDS, 12*IN_MILLISECONDS); ChargeTimer = urand(2 * IN_MILLISECONDS, 12 * IN_MILLISECONDS);
uiCleaveTimer = urand(1*IN_MILLISECONDS, 11*IN_MILLISECONDS); CleaveTimer = urand(1 * IN_MILLISECONDS, 11 * IN_MILLISECONDS);
uiDemoralizingShoutTimer = urand(2*IN_MILLISECONDS, 2*IN_MILLISECONDS); DemoralizingShoutTimer = urand(2 * IN_MILLISECONDS, 2 * IN_MILLISECONDS);
uiWhirlwind1Timer = urand(1*IN_MILLISECONDS, 12*IN_MILLISECONDS); Whirlwind1Timer = urand(1 * IN_MILLISECONDS, 12 * IN_MILLISECONDS);
uiWhirlwind2Timer = urand(5*IN_MILLISECONDS, 20*IN_MILLISECONDS); Whirlwind2Timer = urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
uiEnrageTimer = urand(5*IN_MILLISECONDS, 20*IN_MILLISECONDS); EnrageTimer = urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
uiResetTimer = 5*IN_MILLISECONDS; ResetTimer = 5 * IN_MILLISECONDS;
bHasAura = false; bHasAura = false;
} }
@@ -126,49 +124,49 @@ class mob_av_marshal_or_warmaster : public CreatureScript
if (!UpdateVictim()) if (!UpdateVictim())
return; return;
if (uiChargeTimer <= diff) if (ChargeTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_CHARGE); DoCast(me->getVictim(), SPELL_CHARGE);
uiChargeTimer = urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS); ChargeTimer = urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS);
} else uiChargeTimer -= diff; } else ChargeTimer -= diff;
if (uiCleaveTimer <= diff) if (CleaveTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_CLEAVE); DoCast(me->getVictim(), SPELL_CLEAVE);
uiCleaveTimer = urand(10*IN_MILLISECONDS, 16*IN_MILLISECONDS); CleaveTimer = urand(10 * IN_MILLISECONDS, 16 * IN_MILLISECONDS);
} else uiCleaveTimer -= diff; } else CleaveTimer -= diff;
if (uiDemoralizingShoutTimer <= diff) if (DemoralizingShoutTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_DEMORALIZING_SHOUT); DoCast(me->getVictim(), SPELL_DEMORALIZING_SHOUT);
uiDemoralizingShoutTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS); DemoralizingShoutTimer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
} else uiDemoralizingShoutTimer -= diff; } else DemoralizingShoutTimer -= diff;
if (uiWhirlwind1Timer <= diff) if (Whirlwind1Timer <= diff)
{ {
DoCast(me->getVictim(), SPELL_WHIRLWIND1); DoCast(me->getVictim(), SPELL_WHIRLWIND1);
uiWhirlwind1Timer = urand(6*IN_MILLISECONDS, 20*IN_MILLISECONDS); Whirlwind1Timer = urand(6 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
} else uiWhirlwind1Timer -= diff; } else Whirlwind1Timer -= diff;
if (uiWhirlwind2Timer <= diff) if (Whirlwind2Timer <= diff)
{ {
DoCast(me->getVictim(), SPELL_WHIRLWIND2); DoCast(me->getVictim(), SPELL_WHIRLWIND2);
uiWhirlwind2Timer = urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS); Whirlwind2Timer = urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS);
} else uiWhirlwind2Timer -= diff; } else Whirlwind2Timer -= diff;
if (uiEnrageTimer <= diff) if (EnrageTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_ENRAGE); DoCast(me->getVictim(), SPELL_ENRAGE);
uiEnrageTimer = urand(10*IN_MILLISECONDS, 30*IN_MILLISECONDS); EnrageTimer = urand(10 * IN_MILLISECONDS, 30 * IN_MILLISECONDS);
}else uiEnrageTimer -= diff; }else EnrageTimer -= diff;
// check if creature is not outside of building // check if creature is not outside of building
if (uiResetTimer <= diff) if (ResetTimer <= diff)
{ {
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50) if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
EnterEvadeMode(); EnterEvadeMode();
uiResetTimer = 5*IN_MILLISECONDS; ResetTimer = 5 * IN_MILLISECONDS;
} else uiResetTimer -= diff; } else ResetTimer -= diff;
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
@@ -48,7 +48,7 @@ public:
struct mob_water_elementalAI : public ScriptedAI struct mob_water_elementalAI : public ScriptedAI
{ {
mob_water_elementalAI(Creature* c) : ScriptedAI(c) {} mob_water_elementalAI(Creature* creature) : ScriptedAI(creature) {}
uint32 waterBoltTimer; uint32 waterBoltTimer;
uint64 balindaGUID; uint64 balindaGUID;
@@ -97,7 +97,7 @@ public:
struct boss_balindaAI : public ScriptedAI struct boss_balindaAI : public ScriptedAI
{ {
boss_balindaAI(Creature* c) : ScriptedAI(c), summons(me) {} boss_balindaAI(Creature* creature) : ScriptedAI(creature), summons(me) {}
uint32 arcaneExplosionTimer; uint32 arcaneExplosionTimer;
uint32 coneOfColdTimer; uint32 coneOfColdTimer;
@@ -48,23 +48,23 @@ public:
struct boss_drektharAI : public ScriptedAI struct boss_drektharAI : public ScriptedAI
{ {
boss_drektharAI(Creature* c) : ScriptedAI(c) {} boss_drektharAI(Creature* creature) : ScriptedAI(creature) {}
uint32 uiWhirlwindTimer; uint32 WhirlwindTimer;
uint32 uiWhirlwind2Timer; uint32 Whirlwind2Timer;
uint32 uiKnockdownTimer; uint32 KnockdownTimer;
uint32 uiFrenzyTimer; uint32 FrenzyTimer;
uint32 uiYellTimer; uint32 YellTimer;
uint32 uiResetTimer; uint32 ResetTimer;
void Reset() void Reset()
{ {
uiWhirlwindTimer = urand(1*IN_MILLISECONDS, 20*IN_MILLISECONDS); WhirlwindTimer = urand(1 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
uiWhirlwind2Timer = urand(1*IN_MILLISECONDS, 20*IN_MILLISECONDS); Whirlwind2Timer = urand(1 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
uiKnockdownTimer = 12*IN_MILLISECONDS; KnockdownTimer = 12 * IN_MILLISECONDS;
uiFrenzyTimer = 6*IN_MILLISECONDS; FrenzyTimer = 6 * IN_MILLISECONDS;
uiResetTimer = 5*IN_MILLISECONDS; ResetTimer = 5 * IN_MILLISECONDS;
uiYellTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS); //20 to 30 seconds YellTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS); //20 to 30 seconds
} }
void EnterCombat(Unit* /*who*/) void EnterCombat(Unit* /*who*/)
@@ -83,46 +83,46 @@ public:
if (!UpdateVictim()) if (!UpdateVictim())
return; return;
if (uiWhirlwindTimer <= diff) if (WhirlwindTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_WHIRLWIND); DoCast(me->getVictim(), SPELL_WHIRLWIND);
uiWhirlwindTimer = urand(8*IN_MILLISECONDS, 18*IN_MILLISECONDS); WhirlwindTimer = urand(8 * IN_MILLISECONDS, 18 * IN_MILLISECONDS);
} else uiWhirlwindTimer -= diff; } else WhirlwindTimer -= diff;
if (uiWhirlwind2Timer <= diff) if (Whirlwind2Timer <= diff)
{ {
DoCast(me->getVictim(), SPELL_WHIRLWIND2); DoCast(me->getVictim(), SPELL_WHIRLWIND2);
uiWhirlwind2Timer = urand(7*IN_MILLISECONDS, 25*IN_MILLISECONDS); Whirlwind2Timer = urand(7 * IN_MILLISECONDS, 25 * IN_MILLISECONDS);
} else uiWhirlwind2Timer -= diff; } else Whirlwind2Timer -= diff;
if (uiKnockdownTimer <= diff) if (KnockdownTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_KNOCKDOWN); DoCast(me->getVictim(), SPELL_KNOCKDOWN);
uiKnockdownTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS); KnockdownTimer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
} else uiKnockdownTimer -= diff; } else KnockdownTimer -= diff;
if (uiFrenzyTimer <= diff) if (FrenzyTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_FRENZY); DoCast(me->getVictim(), SPELL_FRENZY);
uiFrenzyTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS); FrenzyTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS);
} else uiFrenzyTimer -= diff; } else FrenzyTimer -= diff;
if (uiYellTimer <= diff) if (YellTimer <= diff)
{ {
DoScriptText(RAND(YELL_RANDOM1, YELL_RANDOM2, YELL_RANDOM3, YELL_RANDOM4, YELL_RANDOM5), me); DoScriptText(RAND(YELL_RANDOM1, YELL_RANDOM2, YELL_RANDOM3, YELL_RANDOM4, YELL_RANDOM5), me);
uiYellTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS); //20 to 30 seconds YellTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS); //20 to 30 seconds
} else uiYellTimer -= diff; } else YellTimer -= diff;
// check if creature is not outside of building // check if creature is not outside of building
if (uiResetTimer <= diff) if (ResetTimer <= diff)
{ {
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50) if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
{ {
EnterEvadeMode(); EnterEvadeMode();
DoScriptText(YELL_EVADE, me); DoScriptText(YELL_EVADE, me);
} }
uiResetTimer = 5*IN_MILLISECONDS; ResetTimer = 5 * IN_MILLISECONDS;
} else uiResetTimer -= diff; } else ResetTimer -= diff;
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
@@ -39,23 +39,23 @@ public:
struct boss_galvangarAI : public ScriptedAI struct boss_galvangarAI : public ScriptedAI
{ {
boss_galvangarAI(Creature* c) : ScriptedAI(c) {} boss_galvangarAI(Creature* creature) : ScriptedAI(creature) {}
uint32 uiCleaveTimer; uint32 CleaveTimer;
uint32 uiFrighteningShoutTimer; uint32 FrighteningShoutTimer;
uint32 uiWhirlwind1Timer; uint32 Whirlwind1Timer;
uint32 uiWhirlwind2Timer; uint32 Whirlwind2Timer;
uint32 uiMortalStrikeTimer; uint32 MortalStrikeTimer;
uint32 uiResetTimer; uint32 ResetTimer;
void Reset() void Reset()
{ {
uiCleaveTimer = urand(1*IN_MILLISECONDS, 9*IN_MILLISECONDS); CleaveTimer = urand(1 * IN_MILLISECONDS, 9 * IN_MILLISECONDS);
uiFrighteningShoutTimer = urand(2*IN_MILLISECONDS, 19*IN_MILLISECONDS); FrighteningShoutTimer = urand(2 * IN_MILLISECONDS, 19 * IN_MILLISECONDS);
uiWhirlwind1Timer = urand(1*IN_MILLISECONDS, 13*IN_MILLISECONDS); Whirlwind1Timer = urand(1 * IN_MILLISECONDS, 13 * IN_MILLISECONDS);
uiWhirlwind2Timer = urand(5*IN_MILLISECONDS, 20*IN_MILLISECONDS); Whirlwind2Timer = urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
uiMortalStrikeTimer = urand(5*IN_MILLISECONDS, 20*IN_MILLISECONDS); MortalStrikeTimer = urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
uiResetTimer = 5*IN_MILLISECONDS; ResetTimer = 5 * IN_MILLISECONDS;
} }
void EnterCombat(Unit* /*who*/) void EnterCombat(Unit* /*who*/)
@@ -73,46 +73,46 @@ public:
if (!UpdateVictim()) if (!UpdateVictim())
return; return;
if (uiCleaveTimer <= diff) if (CleaveTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_CLEAVE); DoCast(me->getVictim(), SPELL_CLEAVE);
uiCleaveTimer = urand(10*IN_MILLISECONDS, 16*IN_MILLISECONDS); CleaveTimer = urand(10 * IN_MILLISECONDS, 16 * IN_MILLISECONDS);
} else uiCleaveTimer -= diff; } else CleaveTimer -= diff;
if (uiFrighteningShoutTimer <= diff) if (FrighteningShoutTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_FRIGHTENING_SHOUT); DoCast(me->getVictim(), SPELL_FRIGHTENING_SHOUT);
uiFrighteningShoutTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS); FrighteningShoutTimer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
} else uiFrighteningShoutTimer -= diff; } else FrighteningShoutTimer -= diff;
if (uiWhirlwind1Timer <= diff) if (Whirlwind1Timer <= diff)
{ {
DoCast(me->getVictim(), SPELL_WHIRLWIND1); DoCast(me->getVictim(), SPELL_WHIRLWIND1);
uiWhirlwind1Timer = urand(6*IN_MILLISECONDS, 10*IN_MILLISECONDS); Whirlwind1Timer = urand(6 * IN_MILLISECONDS, 10 * IN_MILLISECONDS);
} else uiWhirlwind1Timer -= diff; } else Whirlwind1Timer -= diff;
if (uiWhirlwind2Timer <= diff) if (Whirlwind2Timer <= diff)
{ {
DoCast(me->getVictim(), SPELL_WHIRLWIND2); DoCast(me->getVictim(), SPELL_WHIRLWIND2);
uiWhirlwind2Timer = urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS); Whirlwind2Timer = urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS);
} else uiWhirlwind2Timer -= diff; } else Whirlwind2Timer -= diff;
if (uiMortalStrikeTimer <= diff) if (MortalStrikeTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_MORTAL_STRIKE); DoCast(me->getVictim(), SPELL_MORTAL_STRIKE);
uiMortalStrikeTimer = urand(10*IN_MILLISECONDS, 30*IN_MILLISECONDS); MortalStrikeTimer = urand(10 * IN_MILLISECONDS, 30 * IN_MILLISECONDS);
} else uiMortalStrikeTimer -= diff; } else MortalStrikeTimer -= diff;
// check if creature is not outside of building // check if creature is not outside of building
if (uiResetTimer <= diff) if (ResetTimer <= diff)
{ {
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50) if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
{ {
EnterEvadeMode(); EnterEvadeMode();
DoScriptText(YELL_EVADE, me); DoScriptText(YELL_EVADE, me);
} }
uiResetTimer = 5*IN_MILLISECONDS; ResetTimer = 5 * IN_MILLISECONDS;
} else uiResetTimer -= diff; } else ResetTimer -= diff;
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
@@ -46,21 +46,21 @@ public:
struct boss_vanndarAI : public ScriptedAI struct boss_vanndarAI : public ScriptedAI
{ {
boss_vanndarAI(Creature* c) : ScriptedAI(c) {} boss_vanndarAI(Creature* creature) : ScriptedAI(creature) {}
uint32 uiAvatarTimer; uint32 AvatarTimer;
uint32 uiThunderclapTimer; uint32 ThunderclapTimer;
uint32 uiStormboltTimer; uint32 StormboltTimer;
uint32 uiResetTimer; uint32 ResetTimer;
uint32 uiYellTimer; uint32 YellTimer;
void Reset() void Reset()
{ {
uiAvatarTimer = 3*IN_MILLISECONDS; AvatarTimer = 3 * IN_MILLISECONDS;
uiThunderclapTimer = 4*IN_MILLISECONDS; ThunderclapTimer = 4 * IN_MILLISECONDS;
uiStormboltTimer = 6*IN_MILLISECONDS; StormboltTimer = 6 * IN_MILLISECONDS;
uiResetTimer = 5*IN_MILLISECONDS; ResetTimer = 5 * IN_MILLISECONDS;
uiYellTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS); YellTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS);
} }
void EnterCombat(Unit* /*who*/) void EnterCombat(Unit* /*who*/)
@@ -79,40 +79,40 @@ public:
if (!UpdateVictim()) if (!UpdateVictim())
return; return;
if (uiAvatarTimer <= diff) if (AvatarTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_AVATAR); DoCast(me->getVictim(), SPELL_AVATAR);
uiAvatarTimer = urand(15*IN_MILLISECONDS, 20*IN_MILLISECONDS); AvatarTimer = urand(15 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
} else uiAvatarTimer -= diff; } else AvatarTimer -= diff;
if (uiThunderclapTimer <= diff) if (ThunderclapTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_THUNDERCLAP); DoCast(me->getVictim(), SPELL_THUNDERCLAP);
uiThunderclapTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS); ThunderclapTimer = urand(5 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
} else uiThunderclapTimer -= diff; } else ThunderclapTimer -= diff;
if (uiStormboltTimer <= diff) if (StormboltTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_STORMBOLT); DoCast(me->getVictim(), SPELL_STORMBOLT);
uiStormboltTimer = urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS); StormboltTimer = urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS);
} else uiStormboltTimer -= diff; } else StormboltTimer -= diff;
if (uiYellTimer <= diff) if (YellTimer <= diff)
{ {
DoScriptText(RAND(YELL_RANDOM1, YELL_RANDOM2, YELL_RANDOM3, YELL_RANDOM4, YELL_RANDOM5, YELL_RANDOM6, YELL_RANDOM7), me); DoScriptText(RAND(YELL_RANDOM1, YELL_RANDOM2, YELL_RANDOM3, YELL_RANDOM4, YELL_RANDOM5, YELL_RANDOM6, YELL_RANDOM7), me);
uiYellTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS); //20 to 30 seconds YellTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS); //20 to 30 seconds
} else uiYellTimer -= diff; } else YellTimer -= diff;
// check if creature is not outside of building // check if creature is not outside of building
if (uiResetTimer <= diff) if (ResetTimer <= diff)
{ {
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50) if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
{ {
EnterEvadeMode(); EnterEvadeMode();
DoScriptText(YELL_EVADE, me); DoScriptText(YELL_EVADE, me);
} }
uiResetTimer = 5*IN_MILLISECONDS; ResetTimer = 5 * IN_MILLISECONDS;
} else uiResetTimer -= diff; } else ResetTimer -= diff;
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
@@ -15,35 +15,11 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* ScriptData
SDName: Blackrock_Depths
SD%Complete: 95
SDComment: Quest support: 4001, 4342, 7604, 4322. Vendor Lokhtos Darkbargainer. Need to rewrite the Jail Break support
SDCategory: Blackrock Depths
EndScriptData */
/* ContentData
go_shadowforge_brazier
at_ring_of_law
npc_grimstone
mob_phalanx
npc_kharan_mighthammer
npc_lokhtos_darkbargainer
npc_dughal_stormwing
npc_marshal_windsor
npc_marshal_reginald_windsor
npc_tobias_seecher
npc_rocknot
EndContentData */
#include "ScriptPCH.h" #include "ScriptPCH.h"
#include "ScriptedEscortAI.h" #include "ScriptedEscortAI.h"
#include "blackrock_depths.h" #include "blackrock_depths.h"
/*###### //go_shadowforge_brazier
+## go_shadowforge_brazier
+######*/
class go_shadowforge_brazier : public GameObjectScript class go_shadowforge_brazier : public GameObjectScript
{ {
public: public:
@@ -65,13 +41,9 @@ public:
} }
return false; return false;
} }
}; };
/*###### // npc_grimstone
## npc_grimstone
######*/
enum eGrimstone enum eGrimstone
{ {
NPC_GRIMSTONE = 10096, NPC_GRIMSTONE = 10096,
@@ -120,13 +92,9 @@ public:
} }
return false; return false;
} }
}; };
/*###### // npc_grimstone
## npc_grimstone
######*/
enum GrimstoneTexts enum GrimstoneTexts
{ {
SCRIPT_TEXT1 = -1230003, SCRIPT_TEXT1 = -1230003,
@@ -150,9 +118,9 @@ public:
struct npc_grimstoneAI : public npc_escortAI struct npc_grimstoneAI : public npc_escortAI
{ {
npc_grimstoneAI(Creature* c) : npc_escortAI(c) npc_grimstoneAI(Creature* creature) : npc_escortAI(creature)
{ {
instance = c->GetInstanceScript(); instance = creature->GetInstanceScript();
MobSpawnId = rand()%6; MobSpawnId = rand()%6;
} }
@@ -365,13 +333,9 @@ public:
npc_escortAI::UpdateAI(diff); npc_escortAI::UpdateAI(diff);
} }
}; };
}; };
/*###### // mob_phalanx
## mob_phalanx
######*/
enum PhalanxSpells enum PhalanxSpells
{ {
SPELL_THUNDERCLAP = 8732, SPELL_THUNDERCLAP = 8732,
@@ -437,13 +401,9 @@ public:
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
}; };
}; };
/*###### // npc_kharan_mighthammer
## npc_kharan_mighthammer
######*/
enum KharamQuests enum KharamQuests
{ {
QUEST_4001 = 4001, QUEST_4001 = 4001,
@@ -452,7 +412,6 @@ enum KharamQuests
#define GOSSIP_ITEM_KHARAN_1 "I need to know where the princess are, Kharan!" #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_2 "All is not lost, Kharan!"
#define GOSSIP_ITEM_KHARAN_3 "Gor'shak is my friend, you can trust me." #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_4 "Not enough, you need to tell me more."
#define GOSSIP_ITEM_KHARAN_5 "So what happened?" #define GOSSIP_ITEM_KHARAN_5 "So what happened?"
@@ -467,10 +426,10 @@ class npc_kharan_mighthammer : public CreatureScript
public: public:
npc_kharan_mighthammer() : CreatureScript("npc_kharan_mighthammer") { } npc_kharan_mighthammer() : CreatureScript("npc_kharan_mighthammer") { }
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) bool OnGossipSelect(Player* player, Creature* creature, uint32 /*Sender*/, uint32 action)
{ {
player->PlayerTalkClass->ClearMenus(); player->PlayerTalkClass->ClearMenus();
switch (uiAction) switch (action)
{ {
case GOSSIP_ACTION_INFO_DEF+1: case GOSSIP_ACTION_INFO_DEF+1:
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
@@ -534,13 +493,9 @@ public:
return true; return true;
} }
}; };
/*###### // npc_lokhtos_darkbargainer
## npc_lokhtos_darkbargainer
######*/
enum LokhtosItems enum LokhtosItems
{ {
ITEM_THRORIUM_BROTHERHOOD_CONTRACT = 18628, ITEM_THRORIUM_BROTHERHOOD_CONTRACT = 18628,
@@ -565,15 +520,15 @@ class npc_lokhtos_darkbargainer : public CreatureScript
public: public:
npc_lokhtos_darkbargainer() : CreatureScript("npc_lokhtos_darkbargainer") { } npc_lokhtos_darkbargainer() : CreatureScript("npc_lokhtos_darkbargainer") { }
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) bool OnGossipSelect(Player* player, Creature* creature, uint32 /*Sender*/, uint32 action)
{ {
player->PlayerTalkClass->ClearMenus(); player->PlayerTalkClass->ClearMenus();
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) if (action == GOSSIP_ACTION_INFO_DEF + 1)
{ {
player->CLOSE_GOSSIP_MENU(); player->CLOSE_GOSSIP_MENU();
player->CastSpell(player, SPELL_CREATE_THORIUM_BROTHERHOOD_CONTRACT_DND, false); player->CastSpell(player, SPELL_CREATE_THORIUM_BROTHERHOOD_CONTRACT_DND, false);
} }
if (uiAction == GOSSIP_ACTION_TRADE) if (action == GOSSIP_ACTION_TRADE)
player->GetSession()->SendListInventory(creature->GetGUID()); player->GetSession()->SendListInventory(creature->GetGUID());
return true; return true;
@@ -601,18 +556,15 @@ public:
return true; return true;
} }
}; };
/*###### // npc_dughal_stormwing
## npc_dughal_stormwing
######*/
enum DughalQuests enum DughalQuests
{ {
QUEST_JAIL_BREAK = 4322 QUEST_JAIL_BREAK = 4322
}; };
// DELETE THIS IF IT IS NOT NEEDED!
#define SAY_DUGHAL_FREE "Thank you, $N! I'm free!!!" #define SAY_DUGHAL_FREE "Thank you, $N! I'm free!!!"
#define GOSSIP_DUGHAL "You're free, Dughal! Get out of here!" #define GOSSIP_DUGHAL "You're free, Dughal! Get out of here!"
@@ -633,10 +585,10 @@ public:
return dughal_stormwingAI; return dughal_stormwingAI;
} }
bool OnGossipSelect(Player* player, Creature* creature, uint32 uiSender, uint32 uiAction) bool OnGossipSelect(Player* player, Creature* creature, uint32 Sender, uint32 action)
{ {
player->PlayerTalkClass->ClearMenus(); player->PlayerTalkClass->ClearMenus();
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) if (action == GOSSIP_ACTION_INFO_DEF + 1)
{ {
player->CLOSE_GOSSIP_MENU(); player->CLOSE_GOSSIP_MENU();
CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(false, true, player->GetGUID()); CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(false, true, player->GetGUID());
@@ -707,14 +659,11 @@ public:
npc_escortAI::UpdateAI(diff); npc_escortAI::UpdateAI(diff);
} }
}; };
}; };
*/ */
/*######
## npc_marshal_windsor
######*/
// npc_marshal_windsor
#define SAY_WINDSOR_AGGRO1 "You locked up the wrong Marshal. Prepare to be destroyed!" #define SAY_WINDSOR_AGGRO1 "You locked up the wrong Marshal. Prepare to be destroyed!"
#define SAY_WINDSOR_AGGRO2 "I bet you're sorry now, aren't you !?!!" #define SAY_WINDSOR_AGGRO2 "I bet you're sorry now, aren't you !?!!"
#define SAY_WINDSOR_AGGRO3 "You better hold me back $N or they are going to feel some prison house beatings." #define SAY_WINDSOR_AGGRO3 "You better hold me back $N or they are going to feel some prison house beatings."
@@ -771,7 +720,6 @@ public:
instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_IN_PROGRESS); instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_IN_PROGRESS);
creature->setFaction(11); creature->setFaction(11);
} }
} }
return false; return false;
} }
@@ -875,14 +823,11 @@ public:
npc_escortAI::UpdateAI(diff); npc_escortAI::UpdateAI(diff);
} }
}; };
}; };
*/ */
/*######
## npc_marshal_reginald_windsor
######*/
// npc_marshal_reginald_windsor
#define SAY_REGINALD_WINDSOR_0_1 "Can you feel the power, $N??? It's time to ROCK!" #define SAY_REGINALD_WINDSOR_0_1 "Can you feel the power, $N??? It's time to ROCK!"
#define SAY_REGINALD_WINDSOR_0_2 "Now we just have to free Tobias and we can get out of here. This way!" #define SAY_REGINALD_WINDSOR_0_2 "Now we just have to free Tobias and we can get out of here. This way!"
#define SAY_REGINALD_WINDSOR_5_1 "Open it." #define SAY_REGINALD_WINDSOR_5_1 "Open it."
@@ -1096,13 +1041,10 @@ public:
npc_escortAI::UpdateAI(diff); npc_escortAI::UpdateAI(diff);
} }
}; };
}; };
*/ */
/*######
## npc_tobias_seecher
######*/
// npc_tobias_seecher
#define SAY_TOBIAS_FREE "Thank you! I will run for safety immediately!" #define SAY_TOBIAS_FREE "Thank you! I will run for safety immediately!"
/* /*
class npc_tobias_seecher : public CreatureScript class npc_tobias_seecher : public CreatureScript
@@ -1123,10 +1065,10 @@ public:
return tobias_seecherAI; return tobias_seecherAI;
} }
bool OnGossipSelect(Player* player, Creature* creature, uint32 uiSender, uint32 uiAction) bool OnGossipSelect(Player* player, Creature* creature, uint32 Sender, uint32 action)
{ {
player->PlayerTalkClass->ClearMenus(); player->PlayerTalkClass->ClearMenus();
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) if (action == GOSSIP_ACTION_INFO_DEF + 1)
{ {
player->CLOSE_GOSSIP_MENU(); player->CLOSE_GOSSIP_MENU();
CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(false, true, player->GetGUID()); CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(false, true, player->GetGUID());
@@ -1198,15 +1140,11 @@ public:
npc_escortAI::UpdateAI(diff); npc_escortAI::UpdateAI(diff);
} }
}; };
}; };
*/ */
/*###### // npc_rocknot
## npc_rocknot
######*/
enum RocknotSays enum RocknotSays
{ {
SAY_GOT_BEER = -1230000 SAY_GOT_BEER = -1230000
@@ -1248,6 +1186,7 @@ public:
{ {
DoScriptText(SAY_GOT_BEER, creature); DoScriptText(SAY_GOT_BEER, creature);
creature->CastSpell(creature, SPELL_DRUNKEN_RAGE, false); creature->CastSpell(creature, SPELL_DRUNKEN_RAGE, false);
if (npc_escortAI* escortAI = CAST_AI(npc_rocknot::npc_rocknotAI, creature->AI())) if (npc_escortAI* escortAI = CAST_AI(npc_rocknot::npc_rocknotAI, creature->AI()))
escortAI->Start(false, false); escortAI->Start(false, false);
} }
@@ -1263,9 +1202,9 @@ public:
struct npc_rocknotAI : public npc_escortAI struct npc_rocknotAI : public npc_escortAI
{ {
npc_rocknotAI(Creature* c) : npc_escortAI(c) npc_rocknotAI(Creature* creature) : npc_escortAI(creature)
{ {
instance = c->GetInstanceScript(); instance = creature->GetInstanceScript();
} }
InstanceScript* instance; InstanceScript* instance;
@@ -1351,13 +1290,8 @@ public:
npc_escortAI::UpdateAI(diff); npc_escortAI::UpdateAI(diff);
} }
}; };
}; };
/*######
##
######*/
void AddSC_blackrock_depths() void AddSC_blackrock_depths()
{ {
new go_shadowforge_brazier(); new go_shadowforge_brazier();
@@ -1366,9 +1300,11 @@ void AddSC_blackrock_depths()
new mob_phalanx(); new mob_phalanx();
new npc_kharan_mighthammer(); new npc_kharan_mighthammer();
new npc_lokhtos_darkbargainer(); new npc_lokhtos_darkbargainer();
//new npc_dughal_stormwing();
//new npc_tobias_seecher();
//new npc_marshal_windsor();
//new npc_marshal_reginald_windsor();
new npc_rocknot(); new npc_rocknot();
// Fix us
/*new npc_dughal_stormwing();
new npc_tobias_seecher();
new npc_marshal_windsor();
new npc_marshal_reginald_windsor();
*/
} }
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* ScriptData
SDName: Boss_Ambassador_Flamelash
SD%Complete: 100
SDComment:
SDCategory: Blackrock Depths
EndScriptData */
#include "ScriptPCH.h" #include "ScriptPCH.h"
enum Spells enum Spells
@@ -42,7 +35,7 @@ public:
struct boss_ambassador_flamelashAI : public ScriptedAI struct boss_ambassador_flamelashAI : public ScriptedAI
{ {
boss_ambassador_flamelashAI(Creature* c) : ScriptedAI(c) {} boss_ambassador_flamelashAI(Creature* creature) : ScriptedAI(creature) {}
uint32 FireBlast_Timer; uint32 FireBlast_Timer;
uint32 Spirit_Timer; uint32 Spirit_Timer;
@@ -88,7 +81,6 @@ public:
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
}; };
}; };
void AddSC_boss_ambassador_flamelash() void AddSC_boss_ambassador_flamelash()
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* ScriptData
SDName: Boss_Anubshiah
SD%Complete: 100
SDComment:
SDCategory: Blackrock Depths
EndScriptData */
#include "ScriptPCH.h" #include "ScriptPCH.h"
enum Spells enum Spells
@@ -46,7 +39,7 @@ public:
struct boss_anubshiahAI : public ScriptedAI struct boss_anubshiahAI : public ScriptedAI
{ {
boss_anubshiahAI(Creature* c) : ScriptedAI(c) {} boss_anubshiahAI(Creature* creature) : ScriptedAI(creature) {}
uint32 ShadowBolt_Timer; uint32 ShadowBolt_Timer;
uint32 CurseOfTongues_Timer; uint32 CurseOfTongues_Timer;
@@ -63,9 +56,7 @@ public:
EnvelopingWeb_Timer = 16000; EnvelopingWeb_Timer = 16000;
} }
void EnterCombat(Unit* /*who*/) void EnterCombat(Unit* /*who*/) {}
{
}
void UpdateAI(const uint32 diff) void UpdateAI(const uint32 diff)
{ {
@@ -113,7 +104,6 @@ public:
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
}; };
}; };
void AddSC_boss_anubshiah() void AddSC_boss_anubshiah()
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* ScriptData
SDName: Boss_Emperor_Dagran_Thaurissan
SD%Complete: 99
SDComment:
SDCategory: Blackrock Depths
EndScriptData */
#include "ScriptPCH.h" #include "ScriptPCH.h"
#include "blackrock_depths.h" #include "blackrock_depths.h"
@@ -50,7 +43,7 @@ public:
struct boss_draganthaurissanAI : public ScriptedAI struct boss_draganthaurissanAI : public ScriptedAI
{ {
boss_draganthaurissanAI(Creature* c) : ScriptedAI(c) boss_draganthaurissanAI(Creature* creature) : ScriptedAI(creature)
{ {
instance = me->GetInstanceScript(); instance = me->GetInstanceScript();
} }
@@ -121,7 +114,6 @@ public:
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
}; };
}; };
void AddSC_boss_draganthaurissan() void AddSC_boss_draganthaurissan()
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* ScriptData
SDName: Boss_General_Angerforge
SD%Complete: 100
SDComment:
SDCategory: Blackrock Depths
EndScriptData */
#include "ScriptPCH.h" #include "ScriptPCH.h"
enum Spells enum Spells
@@ -44,7 +37,7 @@ public:
struct boss_general_angerforgeAI : public ScriptedAI struct boss_general_angerforgeAI : public ScriptedAI
{ {
boss_general_angerforgeAI(Creature* c) : ScriptedAI(c) {} boss_general_angerforgeAI(Creature* creature) : ScriptedAI(creature) {}
uint32 MightyBlow_Timer; uint32 MightyBlow_Timer;
uint32 HamString_Timer; uint32 HamString_Timer;
@@ -61,9 +54,7 @@ public:
Medics = false; Medics = false;
} }
void EnterCombat(Unit* /*who*/) void EnterCombat(Unit* /*who*/) {}
{
}
void SummonAdds(Unit* victim) void SummonAdds(Unit* victim)
{ {
@@ -129,7 +120,6 @@ public:
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
}; };
}; };
void AddSC_boss_general_angerforge() void AddSC_boss_general_angerforge()
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* ScriptData
SDName: Boss_Gorosh_the_Dervish
SD%Complete: 100
SDComment:
SDCategory: Blackrock Depths
EndScriptData */
#include "ScriptPCH.h" #include "ScriptPCH.h"
enum Spells enum Spells
@@ -43,7 +36,7 @@ public:
struct boss_gorosh_the_dervishAI : public ScriptedAI struct boss_gorosh_the_dervishAI : public ScriptedAI
{ {
boss_gorosh_the_dervishAI(Creature* c) : ScriptedAI(c) {} boss_gorosh_the_dervishAI(Creature* creature) : ScriptedAI(creature) {}
uint32 WhirlWind_Timer; uint32 WhirlWind_Timer;
uint32 MortalStrike_Timer; uint32 MortalStrike_Timer;
@@ -81,7 +74,6 @@ public:
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
}; };
}; };
void AddSC_boss_gorosh_the_dervish() void AddSC_boss_gorosh_the_dervish()
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* ScriptData
SDName: Boss_Grizzle
SD%Complete: 100
SDComment:
SDCategory: Blackrock Depths
EndScriptData */
#include "ScriptPCH.h" #include "ScriptPCH.h"
enum Spells enum Spells
@@ -43,7 +36,7 @@ public:
struct boss_grizzleAI : public ScriptedAI struct boss_grizzleAI : public ScriptedAI
{ {
boss_grizzleAI(Creature* c) : ScriptedAI(c) {} boss_grizzleAI(Creature* creature) : ScriptedAI(creature) {}
uint32 GroundTremor_Timer; uint32 GroundTremor_Timer;
uint32 Frenzy_Timer; uint32 Frenzy_Timer;
@@ -54,9 +47,7 @@ public:
Frenzy_Timer = 0; Frenzy_Timer = 0;
} }
void EnterCombat(Unit* /*who*/) void EnterCombat(Unit* /*who*/) {}
{
}
void UpdateAI(const uint32 diff) void UpdateAI(const uint32 diff)
{ {
@@ -86,7 +77,6 @@ public:
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
}; };
}; };
void AddSC_boss_grizzle() void AddSC_boss_grizzle()
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* ScriptData
SDName: Boss_High_Interrogator_Gerstahn
SD%Complete: 100
SDComment:
SDCategory: Blackrock Depths
EndScriptData */
#include "ScriptPCH.h" #include "ScriptPCH.h"
enum Spells enum Spells
@@ -45,7 +38,7 @@ public:
struct boss_high_interrogator_gerstahnAI : public ScriptedAI struct boss_high_interrogator_gerstahnAI : public ScriptedAI
{ {
boss_high_interrogator_gerstahnAI(Creature* c) : ScriptedAI(c) {} boss_high_interrogator_gerstahnAI(Creature* creature) : ScriptedAI(creature) {}
uint32 ShadowWordPain_Timer; uint32 ShadowWordPain_Timer;
uint32 ManaBurn_Timer; uint32 ManaBurn_Timer;
@@ -60,9 +53,7 @@ public:
ShadowShield_Timer = 8000; ShadowShield_Timer = 8000;
} }
void EnterCombat(Unit* /*who*/) void EnterCombat(Unit* /*who*/) {}
{
}
void UpdateAI(const uint32 diff) void UpdateAI(const uint32 diff)
{ {
@@ -103,7 +94,6 @@ public:
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
}; };
}; };
void AddSC_boss_high_interrogator_gerstahn() void AddSC_boss_high_interrogator_gerstahn()
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* ScriptData
SDName: Boss_Magmus
SD%Complete: 100
SDComment:
SDCategory: Blackrock Depths
EndScriptData */
#include "ScriptPCH.h" #include "ScriptPCH.h"
enum Spells enum Spells
@@ -48,7 +41,7 @@ public:
struct boss_magmusAI : public ScriptedAI struct boss_magmusAI : public ScriptedAI
{ {
boss_magmusAI(Creature* c) : ScriptedAI(c) {} boss_magmusAI(Creature* creature) : ScriptedAI(creature) {}
uint32 FieryBurst_Timer; uint32 FieryBurst_Timer;
uint32 WarStomp_Timer; uint32 WarStomp_Timer;
@@ -59,9 +52,7 @@ public:
WarStomp_Timer = 0; WarStomp_Timer = 0;
} }
void EnterCombat(Unit* /*who*/) void EnterCombat(Unit* /*who*/) {}
{
}
void UpdateAI(const uint32 diff) void UpdateAI(const uint32 diff)
{ {
@@ -95,7 +86,6 @@ public:
instance->HandleGameObject(instance->GetData64(DATA_THRONE_DOOR), true); instance->HandleGameObject(instance->GetData64(DATA_THRONE_DOOR), true);
} }
}; };
}; };
void AddSC_boss_magmus() void AddSC_boss_magmus()
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* ScriptData
SDName: Boss_Moira_Bronzbeard
SD%Complete: 90
SDComment: Healing of Emperor NYI
SDCategory: Blackrock Depths
EndScriptData */
#include "ScriptPCH.h" #include "ScriptPCH.h"
enum Spells enum Spells
@@ -47,7 +40,7 @@ public:
struct boss_moira_bronzebeardAI : public ScriptedAI struct boss_moira_bronzebeardAI : public ScriptedAI
{ {
boss_moira_bronzebeardAI(Creature* c) : ScriptedAI(c) {} boss_moira_bronzebeardAI(Creature* creature) : ScriptedAI(creature) {}
uint32 Heal_Timer; uint32 Heal_Timer;
uint32 MindBlast_Timer; uint32 MindBlast_Timer;
@@ -62,9 +55,7 @@ public:
Smite_Timer = 8000; Smite_Timer = 8000;
} }
void EnterCombat(Unit* /*who*/) void EnterCombat(Unit* /*who*/) {}
{
}
void UpdateAI(const uint32 diff) void UpdateAI(const uint32 diff)
{ {
@@ -92,10 +83,8 @@ public:
DoCast(me->getVictim(), SPELL_SMITE); DoCast(me->getVictim(), SPELL_SMITE);
Smite_Timer = 10000; Smite_Timer = 10000;
} else Smite_Timer -= diff; } else Smite_Timer -= diff;
} }
}; };
}; };
void AddSC_boss_moira_bronzebeard() void AddSC_boss_moira_bronzebeard()
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* ScriptData
SDName: Boss_Tomb_Of_Seven
SD%Complete: 90
SDComment: Learning Smelt Dark Iron if tribute quest rewarded. Missing event.
SDCategory: Blackrock Depths
EndScriptData */
#include "ScriptPCH.h" #include "ScriptPCH.h"
#include "blackrock_depths.h" #include "blackrock_depths.h"
@@ -52,10 +45,10 @@ class boss_gloomrel : public CreatureScript
public: public:
boss_gloomrel() : CreatureScript("boss_gloomrel") { } boss_gloomrel() : CreatureScript("boss_gloomrel") { }
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) bool OnGossipSelect(Player* player, Creature* creature, uint32 /*Sender*/, uint32 action)
{ {
player->PlayerTalkClass->ClearMenus(); player->PlayerTalkClass->ClearMenus();
switch (uiAction) switch (action)
{ {
case GOSSIP_ACTION_INFO_DEF+1: case GOSSIP_ACTION_INFO_DEF+1:
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
@@ -92,7 +85,6 @@ public:
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
return true; return true;
} }
}; };
enum DoomrelSpells enum DoomrelSpells
@@ -112,10 +104,10 @@ class boss_doomrel : public CreatureScript
public: public:
boss_doomrel() : CreatureScript("boss_doomrel") { } boss_doomrel() : CreatureScript("boss_doomrel") { }
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) bool OnGossipSelect(Player* player, Creature* creature, uint32 /*Sender*/, uint32 action)
{ {
player->PlayerTalkClass->ClearMenus(); player->PlayerTalkClass->ClearMenus();
switch (uiAction) switch (action)
{ {
case GOSSIP_ACTION_INFO_DEF+1: case GOSSIP_ACTION_INFO_DEF+1:
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_DOOMREL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_DOOMREL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
@@ -150,9 +142,9 @@ public:
struct boss_doomrelAI : public ScriptedAI struct boss_doomrelAI : public ScriptedAI
{ {
boss_doomrelAI(Creature* c) : ScriptedAI(c) boss_doomrelAI(Creature* creature) : ScriptedAI(creature)
{ {
instance = c->GetInstanceScript(); instance = creature->GetInstanceScript();
} }
InstanceScript* instance; InstanceScript* instance;
@@ -252,7 +244,6 @@ public:
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
}; };
}; };
void AddSC_boss_tomb_of_seven() void AddSC_boss_tomb_of_seven()
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* ScriptData
SDName: Instance_Blackrock_Depths
SD%Complete: 100
SDComment:
SDCategory: Blackrock Depths
EndScriptData */
#include "ScriptPCH.h" #include "ScriptPCH.h"
#include "blackrock_depths.h" #include "blackrock_depths.h"
@@ -63,7 +56,6 @@ enum eEnums
GO_GOLEM_ROOM_N = 170573, // Magmus door North GO_GOLEM_ROOM_N = 170573, // Magmus door North
GO_GOLEM_ROOM_S = 170574, // Magmus door Soutsh GO_GOLEM_ROOM_S = 170574, // Magmus door Soutsh
GO_THRONE_ROOM = 170575, // Throne door GO_THRONE_ROOM = 170575, // Throne door
GO_SPECTRAL_CHALICE = 164869, GO_SPECTRAL_CHALICE = 164869,
GO_CHEST_SEVEN = 169243 GO_CHEST_SEVEN = 169243
}; };
@@ -82,7 +74,7 @@ public:
{ {
instance_blackrock_depths_InstanceMapScript(Map* map) : InstanceScript(map) {} instance_blackrock_depths_InstanceMapScript(Map* map) : InstanceScript(map) {}
uint32 m_auiEncounter[MAX_ENCOUNTER]; uint32 encounter[MAX_ENCOUNTER];
std::string str_data; std::string str_data;
uint64 EmperorGUID; uint64 EmperorGUID;
@@ -121,7 +113,7 @@ public:
void Initialize() void Initialize()
{ {
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); memset(&encounter, 0, sizeof(encounter));
EmperorGUID = 0; EmperorGUID = 0;
PhalanxGUID = 0; PhalanxGUID = 0;
@@ -239,25 +231,25 @@ public:
switch (type) switch (type)
{ {
case TYPE_RING_OF_LAW: case TYPE_RING_OF_LAW:
m_auiEncounter[0] = data; encounter[0] = data;
break; break;
case TYPE_VAULT: case TYPE_VAULT:
m_auiEncounter[1] = data; encounter[1] = data;
break; break;
case TYPE_BAR: case TYPE_BAR:
if (data == SPECIAL) if (data == SPECIAL)
++BarAleCount; ++BarAleCount;
else else
m_auiEncounter[2] = data; encounter[2] = data;
break; break;
case TYPE_TOMB_OF_SEVEN: case TYPE_TOMB_OF_SEVEN:
m_auiEncounter[3] = data; encounter[3] = data;
break; break;
case TYPE_LYCEUM: case TYPE_LYCEUM:
m_auiEncounter[4] = data; encounter[4] = data;
break; break;
case TYPE_IRON_HALL: case TYPE_IRON_HALL:
m_auiEncounter[5] = data; encounter[5] = data;
break; break;
case DATA_GHOSTKILL: case DATA_GHOSTKILL:
GhostKillCount += data; GhostKillCount += data;
@@ -269,8 +261,8 @@ public:
OUT_SAVE_INST_DATA; OUT_SAVE_INST_DATA;
std::ostringstream saveStream; std::ostringstream saveStream;
saveStream << m_auiEncounter[0] << ' ' << m_auiEncounter[1] << ' ' << m_auiEncounter[2] << ' ' saveStream << encounter[0] << ' ' << encounter[1] << ' ' << encounter[2] << ' '
<< m_auiEncounter[3] << ' ' << m_auiEncounter[4] << ' ' << m_auiEncounter[5] << ' ' << GhostKillCount; << encounter[3] << ' ' << encounter[4] << ' ' << encounter[5] << ' ' << GhostKillCount;
str_data = saveStream.str(); str_data = saveStream.str();
@@ -284,20 +276,20 @@ public:
switch (type) switch (type)
{ {
case TYPE_RING_OF_LAW: case TYPE_RING_OF_LAW:
return m_auiEncounter[0]; return encounter[0];
case TYPE_VAULT: case TYPE_VAULT:
return m_auiEncounter[1]; return encounter[1];
case TYPE_BAR: case TYPE_BAR:
if (m_auiEncounter[2] == IN_PROGRESS && BarAleCount == 3) if (encounter[2] == IN_PROGRESS && BarAleCount == 3)
return SPECIAL; return SPECIAL;
else else
return m_auiEncounter[2]; return encounter[2];
case TYPE_TOMB_OF_SEVEN: case TYPE_TOMB_OF_SEVEN:
return m_auiEncounter[3]; return encounter[3];
case TYPE_LYCEUM: case TYPE_LYCEUM:
return m_auiEncounter[4]; return encounter[4];
case TYPE_IRON_HALL: case TYPE_IRON_HALL:
return m_auiEncounter[5]; return encounter[5];
case DATA_GHOSTKILL: case DATA_GHOSTKILL:
return GhostKillCount; return GhostKillCount;
} }
@@ -362,12 +354,12 @@ public:
OUT_LOAD_INST_DATA(in); OUT_LOAD_INST_DATA(in);
std::istringstream loadStream(in); std::istringstream loadStream(in);
loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] loadStream >> encounter[0] >> encounter[1] >> encounter[2] >> encounter[3]
>> m_auiEncounter[4] >> m_auiEncounter[5] >> GhostKillCount; >> encounter[4] >> encounter[5] >> GhostKillCount;
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) if (encounter[i] == IN_PROGRESS)
m_auiEncounter[i] = NOT_STARTED; encounter[i] = NOT_STARTED;
if (GhostKillCount > 0 && GhostKillCount < 7) if (GhostKillCount > 0 && GhostKillCount < 7)
GhostKillCount = 0;//reset tomb of seven event GhostKillCount = 0;//reset tomb of seven event
if (GhostKillCount >= 7) if (GhostKillCount >= 7)
@@ -459,7 +451,6 @@ public:
TombOfSevenEnd(); TombOfSevenEnd();
} }
}; };
}; };
void AddSC_instance_blackrock_depths() void AddSC_instance_blackrock_depths()
@@ -33,7 +33,7 @@ public:
{ {
instance_blackrock_spireMapScript(InstanceMap* map) : InstanceScript(map) {} instance_blackrock_spireMapScript(InstanceMap* map) : InstanceScript(map) {}
uint32 Encounter[MAX_ENCOUNTER]; uint32 encounter[MAX_ENCOUNTER];
std::string m_strInstData; std::string m_strInstData;
uint64 HighlordOmokk; uint64 HighlordOmokk;
uint64 ShadowHunterVoshgajin; uint64 ShadowHunterVoshgajin;
@@ -73,7 +73,7 @@ public:
{ {
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
{ {
if (Encounter[i] == IN_PROGRESS) if (encounter[i] == IN_PROGRESS)
return true; return true;
} }
return false; return false;