Scripting/Dragonblight: Commander Eligor Dawnbringer now scripted.

Purely cosmetic but it was a fun thing to script :)
This commit is contained in:
Malcrom
2013-12-18 18:06:30 -03:30
parent e5f7beecf5
commit 676baa890f
2 changed files with 492 additions and 5 deletions

View File

@@ -0,0 +1,161 @@
-- Add script to Commander Eligor Dawnbringer
UPDATE creature_template SET `AIName`= '',ScriptName = 'npc_commander_eligor_dawnbringer' WHERE entry=27784;
-- NPC talk text insert for Commander Eligor Dawnbringer
DELETE FROM `creature_text` WHERE `entry`=27784;
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(27784,0,0, 'Next, I shall speak of the most powerful entities within the pinnacle of Naxxramas. Truly, these are two of the greatest threats to all of Northrend.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer - Pinnacle of Naxxramas'),
(27784,1,0, 'Next, I shall speak of the death knight wing of Naxxramas. Within its corrupted halls, the echo of battle rings day and night, as our finest warriors are corrupted and twisted into the Scourge''s greatest warriors.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer - Death knight wing of Naxxramas'),
(27784,2,0, 'Next, I shall speak of the blighted abomination wing of Naxxramas. There, the Scourge develop the strongest and most hideous aberrations of their armies.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer - Blighted abomination wing of Naxxramas'),
(27784,3,0, 'Next, I shall speak of the accursed spider wing of Naxxramas. It is there that the Scourge breed even more poisonous and dangerous versions of their kin.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer - Accursed spider wing of Naxxramas'),
(27784,4,0, 'Next, I shall speak of the dread plague wing of Naxxramas, where the scourge seek to improve upon the deadly blight which they spread upon Lordaeron.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer - Dread plague wing of Naxxramas'),
(27784,5,0, 'I shall leave this image on display for your perusal. Study your opponents'' strengths, for a creature''s strength can also be its weakness.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer - End of talk'),
(27784,6,0, 'Sapphiron. Once a noble blue dragon within the mountains of Northrend, Sapphiron was slain by Arthas during his campaign through the frozen north. Resurrected to serve him, Sapphiron guards Kel''Thuzad''s lair eternally, awaiting those who would dare tresspass upon his master.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,7,0, 'The Lich, Kel''Thuzad. He serves the Lich King without question, a necromancer of great prowess in life, turned to a master of necromancy after his death. It is said he is the most loyal of the Lich King''s subjects.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,8,0, 'Kel''Thuzad has survived trials that would have long since shattered the souls of even the greatest of the Brotherhood. He readily gave his life at Arthas''s hand, later to be brought back - reborn in the power of the Sunwell.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,9,0, 'In the plaguelands, Kel''Thuzad was again defeated by the agents of the Argent Dawn. However, his phylactery was delivered to a false agent of the brotherhood. We have yet to discover who stole his phylactery or why.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,10,0, 'Pay attention. This is Instructor Razuvious, Kel''Thuzad''s appointed trainer of all death knights. It is said that his own technique is so potent, only a disciple of his could possibly withstand his might.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,11,0, 'Gothik, the Harvester. A master of necromancy and conjuration, Gothik is said to be able to beckon forth legions of the undead at a moment''s notice. It is with his guidance that even the weakest of Death Knights can raise the dead.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,12,0, 'The most powerful Death Knights within Naxxramas are the four horsemen. They represent the pinnacle of Kel''Thuzad''s guard. The first, Thane Korth''azz, holds the power of flame.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,13,0, 'The next, Lady Blaumeux, calls forth the power of shadows, drawing the souls of the living into the voracious embrace.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,14,0, 'Sir Zeliek, a paladin in life, so strong in his faith, that even in undeath, the power of the light still heeds his call, smiting his foes in battle.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,15,0, 'The final Death Knight, Lord Mograine, was the finest warrior that the Death Knights had ever seen. However, after the events in Azeroth, he vanished without a trace. Kel''Thuzad has appointed Baron Rivendare in his place.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,16,0, 'Behold, Patchwerk. When word of his existence first reached the ears of the Brotherhood, none believed the tales of an abomination with such immense speed and strength. Fewer still believed it when he fell the first time...',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,17,0, 'Grobbulus, the first of what was to be an army of flesh giants. It carried the plague slime of Naxxramas within its body, injecting the living ooze into the bodies of its foe. The recipient of this foul injection would usually flee to his allies, bringing them down with him.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,18,0, 'Gluth, the foul plague-dog of Naxxramas, was said to have an appetitie so voracious that even the living were not enough to satisfy his hunger. Feugen was said to feed him an army of Zombies daily, recycling the remains of undead too weak to use in combat.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,19,0, 'Thaddius, built from the flesh of women and children, it is said that their souls are fused together - eternally bound within that foul prison of flesh.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,20,0, 'Anub''Rekhan, one of the finest Spider Lords of Azjol''Nerub, was brought under the control of the Scourge when he and his former commander, Anub''arak, were finally defeated by the Lich King many years ago. It is said that he was the most loyal of Anub''arak''s commanders.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,21,0, 'The Grand Widow Faerlina, a botanist in life, breeder and caretaker of arachnids in death, she oversees the spider wing, developing the most potent of poisons for the Lich King.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,22,0, 'Maexxna, born deep within the mountains of Northrend many ages ago, she was captured within the dread citadel Naxxramas, where she gives birth to her brood, feeding them the corpses of all who dare venture too deeply into Naxxramas.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,23,0, 'Behold, Noth, the Plaguebringer. Responsible for the creation of the process that distills the souls of the living and places them within the cold cage of undeath, Noth was observed to be refining this process even now.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,24,0, 'Observe, Heigan the Unclean. The mastermind behind the plague cauldrons that turned the wilderness of Azeroth into the Plaguelands.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,25,0, 'It is said that Heigan has rigged the very walls and floors of Naxxramas itself with a vast array of traps, which he can trigger at will.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer'),
(27784,26,0, 'Loatheb. The hideous result of fusing the living plague of the plaguelands with the bog beasts of Azeroth, Loatheb is said to control the power of healing itself.',12,7,100,0,0,0, 'Commander Eligor Dawnbringer');
-- 7th Legion Sentinel SAI
SET @ENTRY := 27162;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `creature_addon` WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id`=@ENTRY) AND `emote`=376;
DELETE FROM `creature_template_addon` WHERE `entry`=@ENTRY;
INSERT INTO `creature_template_addon` (`entry`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@ENTRY,0,258,376, '');
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,11,18950,0,0,0,0,0,1,0,0,0,0,0,0,0,"7th Legion Sentinel - On Spawn - Cast Invisibility and Stealth Detection"),
(@ENTRY,0,1,0,0,0,100,0,0,0,2300,3900,11,15547,64,0,0,0,0,2,0,0,0,0,0,0,0,"7th Legion Sentinel - In Combat CMC - Cast Shoot"),
(@ENTRY,0,2,0,0,0,100,0,9000,14000,17000,22000,11,49481,1,0,0,0,0,5,0,0,0,0,0,0,0,"7th Legion Sentinel - In Combat - Cast Glaive Throw");
-- Remove some duplicate spawns
DELETE FROM `creature` WHERE `guid` IN (131126, 131132, 131133, 131251, 131253, 131182, 131183, 107389, 107814, 131184, 131249);
DELETE FROM `creature_addon` WHERE `guid` IN (131126, 131132, 131133, 131251, 131253, 131182, 131183, 107389, 107814, 131184, 131249);
-- remove random movement
UPDATE `creature` SET `spawndist`=0, `MovementType`=0 WHERE `guid`=133347;
UPDATE `creature` SET `id`=27776 WHERE `guid`=107609;
UPDATE `creature` SET `modelid`=0, `curhealth`=1 WHERE `id` IN (27766,27768,27773,27776,27779);
UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry` IN (27766,27768,27773,27776,27779);
UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry` BETWEEN 27766 AND 27782;
DELETE FROM `creature_template_addon` WHERE `entry` BETWEEN 27766 AND 27782;
INSERT INTO `creature_template_addon` (`entry`,`bytes1`,`bytes2`) VALUES
(27766,0,1),(27767,0,1),(27768,0,1),(27769,0,1),(27770,0,1),(27771,0,1),
(27772,0,1),(27773,0,1),(27774,0,1),(27775,0,1),(27776,0,1),(27777,0,1),
(27778,0,1),(27779,0,1),(27780,0,1),(27781,0,1),(27782,0,1);
-- Commander Eligor Dawnbringer and gang
UPDATE `creature` SET `position_x`=3798.05,`position_y`=-680.611,`position_z`=222.9825, `orientation`=6.038839 WHERE `guid`=133420;
UPDATE `creature` SET `orientation`=3.384053 WHERE `guid`=131157;
UPDATE `creature` SET `orientation`=3.649463 WHERE `guid`=131171;
UPDATE `creature` SET `orientation`=3.633209 WHERE `guid`=133210;
UPDATE `creature` SET `orientation`=1.793558 WHERE `guid`=131154;
UPDATE `creature` SET `orientation`=1.942263 WHERE `guid`=131155;
UPDATE `creature` SET `orientation`=2.368085 WHERE `guid`=131170;
UPDATE `creature` SET `orientation`=2.026036 WHERE `guid`=133225;
UPDATE `creature` SET `orientation`=3.397538 WHERE `guid`=133227;
UPDATE `creature` SET `orientation`=3.839286 WHERE `guid`=131172;
UPDATE `creature` SET `orientation`=2.225338 WHERE `guid`=131173;
-- Condition for spell targets
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=49519;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(13, 1, 49519, 0, 0, 31, 0, 3, 23033, 0, 0, 0, 0, '', 'Heroic Image Channel Targets Invisible Stalker (Floating)');
-- Pathing for Invisible Stalker (Floating) Entry: 23033
SET @NPC := 131250;
SET @PATH := @NPC * 10;
UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3804.403,`position_y`=-695.9564,`position_z`=224.0008 WHERE `guid`=@NPC;
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, '');
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
(@PATH,1,3804.403,-695.9564,224.0008,0,0,0,0,100,0),
(@PATH,2,3805.12,-693.7753,224.1427,0,0,0,0,100,0),
(@PATH,3,3807.3,-691.3777,224.4204,0,0,0,0,100,0),
(@PATH,4,3811.286,-692.7845,224.0623,0,0,0,0,100,0),
(@PATH,5,3813.058,-695.1207,224.999,0,0,0,0,100,0),
(@PATH,6,3813.632,-697.7827,224.9997,0,0,0,0,100,0),
(@PATH,7,3812.425,-700.1073,224.0008,0,0,0,0,100,0),
(@PATH,8,3809.649,-700.7341,224.0008,0,0,0,0,100,0),
(@PATH,9,3805.123,-698.4109,224.0008,0,0,0,0,100,0);
-- Pathing for Invisible Stalker (Floating) Entry: 23033
SET @NPC := 131252;
SET @PATH := @NPC * 10;
UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3804.225,`position_y`=-669.8109,`position_z`=224.8465 WHERE `guid`=@NPC;
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, '');
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
(@PATH,1,3804.225,-669.8109,224.8465,0,0,0,0,100,0),
(@PATH,2,3806.744,-669.3193,224.8465,0,0,0,0,100,0),
(@PATH,3,3809.637,-670.4093,224.8465,0,0,0,0,100,0),
(@PATH,4,3810.651,-674.6262,224.8465,0,0,0,0,100,0),
(@PATH,5,3808.057,-677.2673,224.8465,0,0,0,0,100,0),
(@PATH,6,3804.191,-676.4904,224.8465,0,0,0,0,100,0),
(@PATH,7,3802.311,-673.4647,224.8465,0,0,0,0,100,0);
-- Pathing for Invisible Stalker (Floating) Entry: 23033
SET @NPC := 133899;
SET @PATH := @NPC * 10;
UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3816.468,`position_y`=-672.7212,`position_z`=224.0009 WHERE `guid`=@NPC;
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, '');
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
(@PATH,1,3816.468,-672.7212,224.0009,0,0,0,0,100,0),
(@PATH,2,3819.056,-673.5551,222.9989,0,0,0,0,100,0),
(@PATH,3,3820.681,-676.2151,224.0009,0,0,0,0,100,0),
(@PATH,4,3819.998,-679.0777,224.0009,0,0,0,0,100,0),
(@PATH,5,3815.454,-680.2464,224.0009,0,0,0,0,100,0),
(@PATH,6,3813.004,-677.2374,224.0009,0,0,0,0,100,0),
(@PATH,7,3814.027,-673.7756,224.0009,0,0,0,0,100,0);
-- Pathing for Invisible Stalker (Floating) Entry: 23033
SET @NPC := 133894;
SET @PATH := @NPC * 10;
UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3805.747,`position_y`=-687.1393,`position_z`=224.1568 WHERE `guid`=@NPC;
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, '');
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
(@PATH,1,3805.747,-687.1393,224.1568,0,0,0,0,100,0),
(@PATH,2,3804.891,-684.0416,224.1568,0,0,0,0,100,0),
(@PATH,3,3807.519,-679.4173,224.1568,0,0,0,0,100,0),
(@PATH,4,3811.978,-681.2499,224.1568,0,0,0,0,100,0),
(@PATH,5,3811.325,-686.3337,224.1568,0,0,0,0,100,0),
(@PATH,6,3808.847,-687.7697,224.1568,0,0,0,0,100,0);
-- Pathing for Invisible Stalker (Floating) Entry: 23033
SET @NPC := 133900;
SET @PATH := @NPC * 10;
UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3794.607,`position_y`=-693.5101,`position_z`=224.7538 WHERE `guid`=@NPC;
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, '');
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
(@PATH,1,3794.607,-693.5101,224.7538,0,0,0,0,100,0),
(@PATH,2,3794.899,-689.9442,224.7538,0,0,0,0,100,0),
(@PATH,3,3798.899,-687.9035,224.7538,0,0,0,0,100,0),
(@PATH,4,3802.577,-690.2576,224.7538,0,0,0,0,100,0),
(@PATH,5,3801.8,-694.2828,224.7538,0,0,0,0,100,0),
(@PATH,6,3797.656,-695.3698,224.7538,0,0,0,0,100,0);

View File

@@ -37,6 +37,331 @@ EndContentData */
#include "CombatAI.h"
#include "Player.h"
/*#####
# npc_commander_eligor_dawnbringer
#####*/
enum CommanderEligorDawnbringer
{
MODEL_IMAGE_OF_KELTHUZAD = 24787, // Image of Kel'Thuzad
MODEL_IMAGE_OF_SAPPHIRON = 24788, // Image of Sapphiron
MODEL_IMAGE_OF_RAZUVIOUS = 24799, // Image of Razuvious
MODEL_IMAGE_OF_GOTHIK = 24804, // Image of Gothik
MODEL_IMAGE_OF_THANE = 24802, // Image of Thane Korth'azz
MODEL_IMAGE_OF_BLAUMEUX = 24794, // Image of Lady Blaumeux
MODEL_IMAGE_OF_ZELIEK = 24800, // Image of Sir Zeliek
MODEL_IMAGE_OF_PATCHWERK = 24798, // Image of Patchwerk
MODEL_IMAGE_OF_GROBBULUS = 24792, // Image of Grobbulus
MODEL_IMAGE_OF_THADDIUS = 24801, // Image of Thaddius
MODEL_IMAGE_OF_GLUTH = 24803, // Image of Gluth
MODEL_IMAGE_OF_ANUBREKHAN = 24789, // Image of Anub'rekhan
MODEL_IMAGE_OF_FAERLINA = 24790, // Image of Faerlina
MODEL_IMAGE_OF_MAEXXNA = 24796, // Image of Maexxna
MODEL_IMAGE_OF_NOTH = 24797, // Image of Noth
MODEL_IMAGE_OF_HEIGAN = 24793, // Image of Heigan
MODEL_IMAGE_OF_LOATHEB = 24795, // Image of Loatheb
NPC_IMAGE_OF_KELTHUZAD = 27766, // Image of Kel'Thuzad
NPC_IMAGE_OF_SAPPHIRON = 27767, // Image of Sapphiron
NPC_IMAGE_OF_RAZUVIOUS = 27768, // Image of Razuvious
NPC_IMAGE_OF_GOTHIK = 27769, // Image of Gothik
NPC_IMAGE_OF_THANE = 27770, // Image of Thane Korth'azz
NPC_IMAGE_OF_BLAUMEUX = 27771, // Image of Lady Blaumeux
NPC_IMAGE_OF_ZELIEK = 27772, // Image of Sir Zeliek
NPC_IMAGE_OF_PATCHWERK = 27773, // Image of Patchwerk
NPC_IMAGE_OF_GROBBULUS = 27774, // Image of Grobbulus
NPC_IMAGE_OF_THADDIUS = 27775, // Image of Thaddius
NPC_IMAGE_OF_GLUTH = 27782, // Image of Gluth
NPC_IMAGE_OF_ANUBREKHAN = 27776, // Image of Anub'rekhan
NPC_IMAGE_OF_FAERLINA = 27777, // Image of Faerlina
NPC_IMAGE_OF_MAEXXNA = 27778, // Image of Maexxna
NPC_IMAGE_OF_NOTH = 27779, // Image of Noth
NPC_IMAGE_OF_HEIGAN = 27780, // Image of Heigan
NPC_IMAGE_OF_LOATHEB = 27781, // Image of Loatheb
NPC_INFANTRYMAN = 27160, // Add in case I randomize the spawning
NPC_SENTINAL = 27162,
NPC_BATTLE_MAGE = 27164,
// Five platforms to choose from
SAY_PINNACLE = 0,
SAY_DEATH_KNIGHT_WING = 1,
SAY_ABOMINATION_WING = 2,
SAY_SPIDER_WING = 3,
SAY_PLAGUE_WING = 4,
// Used in all talks
SAY_TALK_COMPLETE = 5,
// Pinnacle of Naxxramas
SAY_SAPPHIRON = 6,
SAY_KELTHUZAD_1 = 7,
SAY_KELTHUZAD_2 = 8,
SAY_KELTHUZAD_3 = 9,
// Death knight wing of Naxxramas
SAY_RAZUVIOUS = 10,
SAY_GOTHIK = 11,
SAY_DEATH_KNIGHTS_1 = 12,
SAY_DEATH_KNIGHTS_2 = 13,
SAY_DEATH_KNIGHTS_3 = 14,
SAY_DEATH_KNIGHTS_4 = 15,
// Blighted abomination wing of Naxxramas
SAY_PATCHWERK = 16,
SAY_GROBBULUS = 17,
SAY_GLUTH = 18,
SAY_THADDIUS = 19,
// Accursed spider wing of Naxxramas
SAY_ANUBREKHAN = 20,
SAY_FAERLINA = 21,
SAY_MAEXXNA = 22,
// Dread plague wing of Naxxramas
SAY_NOTH = 23,
SAY_HEIGAN_1 = 24,
SAY_HEIGAN_2 = 25,
SAY_LOATHEB = 26,
SPELL_HEROIC_IMAGE_CHANNEL = 49519,
EVENT_START_RANDOM = 1,
EVENT_MOVE_TO_POINT = 2,
EVENT_TALK_COMPLETE = 3,
EVENT_GET_TARGETS = 4,
EVENT_KELTHUZAD_2 = 5,
EVENT_KELTHUZAD_3 = 6,
EVENT_DEATH_KNIGHTS_2 = 7,
EVENT_DEATH_KNIGHTS_3 = 8,
EVENT_DEATH_KNIGHTS_4 = 9,
EVENT_HEIGAN_2 = 10
};
uint32 const AudienceMobs[3] = { NPC_INFANTRYMAN, NPC_SENTINAL, NPC_BATTLE_MAGE };
Position const PosTalkLocations[6] =
{
{ 3805.453f, -682.9075f, 222.2917f, 2.793398f }, // Pinnacle of Naxxramas
{ 3807.508f, -691.0882f, 221.9688f, 2.094395f }, // Death knight wing of Naxxramas
{ 3797.228f, -690.3555f, 222.5019f, 1.134464f }, // Blighted abomination wing of Naxxramas
{ 3804.038f, -672.3098f, 222.5019f, 4.578917f }, // Accursed spider wing of Naxxramas
{ 3815.097f, -680.2596f, 221.9777f, 2.86234f }, // Dread plague wing of Naxxramas
{ 3798.05f, -680.611f, 222.9825f, 6.038839f }, // Home
};
class npc_commander_eligor_dawnbringer : public CreatureScript
{
public: npc_commander_eligor_dawnbringer() : CreatureScript("npc_commander_eligor_dawnbringer") {}
struct npc_commander_eligor_dawnbringerAI : public ScriptedAI
{
npc_commander_eligor_dawnbringerAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
talkWing = 0;
memset(audienceList, 0, sizeof(audienceList));
memset(imageList, 0, sizeof(imageList));
_events.ScheduleEvent(EVENT_GET_TARGETS, 5000);
_events.ScheduleEvent(EVENT_START_RANDOM, 20000);
}
void MovementInform(uint32 type, uint32 id) OVERRIDE
{
if (type == POINT_MOTION_TYPE)
{
if (id == 1)
{
me->SetFacingTo(PosTalkLocations[talkWing].m_orientation);
TurnAudience();
switch (talkWing)
{
case 0: // Pinnacle of Naxxramas
{
switch (urand (0, 1))
{
case 0: ChangeImage(NPC_IMAGE_OF_KELTHUZAD, MODEL_IMAGE_OF_KELTHUZAD, SAY_KELTHUZAD_1);
_events.ScheduleEvent(EVENT_KELTHUZAD_2, 8000); break;
case 1: ChangeImage(NPC_IMAGE_OF_SAPPHIRON, MODEL_IMAGE_OF_SAPPHIRON, SAY_SAPPHIRON); break;
}
}
break;
case 1: // Death knight wing of Naxxramas
{
switch (urand (0, 2))
{
case 0: ChangeImage(NPC_IMAGE_OF_RAZUVIOUS, MODEL_IMAGE_OF_RAZUVIOUS, SAY_RAZUVIOUS); break;
case 1: ChangeImage(NPC_IMAGE_OF_GOTHIK, MODEL_IMAGE_OF_GOTHIK, SAY_GOTHIK); break;
case 2: ChangeImage(NPC_IMAGE_OF_THANE, MODEL_IMAGE_OF_THANE, SAY_DEATH_KNIGHTS_1);
_events.ScheduleEvent(EVENT_DEATH_KNIGHTS_2, 10000); break;
}
}
break;
case 2: // Blighted abomination wing of Naxxramas
{
switch (urand (0, 3))
{
case 0: ChangeImage(NPC_IMAGE_OF_PATCHWERK, MODEL_IMAGE_OF_PATCHWERK, SAY_PATCHWERK); break;
case 1: ChangeImage(NPC_IMAGE_OF_GROBBULUS, MODEL_IMAGE_OF_GROBBULUS, SAY_GROBBULUS); break;
case 2: ChangeImage(NPC_IMAGE_OF_THADDIUS, MODEL_IMAGE_OF_THADDIUS, SAY_THADDIUS); break;
case 3: ChangeImage(NPC_IMAGE_OF_GLUTH, MODEL_IMAGE_OF_GLUTH, SAY_GLUTH); break;
}
}
break;
case 3: // Accursed spider wing of Naxxramas
{
switch (urand (0, 2))
{
case 0: ChangeImage(NPC_IMAGE_OF_ANUBREKHAN, MODEL_IMAGE_OF_ANUBREKHAN, SAY_ANUBREKHAN); break;
case 1: ChangeImage(NPC_IMAGE_OF_FAERLINA, MODEL_IMAGE_OF_FAERLINA, SAY_FAERLINA); break;
case 2: ChangeImage(NPC_IMAGE_OF_MAEXXNA, MODEL_IMAGE_OF_MAEXXNA, SAY_MAEXXNA); break;
}
}
break;
case 4: // Dread plague wing of Naxxramas
{
switch (urand (0, 2))
{
case 0: ChangeImage(NPC_IMAGE_OF_NOTH, MODEL_IMAGE_OF_NOTH, SAY_NOTH); break;
case 1: ChangeImage(NPC_IMAGE_OF_HEIGAN, MODEL_IMAGE_OF_HEIGAN, SAY_HEIGAN_1);
_events.ScheduleEvent(EVENT_HEIGAN_2, 8000); break;
case 2: ChangeImage(NPC_IMAGE_OF_LOATHEB, MODEL_IMAGE_OF_LOATHEB, SAY_LOATHEB); break;
}
}
break;
case 5: // Home
_events.ScheduleEvent(EVENT_START_RANDOM, 30000);
break;
}
}
}
}
void StoreTargets()
{
uint8 creaturecount;
creaturecount = 0;
for (uint8 ii = 0; ii < 3; ++ii)
{
std::list<Creature*> creatureList;
GetCreatureListWithEntryInGrid(creatureList, me, AudienceMobs[ii], 15.0f);
for (std::list<Creature*>::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr)
{
if (Creature* creatureList = *itr)
{
audienceList[creaturecount] = creatureList->GetGUID();
++creaturecount;
}
}
}
if (Creature* creature = me->FindNearestCreature(NPC_IMAGE_OF_KELTHUZAD, 20.0f, true))
imageList[0] = creature->GetGUID();
if (Creature* creature = me->FindNearestCreature(NPC_IMAGE_OF_RAZUVIOUS, 20.0f, true))
imageList[1] = creature->GetGUID();
if (Creature* creature = me->FindNearestCreature(NPC_IMAGE_OF_PATCHWERK, 20.0f, true))
imageList[2] = creature->GetGUID();
if (Creature* creature = me->FindNearestCreature(NPC_IMAGE_OF_ANUBREKHAN, 20.0f, true))
imageList[3] = creature->GetGUID();
if (Creature* creature = me->FindNearestCreature(NPC_IMAGE_OF_NOTH, 20.0f, true))
imageList[4] = creature->GetGUID();
}
void ChangeImage(uint32 entry, uint32 model, uint8 text)
{
if (Creature* creature = ObjectAccessor::GetCreature(*me, imageList[talkWing]))
{
Talk(text);
creature->SetEntry(entry);
creature->SetDisplayId(model);
creature->CastSpell(creature, SPELL_HEROIC_IMAGE_CHANNEL);
_events.ScheduleEvent(EVENT_TALK_COMPLETE, 40000);
}
}
void TurnAudience()
{
for (uint8 i = 0; i < 10; ++i)
{
if (Creature* creature = ObjectAccessor::GetCreature(*me, audienceList[i]))
creature->SetFacingToObject(me);
}
}
void UpdateAI(uint32 diff) OVERRIDE
{
_events.Update(diff);
while (uint32 eventId = _events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_START_RANDOM:
talkWing = urand (0, 4);
Talk(talkWing);
_events.ScheduleEvent(EVENT_MOVE_TO_POINT, 8000);
break;
case EVENT_MOVE_TO_POINT:
me->SetWalk(true);
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MovePoint(1, PosTalkLocations[talkWing].m_positionX, PosTalkLocations[talkWing].m_positionY, PosTalkLocations[talkWing].m_positionZ);
break;
case EVENT_TALK_COMPLETE:
talkWing = 5;
Talk(talkWing);
_events.ScheduleEvent(EVENT_MOVE_TO_POINT, 5000);
break;
case EVENT_GET_TARGETS:
StoreTargets();
break;
case EVENT_KELTHUZAD_2:
Talk(SAY_KELTHUZAD_2);
_events.ScheduleEvent(EVENT_KELTHUZAD_3, 8000);
break;
case EVENT_KELTHUZAD_3:
Talk(SAY_KELTHUZAD_3);
break;
case EVENT_DEATH_KNIGHTS_2:
Talk(SAY_DEATH_KNIGHTS_2);
if (Creature* creature = ObjectAccessor::GetCreature(*me, imageList[talkWing]))
{
creature->SetEntry(NPC_IMAGE_OF_BLAUMEUX);
creature->SetDisplayId(MODEL_IMAGE_OF_BLAUMEUX);
}
_events.ScheduleEvent(EVENT_DEATH_KNIGHTS_3, 10000);
break;
case EVENT_DEATH_KNIGHTS_3:
Talk(SAY_DEATH_KNIGHTS_3);
if (Creature* creature = ObjectAccessor::GetCreature(*me, imageList[talkWing]))
{
creature->SetEntry(NPC_IMAGE_OF_ZELIEK);
creature->SetDisplayId(MODEL_IMAGE_OF_ZELIEK);
}
_events.ScheduleEvent(EVENT_DEATH_KNIGHTS_4, 10000);
break;
case EVENT_DEATH_KNIGHTS_4:
Talk(SAY_DEATH_KNIGHTS_4);
break;
case EVENT_HEIGAN_2:
Talk(SAY_HEIGAN_2);
break;
default:
break;
}
}
DoMeleeAttackIfReady();
}
private:
EventMap _events;
uint64 audienceList[10];
uint64 imageList[5];
uint8 talkWing;
};
CreatureAI* GetAI(Creature* creature) const
{
return new npc_commander_eligor_dawnbringerAI(creature);
}
};
enum AlexstraszaWrGate
{
// Quest
@@ -405,9 +730,10 @@ class npc_torturer_lecraft : public CreatureScript
void AddSC_dragonblight()
{
new npc_alexstrasza_wr_gate;
new spell_q12096_q12092_dummy;
new spell_q12096_q12092_bark;
new npc_wyrmrest_defender;
new npc_torturer_lecraft;
new npc_commander_eligor_dawnbringer();
new npc_alexstrasza_wr_gate();
new spell_q12096_q12092_dummy();
new spell_q12096_q12092_bark();
new npc_wyrmrest_defender();
new npc_torturer_lecraft();
}