aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2025_01_02_25_world.sql138
-rw-r--r--src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp111
-rw-r--r--src/server/scripts/Kalimdor/zone_durotar.cpp45
-rw-r--r--src/server/scripts/Kalimdor/zone_orgrimmar.cpp28
-rw-r--r--src/server/scripts/Pandaria/zone_the_jade_forest.cpp129
5 files changed, 378 insertions, 73 deletions
diff --git a/sql/updates/world/master/2025_01_02_25_world.sql b/sql/updates/world/master/2025_01_02_25_world.sql
new file mode 100644
index 00000000000..36a6eedd822
--- /dev/null
+++ b/sql/updates/world/master/2025_01_02_25_world.sql
@@ -0,0 +1,138 @@
+-- Creature templates
+UPDATE `creature_template` SET `faction`=35, `BaseAttackTime`=2000, `unit_flags2`=0x4000800, `unit_flags3`=0x5000000, `VehicleId`=7262 WHERE `entry`=170715; -- Stormwind Gryphon
+
+DELETE FROM `creature_template_addon` WHERE `entry` IN (170715);
+INSERT INTO `creature_template_addon` (`entry`, `PathId`, `mount`, `StandState`, `AnimTier`, `VisFlags`, `SheathState`, `PvpFlags`, `emote`, `aiAnimKit`, `movementAnimKit`, `meleeAnimKit`, `visibilityDistanceType`, `auras`) VALUES
+(170715, 0, 0, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, ''); -- 170715 (Stormwind Gryphon)
+
+-- Models
+UPDATE `creature_template_model` SET `VerifiedBuild`=57689 WHERE (`Idx`=1 AND `CreatureID` IN (66890,62167,66399,66398,66382)) OR (`Idx`=0 AND `CreatureID` IN (66890,66510,66299,66527,54617,66297,66434,66559,66889,66509,54618,54615,62167,66530,66399,66435,66398,66382,66397,65840)) OR (`Idx`=3 AND `CreatureID`=66398) OR (`Idx`=2 AND `CreatureID`=66398);
+
+UPDATE `creature_model_info` SET `VerifiedBuild`=57689 WHERE `DisplayID` IN (96422, 23257, 45191, 44868, 45102, 44961, 44962, 46033, 46037, 46036, 46035, 46085, 17188, 44981, 25587, 28038, 38873);
+
+-- Difficulties
+UPDATE `creature_template_difficulty` SET `ContentTuningID`=864, `StaticFlags1`=0x30000000, `VerifiedBuild`=57689 WHERE (`Entry`=170715 AND `DifficultyID`=0); -- 170715 (Stormwind Gryphon) - CanSwim, Floating
+DELETE FROM `creature_template_difficulty` WHERE `Entry` IN (170715) AND `DifficultyID`=1;
+
+-- Gossips
+DELETE FROM `gossip_menu_option` WHERE (`MenuID`=25369 AND `OptionID`=1);
+INSERT INTO `gossip_menu_option` (`MenuID`, `GossipOptionID`, `OptionID`, `OptionNpc`, `OptionText`, `OptionBroadcastTextID`, `Language`, `Flags`, `ActionMenuID`, `ActionPoiID`, `GossipNpcOptionID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `SpellID`, `OverrideIconID`, `VerifiedBuild`) VALUES
+(25369, 54294, 1, 0, 'I need a flight to The Skyfire.', 0, 0, 0, 0, 0, NULL, 0, 0, NULL, 0, NULL, NULL, 57689);
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (14971,15111) AND `SourceEntry`=0;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (25369) AND `SourceEntry`=1;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(15,14971,0,0,0,47,0,29548,8,0,'',0,0,0,'','Show gossip option if quest 29548 is taken'),
+(15,15111,0,0,0,47,0,29548,8,0,'',0,0,0,'','Show gossip option if quest 29548 is taken'),
+(15,25369,1,0,0,47,0,29548,8,0,'',0,0,0,'','Show gossip option if quest 29548 is taken');
+
+-- Quests
+UPDATE `quest_poi` SET `VerifiedBuild`=57689 WHERE (`QuestID`=29548 AND `BlobIndex`=0 AND `Idx1`=3) OR (`QuestID`=29548 AND `BlobIndex`=0 AND `Idx1`=2) OR (`QuestID`=29548 AND `BlobIndex`=0 AND `Idx1`=1) OR (`QuestID`=29548 AND `BlobIndex`=0 AND `Idx1`=0) OR (`QuestID`=83492 AND `BlobIndex`=0 AND `Idx1`=0) OR (`QuestID`=76108 AND `BlobIndex`=2 AND `Idx1`=5) OR (`QuestID`=76108 AND `BlobIndex`=1 AND `Idx1`=4) OR (`QuestID`=76108 AND `BlobIndex`=0 AND `Idx1`=3) OR (`QuestID`=76108 AND `BlobIndex`=0 AND `Idx1`=2) OR (`QuestID`=76108 AND `BlobIndex`=0 AND `Idx1`=1) OR (`QuestID`=76108 AND `BlobIndex`=0 AND `Idx1`=0) OR (`QuestID`=32009 AND `BlobIndex`=0 AND `Idx1`=1) OR (`QuestID`=32009 AND `BlobIndex`=0 AND `Idx1`=0) OR (`QuestID`=32008 AND `BlobIndex`=0 AND `Idx1`=1) OR (`QuestID`=32008 AND `BlobIndex`=0 AND `Idx1`=0) OR (`QuestID`=82672 AND `BlobIndex`=3 AND `Idx1`=4) OR (`QuestID`=82672 AND `BlobIndex`=2 AND `Idx1`=3) OR (`QuestID`=82672 AND `BlobIndex`=1 AND `Idx1`=2) OR (`QuestID`=82672 AND `BlobIndex`=0 AND `Idx1`=1) OR (`QuestID`=82672 AND `BlobIndex`=0 AND `Idx1`=0) OR (`QuestID`=62567 AND `BlobIndex`=0 AND `Idx1`=0) OR (`QuestID`=46729 AND `BlobIndex`=0 AND `Idx1`=4) OR (`QuestID`=46729 AND `BlobIndex`=0 AND `Idx1`=3) OR (`QuestID`=46729 AND `BlobIndex`=0 AND `Idx1`=2) OR (`QuestID`=46729 AND `BlobIndex`=0 AND `Idx1`=1) OR (`QuestID`=46729 AND `BlobIndex`=0 AND `Idx1`=0);
+UPDATE `quest_poi_points` SET `VerifiedBuild`=57689 WHERE (`QuestID`=29548 AND `Idx1`=3 AND `Idx2`=0) OR (`QuestID`=29548 AND `Idx1`=2 AND `Idx2`=0) OR (`QuestID`=29548 AND `Idx1`=1 AND `Idx2`=0) OR (`QuestID`=29548 AND `Idx1`=0 AND `Idx2`=0) OR (`QuestID`=83492 AND `Idx1`=0 AND `Idx2`=0) OR (`QuestID`=76108 AND `Idx1`=5 AND `Idx2`=0) OR (`QuestID`=76108 AND `Idx1`=4 AND `Idx2`=0) OR (`QuestID`=76108 AND `Idx1`=3 AND `Idx2`=0) OR (`QuestID`=76108 AND `Idx1`=2 AND `Idx2`=0) OR (`QuestID`=76108 AND `Idx1`=1 AND `Idx2`=0) OR (`QuestID`=76108 AND `Idx1`=0 AND `Idx2`=0) OR (`QuestID`=32009 AND `Idx1`=1 AND `Idx2`=0) OR (`QuestID`=32009 AND `Idx1`=0 AND `Idx2`=0) OR (`QuestID`=32008 AND `Idx1`=1 AND `Idx2`=0) OR (`QuestID`=32008 AND `Idx1`=0 AND `Idx2`=0) OR (`QuestID`=82672 AND `Idx1`=4 AND `Idx2`=0) OR (`QuestID`=82672 AND `Idx1`=3 AND `Idx2`=0) OR (`QuestID`=82672 AND `Idx1`=2 AND `Idx2`=0) OR (`QuestID`=82672 AND `Idx1`=1 AND `Idx2`=0) OR (`QuestID`=82672 AND `Idx1`=0 AND `Idx2`=0) OR (`QuestID`=62567 AND `Idx1`=0 AND `Idx2`=0) OR (`QuestID`=46729 AND `Idx1`=4 AND `Idx2`=0) OR (`QuestID`=46729 AND `Idx1`=3 AND `Idx2`=0) OR (`QuestID`=46729 AND `Idx1`=2 AND `Idx2`=0) OR (`QuestID`=46729 AND `Idx1`=1 AND `Idx2`=0) OR (`QuestID`=46729 AND `Idx1`=0 AND `Idx2`=0);
+
+UPDATE `quest_details` SET `VerifiedBuild`=57689 WHERE `ID`=29548;
+
+UPDATE `quest_request_items` SET `VerifiedBuild`=57689 WHERE `ID`=29548;
+
+UPDATE `quest_offer_reward` SET `VerifiedBuild`=57689 WHERE `ID`=29548;
+
+UPDATE `creature_queststarter` SET `VerifiedBuild`=57689 WHERE (`id`=55789 AND `quest`=29548);
+
+UPDATE `creature_questender` SET `VerifiedBuild`=57689 WHERE (`id`=66292 AND `quest`=29548);
+
+-- Spells
+UPDATE `spell_target_position` SET `PositionX`=-671.29998779296875, `PositionY`=-1480.4300537109375, `PositionZ`=130.1999969482421875, `VerifiedBuild`=57689 WHERE (`ID`=130321 AND `EffectIndex`=0); -- Spell: 130321 (The Mission: Teleport Player) Efffect: 252 (SPELL_EFFECT_TELEPORT_UNITS)
+
+DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_teleport_prep', 'spell_teleport_timer', 'spell_teleport_prep_horde', 'spell_teleport_timer_horde', 'spell_admiral_rogers_script_effect', 'spell_teleport_prep_alliance', 'spell_teleport_timer_alliance', 'spell_the_mission_scene_jf', 'spell_the_mission_scene_end');
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(130810, 'spell_teleport_prep_horde'),
+(132034, 'spell_teleport_timer_horde'),
+(140885, 'spell_admiral_rogers_script_effect'),
+(130832, 'spell_teleport_prep_alliance'),
+(132032, 'spell_teleport_timer_alliance'),
+(131057, 'spell_the_mission_scene_jf'),
+(131059, 'spell_the_mission_scene_end');
+
+-- Smart scripts
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (165505, 170715);
+
+UPDATE `scene_template` SET `ScriptName`='SmartScene' WHERE `SceneId`=94;
+
+DELETE FROM `areatrigger_scripts` WHERE `entry`=8514;
+INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
+(8514, 'SmartTrigger');
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=66292 AND `source_type`=0 AND `id` IN (1, 2, 3);
+DELETE FROM `smart_scripts` WHERE `entryorguid`=8514 AND `source_type`=2;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=94 AND `source_type`=10;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `Difficulties`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param_string`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `action_param_string`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_param_string`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(66292,0,1,3,'',62,0,100,0,14971,0,0,0,0,'',134,140885,0x2,(0x20 | 0x40000),0,0,0,0,NULL,7,0,0,0,0,NULL,0,0,0,0,'Sky Admiral Rogers - On gossip option 0 selected - Invoker casts ''Admiral Rogers Script Effect'''),
+(66292,0,2,3,'',62,0,100,0,15111,0,0,0,0,'',134,140885,0x2,(0x20 | 0x40000),0,0,0,0,NULL,7,0,0,0,0,NULL,0,0,0,0,'Sky Admiral Rogers - On gossip option 0 selected - Invoker casts ''Admiral Rogers Script Effect'''),
+(66292,0,3,0,'',61,0,100,0,0,0,0,0,0,'',72,0,0,0,0,0,0,0,NULL,7,0,0,0,0,NULL,0,0,0,0,'Sky Admiral Rogers - Event linked - Close gossip'),
+
+(8514,2,0,0,'',46,0,100,0,0,0,0,0,0,'',134,131057,0x2,(0x20 | 0x40000),0,0,0,0,NULL,7,0,0,0,0,NULL,0,0,0,0,'Areatrigger 8514 - On trigger - Invoker casts ''The Mission Scene - JF'''),
+
+(94,10,0,0,'',81,0,100,0,0,0,0,0,0,'',134,131059,0x2,(0x20 | 0x40000),0,0,0,0,NULL,7,0,0,0,0,NULL,0,0,0,0,'Scene 94 - On scene complete - Invoker casts ''The Mission Scene End'''),
+(94,10,1,0,'',80,0,100,0,0,0,0,0,0,'',134,131059,0x2,(0x20 | 0x40000),0,0,0,0,NULL,7,0,0,0,0,NULL,0,0,0,0,'Scene 94 - On scene cancel - Invoker casts ''The Mission Scene End''');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=30 AND `SourceEntry`=8514;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(30,0,8514,0,0,47,0,29548,8,0,'',0,0,0,'','Areatrigger 8514 triggers if quest 29548 is taken');
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=165505 AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `Difficulties`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param_string`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `action_param_string`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_param_string`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(165505,0,0,1,'',62,0,100,0,25369,1,0,0,0,'',134,332912,0x2,(0x20 | 0x40000),0,0,0,0,NULL,7,0,0,0,0,NULL,0,0,0,0,'Loretta Banks - On gossip option 1 selected - Invoker casts ''Summon Gryphon'''),
+(165505,0,1,0,'',61,0,100,0,0,0,0,0,0,'',72,0,0,0,0,0,0,0,NULL,7,0,0,0,0,NULL,0,0,0,0,'Loretta Banks - Event linked - Close gossip');
+
+SET @ENTRY := 170715;
+SET @PATHOFFSET := 0;
+SET @PATH := @ENTRY * 100 + @PATHOFFSET;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=170715 AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `Difficulties`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param_string`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `action_param_string`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_param_string`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(170715,0,0,0,'',54,0,100,0x200,0,0,0,0,0,'',11,333201,0,0,0,0,0,0,NULL,1,0,0,0,0,NULL,0,0,0,0,'Stormwind Gryphon - On summon - Cast ''Dust Cloud'''),
+(170715,0,1,0,'',27,0,100,0x200,0,0,0,0,0,'',53,0,@PATH,0,0,0,0,0,NULL,1,0,0,0,0,NULL,0,0,0,0,'Stormwind Gryphon - On passenger boarded - Start scripted path'),
+(170715,0,2,3,'',58,0,100,0x200,0xFFFFFFFF,@PATH,0,0,0,'',28,46598,0,0,0,0,0,0,NULL,1,0,0,0,0,NULL,0,0,0,0,'Stormwind Gryphon - On scripted path ended - Remove aura ''Ride Vehicle Hardcoded'''),
+(170715,0,3,0,'',61,0,100,0x200,0,0,0,0,0,'',114,1,0,0,0,0,0,0,NULL,1,0,0,0,0,NULL,0,40,0,0,'Stormwind Gryphon - Event linked - Move forward 40 yards');
+
+DELETE FROM `waypoint_path` WHERE `PathId`=@PATH;
+INSERT INTO `waypoint_path` (`PathId`, `MoveType`, `Flags`, `Velocity`, `Comment`) VALUES
+(@PATH, 1, 0x2, 160, 'Stormwind Gryphon - Scripted Path');
+
+DELETE FROM `waypoint_path_node` WHERE `PathId`=@PATH;
+INSERT INTO `waypoint_path_node` (`PathId`, `NodeId`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `Delay`) VALUES
+(@PATH, 0, -8450.799, 373.03647, 140.616, NULL, 0),
+(@PATH, 1, -8487.316, 392.80728, 151.9025, NULL, 0),
+(@PATH, 2, -8524.299, 439.342, 145.4894, NULL, 0),
+(@PATH, 3, -8552.4375, 562.0816, 158.73732, NULL, 0),
+(@PATH, 4, -8479.377, 762.59894, 177.70232, NULL, 0),
+(@PATH, 5, -8344.817, 1010.0746, 224.7482, NULL, 0),
+(@PATH, 6, -8119.9775, 1255.1216, 276.97183, NULL, 0),
+(@PATH, 7, -7877.993, 1333.3298, 366.3707, NULL, 0),
+(@PATH, 8, -7806.0767, 1247.5729, 364, NULL, 0),
+(@PATH, 9, -7838.8506, 1210.7031, 364, NULL, 0),
+(@PATH, 10, -7885.481, 1218.2448, 364, NULL, 0),
+(@PATH, 11, -7883.363, 1261.1094, 364.3392, NULL, 0);
+
+DELETE FROM `vehicle_template` WHERE `creatureId`=170715;
+INSERT INTO `vehicle_template` (`creatureId`, `despawnDelayMs`) VALUES
+(170715, 800);
+
+-- Terrain swap
+DELETE FROM `terrain_swap_defaults` WHERE `MapId`=870 AND `TerrainSwapMap`=971;
+INSERT INTO `terrain_swap_defaults` (`MapId`, `TerrainSwapMap`, `Comment`) VALUES
+(870, 971, 'The Jade Forest - Jade Forest Alliance Hub Phase');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=25 AND `SourceEntry`=971;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(25,0,971,0,0,6,0,469,0,0,'',0,0,0,'','Apply terrain swap 971 if player is Alliance'),
+(25,0,971,0,0,47,0,31736,64,0,'',1,0,0,'','Apply terrain swap 971 if quest 31736 is not rewarded');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=25 AND `SourceEntry`=1074;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(25,0,1074,0,0,6,0,67,0,0,'',0,0,0,'','Apply terrain swap 1074 if player is Horde'),
+(25,0,1074,0,0,-40002,0,0,0,0,'',0,0,0,'','Apply terrain swap 1074 if condition reference 40002 is fulfilled');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=25 AND `SourceEntry`=1066;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(25,0,1066,0,0,6,0,469,0,0,'',0,0,0,'','Apply terrain swap 1066 if player is Alliance'),
+(25,0,1066,0,0,47,0,29548,8,0,'',0,0,0,'','Apply terrain swap 1066 if quest 29548 is taken');
diff --git a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
index 902fb016da4..bacfef7e2c5 100644
--- a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
@@ -32,13 +32,18 @@
#include "SpellScript.h"
#include "TemporarySummon.h"
-namespace StormwindCity
+namespace Scripts::EasternKingdoms::StormwindCity
{
- namespace Spells
- {
- static constexpr uint32 MOPAllianceIntroMoviePlay = 130805;
- static constexpr uint32 FadeToBlack = 130411;
- }
+namespace Spells
+{
+ // The King's Command
+ static constexpr uint32 MOPAllianceIntroMoviePlay = 130805;
+ static constexpr uint32 FadeToBlack = 130411;
+
+ // The Mission
+ static constexpr uint32 TeleportPrep = 130832;
+ static constexpr uint32 TeleportTimer = 132032;
+ static constexpr uint32 TheMissionTeleportPlayer = 130321;
}
enum TidesOfWarData
@@ -511,15 +516,13 @@ class spell_the_kings_command_movie_aura : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({
- StormwindCity::Spells::FadeToBlack
+ Spells::FadeToBlack
});
}
void HandleHitTarget(SpellEffIndex /*effIndex*/) const
{
- Unit* hitUnit = GetHitUnit();
-
- hitUnit->CastSpell(hitUnit, StormwindCity::Spells::FadeToBlack, CastSpellExtraArgsInit{
+ GetHitUnit()->CastSpell(nullptr, Spells::FadeToBlack, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
.OriginalCastId = GetSpell()->m_castId
});
@@ -531,12 +534,87 @@ class spell_the_kings_command_movie_aura : public SpellScript
}
};
+// 130804 - The King's Command Movie Aura
class spell_the_kings_command_movie_aura_aura : public AuraScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({
- StormwindCity::Spells::MOPAllianceIntroMoviePlay
+ Spells::MOPAllianceIntroMoviePlay
+ });
+ }
+
+ void HandleAfterEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
+ {
+ GetTarget()->CastSpell(nullptr, Spells::MOPAllianceIntroMoviePlay, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
+ });
+ }
+
+ void Register() override
+ {
+ AfterEffectRemove += AuraEffectRemoveFn(spell_the_kings_command_movie_aura_aura::HandleAfterEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+};
+
+// 140885 - Admiral Rogers Script Effect
+class spell_admiral_rogers_script_effect : public SpellScript
+{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({
+ Spells::TeleportPrep
+ });
+ }
+
+ void HandleHitTarget(SpellEffIndex /*effIndex*/) const
+ {
+ GetHitUnit()->CastSpell(nullptr, Spells::TeleportPrep, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
+ .OriginalCastId = GetSpell()->m_castId
+ });
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_admiral_rogers_script_effect::HandleHitTarget, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 130832 - Teleport Prep
+class spell_teleport_prep_alliance : public SpellScript
+{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({
+ Spells::TeleportTimer
+ });
+ }
+
+ void HandleHitTarget(SpellEffIndex /*effIndex*/) const
+ {
+ Unit* hitUnit = GetHitUnit();
+
+ hitUnit->CancelMountAura();
+ hitUnit->CastSpell(nullptr, Spells::TeleportTimer, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
+ .OriginalCastId = GetSpell()->m_castId
+ });
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_teleport_prep_alliance::HandleHitTarget, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
+ }
+};
+
+// 132032 - Teleport Timer
+class spell_teleport_timer_alliance : public AuraScript
+{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({
+ Spells::TheMissionTeleportPlayer
});
}
@@ -544,19 +622,23 @@ class spell_the_kings_command_movie_aura_aura : public AuraScript
{
Unit* target = GetTarget();
- target->CastSpell(target, StormwindCity::Spells::MOPAllianceIntroMoviePlay, CastSpellExtraArgsInit{
+ target->CancelTravelShapeshiftForm();
+ target->CastSpell(nullptr, Spells::TheMissionTeleportPlayer, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
});
}
void Register() override
{
- AfterEffectRemove += AuraEffectRemoveFn(spell_the_kings_command_movie_aura_aura::HandleAfterEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ AfterEffectRemove += AuraEffectRemoveFn(spell_teleport_timer_alliance::HandleAfterEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
+}
void AddSC_stormwind_city()
{
+ using namespace Scripts::EasternKingdoms::StormwindCity;
+
// Creature
RegisterCreatureAI(npc_jaina_proudmoore_tides_of_war);
RegisterCreatureAI(npc_anduin_wrynn_nation_of_kultiras);
@@ -577,4 +659,7 @@ void AddSC_stormwind_city()
RegisterSpellScript(spell_despawn_sailor_memory);
RegisterSpellScript(spell_kultiras_skip_intro);
RegisterSpellAndAuraScriptPair(spell_the_kings_command_movie_aura, spell_the_kings_command_movie_aura_aura);
+ RegisterSpellScript(spell_admiral_rogers_script_effect);
+ RegisterSpellScript(spell_teleport_prep_alliance);
+ RegisterSpellScript(spell_teleport_timer_alliance);
}
diff --git a/src/server/scripts/Kalimdor/zone_durotar.cpp b/src/server/scripts/Kalimdor/zone_durotar.cpp
index 9e69f784319..9e979057641 100644
--- a/src/server/scripts/Kalimdor/zone_durotar.cpp
+++ b/src/server/scripts/Kalimdor/zone_durotar.cpp
@@ -29,14 +29,16 @@
#include "PassiveAI.h"
#include "ObjectAccessor.h"
-namespace Durotar
+namespace Scripts::Kalimdor::Durotar
{
- namespace Spells
- {
- static constexpr uint32 PhasePlayer = 130750;
- static constexpr uint32 TeleportTimer = 132034;
- static constexpr uint32 TeleportPlayerToCrashSite = 102930;
- }
+namespace Spells
+{
+ // All Aboard!
+ static constexpr uint32 PhasePlayer = 130750;
+
+ // Into the Mists
+ static constexpr uint32 TeleportTimer = 132034;
+ static constexpr uint32 TeleportPlayerToCrashSite = 102930;
}
/*######
@@ -1231,7 +1233,7 @@ public:
bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
{
- player->CastSpell(player, Durotar::Spells::PhasePlayer, CastSpellExtraArgsInit{
+ player->CastSpell(nullptr, Spells::PhasePlayer, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
});
return true;
@@ -1239,18 +1241,18 @@ public:
bool OnExit(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
{
- player->RemoveAurasDueToSpell(Durotar::Spells::PhasePlayer);
+ player->RemoveAurasDueToSpell(Spells::PhasePlayer);
return true;
}
};
// 130810 - Teleport Prep
-class spell_teleport_prep : public SpellScript
+class spell_teleport_prep_horde : public SpellScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({
- Durotar::Spells::TeleportTimer
+ Spells::TeleportTimer
});
}
@@ -1258,7 +1260,8 @@ class spell_teleport_prep : public SpellScript
{
Unit* hitUnit = GetHitUnit();
- hitUnit->CastSpell(hitUnit, Durotar::Spells::TeleportTimer, CastSpellExtraArgsInit{
+ hitUnit->CancelMountAura();
+ hitUnit->CastSpell(nullptr, Spells::TeleportTimer, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
.OriginalCastId = GetSpell()->m_castId
});
@@ -1266,17 +1269,17 @@ class spell_teleport_prep : public SpellScript
void Register() override
{
- OnEffectHitTarget += SpellEffectFn(spell_teleport_prep::HandleHitTarget, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
+ OnEffectHitTarget += SpellEffectFn(spell_teleport_prep_horde::HandleHitTarget, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
}
};
// 132034 - Teleport Timer
-class spell_teleport_timer : public AuraScript
+class spell_teleport_timer_horde : public AuraScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({
- Durotar::Spells::TeleportPlayerToCrashSite
+ Spells::TeleportPlayerToCrashSite
});
}
@@ -1284,19 +1287,23 @@ class spell_teleport_timer : public AuraScript
{
Unit* target = GetTarget();
- target->CastSpell(target, Durotar::Spells::TeleportPlayerToCrashSite, CastSpellExtraArgsInit{
+ target->CancelTravelShapeshiftForm();
+ target->CastSpell(nullptr, Spells::TeleportPlayerToCrashSite, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
});
}
void Register() override
{
- AfterEffectRemove += AuraEffectRemoveFn(spell_teleport_timer::HandleAfterEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ AfterEffectRemove += AuraEffectRemoveFn(spell_teleport_timer_horde::HandleAfterEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
+}
void AddSC_durotar()
{
+ using namespace Scripts::Kalimdor::Durotar;
+
new npc_lazy_peon();
RegisterSpellScript(spell_voodoo);
RegisterCreatureAI(npc_mithaka);
@@ -1340,6 +1347,6 @@ void AddSC_durotar()
new at_hellscreams_fist_gunship();
// Spells
- RegisterSpellScript(spell_teleport_prep);
- RegisterSpellScript(spell_teleport_timer);
+ RegisterSpellScript(spell_teleport_prep_horde);
+ RegisterSpellScript(spell_teleport_timer_horde);
}
diff --git a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp
index 83c2e6711b6..34667e18522 100644
--- a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp
+++ b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp
@@ -22,13 +22,13 @@
#include "SpellScript.h"
#include "Unit.h"
-namespace Orgrimmar
+namespace Scripts::Kalimdor::Orgrimmar
{
- namespace Spells
- {
- static constexpr uint32 MOPHordeIntroMoviePlay = 130409;
- static constexpr uint32 FadeToBlack = 130411;
- }
+namespace Spells
+{
+ // The Art of War
+ static constexpr uint32 MOPHordeIntroMoviePlay = 130409;
+ static constexpr uint32 FadeToBlack = 130411;
}
// 130412 - Art of War Movie Aura
@@ -37,15 +37,13 @@ class spell_art_of_war_movie_aura : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({
- Orgrimmar::Spells::FadeToBlack
+ Spells::FadeToBlack
});
}
void HandleHitTarget(SpellEffIndex /*effIndex*/) const
{
- Unit* hitUnit = GetHitUnit();
-
- hitUnit->CastSpell(hitUnit, Orgrimmar::Spells::FadeToBlack, CastSpellExtraArgsInit{
+ GetHitUnit()->CastSpell(nullptr, Spells::FadeToBlack, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
.OriginalCastId = GetSpell()->m_castId
});
@@ -57,20 +55,19 @@ class spell_art_of_war_movie_aura : public SpellScript
}
};
+// 130412 - Art of War Movie Aura
class spell_art_of_war_movie_aura_aura : public AuraScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({
- Orgrimmar::Spells::MOPHordeIntroMoviePlay
+ Spells::MOPHordeIntroMoviePlay
});
}
void HandleAfterEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
{
- Unit* target = GetTarget();
-
- target->CastSpell(target, Orgrimmar::Spells::MOPHordeIntroMoviePlay, CastSpellExtraArgsInit{
+ GetTarget()->CastSpell(nullptr, Spells::MOPHordeIntroMoviePlay, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
});
}
@@ -80,9 +77,12 @@ class spell_art_of_war_movie_aura_aura : public AuraScript
AfterEffectRemove += AuraEffectRemoveFn(spell_art_of_war_movie_aura_aura::HandleAfterEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
+}
void AddSC_orgrimmar()
{
+ using namespace Scripts::Kalimdor::Orgrimmar;
+
// Spells
RegisterSpellAndAuraScriptPair(spell_art_of_war_movie_aura, spell_art_of_war_movie_aura_aura);
}
diff --git a/src/server/scripts/Pandaria/zone_the_jade_forest.cpp b/src/server/scripts/Pandaria/zone_the_jade_forest.cpp
index 834c27926ab..593933bac3b 100644
--- a/src/server/scripts/Pandaria/zone_the_jade_forest.cpp
+++ b/src/server/scripts/Pandaria/zone_the_jade_forest.cpp
@@ -21,16 +21,23 @@
#include "SpellScript.h"
#include "Unit.h"
-namespace TheJadeForest
+namespace Scripts::Pandaria::TheJadeForest
{
- namespace Spells
- {
- static constexpr uint32 CancelBlackout = 130812;
- static constexpr uint32 TeleportPrep = 130810;
- static constexpr uint32 TeleportPlayerToCrashSite = 102930;
- static constexpr uint32 CutToBlack = 122343;
- static constexpr uint32 WakeUpDead = 122344;
- }
+namespace Spells
+{
+ // Into the Mists & The Mission
+ static constexpr uint32 CancelBlackout = 130812;
+ static constexpr uint32 CutToBlack = 122343;
+
+ // Into the Mists
+ static constexpr uint32 TeleportPrepHorde = 130810;
+ static constexpr uint32 TeleportPlayerToCrashSite = 102930;
+ static constexpr uint32 WakeUpDead = 122344;
+
+ // The Mission
+ static constexpr uint32 TeleportPrepAlliance = 130832;
+ static constexpr uint32 TheMissionTeleportPlayer = 130321;
+ static constexpr uint32 TheMissionSceneJF = 131057;
}
// 121545 - Into the Mists Scene - JF
@@ -39,7 +46,7 @@ class spell_into_the_mists_scene_jf : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({
- TheJadeForest::Spells::CancelBlackout
+ Spells::CancelBlackout
});
}
@@ -47,7 +54,8 @@ class spell_into_the_mists_scene_jf : public SpellScript
{
Unit* hitUnit = GetHitUnit();
- hitUnit->CastSpell(hitUnit, TheJadeForest::Spells::CancelBlackout, CastSpellExtraArgsInit{
+ hitUnit->CancelMountAura();
+ hitUnit->CastSpell(nullptr, Spells::CancelBlackout, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
.OriginalCastId = GetSpell()->m_castId
});
@@ -59,36 +67,44 @@ class spell_into_the_mists_scene_jf : public SpellScript
}
};
-// 130812 - Cancel Blackout
-class spell_cancel_blackout : public AuraScript
+// 130723 - Into the Mists Scene End
+class spell_into_the_mists_scene_end : public SpellScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({
- TheJadeForest::Spells::TeleportPrep
+ Spells::TeleportPlayerToCrashSite,
+ Spells::CutToBlack,
+ Spells::WakeUpDead
});
}
- void HandleAfterEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
+ void HandleHitTarget(SpellEffIndex /*effIndex*/) const
{
- GetTarget()->RemoveAurasDueToSpell(TheJadeForest::Spells::TeleportPrep);
+ Unit* hitUnit = GetHitUnit();
+
+ CastSpellExtraArgs const& castSpellExtraArgs = CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
+ .OriginalCastId = GetSpell()->m_castId
+ };
+ hitUnit->CastSpell(nullptr, Spells::TeleportPlayerToCrashSite, castSpellExtraArgs);
+ hitUnit->CastSpell(nullptr, Spells::CutToBlack, castSpellExtraArgs);
+ hitUnit->CastSpell(nullptr, Spells::WakeUpDead, castSpellExtraArgs);
}
void Register() override
{
- AfterEffectRemove += AuraEffectRemoveFn(spell_cancel_blackout::HandleAfterEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ OnEffectHitTarget += SpellEffectFn(spell_into_the_mists_scene_end::HandleHitTarget, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
-// 130723 - Into the Mists Scene End
-class spell_into_the_mists_scene_end : public SpellScript
+// 131057 - The Mission Scene - JF
+class spell_the_mission_scene_jf : public SpellScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({
- TheJadeForest::Spells::TeleportPlayerToCrashSite,
- TheJadeForest::Spells::CutToBlack,
- TheJadeForest::Spells::WakeUpDead
+ Spells::CancelBlackout
});
}
@@ -96,25 +112,84 @@ class spell_into_the_mists_scene_end : public SpellScript
{
Unit* hitUnit = GetHitUnit();
+ hitUnit->CancelMountAura();
+ hitUnit->CastSpell(nullptr, Spells::CancelBlackout, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
+ .OriginalCastId = GetSpell()->m_castId
+ });
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_the_mission_scene_jf::HandleHitTarget, EFFECT_3, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 131059 - The Mission Scene End
+class spell_the_mission_scene_end : public SpellScript
+{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({
+ Spells::TheMissionSceneJF,
+ Spells::TheMissionTeleportPlayer,
+ Spells::CutToBlack
+ });
+ }
+
+ void HandleHitTarget(SpellEffIndex /*effIndex*/) const
+ {
+ Unit* hitUnit = GetHitUnit();
+
+ // EFFECT_0 is incorrectly removing Horde aura
+ hitUnit->RemoveAurasDueToSpell(Spells::TheMissionSceneJF);
+
CastSpellExtraArgs const& castSpellExtraArgs = CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
.OriginalCastId = GetSpell()->m_castId
};
- hitUnit->CastSpell(hitUnit, TheJadeForest::Spells::TeleportPlayerToCrashSite, castSpellExtraArgs);
- hitUnit->CastSpell(hitUnit, TheJadeForest::Spells::CutToBlack, castSpellExtraArgs);
- hitUnit->CastSpell(hitUnit, TheJadeForest::Spells::WakeUpDead, castSpellExtraArgs);
+ hitUnit->CastSpell(nullptr, Spells::TheMissionTeleportPlayer, castSpellExtraArgs);
+ hitUnit->CastSpell(nullptr, Spells::CutToBlack, castSpellExtraArgs);
}
void Register() override
{
- OnEffectHitTarget += SpellEffectFn(spell_into_the_mists_scene_end::HandleHitTarget, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
+ OnEffectHitTarget += SpellEffectFn(spell_the_mission_scene_end::HandleHitTarget, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
+// 130812 - Cancel Blackout
+class spell_cancel_blackout : public AuraScript
+{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({
+ Spells::TeleportPrepHorde,
+ Spells::TeleportPrepAlliance
+ });
+ }
+
+ void HandleAfterEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
+ {
+ GetTarget()->RemoveAurasDueToSpell(Spells::TeleportPrepHorde);
+ GetTarget()->RemoveAurasDueToSpell(Spells::TeleportPrepAlliance);
+ }
+
+ void Register() override
+ {
+ AfterEffectRemove += AuraEffectRemoveFn(spell_cancel_blackout::HandleAfterEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+};
+}
+
void AddSC_zone_the_jade_forest()
{
+ using namespace Scripts::Pandaria::TheJadeForest;
+
// Spells
RegisterSpellScript(spell_into_the_mists_scene_jf);
- RegisterSpellScript(spell_cancel_blackout);
RegisterSpellScript(spell_into_the_mists_scene_end);
+ RegisterSpellScript(spell_the_mission_scene_jf);
+ RegisterSpellScript(spell_the_mission_scene_end);
+ RegisterSpellScript(spell_cancel_blackout);
}