diff --git a/data/sql/updates/pending_db_world/rev_1697941424465768700.sql b/data/sql/updates/pending_db_world/rev_1697941424465768700.sql
new file mode 100644
index 00000000000000..433c12fcb96fee
--- /dev/null
+++ b/data/sql/updates/pending_db_world/rev_1697941424465768700.sql
@@ -0,0 +1,258 @@
+-- Ashbringer is buff
+DELETE
+FROM `spell_custom_attr`
+WHERE `spell_id` = 28282;
+INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (28282, 67108864);
+
+-- It takes time to open the door with a key in Blizzard servers
+UPDATE `gameobject_template_addon` SET `flags` = `flags`|2|32
+WHERE (`entry` = 104591);
+
+-- Clientside area trigger 4089 smart ai
+SET @ENTRY := 4089;
+DELETE FROM `areatrigger_scripts` WHERE `entry` = @ENTRY;
+INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES (@ENTRY, 'SmartTrigger');
+DELETE FROM `smart_scripts` WHERE `source_type` = 2 AND `entryOrGuid` = @ENTRY;
+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_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(@ENTRY, 2, 0, 1, 46, 0, 100, 1, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On trigger - Self: storedTarget[0] = Triggering player'),
+(@ENTRY, 2, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 34, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'On trigger - Set instance data #2 to 1'),
+(@ENTRY, 2, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 10, 40029, 3976, 0, 0, 0, 0, 0, 'On trigger - Send stored target storedTarget[0] to Creature Scarlet Commander Mograine (3976) with guid 40029 (fetching)'),
+(@ENTRY, 2, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 0, 1, 0, 0, 0, 0, 10, 40029, 3976, 0, 0, 0, 0, 0, 'On trigger - Creature Scarlet Commander Mograine (3976) with guid 40029 (fetching): Set creature data #0 to 1');
+-- smart conditions
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = @ENTRY AND `SourceId` = 2;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `Comment`) VALUES
+(22, 1, @ENTRY, 2, 0, 1, 0, 28282, 0, 0, 0, 'Action invoker has aura of spell Ashbringer (28282), effect EFFECT_0'),
+(22, 1, @ENTRY, 2, 0, 13, 0, 2, 0, 0, 0, 'instance data 2 equals 0');
+
+-- Scarlet Commander Mograine smart ai
+
+UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 3976;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 3976);
+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
+(3976, 0, 0, 0, 38, 0, 100, 0, 0, 1, 0, 0, 0, 0, 1, 6, 0, 1, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Data Set 0 1 - Say Line 6'),
+(3976, 0, 1, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 0, 11, 8990, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - In Combat - Cast \'Retribution Aura\' (No Repeat)'),
+(3976, 0, 2, 0, 0, 0, 100, 1, 1000, 1000, 0, 0, 0, 0, 34, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - In Combat - Set Instance Data 1 to 1 (No Repeat)'),
+(3976, 0, 3, 0, 0, 0, 100, 0, 1000, 5000, 10000, 10000, 0, 0, 11, 14518, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - In Combat - Cast \'Crusader Strike\''),
+(3976, 0, 4, 0, 0, 0, 100, 0, 6000, 11000, 60000, 60000, 0, 0, 11, 5589, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - In Combat - Cast \'Hammer of Justice\''),
+(3976, 0, 5, 6, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Respawn - Set Active Off'),
+(3976, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 19, 33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Respawn - Remove Flags Not Selectable'),
+(3976, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Respawn - Set Reactstate Aggressive'),
+(3976, 0, 8, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 91, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Respawn - Remove FlagStandstate Dead'),
+(3976, 0, 9, 10, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 42, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Aggro - Set Invincibility Hp 1'),
+(3976, 0, 10, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Aggro - Say Line 0'),
+(3976, 0, 11, 12, 7, 0, 100, 0, 0, 0, 0, 0, 0, 0, 212, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Evade - Stop motion (StopMoving: 0, MovementExpired: 0)'),
+(3976, 0, 12, 13, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 96, 32, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Evade - Remove Dynamic Flags Dead'),
+(3976, 0, 13, 14, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 34, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Evade - Set Instance Data 1 to 2'),
+(3976, 0, 14, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 19, 33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Evade - Remove Flags Not Selectable'),
+(3976, 0, 15, 0, 5, 0, 100, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Killed Unit - Say Line 1'),
+(3976, 0, 16, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 34, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Just Died - Set Instance Data 1 to 3'),
+(3976, 0, 17, 0, 2, 0, 100, 1, 0, 1, 0, 0, 0, 0, 80, 397600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - Between 0-1% Health - Run Script (No Repeat)'),
+(3976, 0, 18, 0, 8, 1, 100, 512, 9232, 0, 0, 0, 0, 0, 80, 397601, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Spellhit \'Scarlet Resurrection\' - Run Script (Phase 1)'),
+(3976, 0, 19, 20, 34, 0, 100, 0, 8, 1, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Reached Point 1 - Reset Invincibility Hp'),
+(3976, 0, 20, 21, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 19, 33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Reached Point 1 - Remove Flags Not Selectable'),
+(3976, 0, 21, 22, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Reached Point 1 - Set Reactstate Aggressive'),
+(3976, 0, 22, 23, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 8990, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Reached Point 1 - Cast \'Retribution Aura\''),
+(3976, 0, 23, 24, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 20, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Reached Point 1 - Start Attacking'),
+(3976, 0, 24, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Reached Point 1 - Start Attacking'),
+(3976, 0, 25, 0, 8, 0, 100, 1, 28441, 0, 0, 0, 0, 0, 80, 397602, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Spellhit \'AB Effect 000\' - Run Script (No Repeat)'),
+(3976, 0, 26, 0, 8, 0, 100, 1, 28441, 0, 0, 0, 0, 0, 67, 1, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Spellhit \'AB Effect 000\' - Create Timed Event (No Repeat)'),
+(3976, 0, 27, 0, 59, 0, 100, 0, 1, 0, 0, 0, 0, 0, 12, 16062, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 1033.46, 1399.1, 27.3374, 6.25796, 'Scarlet Commander Mograine - On Timed Event 1 Triggered - Summon Creature \'Highlord Mograine\''),
+(3976, 0, 28, 0, 8, 0, 100, 0, 28697, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - On Spellhit \'Forgiveness\' - Kill Self');
+
+-- Scarlet Commander Mograine suspended animation
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 397600);
+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
+(397600, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - Actionlist - Stop Attack'),
+(397600, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 0, 1, 0, 0, 0, 0, 10, 39946, 3977, 0, 0, 0, 0, 0, 0, 'Creature High Inquisitor Whitemane (3977) with guid 39946 (fetching): Set creature data #0 to 1'),
+(397600, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 212, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - Actionlist - Stop motion (StopMoving: 0, MovementExpired: 1)'),
+(397600, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - Actionlist - Start Random Movement'),
+(397600, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 4, 1326, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - Actionlist - Play Sound 1326'),
+(397600, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 28, 8990, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - Actionlist - Remove Aura \'Retribution Aura\''),
+(397600, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 90, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - Actionlist - Set Flag Standstate Dead'),
+(397600, 9, 7, 0, 0, 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, 'Scarlet Commander Mograine - Actionlist - Set Flags Not Selectable'),
+(397600, 9, 8, 0, 0, 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, 'Scarlet Commander Mograine - Actionlist - Set Reactstate Passive'),
+(397600, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - Actionlist - Set Event Phase 1');
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 397601);
+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
+(397601, 9, 0, 0, 0, 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, 'Scarlet Commander Mograine - Actionlist - Set Reactstate Passive'),
+(397601, 9, 1, 0, 0, 0, 100, 0, 1500, 1500, 0, 0, 0, 0, 91, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - Actionlist - Remove FlagStandstate Dead'),
+(397601, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 9257, 0, 0, 0, 0, 0, 10, 39946, 3977, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - Actionlist - Cast \'Lay on Hands\''),
+(397601, 9, 3, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 2, 0, 1, 0, 0, 0, 10, 39946, 3977, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - Actionlist - Say Line 2'),
+(397601, 9, 4, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 0, 10, 39946, 3977, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - Actionlist - Move To Closest Creature \'High Inquisitor Whitemane\'');
+
+-- Scarlet Commander Mograine Ashbringer Event
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 397602);
+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
+(397602, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - Actionlist - Set Active On'),
+(397602, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 2, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - Actionlist - Set Faction 35'),
+(397602, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - Actionlist - Start Random Movement'),
+(397602, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - Actionlist - Set Orientation Invoker'),
+(397602, 9, 4, 0, 0, 0, 100, 0, 1000, 3000, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - Actionlist - Set Flag Standstate Kneel'),
+(397602, 9, 5, 0, 0, 0, 100, 0, 1000, 2000, 0, 0, 0, 0, 1, 3, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Commander Mograine - Actionlist - Say Line 3');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 3976 AND `SourceId` = 0;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `Comment`) VALUES
+(22, 1, 3976, 0, 0, 21, 1, 16384, 0, 0, 1, 'Object doesn\'t have unit state UNIT_STATE_ATTACK_PLAYER'),
+(22, 1, 3976, 0, 0, 36, 1, 0, 0, 0, 0, 'Object is alive'),
+(22, 3, 3976, 0, 0, 4, 1, 796, 0, 0, 0, 'Object in zone (796)'),
+(22, 18, 3976, 0, 0, 4, 1, 796, 0, 0, 0, 'Object in zone (796)'),
+(22, 19, 3976, 0, 0, 4, 1, 796, 0, 0, 0, 'Object in zone (796)'),
+(22, 26, 3976, 0, 0, 4, 1, 796, 0, 0, 0, 'Object in zone (796)'),
+(22, 26, 3976, 0, 0, 36, 1, 0, 0, 0, 0, 'Object is alive'),
+(22, 27, 3976, 0, 0, 4, 1, 796, 0, 0, 0, 'Object in zone (796)'),
+(22, 27, 3976, 0, 0, 36, 1, 0, 0, 0, 0, 'Object is alive');
+
+-- Scarlet Commander Mograine say
+DELETE FROM `creature_text` WHERE `CreatureID` = 3976;
+INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
+(3976, 0, 0, 'Infidels! They must be purified!', 14, 0, 100, 0, 0, 5835, 2847, 0, 'Scarlet Commander Mograine // mograine SAY_MO_AGGRO'),
+(3976, 1, 0, 'Unworthy.', 14, 0, 100, 0, 0, 5836, 6197, 0, 'Scarlet Commander Mograine // mograine SAY_MO_KILL'),
+(3976, 2, 0, 'At your side, milady!', 14, 0, 100, 15, 0, 5837, 18026, 0, 'Scarlet Commander Mograine // mograine SAY_MO_RESSURECTED'),
+(3976, 3, 0, 'You hold my father\'s blade, $n. My soldiers are yours TO control, my $g Lord:Lady;. Take them... LEAD them... The impure must be purged. They must be cleansed of their taint.', 12, 0, 100, 1, 0, 0, 12390, 0, 'Scarlet Commander Mograine // mograine SAY_ASHBRINGER_ONE'),
+(3976, 4, 0, 'Father... But... How?', 12, 0, 100, 6, 0, 0, 12470, 0, 'Scarlet Commander Mograine // mograine SAY_ASHBRINGER_TWO'),
+(3976, 5, 0, 'Forgive me, father! Please...', 12, 0, 100, 20, 0, 0, 12472, 0, 'Scarlet Commander Mograine // mograine SAY_ASHBRINGER_THREE'),
+(3976, 6, 0, 'Bow down! Kneel BEFORE the Ashbringer! A NEW dawn approaches, brothers AND sisters! Our message will be delivered TO the filth of this world through the chosen one!', 14, 0, 100, 0, 0, 0, 12389, 3, 'Scarlet Commander Mograine // Ashbringer EVENT intro yell');
+
+-- Highlord Mograine smart_scripts
+
+UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 16062;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 16062);
+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
+(16062, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Highlord Mograine - On Just Summoned - Set Active On'),
+(16062, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 2, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Highlord Mograine - On Just Summoned - Set Faction 35'),
+(16062, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Highlord Mograine - On Just Summoned - Change Equipment'),
+(16062, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 3, 0, 16180, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Highlord Mograine - On Just Summoned - Morph To Model 16180'),
+(16062, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 28688, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Highlord Mograine - On Just Summoned - Cast \'Mograine Cometh DND\''),
+(16062, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 53, 0, 16062, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Highlord Mograine - On Just Summoned - Start Waypoint Path 16062'),
+(16062, 0, 6, 7, 40, 0, 100, 0, 12, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 3976, 0, 0, 0, 0, 0, 0, 0, 'Highlord Mograine - On Point 12 of Path Any Reached - Set Orientation Closest Creature \'Scarlet Commander Mograine\''),
+(16062, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 1606200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Highlord Mograine - On Point 12 of Path Any Reached - Run Script');
+
+-- Highlord Mograine Ashbringer Event
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 1606200);
+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
+(1606200, 9, 0, 0, 0, 0, 100, 0, 200, 200, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Highlord Mograine - Actionlist - Say Line 0'),
+(1606200, 9, 1, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 231, 2, 0, 0, 0, 0, 0, 19, 3976, 5, 0, 0, 0, 0, 0, 0, 'Closest alive creature Scarlet Commander Mograine (3976) in 5 yards: - Actionlist - Set Target Orientation'),
+(1606200, 9, 2, 0, 0, 0, 100, 0, 400, 400, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 19, 3976, 5, 0, 0, 0, 0, 0, 0, 'Closest alive creature Scarlet Commander Mograine (3976) in 5 yards: - Actionlist - Remove FlagStandstate Kneel'),
+(1606200, 9, 3, 0, 0, 0, 100, 0, 1200, 1200, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 19, 3976, 5, 0, 0, 0, 0, 0, 0, 'Highlord Mograine - Actionlist - Say Line 4'),
+(1606200, 9, 4, 0, 0, 0, 100, 0, 4600, 4600, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Highlord Mograine - Actionlist - Say Line 1'),
+(1606200, 9, 5, 0, 0, 0, 100, 0, 3400, 3400, 0, 0, 0, 0, 5, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Highlord Mograine - Actionlist - Play Emote 6'),
+(1606200, 9, 6, 0, 0, 0, 100, 0, 3200, 3200, 0, 0, 0, 0, 5, 25, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Highlord Mograine - Actionlist - Play Emote 25'),
+(1606200, 9, 7, 0, 0, 0, 100, 0, 3200, 3200, 0, 0, 0, 0, 5, 15, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Highlord Mograine - Actionlist - Play Emote 15'),
+(1606200, 9, 8, 0, 0, 0, 100, 0, 3200, 3200, 0, 0, 0, 0, 231, 2, 0, 0, 0, 0, 0, 19, 3976, 5, 0, 0, 0, 0, 0, 0, 'Closest alive creature Scarlet Commander Mograine (3976) in 5 yards: - Actionlist - Set Target Orientation'),
+(1606200, 9, 9, 0, 0, 0, 100, 0, 1200, 1200, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 19, 3976, 5, 0, 0, 0, 0, 0, 0, 'Closest alive creature Scarlet Commander Mograine (3976) in 5 yards: - Actionlist - Say Line 5'),
+(1606200, 9, 10, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 11, 28697, 0, 0, 0, 0, 0, 19, 3976, 10, 0, 0, 0, 0, 0, 0, 'Highlord Mograine - Actionlist - Cast \'Forgiveness\''),
+(1606200, 9, 11, 0, 0, 0, 100, 0, 3700, 3700, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Highlord Mograine - Actionlist - Say Line 2'),
+(1606200, 9, 12, 0, 0, 0, 100, 0, 3400, 3400, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Highlord Mograine - Actionlist - Despawn Instant');
+
+-- Highlord Mograine Say
+DELETE FROM `creature_text` WHERE `CreatureID`=16062;
+INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `Type`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
+(16062, 0, 0, 'Renault...', 0, 100, 25, 0, 0, 12, 12469, 0, 'mograine MOGRAINE_ONE'),
+(16062, 1, 0, 'Did you think that your betrayal would be forgotten? Lost in the carefully planned cover up of my death? Blood of my blood, the blade felt your cruelty long after my heart had stopped beating. And in death, I knew what you had done. But now, the chains of Kel\'thuzad hold me NO more. I come TO serve justice. I AM ASHBRINGER.', 0, 100, 6, 0, 0, 12, 12471, 0, 'mograine MOGRAINE_TWO'),
+(16062, 2, 0, 'You are forgiven...', 0, 100, 0, 0, 0, 12, 12473, 0, 'mograine MOGRAINE_THREE');
+
+DELETE
+FROM `waypoints`
+WHERE `entry`=16062;
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `point_comment`) VALUES
+(16062, 1, 1033.4642, 1399.1022, 27.337427, NULL, 0, 'Ashbringer Event Move Points'),
+(16062, 2, 1034.9252, 1399.0653, 27.393204, NULL, 0, 'Ashbringer Event Move Points'),
+(16062, 3, 1036.3861, 1399.0284, 27.44898, NULL, 0, 'Ashbringer Event Move Points'),
+(16062, 4, 1045.484, 1398.7991, 27.448977, NULL, 0, 'Ashbringer Event Move Points'),
+(16062, 5, 1059.524, 1399.0273, 28.271557, NULL, 0, 'Ashbringer Event Move Points'),
+(16062, 6, 1068.8096, 1399.2064, 30.7867, NULL, 0, 'Ashbringer Event Move Points'),
+(16062, 7, 1086.6564, 1399.2048, 30.44898, NULL, 0, 'Ashbringer Event Move Points'),
+(16062, 8, 1101.5681, 1399.3694, 30.485447, NULL, 0, 'Ashbringer Event Move Points'),
+(16062, 9, 1116.6019, 1399.4752, 30.485447, NULL, 0, 'Ashbringer Event Move Points'),
+(16062, 10, 1129.5881, 1399.2926, 30.524086, NULL, 0, 'Ashbringer Event Move Points'),
+(16062, 11, 1149.4045, 1399.0231, 32.528877, NULL, 0, 'Ashbringer Event Move Points'),
+(16062, 12, 1150.3911, 1398.723, 32.54613, NULL, 0, 'Ashbringer Event Move Points');
+
+-- Highlord Mograine Condition
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 8990) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 16062) AND (`ConditionValue3` = 0);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 8990, 0, 0, 31, 0, 3, 16062, 0, 1, 0, 0, '', 'Potential target of the spell is not creature, entry is 16062');
+
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 22) AND (`SourceGroup` = 1) AND (`SourceEntry` = 16062) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 4) AND (`ConditionTarget` = 1) AND (`ConditionValue1` = 796) AND (`ConditionValue2` = 0) AND (`ConditionValue3` = 0);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(22, 1, 16062, 0, 0, 4, 1, 796, 0, 0, 0, 0, 0, '', 'Object in zone (796)');
+
+-- High Inquisitor Whitemane Smart ai
+UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 3977;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 3977);
+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
+(3977, 0, 0, 1, 38, 0, 100, 0, 0, 1, 0, 0, 0, 0, 118, 2, 0, 0, 0, 0, 0, 14, 11877, 104600, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - On Data Set 0 1 - Set GO State To 2'),
+(3977, 0, 1, 2, 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, 'High Inquisitor Whitemane - On Data Set 0 1 - Say Line 0'),
+(3977, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 0, 10, 40029, 3976, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - On Data Set 0 1 - Move To Closest Creature \'Scarlet Commander Mograine\''),
+(3977, 0, 3, 4, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 42, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - On Aggro - Set Invincibility Hp 1'),
+(3977, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - On Aggro - Set Event Phase 1'),
+(3977, 0, 5, 0, 0, 3, 100, 0, 1000, 1000, 2600, 4000, 0, 0, 11, 9481, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - In Combat - Cast \'Holy Smite\' (Phases 1 & 2)'),
+(3977, 0, 6, 0, 16, 3, 100, 0, 22187, 40, 5000, 10000, 1, 0, 11, 22187, 32, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - On Friendly Unit Missing Buff \'Power Word: Shield\' - Cast \'Power Word: Shield\' (Phases 1 & 2)'),
+(3977, 0, 7, 0, 0, 2, 100, 0, 45000, 45000, 20000, 30000, 0, 0, 11, 14515, 64, 0, 0, 0, 0, 6, 20, 1, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - In Combat - Cast \'Dominate Mind\' (Phase 2)'),
+(3977, 0, 8, 0, 74, 2, 100, 0, 5000, 15000, 5000, 15000, 75, 40, 11, 12039, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - On Friendly Below 75% Health - Cast \'Heal\' (Phase 2)'),
+(3977, 0, 9, 0, 5, 0, 100, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - On Killed Unit - Say Line 1'),
+(3977, 0, 10, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 11877, 104600, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - On Respawn - Set GO State To 1'),
+(3977, 0, 11, 12, 7, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - On Evade - Set Reactstate Aggressive'),
+(3977, 0, 12, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 34, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - On Evade - Set Instance Data 1 to 2'),
+(3977, 0, 13, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 34, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - On Just Died - Set Instance Data 1 to 3'),
+(3977, 0, 14, 15, 2, 0, 100, 513, 0, 50, 0, 0, 0, 0, 80, 397700, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - Between 0-50% Health - Run Script (No Repeat)'),
+(3977, 0, 15, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - Between 0-50% Health - Set Event Phase 1 (No Repeat)'),
+(3977, 0, 16, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 0, 67, 1, 200, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - On Data Set 1 1 - Create Timed Event'),
+(3977, 0, 17, 0, 59, 0, 100, 0, 1, 0, 0, 0, 0, 0, 80, 397701, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - On Timed Event 1 Triggered - Run Script'),
+(3977, 0, 18, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 0, 69, 2, 0, 0, 2, 0, 0, 10, 40029, 3976, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - On Data Set 1 1 - Move To Closest Creature \'Scarlet Commander Mograine\''),
+(3977, 0, 19, 0, 34, 0, 100, 512, 8, 2, 0, 0, 0, 0, 80, 397701, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - On Reached Point 2 - Run Script');
+
+-- Health less than 50% Hypnotize the player
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 397700);
+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
+(397700, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - Actionlist - Stop Attack'),
+(397700, 9, 1, 0, 0, 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, 'High Inquisitor Whitemane - Actionlist - Set Event Phase 0'),
+(397700, 9, 2, 0, 0, 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, 'High Inquisitor Whitemane - Actionlist - Set Reactstate Passive'),
+(397700, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 9256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - Actionlist - Cast \'Deep Sleep\''),
+(397700, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'After 0 seconds - Self: Set data[1] to 1');
+
+-- Resurrect Mograini
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 397701);
+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
+(397701, 9, 0, 0, 0, 0, 100, 0, 4500, 4500, 0, 0, 0, 0, 11, 9232, 0, 0, 0, 0, 0, 19, 3976, 50, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - Actionlist - Cast \'Scarlet Resurrection\''),
+(397701, 9, 1, 0, 0, 0, 100, 0, 1900, 1900, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - Actionlist - Say Line 2'),
+(397701, 9, 2, 0, 0, 0, 100, 0, 1400, 1400, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - Actionlist - Set Sheath Unarmed'),
+(397701, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 5, 66, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - Actionlist - Play Emote 66'),
+(397701, 9, 4, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - Actionlist - Reset Invincibility Hp'),
+(397701, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - Actionlist - Set Reactstate Aggressive'),
+(397701, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - Actionlist - Set Event Phase 2'),
+(397701, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Whitemane - Actionlist - Start Attacking');
+
+-- High Inquisitor Whitemane say
+
+DELETE FROM `creature_text` WHERE `CreatureID` = 3977;
+INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
+(3977, 0, 0, 'Mograine has fallen! You shall pay for this treachery! Arise, my champion! Arise!', 14, 0, 100, 0, 0, 5838, 18023, 0, 'High Inquisitor Whitemane // whitemane SAY_WH_INTRO'),
+(3977, 1, 0, 'The Light has spoken!', 14, 0, 100, 0, 0, 5839, 6198, 0, 'High Inquisitor Whitemane // whitemane SAY_WH_KILL'),
+(3977, 2, 0, 'Arise, my champion!', 14, 0, 100, 0, 0, 5840, 6532, 0, 'High Inquisitor Whitemane // whitemane SAY_WH_RESSURECT');
+
+-- High Inquisitor Whitemane Conditions
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 3977 AND `SourceId` = 0;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `Comment`) VALUES
+(22, 17, 3977, 0, 0, 29, 1, 3976, 5, 0, 0, 'There is creature Scarlet Commander Mograine (3976) within range 5 yards to Object'),
+(22, 19, 3977, 0, 0, 29, 1, 3976, 5, 0, 1, 'There is no creature Scarlet Commander Mograine (3976) within range 5 yards to Object');
+
+-- High Inquisitor Fairbanks smart ai
+
+UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 4542;
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 4542) AND (`source_type` = 0) AND (`id` IN (11));
+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
+(4542, 0, 11, 0, 8, 0, 100, 1, 28441, 0, 0, 0, 0, 0, 80, 454205, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Fairbanks - On Spellhit \'AB Effect 000\' - Run Script (No Repeat)');
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 454205);
+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
+(454205, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 2, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Fairbanks - Actionlist - Set Faction 35'),
+(454205, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Fairbanks - Actionlist - Set Orientation Invoker'),
+(454205, 9, 2, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 11, 28443, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Fairbanks - Actionlist - Cast \'Transform Ghost\''),
+(454205, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 3, 0, 16179, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Fairbanks - Actionlist - Morph To Model 16179'),
+(454205, 9, 4, 0, 0, 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, 'High Inquisitor Fairbanks - Actionlist - Add Npc Flags Gossip');
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 421f96a5d0dc5e..1126614ca91999 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -2644,8 +2644,6 @@ bool SpellInfo::_IsPositiveEffect(uint8 effIndex, bool deep) const
// some explicitly required dummy effect sets
switch (Id)
{
- case 28441:
- return false; // AB Effect 000
default:
break;
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
index 6ccc8b13a3c480..69e4a94accd123 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
@@ -15,50 +15,63 @@
* with this program. If not, see .
*/
-#include "CreatureScript.h"
#include "InstanceMapScript.h"
-#include "ScriptedCreature.h"
-#include "ScriptedGossip.h"
-#include "SmartAI.h"
#include "scarletmonastery.h"
+#include "ScriptedCreature.h"
enum AshbringerEventMisc
{
- AURA_OF_ASHBRINGER = 28282,
- NPC_SCARLET_MYRIDON = 4295,
- NPC_SCARLET_DEFENDER = 4298,
- NPC_SCARLET_CENTURION = 4301,
- NPC_SCARLET_SORCERER = 4294,
- NPC_SCARLET_WIZARD = 4300,
- NPC_SCARLET_ABBOT = 4303,
- NPC_SCARLET_MONK = 4540,
- NPC_SCARLET_CHAMPION = 4302,
- NPC_SCARLET_CHAPLAIN = 4299,
- NPC_FAIRBANKS = 4542,
- NPC_COMMANDER_MOGRAINE = 3976,
- NPC_INQUISITOR_WHITEMANE = 3977,
- DOOR_HIGH_INQUISITOR_ID = 104600,
+ NPC_COMMANDER_MOGRAINE = 3976,
+ NPC_INQUISITOR_WHITEMANE = 3977,
+ NPC_SCARLET_SORCERER = 4294,
+ NPC_SCARLET_MYRIDON = 4295,
+ NPC_SCARLET_DEFENDER = 4298,
+ NPC_SCARLET_CHAPLAIN = 4299,
+ NPC_SCARLET_WIZARD = 4300,
+ NPC_SCARLET_CENTURION = 4301,
+ NPC_SCARLET_CHAMPION = 4302,
+ NPC_SCARLET_ABBOT = 4303,
+ NPC_SCARLET_MONK = 4540,
+ NPC_FAIRBANKS = 4542,
+ NPC_HIGHLORD_MOGRAINE = 16062,
+
+ GO_CHAPEL_DOOR = 104591,
+ GO_HIGH_INQUISITOR_DOOR = 104600
};
-enum DataTypes
+enum AshbringerSpell
{
- TYPE_MOGRAINE_AND_WHITE_EVENT = 1,
-
- DATA_MOGRAINE = 2,
- DATA_WHITEMANE = 3,
- DATA_DOOR_WHITEMANE = 4,
+ //Highlord Mograine Spells
+ //Needs Fix: Increased the visual effect of spells on hit
+ SPELL_FORGIVENESS = 28697,
- DATA_HORSEMAN_EVENT = 5,
- GAMEOBJECT_PUMPKIN_SHRINE = 6,
+ //High Inquisitor Fairbanks
+ //Needs Fix: Increased the visual effect of spells on hit
+ SPELL_TRANSFORM_GHOST = 28443
+};
- DATA_VORREL = 7,
- DATA_ARCANIST_DOAN = 8
+enum DataTypes
+{
+ TYPE_MOGRAINE_AND_WHITE_EVENT = 1,
+ TYPE_ASHBRINGER_EVENT = 2,
+
+ DATA_MOGRAINE = 3,
+ DATA_WHITEMANE = 4,
+ DATA_DOOR_WHITEMANE = 5,
+ DATA_HORSEMAN_EVENT = 6,
+ DATA_VORREL = 7,
+ DATA_ARCANIST_DOAN = 8,
+ DATA_DOOR_CHAPEL = 9,
+
+ GAMEOBJECT_PUMPKIN_SHRINE = 10
};
+float const CATHEDRAL_PULL_RANGE = 80.0f; // Distance from the Cathedral doors to where Mograine is standing
+
class instance_scarlet_monastery : public InstanceMapScript
{
public:
- instance_scarlet_monastery() : InstanceMapScript("instance_scarlet_monastery", 189) { }
+ instance_scarlet_monastery() : InstanceMapScript("instance_scarlet_monastery", 189) {}
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
@@ -72,55 +85,18 @@ class instance_scarlet_monastery : public InstanceMapScript
SetHeaders(DataHeader);
}
- void OnPlayerEnter(Player* player) override
- {
- if (player->HasAura(AURA_OF_ASHBRINGER))
- {
- std::list ScarletList;
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_MYRIDON, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_DEFENDER, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_CENTURION, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_SORCERER, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_WIZARD, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_ABBOT, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_MONK, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_CHAMPION, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_CHAPLAIN, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_COMMANDER_MOGRAINE, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_FAIRBANKS, 4000.0f);
- if (!ScarletList.empty())
- for (std::list::iterator itr = ScarletList.begin(); itr != ScarletList.end(); itr++) (*itr)->SetFaction(FACTION_FRIENDLY);
- }
- }
-
- void OnPlayerAreaUpdate(Player* player, uint32 /*oldArea*/, uint32 /*newArea*/) override
- {
- if (player->HasAura(AURA_OF_ASHBRINGER))
- {
- std::list ScarletList;
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_MYRIDON, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_DEFENDER, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_CENTURION, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_SORCERER, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_WIZARD, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_ABBOT, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_MONK, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_CHAMPION, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_CHAPLAIN, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_COMMANDER_MOGRAINE, 4000.0f);
- player->GetCreatureListWithEntryInGrid(ScarletList, NPC_FAIRBANKS, 4000.0f);
- if (!ScarletList.empty())
- for (std::list::iterator itr = ScarletList.begin(); itr != ScarletList.end(); itr++) (*itr)->SetFaction(FACTION_FRIENDLY);
- }
- }
-
void OnGameObjectCreate(GameObject* go) override
{
switch (go->GetEntry())
{
- //case ENTRY_PUMPKIN_SHRINE: PumpkinShrineGUID = go->GetGUID(); break;
- case DOOR_HIGH_INQUISITOR_ID:
- DoorHighInquisitorGUID = go->GetGUID();
+ // case ENTRY_PUMPKIN_SHRINE: PumpkinShrineGUID = go->GetGUID(); break;
+ case GO_HIGH_INQUISITOR_DOOR:
+ _doorHighInquisitorGUID = go->GetGUID();
+ break;
+ case GO_CHAPEL_DOOR:
+ _doorChapelGUID = go->GetGUID();
+ break;
+ default:
break;
}
}
@@ -129,11 +105,26 @@ class instance_scarlet_monastery : public InstanceMapScript
{
switch (creature->GetEntry())
{
+ case NPC_SCARLET_MYRIDON:
+ case NPC_SCARLET_DEFENDER:
+ case NPC_SCARLET_CENTURION:
+ case NPC_SCARLET_SORCERER:
+ case NPC_SCARLET_WIZARD:
+ case NPC_SCARLET_ABBOT:
+ case NPC_SCARLET_MONK:
+ case NPC_SCARLET_CHAMPION:
+ case NPC_SCARLET_CHAPLAIN:
+ case NPC_FAIRBANKS:
+ _ashbringerNpcGUID.emplace(creature->GetGUID());
+ break;
case NPC_COMMANDER_MOGRAINE:
- MograineGUID = creature->GetGUID();
+ _mograineGUID = creature->GetGUID();
+ _ashbringerNpcGUID.emplace(creature->GetGUID());
break;
case NPC_INQUISITOR_WHITEMANE:
- WhitemaneGUID = creature->GetGUID();
+ _whitemaneGUID = creature->GetGUID();
+ break;
+ default:
break;
}
}
@@ -145,19 +136,90 @@ class instance_scarlet_monastery : public InstanceMapScript
case TYPE_MOGRAINE_AND_WHITE_EVENT:
if (data == IN_PROGRESS)
{
- DoUseDoorOrButton(DoorHighInquisitorGUID);
- encounter = IN_PROGRESS;
+ if (Creature* mograine = instance->GetCreature(_mograineGUID))
+ {
+ std::list creatureList;
+ GetCreatureListWithEntryInGrid(creatureList, mograine, NPC_SCARLET_MONK, CATHEDRAL_PULL_RANGE);
+ GetCreatureListWithEntryInGrid(creatureList, mograine, NPC_SCARLET_ABBOT, CATHEDRAL_PULL_RANGE);
+ GetCreatureListWithEntryInGrid(creatureList, mograine, NPC_SCARLET_CHAMPION, CATHEDRAL_PULL_RANGE);
+ GetCreatureListWithEntryInGrid(creatureList, mograine, NPC_SCARLET_CENTURION, CATHEDRAL_PULL_RANGE);
+ GetCreatureListWithEntryInGrid(creatureList, mograine, NPC_SCARLET_WIZARD, CATHEDRAL_PULL_RANGE);
+ GetCreatureListWithEntryInGrid(creatureList, mograine, NPC_SCARLET_CHAPLAIN, CATHEDRAL_PULL_RANGE);
+ for (std::list::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr)
+ {
+ if (Creature* creature = *itr)
+ creature->AI()->AttackStart(mograine->GetVictim());
+ }
+ }
+ _encounter = IN_PROGRESS;
}
if (data == FAIL)
{
- DoUseDoorOrButton(DoorHighInquisitorGUID);
- encounter = FAIL;
+ Creature* whitemane = instance->GetCreature(_whitemaneGUID);
+ if (!whitemane)
+ return;
+
+ Creature* mograine = instance->GetCreature(_mograineGUID);
+ if (!mograine)
+ return;
+
+ if (whitemane->IsAlive() && mograine->IsAlive())
+ {
+ // When Whitemane emerges from the main gate, Whitemane will stand next to Mograine's corpse and will not reset Whitemane
+ if (whitemane->IsEngaged()||whitemane->IsInEvadeMode())
+ whitemane->DespawnOnEvade(20s);
+
+ mograine->DespawnOnEvade(20s);
+ _encounter = NOT_STARTED;
+ return;
+ }
+
+ // Whitemane will not be able to fight Mograine again when he dies
+ if (!whitemane->IsAlive())
+ {
+ mograine->DespawnOrUnsummon();
+ _encounter = data;
+ return;
+ }
+
+ if (whitemane->IsAlive() && !mograine->IsAlive())
+ {
+ whitemane->DespawnOnEvade(20s);
+ _encounter = data;
+ return;
+ }
+
+ _encounter = data;
+ }
+ if (data == DONE)
+ _encounter = DONE;
+ break;
+ case TYPE_ASHBRINGER_EVENT:
+ if (data == IN_PROGRESS)
+ {
+ // the ashbringer incident did not sniff out any data from whitemane
+ if (Creature* whitemane = instance->GetCreature(_whitemaneGUID))
+ if (whitemane->IsAlive() && !whitemane->IsEngaged())
+ whitemane->DespawnOrUnsummon();
+
+ if (GameObject* go = instance->GetGameObject(_doorChapelGUID))
+ {
+ go->SetGoState(GO_STATE_ACTIVE);
+ go->SetLootState(GO_ACTIVATED);
+ go->SetGameObjectFlag(GO_FLAG_IN_USE);
+ }
+
+ for (auto const& scarletCathedralNpcGuid : _ashbringerNpcGUID)
+ if (Creature* scarletNpc = instance->GetCreature(scarletCathedralNpcGuid))
+ if (scarletNpc->IsAlive() && !scarletNpc->IsEngaged())
+ scarletNpc->SetFaction(FACTION_FRIENDLY);
}
- if (data == SPECIAL)
- encounter = SPECIAL;
+ _ashencounter = data;
break;
case DATA_HORSEMAN_EVENT:
- encounter = data;
+ _encounter = data;
+ break;
+ default:
break;
}
}
@@ -167,528 +229,49 @@ class instance_scarlet_monastery : public InstanceMapScript
switch (type)
{
case DATA_MOGRAINE:
- return MograineGUID;
+ return _mograineGUID;
case DATA_WHITEMANE:
- return WhitemaneGUID;
+ return _whitemaneGUID;
case DATA_DOOR_WHITEMANE:
- return DoorHighInquisitorGUID;
+ return _doorHighInquisitorGUID;
+ case DATA_DOOR_CHAPEL:
+ return _doorChapelGUID;
+ default:
+ return ObjectGuid::Empty;
+ break;
}
-
- return ObjectGuid::Empty;
}
uint32 GetData(uint32 type) const override
{
- if (type == TYPE_MOGRAINE_AND_WHITE_EVENT)
- return encounter;
- else if (type == DATA_HORSEMAN_EVENT)
- return encounter;
- return 0;
- }
- private:
- ObjectGuid DoorHighInquisitorGUID;
- ObjectGuid MograineGUID;
- ObjectGuid WhitemaneGUID;
- uint32 encounter;
- };
-};
-
-enum ScarletMonasteryTrashMisc
-{
- SAY_WELCOME = 0,
- AURA_ASHBRINGER = 28282,
- //FACTION_FRIENDLY_TO_ALL = 35,
- NPC_HIGHLORD_MOGRAINE = 16440,
- SPELL_COSMETIC_CHAIN = 45537,
- SPELL_COSMETIC_EXPLODE = 45935,
- SPELL_FORGIVENESS = 28697,
-};
-
-enum MograineEvents
-{
- EVENT_SPELL_CRUSADER_STRIKE = 1,
- EVENT_SPELL_HAMMER_OF_JUSTICE = 2,
- EVENT_PULL_CATHEDRAL = 3
-};
-
-enum WhitemaneEvents
-{
- EVENT_SPELL_HOLY_SMITE = 1,
- EVENT_SPELL_POWER_WORLD_SHIELD = 2,
- EVENT_SPELL_HEAL = 3
-};
-
-enum Spells
-{
- //Mograine Spells
- SPELL_CRUSADER_STRIKE = 14518,
- SPELL_HAMMER_OF_JUSTICE = 5589,
- SPELL_LAY_ON_HANDS = 9257,
- SPELL_RETRIBUTION_AURA = 8990,
- SPELL_PERMANENT_FEIGN_DEATH = 29266,
-
- //Whitemanes Spells
- SPELL_SCARLET_RESURRECTION = 9232,
- SPELL_DEEP_SLEEP = 9256,
- SPELL_DOMINATE_MIND = 14515,
- SPELL_HOLY_SMITE = 9481,
- SPELL_HEAL = 12039,
- SPELL_POWER_WORD_SHIELD = 22187
-};
-
-enum Says
-{
- //Mograine says
- SAY_MO_AGGRO = 0,
- SAY_MO_KILL = 1,
- SAY_MO_RESURRECTED = 2,
-
- //Whitemane says
- SAY_WH_INTRO = 0,
- SAY_WH_KILL = 1,
- SAY_WH_RESURRECT = 2,
-};
-
-float const CATHEDRAL_PULL_RANGE = 80.0f; // Distance from the Cathedral doors to where Mograine is standing
-
-class npc_mograine : public CreatureScript
-{
-public:
- npc_mograine() : CreatureScript("npc_scarlet_commander_mograine") { }
-
- struct npc_mograineAI : public ScriptedAI
- {
- npc_mograineAI(Creature* creature) : ScriptedAI(creature)
- {
- instance = creature->GetInstanceScript();
- }
-
- uint32 AshbringerEvent(uint32 uiSteps)
- {
- Creature* mograine = me->FindNearestCreature(NPC_HIGHLORD_MOGRAINE, 200.0f);
-
- switch (uiSteps)
+ switch (type)
{
- case 1:
- me->GetMotionMaster()->MovePoint(0, 1152.039795f, 1398.405518f, 32.527878f);
- return 2 * IN_MILLISECONDS;
- case 2:
- me->SetSheath(SHEATH_STATE_UNARMED);
- me->SetStandState(UNIT_STAND_STATE_KNEEL);
- return 2 * IN_MILLISECONDS;
- case 3:
- Talk(3);
- return 10 * IN_MILLISECONDS;
- case 4:
- me->SummonCreature(NPC_HIGHLORD_MOGRAINE, 1065.130737f, 1399.350586f, 30.763723f, 6.282961f, TEMPSUMMON_TIMED_DESPAWN, 400000)->SetName("Highlord Mograine");
- me->FindNearestCreature(NPC_HIGHLORD_MOGRAINE, 200.0f)->SetFaction(FACTION_FRIENDLY);
- return 30 * IN_MILLISECONDS;
- case 5:
- mograine->StopMovingOnCurrentPos();
- mograine->AI()->Talk(0);
- mograine->HandleEmoteCommand(EMOTE_ONESHOT_POINT);
- return 4 * IN_MILLISECONDS;
- case 6:
- me->SetStandState(UNIT_STAND_STATE_STAND);
- return 2 * IN_MILLISECONDS;
- case 7:
- Talk(4);
- return 4 * IN_MILLISECONDS;
- case 8:
- mograine->AI()->Talk(1);
- return 11 * IN_MILLISECONDS;
- case 9:
- mograine->HandleEmoteCommand(EMOTE_ONESHOT_BATTLE_ROAR);
- return 4 * IN_MILLISECONDS;
- case 10:
- me->SetSheath(SHEATH_STATE_UNARMED);
- me->SetStandState(UNIT_STAND_STATE_KNEEL);
- Talk(5);
- return 2 * IN_MILLISECONDS;
- case 11:
- mograine->CastSpell(me, SPELL_FORGIVENESS, false);
- return 1 * IN_MILLISECONDS;
- case 12:
- mograine->CastSpell(me, SPELL_COSMETIC_CHAIN, true);
- return 0.5 * IN_MILLISECONDS;
- case 13:
- mograine->AI()->Talk(2);
- mograine->DespawnOrUnsummon(3 * IN_MILLISECONDS);
- mograine->Kill(me, me, true);
- return 0;
+ case TYPE_MOGRAINE_AND_WHITE_EVENT:
+ return _encounter;
+ break;
+ case DATA_HORSEMAN_EVENT:
+ return _encounter;
+ break;
+ case TYPE_ASHBRINGER_EVENT:
+ return _ashencounter;
+ break;
default:
- if (mograine)
- mograine->DespawnOrUnsummon(0);
return 0;
+ break;
}
}
-
- void PullCathedral() // CallForHelp will ignore any npcs without LOS
- {
- std::list creatureList;
- GetCreatureListWithEntryInGrid(creatureList, me, NPC_SCARLET_MONK, CATHEDRAL_PULL_RANGE);
- GetCreatureListWithEntryInGrid(creatureList, me, NPC_SCARLET_ABBOT, CATHEDRAL_PULL_RANGE);
- GetCreatureListWithEntryInGrid(creatureList, me, NPC_SCARLET_CHAMPION, CATHEDRAL_PULL_RANGE);
- GetCreatureListWithEntryInGrid(creatureList, me, NPC_SCARLET_CENTURION, CATHEDRAL_PULL_RANGE);
- GetCreatureListWithEntryInGrid(creatureList, me, NPC_SCARLET_WIZARD, CATHEDRAL_PULL_RANGE);
- GetCreatureListWithEntryInGrid(creatureList, me, NPC_SCARLET_CHAPLAIN, CATHEDRAL_PULL_RANGE);
- for (std::list::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr)
- {
- if (Creature* creature = *itr)
- creature->AI()->AttackStart(me->GetVictim());
- }
- }
-
- void Reset() override
- {
- //Incase wipe during phase that mograine fake death
- me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
- me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
- me->RemoveAurasDueToSpell(SPELL_PERMANENT_FEIGN_DEATH);
- SayAshbringer = false;
- timer = 0;
- step = 1;
- hasDied = false;
- heal = false;
- fakeDeath = false;
- events.Reset();
- }
-
- void MoveInLineOfSight(Unit* who) override
- {
- if (who && who->GetDistance2d(me) < 15.0f)
- if (Player* player = who->ToPlayer())
- if (player->HasAura(AURA_ASHBRINGER) && !SayAshbringer)
- {
- me->SetFaction(FACTION_FRIENDLY);
- me->SetSheath(SHEATH_STATE_UNARMED);
- me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->SetFacingToObject(player);
- // me->Yell(12389, LANG_UNIVERSAL, player); // Doesn't exist
- SayAshbringer = true;
- }
-
- ScriptedAI::MoveInLineOfSight(who);
- }
-
- void JustEngagedWith(Unit* /*who*/) override
- {
- Talk(SAY_MO_AGGRO);
- me->CastSpell(me, SPELL_RETRIBUTION_AURA, true);
- events.ScheduleEvent(EVENT_PULL_CATHEDRAL, 1s); // Has to be done via event, otherwise mob aggroing Mograine DOES NOT aggro the room
- events.ScheduleEvent(EVENT_SPELL_CRUSADER_STRIKE, 1s, 5s);
- events.ScheduleEvent(EVENT_SPELL_HAMMER_OF_JUSTICE, 6s, 11s);
- }
-
- void DamageTaken(Unit* /*doneBy*/, uint32& damage, DamageEffectType, SpellSchoolMask) override
- {
- if (damage < me->GetHealth() || hasDied || fakeDeath)
- return;
-
- //On first death, fake death and open door, as well as initiate whitemane if exist
- if (Unit* Whitemane = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_WHITEMANE)))
- {
- instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, IN_PROGRESS);
- Whitemane->GetMotionMaster()->MovePoint(1, 1163.113370f, 1398.856812f, 32.527786f);
- me->GetMotionMaster()->MovementExpired();
- me->GetMotionMaster()->MoveIdle();
- me->SetHealth(0);
- if (me->IsNonMeleeSpellCast(false))
- me->InterruptNonMeleeSpells(false);
- me->ClearComboPointHolders();
- me->RemoveAllAuras();
- me->ClearAllReactives();
- me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
- me->CastSpell(me, SPELL_PERMANENT_FEIGN_DEATH, true);
-
- hasDied = true;
- fakeDeath = true;
- damage = 0;
- ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_WHITEMANE))->SetInCombatWithZone();
- }
- }
-
- void KilledUnit(Unit* /*victim*/) override
- {
- Talk(SAY_MO_KILL);
- }
-
- void SpellHit(Unit* /*who*/, SpellInfo const* spell) override
- {
- //When hit with resurrection say text
- if (spell->Id == SPELL_SCARLET_RESURRECTION)
- {
- Talk(SAY_MO_RESURRECTED);
- fakeDeath = false;
- instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, SPECIAL);
- }
- }
-
- void UpdateAI(uint32 diff) override
- {
- timer = timer - diff;
- if (SayAshbringer && step < 15)
- {
- if (timer <= 0)
- {
- timer = AshbringerEvent(step);
- step++;
- }
- }
-
- if (!UpdateVictim())
- return;
-
- if (hasDied && !heal && instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == SPECIAL)
- {
- //On resurrection, stop fake death and heal whitemane and resume fight
- if (Unit* Whitemane = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_WHITEMANE)))
- {
- //Incase wipe during phase that mograine fake death
- me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
- me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
- me->RemoveAurasDueToSpell(SPELL_PERMANENT_FEIGN_DEATH);
- me->CastSpell(me, SPELL_RETRIBUTION_AURA, true);
- me->CastSpell(Whitemane, SPELL_LAY_ON_HANDS, true);
- events.ScheduleEvent(EVENT_SPELL_CRUSADER_STRIKE, 1s, 5s);
- events.ScheduleEvent(EVENT_SPELL_HAMMER_OF_JUSTICE, 6s, 11s);
- if (me->GetVictim())
- me->GetMotionMaster()->MoveChase(me->GetVictim());
- heal = true;
- }
- }
-
- //This if-check to make sure mograine does not attack while fake death
- if (fakeDeath)
- return;
-
- events.Update(diff);
- if (me->HasUnitState(UNIT_STATE_CASTING))
- return;
-
- while (uint32 eventId = events.ExecuteEvent())
- {
- switch (eventId)
- {
- case EVENT_SPELL_CRUSADER_STRIKE:
- me->CastSpell(me->GetVictim(), SPELL_CRUSADER_STRIKE, true);
- events.ScheduleEvent(EVENT_SPELL_CRUSADER_STRIKE, 10s);
- break;
- case EVENT_SPELL_HAMMER_OF_JUSTICE:
- me->CastSpell(me->GetVictim(), SPELL_HAMMER_OF_JUSTICE, true);
- events.ScheduleEvent(EVENT_SPELL_HAMMER_OF_JUSTICE, 60s);
- break;
- case EVENT_PULL_CATHEDRAL:
- PullCathedral();
- break;
- }
- }
- DoMeleeAttackIfReady();
- }
-
- private:
- bool SayAshbringer = false;
- int timer = 0;
- int step = 1;
- bool hasDied;
- bool heal;
- bool fakeDeath;
- EventMap events;
- InstanceScript* instance;
- };
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return GetScarletMonasteryAI(creature);
- }
-};
-
-class boss_high_inquisitor_whitemane : public CreatureScript
-{
-public:
- boss_high_inquisitor_whitemane() : CreatureScript("boss_high_inquisitor_whitemane") { }
-
- struct boss_high_inquisitor_whitemaneAI : public ScriptedAI
- {
- boss_high_inquisitor_whitemaneAI(Creature* creature) : ScriptedAI(creature)
- {
- instance = creature->GetInstanceScript();
- }
-
- void Reset() override
- {
- canResurrectCheck = false;
- canResurrect = false;
- Wait_Timer = 7000;
- Heal_Timer = 10000;
- }
-
- void JustReachedHome() override
- {
- instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, FAIL);
- }
-
- void JustEngagedWith(Unit* /*who*/) override
- {
- Talk(SAY_WH_INTRO);
- events.ScheduleEvent(EVENT_SPELL_HOLY_SMITE, 1s, 3s);
- events.ScheduleEvent(EVENT_SPELL_POWER_WORLD_SHIELD, 6s);
- events.ScheduleEvent(EVENT_SPELL_HEAL, 9s);
- }
-
- void DamageTaken(Unit* /*doneBy*/, uint32& damage, DamageEffectType, SpellSchoolMask) override
- {
- if ((!canResurrectCheck || canResurrect) && damage >= me->GetHealth())
- damage = me->GetHealth() - 1;
- }
-
- void KilledUnit(Unit* /*victim*/) override
- {
- Talk(SAY_WH_KILL);
- }
-
- void UpdateAI(uint32 diff) override
- {
- if (!UpdateVictim())
- return;
-
- if (canResurrect)
- {
- //When casting resuruction make sure to delay so on rez when reinstate battle deepsleep runs out
- if (Wait_Timer <= diff)
- {
- if (ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_MOGRAINE)))
- {
- DoCast(SPELL_SCARLET_RESURRECTION);
- Talk(SAY_WH_RESURRECT);
- canResurrect = false;
- }
- }
- else Wait_Timer -= diff;
- }
-
- //Cast Deep sleep when health is less than 50%
- if (!canResurrectCheck && !HealthAbovePct(50))
- {
- if (me->IsNonMeleeSpellCast(false))
- me->InterruptNonMeleeSpells(false);
-
- me->CastSpell(me->GetVictim(), SPELL_DEEP_SLEEP, true);
- canResurrectCheck = true;
- canResurrect = true;
- return;
- }
-
- //while in "resurrect-mode", don't do anything
- if (canResurrect)
- return;
-
- //If we are <75% hp cast healing spells at self or Mograine
- if (Heal_Timer <= diff)
- {
- Creature* target = nullptr;
-
- if (!HealthAbovePct(75))
- target = me;
-
- if (Creature* mograine = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_MOGRAINE)))
- {
- // checking canResurrectCheck prevents her healing Mograine while he is "faking death"
- if (canResurrectCheck && mograine->IsAlive() && !mograine->HealthAbovePct(75))
- target = mograine;
- }
-
- if (target)
- me->CastSpell(target, SPELL_HEAL, false);
-
- Heal_Timer = 13000;
- }
- else Heal_Timer -= diff;
-
- events.Update(diff);
- if (me->HasUnitState(UNIT_STATE_CASTING))
- return;
-
- while (uint32 eventId = events.ExecuteEvent())
- {
- switch (eventId)
- {
- case EVENT_SPELL_POWER_WORLD_SHIELD:
- me->CastSpell(me, SPELL_POWER_WORD_SHIELD, false);
- events.ScheduleEvent(EVENT_SPELL_POWER_WORLD_SHIELD, 15s);
- break;
- case EVENT_SPELL_HOLY_SMITE:
- me->CastSpell(me->GetVictim(), SPELL_HOLY_SMITE, false);
- events.ScheduleEvent(EVENT_SPELL_HOLY_SMITE, 6s);
- break;
- case EVENT_SPELL_HEAL:
- me->CastSpell(me, SPELL_HEAL, false);
- break;
- }
- }
-
- DoMeleeAttackIfReady();
- }
-
- private:
- InstanceScript* instance;
- uint32 Heal_Timer;
- uint32 Wait_Timer;
- bool canResurrectCheck;
- bool canResurrect;
- EventMap events;
- };
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return GetScarletMonasteryAI(creature);
- }
-};
-
-class npc_fairbanks : public CreatureScript
-{
-public:
- npc_fairbanks() : CreatureScript("npc_fairbanks") { }
-
- struct npc_fairbanksAI : public SmartAI
- {
- npc_fairbanksAI(Creature* creature) : SmartAI(creature) { }
-
- void Reset() override
- {
- SayAshbringer = false;
- }
-
- void MoveInLineOfSight(Unit* who) override
- {
- if (who && who->GetDistance2d(me) < 2.0f)
- if (Player* player = who->ToPlayer())
- if (player->HasAura(AURA_ASHBRINGER) && !SayAshbringer)
- {
- me->SetFaction(FACTION_FRIENDLY);
- me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
- me->CastSpell(me, 57767, true);
- me->SetDisplayId(16179);
- me->SetFacingToObject(player);
- SayAshbringer = true;
- }
-
- SmartAI::MoveInLineOfSight(who);
- }
private:
- bool SayAshbringer = false;
+ ObjectGuid _doorHighInquisitorGUID;
+ ObjectGuid _doorChapelGUID;
+ ObjectGuid _mograineGUID;
+ ObjectGuid _whitemaneGUID;
+ uint32 _encounter{};
+ uint32 _ashencounter{};
+ GuidSet _ashbringerNpcGUID;
};
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return GetScarletMonasteryAI(creature);
- }
};
void AddSC_instance_scarlet_monastery()
{
new instance_scarlet_monastery();
- new npc_fairbanks();
- new npc_mograine();
- new boss_high_inquisitor_whitemane();
}