diff options
10 files changed, 317 insertions, 4 deletions
diff --git a/sql/updates/world/2013_01_14_01_world_game_event.sql b/sql/updates/world/2013_01_14_01_world_game_event.sql new file mode 100644 index 00000000000..d4d30d54928 --- /dev/null +++ b/sql/updates/world/2013_01_14_01_world_game_event.sql @@ -0,0 +1,12 @@ +UPDATE `game_event` SET `start_time`='2013-01-27 00:01:00',`length`=20160 WHERE `eventEntry`=7; -- Lunar Festival +UPDATE `game_event` SET `start_time`='2013-02-10 00:01:00' WHERE `eventEntry`=8; -- Love is in the Air +UPDATE `game_event` SET `start_time`='2013-03-31 00:01:00' WHERE `eventEntry`=9; -- Noblegarden +UPDATE `game_event` SET `start_time`='2013-04-28 00:01:00' WHERE `eventEntry`=10; -- Children's Week +UPDATE `game_event` SET `start_time`='2013-06-21 00:01:00' WHERE `eventEntry`=1; -- Midsummer Fire Festival +UPDATE `game_event` SET `start_time`='2013-09-13 00:01:00' WHERE `eventEntry`=11; -- Harvest Festival +UPDATE `game_event` SET `start_time`='2013-09-19 00:01:00' WHERE `eventEntry`=50; -- Pirates' Day +UPDATE `game_event` SET `start_time`='2013-09-20 00:01:00' WHERE `eventEntry`=24; -- Brewfest +UPDATE `game_event` SET `start_time`='2013-10-18 01:00:00' WHERE `eventEntry`=11; -- Hallow's End +UPDATE `game_event` SET `start_time`='2013-11-01 01:00:00' WHERE `eventEntry`=51; -- Day of the Dead +UPDATE `game_event` SET `start_time`='2013-11-24 01:00:00' WHERE `eventEntry`=26; -- Pilgrim's Bounty +UPDATE `game_event` SET `start_time`='2013-12-15 06:00:00' WHERE `eventEntry`=2; -- Winter Veil diff --git a/sql/updates/world/2013_01_14_02_world_ip2nationcountries.sql b/sql/updates/world/2013_01_14_02_world_ip2nationcountries.sql new file mode 100644 index 00000000000..fdb96fd895e --- /dev/null +++ b/sql/updates/world/2013_01_14_02_world_ip2nationcountries.sql @@ -0,0 +1,2 @@ +RENAME TABLE ip2nationcountries TO ip2nationcountries_temp, + ip2nationcountries_temp TO ip2nationCountries; diff --git a/sql/updates/world/2013_01_14_03_world_lefty_loosy_righty_tighty.sql b/sql/updates/world/2013_01_14_03_world_lefty_loosy_righty_tighty.sql new file mode 100644 index 00000000000..5d322ac2dd9 --- /dev/null +++ b/sql/updates/world/2013_01_14_03_world_lefty_loosy_righty_tighty.sql @@ -0,0 +1,55 @@ +-- Valves +UPDATE `gameobject` SET `spawntimesecs`=300,`animprogress`=100,`state`=1 WHERE `guid`=151895; +UPDATE `gameobject` SET `spawntimesecs`=300,`animprogress`=100 WHERE `guid`=221; + +-- Max Blasto: Spawn point +UPDATE `event_scripts` SET `x`=4029.0,`y`=4883.078,`z`=-12.71482,`o`=1.310609 WHERE `id`=17207 AND `command`=10 AND `datalong`=25832; +-- Max Blasto: SAI +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=25832; +DELETE FROM `smart_scripts` WHERE `entryorguid`=25832 AND `source_type`=0; +INSERT INTO `smart_scripts`(`entryorguid`,`id`,`event_type`,`action_type`,`action_param1`,`target_type`,`target_param1`,`comment`) VALUE +(25832,0,54,49,0,21,20,'Max Blasto - Just summoned - Start attack'), +(25832,1,4,1,0,0,0,'Max Blasto - On aggro - Say'); +-- Max Blasto: Texts +DELETE FROM `creature_text` WHERE `entry`=25832; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`probability`,`comment`) VALUE +(25832,0,0,'I am the herald of Mechazod. You will be decursed!',12,100,'Max Blasto - Just summoned'); -- Proofed from video: https://www.youtube.com/watch?v=-hi6a70U3gM + +-- The Grinder: Spawn point +UPDATE `event_scripts` SET `x`=3781.2,`y`=4832.596,`z`=-13.04141,`o`=5.141372 WHERE `id`=17208 AND `command`=10 AND `datalong`=25833; +-- The Grinder: SAI +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=25833; +DELETE FROM `smart_scripts` WHERE `entryorguid`=25833 AND `source_type`=0; +INSERT INTO `smart_scripts`(`entryorguid`,`id`,`event_type`,`action_type`,`action_param1`,`target_type`,`target_param1`,`comment`) VALUE +(25833,0,54,49,0,21,20,'The Grinder - Just summoned - Start attack'), +(25833,1,4,1,0,0,0,'The Grinder - On aggro - Say'); +-- The Grinder: Texts +DELETE FROM `creature_text` WHERE `entry`=25833; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`probability`,`comment`) VALUE +(25833,0,0,'Your meddling is at an end. Mechazod will relieve your curse once I am done with you.',12,100,'The Grinder - Just summoned'); + +-- ED-210: Spawn point +UPDATE `event_scripts` SET `x`=4208.38,`y`=4807.071,`z`=-12.7529,`o`=5.809316 WHERE `id`=16909 AND `command`=10 AND `datalong`=25831; +-- ED-210: SAI +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=25831; +DELETE FROM `smart_scripts` WHERE `entryorguid`=25831 AND `source_type`=0; +INSERT INTO `smart_scripts`(`entryorguid`,`id`,`event_type`,`action_type`,`action_param1`,`target_type`,`target_param1`,`comment`) VALUE +(25831,0,54,49,0,21,20,'ED-210 - Just summoned - Start attack'), +(25831,1,4,1,0,0,0,'ED-210 - On aggro - Say'); +-- ED-210: Texts +DELETE FROM `creature_text` WHERE `entry`=25831; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`probability`,`comment`) VALUE +(25831,0,0,'ED-210 online!',12,100,'ED-210 - Just summoned'); + +-- Twonky: Spawn point +UPDATE `event_scripts` SET `x`=4118.113,`y`=5087.803,`z`=-1.433036,`o`=2.253069 WHERE `id`=16904 AND `command`=10 AND `datalong`=25830; +-- Twonky: SAI +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=25830; +DELETE FROM `smart_scripts` WHERE `entryorguid`=25830 AND `source_type`=0; +INSERT INTO `smart_scripts`(`entryorguid`,`id`,`event_type`,`action_type`,`action_param1`,`target_type`,`target_param1`,`comment`) VALUE +(25830,0,54,49,0,21,20,'Twonky - Just summoned - Start attack'), +(25830,1,4,1,0,0,0,'Twonky - On aggro - Say'); +-- Twonky: Texts +DELETE FROM `creature_text` WHERE `entry`=25830; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`probability`,`comment`) VALUE +(25830,0,0,'Twonky!',12,100,'Twonky - On aggro'); diff --git a/sql/updates/world/2013_01_15_00_world_creature.sql b/sql/updates/world/2013_01_15_00_world_creature.sql new file mode 100644 index 00000000000..e49918aa0b6 --- /dev/null +++ b/sql/updates/world/2013_01_15_00_world_creature.sql @@ -0,0 +1,12 @@ +SET @CGUID :=43501; +SET @ENTRY :=25233; -- Lunk-tusk + +UPDATE `creature_template` SET `unit_flags`=33536 WHERE `entry`=@ENTRY; + +DELETE FROM `creature` WHERE `id`=@ENTRY; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID, @ENTRY, 571, 1, 1, 1230.617, -3349.278, 203.7188, 3.385939, 120, 0, 0); + +DELETE FROM `creature_template_addon` WHERE `entry`=@ENTRY; +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(@ENTRY, 0, 0x1, 0x1, ''); diff --git a/sql/updates/world/2013_01_15_01_world_misc.sql b/sql/updates/world/2013_01_15_01_world_misc.sql new file mode 100644 index 00000000000..48238e5dacf --- /dev/null +++ b/sql/updates/world/2013_01_15_01_world_misc.sql @@ -0,0 +1,40 @@ +-- Vilebranch Speaker +UPDATE `creature_template` SET `AIName`= '', `ScriptName`= 'mob_vilebranch_speaker' WHERE `entry`=11391; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=11391; + +-- NPC talk text for Bloodlord Mandokir from sniff +DELETE FROM `creature_text` WHERE `entry`=11382 AND `groupid`=4; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(11382,4,0, '%s goes into a rage after seeing his raptor fall in battle!',16,0,100,0,0,0, 'Bloodlord Mandokir - Ohgan Dead'); + +-- Bloodlord Mandokir path from sniff +SET @PATH := 492861; +DELETE FROM `creature_template_addon` WHERE `entry`=11382; +INSERT INTO `creature_template_addon` (`entry`,`path_id`,`bytes2`,`auras`) VALUES (11382,@PATH,1, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-12312.66,-1889.255,131.5301,0,1,0,100,0), +(@PATH,2,-12368.16,-1861.005,131.5301,0,1,0,100,0), +(@PATH,3,-12352.66,-1875.505,131.5301,0,1,0,100,0), +(@PATH,4,-12351.41,-1876.505,130.7801,0,1,0,100,0), +(@PATH,5,-12347.41,-1877.505,131.0301,0,1,0,100,0), +(@PATH,6,-12343.16,-1877.505,131.2801,0,1,0,100,0), +(@PATH,7,-12334.91,-1879.755,131.5301,0,1,0,100,0), +(@PATH,8,-12329.91,-1889.505,131.0301,0,1,0,100,0), +(@PATH,9,-12328.66,-1892.255,131.0301,0,1,0,100,0), +(@PATH,10,-12326.41,-1894.255,131.2801,0,1,0,100,0), +(@PATH,11,-12318.16,-1896.255,131.2801,0,1,0,100,0), +(@PATH,12,-12301.41,-1896.255,131.5301,0,1,0,100,0), +(@PATH,13,-12293.16,-1899.005,131.7801,0,1,0,100,0), +(@PATH,14,-12292.16,-1899.005,131.7801,0,1,0,100,0), +(@PATH,15,-12291.16,-1899.005,131.7801,0,1,0,100,0), +(@PATH,16,-12289.41,-1900.505,131.7801,0,1,0,100,0), +(@PATH,17,-12287.41,-1902.505,131.7801,0,1,0,100,0), +(@PATH,18,-12285.41,-1904.755,131.7801,0,1,0,100,0), +(@PATH,19,-12280.66,-1906.755,131.7801,0,1,0,100,0), +(@PATH,20,-12276.41,-1907.755,131.7801,0,1,0,100,0), +(@PATH,21,-12275.41,-1908.755,131.7801,0,1,0,100,0), +(@PATH,22,-12272.41,-1917.255,131.7801,0,1,0,100,0), +(@PATH,23,-12268.16,-1921.255,131.5301,0,1,0,100,0), +(@PATH,24,-12259.91,-1919.255,131.0301,0,1,0,100,0), +(@PATH,25,-12255.66,-1919.255,130.5301,0,1,0,100,0); diff --git a/sql/updates/world/2013_01_15_02_world_game_event.sql b/sql/updates/world/2013_01_15_02_world_game_event.sql new file mode 100644 index 00000000000..3300c0667ce --- /dev/null +++ b/sql/updates/world/2013_01_15_02_world_game_event.sql @@ -0,0 +1 @@ +UPDATE `game_event` SET `start_time`='2013-10-18 01:00:00' WHERE `eventEntry`=12; -- Hallow's End diff --git a/sql/updates/world/2013_01_15_03_world_misc.sql b/sql/updates/world/2013_01_15_03_world_misc.sql new file mode 100644 index 00000000000..5de9e0ab13a --- /dev/null +++ b/sql/updates/world/2013_01_15_03_world_misc.sql @@ -0,0 +1,88 @@ +-- Reconnaissance Flight (12671) + +SET @QUEST := 12671; +SET @PLANE := 28710; -- Vic's Flying Machine +SET @PILOT := 28646; -- Pilot Vic +SET @VIC := 28746; -- Pilot Vic +SET @SPELL_PLANE := 52256; -- Vic's Flying Machine Validate (must have condition to target player) +SET @SPELL_ROCKETS := 52254; -- Air-to-Air Rockets +SET @NPC_SCREECHER := 28170; -- Frosthowl Screecher +SET @TEMP_LANDING := 300215; -- TEMP Landing Pad + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@VIC; +UPDATE `creature_template` SET `spell1`='52254',`spell2`='52226',`ScriptName`='npc_vics_flying_machine' WHERE `entry`=@PLANE; + +DELETE FROM `creature_template_addon` WHERE `entry`=@PLANE; +INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(@PLANE,0,0,0,1,0,'52211 52260'); -- Flight -- Vic's Flying Machine Aggro Periodic + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@VIC,@PLANE) 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 +(@VIC,0,0,0,19,0,100,0,@QUEST,0,0,0,11,@SPELL_PLANE,0,0,0,0,0,7,0,0,0,0,0,0,0,"On quest accept - Cast spell - Invoker"); + +DELETE FROM `waypoint_data` WHERE `id`=@PLANE; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PLANE,1,5494.87,4747.031,-187.8783,0,0,0,0,100,0), +(@PLANE,2,5485.906,4740.681,-184.5172,0,0,0,0,100,0), +(@PLANE,3,5472.882,4732.441,-172.1562,0,0,0,0,100,0), +(@PLANE,4,5460.913,4712.542,-157.8784,0,0,0,0,100,0), +(@PLANE,5,5452.147,4673.518,-137.8906,0,0,0,0,100,0), +(@PLANE,6,5449.777,4630.711,-126.6684,0,0,0,0,100,0), +(@PLANE,7,5507.432,4506.089,-126.6684,0,0,0,0,100,0), +(@PLANE,8,5586.811,4465.319,-126.6684,0,0,0,0,100,0), +(@PLANE,9,5676.111,4437.874,-126.6684,0,0,0,0,100,0), +(@PLANE,10,5756.449,4391.051,-91.25155,0,0,0,0,100,0), +(@PLANE,11,5817.163,4269.269,-91.25155,0,0,0,0,100,0), +(@PLANE,12,5856.145,4202.824,-68.29334,0,0,0,0,100,0), +(@PLANE,13,5921.523,4105.534,-68.29334,0,0,0,0,100,0), +(@PLANE,14,5995.021,4029.883,-13.97897,0,0,0,0,100,0), +(@PLANE,15,6118.298,3883.733,94.11866,0,0,0,0,100,0), +(@PLANE,16,6132.932,3750.75,176.5123,0,0,0,0,100,0), +(@PLANE,17,6165.863,3748.196,198.9567,0,0,0,0,100,0), +(@PLANE,18,6208.277,3782.189,196.8455,0,0,0,0,100,0), +(@PLANE,19,6227.615,3836.871,191.6234,0,0,0,0,100,0), +(@PLANE,20,6218.483,3885.17,191.6234,0,0,0,0,100,0), +(@PLANE,21,6197.045,3890.053,191.6234,0,0,0,0,100,0), +(@PLANE,22,6168.752,3864.161,191.6234,0,0,0,0,100,0), +(@PLANE,23,6204.037,3807.239,191.6234,0,0,0,0,100,0), +(@PLANE,24,6232.975,3820.852,191.6234,0,0,0,0,100,0), +(@PLANE,25,6219.879,3854.341,166.6234,0,0,0,0,100,0), +(@PLANE,26,6210.428,3855.185,154.4848,0,0,0,0,100,0); + +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=@PLANE; +INSERT INTO `npc_spellclick_spells` (`npc_entry`,`spell_id`,`cast_flags`,`user_type`) VALUES +(@PLANE,46598,1,1); + +DELETE FROM `vehicle_template_accessory` WHERE `entry`=@PLANE; +INSERT INTO `vehicle_template_accessory` (`entry`,`accessory_entry`,`seat_id`,`minion`,`description`,`summontype`,`summontimer`) VALUES +(@PLANE,@PILOT,0,1,'Pilot Vic',7,0); + +DELETE FROM `creature_text` WHERE `entry` IN (@PILOT,@PLANE); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@PILOT,0,0,'We''re off! Watch out for those vines!',12,0,100,0,0,0,'Pilot Vic to Vic''s Flying Machine'), +(@PILOT,1,0,'Looks like the Scourge have hit the area ahead pretty bad...',12,0,100,0,0,0,'Pilot Vic to Vic''s Flying Machine'), +(@PILOT,2,0,'You see that? She''s... huge!',12,0,100,0,0,0,'Pilot Vic to Vic''s Flying Machine'), +(@PILOT,3,0,'Here we go! Hold on tight -- there''s rough wind ahead!',12,0,100,0,0,0,'Pilot Vic to Vic''s Flying Machine'), +(@PILOT,4,0,'The glacier is seeping in from Icecrown... and undead everywhere! Wait ''til the professor gets a hold of this!',12,0,100,0,0,0,'Pilot Vic to Vic''s Flying Machine'), +(@PILOT,5,0,'They''re coming at us! Be quick with those rockets!',12,0,100,0,0,0,'Pilot Vic to Vic''s Flying Machine'), +(@PILOT,6,0,'Aggggh! I''m hit! You''re going to have to get us back! Quick, before the plane explodes!',12,0,100,0,0,0,'Pilot Vic to Vic''s Flying Machine'), +(@PLANE,0,0,'The engine''s blown! Fly Vic''s Flying Machine back to Lakeside Landing!',41,0,100,0,0,0,'Vic''s Flying Machine to Pilot Vic'); + +DELETE FROM `conditions` WHERE `SourceEntry`=@SPELL_ROCKETS AND `SourceTypeOrReferenceId`=13; +DELETE FROM `conditions` WHERE `SourceEntry`=52226 AND `SourceTypeOrReferenceId`=17; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,@SPELL_ROCKETS,0,0,31,0,3,28170,0,0,0,0,'','Air-to-Air Rockets can target Frosthowl Screecher'), +-- because vehicles ignore spell focus we add an extra condition to fill in for this +(17,0,52226,0,0,30,0,300215,10,0,0,0,0,'','Requires TEMP Landing Pad near to cast Land Flying Machine'); + +-- guessed position +DELETE FROM `gameobject` WHERE `id`=@TEMP_LANDING; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(3552,@TEMP_LANDING,571,1,1,5505.58,4748.35,-194.434,0,0,0,0,0,300,0,1); + +-- Frosthowl Screecher +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@NPC_SCREECHER; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@NPC_SCREECHER; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@NPC_SCREECHER; +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 +(@NPC_SCREECHER,0,0,0,0,0,100,0,3000,4000,3000,4000,11,52257,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Shadow Bolt'); diff --git a/sql/updates/world/2013_01_15_04_world_game_event.sql b/sql/updates/world/2013_01_15_04_world_game_event.sql new file mode 100644 index 00000000000..cfbd399e43d --- /dev/null +++ b/sql/updates/world/2013_01_15_04_world_game_event.sql @@ -0,0 +1 @@ +UPDATE `game_event` SET `start_time`='2013-09-13 00:01:00' WHERE `eventEntry`=11; -- Harvest Festival diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp index f3afc03e68a..7db2ae4707b 100644 --- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp +++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp @@ -1033,6 +1033,102 @@ public: } }; +/*###### +## Quest: Reconnaissance Flight (12671) +######*/ +enum ReconnaissanceFlight +{ + NPC_PLANE = 28710, // Vic's Flying Machine + NPC_PILOT = 28646, + + VIC_SAY_0 = 0, + VIC_SAY_1 = 1, + VIC_SAY_2 = 2, + VIC_SAY_3 = 3, + VIC_SAY_4 = 4, + VIC_SAY_5 = 5, + VIC_SAY_6 = 6, + PLANE_EMOTE = 0, + + AURA_ENGINE = 52255, // Engine on Fire + + SPELL_LAND = 52226, // Land Flying Machine + SPELL_CREDIT = 53328 // Land Flying Machine Credit +}; + +class npc_vics_flying_machine : public CreatureScript +{ +public: + npc_vics_flying_machine() : CreatureScript("npc_vics_flying_machine") { } + + struct npc_vics_flying_machineAI : public VehicleAI + { + npc_vics_flying_machineAI(Creature* creature) : VehicleAI(creature) {} + + void PassengerBoarded(Unit* passenger, int8 /*seatId*/, bool apply) + { + if (apply && passenger->GetTypeId() == TYPEID_PLAYER) + me->GetMotionMaster()->MovePath(NPC_PLANE, false); + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != WAYPOINT_MOTION_TYPE) + return; + + if (Creature* pilot = GetClosestCreatureWithEntry(me, NPC_PILOT, 10)) + switch (id) + { + case 5: + pilot->AI()->Talk(VIC_SAY_0); + break; + case 11: + pilot->AI()->Talk(VIC_SAY_1); + break; + case 12: + pilot->AI()->Talk(VIC_SAY_2); + break; + case 14: + pilot->AI()->Talk(VIC_SAY_3); + break; + case 15: + pilot->AI()->Talk(VIC_SAY_4); + break; + case 17: + pilot->AI()->Talk(VIC_SAY_5); + break; + case 21: + pilot->AI()->Talk(VIC_SAY_6); + break; + case 25: + me->AI()->Talk(PLANE_EMOTE); + me->AI()->DoCast(AURA_ENGINE); + break; + } + } + + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) + { + if (spell->Id == SPELL_LAND) + { + Unit* passenger = me->GetVehicleKit()->GetPassenger(1); // player should be on seat 1 + if (passenger && passenger->GetTypeId() == TYPEID_PLAYER) + { + passenger->CastSpell(passenger, SPELL_CREDIT, true); + passenger->ExitVehicle(); + } + } + } + + void UpdateAI(const uint32 /*diff*/) {} + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_vics_flying_machineAI(creature); + } +}; + void AddSC_sholazar_basin() { new npc_injured_rainspeaker_oracle(); @@ -1045,4 +1141,5 @@ void AddSC_sholazar_basin() new spell_q12620_the_lifewarden_wrath(); new spell_q12589_shoot_rjr(); new npc_haiphoon(); + new npc_vics_flying_machine(); } diff --git a/src/server/worldserver/RemoteAccess/RASocket.cpp b/src/server/worldserver/RemoteAccess/RASocket.cpp index 75c95d5ea98..95fdad9ad44 100644 --- a/src/server/worldserver/RemoteAccess/RASocket.cpp +++ b/src/server/worldserver/RemoteAccess/RASocket.cpp @@ -65,7 +65,13 @@ int RASocket::handle_close(ACE_HANDLE, ACE_Reactor_Mask) int RASocket::send(const std::string& line) { - return size_t(peer().send(line.c_str(), line.length())) == line.length() ? 0 : -1; +#ifdef MSG_NOSIGNAL + ssize_t n = peer().send(line.c_str(), line.length(), MSG_NOSIGNAL); +#else + ssize_t n = peer().send(line.c_str(), line.length()); +#endif // MSG_NOSIGNAL + + return n == line.length() ? 0 : -1; } int RASocket::recv_line(ACE_Message_Block& buffer) @@ -160,7 +166,7 @@ int RASocket::process_command(const std::string& command) break; } - if (size_t(peer().send(mb->rd_ptr(), mb->length())) != mb->length()) + if (send(std::string(mb->rd_ptr(), mb->length())) == -1) { mb->release(); return -1; @@ -356,8 +362,7 @@ int RASocket::svc(void) for (;;) { // show prompt - const char* tc_prompt = "TC> "; - if (size_t(peer().send(tc_prompt, strlen(tc_prompt))) != strlen(tc_prompt)) + if (send("TC> ") == -1) return -1; std::string line; |
