diff options
author | Nay <dnpd.dd@gmail.com> | 2012-08-29 14:01:38 +0100 |
---|---|---|
committer | Nay <dnpd.dd@gmail.com> | 2012-08-29 14:01:38 +0100 |
commit | aa9f2e9f18f989f1753499409599e6fb01ea220f (patch) | |
tree | bbdfe9ad2991424599fce5c22449ea7cc8271ecf | |
parent | ee760ab36089c940cf53ba565102d49c6961fbf1 (diff) | |
parent | 856a5b62fb310f99852a6047dce321be18c06200 (diff) |
Merge remote-tracking branch 'origin/master' into 4.3.4
4 files changed, 51 insertions, 2 deletions
diff --git a/sql/updates/world/2012_08_28_00_world_spell_script_name.sql b/sql/updates/world/2012_08_28_00_world_spell_script_name.sql new file mode 100644 index 00000000000..01cfeb35f1f --- /dev/null +++ b/sql/updates/world/2012_08_28_00_world_spell_script_name.sql @@ -0,0 +1,4 @@ +-- Spell script name linking for Defending Wyrmrest Temple: Destabilize Azure Dragonshrine Effect +DELETE FROM `spell_script_names` WHERE `spell_id`=49370 ; +INSERT INTO `spell_script_names` VALUES +(49370,'spell_q12372_destabilize_azure_dragonshrine_dummy'); diff --git a/sql/updates/world/2012_08_28_01_world_achievement_criteria_data.sql b/sql/updates/world/2012_08_28_01_world_achievement_criteria_data.sql new file mode 100644 index 00000000000..bf247399553 --- /dev/null +++ b/sql/updates/world/2012_08_28_01_world_achievement_criteria_data.sql @@ -0,0 +1,6 @@ +DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (11478,11479,12827,12828); +INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES +(11478, 12, 0, 0, ''), -- Koralon the Flame Watcher (10 player) +(11479, 12, 1, 0, ''), -- Koralon the Flame Watcher (25 player) +(12827, 12, 0, 0, ''), -- Toravon the Ice Watcher (10 player) +(12828, 12, 1, 0, ''); -- Toravon the Ice Watcher (25 player) 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(); } |