diff options
author | Aqua Deus <95978183+aquadeus@users.noreply.github.com> | 2025-08-31 10:26:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-31 10:26:25 +0200 |
commit | 4d73fcd56340db4a5924518bde8bf8c3527a9d84 (patch) | |
tree | 498c036d8733ef1d6c678c002285e6484da05cf3 /src/server/scripts | |
parent | de90cf03bd6b3aa4b0af52cee117a5c0882da48c (diff) |
Scripts/Draenor: Implement Establish your Garrison (34378) (#28219)
Diffstat (limited to 'src/server/scripts')
-rw-r--r-- | src/server/scripts/Draenor/draenor_script_loader.cpp | 2 | ||||
-rw-r--r-- | src/server/scripts/Draenor/zone_frostfire_ridge.cpp | 63 |
2 files changed, 65 insertions, 0 deletions
diff --git a/src/server/scripts/Draenor/draenor_script_loader.cpp b/src/server/scripts/Draenor/draenor_script_loader.cpp index a9ea6c61bd0..faeaa4cc662 100644 --- a/src/server/scripts/Draenor/draenor_script_loader.cpp +++ b/src/server/scripts/Draenor/draenor_script_loader.cpp @@ -18,6 +18,7 @@ // This is where scripts' loading functions should be declared: void AddSC_assault_on_the_dark_portal(); void AddSC_draenor_shadowmoon_valley(); +void AddSC_frostfire_ridge(); void AddSC_garrison_generic(); // Auchindoun @@ -30,6 +31,7 @@ void AddDraenorScripts() { AddSC_assault_on_the_dark_portal(); AddSC_draenor_shadowmoon_valley(); + AddSC_frostfire_ridge(); AddSC_garrison_generic(); // Auchindoun diff --git a/src/server/scripts/Draenor/zone_frostfire_ridge.cpp b/src/server/scripts/Draenor/zone_frostfire_ridge.cpp new file mode 100644 index 00000000000..c0213766d64 --- /dev/null +++ b/src/server/scripts/Draenor/zone_frostfire_ridge.cpp @@ -0,0 +1,63 @@ +/* + * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "GameObject.h" +#include "GameObjectAI.h" +#include "PhasingHandler.h" +#include "Player.h" +#include "QuestDef.h" +#include "ScriptMgr.h" + +// 233664 - Master Surveyor +enum MasterSurveyorMisc +{ + // Quest + QUEST_ESTABLISH_YOUR_GARRISON_HORDE = 34378, + + // Spells + SPELL_QUEST_34378_KILLCREDIT = 161033, + SPELL_CREATE_GARRISON_FROSTFIRE_RIDGE_HORDE = 160767 +}; + +Position const GarrisonLevelOneCreationPlayerPosition = { 5568.66f, 4635.45f, 146.61f, 5.079972743988037109f }; + +// 233664 - Master Surveyor +struct go_master_surveyor : public GameObjectAI +{ + go_master_surveyor(GameObject* go) : GameObjectAI(go) { } + + bool OnGossipHello(Player* player) override + { + if (player->GetQuestStatus(QUEST_ESTABLISH_YOUR_GARRISON_HORDE) == QUEST_STATUS_INCOMPLETE) + { + me->UseDoorOrButton(); + player->CastSpell(player, SPELL_QUEST_34378_KILLCREDIT, true); + player->CastSpell(player, SPELL_CREATE_GARRISON_FROSTFIRE_RIDGE_HORDE, true); + player->NearTeleportTo(GarrisonLevelOneCreationPlayerPosition); + PhasingHandler::OnConditionChange(player); + + return true; + } + + return false; + } +}; + +void AddSC_frostfire_ridge() +{ + RegisterGameObjectAI(go_master_surveyor); +}; |