Skip to content

Commit

Permalink
BRD Grim Guzzler rework part 3
Browse files Browse the repository at this point in the history
* Add the bar patrol event when Ribbly is killed (should also be true
for Plugger but this will come in next commit)
* Add a few basis ground for Plugger script which will come soon
  • Loading branch information
cala committed Oct 14, 2015
1 parent 1bbdfaa commit 21d1954
Show file tree
Hide file tree
Showing 4 changed files with 195 additions and 22 deletions.
5 changes: 4 additions & 1 deletion sql/scriptdev2/scriptdev2.sql
Expand Up @@ -3186,7 +3186,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen
(-1230043,'You can\'t hide from us. Prepare to burn!',0,1,0,0,'anvilrage guardsman SAY_GUARD_AGGRO'),
(-1230044,'That one\'s empty!!',0,0,0,60,'rocknot SAY_BARREL_1'),
(-1230045,'Ah, empty again!',0,0,0,35,'rocknot SAY_BARREL_2'),
(-1230046,'ALE!',0,0,0,60,'rocknot SAY_BARREL_3');
(-1230046,'ALE!',0,0,0,60,'rocknot SAY_BARREL_3'),
(-1230047,'I\m out of here!',0,0,0,60,'rocknot SAY_ROCKNOT_DESPAWN'),
(-1230048,'HALT! There were...reports...of a...disturbance.',0,1,0,0,'Fireguard Destroyer YELL_PATROL_1'),
(-1230049,'We...are...investigating.',0,1,0,0,'Fireguard Destroyer YELL_PATROL_2');

-- -1 249 000 ONYXIA'S LAIR
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
Expand Down
Expand Up @@ -681,7 +681,7 @@ struct npc_phalanxAI : public npc_escortAI
switch (uiPointId)
{
case 0:
m_creature->SetFactionTemporary(14, TEMPFACTION_NONE);
m_creature->SetFactionTemporary(FACTION_DARK_IRON, TEMPFACTION_NONE);
DoScriptText(YELL_PHALANX_AGGRO, m_creature);
SetRun(true);
break;
Expand Down Expand Up @@ -760,16 +760,17 @@ struct npc_rocknotAI : public npc_escortAI
{
npc_rocknotAI(Creature* pCreature) : npc_escortAI(pCreature)
{
m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
m_pInstance = (instance_blackrock_depths*)pCreature->GetInstanceData();
Reset();
}

ScriptedInstance* m_pInstance;
instance_blackrock_depths* m_pInstance;

uint32 m_uiBreakKegTimer;
uint32 m_uiBreakDoorTimer;
uint32 m_uiEmoteTimer;
uint32 m_uiBarReactTimer;
bool m_bIsDoorOpen;

void Reset() override
{
Expand All @@ -780,6 +781,7 @@ struct npc_rocknotAI : public npc_escortAI
m_uiBreakDoorTimer = 0;
m_uiEmoteTimer = 0;
m_uiBarReactTimer = 0;
m_bIsDoorOpen = false;
}

void DoGo(uint32 id, uint32 state)
Expand Down Expand Up @@ -836,8 +838,11 @@ struct npc_rocknotAI : public npc_escortAI
{
if (m_uiBreakDoorTimer <= uiDiff)
{
// Open the bar back door
DoGo(GO_BAR_DOOR, 2);
// Open the bar back door if relevant
m_pInstance->GetBarDoorIsOpen(m_bIsDoorOpen);
if (!m_bIsDoorOpen)
DoGo(GO_BAR_DOOR, 2);

DoScriptText(SAY_BARREL_3, m_creature);
DoGo(GO_BAR_KEG_TRAP, 0); // doesn't work very well, leaving code here for future
// spell by trap has effect61
Expand Down
Expand Up @@ -7,7 +7,7 @@

enum
{
MAX_ENCOUNTER = 10,
MAX_ENCOUNTER = 12,
MAX_RELIC_DOORS = 12,
MAX_DWARFS = 7,
MAX_DWARF_RUNES = 7,
Expand All @@ -23,6 +23,8 @@ enum
TYPE_FLAMELASH = 8,
TYPE_HURLEY = 9,
TYPE_BRIDGE = 10,
TYPE_BAR = 11,
TYPE_PLUGGER = 12,

NPC_EMPEROR = 9019,
NPC_PRINCESS = 8929,
Expand All @@ -38,6 +40,7 @@ enum
NPC_WATCHER_DOOMGRIP = 9476,
NPC_WARBRINGER_CONST = 8905, // Four of them in Relict Vault are related to Doomgrip summon event
NPC_LOREGRAIN = 9024,
NPC_FIREGUARD_DESTROYER = 8911,

// Jail Break event related
NPC_OGRABISI = 9677,
Expand Down Expand Up @@ -67,6 +70,9 @@ enum
NPC_HURLEY_BLACKBREATH = 9537,
NPC_BLACKBREATH_CRONY = 9541,
NPC_PLUGGER_SPAZZRING = 9499,
NPC_PRIVATE_ROCKNOT = 9503,
NPC_MISTRESS_NAGMARA = 9500,
NPC_RIBBLY_SCREWSPIGGOT = 9543,

GO_ARENA_1 = 161525,
GO_ARENA_2 = 161522,
Expand Down Expand Up @@ -112,6 +118,7 @@ enum

FACTION_DWARF_HOSTILE = 754, // Hostile faction for the Tomb of the Seven dwarfs
FACTION_ARENA_NEUTRAL = 15, // Neutral faction for NPC in top of Arena after event complete
FACTION_DARK_IRON = 54, // Hostile faction for the Grim Guzzler

// enum used to handle the various Grim Guzzler bar patron's reaction
// depending on the actions and events triggered by players
Expand All @@ -120,7 +127,11 @@ enum
PATRON_HOSTILE = 2,
SAY_PISSED_PATRON_1 = -1230037,
SAY_PISSED_PATRON_2 = -1230038,
SAY_PISSED_PATRON_3 = -1230039
SAY_PISSED_PATRON_3 = -1230039,
SAY_ROCKNOT_DESPAWN = -1230047,
YELL_PATROL_1 = -1230048,
YELL_PATROL_2 = -1230049,
SPELL_NAGMARA_VANISH = 15341
};

// Random emotes for Grim Guzzler patrons
Expand Down Expand Up @@ -184,6 +195,14 @@ static const float aVaultPositions[4] = {821.905f, -338.382f, -50.134f, 3.78736f
// Used to summon Hurley Blackbreath
static const float aHurleyPositions[4] = {856.0867f, -149.7469f, -49.6719f, 0.05949629f};

// Used to summon the patrol in Grim Guzzler
static const float aBarPatrolPositions[2][4] = {
{872.7059f, -232.5491f, -43.7525f, 2.069044f},
{865.5645f, -219.7471f, -43.7033f, 2.033881f}
};

static const uint32 aBarPatrolId[3] = {NPC_FIREGUARD_DESTROYER, NPC_ANVILRAGE_OFFICER, NPC_ANVILRAGE_OFFICER};

// Tomb of the Seven dwarfs
static const uint32 aTombDwarfes[MAX_DWARFS] = {NPC_ANGERREL, NPC_SEETHREL, NPC_DOPEREL, NPC_GLOOMREL, NPC_VILEREL, NPC_HATEREL, NPC_DOOMREL};

Expand Down Expand Up @@ -216,7 +235,7 @@ class instance_blackrock_depths : public ScriptedInstance

// Bar events
void SetBarDoorIsOpen() { m_bIsBarDoorOpen = true; }
bool GetBarDoorIsOpen() { return m_bIsBarDoorOpen; }
void GetBarDoorIsOpen(bool& bIsOpen) { bIsOpen = m_bIsBarDoorOpen; }

private:
void DoCallNextDwarf();
Expand All @@ -231,6 +250,8 @@ class instance_blackrock_depths : public ScriptedInstance
uint32 m_uiPatronEmoteTimer;
void HandleBarPatrons(uint8 uiEventType);
uint8 m_uiBrokenKegs;
void HandleBarPatrol(uint8 uiStep);
uint32 m_uiPatrolTimer;

uint8 m_uiCofferDoorsOpened;

Expand All @@ -242,6 +263,7 @@ class instance_blackrock_depths : public ScriptedInstance
GuidSet m_sVaultNpcGuids;
GuidSet m_sArenaCrowdNpcGuids;
GuidSet m_sBarPatronNpcGuids;
GuidSet m_sBarPatrolGuids;
};

#endif

0 comments on commit 21d1954

Please sign in to comment.