mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Scripts/Draenor: Implement Establish your Garrison (34378) (#28219)
This commit is contained in:
17
sql/updates/world/master/2025_08_31_03_world.sql
Normal file
17
sql/updates/world/master/2025_08_31_03_world.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
UPDATE `gameobject_template` SET `scriptname` = 'go_master_surveyor' WHERE `entry` = 233664;
|
||||
|
||||
-- Condition
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 25 AND `SourceGroup` = 0 AND `SourceEntry` = 1152;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `Comment`) VALUES
|
||||
(25, 0, 1152, 0, 0, 47, 0, 36793, 66, 0, 0, 'TerrainSwap to 1152 if Quest: 36793 is complete/rewarded');
|
||||
|
||||
-- Spawntracking
|
||||
DELETE FROM `spawn_tracking` WHERE `SpawnTrackingId`=920544;
|
||||
INSERT INTO `spawn_tracking` (`SpawnTrackingId`, `SpawnType`, `SpawnId`, `QuestObjectiveIds`) VALUES
|
||||
(920544, 1, 395673, '272928');
|
||||
|
||||
DELETE FROM `spawn_tracking_state` WHERE `SpawnType`=1 AND `SpawnId`=920544;
|
||||
INSERT INTO `spawn_tracking_state` (`SpawnType`, `SpawnId`, `State`, `Visible`, `StateSpellVisualId`, `StateAnimId`, `StateAnimKitId`, `StateWorldEffects`) VALUES
|
||||
(1, 920544, 0, 0, NULL, NULL, NULL, NULL),
|
||||
(1, 920544, 1, 1, NULL, NULL, NULL, NULL),
|
||||
(1, 920544, 2, 0, NULL, NULL, NULL, NULL);
|
||||
@@ -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
|
||||
|
||||
63
src/server/scripts/Draenor/zone_frostfire_ridge.cpp
Normal file
63
src/server/scripts/Draenor/zone_frostfire_ridge.cpp
Normal file
@@ -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);
|
||||
};
|
||||
Reference in New Issue
Block a user