From a14fe1c4de1cce963a168a58e07d7c734ea1147a Mon Sep 17 00:00:00 2001 From: Rocco Silipo <108557877+Rorschach91@users.noreply.github.com> Date: Sat, 11 Oct 2025 18:41:14 +0200 Subject: [PATCH] fix(DB/SAI): Move Rizzle Sprysprocket event to smartscript. (#23167) --- .../pending_db_world/Rizzle_Sprysprocket.sql | 112 ++++++ .../Kalimdor/kalimdor_script_loader.cpp | 2 - src/server/scripts/Kalimdor/zone_azshara.cpp | 361 ------------------ src/server/scripts/World/go_scripts.cpp | 3 +- 4 files changed, 114 insertions(+), 364 deletions(-) create mode 100644 data/sql/updates/pending_db_world/Rizzle_Sprysprocket.sql delete mode 100644 src/server/scripts/Kalimdor/zone_azshara.cpp diff --git a/data/sql/updates/pending_db_world/Rizzle_Sprysprocket.sql b/data/sql/updates/pending_db_world/Rizzle_Sprysprocket.sql new file mode 100644 index 000000000..b0a37ddfc --- /dev/null +++ b/data/sql/updates/pending_db_world/Rizzle_Sprysprocket.sql @@ -0,0 +1,112 @@ + +-- Add Waypoint +DELETE FROM `waypoints` WHERE (`entry` IN (2300200)); +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `orientation`, `point_comment`) VALUES +(2300200, 1, 3691.97, -3962.41, 35.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 2, 3675.02, -3960.49, 35.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 3, 3653.19, -3958.33, 33.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 4, 3621.12, -3958.51, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 5, 3604.86, -3963, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 6, 3569.94, -3970.25, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 7, 3541.03, -3975.64, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 8, 3510.84, -3978.71, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 9, 3472.7, -3997.07, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 10, 3439.15, -4014.55, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 11, 3412.8, -4025.87, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 12, 3384.95, -4038.04, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 13, 3346.77, -4052.93, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 14, 3299.56, -4071.59, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 15, 3261.22, -4080.38, 30.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 16, 3220.68, -4083.09, 31.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 17, 3187.11, -4070.45, 33.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 18, 3162.78, -4062.75, 33.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 19, 3136.09, -4050.32, 33.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 20, 3119.47, -4044.51, 36.0363, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 21, 3098.95, -4019.8, 33.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 22, 3073.07, -4011.42, 33.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 23, 3051.71, -3993.37, 33.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 24, 3027.52, -3978.6, 33.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 25, 3003.78, -3960.14, 33.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 26, 2977.99, -3941.98, 31.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 27, 2964.57, -3932.07, 30.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 28, 2947.9, -3921.31, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 29, 2924.91, -3910.8, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 30, 2903.04, -3896.42, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 31, 2884.75, -3874.03, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 32, 2868.19, -3851.48, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 33, 2854.62, -3819.72, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 34, 2825.53, -3790.4, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 35, 2804.31, -3773.05, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 36, 2769.78, -3763.57, 29.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 37, 2727.23, -3745.92, 30.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 38, 2680.12, -3737.49, 30.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 39, 2647.62, -3739.94, 30.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 40, 2616.6, -3745.75, 30.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 41, 2589.38, -3731.97, 30.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 42, 2562.94, -3722.35, 31.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 43, 2521.05, -3716.6, 31.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 44, 2485.26, -3706.67, 31.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 45, 2458.93, -3696.67, 31.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 46, 2432, -3692.03, 31.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 47, 2399.59, -3681.97, 31.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 48, 2357.75, -3666.6, 31.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 49, 2311.99, -3656.88, 31.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 50, 2263.41, -3649.55, 31.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 51, 2209.05, -3641.76, 31.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 52, 2164.83, -3637.64, 31.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 53, 2122.42, -3639, 31.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 54, 2075.73, -3643.59, 31.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 55, 2033.59, -3649.52, 31.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 56, 1985.22, -3662.99, 31.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 57, 1927.09, -3679.56, 33.9118, NULL, 'Rizzle Sprysprocket escape'), +(2300200, 58, 1873.57, -3695.32, 33.9118, NULL, 'Rizzle Sprysprocket escape'); + +-- Set General SmartAI, Add Gossip ID, ScriptName, NpcFlag. +UPDATE `creature_template` SET `npcflag` = `npcflag` |1, `gossip_menu_id` = 21893, `ScriptName` = '', `AIName` = 'SmartAI' WHERE `entry` = 23002; + +-- Add SmartAI +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 23002); +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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(23002, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Just Summoned - Remove Npc Flags Gossip'), +(23002, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 64, 12, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Just Summoned - Store Targetlist'), +(23002, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 39865, 2, 0, 1, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Just Summoned - Cast \'Rizzle`s Blackjack\''), +(23002, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Just Summoned - Say Line 0'), +(23002, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2300200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Just Summoned - Run Script'), +(23002, 0, 5, 6, 60, 1, 100, 0, 15000, 20000, 25000, 30000, 0, 0, 11, 40525, 2, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Update - Cast \'Rizzle`s Frost Grenade\' (Phase 1)'), +(23002, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Update - Say Line 1 (Phase 1)'), +(23002, 0, 7, 8, 101, 1, 100, 0, 1, 10, 1000, 1000, 1000, 0, 55, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On 1 or More Players in Range - Stop Waypoint (Phase 1)'), +(23002, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 28, 39912, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On 1 or More Players in Range - Remove Aura \'Periodic Depth Charge Release\' (Phase 1)'), +(23002, 0, 9, 10, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On 1 or More Players in Range - Say Line 2 (Phase 1)'), +(23002, 0, 10, 11, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On 1 or More Players in Range - Add Npc Flags Gossip (Phase 1)'), +(23002, 0, 11, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On 1 or More Players in Range - Set Event Phase 0 (Phase 1)'), +(23002, 0, 12, 13, 62, 0, 100, 0, 21893, 0, 0, 0, 0, 0, 11, 39886, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Gossip Option 0 Selected - Cast \'Give Southfury Moonstone\''), +(23002, 0, 13, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Gossip Option 0 Selected - Despawn In 3000 ms'), +(23002, 0, 14, 0, 58, 0, 100, 0, 58, 2300200, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Path 2300200 Finished - Despawn Instant'); + +-- Set Action List +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2300200); +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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(2300200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 23025, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - Actionlist - Cast \'Blink Cooldown Reduction\''), +(2300200, 9, 1, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - Actionlist - Say Line 3'), +(2300200, 9, 2, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 11, 39871, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - Actionlist - Cast \'Rizzle`s Escape\''), +(2300200, 9, 3, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 11, 39912, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - Actionlist - Cast \'Periodic Depth Charge Release\''), +(2300200, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - Actionlist - Set Event Phase 1'), +(2300200, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 53, 1, 2300200, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - Actionlist - Start Waypoint Path 2300200'); + +-- Set Conditions +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` IN (15, 22)) AND (`SourceGroup` IN (8, 21893)) AND (`SourceEntry` IN (0, 23002)) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 47) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 10994) AND (`ConditionValue2` = 8) AND (`ConditionValue3` = 0); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 21893, 0, 0, 0, 47, 0, 10994, 8, 0, 0, 0, 0, '', 'Gossip displayed only if player has Chasing the Moonstone incomplete'), +(22, 8, 23002, 0, 0, 47, 0, 10994, 8, 0, 0, 0, 0, '', 'Event occurs only if player has Chasing the Moonstone incomplete.'); + +-- Set SmartAI (Rizzle's Depth Charge) +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 23025; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 23025); +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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(23025, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 207, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle\'s Depth Charge - On Just Summoned - Set hover 1'), +(23025, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle\'s Depth Charge - On Just Summoned - Set Swim On'), +(23025, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle\'s Depth Charge - On Just Summoned - Set Flags Not Selectable'), +(23025, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle\'s Depth Charge - On Just Summoned - Set Reactstate Passive'), +(23025, 0, 4, 5, 101, 0, 100, 0, 1, 5, 1000, 1000, 1000, 0, 11, 38576, 2, 0, 0, 0, 0, 21, 5, 0, 0, 0, 0, 0, 0, 0, 'Rizzle\'s Depth Charge - On 1 or More Players in Range - Cast \'Knockback\''), +(23025, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 1000, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle\'s Depth Charge - On 1 or More Players in Range - Despawn In 1000 ms'); diff --git a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp index 1e80e0982..8186c7f36 100644 --- a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp +++ b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp @@ -74,7 +74,6 @@ void AddSC_instance_wailing_caverns(); //Wailing caverns void AddSC_zulfarrak(); void AddSC_instance_zulfarrak(); //Zul'Farrak instance script void AddSC_ashenvale(); -void AddSC_azshara(); void AddSC_azuremyst_isle(); void AddSC_bloodmyst_isle(); void AddSC_boss_azuregos(); @@ -157,7 +156,6 @@ void AddKalimdorScripts() AddSC_zulfarrak(); AddSC_instance_zulfarrak(); //Zul'Farrak instance script AddSC_ashenvale(); - AddSC_azshara(); AddSC_azuremyst_isle(); AddSC_bloodmyst_isle(); AddSC_boss_azuregos(); diff --git a/src/server/scripts/Kalimdor/zone_azshara.cpp b/src/server/scripts/Kalimdor/zone_azshara.cpp deleted file mode 100644 index 1a10cec1d..000000000 --- a/src/server/scripts/Kalimdor/zone_azshara.cpp +++ /dev/null @@ -1,361 +0,0 @@ -/* - * This file is part of the AzerothCore 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 Affero General Public License as published by the - * Free Software Foundation; either version 3 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 Affero 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 . - */ - -#include "CreatureScript.h" -#include "Player.h" -#include "ScriptedCreature.h" -#include "ScriptedGossip.h" - -/*#### -# npc_rizzle_sprysprocket -####*/ - -enum RizzleSprysprocketData -{ - QUEST_CHASING_THE_MOONSTONE = 10994, - - NPC_DEPTH_CHARGE = 23025, - - SPELL_RIZZLE_BLACKJACK = 39865, - SPELL_RIZZLE_ESCAPE = 39871, - SPELL_RIZZLE_FROST_GRENADE = 40525, - SPELL_DEPTH_CHARGE_TRAP = 38576, - SPELL_PERIODIC_DEPTH_CHARGE = 39912, - SPELL_GIVE_SOUTHFURY_MOONSTONE = 39886, - - SAY_RIZZLE_START = 0, - SAY_RIZZLE_GRENADE = 1, - SAY_RIZZLE_FINAL = 2, - MSG_ESCAPE_NOTICE = 3, - GOSSIP_GET_MOONSTONE = 21893 - -}; - -Position const WPs[58] = -{ - {3691.97f, -3962.41f, 35.9118f, 3.67f}, - {3675.02f, -3960.49f, 35.9118f, 3.67f}, - {3653.19f, -3958.33f, 33.9118f, 3.59f}, - {3621.12f, -3958.51f, 29.9118f, 3.48f}, - {3604.86f, -3963, 29.9118f, 3.48f}, - {3569.94f, -3970.25f, 29.9118f, 3.44f}, - {3541.03f, -3975.64f, 29.9118f, 3.41f}, - {3510.84f, -3978.71f, 29.9118f, 3.41f}, - {3472.7f, -3997.07f, 29.9118f, 3.35f}, - {3439.15f, -4014.55f, 29.9118f, 3.29f}, - {3412.8f, -4025.87f, 29.9118f, 3.25f}, - {3384.95f, -4038.04f, 29.9118f, 3.24f}, - {3346.77f, -4052.93f, 29.9118f, 3.22f}, - {3299.56f, -4071.59f, 29.9118f, 3.20f}, - {3261.22f, -4080.38f, 30.9118f, 3.19f}, - {3220.68f, -4083.09f, 31.9118f, 3.18f}, - {3187.11f, -4070.45f, 33.9118f, 3.16f}, - {3162.78f, -4062.75f, 33.9118f, 3.15f}, - {3136.09f, -4050.32f, 33.9118f, 3.07f}, - {3119.47f, -4044.51f, 36.0363f, 3.07f}, - {3098.95f, -4019.8f, 33.9118f, 3.07f}, - {3073.07f, -4011.42f, 33.9118f, 3.07f}, - {3051.71f, -3993.37f, 33.9118f, 3.02f}, - {3027.52f, -3978.6f, 33.9118f, 3.00f}, - {3003.78f, -3960.14f, 33.9118f, 2.98f}, - {2977.99f, -3941.98f, 31.9118f, 2.96f}, - {2964.57f, -3932.07f, 30.9118f, 2.96f}, - {2947.9f, -3921.31f, 29.9118f, 2.96f}, - {2924.91f, -3910.8f, 29.9118f, 2.94f}, - {2903.04f, -3896.42f, 29.9118f, 2.93f}, - {2884.75f, -3874.03f, 29.9118f, 2.90f}, - {2868.19f, -3851.48f, 29.9118f, 2.82f}, - {2854.62f, -3819.72f, 29.9118f, 2.80f}, - {2825.53f, -3790.4f, 29.9118f, 2.744f}, - {2804.31f, -3773.05f, 29.9118f, 2.71f}, - {2769.78f, -3763.57f, 29.9118f, 2.70f}, - {2727.23f, -3745.92f, 30.9118f, 2.69f}, - {2680.12f, -3737.49f, 30.9118f, 2.67f}, - {2647.62f, -3739.94f, 30.9118f, 2.66f}, - {2616.6f, -3745.75f, 30.9118f, 2.64f}, - {2589.38f, -3731.97f, 30.9118f, 2.61f}, - {2562.94f, -3722.35f, 31.9118f, 2.56f}, - {2521.05f, -3716.6f, 31.9118f, 2.55f}, - {2485.26f, -3706.67f, 31.9118f, 2.51f}, - {2458.93f, -3696.67f, 31.9118f, 2.51f}, - {2432, -3692.03f, 31.9118f, 2.46f}, - {2399.59f, -3681.97f, 31.9118f, 2.45f}, - {2357.75f, -3666.6f, 31.9118f, 2.44f}, - {2311.99f, -3656.88f, 31.9118f, 2.94f}, - {2263.41f, -3649.55f, 31.9118f, 3.02f}, - {2209.05f, -3641.76f, 31.9118f, 2.99f}, - {2164.83f, -3637.64f, 31.9118f, 3.15f}, - {2122.42f, -3639, 31.9118f, 3.21f}, - {2075.73f, -3643.59f, 31.9118f, 3.22f}, - {2033.59f, -3649.52f, 31.9118f, 3.42f}, - {1985.22f, -3662.99f, 31.9118f, 3.42f}, - {1927.09f, -3679.56f, 33.9118f, 3.42f}, - {1873.57f, -3695.32f, 33.9118f, 3.44f} -}; - -class npc_rizzle_sprysprocket : public CreatureScript -{ -public: - npc_rizzle_sprysprocket() : CreatureScript("npc_rizzle_sprysprocket") { } - - struct npc_rizzle_sprysprocketAI : public ScriptedAI - { - npc_rizzle_sprysprocketAI(Creature* creature) : ScriptedAI(creature) { } - - void Reset() override - { - SpellEscapeTimer = 1300; - TeleportTimer = 3500; - CheckTimer = 10000; - GrenadeTimer = 30000; - MustDieTimer = 3000; - CurrWP = 0; - - PlayerGUID.Clear(); - - MustDie = false; - Escape = false; - ContinueWP = false; - Reached = false; - } - - void JustEngagedWith(Unit* /*who*/) override { } - - void AttackStart(Unit* who) override - { - if (!who || PlayerGUID) - return; - - Player* player = who->ToPlayer(); - - if (player && player->GetQuestStatus(QUEST_CHASING_THE_MOONSTONE) == QUEST_STATUS_INCOMPLETE) - { - PlayerGUID = who->GetGUID(); - Talk(SAY_RIZZLE_START); - DoCast(who, SPELL_RIZZLE_BLACKJACK, false); - return; - } - } - - void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) override - { - CloseGossipMenuFor(player); - me->CastSpell(player, SPELL_GIVE_SOUTHFURY_MOONSTONE, true); - MustDieTimer = 3000; - MustDie = true; - } - - void MovementInform(uint32 type, uint32 id) override - { - if (type != POINT_MOTION_TYPE) - return; - - if (id == 57) - { - me->DespawnOrUnsummon(); - return; - } - - ++CurrWP; - ContinueWP = true; - } - - void UpdateAI(uint32 diff) override - { - if (MustDie) - { - if (MustDieTimer <= diff) - { - me->DespawnOrUnsummon(); - return; - } - else MustDieTimer -= diff; - } - - if (!Escape) - { - if (!PlayerGUID) - return; - - if (SpellEscapeTimer <= diff) - { - DoCast(me, SPELL_RIZZLE_ESCAPE, false); - SpellEscapeTimer = 10000; - } - else SpellEscapeTimer -= diff; - - if (TeleportTimer <= diff) - { - // temp solution - unit can't be teleported by core using spelleffect 5, only players - me->NearTeleportTo(3706.39f, -3969.15f, 35.9118f, me->GetOrientation()); - - //begin swimming and summon depth charges - Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID); - if (!player) - return; - - Talk(MSG_ESCAPE_NOTICE, player); - DoCast(me, SPELL_PERIODIC_DEPTH_CHARGE); - me->SetHover(true); - me->SetSwim(true); - me->SetSpeed(MOVE_RUN, 0.85f, true); - me->GetMotionMaster()->MovementExpired(); - me->GetMotionMaster()->MovePoint(CurrWP, WPs[CurrWP]); - Escape = true; - } - else TeleportTimer -= diff; - - return; - } - - if (ContinueWP) - { - me->GetMotionMaster()->MovePoint(CurrWP, WPs[CurrWP]); - ContinueWP = false; - } - - if (GrenadeTimer <= diff) - { - if (Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID)) - { - Talk(SAY_RIZZLE_GRENADE, player); - DoCast(player, SPELL_RIZZLE_FROST_GRENADE, true); - } - GrenadeTimer = 30000; - } - else GrenadeTimer -= diff; - - if (CheckTimer <= diff) - { - Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID); - if (!player) - { - me->DespawnOrUnsummon(); - return; - } - - if (me->IsWithinDist(player, 10) && me->GetPositionX() > player->GetPositionX() && !Reached) - { - Talk(SAY_RIZZLE_FINAL); - me->ReplaceAllNpcFlags(NPCFlags(1)); - me->SetFaction(FACTION_FRIENDLY); - me->GetMotionMaster()->MoveIdle(); - me->RemoveAurasDueToSpell(SPELL_PERIODIC_DEPTH_CHARGE); - Reached = true; - } - - CheckTimer = 1000; - } - else CheckTimer -= diff; - } - - private: - ObjectGuid PlayerGUID; - uint32 SpellEscapeTimer; - uint32 TeleportTimer; - uint32 CheckTimer; - uint32 GrenadeTimer; - uint32 MustDieTimer; - uint32 CurrWP; - bool MustDie; - bool Escape; - bool ContinueWP; - bool Reached; - }; - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (player->GetQuestStatus(QUEST_CHASING_THE_MOONSTONE) != QUEST_STATUS_INCOMPLETE) - return true; - - AddGossipItemFor(player, GOSSIP_GET_MOONSTONE, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - SendGossipMenuFor(player, 10811, creature->GetGUID()); - - return true; - } - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_rizzle_sprysprocketAI(creature); - } -}; - -/*#### -# npc_depth_charge -####*/ -class npc_depth_charge : public CreatureScript -{ -public: - npc_depth_charge() : CreatureScript("npc_depth_charge") { } - - struct npc_depth_chargeAI : public ScriptedAI - { - npc_depth_chargeAI(Creature* creature) : ScriptedAI(creature) { } - - bool WeMustDie; - uint32 WeMustDieTimer; - - void Reset() override - { - me->SetHover(true); - me->SetSwim(true); - me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - WeMustDie = false; - WeMustDieTimer = 1000; - } - - void JustEngagedWith(Unit* /*who*/) override { } - - void AttackStart(Unit* /*who*/) override { } - - void MoveInLineOfSight(Unit* who) override - { - if (!who) - return; - - if (who->IsPlayer() && me->IsWithinDistInMap(who, 5)) - { - DoCast(who, SPELL_DEPTH_CHARGE_TRAP); - WeMustDie = true; - return; - } - } - - void UpdateAI(uint32 diff) override - { - if (WeMustDie) - { - if (WeMustDieTimer <= diff) - me->DespawnOrUnsummon(); - else - WeMustDieTimer -= diff; - } - return; - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_depth_chargeAI(creature); - } -}; - -void AddSC_azshara() -{ - new npc_rizzle_sprysprocket(); - new npc_depth_charge(); -} diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index ff9adc963..a190384b2 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -1066,7 +1066,7 @@ class go_southfury_moonstone : public GameObjectScript public: go_southfury_moonstone() : GameObjectScript("go_southfury_moonstone") { } - bool OnGossipHello(Player* player, GameObject* /*go*/) override + bool OnGossipHello(Player* player, GameObject* go) override { //implicitTarget=48 not implemented as of writing this code, and manual summon may be just ok for our purpose //player->CastSpell(player, SPELL_SUMMON_RIZZLE, false); @@ -1076,6 +1076,7 @@ public: // no need casting spell blackjack, it's casted by script npc_rizzle_sprysprocket. //creature->CastSpell(player, SPELL_BLACKJACK, false); creature->AI()->AttackStart(player); + go->DespawnOrUnsummon(8000ms); } return false;