mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Scripts/ScarletEnclave): Rewrite Brothers in Death (#22303)
This commit is contained in:
165
data/sql/updates/pending_db_world/rev_1750043682130947900.sql
Normal file
165
data/sql/updates/pending_db_world/rev_1750043682130947900.sql
Normal file
@@ -0,0 +1,165 @@
|
||||
--
|
||||
-- Pathing for Entry: 29007
|
||||
SET @NPC := 29007;
|
||||
SET @PATH := @NPC * 10;
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,1649.966,-6042.5713,127.57849,0,0,1,0,100,0);
|
||||
-- 0x202F2C4C201C53C000084E0000465DB5 .go xyz 1649.966 -6042.5713 127.57849
|
||||
|
||||
-- Pathing for Entry: 29007
|
||||
SET @NPC := 29008;
|
||||
SET @PATH := @NPC * 10;
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,1649.966,-6042.5713,127.57849,0,0,1,0,100,0);
|
||||
-- 0x202F2C4C201C53C000084E0000465DD2 .go xyz 1649.966 -6042.5713 127.57849
|
||||
|
||||
-- Pathing for Entry: 29007
|
||||
SET @NPC := 29009;
|
||||
SET @PATH := @NPC * 10;
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,1649.966,-6042.5713,127.57849,0,0,1,0,100,0);
|
||||
-- 0x202F2C4C201C53C000084E0000465DE7 .go xyz 1649.966 -6042.5713 127.57849
|
||||
|
||||
-- Pathing for Entry: 29007
|
||||
SET @NPC := 29010;
|
||||
SET @PATH := @NPC * 10;
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,1640.7407,-6032.02,134.73505,0,0,1,0,100,0);
|
||||
-- 0x202F2C4C201C53C000084E0000C65DB5 .go xyz 1640.7407 -6032.02 134.73505
|
||||
|
||||
-- Pathing for Entry: 29007
|
||||
SET @NPC := 29011;
|
||||
SET @PATH := @NPC * 10;
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,1640.7958,-6030.307,134.73505,0,0,1,0,100,0);
|
||||
-- 0x202F2C4C201C53C000084E0000C65DD2 .go xyz 1640.7958 -6030.307 134.73505
|
||||
|
||||
-- Pathing for Entry: 29007
|
||||
SET @NPC := 29012;
|
||||
SET @PATH := @NPC * 10;
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,1646.2389,-6032.526,134.73506,0,0,1,0,100,0);
|
||||
-- 0x202F2C4C201C53C000084E0000C65DE7 .go xyz 1646.2389 -6032.526 134.73506
|
||||
|
||||
-- Pathing for Entry: 29007
|
||||
SET @NPC := 29013;
|
||||
SET @PATH := @NPC * 10;
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,1640.6724,-6032.0527,134.73506,0,0,1,0,100,0);
|
||||
-- 0x202F2C4C201C53C000084E0001465DB5 .go xyz 1640.6724 -6032.0527 134.73506
|
||||
|
||||
-- Pathing for Entry: 29007
|
||||
SET @NPC := 29014;
|
||||
SET @PATH := @NPC * 10;
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,1638.7998,-6036.4976,132.57643,0,0,1,0,100,0);
|
||||
-- 0x202F2C4C201C53C000084E0001465DD2 .go xyz 1638.7998 -6036.4976 132.57643
|
||||
|
||||
-- Pathing for Entry: 29007
|
||||
SET @NPC := 29015;
|
||||
SET @PATH := @NPC * 10;
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,1638.2631,-6030.1514,134.73505,0,0,1,0,100,0);
|
||||
-- 0x202F2C4C201C53C000084E0001465DE7 .go xyz 1638.2631 -6030.1514 134.73505
|
||||
|
||||
-- Pathing for Entry: 29007
|
||||
SET @NPC := 29016;
|
||||
SET @PATH := @NPC * 10;
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,1642.4694,-6029.949,134.73505,0,0,1,0,100,0);
|
||||
-- 0x202F2C4C201C53C000084E0001C65DE7 .go xyz 1642.4694 -6029.949 134.73505
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 29007;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 29007) AND (`source_type` = 0) AND (`id` IN (1, 2, 3, 4));
|
||||
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
|
||||
(29007, 0, 1, 0, 0, 0, 100, 0, 1000, 4000, 4000, 6000, 0, 0, 11, 15498, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Crimson Acolyte - In Combat - Cast \'Holy Smite\''),
|
||||
(29007, 0, 2, 0, 0, 0, 100, 0, 6000, 9000, 25000, 30000, 0, 0, 11, 19725, 64, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 'Crimson Acolyte - In Combat - Cast \'Turn Undead\''),
|
||||
(29007, 0, 3, 4, 109, 0, 100, 0, 0, 0, 0, 0, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Crimson Acolyte - On Path 0 Finished - Remove Flags Immune To Players'),
|
||||
(29007, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 9, 0, 0, 50, 0, 0, 0, 0, 0, 'Crimson Acolyte - On Path 0 Finished - Set In Combat With Zone');
|
||||
|
||||
UPDATE `creature_template` SET `unit_flags` = `unit_flags`|256 WHERE `entry` = 29007;
|
||||
|
||||
-- Pathing for Entry: 29001
|
||||
SET @NPC := 29001;
|
||||
SET @PATH := @NPC * 10;
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,1648.3103,-6043.6396,127.57861,0,0,1,0,100,0);
|
||||
|
||||
DELETE FROM `script_waypoint` WHERE `entry` = 28912;
|
||||
|
||||
SET @NPC := 28912;
|
||||
SET @PATH := @NPC * 10;
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,1653.36,-6038.34,127.584,0,0,0,0,100,0),
|
||||
(@PATH,2,1653.7653,-6035.075,127.5844,1.596199,5000,0,0,100,0),
|
||||
(@PATH,3,1651.8898,-6037.1006,127.5844,0,0,0,0,100,0),
|
||||
(@PATH,4,1651.8898,-6037.1006,127.5844,3.839724302291870117,0,0,0,100,0);
|
||||
|
||||
SET @PATH := (@NPC + 1) * 10;
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,1653.3759,-5971.8735,132.25667,0,0,1,0,100,0),
|
||||
(@PATH,2,1685.0416,-5887.038,116.1461,0,0,1,0,100,0);
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID` = 28912;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(28912, 0, 0, 'Damn the Crusade! I think my ribs are broken and I might be bleeding internally.', 12, 0, 100, 0, 0, 0, 29197, 0, 'koltira deathweaver'),
|
||||
(28912, 1, 0, 'I\'ll need to get my runeblade and armor... Just need a little more time.', 12, 0, 100, 0, 0, 0, 29201, 0, 'koltira deathweaver'),
|
||||
(28912, 2, 0, 'I\'m still weak, but I think I can get an anti-magic barrier up. Stay inside it or you\'ll be destroyed by their spells.', 12, 0, 100, 0, 0, 0, 29203, 0, 'koltira deathweaver'),
|
||||
(28912, 3, 0, 'Maintaining this barrier will require all of my concentration. Kill them all!', 12, 0, 100, 0, 0, 0, 29205, 0, 'koltira deathweaver'),
|
||||
(28912, 4, 0, 'There are more coming. Defend yourself! Don\'t fall out of the anti-magic field! They\'ll tear you apart without its protection!', 12, 0, 100, 0, 0, 0, 29207, 0, 'koltira deathweaver'),
|
||||
(28912, 5, 0, 'I can\'t keep this barrier up much longer... Where is that coward?', 12, 0, 100, 0, 0, 0, 29208, 0, 'koltira deathweaver'),
|
||||
(28912, 6, 0, 'The High Inquisitor comes! Be ready, death knight! Do not let him draw you out of the protective bounds of my anti-magic field! Kill him and take his head!', 12, 0, 100, 0, 0, 0, 29210, 0, 'koltira deathweaver'),
|
||||
(28912, 7, 0, 'Stay in the anti-magic field! Make them come to you!', 12, 0, 100, 0, 0, 0, 29225, 0, 'koltira deathweaver'),
|
||||
(28912, 8, 0, 'The death of the High Inquisitor of New Avalon will not go unnoticed. You need to get out of here at once! Go, before more of them show up. I\'ll be fine on my own.', 12, 0, 100, 1, 0, 0, 29239, 0, 'koltira deathweaver'),
|
||||
(28912, 9, 0, 'I\'ll draw their fire, you make your escape behind me.', 12, 0, 100, 1, 0, 0, 29240, 0, 'koltira deathweaver'),
|
||||
(28912, 10, 0, 'Your High Inquisitor is nothing more than a pile of meat, Crusaders! There are none beyond the grasp of the Scourge!', 14, 0, 100, 5, 0, 0, 29241, 0, 'koltira deathweaver'),
|
||||
(28912, 11, 0, '%s collapses to the ground.', 41, 0, 100, 0, 0, 0, 29230, 0, 'koltira deathweaver');
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 29001;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 29001) AND (`source_type` = 0) AND (`id` IN (0, 1, 2, 3, 4, 5, 6, 7));
|
||||
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
|
||||
(29001, 0, 0, 0, 0, 0, 100, 0, 1000, 1000, 1000, 3000, 0, 0, 11, 52926, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Valroth - In Combat - Cast \'Valroth`s Smite\''),
|
||||
(29001, 0, 1, 0, 2, 0, 100, 0, 0, 50, 0, 0, 0, 0, 11, 38210, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Valroth - Between 0-50% Health - Cast \'Renew\''),
|
||||
(29001, 0, 2, 3, 0, 0, 100, 0, 2000, 7000, 2000, 7000, 0, 0, 11, 52922, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Valroth - In Combat - Cast \'The Inquisitor`s Penance\''),
|
||||
(29001, 0, 3, 0, 61, 0, 50, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Valroth - In Combat - Say Line 2'),
|
||||
(29001, 0, 4, 0, 109, 0, 100, 0, 0, 0, 0, 0, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Valroth - On Path 0 Finished - Remove Flags Immune To Players'),
|
||||
(29001, 0, 5, 6, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52929, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Valroth - On Just Died - Cast \'Summon Valroth`s Remains\''),
|
||||
(29001, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Valroth - On Just Died - Say Line 3'),
|
||||
(29001, 0, 7, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Valroth - On Aggro - Say Line 6');
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID` = 29001;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(29001, 0, 0, 'The Crusade will purge your kind from this world!', 14, 0, 100, 0, 0, 0, 29215, 0, 'high inquisitor valroth'),
|
||||
(29001, 1, 0, 'It seems that I\'ll need to deal with you myself. The High Inquisitor comes for you, Scourge!', 14, 0, 100, 0, 0, 0, 29216, 0, 'high inquisitor valroth'),
|
||||
(29001, 2, 0, 'You have come seeking deliverance? I have come to deliver!', 12, 0, 100, 0, 0, 0, 29222, 0, 'high inquisitor valroth'),
|
||||
(29001, 2, 1, 'LIGHT PURGE YOU!', 12, 0, 100, 0, 0, 0, 29221, 0, 'high inquisitor'),
|
||||
(29001, 2, 2, 'Coward!', 12, 0, 100, 0, 0, 0, 30699, 0, 'high inquisitor valroth'),
|
||||
(29001, 3, 0, '%s\'s remains fall to the ground.', 41, 0, 100, 0, 0, 0, 29223, 0, 'high inquisitor'),
|
||||
(29001, 4, 0, 'Acolytes, chain them all up! Prepare them for questioning!', 14, 0, 100, 0, 0, 0, 29202, 0, 'high inquisitor'),
|
||||
(29001, 5, 0, 'Scourge filth! By the Light be cleansed!', 14, 0, 100, 0, 0, 0, 29214, 0, 'high inquisitor'),
|
||||
(29001, 6, 0, 'Your dark Scourge magic won\'t protect you from the Light!', 12, 0, 100, 0, 0, 0, 29218, 0, 'high inquisitor');
|
||||
|
||||
DELETE FROM `gossip_menu_option` WHERE `MenuID` = 9762;
|
||||
INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`) VALUES
|
||||
(9762, 0, 0, 'Koltira, let\'s get out of here!', 29243, 1, 1, 0);
|
||||
|
||||
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 15) AND (`SourceGroup` = 9762) AND (`SourceEntry` = 0) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 47) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 12727) AND (`ConditionValue2` = 8) AND (`ConditionValue3` = 0);
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(15, 9762, 0, 0, 0, 47, 0, 12727, 8, 0, 0, 0, 0, '', 'Only show Koltira gossip if player has quest Bloody Breakout incomplete');
|
||||
|
||||
UPDATE `creature_addon` SET `auras` = '' WHERE `guid` IN (130354, 129716);
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "CombatAI.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "CreatureTextMgr.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
@@ -185,16 +186,23 @@ public:
|
||||
|
||||
enum Koltira
|
||||
{
|
||||
SAY_BREAKOUT1 = 0,
|
||||
SAY_BREAKOUT2 = 1,
|
||||
SAY_BREAKOUT3 = 2,
|
||||
SAY_BREAKOUT4 = 3,
|
||||
SAY_BREAKOUT5 = 4,
|
||||
SAY_BREAKOUT6 = 5,
|
||||
SAY_BREAKOUT7 = 6,
|
||||
SAY_BREAKOUT8 = 7,
|
||||
SAY_BREAKOUT9 = 8,
|
||||
SAY_BREAKOUT10 = 9,
|
||||
SAY_BREAKOUT0 = 0,
|
||||
SAY_BREAKOUT1 = 1,
|
||||
SAY_BREAKOUT2 = 2,
|
||||
SAY_BREAKOUT3 = 3,
|
||||
SAY_BREAKOUT4 = 4,
|
||||
SAY_BREAKOUT5 = 5,
|
||||
SAY_BREAKOUT6 = 6,
|
||||
SAY_BREAKOUT7 = 7,
|
||||
SAY_BREAKOUT8 = 8,
|
||||
SAY_BREAKOUT9 = 9,
|
||||
SAY_BREAKOUT10 = 10,
|
||||
EMOTE_KOLTIRA_COLLAPSES = 11,
|
||||
|
||||
SAY_VALROTH_WAVE3 = 0,
|
||||
SAY_VALROTH_AGGRO = 1,
|
||||
SAY_VALROTH_WAVE1 = 4,
|
||||
SAY_VALROTH_WAVE2 = 5,
|
||||
|
||||
SPELL_KOLTIRA_TRANSFORM = 52899,
|
||||
SPELL_ANTI_MAGIC_ZONE = 52894,
|
||||
@@ -206,7 +214,14 @@ enum Koltira
|
||||
|
||||
//not sure about this id
|
||||
//NPC_DEATH_KNIGHT_MOUNT = 29201,
|
||||
MODEL_DEATH_KNIGHT_MOUNT = 25278
|
||||
MODEL_DEATH_KNIGHT_MOUNT = 25278,
|
||||
|
||||
POINT_STAND_UP = 0,
|
||||
POINT_BOX = 1,
|
||||
POINT_ANTI_MAGIC_ZONE = 2,
|
||||
|
||||
POINT_MOUNT = 0,
|
||||
POINT_DESPAWN = 1
|
||||
};
|
||||
|
||||
class npc_koltira_deathweaver : public CreatureScript
|
||||
@@ -214,205 +229,203 @@ class npc_koltira_deathweaver : public CreatureScript
|
||||
public:
|
||||
npc_koltira_deathweaver() : CreatureScript("npc_koltira_deathweaver") { }
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_BREAKOUT)
|
||||
{
|
||||
creature->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
creature->setActive(true);
|
||||
|
||||
if (npc_escortAI* pEscortAI = CAST_AI(npc_koltira_deathweaver::npc_koltira_deathweaverAI, creature->AI()))
|
||||
pEscortAI->Start(false, false, player->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_koltira_deathweaverAI(creature);
|
||||
}
|
||||
|
||||
struct npc_koltira_deathweaverAI : public npc_escortAI
|
||||
struct npc_koltira_deathweaverAI : public ScriptedAI
|
||||
{
|
||||
npc_koltira_deathweaverAI(Creature* creature) : npc_escortAI(creature), summons(me)
|
||||
{
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
}
|
||||
|
||||
uint32 m_uiWave;
|
||||
uint32 m_uiWave_Timer;
|
||||
ObjectGuid m_uiValrothGUID;
|
||||
SummonList summons;
|
||||
npc_koltira_deathweaverAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
if (!HasEscortState(STATE_ESCORT_ESCORTING))
|
||||
{
|
||||
m_uiWave = 0;
|
||||
m_uiWave_Timer = 3000;
|
||||
m_uiValrothGUID.Clear();
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->LoadEquipment(0, true);
|
||||
me->RemoveAllAuras();
|
||||
summons.DespawnAll();
|
||||
}
|
||||
scheduler.CancelAll();
|
||||
me->m_Events.KillAllEvents(false);
|
||||
me->SetUnitFlag(UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
me->setActive(false);
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||
void StartEvent()
|
||||
{
|
||||
me->GetThreatMgr().ClearAllThreat();
|
||||
me->CombatStop(false);
|
||||
me->SetLootRecipient(nullptr);
|
||||
|
||||
if (HasEscortState(STATE_ESCORT_ESCORTING))
|
||||
{
|
||||
AddEscortState(STATE_ESCORT_RETURNING);
|
||||
ReturnToLastPoint();
|
||||
LOG_DEBUG("scripts.ai", "EscortAI has left combat and is now returning to last point");
|
||||
}
|
||||
else
|
||||
{
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
me->SetImmuneToNPC(true);
|
||||
Reset();
|
||||
}
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who) override
|
||||
{
|
||||
if (HasEscortState(STATE_ESCORT_PAUSED))
|
||||
if (!me->HasNpcFlag(UNIT_NPC_FLAG_GOSSIP)) // Already in progress
|
||||
return;
|
||||
|
||||
npc_escortAI::AttackStart(who);
|
||||
me->SetStandState(UNIT_STAND_STATE_SIT);
|
||||
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->setActive(true);
|
||||
|
||||
Talk(SAY_BREAKOUT0);
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
|
||||
}, 5s);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 waypointId) override
|
||||
void sQuestAccept(Player* /*player*/, Quest const* quest) override
|
||||
{
|
||||
switch (waypointId)
|
||||
if (quest->GetQuestId() == QUEST_BREAKOUT)
|
||||
StartEvent();
|
||||
}
|
||||
|
||||
void sGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_BREAKOUT) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
case 0:
|
||||
Talk(SAY_BREAKOUT1);
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
break;
|
||||
case 1:
|
||||
me->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
break;
|
||||
case 2:
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
//me->UpdateEntry(NPC_KOLTIRA_ALT); //unclear if we must update or not
|
||||
DoCast(me, SPELL_KOLTIRA_TRANSFORM);
|
||||
me->LoadEquipment();
|
||||
break;
|
||||
case 3:
|
||||
SetEscortPaused(true);
|
||||
me->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
Talk(SAY_BREAKOUT2);
|
||||
DoCast(me, SPELL_ANTI_MAGIC_ZONE); // cast again that makes bubble up
|
||||
break;
|
||||
case 4:
|
||||
me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ALL, false);
|
||||
SetRun(true);
|
||||
break;
|
||||
case 9:
|
||||
me->Mount(MODEL_DEATH_KNIGHT_MOUNT);
|
||||
break;
|
||||
case 10:
|
||||
me->Dismount();
|
||||
break;
|
||||
CloseGossipMenuFor(player);
|
||||
StartEvent();
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned) override
|
||||
void MovementInform(uint32 type, uint32 id) override
|
||||
{
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
summoned->AI()->AttackStart(player);
|
||||
if (type != WAYPOINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
if (summoned->GetEntry() == NPC_HIGH_INQUISITOR_VALROTH)
|
||||
m_uiValrothGUID = summoned->GetGUID();
|
||||
|
||||
summoned->AddThreat(me, 0.0f);
|
||||
summoned->SetImmuneToPC(false);
|
||||
summons.Summon(summoned);
|
||||
}
|
||||
|
||||
void SummonAcolyte(uint32 uiAmount)
|
||||
{
|
||||
for (uint32 i = 0; i < uiAmount; ++i)
|
||||
me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1642.329f, -6045.818f, 127.583f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 uiDiff) override
|
||||
{
|
||||
npc_escortAI::UpdateAI(uiDiff);
|
||||
|
||||
if (HasEscortState(STATE_ESCORT_PAUSED))
|
||||
if (!me->HasUnitFlag(UNIT_FLAG_IMMUNE_TO_NPC))
|
||||
{
|
||||
if (m_uiWave_Timer <= uiDiff)
|
||||
if (id == POINT_MOUNT)
|
||||
me->Mount(MODEL_DEATH_KNIGHT_MOUNT);
|
||||
else if (id == POINT_DESPAWN)
|
||||
{
|
||||
switch (m_uiWave)
|
||||
me->Dismount();
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case POINT_STAND_UP:
|
||||
Talk(SAY_BREAKOUT1);
|
||||
break;
|
||||
case POINT_BOX:
|
||||
me->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
|
||||
scheduler.Schedule(5s, [this](TaskContext context)
|
||||
{
|
||||
switch (context.GetRepeatCounter())
|
||||
{
|
||||
case 0:
|
||||
Talk(SAY_BREAKOUT3);
|
||||
SummonAcolyte(3);
|
||||
m_uiWave_Timer = 20000;
|
||||
|
||||
// Shouldn't actually be spawned at this point, but no way to send his yells otherwise?
|
||||
if (Creature* valroth = me->SummonCreature(NPC_HIGH_INQUISITOR_VALROTH, 1640.8596f, -6030.834f, 134.82211f, 4.606426715850830078f, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
{
|
||||
_valrothGUID = valroth->GetGUID();
|
||||
valroth->AI()->Talk(SAY_VALROTH_WAVE1);
|
||||
valroth->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1640.6724f, -6032.0527f, 134.82213f, 4.654973506927490234f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath(NPC_CRIMSON_ACOLYTE * 10, false);
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1641.0055f, -6031.893f, 134.82211f, 0.401425719261169433f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 1) * 10, false);
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1639.7053f, -6031.7373f, 134.82213f, 2.443460941314697265f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 2) * 10, false);
|
||||
break;
|
||||
case 1:
|
||||
Talk(SAY_BREAKOUT4);
|
||||
SummonAcolyte(3);
|
||||
m_uiWave_Timer = 20000;
|
||||
|
||||
if (Creature* valroth = ObjectAccessor::GetCreature(*me, _valrothGUID))
|
||||
valroth->AI()->Talk(SAY_VALROTH_WAVE2);
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1640.7958f, -6030.307f, 134.82211f, 4.65355682373046875f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 3) * 10, false);
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1641.7305f, -6030.751f, 134.82211f, 6.143558979034423828f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 4) * 10, false);
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1639.4657f, -6030.404f, 134.82211f, 4.502949237823486328f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 5) * 10, false);
|
||||
break;
|
||||
case 2:
|
||||
Talk(SAY_BREAKOUT5);
|
||||
SummonAcolyte(4);
|
||||
m_uiWave_Timer = 20000;
|
||||
|
||||
if (Creature* valroth = ObjectAccessor::GetCreature(*me, _valrothGUID))
|
||||
valroth->AI()->Talk(SAY_VALROTH_WAVE3);
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1641.3405f, -6031.436f, 134.82211f, 4.612849712371826171f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 6) * 10, false);
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1642.0404f, -6030.3843f, 134.82211f, 1.378810048103332519f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 7) * 10, false);
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1640.1162f, -6029.7817f, 134.82211f, 5.707226753234863281f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 8) * 10, false);
|
||||
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1640.9948f, -6029.8027f, 134.82211f, 1.605702877044677734f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 9) * 10, false);
|
||||
break;
|
||||
case 3:
|
||||
Talk(SAY_BREAKOUT6);
|
||||
me->SummonCreature(NPC_HIGH_INQUISITOR_VALROTH, 1642.329f, -6045.818f, 127.583f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
||||
m_uiWave_Timer = 1000;
|
||||
break;
|
||||
case 4:
|
||||
me->m_Events.AddEventAtOffset([this]
|
||||
{
|
||||
Creature* temp = ObjectAccessor::GetCreature(*me, m_uiValrothGUID);
|
||||
Talk(EMOTE_KOLTIRA_COLLAPSES, me);
|
||||
me->KillSelf();
|
||||
|
||||
if (!temp || !temp->IsAlive())
|
||||
{
|
||||
Talk(SAY_BREAKOUT8);
|
||||
m_uiWave_Timer = 5000;
|
||||
}
|
||||
else
|
||||
{
|
||||
// xinef: despawn check
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (!player || me->GetDistance(player) > 60.0f)
|
||||
{
|
||||
me->DespawnOrUnsummon();
|
||||
return;
|
||||
}
|
||||
if (Creature* valroth = ObjectAccessor::GetCreature(*me, _valrothGUID))
|
||||
valroth->DespawnOrUnsummon();
|
||||
}, 2min);
|
||||
|
||||
m_uiWave_Timer = 2500;
|
||||
return; //return, we don't want m_uiWave to increment now
|
||||
}
|
||||
break;
|
||||
if (Creature* valroth = ObjectAccessor::GetCreature(*me, _valrothGUID))
|
||||
{
|
||||
valroth->AI()->Talk(SAY_VALROTH_AGGRO);
|
||||
valroth->SetReactState(REACT_AGGRESSIVE);
|
||||
valroth->GetMotionMaster()->MovePath(NPC_HIGH_INQUISITOR_VALROTH * 10, false);
|
||||
}
|
||||
case 5:
|
||||
Talk(SAY_BREAKOUT9);
|
||||
me->RemoveAurasDueToSpell(SPELL_ANTI_MAGIC_ZONE);
|
||||
// i do not know why the armor will also be removed
|
||||
m_uiWave_Timer = 2500;
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
case 6:
|
||||
Talk(SAY_BREAKOUT10);
|
||||
SetEscortPaused(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
++m_uiWave;
|
||||
}
|
||||
else
|
||||
m_uiWave_Timer -= uiDiff;
|
||||
context.Repeat(20s);
|
||||
});
|
||||
|
||||
scheduler.Schedule(3s, [this](TaskContext)
|
||||
{
|
||||
DoCastSelf(SPELL_KOLTIRA_TRANSFORM);
|
||||
me->LoadEquipment();
|
||||
});
|
||||
break;
|
||||
case POINT_ANTI_MAGIC_ZONE:
|
||||
me->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
Talk(SAY_BREAKOUT2);
|
||||
DoCastSelf(SPELL_ANTI_MAGIC_ZONE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SummonedCreatureDies(Creature* summon, Unit*) override
|
||||
{
|
||||
if (summon->GetEntry() == NPC_HIGH_INQUISITOR_VALROTH)
|
||||
{
|
||||
me->m_Events.KillAllEvents(false);
|
||||
me->RemoveAurasDueToSpell(SPELL_ANTI_MAGIC_ZONE);
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
Talk(SAY_BREAKOUT8, 3s);
|
||||
Talk(SAY_BREAKOUT9, 8s);
|
||||
scheduler.Schedule(11s, [this](TaskContext)
|
||||
{
|
||||
Talk(SAY_BREAKOUT10);
|
||||
SetInvincibility(true);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
me->GetMotionMaster()->MovePath((me->GetEntry() + 1) * 10, false);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
scheduler.Update(diff);
|
||||
}
|
||||
|
||||
private:
|
||||
ObjectGuid _valrothGUID;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -504,98 +517,6 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
//Koltira & Valroth- Breakout
|
||||
|
||||
enum valroth
|
||||
{
|
||||
//SAY_VALROTH1 = 0, Unused
|
||||
SAY_VALROTH_AGGRO = 1,
|
||||
SAY_VALROTH_RAND = 2,
|
||||
SAY_VALROTH_DEATH = 3,
|
||||
SPELL_RENEW = 38210,
|
||||
SPELL_INQUISITOR_PENANCE = 52922,
|
||||
SPELL_VALROTH_SMITE = 52926,
|
||||
SPELL_SUMMON_VALROTH_REMAINS = 52929
|
||||
};
|
||||
|
||||
class npc_high_inquisitor_valroth : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_high_inquisitor_valroth() : CreatureScript("npc_high_inquisitor_valroth") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_high_inquisitor_valrothAI(creature);
|
||||
}
|
||||
|
||||
struct npc_high_inquisitor_valrothAI : public ScriptedAI
|
||||
{
|
||||
npc_high_inquisitor_valrothAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint32 uiRenew_timer;
|
||||
uint32 uiInquisitor_Penance_timer;
|
||||
uint32 uiValroth_Smite_timer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiRenew_timer = 1000;
|
||||
uiInquisitor_Penance_timer = 2000;
|
||||
uiValroth_Smite_timer = 1000;
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
Talk(SAY_VALROTH_AGGRO);
|
||||
DoCast(who, SPELL_VALROTH_SMITE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (uiRenew_timer <= diff)
|
||||
{
|
||||
Shout();
|
||||
DoCast(me, SPELL_RENEW);
|
||||
uiRenew_timer = urand(1000, 6000);
|
||||
}
|
||||
else uiRenew_timer -= diff;
|
||||
|
||||
if (uiInquisitor_Penance_timer <= diff)
|
||||
{
|
||||
Shout();
|
||||
DoCastVictim(SPELL_INQUISITOR_PENANCE);
|
||||
uiInquisitor_Penance_timer = urand(2000, 7000);
|
||||
}
|
||||
else uiInquisitor_Penance_timer -= diff;
|
||||
|
||||
if (uiValroth_Smite_timer <= diff)
|
||||
{
|
||||
Shout();
|
||||
DoCastVictim(SPELL_VALROTH_SMITE);
|
||||
uiValroth_Smite_timer = urand(1000, 6000);
|
||||
}
|
||||
else uiValroth_Smite_timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void Shout()
|
||||
{
|
||||
if (rand() % 100 < 15)
|
||||
Talk(SAY_VALROTH_RAND);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
Talk(SAY_VALROTH_DEATH);
|
||||
|
||||
if (killer)
|
||||
{
|
||||
killer->CastSpell(me, SPELL_SUMMON_VALROTH_REMAINS, true);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_a_special_surprise
|
||||
######*/
|
||||
@@ -785,6 +706,5 @@ void AddSC_the_scarlet_enclave_c2()
|
||||
new npc_crusade_persuaded();
|
||||
new npc_scarlet_courier();
|
||||
new npc_koltira_deathweaver();
|
||||
new npc_high_inquisitor_valroth();
|
||||
new npc_a_special_surprise();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user