diff options
Diffstat (limited to 'src')
3 files changed, 121 insertions, 28 deletions
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h index beef71ea857..0af2af948d3 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h @@ -33,7 +33,8 @@ enum Data DATA_WARCHIEF_REND_BLACKHAND, DATA_GYTH, DATA_THE_BEAST, - DATA_GENERAL_DRAKKISATH + DATA_GENERAL_DRAKKISATH, + DATA_DRAGONSPIRE_ROOM, }; enum Npc { @@ -51,6 +52,9 @@ enum Npc NPC_GYTH = 10339, NPC_THE_BEAST = 10430, NPC_GENERAL_DRAKKISATH = 10363, + NPC_BLACKHAND_DREADWEAVER = 9817, + NPC_BLACKHAND_SUMMONER = 9818, + NPC_BLACKHAND_VETERAN = 9819, }; enum AdditionalData @@ -58,6 +62,9 @@ enum AdditionalData SPELL_SUMMON_ROOKERY_WHELP = 15745, MAX_ENCOUNTER = 14, MAX_DRAGONSPIRE_HALL_RUNES = 7, + EVENT_PYROGUARD_EMBERSEER = 4884, + AREATRIGGER_ENTER_UBRS = 2046, + AREATRIGGER_STADIUM = 2026, }; enum GameObjects diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp index 411b800cd03..f84fcefd40b 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp @@ -20,11 +20,24 @@ #include "ScriptedCreature.h" #include "blackrock_spire.h" +enum Text +{ + EMOTE_ONE_STACK = 0, + EMOTE_TEN_STACK = 1, + EMOTE_FREE_OF_BONDS = 2, + YELL_FREE_OF_BONDS = 3, +}; + enum Spells { - SPELL_FIRENOVA = 23462, - SPELL_FLAMEBUFFET = 23341, - SPELL_PYROBLAST = 17274, + SPELL_ENCAGED_EMBERSEER = 15282, // Self on spawn + SPELL_FIRE_SHIELD_TRIGGER = 13377, // Self on spawn missing from 335 dbc + SPELL_FREEZE_ANIM = 16245, // Self on event start + SPELL_EMBERSEER_GROWING = 16048, // Self on event start + SPELL_EMBERSEER_FULL_STRENGTH = 16047, // Emberseer Full Strength + SPELL_FIRENOVA = 23462, // Combat + SPELL_FLAMEBUFFET = 23341, // Combat + SPELL_PYROBLAST = 17274, // Combat }; enum Events @@ -51,12 +64,19 @@ public: void Reset() { + if(instance->GetBossState(DATA_PYROGAURD_EMBERSEER) == IN_PROGRESS) + OpenDoors(FALSE); + instance->SetBossState(DATA_PYROGAURD_EMBERSEER,NOT_STARTED); + // respawn any dead Blackhand Incarcerators + DoCast(me, SPELL_ENCAGED_EMBERSEER); + //DoCast(me, SPELL_FIRE_SHIELD_TRIGGER); _Reset(); } void EnterCombat(Unit* /*who*/) { _EnterCombat(); + // activate all runes in room events.ScheduleEvent(EVENT_FIRENOVA, 6 * IN_MILLISECONDS); events.ScheduleEvent(EVENT_FLAMEBUFFET, 3 * IN_MILLISECONDS); events.ScheduleEvent(EVENT_PYROBLAST, 14 * IN_MILLISECONDS); @@ -64,12 +84,26 @@ public: void JustDied(Unit* /*killer*/) { + instance->SetBossState(DATA_PYROGAURD_EMBERSEER,DONE); + OpenDoors(TRUE); _JustDied(); } + void OpenDoors(bool Boss_Killed) + { + if (GameObject* door1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_IN))) + door1->SetGoState(GO_STATE_ACTIVE); + if (GameObject* door2 = me->GetMap()->GetGameObject(instance->GetData64(GO_DOORS))) + door2->SetGoState(GO_STATE_ACTIVE); + if (Boss_Killed) + if (GameObject* door3 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_OUT))) + door3->SetGoState(GO_STATE_ACTIVE); + } + void UpdateAI(uint32 const diff) { if (!UpdateVictim()) + return; events.Update(diff); diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp index b5b1b34a593..fdb73fe1196 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp @@ -49,6 +49,12 @@ public: uint64 Gyth; uint64 TheBeast; uint64 GeneralDrakkisath; + uint64 go_emberseerin; + uint64 go_doors; + uint64 go_emberseerout; + uint64 go_roomrunes[MAX_DRAGONSPIRE_HALL_RUNES]; + uint8 Runemaxprotectors[MAX_DRAGONSPIRE_HALL_RUNES]; + uint8 Runeprotectorsdead[MAX_DRAGONSPIRE_HALL_RUNES]; void Initialize() { @@ -67,6 +73,9 @@ public: Gyth = 0; TheBeast = 0; GeneralDrakkisath = 0; + go_emberseerin = 0; + go_doors = 0; + go_emberseerout = 0; } bool IsEncounterInProgress() const @@ -125,7 +134,11 @@ public: case NPC_GENERAL_DRAKKISATH: GeneralDrakkisath = creature->GetGUID(); break; - } + case NPC_BLACKHAND_DREADWEAVER: + case NPC_BLACKHAND_SUMMONER: + case NPC_BLACKHAND_VETERAN: + break; + } } void OnGameObjectCreate(GameObject* go) @@ -135,6 +148,36 @@ public: case GO_WHELP_SPAWNER: go->CastSpell(NULL, SPELL_SUMMON_ROOKERY_WHELP); break; + case GO_EMBERSEER_IN: + go_emberseerin = go->GetGUID(); + break; + case GO_DOORS: + go_doors = go->GetGUID(); + break; + case GO_EMBERSEER_OUT: + go_emberseerout = go->GetGUID(); + break; + case GO_ROOM_1_RUNE: + go_roomrunes[0] = go->GetGUID(); + break; + case GO_ROOM_2_RUNE: + go_roomrunes[1] = go->GetGUID(); + break; + case GO_ROOM_3_RUNE: + go_roomrunes[2] = go->GetGUID(); + break; + case GO_ROOM_4_RUNE: + go_roomrunes[3] = go->GetGUID(); + break; + case GO_ROOM_5_RUNE: + go_roomrunes[4] = go->GetGUID(); + break; + case GO_ROOM_6_RUNE: + go_roomrunes[5] = go->GetGUID(); + break; + case GO_ROOM_7_RUNE: + go_roomrunes[6] = go->GetGUID(); + break; } } @@ -167,6 +210,18 @@ public: return true; } + void ProcessEvent(WorldObject* /*gameObject*/, uint32 eventId) + { + switch (eventId) + { + case EVENT_PYROGUARD_EMBERSEER: + SetBossState(DATA_PYROGAURD_EMBERSEER,IN_PROGRESS); + break; + default: + break; + } + } + uint64 GetData64(uint32 type) { switch (type) @@ -199,6 +254,26 @@ public: return TheBeast; case DATA_GENERAL_DRAKKISATH: return GeneralDrakkisath; + case GO_EMBERSEER_IN: + return go_emberseerin; + case GO_DOORS: + return go_doors; + case GO_EMBERSEER_OUT: + return go_emberseerout; + case GO_ROOM_1_RUNE: + return go_roomrunes[0]; + case GO_ROOM_2_RUNE: + return go_roomrunes[1]; + case GO_ROOM_3_RUNE: + return go_roomrunes[2]; + case GO_ROOM_4_RUNE: + return go_roomrunes[3]; + case GO_ROOM_5_RUNE: + return go_roomrunes[4]; + case GO_ROOM_6_RUNE: + return go_roomrunes[5]; + case GO_ROOM_7_RUNE: + return go_roomrunes[6]; } return 0; @@ -247,30 +322,7 @@ public: }; -uint8 ActivatedRunes = 0; - -class go_dragonspire_hall_rune : public GameObjectScript -{ -public: - go_dragonspire_hall_rune() : GameObjectScript("go_dragonspire_hall_rune") { } - - void OnGameObjectStateChanged(GameObject* go, uint32 state) - { - if (state == GO_STATE_READY) - { - if (++ActivatedRunes == MAX_DRAGONSPIRE_HALL_RUNES) - { - if (GameObject* door1 = GetClosestGameObjectWithEntry(go, GO_EMBERSEER_IN, 150.0f)) - door1->SetGoState(GO_STATE_ACTIVE); - if (GameObject* door2 = GetClosestGameObjectWithEntry(go, GO_DOORS, 150.0f)) - door2->SetGoState(GO_STATE_ACTIVE); - } - } - } -}; - void AddSC_instance_blackrock_spire() { new instance_blackrock_spire(); - new go_dragonspire_hall_rune; } |