diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Battlefield/Zones/BattlefieldWG.h | 4 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 39 |
2 files changed, 41 insertions, 2 deletions
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h index 4b06ac8237b..734154020d9 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.h +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h @@ -1209,7 +1209,7 @@ struct BfWGGameObjectBuilding m_Build->SetDestructibleState(GO_DESTRUCTIBLE_REBUILDING, NULL, true); if (m_Build->GetEntry() == GO_WINTERGRASP_VAULT_GATE) if (GameObject* go = m_Build->FindNearestGameObject(GO_WINTERGRASP_KEEP_COLLISION_WALL, 10.0f)) - go->SetDestructibleState(GO_DESTRUCTIBLE_REBUILDING, NULL, true); + go->EnableCollision(true); // Update worldstate m_State = BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_INTACT - (m_Team * 3); @@ -1266,7 +1266,7 @@ struct BfWGGameObjectBuilding break; case BATTLEFIELD_WG_OBJECTTYPE_DOOR_LAST: if (GameObject* go = m_Build->FindNearestGameObject(GO_WINTERGRASP_KEEP_COLLISION_WALL, 10.0f)) - go->SetDestructibleState(GO_DESTRUCTIBLE_DESTROYED); + go->EnableCollision(false); m_WG->SetRelicInteractible(true); if (m_WG->GetRelic()) m_WG->GetRelic()->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 8b67a52d300..3cb2300cadf 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -1276,6 +1276,44 @@ class spell_q12372_cast_from_gossip_trigger : public SpellScriptLoader } }; +// http://www.wowhead.com/quest=12372 Defending Wyrmrest Temple +// 49370 - Wyrmrest Defender: Destabilize Azure Dragonshrine Effect +enum Quest12372Data +{ + NPC_WYRMREST_TEMPLE_CREDIT = 27698, +}; + +class spell_q12372_destabilize_azure_dragonshrine_dummy : public SpellScriptLoader +{ + public: + spell_q12372_destabilize_azure_dragonshrine_dummy() : SpellScriptLoader("spell_q12372_destabilize_azure_dragonshrine_dummy") { } + + class spell_q12372_destabilize_azure_dragonshrine_dummy_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q12372_destabilize_azure_dragonshrine_dummy_SpellScript); + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + if (GetHitCreature()) + if (Unit* caster = GetOriginalCaster()) + if (Vehicle* vehicle = caster->GetVehicleKit()) + if (Unit* passenger = vehicle->GetPassenger(0)) + if (Player* player = passenger->ToPlayer()) + player->KilledMonsterCredit(NPC_WYRMREST_TEMPLE_CREDIT, 0); + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_q12372_destabilize_azure_dragonshrine_dummy_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_q12372_destabilize_azure_dragonshrine_dummy_SpellScript(); + } +}; + void AddSC_quest_spell_scripts() { new spell_q55_sacred_cleansing(); @@ -1306,4 +1344,5 @@ void AddSC_quest_spell_scripts() new spell_q12066_bunny_kill_credit(); new spell_q12735_song_of_cleansing(); new spell_q12372_cast_from_gossip_trigger(); + new spell_q12372_destabilize_azure_dragonshrine_dummy(); } |