diff options
5 files changed, 210 insertions, 4 deletions
diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql index 3e914f259ad..1490b938889 100644 --- a/sql/scripts/world_scripts_full.sql +++ b/sql/scripts/world_scripts_full.sql @@ -833,6 +833,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_guardian_pavilion' WHERE `entry /* ICECROWN CITADEL */ UPDATE `instance_template` SET `script`='instance_icecrown_citadel' WHERE `map`=631; UPDATE `gameobject_template` SET `ScriptName`='icecrown_citadel_teleport' WHERE `entry` IN (202223,202235,202242,202243,202244,202245,202246); +UPDATE `creature_template` SET `ScriptName`='npc_highlord_tirion_fordring_lh' WHERE `entry`=37119; UPDATE `creature_template` SET `ScriptName`='boss_lord_marrowgar' WHERE `entry`=36612; UPDATE `creature_template` SET `ScriptName`='npc_coldflame' WHERE `entry`=36672; UPDATE `creature_template` SET `ScriptName`='npc_bone_spike' WHERE `entry` IN (36619,38711,38712); diff --git a/sql/updates/world/2011_03_11_0_world_sai.sql b/sql/updates/world/2011_03_11_0_world_sai.sql new file mode 100644 index 00000000000..0d7e13da7cf --- /dev/null +++ b/sql/updates/world/2011_03_11_0_world_sai.sql @@ -0,0 +1,27 @@ +DELETE FROM `creature` WHERE `guid`=201309; -- duplicate spawn +UPDATE `creature_template` SET `InhabitType`=7 WHERE `entry` IN (37181,37183); + +DELETE FROM `creature_text` WHERE `entry` IN (37119,37181,37183); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(37119,0,0, 'This is our final stand. What happens here will echo through the ages. Regardless of outcome, they will know that we fought with honor. That we fought for the freedom and safety of our people!',1,0,0,22,0,16653, 'Highlord Tirion Fordring - SAY_TIRION_INTRO_1'), +(37119,1,0, 'Remember, heroes, fear is your greatest enemy in these befouled halls. Steel your heart and your soul will shine brighter than a thousand suns. The enemy will falter at the sight of you. They will fall as the light of righteousness envelops them!',1,0,0,22,0,16654, 'Highlord Tirion Fordring - SAY_TIRION_INTRO_2'), +(37119,2,0, 'Our march upon Icecrown Citadel begins now!',1,0,0,22,0,16655, 'Highlord Tirion Fordring - SAY_TIRION_INTRO_3'), +(37119,3,0, 'ARTHAS! I swore that I would see you dead and the Scourge dismantled! I''m going to finish what I started at Light''s Hope!',1,0,0,22,0,16656, 'Highlord Tirion Fordring - SAY_TIRION_INTRO_4'), +(37181,0,0, 'You now stand upon the hallowed ground of the Scourge. The Light won''t protect you here, paladin. Nothing will protect you...',1,0,0,0,0,17230, 'The Lich King - SAY_LK_INTRO_1'), +(37181,1,0, 'You could have been my greatest champion, Fordring: A force of darkness that would wash over this world and deliver it into a new age of strife.',1,0,0,0,0,17231, 'The Lich King - SAY_LK_INTRO_2'), +(37181,2,0, 'But that honor is no longer yours. Soon,I will have a new champion.',1,0,0,0,0,17232, 'The Lich King - SAY_LK_INTRO_3'), +(37181,3,0, 'The breaking of this one has been taxing. The atrocities I have committed upon his soul. He has resisted for so long, but he will bow down before his king soon.',1,0,0,0,0,17233, 'The Lich King - SAY_LK_INTRO_4'), +(37181,4,0, 'In the end, you will all serve me.',1,0,0,0,0,17234, 'The Lich King - SAY_LK_INTRO_5'), +(37183,0,0, 'NEVER! I... I will never... serve... you...',1,0,0,0,0,17078, 'Highlord Bolvar Fordragon - SAY_BOLVAR_INTRO_1'); + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=37011; -- The Damned +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (-200966,-201066,37011); +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 +(-201066,0,0,0,6,0,100,1,0,0,0,0,11,70961,3,0,0,0,0,1,0,0,0,0,0,0,0, 'The Damned - Cast Shattered Bones on death'), +(-201066,0,1,0,2,0,100,0,5,30,15000,20000,75,70960,0,0,0,0,0,1,0,0,0,0,0,0,0, 'The Damned - Cast Bone Flurry at 5-30%'), +(-201066,0,2,0,6,0,100,1,0,0,0,0,45,1,1,0,0,0,0,10,201466,0,0,0,0,0,0, 'The Damned - Set data for Highlord Tirion Fordring'), +(-200966,0,0,0,6,0,100,1,0,0,0,0,11,70961,3,0,0,0,0,1,0,0,0,0,0,0,0, 'The Damned - Cast Shattered Bones on death'), +(-200966,0,1,0,2,0,100,0,5,30,15000,20000,75,70960,0,0,0,0,0,1,0,0,0,0,0,0,0, 'The Damned - Cast Bone Flurry at 5-30%'), +(-200966,0,2,0,6,0,100,1,0,0,0,0,45,1,1,0,0,0,0,10,201466,0,0,0,0,0,0, 'The Damned - Set data for Highlord Tirion Fordring'), +(37011,0,0,0,6,0,100,1,0,0,0,0,11,70961,3,0,0,0,0,1,0,0,0,0,0,0,0, 'The Damned - Cast Shattered Bones on death'), +(37011,0,1,0,2,0,100,0,5,30,15000,20000,75,70960,0,0,0,0,0,1,0,0,0,0,0,0,0, 'The Damned - Cast Bone Flurry at 5-30%'); diff --git a/sql/updates/world/2011_03_11_0_world_scriptname.sql b/sql/updates/world/2011_03_11_0_world_scriptname.sql new file mode 100644 index 00000000000..74f3d0f04ba --- /dev/null +++ b/sql/updates/world/2011_03_11_0_world_scriptname.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_highlord_tirion_fordring_lh' WHERE `entry`=37119; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp index 4ef35aaa1d8..a896f63d856 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp @@ -31,6 +31,22 @@ enum Texts { + // Highlord Tirion Fordring (at Light's Hammer) + SAY_TIRION_INTRO_1 = 0, + SAY_TIRION_INTRO_2 = 1, + SAY_TIRION_INTRO_3 = 2, + SAY_TIRION_INTRO_4 = 3, + + // The Lich King (at Light's Hammer) + SAY_LK_INTRO_1 = 0, + SAY_LK_INTRO_2 = 1, + SAY_LK_INTRO_3 = 2, + SAY_LK_INTRO_4 = 3, + SAY_LK_INTRO_5 = 4, + + // Highlord Bolvar Fordragon (at Light's Hammer) + SAY_BOLVAR_INTRO_1 = 0, + // Rotting Frost Giant EMOTE_DEATH_PLAGUE_WARNING = 0, }; @@ -55,13 +71,170 @@ enum Spells enum Events { + // Highlord Tirion Fordring (at Light's Hammer) + // The Lich King (at Light's Hammer) + // Highlord Bolvar Fordragon (at Light's Hammer) + EVENT_TIRION_INTRO_2 = 1, // EMOTE + EVENT_TIRION_INTRO_3 = 2, + EVENT_TIRION_INTRO_4 = 3, // EMOTE + EVENT_TIRION_INTRO_5 = 4, + EVENT_LK_INTRO_1 = 5, // TIRION EMOTE + EVENT_TIRION_INTRO_6 = 6, + EVENT_LK_INTRO_2 = 7, + EVENT_LK_INTRO_3 = 8, + EVENT_LK_INTRO_4 = 9, + EVENT_BOLVAR_INTRO_1 = 10, + EVENT_LK_INTRO_5 = 11, + // Rotting Frost Giant - EVENT_DEATH_PLAGUE = 1, - EVENT_STOMP = 2, - EVENT_ARCTIC_BREATH = 3, + EVENT_DEATH_PLAGUE = 12, + EVENT_STOMP = 13, + EVENT_ARCTIC_BREATH = 14, // Frost Freeze Trap - EVENT_ACTIVATE_TRAP = 4, + EVENT_ACTIVATE_TRAP = 15, +}; + +enum DataTypesICC +{ + DATA_DAMNED_KILLS = 1, +}; + +// at Light's Hammer +class npc_highlord_tirion_fordring_lh : public CreatureScript +{ + public: + npc_highlord_tirion_fordring_lh() : CreatureScript("npc_highlord_tirion_fordring_lh") { } + + struct npc_highlord_tirion_fordringAI : public ScriptedAI + { + npc_highlord_tirion_fordringAI(Creature* creature) : ScriptedAI(creature) + { + } + + void Reset() + { + events.Reset(); + _theLichKing = 0; + _bolvarFordragon = 0; + _damnedKills = 0; + } + + // IMPORTANT NOTE: This is triggered from per-GUID scripts + // of The Damned SAI + void SetData(uint32 type, uint32 data) + { + if (type == DATA_DAMNED_KILLS && data == 1) + { + if (++_damnedKills == 2) + { + if (Creature* theLichKing = me->FindNearestCreature(NPC_THE_LICH_KING_LH, 150.0f)) + { + if (Creature* bolvarFordragon = me->FindNearestCreature(NPC_HIGHLORD_BOLVAR_FORDRAGON_LH, 150.0f)) + { + me->setActive(true); + _theLichKing = theLichKing->GetGUID(); + theLichKing->setActive(true); + _bolvarFordragon = bolvarFordragon->GetGUID(); + bolvarFordragon->setActive(true); + } + } + + if (!_bolvarFordragon || !_theLichKing) + return; + + Talk(SAY_TIRION_INTRO_1); + events.ScheduleEvent(EVENT_TIRION_INTRO_2, 4000); + events.ScheduleEvent(EVENT_TIRION_INTRO_3, 14000); + events.ScheduleEvent(EVENT_TIRION_INTRO_4, 18000); + events.ScheduleEvent(EVENT_TIRION_INTRO_5, 31000); + events.ScheduleEvent(EVENT_LK_INTRO_1, 35000); + events.ScheduleEvent(EVENT_TIRION_INTRO_6, 51000); + events.ScheduleEvent(EVENT_LK_INTRO_2, 58000); + events.ScheduleEvent(EVENT_LK_INTRO_3, 74000); + events.ScheduleEvent(EVENT_LK_INTRO_4, 86000); + events.ScheduleEvent(EVENT_BOLVAR_INTRO_1, 100000); + events.ScheduleEvent(EVENT_LK_INTRO_5, 108000); + } + } + } + + void UpdateAI(uint32 const diff) + { + if (_damnedKills != 2) + return; + + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_TIRION_INTRO_2: + me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION); + break; + case EVENT_TIRION_INTRO_3: + Talk(SAY_TIRION_INTRO_2); + break; + case EVENT_TIRION_INTRO_4: + me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION); + break; + case EVENT_TIRION_INTRO_5: + Talk(SAY_TIRION_INTRO_3); + break; + case EVENT_LK_INTRO_1: + me->HandleEmoteCommand(EMOTE_ONESHOT_POINT_NOSHEATHE); + if (Creature* theLichKing = ObjectAccessor::GetCreature(*me, _theLichKing)) + theLichKing->AI()->Talk(SAY_LK_INTRO_1); + break; + case EVENT_TIRION_INTRO_6: + Talk(SAY_TIRION_INTRO_4); + break; + case EVENT_LK_INTRO_2: + if (Creature* theLichKing = ObjectAccessor::GetCreature(*me, _theLichKing)) + theLichKing->AI()->Talk(SAY_LK_INTRO_2); + break; + case EVENT_LK_INTRO_3: + if (Creature* theLichKing = ObjectAccessor::GetCreature(*me, _theLichKing)) + theLichKing->AI()->Talk(SAY_LK_INTRO_3); + break; + case EVENT_LK_INTRO_4: + if (Creature* theLichKing = ObjectAccessor::GetCreature(*me, _theLichKing)) + theLichKing->AI()->Talk(SAY_LK_INTRO_4); + break; + case EVENT_BOLVAR_INTRO_1: + if (Creature* bolvarFordragon = ObjectAccessor::GetCreature(*me, _bolvarFordragon)) + { + bolvarFordragon->AI()->Talk(SAY_BOLVAR_INTRO_1); + bolvarFordragon->setActive(false); + } + break; + case EVENT_LK_INTRO_5: + if (Creature* theLichKing = ObjectAccessor::GetCreature(*me, _theLichKing)) + { + theLichKing->AI()->Talk(SAY_LK_INTRO_5); + theLichKing->setActive(false); + me->setActive(false); + _damnedKills = 3; + } + break; + default: + break; + } + } + } + + private: + EventMap events; + uint64 _theLichKing; + uint64 _bolvarFordragon; + uint16 _damnedKills; + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_highlord_tirion_fordringAI(creature); + } }; class npc_rotting_frost_giant : public CreatureScript @@ -367,6 +540,7 @@ class at_icc_shutdown_traps : public AreaTriggerScript void AddSC_icecrown_citadel() { + new npc_highlord_tirion_fordring_lh(); new npc_rotting_frost_giant(); new npc_frost_freeze_trap(); new npc_alchemist_adrianna(); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h index 46266551b69..f9c88f3c885 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h @@ -80,6 +80,9 @@ enum DataTypes enum CreaturesIds { // At Light's Hammer + NPC_HIGHLORD_TIRION_FORDRING_LH = 37119, + NPC_THE_LICH_KING_LH = 37181, + NPC_HIGHLORD_BOLVAR_FORDRAGON_LH = 37183, NPC_KOR_KRON_GENERAL = 37189, NPC_ALLIANCE_COMMANDER = 37190, NPC_TORTUNOK = 37992, // Druid Armor H |