aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKillyana <morphone1@gmail.com>2020-01-15 16:08:59 +0100
committerKillyana <morphone1@gmail.com>2020-01-15 16:08:59 +0100
commit4a6ecbaec5b7361f7c97438bf59c86d740d29d62 (patch)
tree2ee39076056d8731d49f9264a91fb7e1501f202a
parent5558917286d6421173c4ee41b8d14018b7b3309f (diff)
DB/Quest: Convert the quest "Missing in Action" to SAI
Closes #24030
-rw-r--r--sql/updates/world/3.3.5/2020_01_15_01_world_335.sql152
-rw-r--r--src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp181
3 files changed, 154 insertions, 183 deletions
diff --git a/sql/updates/world/3.3.5/2020_01_15_01_world_335.sql b/sql/updates/world/3.3.5/2020_01_15_01_world_335.sql
new file mode 100644
index 00000000000..6b882d41cfd
--- /dev/null
+++ b/sql/updates/world/3.3.5/2020_01_15_01_world_335.sql
@@ -0,0 +1,152 @@
+--
+UPDATE `creature` SET `spawntimesecs`=120 WHERE `id`=349;
+UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`="" WHERE `entry` IN (349);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (349) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (34900,34901,34902,34903) AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(349,0,0,0,19,0,100,0,219,0,0,0,80,34900,0,0,0,0,0,1,0,0,0,0,0,0,0,"Corporal Keeshan - On Quest accept - Action list"),
+(34900,9,0,0,0,0,100,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Corporal Keeshan - Action list - Remove npc flag"),
+(34900,9,1,0,0,0,100,0,0,0,0,0,64,1,0,0,0,0,0,16,0,0,0,0,0,0,0,"Corporal Keeshan - Action list - Store target"),
+(34900,9,2,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,16,0,0,0,0,0,0,0,"Corporal Keeshan - Action list - Say text"),
+(34900,9,3,0,0,0,100,0,10000,10000,0,0,2,250,0,0,0,0,0,1,0,0,0,0,0,0,0,"Corporal Keeshan - Action list - Set faction"),
+(34900,9,4,0,0,0,100,0,0,0,0,0,53,0,349,0,219,0,1,1,0,0,0,0,0,0,0,"Corporal Keeshan - Action list - Start waypoint"),
+(349,0,1,0,0,0,100,0,5000,8000,8000,10000,11,11972,0,0,0,0,0,2,0,0,0,0,0,0,0,"Corporal Keeshan - IC - Cast Shield Bash"),
+(349,0,2,0,0,0,100,0,4000,5000,5000,6000,11,21008,0,0,0,0,0,2,0,0,0,0,0,0,0,"Corporal Keeshan - IC - Cast Mocking Blow"),
+(349,0,3,0,40,0,100,0,39,349,0,0,80,34901,2,0,0,0,0,1,0,0,0,0,0,0,0,"Corporal Keeshan - On wp reached - Action list"),
+(34901,9,0,0,0,0,100,0,0,0,0,0,54,30000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Corporal Keeshan - Action list - pause waypoint"),
+(34901,9,1,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Corporal Keeshan - Action list - Say text"),
+(34901,9,2,0,0,0,100,0,0,0,0,0,90,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Corporal Keeshan - Action list - Add bytes1 sit"),
+(34901,9,3,0,0,0,100,0,29000,29000,0,0,91,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Corporal Keeshan - Action list - Remove bytes1 sit"),
+(34901,9,4,0,0,0,100,0,3000,3000,0,0,1,2,0,0,0,0,0,12,1,0,0,0,0,0,0,"Corporal Keeshan - Action list - Say text"),
+(349,0,4,0,40,0,100,0,69,349,0,0,80,34902,2,0,0,0,0,1,0,0,0,0,0,0,0,"Corporal Keeshan - On wp reached - Action list"),
+(34902,9,0,0,0,0,100,0,0,0,0,0,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Corporal Keeshan - Action list - Set run On"),
+(34902,9,1,0,0,0,100,0,0,0,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0,"Corporal Keeshan - Action list - Say text"),
+(349,0,5,0,40,0,100,0,115,349,0,0,80,34903,2,0,0,0,0,1,0,0,0,0,0,0,0,"Corporal Keeshan - On wp reached - Action list"),
+(34903,9,0,0,0,0,100,0,0,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Corporal Keeshan - Action list - Say text"),
+(34903,9,1,0,0,0,100,0,8000,8000,0,0,1,4,0,0,0,0,0,12,1,0,0,0,0,0,0,"Corporal Keeshan - Action list - Say text"),
+(34903,9,2,0,0,0,100,0,0,0,0,0,15,219,0,0,0,0,0,12,1,0,0,0,0,0,0,"Corporal Keeshan - Action list - Quest explored"),
+(34903,9,3,0,0,0,100,0,20000,20000,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Corporal Keeshan - Action list - Despawn"),
+(349,0,6,0,6,0,100,0,0,0,0,0,6,219,0,0,0,0,0,12,1,0,0,0,0,0,0,"Corporal Keeshan - On Death - Fail quest");
+
+DELETE FROM `creature_text` WHERE `CreatureID`=349 AND `GroupID`=5;
+INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
+(349, 5, 0, 'So close to blessed Lakeshire. By the Light, let my legs carry me a bit further!', 12, 7, 100, 0, 0, 0, 28, 0, 'Corporal Keeshan');
+
+DELETE FROM `script_waypoint` WHERE `entry`=349;
+DELETE FROM `waypoints` WHERE `entry`=349;
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
+(349, 1, -8763.9, -2185.21, 141.217, "Corporal Keeshan"),
+(349, 2, -8768.76, -2185.94, 141.949, "Corporal Keeshan"),
+(349, 3, -8772.1, -2189.18, 141.443, "Corporal Keeshan"),
+(349, 4, -8778.78, -2195.66, 140.662, "Corporal Keeshan"),
+(349, 5, -8789.74, -2191.46, 141.634, "Corporal Keeshan"),
+(349, 6, -8802.37, -2185.99, 141.96, "Corporal Keeshan"),
+(349, 7, -8818, -2184.8, 139.153, "Corporal Keeshan"),
+(349, 8, -8828.42, -2193.02, 138.973, "Corporal Keeshan"),
+(349, 9, -8826.45, -2203.82, 140.293, "Corporal Keeshan"),
+(349, 10, -8822.54, -2211.43, 142.884, "Corporal Keeshan"),
+(349, 11, -8813.51, -2225.08, 143.327, "Corporal Keeshan"),
+(349, 12, -8807.5, -2233.92, 144.441, "Corporal Keeshan"),
+(349, 13, -8801.3, -2239.04, 146.476, "Corporal Keeshan"),
+(349, 14, -8797.57, -2243.61, 146.594, "Corporal Keeshan"),
+(349, 15, -8794.38, -2250.83, 146.723, "Corporal Keeshan"),
+(349, 16, -8788.1, -2255.1, 147.309, "Corporal Keeshan"),
+(349, 17, -8775.37, -2259.82, 149.18, "Corporal Keeshan"),
+(349, 18, -8768.09, -2259.54, 150.52, "Corporal Keeshan"),
+(349, 19, -8754.65, -2255.62, 152.253, "Corporal Keeshan"),
+(349, 20, -8748.51, -2252.62, 153.098, "Corporal Keeshan"),
+(349, 21, -8743.2, -2251.67, 154.038, "Corporal Keeshan"),
+(349, 22, -8738.4, -2250.23, 154.028, "Corporal Keeshan"),
+(349, 23, -8734.35, -2251.56, 154.363, "Corporal Keeshan"),
+(349, 24, -8727.41, -2248.64, 154.919, "Corporal Keeshan"),
+(349, 25, -8717.66, -2246.3, 154.926, "Corporal Keeshan"),
+(349, 26, -8709.05, -2245.83, 154.767, "Corporal Keeshan"),
+(349, 27, -8700.13, -2243.28, 153.872, "Corporal Keeshan"),
+(349, 28, -8690.15, -2242.54, 153.733, "Corporal Keeshan"),
+(349, 29, -8683.49, -2244.31, 155.356, "Corporal Keeshan"),
+(349, 30, -8674.53, -2247.89, 155.574, "Corporal Keeshan"),
+(349, 31, -8669.86, -2252.77, 154.854, "Corporal Keeshan"),
+(349, 32, -8669.07, -2258.88, 156.424, "Corporal Keeshan"),
+(349, 33, -8670.56, -2264.69, 156.978, "Corporal Keeshan"),
+(349, 34, -8673.45, -2269.45, 156.007, "Corporal Keeshan"),
+(349, 35, -8674.4, -2275.9, 155.747, "Corporal Keeshan"),
+(349, 36, -8674.82, -2282.75, 155.496, "Corporal Keeshan"),
+(349, 37, -8675.17, -2289.5, 157.049, "Corporal Keeshan"),
+(349, 38, -8676.43, -2297.67, 156.701, "Corporal Keeshan"),
+(349, 39, -8677.59, -2304.85, 155.917, "Corporal Keeshan"),
+(349, 40, -8682.32, -2312.88, 155.928, "Corporal Keeshan"),
+(349, 41, -8687.78, -2324.44, 156.024, "Corporal Keeshan"),
+(349, 42, -8695.71, -2334.87, 156.06, "Corporal Keeshan"),
+(349, 43, -8705.17, -2345.13, 156.021, "Corporal Keeshan"),
+(349, 44, -8715.1, -2353.95, 156.188, "Corporal Keeshan"),
+(349, 45, -8725.8, -2359.17, 156.253, "Corporal Keeshan"),
+(349, 46, -8735.92, -2363.27, 157.151, "Corporal Keeshan"),
+(349, 47, -8746.82, -2367.99, 158.13, "Corporal Keeshan"),
+(349, 48, -8755.38, -2375.72, 157.271, "Corporal Keeshan"),
+(349, 49, -8765.12, -2388.08, 156.092, "Corporal Keeshan"),
+(349, 50, -8768.84, -2395.58, 155.926, "Corporal Keeshan"),
+(349, 51, -8772.85, -2405.27, 156.418, "Corporal Keeshan"),
+(349, 52, -8776.95, -2414.94, 156.388, "Corporal Keeshan"),
+(349, 53, -8781.69, -2430.11, 153.264, "Corporal Keeshan"),
+(349, 54, -8786.76, -2440.34, 147.849, "Corporal Keeshan"),
+(349, 55, -8792.01, -2453.38, 142.746, "Corporal Keeshan"),
+(349, 56, -8797.41, -2462.21, 138.171, "Corporal Keeshan"),
+(349, 57, -8804.78, -2472.43, 134.192, "Corporal Keeshan"),
+(349, 58, -8815.26, -2478.45, 133.079, "Corporal Keeshan"),
+(349, 59, -8823.74, -2491.21, 132.911, "Corporal Keeshan"),
+(349, 60, -8835.25, -2496.44, 132.057, "Corporal Keeshan"),
+(349, 61, -8841.04, -2503.01, 132.199, "Corporal Keeshan"),
+(349, 62, -8850.81, -2509.63, 132.865, "Corporal Keeshan"),
+(349, 63, -8858.64, -2522.29, 133.852, "Corporal Keeshan"),
+(349, 64, -8862.25, -2527.1, 134.279, "Corporal Keeshan"),
+(349, 65, -8870.67, -2542.08, 131.044, "Corporal Keeshan"),
+(349, 66, -8880.4, -2550.79, 130.505, "Corporal Keeshan"),
+(349, 67, -8892.87, -2560.3, 130.558, "Corporal Keeshan"),
+(349, 68, -8908.74, -2573.64, 131.616, "Corporal Keeshan"),
+(349, 69, -8922.05, -2585.31, 132.446, "Corporal Keeshan"),
+(349, 70, -8935.86, -2591.19, 132.446, "Corporal Keeshan"),
+(349, 71, -8949.08, -2596.87, 132.537, "Corporal Keeshan"),
+(349, 72, -8959.17, -2599.72, 132.507, "Corporal Keeshan"),
+(349, 73, -8969.43, -2601.96, 132.471, "Corporal Keeshan"),
+(349, 74, -8979.77, -2603.66, 132.39, "Corporal Keeshan"),
+(349, 75, -8991.61, -2604.16, 131.196, "Corporal Keeshan"),
+(349, 76, -9000.2, -2602.38, 128.954, "Corporal Keeshan"),
+(349, 77, -9011.57, -2594.23, 127.435, "Corporal Keeshan"),
+(349, 78, -9019.77, -2587.67, 126.618, "Corporal Keeshan"),
+(349, 79, -9028.35, -2582.26, 125.787, "Corporal Keeshan"),
+(349, 80, -9038.96, -2572.71, 124.748, "Corporal Keeshan"),
+(349, 81, -9046.92, -2560.64, 124.447, "Corporal Keeshan"),
+(349, 82, -9059.29, -2550.1, 123.756, "Corporal Keeshan"),
+(349, 83, -9068.15, -2547.28, 122.965, "Corporal Keeshan"),
+(349, 84, -9077.54, -2541.67, 121.17, "Corporal Keeshan"),
+(349, 85, -9085.61, -2532.98, 118.85, "Corporal Keeshan"),
+(349, 86, -9097.8, -2520.49, 117.401, "Corporal Keeshan"),
+(349, 87, -9110.18, -2507.01, 117.098, "Corporal Keeshan"),
+(349, 88, -9119.21, -2498.23, 116.627, "Corporal Keeshan"),
+(349, 89, -9124.61, -2487.07, 115.972, "Corporal Keeshan"),
+(349, 90, -9127.42, -2478.53, 114.843, "Corporal Keeshan"),
+(349, 91, -9133.18, -2465.77, 113.029, "Corporal Keeshan"),
+(349, 92, -9137.54, -2456.22, 111.051, "Corporal Keeshan"),
+(349, 93, -9146.73, -2441.6, 107.979, "Corporal Keeshan"),
+(349, 94, -9155.62, -2430.79, 106.251, "Corporal Keeshan"),
+(349, 95, -9158.06, -2420.36, 104.838, "Corporal Keeshan"),
+(349, 96, -9157.25, -2410.2, 103.858, "Corporal Keeshan"),
+(349, 97, -9152.95, -2401.47, 102.679, "Corporal Keeshan"),
+(349, 98, -9153.63, -2393.46, 100.63, "Corporal Keeshan"),
+(349, 99, -9156.48, -2385.68, 98.2937, "Corporal Keeshan"),
+(349, 100, -9161.01, -2379.87, 96.2066, "Corporal Keeshan"),
+(349, 101, -9169.08, -2373.14, 93.8832, "Corporal Keeshan"),
+(349, 102, -9175.61, -2368.72, 92.5178, "Corporal Keeshan"),
+(349, 103, -9187.1, -2360.52, 89.9231, "Corporal Keeshan"),
+(349, 104, -9194.27, -2352.89, 87.593, "Corporal Keeshan"),
+(349, 105, -9201.07, -2344.88, 85.8516, "Corporal Keeshan"),
+(349, 106, -9205.62, -2339.56, 85.0342, "Corporal Keeshan"),
+(349, 107, -9212.44, -2331.58, 83.8068, "Corporal Keeshan"),
+(349, 108, -9219.26, -2323.6, 82.29, "Corporal Keeshan"),
+(349, 109, -9229.98, -2313.25, 79.4506, "Corporal Keeshan"),
+(349, 110, -9240.03, -2303.51, 76.7841, "Corporal Keeshan"),
+(349, 111, -9249.34, -2298.82, 74.3911, "Corporal Keeshan"),
+(349, 112, -9254.95, -2296.68, 72.8144, "Corporal Keeshan"),
+(349, 113, -9264.73, -2292.92, 70.0089, "Corporal Keeshan"),
+(349, 114, -9272.24, -2293.79, 68.6096, "Corporal Keeshan"),
+(349, 115, -9277.03, -2295.98, 68.1135, "Corporal Keeshan");
diff --git a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp
index 3d310fbf835..670ac48b006 100644
--- a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp
+++ b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp
@@ -182,7 +182,7 @@ void AddSC_ghostlands();
void AddSC_goldshire();
void AddSC_hinterlands();
void AddSC_isle_of_queldanas();
-void AddSC_redridge_mountains();
+//void AddSC_redridge_mountains();
void AddSC_silverpine_forest();
void AddSC_stormwind_city();
void AddSC_swamp_of_sorrows();
@@ -360,7 +360,7 @@ void AddEasternKingdomsScripts()
AddSC_goldshire();
AddSC_hinterlands();
AddSC_isle_of_queldanas();
- AddSC_redridge_mountains();
+ //AddSC_redridge_mountains();
AddSC_silverpine_forest();
AddSC_stormwind_city();
AddSC_swamp_of_sorrows();
diff --git a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp b/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp
deleted file mode 100644
index fae9b4a3638..00000000000
--- a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * 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/>.
- */
-
-/* Script Data Start
-SDName: Redridge Mountains
-SD%Complete: 100%
-SDComment: Support for quest 219.
-Script Data End */
-
-#include "ScriptMgr.h"
-#include "ScriptedCreature.h"
-#include "ScriptedEscortAI.h"
-#include "Player.h"
-
-enum CorporalKeeshan
-{
- QUEST_MISSING_IN_ACTION = 219,
- SAY_CORPORAL_1 = 0,
- SAY_CORPORAL_2 = 1,
- SAY_CORPORAL_3 = 2,
- SAY_CORPORAL_4 = 3,
- SAY_CORPORAL_5 = 4,
- SPELL_MOCKING_BLOW = 21008,
- SPELL_SHIELD_BASH = 11972
-};
-
-class npc_corporal_keeshan : public CreatureScript
-{
-public:
- npc_corporal_keeshan() : CreatureScript("npc_corporal_keeshan") { }
-
- struct npc_corporal_keeshanAI : public EscortAI
- {
- npc_corporal_keeshanAI(Creature* creature) : EscortAI(creature)
- {
- Initialize();
- }
-
- void Initialize()
- {
- timer = 0;
- phase = 0;
- mockingBlowTimer = 5000;
- shieldBashTimer = 8000;
- }
-
- void Reset() override
- {
- Initialize();
- }
-
- void QuestAccept(Player* player, Quest const* quest) override
- {
- if (quest->GetQuestId() == QUEST_MISSING_IN_ACTION)
- {
- Talk(SAY_CORPORAL_1, player);
- me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_ACTIVE);
- EscortAI::Start(true, false, player->GetGUID(), quest);
- }
- }
-
- void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override
- {
- Player* player = GetPlayerForEscort();
- if (!player)
- return;
-
- if (waypointId >= 65)
- me->SetWalk(false);
-
- switch (waypointId)
- {
- case 39:
- SetEscortPaused(true);
- timer = 2000;
- phase = 1;
- break;
- case 65:
- me->SetWalk(false);
- break;
- case 115:
- player->GroupEventHappens(QUEST_MISSING_IN_ACTION, me);
- timer = 2000;
- phase = 4;
- break;
- }
- }
-
- void UpdateAI(uint32 diff) override
- {
- if (HasEscortState(STATE_ESCORT_NONE))
- return;
-
- EscortAI::UpdateAI(diff);
-
- if (phase)
- {
- if (timer <= diff)
- {
- switch (phase)
- {
- case 1:
- me->SetStandState(UNIT_STAND_STATE_SIT);
- timer = 1000;
- phase = 2;
- break;
- case 2:
- Talk(SAY_CORPORAL_2);
- timer = 15000;
- phase = 3;
- break;
- case 3:
- Talk(SAY_CORPORAL_3);
- me->SetStandState(UNIT_STAND_STATE_STAND);
- SetEscortPaused(false);
- timer = 0;
- phase = 0;
- break;
- case 4:
- Talk(SAY_CORPORAL_4);
- timer = 2500;
- phase = 5;
- break;
- case 5:
- Talk(SAY_CORPORAL_5);
- timer = 0;
- phase = 0;
- break;
- }
- } else timer -= diff;
- }
-
- if (!UpdateVictim())
- return;
-
- if (mockingBlowTimer <= diff)
- {
- DoCastVictim(SPELL_MOCKING_BLOW);
- mockingBlowTimer = 5000;
- } else mockingBlowTimer -= diff;
-
- if (shieldBashTimer <= diff)
- {
- DoCastVictim(SPELL_MOCKING_BLOW);
- shieldBashTimer = 8000;
- } else shieldBashTimer -= diff;
-
- DoMeleeAttackIfReady();
- }
-
- private:
- uint32 phase;
- uint32 timer;
- uint32 mockingBlowTimer;
- uint32 shieldBashTimer;
- };
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_corporal_keeshanAI(creature);
- }
-};
-
-void AddSC_redridge_mountains()
-{
- new npc_corporal_keeshan();
-}