diff options
author | Malcrom <malcromdev@gmail.com> | 2012-05-16 12:30:37 -0230 |
---|---|---|
committer | Malcrom <malcromdev@gmail.com> | 2012-05-16 12:30:37 -0230 |
commit | ac844f99537dc9867242269f63c3cd58be96e1b2 (patch) | |
tree | 4c3512f4fbd0a3ac466798ddbf609eac41bb5c35 /src | |
parent | 0c3dbb3a57c5fb32fe6ecefeaada980e49a7d7f8 (diff) |
Core/Scripts: Scripting of Dragonspire Hall Runes "UBRS"
Additional work to do.
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h | 1 | ||||
-rw-r--r-- | src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h index cef08375c13..beef71ea857 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h @@ -57,6 +57,7 @@ enum AdditionalData { SPELL_SUMMON_ROOKERY_WHELP = 15745, MAX_ENCOUNTER = 14, + MAX_DRAGONSPIRE_HALL_RUNES = 7, }; enum GameObjects diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp index ff97984fa09..b5b1b34a593 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp @@ -247,7 +247,30 @@ 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; } |