From c86230208f1ca797cc2f350fbc5f8e090816fa95 Mon Sep 17 00:00:00 2001 From: Gacko Date: Sat, 5 Jan 2013 18:03:11 +0100 Subject: Script: Novos rewrite --- .../2013_01_04_02_world_novos_the_summoner.sql | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 sql/updates/world/2013_01_04_02_world_novos_the_summoner.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_01_04_02_world_novos_the_summoner.sql b/sql/updates/world/2013_01_04_02_world_novos_the_summoner.sql new file mode 100644 index 00000000000..49f8b21e3a7 --- /dev/null +++ b/sql/updates/world/2013_01_04_02_world_novos_the_summoner.sql @@ -0,0 +1,63 @@ +-- Summon minions +DELETE FROM `spell_script_names` WHERE `spell_id`=59910; +INSERT INTO `spell_script_names`(`spell_id`,`ScriptName`) VALUE +(59910,'spell_summon_minions'); + +-- Heroic spells +DELETE FROM `spelldifficulty_dbc` WHERE `id` IN (49198,49034,49037,50089,49668,51363) OR `spellid0` IN (49198,49034,49037,50089,49668,51363); +INSERT INTO `spelldifficulty_dbc`(`id`,`spellid0`,`spellid1`) VALUES +(49198,49198,59909), -- Arcance Blast +(49034,49034,59854), -- Blizzard +(49037,49037,59855), -- Frostbolt +(50089,50089,59856), -- Wrath of Misery +(49668,49668,59004), -- Flash of Darkness +(51363,51363,59016); -- Shadow Bolt + +-- Script assignment for summoners +UPDATE `creature_template` SET `ScriptName`='npc_crystal_channel_target',`AIName`='' WHERE `entry`=26712; + +-- Spawn summoner for Crystal Handlers +SET @GUID = 40153; +DELETE FROM `creature` WHERE `guid`=@GUID; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `modelid`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `curhealth`) VALUE +(@GUID,26712,600,3,17188,-341.31,-724.4,28.57,3.78,3600,8982); + +-- Check instance script for achievement Oh Novos +DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=7361; +INSERT INTO `achievement_criteria_data`(`criteria_id`,`type`,`ScriptName`) VALUE +(7361,11,'achievement_oh_novos'); + +-- Waypoints for summoned adds +DELETE FROM `waypoint_data` WHERE `id` IN(2759700,2759800,2760000,2662700); +INSERT INTO `waypoint_data`(`id`,`point`,`position_x`,`position_y`,`position_z`) VALUES +(2759700,1,-379.473,-810.974,59.7612), +(2759700,2,-379.449,-791.535,44.1756), +(2759700,3,-379.448,-790.328,44.1756), +(2759700,4,-379.426,-772.338,28.5884), +(2759700,5,-379.415,-763.518,28.5884), +(2760000,1,-376.571,-810.681,59.6673), +(2760000,2,-375.627,-791.874,44.1756), +(2760000,3,-375.629,-790.273,44.1434), +(2760000,4,-375.402,-771.145,28.5895), +(2760000,5,-375.337,-765.027,28.5895), +(2759800,1,-382.303,-810.815,59.7628), +(2759800,2,-382.324,-791.595,44.1756), +(2759800,3,-382.326,-790.331,44.1746), +(2759800,4,-383.037,-770.382,28.5884), +(2759800,5,-383.140,-765.399,28.5884), +(2662700,1,-346.977,-733.319,28.5838), +(2662700,2,-363.009,-765.202,28.5907), +(2662700,3,-378.269,-765.701,28.5893); + +-- SAI for Crystal Handlers and Risen Shadowcasters +UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry` IN (26627,27600); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (26627,27600) AND `source_type`=0; +INSERT INTO `smart_scripts`(`entryorguid`,`event_type`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`target_type`,`comment`) VALUES +(26627,0,1000,1000,5000,5000,11,49668,2,'Crystal Handler - In fight - After 1s then every 5s - Cast Flash of Darkness - On victim'), +(27600,0,1000,1000,5000,5000,11,51363,2,'Risen Shadowcaster - In fight - After 1s then every 5s - Cast Shadow Bolt - On victim'); + +-- Conditions for beam spell +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=52106; +INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`Comment`) VALUES +(13,1,52106,31,0,3,26712,0,'Beam Channel target has to be Crystal Channel Target'), +(13,1,52106,35,1,0, 18,1,'Beam Channel target must not be self'); -- cgit v1.2.3 From 289ae9a8105770c253b7f40709efe49784ac246f Mon Sep 17 00:00:00 2001 From: Malcrom Date: Sat, 5 Jan 2013 20:18:19 -0330 Subject: DB/waypoints: Update Harrison Jones waypoints. --- sql/updates/world/2013_01_05_00_world_waypoints.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 sql/updates/world/2013_01_05_00_world_waypoints.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_01_05_00_world_waypoints.sql b/sql/updates/world/2013_01_05_00_world_waypoints.sql new file mode 100644 index 00000000000..4a2d273c552 --- /dev/null +++ b/sql/updates/world/2013_01_05_00_world_waypoints.sql @@ -0,0 +1,10 @@ +-- Pathing for Harrison Jones Entry: 24358 +SET @NPC := 86177; +SET @PATH := @NPC * 10; +DELETE FROM `waypoint_data` WHERE `id`IN (@PATH,@PATH+1,@PATH+2); +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,131.8243,1644.853,42.0216,0,0,0,100,0), +(@PATH+1,1,121.897,1639.106,42.19081,0,0,0,100,0), +(@PATH+1,2,120.8522,1637.931,42.37172,0,0,0,100,0), +(@PATH+1,3,120.7898,1609.063,43.49005,0,0,0,100,0), +(@PATH+2,1,120.6967,1603.713,43.4503,0,0,0,100,0); -- cgit v1.2.3 From f9892f9a302482622edfa5083eaea2984be02868 Mon Sep 17 00:00:00 2001 From: Malcrom Date: Sun, 6 Jan 2013 11:52:40 -0330 Subject: Core/scripting: Add scriptname to creature_template for Harrison Jones --- sql/updates/world/2013_01_06_00_world_creature_template.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/2013_01_06_00_world_creature_template.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_01_06_00_world_creature_template.sql b/sql/updates/world/2013_01_06_00_world_creature_template.sql new file mode 100644 index 00000000000..023dc88c870 --- /dev/null +++ b/sql/updates/world/2013_01_06_00_world_creature_template.sql @@ -0,0 +1,4 @@ +-- Add cpp script to Harrison Jones Entry: 24358 +UPDATE `creature_template` SET `AIName`= '', `ScriptName`= 'npc_harrison_jones' WHERE `entry`=24358; +-- Remove cpp script from Strange Gong +UPDATE `gameobject_template` SET `AIName`= '', `ScriptName`= '' WHERE `entry`=187359; -- cgit v1.2.3 From 8361931b37b08aae221870db5374979d8e5d7f51 Mon Sep 17 00:00:00 2001 From: Malcrom Date: Sun, 6 Jan 2013 12:04:02 -0330 Subject: Core/Scripting: Move Kirtonos pathing to db looks smoother. --- .../world/2013_01_06_01_world_waypoints.sql | 18 ++++++++ .../Scholomance/boss_kirtonos_the_herald.cpp | 51 +++++----------------- 2 files changed, 30 insertions(+), 39 deletions(-) create mode 100644 sql/updates/world/2013_01_06_01_world_waypoints.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_01_06_01_world_waypoints.sql b/sql/updates/world/2013_01_06_01_world_waypoints.sql new file mode 100644 index 00000000000..a460d33b086 --- /dev/null +++ b/sql/updates/world/2013_01_06_01_world_waypoints.sql @@ -0,0 +1,18 @@ +-- Pathing for Kirtonos the Herald Entry: 10506 +SET @PATH := 105061; +DELETE FROM `waypoint_data` WHERE `id`IN (@PATH,@PATH+1,@PATH+2); +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,316.7087,71.26834,104.5843,0,0,0,100,0), +(@PATH,2,321.1605,72.80973,104.6676,0,0,0,100,0), +(@PATH,3,332.3713,77.98991,105.8621,0,0,0,100,0), +(@PATH,4,333.3254,86.60159,106.6399,0,0,0,100,0), +(@PATH,5,334.1263,101.6836,106.8343,0,0,0,100,0), +(@PATH,6,331.0458,114.5935,106.3621,0,0,0,100,0), +(@PATH,7,329.5439,126.7019,106.1399,0,0,0,100,0), +(@PATH,8,335.2471,136.546,105.7232,0,0,0,100,0), +(@PATH,9,343.21,139.9459,107.6399,0,0,0,100,0), +(@PATH,10,364.3288,140.9012,109.9454,0,0,0,100,0), +(@PATH,11,362.676,115.6384,110.3065,0,0,0,100,0), +(@PATH,12,341.7896,91.9439,107.1676,0,0,0,100,0), +(@PATH,13,313.4945,93.45945,104.0565,0,0,0,100,0), +(@PATH,14,306.3839,93.61675,104.0565,0,0,0,100,0); diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp index 4488f270741..15c7a10a125 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp @@ -33,9 +33,7 @@ enum Spells SPELL_WING_FLAP = 12882, SPELL_PIERCE_ARMOR = 6016, SPELL_DISARM = 8379, - SPELL_KIRTONOS_TRANSFORM = 16467, - SPELL_SHADOW_BOLT = 17228, SPELL_CURSE_OF_TONGUES = 12889, SPELL_DOMINATE_MIND = 14515 @@ -59,33 +57,11 @@ enum Events EVENT_KIRTONOS_TRANSFORM = 14 }; -enum Points -{ - MAX_KIRTONOS_WAYPOINTS_INTRO = 14, - POINT_KIRTONOS_LAND = 14 -}; - enum Misc { - WEAPON_KIRTONOS_STAFF = 11365 -}; - -Position const kirtonosIntroWaypoint[MAX_KIRTONOS_WAYPOINTS_INTRO] = -{ - {316.7087f, 71.26834f, 104.5843f, 0.0f}, - {321.1605f, 72.80973f, 104.6676f, 0.0f}, - {332.3713f, 77.98991f, 105.8621f, 0.0f}, - {333.3254f, 86.60159f, 106.6399f, 0.0f}, - {334.1263f, 101.6836f, 106.8343f, 0.0f}, - {331.0458f, 114.5935f, 106.3621f, 0.0f}, - {329.5439f, 126.7019f, 106.1399f, 0.0f}, - {335.2471f, 136.5460f, 105.7232f, 0.0f}, - {343.2100f, 139.9459f, 107.6399f, 0.0f}, - {364.3288f, 140.9012f, 109.9454f, 0.0f}, - {362.6760f, 115.6384f, 110.3065f, 0.0f}, - {341.7896f, 91.94390f, 107.1676f, 0.0f}, - {313.4945f, 93.45945f, 104.0565f, 0.0f}, - {306.3839f, 93.61675f, 104.0565f, 0.0f}, + WEAPON_KIRTONOS_STAFF = 11365, + POINT_KIRTONOS_LAND = 13, + KIRTONOS_PATH = 105061 }; class boss_kirtonos_the_herald : public CreatureScript @@ -158,12 +134,13 @@ class boss_kirtonos_the_herald : public CreatureScript BossAI::JustSummoned(summon); } - void MovementInform(uint32 movementType, uint32 pointId) + void MovementInform(uint32 type, uint32 id) { - if (movementType != POINT_MOTION_TYPE) - return; - - _currentPoint = pointId + 1; + if (type == WAYPOINT_MOTION_TYPE && id == POINT_KIRTONOS_LAND) + { + _introTimer = 1500; + _introEvent = INTRO_2; + } } void UpdateAI(uint32 const diff) @@ -175,13 +152,8 @@ class boss_kirtonos_the_herald : public CreatureScript switch (_introEvent) { case INTRO_1: - if (_currentPoint < POINT_KIRTONOS_LAND) - me->GetMotionMaster()->MovePoint(_currentPoint, kirtonosIntroWaypoint[_currentPoint]); - else - { - _introTimer = 1000; - _introEvent = INTRO_2; - } + me->GetMotionMaster()->MovePath(KIRTONOS_PATH,false); + _introEvent = 0; break; case INTRO_2: me->SetWalk(true); @@ -199,6 +171,7 @@ class boss_kirtonos_the_herald : public CreatureScript case INTRO_4: if (GameObject* brazier = me->GetMap()->GetGameObject(instance->GetData64(GO_BRAZIER_OF_THE_HERALD))) brazier->SetGoState(GO_STATE_READY); + me->SetWalk(true); me->SetDisableGravity(false); DoCast(me, SPELL_KIRTONOS_TRANSFORM); _introTimer = 1000; -- cgit v1.2.3 From 5ee23ad3b0539b31c2e4bb4962b98f9654d7a25d Mon Sep 17 00:00:00 2001 From: Malcrom Date: Sun, 6 Jan 2013 12:21:04 -0330 Subject: DB/Misc: Some fixes required to complete Gong scripting. --- sql/updates/world/2013_01_06_02_world_misc.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 sql/updates/world/2013_01_06_02_world_misc.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_01_06_02_world_misc.sql b/sql/updates/world/2013_01_06_02_world_misc.sql new file mode 100644 index 00000000000..8c24975754a --- /dev/null +++ b/sql/updates/world/2013_01_06_02_world_misc.sql @@ -0,0 +1,12 @@ +-- Small fix to pathing for Harrison Jones +UPDATE `waypoint_data` SET `position_y`=1642.853 WHERE `id`=861770 AND `point`=1; + +-- Text for Amani'shi Guardian from sniff +DELETE FROM `creature_text` WHERE `entry` IN (23597); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(23597,0,0, 'More intruders! Sound da alarm!',14,0,100,25,0,12104, 'Amani''shi Guardian - Gong Event Say'); + +-- Spell condition for Cosmetic - Spear Throw +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=43647; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13,1,43647,0,0,31,0,3,24358,0,0,0,0, '', 'Cosmetic - Spear Throw - Harrison Jones'); -- cgit v1.2.3 From 6f19129a4a65977da0c5eb122383dbeb3cb06835 Mon Sep 17 00:00:00 2001 From: Malcrom Date: Sun, 6 Jan 2013 13:16:08 -0330 Subject: DB/SAI: Some event flag fixes --- sql/updates/world/2013_01_06_03_world_sai.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sql/updates/world/2013_01_06_03_world_sai.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_01_06_03_world_sai.sql b/sql/updates/world/2013_01_06_03_world_sai.sql new file mode 100644 index 00000000000..1cc0962781b --- /dev/null +++ b/sql/updates/world/2013_01_06_03_world_sai.sql @@ -0,0 +1,3 @@ +-- Some SAI Event flag fixes +UPDATE `smart_scripts` SET `event_flags`=`event_flags` &~2 WHERE `entryorguid` IN (594,2529,3631,3632,3633,3655,11777,11778,11781,11782,11785,11786,12239,12240,12241,14284,14285,16354,16355,24819,25471,25472,25473,29186,29190,29199,29200,29204,29219,29454,29455,29468,32501); +UPDATE `smart_scripts` SET `event_flags`=`event_flags` &~4 WHERE `entryorguid` IN (32501); -- cgit v1.2.3 From 5fe399195f8f46ba1934ac69d6c8f6a2efac794c Mon Sep 17 00:00:00 2001 From: ZxBiohazardZx Date: Sun, 6 Jan 2013 23:36:53 +0100 Subject: DB/Cleanup: Remove duplicate aura definitions in creature_addon and creature_template addon --- sql/updates/world/2013_01_06_00_world_creature_addon.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 sql/updates/world/2013_01_06_00_world_creature_addon.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_01_06_00_world_creature_addon.sql b/sql/updates/world/2013_01_06_00_world_creature_addon.sql new file mode 100644 index 00000000000..e4412241dce --- /dev/null +++ b/sql/updates/world/2013_01_06_00_world_creature_addon.sql @@ -0,0 +1,10 @@ +-- Cleanup creature_addon and creature_template_addon +-- we had 83 duplicate aura definitions in those +-- Glacier Penguin (51 rows) +DELETE FROM `creature_addon` WHERE `guid` IN (134996,134997,134998,134999,135000,135001,135002,135004,135005,135006,135007,135008,135009,135010,135011,135012,135013,135014,135015,135016,135017,135018,135025,135026,135027,135028,135029,135030,135031,135032,135033,135034,135035,135036,135037,135038,135039,135040,135041,53884,53885,53886,53887,53888,53889,53890,53891,53892,54042,54043,54044); +-- Plagued Dragonflayer Tribesman (21 rows) +DELETE FROM `creature_addon` WHERE `guid` IN (97517,97518,97519,97520,97521,97522,97523,97524,97526,97527,97528,97529,97530,97531,97532,97534,97535,97537,97538,97539,97541); +DELETE FROM `creature_addon` WHERE `guid` IN ( +85036, -- Sir Marcus Barlowe +85038, -- Captain Joseph Holley +85053); -- Marshal Jacob Alerius -- cgit v1.2.3 From 832cd198ca757e2cd0d125fc8c6d7f2646d0c00a Mon Sep 17 00:00:00 2001 From: Malcrom Date: Sun, 6 Jan 2013 22:39:41 -0330 Subject: Core/scripting: More updates for gong event. Almost complete. --- sql/updates/world/2013_01_06_04_world_misc.sql | 34 ++++ .../EasternKingdoms/ZulAman/instance_zulaman.cpp | 33 ++-- .../scripts/EasternKingdoms/ZulAman/zulaman.cpp | 218 +++++++++++++++------ .../scripts/EasternKingdoms/ZulAman/zulaman.h | 1 - 4 files changed, 217 insertions(+), 69 deletions(-) create mode 100644 sql/updates/world/2013_01_06_04_world_misc.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_01_06_04_world_misc.sql b/sql/updates/world/2013_01_06_04_world_misc.sql new file mode 100644 index 00000000000..fb1e256fa1b --- /dev/null +++ b/sql/updates/world/2013_01_06_04_world_misc.sql @@ -0,0 +1,34 @@ +-- Spell condition for Cosmetic - Spear Throw +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=43647; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13,1,43647,0,0,31,0,3,24375,0,0,0,0, '', 'Cosmetic - Spear Throw - Harrison Jones'); + +-- Text for Harrison Jones from sniff +DELETE FROM `creature_text` WHERE `entry` IN (24358,24375); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(24358,0,0, 'Suit yourself. At least five of you must assist me if we''re to get inside. Follow me....',14,0,100,1,0,0, 'Harrison Jones - Gong Event Say 0'), +(24358,1,0, 'According to my calculations, if enough of us bang the gong at once the seal on these doors will break and we can enter.',14,0,100,1,0,0, 'Harrison Jones - Gong Event Say 1'), +(24375,0,0, 'I''ve researched this site extensively and I won''t allow any dim-witted treasure hunters to swoop in and steal what belongs in a museum. I''ll lead this charge...',14,0,100,0,0,0, 'Harrison Jones - Gong Event Say 2'), +(24375,1,0, 'In fact, it would be best if you just stay here. You''d only get in my way....',14,0,100,0,0,0, 'Harrison Jones - Gong Event Say 3'); + +-- Add spell script for banging the gong +DELETE FROM `spell_script_names` WHERE `spell_id`=45226; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(45226, 'spell_banging_the_gong'); + +-- Remove creature from db +DELETE FROM `creature` WHERE id=24358; +DELETE FROM `creature_addon` WHERE guid=86177; +UPDATE `creature_template` SET `equipment_id`=0 WHERE `entry`=24358; + +-- Pathing for Harrison Jones Entry: 24358 +SET @NPC := 86044; +SET @PATH := @NPC * 10; +DELETE FROM `waypoint_data` WHERE `id`IN (861770,861771,861772); +DELETE FROM `waypoint_data` WHERE `id`IN (@PATH,@PATH+1,@PATH+2); +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,131.8243,1642.853,42.0216,0,0,0,100,0), +(@PATH+1,1,121.897,1639.106,42.19081,0,0,0,100,0), +(@PATH+1,2,120.8522,1637.931,42.37172,0,0,0,100,0), +(@PATH+1,3,120.7898,1609.063,43.49005,0,0,0,100,0), +(@PATH+2,1,120.6967,1603.713,43.4503,0,0,0,100,0); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp index 39b2fbce6b0..80f38dbd7cf 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp @@ -35,7 +35,6 @@ enum Misc RAND_VENDOR = 2, WORLDSTATE_SHOW_TIMER = 3104, WORLDSTATE_TIME_TO_SACRIFICE = 3106 - }; // Chests spawn at bear/eagle/dragonhawk/lynx bosses @@ -55,6 +54,8 @@ static SHostageInfo HostageInfo[] = {24024, 186667, 413, 1117, 6.32f, 3.1f} // lynx }; +Position const HarrisonJonesLoc = {120.687f, 1674.0f, 42.0217f, 1.59044f}; + class instance_zulaman : public InstanceMapScript { public: @@ -105,12 +106,15 @@ class instance_zulaman : public InstanceMapScript ZulJinDoorGUID = 0; QuestTimer = 0; - QuestMinute = 21; + QuestMinute = 0; BossKilled = 0; ChestLooted = 0; for (uint8 i = 0; i < RAND_VENDOR; ++i) RandVendor[i] = NOT_STARTED; + + m_auiEncounter[DATA_GONGEVENT] = NOT_STARTED; + instance->SummonCreature(NPC_HARRISON_JONES, HarrisonJonesLoc); } bool IsEncounterInProgress() const @@ -126,9 +130,6 @@ class instance_zulaman : public InstanceMapScript { switch (creature->GetEntry()) { - case NPC_HARRISON_JONES: - if (m_auiEncounter[DATA_GONGEVENT] == DONE) - creature->RemoveFromWorld(); case NPC_JANALAI: case NPC_ZULJIN: case NPC_HEXLORD: @@ -181,6 +182,9 @@ class instance_zulaman : public InstanceMapScript void CheckInstanceStatus() { + if (m_auiEncounter[DATA_GONGEVENT] == DONE) + HandleGameObject(MassiveGateGUID, true); + if (BossKilled >= DATA_HALAZZIEVENT) HandleGameObject(HexLordGateGUID, true); @@ -224,7 +228,10 @@ class instance_zulaman : public InstanceMapScript { case DATA_GONGEVENT: m_auiEncounter[DATA_GONGEVENT] = data; - HandleGameObject(MassiveGateGUID, data == DONE); + if (data == SPECIAL) + SaveToDB(); + if (data == DONE) + QuestMinute = 21; break; case DATA_NALORAKKEVENT: m_auiEncounter[DATA_NALORAKKEVENT] = data; @@ -301,13 +308,13 @@ class instance_zulaman : public InstanceMapScript { switch (type) { - case DATA_GONGEVENT: return m_auiEncounter[0]; - case DATA_NALORAKKEVENT: return m_auiEncounter[1]; - case DATA_AKILZONEVENT: return m_auiEncounter[2]; - case DATA_JANALAIEVENT: return m_auiEncounter[3]; - case DATA_HALAZZIEVENT: return m_auiEncounter[4]; - case DATA_HEXLORDEVENT: return m_auiEncounter[5]; - case DATA_ZULJINEVENT: return m_auiEncounter[6]; + case DATA_GONGEVENT: return m_auiEncounter[DATA_GONGEVENT]; + case DATA_NALORAKKEVENT: return m_auiEncounter[DATA_NALORAKKEVENT]; + case DATA_AKILZONEVENT: return m_auiEncounter[DATA_AKILZONEVENT]; + case DATA_JANALAIEVENT: return m_auiEncounter[DATA_JANALAIEVENT]; + case DATA_HALAZZIEVENT: return m_auiEncounter[DATA_HALAZZIEVENT]; + case DATA_HEXLORDEVENT: return m_auiEncounter[DATA_HEXLORDEVENT]; + case DATA_ZULJINEVENT: return m_auiEncounter[DATA_ZULJINEVENT]; case DATA_CHESTLOOTED: return ChestLooted; case TYPE_RAND_VENDOR_1: return RandVendor[0]; case TYPE_RAND_VENDOR_2: return RandVendor[1]; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index e8b6d7b6349..6962e599279 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -207,14 +207,15 @@ enum Says { SAY_HARRISON_0 = 0, SAY_HARRISON_1 = 1, - SAY_HARRISON_2 = 2, - SAY_HARRISON_3 = 3 + SAY_HARRISON_2 = 0, + SAY_HARRISON_3 = 1 }; enum Spells { SPELL_BANGING_THE_GONG = 45225, - SPELL_STEALTH = 34189 + SPELL_STEALTH = 34189, + SPELL_COSMETIC_SPEAR_THROW = 43647 }; enum Events @@ -228,21 +229,40 @@ enum Events GONG_EVENT_7 = 7, GONG_EVENT_8 = 8, GONG_EVENT_9 = 9, - GONG_EVENT_10 = 10 + GONG_EVENT_10 = 10, + GONG_EVENT_11 = 11, + GONG_EVENT_12 = 12 }; -enum Entrys +enum Waypoints { - NPC_HARRISON_JONES_2 = 24375 + HARRISON_MOVE_1 = 860440, + HARRISON_MOVE_2 = 860441, + HARRISON_MOVE_3 = 860442 }; -enum Waypoints +enum DisplayIds +{ + MODEL_HARRISON_JONES_0 = 22340, + MODEL_HARRISON_JONES_1 = 22354, + MODEL_HARRISON_JONES_2 = 22347 +}; + +enum EntryIds +{ + NPC_HARRISON_JONES_1 = 24375, + NPC_HARRISON_JONES_2 = 24365, + NPC_AMANISHI_GUARDIAN = 23597, +}; + +enum Weapons { - HARRISON_MOVE_1 = 861770, - HARRISON_MOVE_2 = 861771, - HARRISON_MOVE_3 = 861772 + WEAPON_MACE = 5301, + WEAPON_SPEAR = 13631 }; +Position const AmanishiGuardianLoc = {120.687f, 1674.0f, 42.0217f, 1.59044f}; + class npc_harrison_jones : public CreatureScript { public: @@ -263,11 +283,13 @@ class npc_harrison_jones : public CreatureScript uint8 _gongEvent; uint32 _gongTimer; + uint64 uiTargetGUID; void Reset() { _gongEvent = 0; _gongTimer = 0; + uiTargetGUID = 0; } void EnterCombat(Unit* /*who*/) {} @@ -279,12 +301,29 @@ class npc_harrison_jones : public CreatureScript player->CLOSE_GOSSIP_MENU(); me->SetInFront(player); me->SendMovementFlagUpdate(true); + me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + Talk(SAY_HARRISON_0); instance->SetData(DATA_GONGEVENT, IN_PROGRESS); _gongEvent = GONG_EVENT_1; - _gongTimer = 1; + _gongTimer = 4000; } } + void SpellHit(Unit*, const SpellInfo* spell) + { + if (spell->Id == SPELL_COSMETIC_SPEAR_THROW) + { + me->RemoveAllAuras(); + me->SetEntry(NPC_HARRISON_JONES_2); + me->SetDisplayId(MODEL_HARRISON_JONES_2); + me->SetTarget(0); + me->SetByteValue(UNIT_FIELD_BYTES_1,0,UNIT_STAND_STATE_DEAD); + me->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); + if (instance) + instance->SetData(DATA_GONGEVENT, DONE); + } + } + void UpdateAI(uint32 const diff) { if (_gongEvent) @@ -294,80 +333,120 @@ class npc_harrison_jones : public CreatureScript switch (_gongEvent) { case GONG_EVENT_1: - Talk(SAY_HARRISON_0); - me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - _gongTimer = 4000; - _gongEvent = GONG_EVENT_2; - break; - case GONG_EVENT_2: me->GetMotionMaster()->MovePath(HARRISON_MOVE_1,false); _gongTimer = 12000; - _gongEvent = GONG_EVENT_3; + _gongEvent = GONG_EVENT_2; break; - case GONG_EVENT_3: + case GONG_EVENT_2: me->SetFacingTo(6.235659f); Talk(SAY_HARRISON_1); DoCast(me, SPELL_BANGING_THE_GONG); + me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(WEAPON_MACE)); me->SetSheath(SHEATH_STATE_MELEE); _gongTimer = 4000; - _gongEvent = GONG_EVENT_4; + _gongEvent = GONG_EVENT_3; break; - case GONG_EVENT_4: + case GONG_EVENT_3: if (GameObject* gong = me->GetMap()->GetGameObject(instance->GetData64(GO_STRANGE_GONG))) gong->RemoveFlag(GAMEOBJECT_FLAGS,GO_FLAG_NOT_SELECTABLE); - _gongTimer = 120000; - _gongEvent = GONG_EVENT_5; + _gongTimer = 105000; + _gongEvent = GONG_EVENT_4; break; - case GONG_EVENT_5: + case GONG_EVENT_4: + me->RemoveAura(SPELL_BANGING_THE_GONG); if (GameObject* gong = me->GetMap()->GetGameObject(instance->GetData64(GO_STRANGE_GONG))) gong->SetFlag(GAMEOBJECT_FLAGS,GO_FLAG_NOT_SELECTABLE); + + // trigger or gong will need to be scripted to set SPECIAL if enough players click gong. + // This is temp workaround. if (instance) - instance->SetData(DATA_GONGEVENT, DONE); // This is temp + instance->SetData(DATA_GONGEVENT, SPECIAL); // to be removed. - if (instance->GetData(DATA_GONGEVENT) == DONE) + if (instance->GetData(DATA_GONGEVENT) == SPECIAL) { - // Save all players to instance + // Players are Now Saved to instance at SPECIAL (Player should be notified?) me->GetMotionMaster()->MovePath(HARRISON_MOVE_2,false); _gongTimer = 5000; - _gongEvent = 6; + _gongEvent = 5; } else { - _gongTimer = 0; // Add reset at end - _gongEvent = 0; // Add reset at end + _gongTimer = 1000; + _gongEvent = 10; } break; + case GONG_EVENT_5: + me->SetEntry(NPC_HARRISON_JONES_1); + me->SetDisplayId(MODEL_HARRISON_JONES_1); + Talk(SAY_HARRISON_2); + _gongTimer = 14000; + _gongEvent = 6; + break; case GONG_EVENT_6: - me->SetEntry(NPC_HARRISON_JONES_2); - Talk(SAY_HARRISON_2); - _gongTimer = 14000; - _gongEvent = 7; + me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING); + Talk(SAY_HARRISON_3); + _gongTimer = 7000; + _gongEvent = 7; break; case GONG_EVENT_7: - me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING); - Talk(SAY_HARRISON_2); - _gongTimer = 7000; - _gongEvent = 8; - break; + if (!uiTargetGUID) + { + std::list targetList; + GetCreatureListWithEntryInGrid(targetList, me, NPC_AMANISHI_GUARDIAN, 26.0f); + if (!targetList.empty()) + { + for (std::list::const_iterator itr = targetList.begin(); itr != targetList.end(); ++itr) + { + if (Creature* ptarget = *itr) + { + if (ptarget->GetPositionX() > 120) + { + ptarget->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(WEAPON_SPEAR)); + //ptarget-> setdata for sai (I don't know how to do yet and answers are hard to get) + } + } + } + } + } + + if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_MASSIVE_GATE))) + gate->SetGoState(GO_STATE_ACTIVE); + _gongTimer = 1000; + _gongEvent = 8; case GONG_EVENT_8: - // entry 23597 guid 86194 UNIT_VIRTUAL_ITEM_SLOT_ID: 13631 - if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_MASSIVE_GATE))) - gate->SetGoState(GO_STATE_ACTIVE); - _gongTimer = 1000; - _gongEvent = 9; + DoCast(me, SPELL_STEALTH); + me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(0)); + me->GetMotionMaster()->MovePath(HARRISON_MOVE_3,false); + me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); + _gongTimer = 100; + _gongEvent = 9; case GONG_EVENT_9: - DoCast(me, SPELL_STEALTH); - me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(0)); - me->GetMotionMaster()->MovePath(HARRISON_MOVE_3,false); - me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); - _gongTimer = 1000; - _gongEvent = 10; + // If player in 10.0f range + // Send setdata to SAI for previous target + // SAI BELOW + // move 23597, guid 86194 to be deleted + // path 138.2242 Y: 1586.994 Z: 43.5488 + // path 131.8407 Y: 1590.247 Z: 43.61384 + // Reach end of path turnto 2.024582 cast Spell ID: 43647 on self hits 24365 update UNIT_VIRTUAL_ITEM_SLOT_ID: 33979 + // wait 2 sec say text 0 + // Set below after complete above + _gongTimer = 0; + _gongEvent = 0; + break; case GONG_EVENT_10: - // move 23597 guid 86194 - // path 138.2242 Y: 1586.994 Z: 43.5488 - // path 131.8407 Y: 1590.247 Z: 43.61384 - // Reach end of path turnto 2.024582 cast Spell ID: 43647 on self hits 24358 UNIT_VIRTUAL_ITEM_SLOT_ID: 33979 - // wait 2 sec say text 0 + me->GetMotionMaster()->MovePoint(0, 120.687f, 1674.0f, 42.0217f); + _gongTimer = 12000; + _gongEvent = 11; + break; + case GONG_EVENT_11: + me->SetFacingTo(1.59044f); + _gongTimer = 6000; + _gongEvent = 12; + break; + case GONG_EVENT_12: + me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + if (instance) + instance->SetData(DATA_GONGEVENT, NOT_STARTED); _gongTimer = 0; _gongEvent = 0; break; @@ -385,10 +464,39 @@ class npc_harrison_jones : public CreatureScript } }; +class spell_banging_the_gong : public SpellScriptLoader +{ + public: + spell_banging_the_gong() : SpellScriptLoader("spell_banging_the_gong") { } + + class spell_banging_the_gong_SpellScript : public SpellScript + { + PrepareSpellScript(spell_banging_the_gong_SpellScript); + + void Activate(SpellEffIndex index) + { + PreventHitDefaultEffect(index); + + GetHitGObj()->SendCustomAnim(0); + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_banging_the_gong_SpellScript::Activate, EFFECT_1, SPELL_EFFECT_ACTIVATE_OBJECT); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_banging_the_gong_SpellScript(); + } +}; + void AddSC_zulaman() { new npc_forest_frog(); new npc_zulaman_hostage(); new npc_harrison_jones(); + new spell_banging_the_gong(); } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h index 5b5e6faef83..c3386f8c996 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h @@ -51,7 +51,6 @@ enum GameobjectIds GO_MASSIVE_GATE = 186728, GO_DOOR_AKILZON = 186858, GO_DOOR_ZULJIN = 186859, - GO_HARKORS_SATCHEL = 187021, GO_TANZARS_TRUNK = 186648, GO_ASHLIS_BAG = 186672, -- cgit v1.2.3