Merge branch 'master' into 4.3.4
Conflicts: src/server/game/Handlers/BattleGroundHandler.cpp
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
-- Remove all bgs from e1bee86ee6f5c3ab7b1da6d1b54c98c2851f11ec
|
||||
DELETE FROM `battleground_template` WHERE `id` = 6; -- all Bgs
|
||||
DELETE FROM `battleground_template` WHERE `id` = 6; -- all Bgs
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
-- Set chaining for Doomguard minion quests
|
||||
UPDATE `quest_template` SET `PrevQuestId`=7581 WHERE `Id`=7582; -- Complete The Prison's Bindings before The Prison's Casing
|
||||
UPDATE `quest_template` SET `PrevQuestId`=7582 WHERE `Id`=7583; -- Complete The Prison's Casing before Suppression
|
||||
@@ -0,0 +1,13 @@
|
||||
-- update quest linking for Egg Collection
|
||||
UPDATE `quest_template` SET `NextQuestId`=5522 WHERE `Id`=4735;
|
||||
-- --------------------------------------------------------------------------------------------------------------
|
||||
-- Test of Endurance (Gecko32)
|
||||
DELETE FROM `event_scripts` WHERE `id`=747 AND `command`=10 AND `datalong`=4100; -- Remove summon of Screeching Harpies
|
||||
UPDATE `event_scripts` SET `delay`=5 WHERE `id`=747 AND `command`=10 AND `datalong`=4490; -- Lower summon time of Grenka Bloodscreech from 40 sec to 5 sec
|
||||
-- --------------------------------------------------------------------------------------------------------------
|
||||
-- Tapper Swindlekeg (24711) fix Alliance faction exploitation (nelgano)
|
||||
UPDATE `creature_template` SET `unit_flags`=4864 WHERE `entry`=24711;
|
||||
-- --------------------------------------------------------------------------------------------------------------
|
||||
DELETE FROM `gameobject` WHERE `guid`=335;
|
||||
INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
|
||||
(335,1684,1,1,1,1524.929,-4371.182,17.94367,1.62046,0,0,0,1,300,100,1);
|
||||
@@ -0,0 +1,4 @@
|
||||
DELETE FROM `gameobject` WHERE `guid`IN (335,347);
|
||||
INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
|
||||
(335,324,1,1,1,-6314,507.647,7.651,0.496,0,0,0,0,2700,100,1),
|
||||
(347,1684,1,1,1,1524.929,-4371.182,17.94367,1.62046,0,0,0,1,300,100,1);
|
||||
@@ -0,0 +1,106 @@
|
||||
-- Fix Jormungar Tunneler
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=26467;
|
||||
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=26467;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=26467 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
|
||||
(26467,0,0,0,11,0,100,0,0,0,0,0,11,47677,0,0,0,0,0,1,0,0,0,0,0,0,0,'Jormungar Tunneler - On spawn - Spellcast Jormungar Tunnel Passive'),
|
||||
(26467,0,1,0,21,0,100,0,0,0,0,0,11,47677,0,0,0,0,0,1,0,0,0,0,0,0,0,'Jormungar Tunneler - On reached homeposition - Spellcast Jormungar Tunnel Passive'),
|
||||
(26467,0,2,0,1,0,100,0,3000,5000,15000,18000,11,51879,0,0,0,0,0,2,0,0,0,0,0,0,0,'Jormungar Tunneler - On update (IC) - Spellcast Corrode Flesh'),
|
||||
(26467,0,3,0,4,0,100,0,0,0,0,0,28,47677,0,0,0,0,0,1,0,0,0,0,0,0,0,'Jormungar Tunneler - On aggro - Remove Jormungar Tunnel Passive');
|
||||
-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Update Fjord Hawk: Lots of these had incorrect movement.
|
||||
DELETE FROM `creature_addon` WHERE `guid` IN (112058,112059,112088,112089,112091,112114,112115,112141,112142,112149,112150,112151,112152,112153,112154,112155,112156,112157,112158);
|
||||
INSERT INTO `creature_addon` (`guid`,`mount`,`bytes1`,`bytes2`,`auras`) VALUES
|
||||
(112058,0,1,1,''),(112059,0,1,1,''),(112088,0,1,1,''),
|
||||
(112089,0,1,1,''),(112091,0,1,1,''),(112114,0,1,1,''),
|
||||
(112115,0,1,1,''),(112141,0,1,1,''),(112142,0,1,1,''),
|
||||
(112149,0,1,1,''),(112150,0,1,1,''),(112151,0,1,1,''),
|
||||
(112152,0,1,1,''),(112153,0,1,1,''),(112154,0,1,1,''),
|
||||
(112155,0,1,1,''),(112156,0,1,1,''),(112157,0,1,1,''),(112158,0,1,1,'');
|
||||
UPDATE `creature` SET `spawndist`=0, `MovementType`=0 WHERE `guid` IN (112058,112059,112088,112089,112091,112114,112115,112141,112142,112149,112150,112151,112152,112153,112154,112155,112156,112157,112158);
|
||||
-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- SAI for Lashers
|
||||
UPDATE `creature_addon` SET `bytes1`=0 WHERE `guid` BETWEEN 88228 AND 88237;
|
||||
UPDATE `creature_addon` SET `bytes1`=0 WHERE `guid` BETWEEN 131438 AND 131457;
|
||||
UPDATE `creature_addon` SET `auras`='' WHERE `guid`=131452;
|
||||
UPDATE `creature_addon` SET `bytes1`=0 WHERE `guid` IN (106897,106898,106899,106900,106902,106903,106909,106910,106911,106912,106913,106914,106915,106916,106917,106918);
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`IN(27254,30845,34300);
|
||||
DELETE FROM `creature_ai_scripts` WHERE `creature_id`IN(27254,30845,34300);
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (27254,30845,34300) 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
|
||||
-- Emerald Lasher
|
||||
(27254,0,0,2,11,0,100,0,0,0,0,0,90,9,0,0,0,0,0,1,0,0,0,0,0,0,0,'Emerald Lasher - On spawn - Set unitfield_bytes1 9 (submerged)'),
|
||||
(27254,0,1,2,21,0,100,0,0,0,0,0,90,9,0,0,0,0,0,1,0,0,0,0,0,0,0,'Emerald Lasher - On reached homeposition - Set unitfield_bytes1 9 (submerged)'),
|
||||
(27254,0,2,0,61,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Emerald Lasher - Linked with event 0 or 1 - Disable combat movement'),
|
||||
(27254,0,3,0,4,0,100,0,0,0,0,0,11,37752,0,0,0,0,0,1,0,0,0,0,0,0,0,'Emerald Lasher - On aggro - Spellcast Stand'),
|
||||
(27254,0,4,0,0,0,100,0,1500,1500,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Emerald Lasher - On update (IC) - Enable combat movement'),
|
||||
(27254,0,5,0,0,0,100,0,4000,7000,9000,13000,11,51901,0,0,0,0,0,2,0,0,0,0,0,0,0,'Emerald Lasher - On update (IC) - Spellcast Dream Lash'),
|
||||
-- Living Lasher
|
||||
(30845,0,0,2,11,0,100,0,0,0,0,0,90,9,0,0,0,0,0,1,0,0,0,0,0,0,0,'Living Lasher - On spawn - Set unitfield_bytes1 9 (submerged)'),
|
||||
(30845,0,1,2,21,0,100,0,0,0,0,0,90,9,0,0,0,0,0,1,0,0,0,0,0,0,0,'Living Lasher - On reached homeposition - Set unitfield_bytes1 9 (submerged)'),
|
||||
(30845,0,2,0,61,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Living Lasher - Linked with event 0 or 1 - Disable combat movement'),
|
||||
(30845,0,3,0,4,0,100,0,0,0,0,0,11,37752,0,0,0,0,0,1,0,0,0,0,0,0,0,'Living Lasher - On aggro - Spellcast Stand'),
|
||||
(30845,0,4,0,0,0,100,0,1500,1500,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Living Lasher - On update (IC) - Enable combat movement'),
|
||||
(30845,0,5,0,0,0,100,0,4000,7000,9000,13000,11,51901,0,0,0,0,0,2,0,0,0,0,0,0,0,'Living Lasher - On update (IC) - Spellcast Dream Lash'),
|
||||
-- 34300 Mature Lasher
|
||||
(34300,0,0,2,11,0,100,0,0,0,0,0,90,9,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mature Lasher - On spawn - Set unitfield_bytes1 9 (submerged)'),
|
||||
(34300,0,1,2,21,0,100,0,0,0,0,0,90,9,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mature Lasher - On reached homeposition - Set unitfield_bytes1 9 (submerged)'),
|
||||
(34300,0,2,0,61,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mature Lasher - Linked with event 0 or 1 - Disable combat movement'),
|
||||
(34300,0,3,0,4,0,100,0,0,0,0,0,11,37752,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mature Lasher - On aggro - Spellcast Stand'),
|
||||
(34300,0,4,0,0,0,100,0,1500,1500,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mature Lasher - On update (IC) - Enable combat movement'),
|
||||
(34300,0,5,0,0,0,100,0,4000,7000,9000,13000,11,51901,0,0,0,0,0,2,0,0,0,0,0,0,0,'Mature Lasher - On update (IC) - Spellcast Dream Lash');
|
||||
-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Secrets of the Scourge
|
||||
UPDATE `quest_template` SET `PrevQuestId`=0 WHERE `Id`=12312;
|
||||
-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Icehorn updates from sniffs
|
||||
UPDATE `creature_template` SET `speed_run`=0.9920629, `rank`=4, `unit_flags`=32832, `family`=43, `type_flags`=65537 WHERE `entry`=32361;
|
||||
DELETE FROM `creature_template_addon` WHERE `entry`=32361;
|
||||
INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES
|
||||
(32361,0,0,1,'60915');
|
||||
-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Dragonblight optical improvements
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (27203,30058);
|
||||
UPDATE `creature_template` SET `inhabitType`=4 WHERE `entry`=30078;
|
||||
UPDATE `creature_addon` SET `auras`='' WHERE `guid` IN (131075,131077);
|
||||
UPDATE `creature_addon` SET `auras`='42048' WHERE `guid`=131066;
|
||||
UPDATE `creature_addon` SET `auras`='42049' WHERE `guid`=106614;
|
||||
UPDATE `creature_addon` SET `auras`='42050' WHERE `guid`=131068;
|
||||
UPDATE `creature_addon` SET `auras`='42051' WHERE `guid`=106634;
|
||||
UPDATE `creature` SET `spawndist`=0, `MovementType`=0 WHERE `id` IN (27222,27223,30078);
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (-102199,-105487,-105488,-105489,-105495,-131055,-131056,-131058,-131059) 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
|
||||
(-102199,0,0,0,25,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Onslaught Footman - On reset - Set event phase 1'),
|
||||
(-102199,0,1,2,1,1,100,0,2000,2000,12000,14000,11,48115,0,0,0,0,0,19,27222,30,0,0,0,0,0,'Onslaught Footman - On OOC update (phase 1) - Spellcast Shoot on Archery Target'),
|
||||
(-102199,0,2,0,61,1,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Onslaught Footman - On OOC update (phase 1) - Set event phase 2'),
|
||||
(-102199,0,3,4,1,2,100,0,16000,18000,16000,18000,11,48117,0,0,0,0,0,19,27223,30,0,0,0,0,0,'Onslaught Footman - On OOC update (phase 2) - Spellcast Shoot on Archery Target'),
|
||||
(-102199,0,4,0,61,2,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Onslaught Footman - On OOC update (phase 2) - Set event phase 4'),
|
||||
(-105487,0,0,0,1,0,100,0,2000,2000,0,0,11,55840,0,0,0,0,0,10,107492,0,0,0,0,0,0,'Warden of the Chamber - On reset - Spellcast Blue Wyrmrest Warden Beam'),
|
||||
(-105488,0,0,0,1,0,100,0,2000,2000,0,0,11,55841,0,0,0,0,0,10,107491,0,0,0,0,0,0,'Warden of the Chamber - On reset - Spellcast Yellow Wyrmrest Warden Beam'),
|
||||
(-105489,0,0,0,1,0,100,0,2000,2000,0,0,11,55841,0,0,0,0,0,10,107491,0,0,0,0,0,0,'Warden of the Chamber - On reset - Spellcast Yellow Wyrmrest Warden Beam'),
|
||||
(-105495,0,0,0,1,0,100,0,2000,2000,0,0,11,55840,0,0,0,0,0,10,107492,0,0,0,0,0,0,'Warden of the Chamber - On reset - Spellcast Blue Wyrmrest Warden Beam'),
|
||||
(-131055,0,0,0,1,0,100,0,2000,2000,0,0,11,55838,0,0,0,0,0,10,131075,0,0,0,0,0,0,'Warden of the Chamber - On reset - Spellcast Green Wyrmrest Warden Beam'),
|
||||
(-131056,0,0,0,1,0,100,0,2000,2000,0,0,11,55824,0,0,0,0,0,10,131077,0,0,0,0,0,0,'Warden of the Chamber - On reset - Spellcast Red Wyrmrest Warden Beam'),
|
||||
(-131058,0,0,0,1,0,100,0,2000,2000,0,0,11,55838,0,0,0,0,0,10,131075,0,0,0,0,0,0,'Warden of the Chamber - On reset - Spellcast Green Wyrmrest Warden Beam'),
|
||||
(-131059,0,0,0,1,0,100,0,2000,2000,0,0,11,55824,0,0,0,0,0,10,131077,0,0,0,0,0,0,'Warden of the Chamber - On reset - Spellcast Red Wyrmrest Warden Beam');
|
||||
-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Borean Tundra visual improvement and missing spawn
|
||||
SET @GOGUID :=356; -- need 1 set by TDB
|
||||
SET @GUID :=43460; -- need 3 set by TDB
|
||||
DELETE FROM `gameobject` WHERE `guid`=@GOGUID;
|
||||
INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
|
||||
(@GOGUID,187879,571,1,1,4207.366,4056.894,91.62077,2.792518,0,0,0.984807,0.1736523,300,100,1);
|
||||
DELETE FROM `creature` WHERE `guid` in (@GUID+0,@GUID+1,@GUID+2);
|
||||
INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
|
||||
(@GUID+0,24021,571,1,1,21999,0,4207.475,4056.687,93.53715,2.094395,300,0,0,42,0,0,0,0,0),
|
||||
(@GUID+1,23837,571,1,1,11686,0,4207.471,4056.705,93.66189,3.979351,300,0,0,42,0,0,0,0,0),
|
||||
(@GUID+2,24957,571,1,1,0,0,4200.877,4056.888,92.28766,6.25263,300,0,0,7185,7196,0,0,0,0);
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=24957 AND `source_type`=0 AND `id` IN (1,3);
|
||||
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
|
||||
(24957,0,1,0,11,0,100,0,0,0,0,0,11,45820,0,0,0,0,0,9,24021,0,30,0,0,0,0,'Cult Plaguebringer - On spawn - Spellcast Plague Cauldron Beam'),
|
||||
(24957,0,3,0,21,0,100,0,0,0,0,0,11,45820,0,0,0,0,0,9,24021,0,30,0,0,0,0,'Cult Plaguebringer - On reached homeposition - Spellcast Plague Cauldron Beam');
|
||||
UPDATE `creature_addon` SET `auras`='45797' WHERE `guid` IN (98730,115941);
|
||||
DELETE FROM `creature_addon` WHERE `guid` IN (@GUID+0,@GUID+1);
|
||||
INSERT INTO `creature_addon` (`guid`,`mount`,`bytes1`,`bytes2`,`auras`) VALUES
|
||||
(@GUID+0,0,0,1,'45797'),
|
||||
(@GUID+1,0,0,1,'45797');
|
||||
@@ -0,0 +1,35 @@
|
||||
-- Pathing for Ol' Sooty Entry: 1225
|
||||
SET @NPC := 8877;
|
||||
SET @PATH := @NPC * 10;
|
||||
UPDATE `creature` SET `spawntimesecs`=1200,`spawndist`=0,`MovementType`=2,`position_x`=-5716.181152,`position_y`=-3110.810791,`position_z`=316.686523 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`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,-5716.181152,-3110.810791,316.686523,0,0,0,100,0),
|
||||
(@PATH,2,-5716.187012,-3093.080078,325.600677,0,0,0,100,0),
|
||||
(@PATH,3,-5712.214355,-3090.297607,327.738647,0,0,0,100,0),
|
||||
(@PATH,4,-5705.484375,-3092.523438,329.362366,0,0,0,100,0),
|
||||
(@PATH,5,-5681.826660,-3110.568848,338.121887,0,0,0,100,0),
|
||||
(@PATH,6,-5659.498535,-3122.215576,344.336151,0,0,0,100,0),
|
||||
(@PATH,7,-5639.585938,-3124.536133,348.404938,0,0,0,100,0),
|
||||
(@PATH,8,-5618.112793,-3110.905762,360.618225,0,0,0,100,0),
|
||||
(@PATH,9,-5621.486816,-3096.315918,368.247772,0,0,0,100,0),
|
||||
(@PATH,10,-5632.212891,-3078.608398,374.990936,0,0,0,100,0),
|
||||
(@PATH,11,-5629.793457,-3056.124023,384.465576,0,0,0,100,0),
|
||||
(@PATH,12,-5642.278809,-3036.872314,385.471649,0,0,0,100,0),
|
||||
(@PATH,13,-5609.369141,-3006.883301,386.288177,0,0,0,100,0),
|
||||
(@PATH,14,-5643.634277,-3036.388672,385.531891,0,0,0,100,0),
|
||||
(@PATH,15,-5630.174805,-3057.015869,384.385712,0,0,0,100,0),
|
||||
(@PATH,16,-5629.840332,-3065.496338,381.129578,0,0,0,100,0),
|
||||
(@PATH,17,-5634.866211,-3078.448975,374.489044,0,0,0,100,0),
|
||||
(@PATH,18,-5620.416504,-3101.081543,364.819855,0,0,0,100,0),
|
||||
(@PATH,19,-5624.629395,-3117.040527,354.493805,0,0,0,100,0),
|
||||
(@PATH,20,-5644.949707,-3125.081787,347.271362,0,0,0,100,0),
|
||||
(@PATH,21,-5660.741699,-3121.580566,343.975922,0,0,0,100,0),
|
||||
(@PATH,22,-5676.210938,-3111.586914,340.021484,0,0,0,100,0),
|
||||
(@PATH,23,-5691.895508,-3102.994385,333.646698,0,0,0,100,0),
|
||||
(@PATH,24,-5711.662109,-3088.433594,328.761566,0,0,0,100,0),
|
||||
(@PATH,25,-5717.663574,-3099.033691,321.686920,0,0,0,100,0),
|
||||
(@PATH,26,-5705.214844,-3132.324219,315.837585,0,0,0,100,0),
|
||||
(@PATH,27,-5679.014160,-3185.046875,319.508057,0,0,0,100,0);
|
||||
@@ -0,0 +1,120 @@
|
||||
-- Various quest fixes in Grizzly Hills
|
||||
|
||||
SET @GUID :=43494; -- need 8 set by TDB
|
||||
SET @OGUID :=5681; -- need 3 set by TDB
|
||||
|
||||
-- Creature Gossip_menu_option Update from sniff
|
||||
DELETE FROM `gossip_menu_option` WHERE `menu_id`=9426 AND `id`=0;
|
||||
DELETE FROM `gossip_menu_option` WHERE `menu_id`=9615 AND `id`=1;
|
||||
INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES
|
||||
(9426,0,0, 'Remove the Eye of the Prophets from the idol''s face.',1,1,0,0,0,0, ''),
|
||||
(9615,1,0, 'I need another of your elixirs, Drakuru.',1,1,0,0,0,0, '');
|
||||
|
||||
-- Gossip Menu insert from sniff
|
||||
DELETE FROM `gossip_menu` WHERE `entry`=9426 AND `text_id` IN (12669,12670);
|
||||
INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
|
||||
(9426,12669),(9426,12670);
|
||||
|
||||
-- Creature Template update from sniff
|
||||
UPDATE `creature_template` SET `minLevel`=70, `maxLevel`=70, `unit_flags`=33024, `AIName`='SmartAI' WHERE `entry` IN (26500);
|
||||
UPDATE `creature_template` SET `npcflag`=2, `unit_flags`=33024, `AIName`='SmartAI' WHERE `entry` IN (26543,26701,26787);
|
||||
|
||||
UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=61 WHERE `item`=35799 AND `entry`=26447;
|
||||
UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=58 WHERE `item`=35799 AND `entry`=26425;
|
||||
UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=100 WHERE `item`=35836;
|
||||
UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=49 WHERE `item`=36743 AND `entry`=26704;
|
||||
UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=50 WHERE `item`=36743 AND `entry`=27554;
|
||||
UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=51 WHERE `item`=36758 AND `entry`=26795;
|
||||
UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=48 WHERE `item`=36758 AND `entry`=26797;
|
||||
UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=66 WHERE `item`=38303 AND `entry`=26620;
|
||||
UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=67 WHERE `item`=38303 AND `entry`=26639;
|
||||
UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=15 WHERE `item`=38303 AND `entry`=27431;
|
||||
|
||||
UPDATE `creature_involvedrelation` SET `id`=26543 WHERE `quest`=12007;
|
||||
UPDATE `creature_involvedrelation` SET `id`=26701 WHERE `quest`=12802;
|
||||
UPDATE `creature_involvedrelation` SET `id`=26787 WHERE `quest`=12068;
|
||||
UPDATE `creature_questrelation` SET `id`=26543 WHERE `quest`=12042;
|
||||
UPDATE `creature_questrelation` SET `id`=26701 WHERE `quest`=12068;
|
||||
UPDATE `creature_questrelation` SET `id`=26787 WHERE `quest`=12238;
|
||||
|
||||
DELETE FROM `creature_text` WHERE `entry`=26500;
|
||||
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
|
||||
(26500,0,0,'I''ll be waitin'' for ya, mon.',15,0,100,0,0,0,'Image of Drakuru');
|
||||
|
||||
-- Conditions
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=47110;
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=9426 AND `SourceEntry`=12670;
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9426 AND `SourceEntry`=0;
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9615 AND `SourceEntry`=1;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(13,1,47110,0,0,31,0,3,26498,0,0,0,'','Spell Summon Drakuru''s Image targets Drakuru''s Bunny 01'),
|
||||
(13,1,47110,0,1,31,0,3,26559,0,0,0,'','Spell Summon Drakuru''s Image targets Drakuru''s Bunny 02'),
|
||||
(13,1,47110,0,2,31,0,3,26700,0,0,0,'','Spell Summon Drakuru''s Image targets Drakuru''s Bunny 03'),
|
||||
(13,1,47110,0,3,31,0,3,26789,0,0,0,'','Spell Summon Drakuru''s Image targets Drakuru''s Bunny 04'),
|
||||
(13,1,47110,0,4,31,0,3,28015,0,0,0,'','Spell Summon Drakuru''s Image targets Drakuru''s Bunny 05'),
|
||||
(14,9426,12670,0,0,2,0,35806,1,1,0,0,'','Seer of Zeb''Halak - Show different gossip if player has item Eye of the Propehts'),
|
||||
(15,9426,0,0,0,9,0,12007,0,0,0,0,'','Seer of Zeb''Halak - Show gossip option if player has taken quest 12007'),
|
||||
(15,9426,0,0,0,2,0,35806,1,1,1,0,'','Seer of Zeb''Halak - Show gossip option if player has not item Eye of the Propehts'),
|
||||
(15,9615,1,0,0,8,0,11990,0,0,0,0,'','Drakuru - Show gossip option if player has rewarded quest 11990'),
|
||||
(15,9615,1,0,0,8,0,12238,0,0,1,0,'','Drakuru - Show gossip option if player has not rewarded quest 12238'),
|
||||
(15,9615,1,0,0,2,0,35797,1,1,1,0,'','Drakuru - Show gossip option if player has not item Drakuru''s Elixir');
|
||||
|
||||
UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=188458;
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (26498,26559,26700,26789);
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (26498,26500,26543,26559,26700,26701,26787,26789) AND `source_type`=0;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=26423 AND `source_type`=0 AND `id` IN (2,3);
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=188458 AND `source_type`=1;
|
||||
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
|
||||
(26423,0,2,3,62,0,100,0,9615,1,0,0,85,50021,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru - On gossip option select - Invoker spellcast Replace Drakuru''s Elixir'),
|
||||
(26423,0,3,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru - On gossip option select - Close gossip'),
|
||||
(26498,0,0,0,8,0,100,0,47110,0,0,0,11,47117,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru''s Bunny 01 - On spellhit - Spellcast Script Cast Summon Image of Drakuru'),
|
||||
(26500,0,0,1,19,0,100,0,12007,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Image of Drakuru - On quest accepted - Say text'),
|
||||
(26500,0,1,0,61,0,100,0,12007,0,0,0,11,47122,0,0,0,0,0,7,0,0,0,0,0,0,0,'Image of Drakuru - On quest accepted - Spellcast Strip Detect Drakuru'),
|
||||
(26543,0,0,1,19,0,100,0,12042,0,0,0,11,47308,0,0,0,0,0,7,0,0,0,0,0,0,0,'Image of Drakuru - On quest accepted - Spellcast Strip Detect Drakuru 02'),
|
||||
(26559,0,0,0,8,0,100,0,47110,0,0,0,11,47149,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru''s Bunny 02 - On spellhit - Spellcast Script Cast Summon Image of Drakuru 02'),
|
||||
(26700,0,0,0,8,0,100,0,47110,0,0,0,11,47316,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru''s Bunny 03 - On spellhit - Spellcast Script Cast Summon Image of Drakuru 03'),
|
||||
(26701,0,0,1,19,0,100,0,12068,0,0,0,11,47403,0,0,0,0,0,7,0,0,0,0,0,0,0,'Image of Drakuru - On quest accepted - Spellcast Strip Detect Drakuru 03'),
|
||||
(26787,0,0,1,19,0,100,0,12238,0,0,0,11,48417,0,0,0,0,0,7,0,0,0,0,0,0,0,'Image of Drakuru - On quest accepted - Spellcast Strip Detect Drakuru 04'),
|
||||
(26789,0,0,0,8,0,100,0,47110,0,0,0,11,47405,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru''s Bunny 04 - On spellhit - Spellcast Script Cast Summon Image of Drakuru 04'),
|
||||
(188458,1,0,1,62,0,100,0,9426,0,0,0,85,47293,0,0,0,0,0,7,0,0,0,0,0,0,0,'Seer of Zeb''Halak - On gossip option select - Invoker spellcast Create Eye of the Prophets'),
|
||||
(188458,1,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Seer of Zeb''Halak - On gossip option select - Close gossip');
|
||||
|
||||
DELETE FROM `spell_scripts` WHERE `id` IN (47117,47149,47316,47405,50439);
|
||||
INSERT INTO `spell_scripts` (`id`,`effIndex`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES
|
||||
(47117,0,0,15,47118,2,0,0,0,0,0), -- Script Cast Summon Image of Drakuru - Spellcast Envision Drakuru
|
||||
(47149,0,0,15,47150,2,0,0,0,0,0), -- Script Cast Summon Image of Drakuru 02 - Spellcast Envision Drakuru
|
||||
(47316,0,0,15,47317,2,0,0,0,0,0), -- Script Cast Summon Image of Drakuru 03 - Spellcast Envision Drakuru
|
||||
(47405,0,0,15,47406,2,0,0,0,0,0), -- Script Cast Summon Image of Drakuru 04 - Spellcast Envision Drakuru
|
||||
(50439,0,0,15,50440,2,0,0,0,0,0); -- Script Cast Summon Image of Drakuru 05 - Spellcast Envision Drakuru
|
||||
|
||||
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (-47122,-47308,-47403,-48417);
|
||||
INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
|
||||
(-47122,-47118,0,'On Strip Detect Drakuru fade - Remove Envision Drakuru'),
|
||||
(-47308,-47150,0,'On Strip Detect Drakuru 02 fade - Remove Envision Drakuru'),
|
||||
(-47403,-47317,0,'On Strip Detect Drakuru 03 fade - Remove Envision Drakuru'),
|
||||
(-48417,-47406,0,'On Strip Detect Drakuru 04 fade - Remove Envision Drakuru');
|
||||
|
||||
DELETE FROM `creature` WHERE `guid` in (@GUID+0,@GUID+1,@GUID+2,@GUID+3,@GUID+4,@GUID+5,@GUID+6,@GUID+7);
|
||||
INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
|
||||
(@GUID+0,26498,571,1,1,19595,0,3386.607,-1805.944,115.2497,3.001966,300,0,0,0,0,0,0,0,0),
|
||||
(@GUID+1,26500,571,1,1,0,0,3386.272,-1805.434,115.4441,4.939282,300,0,0,0,0,0,0,0,0),
|
||||
(@GUID+2,26559,571,1,1,19595,0,4243.962,-2024.805,238.2487,1.411705,300,0,0,0,0,0,0,0,0),
|
||||
(@GUID+3,26543,571,1,1,0,0,4243.962,-2024.805,238.2487,1.411705,300,0,0,0,0,0,0,0,0),
|
||||
(@GUID+4,26700,571,1,1,19595,0,4523.894,-3472.863,228.2441,4.695459,300,0,0,0,0,0,0,0,0),
|
||||
(@GUID+5,26701,571,1,1,0,0,4523.894,-3472.863,228.2441,4.695459,300,0,0,0,0,0,0,0,0),
|
||||
(@GUID+6,26787,571,1,1,0,0,4599.709,-4876.9,48.95556,0.719772,300,0,0,0,0,0,0,0,0),
|
||||
(@GUID+7,26789,571,1,1,19595,0,4599.709,-4876.9,48.95556,0.719772,300,0,0,0,0,0,0,0,0);
|
||||
|
||||
DELETE FROM `creature_template_addon` WHERE `entry` IN (26500,26543,26701,26787);
|
||||
INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
|
||||
(26500,0,0,65536,1,0,'43167 47119'),
|
||||
(26543,0,0,65536,1,0,'43167 47119'),
|
||||
(26701,0,0,65536,1,0,'43167 47119'),
|
||||
(26787,0,0,65536,1,0,'43167 47119');
|
||||
|
||||
DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+2;
|
||||
INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
|
||||
(@OGUID+0,188600,571,1,1,3980.721,-1956.352,210.6624,1.169369,0,0,0,1,120,255,1),
|
||||
(@OGUID+1,188600,571,1,1,3957.188,-1908.295,209.97,0.8901166,0,0,0,1,120,255,1),
|
||||
(@OGUID+2,188600,571,1,1,3964.761,-1884.524,208.2739,1.692969,0,0,0,1,120,255,1);
|
||||
@@ -0,0 +1,3 @@
|
||||
-- Fix [Q]{A/H} Meet At The Grave
|
||||
UPDATE `creature_template_addon` SET `auras`='10848' WHERE `entry`=9299; -- allow to be seen in world of death
|
||||
UPDATE `creature_template` SET `npcflag`=32770,`unit_flags`=768 WHERE `entry`=9299; -- makes unseen in world of living
|
||||
@@ -0,0 +1,2 @@
|
||||
-- Pilgrim's Bounty start time fix
|
||||
UPDATE `game_event` SET `start_time`= '2012-11-18 01:00:00' WHERE `eventEntry`=26;
|
||||
@@ -0,0 +1,3 @@
|
||||
-- Fix Pilgrims Bounty quest during Hallows End
|
||||
INSERT INTO `game_event_creature_quest` (`eventEntry`,`id`,`quest`) VALUES (26,18927,14022);
|
||||
DELETE FROM `creature_questrelation` WHERE `id`=18927;
|
||||
@@ -0,0 +1,4 @@
|
||||
DELETE FROM `player_factionchange_items` WHERE `alliance_id` IN (15198, 47937);
|
||||
INSERT INTO `player_factionchange_items` (`race_A`, `alliance_id`, `commentA`, `race_H`, `horde_id`, `commentH`) VALUES
|
||||
(0, 15198, 'Knight\'s Colors', 0, 15199, 'Stone Guard\'s Herald'),
|
||||
(0, 47937, 'Girdle of the Nether Champion', 0, 48009, 'Belt of the Nether Champion');
|
||||
@@ -0,0 +1,2 @@
|
||||
DELETE FROM `trinity_string` WHERE `entry` IN (5018,5019);
|
||||
UPDATE `trinity_string` SET `content_default`= '[Raid]' WHERE `entry`=5017;
|
||||
@@ -0,0 +1,16 @@
|
||||
SET @ENTRY_SPIRIT_SHADE := 15261;
|
||||
SET @ENTRY_LETHON := 14888;
|
||||
SET @SPELL_DARK_OFFERING := 24804;
|
||||
|
||||
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY_SPIRIT_SHADE;
|
||||
UPDATE `creature_template` SET `AIName`= '',`ScriptName`= 'npc_spirit_shade' WHERE `entry`=@ENTRY_SPIRIT_SHADE;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY_SPIRIT_SHADE AND `source_type`=0;
|
||||
|
||||
DELETE FROM `creature_template_addon` WHERE `entry`=@ENTRY_SPIRIT_SHADE;
|
||||
INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`auras`) VALUES
|
||||
(@ENTRY_SPIRIT_SHADE,0,0,0, '24809');
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SPELL_DARK_OFFERING;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(13,1,@SPELL_DARK_OFFERING,0,0,31,0,3,@ENTRY_LETHON,0,0,0, '', 'Dark offering can only target Lethon');
|
||||
@@ -0,0 +1,307 @@
|
||||
-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Mounts players mode 25
|
||||
UPDATE `creature_template` SET `VehicleId`=220,`spell1`=56091,`spell2`=56092,`spell3`=57090,`spell4`=57143,`spell5`=57108,`spell6`=57092,`spell7`=60534,`InhabitType`=5 WHERE `entry`=31752;
|
||||
-- Hover Disk mode 25
|
||||
UPDATE `creature_template` SET `VehicleId`=224,`faction_A`=35,`faction_H`=35,`InhabitType`=5 WHERE `entry` IN (31749,31748);
|
||||
-- spawn the focusing iris 25men
|
||||
DELETE FROM gameobject WHERE id IN (193960);
|
||||
INSERT INTO `gameobject`
|
||||
(`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
|
||||
(361,193960,616,2,1,754.362,1301.61,266.171,6.23742,0,0,0.022883,-0.999738,300,0,1);
|
||||
-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- The Heart of the Storm (Issue 1959)
|
||||
DELETE FROM `gameobject` WHERE `id`=192181;
|
||||
INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
|
||||
(362,192181,571,1,1,7308.945,-727.9163,791.6083,1.53589,0,0,0.690772,0.723073,30,100,1);
|
||||
-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Add support for {Q} Corrupted Sabers ID: 4506 (Issue 2297)
|
||||
SET @CommonKitten:=9937;
|
||||
SET @CorruptedKitten :=9936;
|
||||
SET @SGossip :=55002; -- Gossip for Kitten when near quest giver
|
||||
SET @SpellVisual :=16510; -- Turn Kitten in Saber
|
||||
SET @Winna :=9996; -- Winna Hazzard
|
||||
SET @Saber :=10042; -- Big green cat
|
||||
-- Add SAI support for Corrupted Kitten
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI',`gossip_menu_id`=@SGossip,`npcflag`=1 WHERE `entry`=@CorruptedKitten;
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI',`gossip_menu_id`=@SGossip,`npcflag`=1 WHERE `entry`=@CommonKitten;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@CorruptedKitten,@CommonKitten);
|
||||
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
|
||||
(@CommonKitten,0,0,1,54,0,100,0,0,0,0,0,36,@CorruptedKitten,0,0,0,0,0,1,0,0,0,0,0,0,0,'Common Kitten - On spawn - Change template to corrupted one'),
|
||||
(@CommonKitten,0,1,2,61,0,100,0,0,0,0,0,11,@SpellVisual,0,0,0,0,0,1,0,0,0,0,0,0,0,'Common Kitten - On OOC of 10 sec - Cast Corrupted Saber visual to self'),
|
||||
(@CommonKitten,0,2,0,61,0,100,0,0,0,0,0,3,@Saber,0,0,0,0,0,1,0,0,0,0,0,0,0,'Common Kitten - Linked with previous event - Morph to Corrupted Saber'),
|
||||
(@CommonKitten,0,3,4,62,0,100,0,@SGossip,1,0,0,26,4506,0,0,0,0,0,7,0,0,0,0,0,0,0,'Common Kitten - On Gossip Select - Award quest,since no credit'),
|
||||
(@CommonKitten,0,4,5,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Common Kitten - Linked with previous event - Close gossip'),
|
||||
(@CommonKitten,0,5,6,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Common Kitten - Linked with previous event - Set unseen'),
|
||||
(@CommonKitten,0,6,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Common Kitten - Linked with previous event - Despawn in 1 sec');
|
||||
-- Insert Gossip /custom made id/
|
||||
DELETE FROM `gossip_menu_option` WHERE `menu_id`=@SGossip AND `id`=1;
|
||||
INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`) VALUES
|
||||
(@SGossip,1,0,'I want to release the saber to Winna.',1,131,0);
|
||||
-- Only show gossip if near Winna
|
||||
DELETE FROM `conditions` WHERE `SourceGroup`=@SGOSSIP AND `SourceTypeOrReferenceId`=15;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(15,@SGOSSIP,1,0,29,1,@Winna,5,0,0,0,'','Only show second gossip Corrupted Saber is near Wina in 5 yards');
|
||||
-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Fix for Prepping the Speech by Gecko32 (Issue 2399)
|
||||
SET @MEKKATORQUE :=39712;
|
||||
SET @OZZIE :=1268;
|
||||
SET @MILLI :=7955;
|
||||
SET @TOG :=6119;
|
||||
-- Add creature text for npc's
|
||||
DELETE FROM `creature_text` WHERE `entry`=@MEKKATORQUE;
|
||||
DELETE FROM `creature_text` WHERE `entry`=@OZZIE;
|
||||
DELETE FROM `creature_text` WHERE `entry`=@MILLI;
|
||||
DELETE FROM `creature_text` WHERE `entry`=@TOG;
|
||||
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
|
||||
(@MEKKATORQUE,0,0,'They may take our lives, but they''ll never take...',12,0,100,0,0,0,'High Tinker Mekkatorque to Milli Featherwhistle 1'),
|
||||
(@MEKKATORQUE,1,0,'...our INNOVATION!',12,0,100,0,0,0,'High Tinker Mekkatorque to Milli Featherwhistle 2'),
|
||||
(@MEKKATORQUE,2,0,'What I want out of each and every one of you is a hard-target search of every refuelling station, residence, warehouse, farmhouse, henhouse, outhouse, and doghouse in this area.',12,0,100,0,0,0,'High Tinker Mekkatorque to Ozzie Togglevolt 1'),
|
||||
(@MEKKATORQUE,3,0,'Your fugitive''s name is Mekgineer Thermaplugg.',12,0,100,0,0,0,'High Tinker Mekkatorque to Ozzie Togglevolt 2'),
|
||||
(@MEKKATORQUE,4,0,'Go get him.',12,0,100,0,0,0,'High Tinker Mekkatorque to Ozzie Togglevolt 3'),
|
||||
(@MEKKATORQUE,5,0,'We will not go quietly into the night! We will not vanish without a fight!',12,0,100,0,0,0,'High Tinker Mekkatorque to Tog Rustsprocket 1'),
|
||||
(@MEKKATORQUE,6,0,'We''re going to live on! We''re going to survive! Today we celebrate...',12,0,100,0,0,0,'High Tinker Mekkatorque to Tog Rustsprocket 2'),
|
||||
(@MEKKATORQUE,7,0,'...our Autonomy Day!',12,0,100,0,0,0,'High Tinker Mekkatorque to Tog Rustsprocket 3'),
|
||||
(@OZZIE,0,0,'Hmm, I suppose it could work. But it could really use a little more umph!',12,0,100,0,0,0,'Ozzie Togglevolt reply'),
|
||||
(@MILLI,0,0,'What? I don''t even know what you''re talking about! That''s terrible!',12,0,100,0,0,0,'Milli Featherwhistle reply'),
|
||||
(@TOG,0,0,'Horrible! Well, all right,maybe it just needs a little cleaning up?',12,0,100,0,0,0,'Tog Rustsprocket reply');
|
||||
-- Add SAI for Milli Featherwhistle
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@MILLI;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@MILLI;
|
||||
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
|
||||
(@MILLI,0,0,0,8,0,100,1,74222,0,0,0,1,0,2000,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Milli Featherwhistle - On spell hit - High Tinker Mekkatorque say part1'),
|
||||
(@MILLI,0,1,0,52,0,100,0,0,@MEKKATORQUE,0,0,1,1,4000,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Milli Featherwhistle - On text over - High Tinker Mekkatorque say part2'),
|
||||
(@MILLI,0,2,3,52,0,100,0,1,@MEKKATORQUE,0,0,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'Milli Featherwhistle - On text over - Reply'),
|
||||
(@MILLI,0,3,4,61,0,100,0,0,0,0,0,33,@MILLI,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,'Milli Featherwhistle - On link - credit quest'),
|
||||
(@MILLI,0,4,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Milli Featherwhistle - On link - set data 1');
|
||||
-- Add SAI for Ozzie Togglevolt
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@OZZIE;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@OZZIE;
|
||||
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
|
||||
(@OZZIE,0,0,0,8,0,100,1,74222,0,0,0,1,2,2000,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Ozzie Togglevolt - On spell hit - High Tinker Mekkatorque say part1'),
|
||||
(@OZZIE,0,1,0,52,0,100,0,2,@MEKKATORQUE,0,0,1,3,4000,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Ozzie Togglevolt - On text over - High Tinker Mekkatorque say part2'),
|
||||
(@OZZIE,0,2,0,52,0,100,0,3,@MEKKATORQUE,0,0,1,4,4000,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Ozzie Togglevolt - On text over - High Tinker Mekkatorque say part3'),
|
||||
(@OZZIE,0,3,4,52,0,100,0,4,@MEKKATORQUE,0,0,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'Ozzie Togglevolt - On text over - Reply'),
|
||||
(@OZZIE,0,4,5,61,0,100,0,0,0,0,0,33,@OZZIE,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,'Milli Featherwhistle - On link - credit quest'),
|
||||
(@OZZIE,0,5,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Milli Featherwhistle - On link - set data 1');
|
||||
-- Add SAI for Tog Rustsprocket
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@TOG;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@TOG;
|
||||
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
|
||||
(@TOG,0,0,0,8,0,100,1,74222,0,0,0,1,5,2000,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Tog Rustsprocket - On spell hit - High Tinker Mekkatorque say part1'),
|
||||
(@TOG,0,1,0,52,0,100,0,5,@MEKKATORQUE,0,0,1,6,4000,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Tog Rustsprocket - On text over - High Tinker Mekkatorque say part2'),
|
||||
(@TOG,0,2,0,52,0,100,0,6,@MEKKATORQUE,0,0,1,7,4000,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Tog Rustsprocket - On text over - High Tinker Mekkatorque say part3'),
|
||||
(@TOG,0,3,4,52,0,100,0,7,@MEKKATORQUE,0,0,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'Tog Rustsprocket - On text over - Reply'),
|
||||
(@TOG,0,4,5,61,0,100,0,0,0,0,0,33,@TOG,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,'Tog Rustsprocket - On link - credit quest'),
|
||||
(@TOG,0,5,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Tog Rustsprocket - On link - set data 1');
|
||||
-- Add SAI for High Tinker Mekkatorque
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@MEKKATORQUE;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@MEKKATORQUE;
|
||||
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
|
||||
(@MEKKATORQUE,0,0,0,38,0,100,1,1,1,0,0,41,1000,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'High Tinker Mekkatorque - on data set- despawn');
|
||||
-- add prev quest id to both Words for Delivery
|
||||
UPDATE `quest_template` SET `PrevQuestId`=25283 WHERE `Id`=25500;-- below 75
|
||||
UPDATE `quest_template` SET `PrevQuestId`=25283 WHERE `Id`=25286;-- 75+
|
||||
-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Where the Wild Things Roam by Shlomi155 (Issue 3038)
|
||||
-- Quest item will work only at Dragonblight and if the quest is incomplete!
|
||||
DELETE FROM `conditions` WHERE SourceEntry=47627;
|
||||
INSERT INTO `conditions` VALUES
|
||||
(17,0,47627,0,0,9,0,12111,0,0,0,0,'',NULL),
|
||||
(17,0,47627,0,0,23,0,65,0,0,0,0,'',NULL);
|
||||
UPDATE `creature_template` SET AIName='SmartAI' WHERE entry IN (26615,26482);
|
||||
DELETE FROM `creature_ai_scripts`where creature_id IN (26615,26482);
|
||||
DELETE FROM `smart_scripts` WHERE entryorguid IN (26615,26482);
|
||||
INSERT INTO `smart_scripts` VALUES
|
||||
(26615,0,0,0,9,0,100,1,0,5,8000,12000,11,15976,0,0,0,0,0,2,0,0,0,0,0,0,0,'Snowfall Elk - Cast Puncture'),
|
||||
(26615,0,1,2,23,0,100,1,47628,1,1,1,11,47675,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snowfall Elk - On Aura - Cast Recently Inoculated'),
|
||||
(26615,0,2,3,61,0,100,1,0,0,0,0,33,26895,0,0,0,0,0,18,40,0,0,0,0,0,0,'Snowfall Elk - Event Linked - Credit'),
|
||||
(26615,0,3,0,61,0,100,1,0,0,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snowfall Elk - Event Linked - Despawn Delay 5 Seconds'),
|
||||
(26482,0,0,1,23,0,100,1,47628,1,1,1,11,47675,0,0,0,0,0,1,0,0,0,0,0,0,0,'Arctic Grizzly - On Aura - Cast Recently Inoculated'),
|
||||
(26482,0,1,2,61,0,100,1,0,0,0,0,33,26882,0,0,0,0,0,18,40,0,0,0,0,0,0,'Arctic Grizzly - Event Linked - Credit'),
|
||||
(26482,0,2,0,61,0,100,1,0,0,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Arctic Grizzly - Event Linked - Despawn Delay 5 Seconds');
|
||||
-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- [Q] [A/H] Catch the Wild Wolpertinger! by Discover (Issue 3131)
|
||||
-- Wild Wolpertinger SAI
|
||||
SET @WOLPERTINGER :=23487;
|
||||
SET @SPELL_NET :=41621;
|
||||
SET @SPELL_CREATE_ITEM :=41622;
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI',`unit_flags`=`unit_flags`|512 WHERE `entry`=@WOLPERTINGER;
|
||||
UPDATE `creature` SET `position_x`=24.539537 WHERE `guid`=207045 AND `id`=@WOLPERTINGER; -- For some reason this one was spawned in air
|
||||
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@WOLPERTINGER;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@WOLPERTINGER;
|
||||
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
|
||||
(@WOLPERTINGER,0,0,1,8,0,100,0,@SPELL_NET,0,0,0,11,@SPELL_CREATE_ITEM,2,0,0,0,0,7,0,0,0,0,0,0,0,"Wild Wolpertinger - On Spellhit - Cast Create Stunned Wolpertinger Item"),
|
||||
(@WOLPERTINGER,0,1,0,61,0,100,0,0,0,0,0,41,4000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Wild Wolpertinger - On Spellhit - Forced Despawn");
|
||||
-- Condition for spell Wolpertinger Net
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=@SPELL_NET;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(17,0,@SPELL_NET,0,0,31,1,3,@WOLPERTINGER,0,0,0,'','Net can only hit Wolpertingers');
|
||||
-- Update Wolpetinger flags to remove immunity to players,was 768 before
|
||||
UPDATE `creature_template` SET `unit_flags`=512 WHERE `entry`=@WOLPERTINGER;
|
||||
-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Fix quest Blinding the Eyes in the Sky ID: 13313 by Trista (Issue 3225)
|
||||
SET @ReconFighter :=32189;
|
||||
SET @Spell :=60079;
|
||||
-- Add SAI support Skybreaker Recon
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ReconFighter;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ReconFighter;
|
||||
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
|
||||
(@ReconFighter,0,0,1,8,0,100,0,@Spell,0,0,0,33,@ReconFighter,0,0,0,0,0,7,0,0,0,0,0,0,0,'Skybreaker Recon - On spell hit - Give kill credit to invoker'),
|
||||
(@ReconFighter,0,1,0,61,0,100,0,0,0,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Skybreaker Recon - Linked with previous event - Kill self');
|
||||
-- Update Vehicle_Accesorry to die along with the vehicle,otherwise little untargetable dwards fall on ground
|
||||
UPDATE `vehicle_template_accessory` SET `minion`=1 WHERE `entry`=32189 AND `seat_id`=0;
|
||||
-- Add conditions for spell to target only alive Recons
|
||||
DELETE FROM `conditions` WHERE `SourceEntry`=@Spell and `SourceTypeOrReferenceId`=17;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(17,0,@Spell,0,0,36,1,0,0,0,0,0,'','Fire SGM-3 can hit only alive Recon Fighter'),
|
||||
(17,0,@Spell,0,0,31,1,3,@ReconFighter,0,0,0,'','Fire SGM-3 can hit Recon Fighter');
|
||||
-- Keeping the Alliance Blind ID: 13331 quest requirements
|
||||
UPDATE `quest_template` SET `PrevQuestId`=13313 WHERE `Id`=13331;
|
||||
-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Cleansing Drak'Tharon by gecko32 (Issue 3351)
|
||||
-- Update Item Enduring Mojo is normal drop not quest drop
|
||||
UPDATE `creature_loot_template` SET `ChanceOrQuestChance` = ABS(`ChanceOrQuestChance`) WHERE `item`=38303;
|
||||
-- Add gossip menu option
|
||||
DELETE FROM `gossip_menu_option` WHERE `menu_id`=9615 AND `id`=1;
|
||||
INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES
|
||||
(9615,1,0,'I need another of your elixirs, Drakuru.',1,1,0,0,0,0,'');
|
||||
-- Add Conditions for Gossip
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9615 AND `SourceEntry`=1;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(15,9615,1,0,1,2,0,35797,1,0,1,0,'','Drakuru''s Elixir - Must not already have item'),
|
||||
(15,9615,1,0,1,28,0,11991,0,0,0,0,'','Drakuru''s Elixir - Must have quest Subject to Interpretation'),
|
||||
(15,9615,1,0,2,2,0,35797,1,0,1,0,'','Drakuru''s Elixir - Must not already have item'),
|
||||
(15,9615,1,0,2,9,0,12007,0,0,0,0,'','Drakuru''s Elixir - Must have quest Sacrifices Must be Made'),
|
||||
(15,9615,1,0,3,2,0,35797,1,0,1,0,'','Drakuru''s Elixir - Must not already have item'),
|
||||
(15,9615,1,0,3,28,0,12802,0,0,0,0,'','Drakuru''s Elixir - Must have quest My Heart is in Your Hands'),
|
||||
(15,9615,1,0,4,2,0,35797,1,0,1,0,'','Drakuru''s Elixir - Must not already have item'),
|
||||
(15,9615,1,0,4,9,0,12068,0,0,0,0,'','Drakuru''s Elixir - Must have quest Voices From the Dust'),
|
||||
(15,9615,1,0,5,2,0,35797,1,0,1,0,'','Drakuru''s Elixir - Must not already have item'),
|
||||
(15,9615,1,0,5,28,0,12238,0,0,0,0,'','Drakuru''s Elixir - Must have quest Cleansing Drak''Tharon');
|
||||
-- Add SmartAI to give item
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=26423 AND `id` IN (2,3);
|
||||
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
|
||||
(26423,0,2,3,62,0,100,0,9615,1,0,0,11,50021,2,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru - On gossip option select - cast Replace Drakuru''s Elixir'),
|
||||
(26423,0,3,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru - On gossip option select - close gossip');
|
||||
-- Add TEMP Drakuru's Brazier In Drak'tharon Keep
|
||||
DELETE FROM `gameobject` WHERE `guid`=364;
|
||||
INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
|
||||
(364,300188,600,3,1,-236.766,-614.774,116.487,1.5708,0,0,0,1,300,100,1);
|
||||
-- Conditions for spell Target
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=47110;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(13,1,47110,0,1,31,0,3,26498,0,0,0,'',NULL),-- Drakuru's Bunny 01
|
||||
(13,1,47110,0,2,31,0,3,26559,0,0,0,'',NULL),-- Drakuru's Bunny 02
|
||||
(13,1,47110,0,3,31,0,3,26700,0,0,0,'',NULL),-- Drakuru's Bunny 03
|
||||
(13,1,47110,0,4,31,0,3,26789,0,0,0,'',NULL),-- Drakuru's Bunny 04
|
||||
(13,1,47110,0,5,31,0,3,28015,0,0,0,'',NULL); -- Drakuru's Bunny 05
|
||||
-- Add Smart AI Drakuru Bunny
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (26498,26559,26700,26789,28015);
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (26498,26559,26700,26789,28015);
|
||||
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
|
||||
(26498,0,0,0,8,0,100,0,47110,0,0,0,12,26500,3,50000,0,0,0,8,0,0,0,3386.26,-1805.32,114.909,4.945,'Drakuru Bunny 01- On Spellhit - Summmon Image of Drakuru'),
|
||||
(26559,0,0,0,8,0,100,0,47110,0,0,0,12,26543,3,50000,0,0,0,8,0,0,0,4243.98,-2025.08,238.248,1.431,'Drakuru Bunny 02- On Spellhit - Summmon Image of Drakuru'),
|
||||
(26700,0,0,0,8,0,100,0,47110,0,0,0,12,26701,3,50000,0,0,0,8,0,0,0,4523.94,-3472.9,228.393,-0.803,'Drakuru Bunny 03- On Spellhit - Summmon Image of Drakuru'),
|
||||
(26789,0,0,0,8,0,100,0,47110,0,0,0,12,26787,3,50000,0,0,0,8,0,0,0,4599.09,-4875.82,48.956,0.748,'Drakuru Bunny 04- On Spellhit - Summmon Image of Drakuru'),
|
||||
(28015,0,0,0,8,0,100,0,47110,0,0,0,12,28016,3,50000,0,0,0,8,0,0,0,-236.77,-618.61,116.475,4.727,'Drakuru Bunny 05- On Spellhit - Summmon Drakuru');
|
||||
-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Fix Neutralizing the Cauldrons (11647) quest by Shlomi1515 (Issue 3432)
|
||||
UPDATE `creature_template` SET flags_extra='128', AIName='SmartAI' WHERE entry IN (25493,25490,25492);
|
||||
DELETE FROM `smart_scripts` WHERE entryorguid IN (25493,25490,25492);
|
||||
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
|
||||
(25493,0,0,0,8,0,100,0,45653,0,0,0,33,25493,0,0,0,0,0,7,0,0,0,0,0,0,0,'West Enkilah Cauldron - On Spell Hit - Kil Credit'),
|
||||
(25490,0,0,0,8,0,100,0,45653,0,0,0,33,25490,0,0,0,0,0,7,0,0,0,0,0,0,0,'East Enkilah Cauldron - On Spell Hit - Kil Credit'),
|
||||
(25492,0,0,0,8,0,100,0,45653,0,0,0,33,25492,0,0,0,0,0,7,0,0,0,0,0,0,0,'Central Enkilah Cauldron - On Spell Hit - Kil Credit');
|
||||
-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Hallow's End Treats for Jesper/spoops 8311/8312 (Issue 3548)
|
||||
-- Flexing for Nougat (Alliance)
|
||||
SET @INNKEEPER=6740;
|
||||
SET @QUEST=8356;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER AND `id`=2;
|
||||
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
|
||||
(@INNKEEPER,0,2,0,22,0,100,0,41,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Allison - on /flex credit for quest');
|
||||
DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(19,0,@QUEST,0,12,12,0,0,0,'',NULL);
|
||||
-- Chicken Clucking for a Mint (Alliance)
|
||||
SET @INNKEEPER=5111;
|
||||
SET @QUEST=8353;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER AND `id`=2;
|
||||
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
|
||||
(@INNKEEPER,0,2,0,22,0,100,0,22,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Firebrew - on /chicken credit for quest');
|
||||
DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(19,0,@QUEST,0,12,12,0,0,0,'',NULL);
|
||||
-- Dancing for Marzipan (Alliance)
|
||||
SET @INNKEEPER=6735;
|
||||
SET @QUEST=8357;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER AND `id`=2;
|
||||
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
|
||||
(@INNKEEPER,0,2,0,22,0,100,0,34,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Saelienne - on /dance credit for quest');
|
||||
DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(19,0,@QUEST,0,12,12,0,0,0,'',NULL);
|
||||
-- Incoming Gumdrop (Alliance)
|
||||
SET @INNKEEPER=6826;
|
||||
SET @QUEST=8355;
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@INNKEEPER;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER;
|
||||
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
|
||||
(@INNKEEPER,0,0,0,22,0,100,0,264,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Talvash del Kissel - on /train credit for quest');
|
||||
DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(19,0,@QUEST,0,12,12,0,0,0,'',NULL);
|
||||
-- Flexing for Nougat (Horde)
|
||||
SET @INNKEEPER=6929;
|
||||
SET @QUEST=8359;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER AND `id`=2;
|
||||
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
|
||||
(@INNKEEPER,0,2,0,22,0,100,0,41,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Gryshka - on /flex credit for quest');
|
||||
DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(19,0,@QUEST,0,12,12,0,0,0,'',NULL);
|
||||
-- Chicken Clucking for a Mint (Horde)
|
||||
SET @INNKEEPER=6741;
|
||||
SET @QUEST=8354;
|
||||
-- SAI
|
||||
UPDATE `smart_scripts` SET `link`=3 WHERE `entryorguid`=@INNKEEPER AND `id`=2;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER AND `id`=3;
|
||||
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
|
||||
(@INNKEEPER,0,3,0,61,0,100,0,0,0,0,0,15,@QUEST,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Norman - Link - exploreded for quest');
|
||||
-- conditions
|
||||
DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(19,0,@QUEST,0,0,12,0,12,0,0,0,0,'',"Quest avialable only during Hallow's End event");
|
||||
-- Dancing for Marzipan (Horde)
|
||||
SET @INNKEEPER=6746;
|
||||
SET @QUEST=8360;
|
||||
SET @GOSSIP=21215;
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@INNKEEPER;
|
||||
-- Add trick or treat SAI since the .cpp script was removed
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER;
|
||||
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
|
||||
(@INNKEEPER,0,0,1,62,0,100,0,@GOSSIP,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Pala - On gossip option 0 select - Close gossip'),
|
||||
(@INNKEEPER,0,1,0,61,0,100,0,0,0,0,0,85,24751,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Pala - On gossip option 0 select - Player cast Trick or Treat on self'),
|
||||
(@INNKEEPER,0,2,0,22,0,100,0,34,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Pala - on /dance credit for quest');
|
||||
-- Add gossip menu option for trick or treat
|
||||
DELETE FROM `gossip_menu_option` WHERE `menu_id`=@GOSSIP;
|
||||
INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES
|
||||
(@GOSSIP,1,5,'Make this inn your home.',8,65536,0,0,0,0,''),
|
||||
(@GOSSIP,2,1,'I want to browse your goods',3,128,0,0,0,0,''),
|
||||
(@GOSSIP,0,0,'Trick or Treat!',1,1,0,0,0,0,'');
|
||||
-- Add conditions must be hallows end for Dancing for Marzipan quest and trick or treat option
|
||||
DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST;
|
||||
DELETE FROM `conditions` WHERE `SourceGroup`=@GOSSIP;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(19,0,@QUEST,0,12,12,0,0,0,'',NULL),
|
||||
(15,@GOSSIP,0,0,12,12,0,0,0,'',NULL);
|
||||
-- Incoming Gumdrop (Horde)
|
||||
SET @INNKEEPER=11814;
|
||||
SET @QUEST=8358;
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@INNKEEPER;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER;
|
||||
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
|
||||
(@INNKEEPER,0,0,0,22,0,100,0,264,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Kali Remik - on /train credit for quest');
|
||||
DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(19,0,@QUEST,0,12,12,0,0,0,'',NULL);
|
||||
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `battleground_template` WHERE `id` = 6;
|
||||
INSERT INTO `battleground_template` (`id`, `MinPlayersPerTeam`, `MaxPlayersPerTeam`, `MinLvl`, `MaxLvl`, `AllianceStartLoc`, `AllianceStartO`, `HordeStartLoc`, `HordeStartO`, `StartMaxDist`, `Weight`, `ScriptName`, `Comment`) VALUES
|
||||
(6,0,2,10,80,0,0,0,0,0,1,'','All Arena');
|
||||
@@ -652,7 +652,12 @@ void Battleground::SendPacketToTeam(uint32 TeamID, WorldPacket* packet, Player*
|
||||
for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
|
||||
if (Player* player = _GetPlayerForTeam(TeamID, itr, "SendPacketToTeam"))
|
||||
if (self || sender != player)
|
||||
player->GetSession()->SendPacket(packet);
|
||||
{
|
||||
WorldSession* session = player->GetSession();
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "%s %s - SendPacketToTeam %u, Player: %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str(),
|
||||
session->GetPlayerInfo().c_str(), TeamID, sender ? sender->GetName().c_str() : "null");
|
||||
session->SendPacket(packet);
|
||||
}
|
||||
}
|
||||
|
||||
void Battleground::PlaySoundToAll(uint32 SoundID)
|
||||
@@ -1092,7 +1097,7 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
|
||||
if (Transport)
|
||||
player->TeleportToBGEntryPoint();
|
||||
|
||||
sLog->outInfo(LOG_FILTER_BATTLEGROUND, "BATTLEGROUND: Removed player %s from Battleground.", player->GetName().c_str());
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Removed player %s from Battleground.", player->GetName().c_str());
|
||||
}
|
||||
|
||||
//battleground object will be deleted next Battleground::Update() call
|
||||
@@ -1106,9 +1111,6 @@ void Battleground::Reset()
|
||||
SetElapsedTime(0);
|
||||
SetRemainingTime(0);
|
||||
SetLastResurrectTime(0);
|
||||
SetArenaType(0);
|
||||
SetRated(false);
|
||||
|
||||
m_Events = 0;
|
||||
|
||||
if (m_InvitedAlliance > 0 || m_InvitedHorde > 0)
|
||||
@@ -1205,10 +1207,9 @@ void Battleground::AddPlayer(Player* player)
|
||||
player->ResetAllPowers();
|
||||
}
|
||||
|
||||
WorldPacket teammate;
|
||||
teammate.Initialize(SMSG_ARENA_OPPONENT_UPDATE, 8);
|
||||
teammate << uint64(player->GetGUID());
|
||||
SendPacketToTeam(team, &teammate, player, false);
|
||||
WorldPacket data(SMSG_ARENA_OPPONENT_UPDATE, 8);
|
||||
data << uint64(player->GetGUID());
|
||||
SendPacketToTeam(team, &data, player, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1231,9 +1232,6 @@ void Battleground::AddPlayer(Player* player)
|
||||
// setup BG group membership
|
||||
PlayerAddedToBGCheckIfBGIsRunning(player);
|
||||
AddOrSetPlayerToCorrectBgGroup(player, team);
|
||||
|
||||
// Log
|
||||
sLog->outInfo(LOG_FILTER_BATTLEGROUND, "BATTLEGROUND: Player %s joined the battle.", player->GetName().c_str());
|
||||
}
|
||||
|
||||
// this method adds player to his team's bg group, or sets his correct group if player is already in bg group
|
||||
|
||||
@@ -133,7 +133,7 @@ void BattlegroundMgr::Update(uint32 diff)
|
||||
if (m_NextRatedArenaUpdate < diff)
|
||||
{
|
||||
// forced update for rated arenas (scan all, but skipped non rated)
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BattlegroundMgr: UPDATING ARENA QUEUES");
|
||||
sLog->outTrace(LOG_FILTER_ARENAS, "BattlegroundMgr: UPDATING ARENA QUEUES");
|
||||
for (int qtype = BATTLEGROUND_QUEUE_2v2; qtype <= BATTLEGROUND_QUEUE_5v5; ++qtype)
|
||||
for (int bracket = BG_BRACKET_ID_FIRST; bracket < MAX_BATTLEGROUND_BRACKETS; ++bracket)
|
||||
m_BattlegroundQueues[qtype].BattlegroundQueueUpdate(diff,
|
||||
@@ -1250,16 +1250,12 @@ BattlegroundQueueTypeId BattlegroundMgr::BGQueueTypeId(BattlegroundTypeId bgType
|
||||
{
|
||||
switch (bgTypeId)
|
||||
{
|
||||
case BATTLEGROUND_WS:
|
||||
return BATTLEGROUND_QUEUE_WS;
|
||||
case BATTLEGROUND_AB:
|
||||
return BATTLEGROUND_QUEUE_AB;
|
||||
case BATTLEGROUND_AV:
|
||||
return BATTLEGROUND_QUEUE_AV;
|
||||
case BATTLEGROUND_EY:
|
||||
return BATTLEGROUND_QUEUE_EY;
|
||||
case BATTLEGROUND_SA:
|
||||
return BATTLEGROUND_QUEUE_SA;
|
||||
case BATTLEGROUND_IC:
|
||||
return BATTLEGROUND_QUEUE_IC;
|
||||
case BATTLEGROUND_TP:
|
||||
@@ -1268,11 +1264,15 @@ BattlegroundQueueTypeId BattlegroundMgr::BGQueueTypeId(BattlegroundTypeId bgType
|
||||
return BATTLEGROUND_QUEUE_BFG;
|
||||
case BATTLEGROUND_RB:
|
||||
return BATTLEGROUND_QUEUE_RB;
|
||||
case BATTLEGROUND_SA:
|
||||
return BATTLEGROUND_QUEUE_SA;
|
||||
case BATTLEGROUND_WS:
|
||||
return BATTLEGROUND_QUEUE_WS;
|
||||
case BATTLEGROUND_AA:
|
||||
case BATTLEGROUND_NA:
|
||||
case BATTLEGROUND_RL:
|
||||
case BATTLEGROUND_BE:
|
||||
case BATTLEGROUND_DS:
|
||||
case BATTLEGROUND_NA:
|
||||
case BATTLEGROUND_RL:
|
||||
case BATTLEGROUND_RV:
|
||||
switch (arenaType)
|
||||
{
|
||||
|
||||
@@ -475,7 +475,7 @@ bool BattlegroundQueue::InviteGroupToBG(GroupQueueInfo* ginfo, Battleground* bg,
|
||||
|
||||
uint32 queueSlot = player->GetBattlegroundQueueIndex(bgQueueTypeId);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: invited player %s (%u) to BG instance %u queueindex %u bgtype %u, I can't help it if they don't press the enter battle button.",
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: invited player %s (%u) to BG instance %u queueindex %u bgtype %u",
|
||||
player->GetName().c_str(), player->GetGUIDLow(), bg->GetInstanceID(), queueSlot, bg->GetTypeID());
|
||||
|
||||
// send status packet
|
||||
|
||||
@@ -1298,7 +1298,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
|
||||
// If this is a creature and it attacks from behind it has a probability to daze it's victim
|
||||
if ((damageInfo->hitOutCome == MELEE_HIT_CRIT || damageInfo->hitOutCome == MELEE_HIT_CRUSHING || damageInfo->hitOutCome == MELEE_HIT_NORMAL || damageInfo->hitOutCome == MELEE_HIT_GLANCING) &&
|
||||
GetTypeId() != TYPEID_PLAYER && !ToCreature()->IsControlledByPlayer() && !victim->HasInArc(M_PI, this)
|
||||
&& (victim->GetTypeId() == TYPEID_PLAYER || !victim->ToCreature()->isWorldBoss()))
|
||||
&& (victim->GetTypeId() == TYPEID_PLAYER || !victim->ToCreature()->isWorldBoss())&& !victim->IsVehicle())
|
||||
{
|
||||
// -probability is between 0% and 40%
|
||||
// 20% base chance
|
||||
@@ -1311,7 +1311,10 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
|
||||
uint32 VictimDefense = victim->GetMaxSkillValueForLevel(this);
|
||||
uint32 AttackerMeleeSkill = GetMaxSkillValueForLevel();
|
||||
|
||||
Probability *= AttackerMeleeSkill/(float)VictimDefense;
|
||||
Probability *= AttackerMeleeSkill/(float)VictimDefense*0.16;
|
||||
|
||||
if (Probability < 0)
|
||||
Probability = 0;
|
||||
|
||||
if (Probability > 40.0f)
|
||||
Probability = 40.0f;
|
||||
|
||||
@@ -431,14 +431,16 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
|
||||
|
||||
if (!_player->InBattlegroundQueue())
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BattlegroundHandler: Invalid CMSG_BATTLEFIELD_PORT received from player (Name: %s, GUID: %u), he is not in bg_queue.", _player->GetName().c_str(), _player->GetGUIDLow());
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, Action: %u. Player not in queue!",
|
||||
GetPlayerInfo().c_str(), queueSlot, unk, time, action);
|
||||
return;
|
||||
}
|
||||
|
||||
BattlegroundQueueTypeId bgQueueTypeId = _player->GetBattlegroundQueueTypeId(queueSlot);
|
||||
if (bgQueueTypeId == BATTLEGROUND_QUEUE_NONE)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BattlegroundHandler: invalid queueSlot (%u) received.", queueSlot);
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, Action: %u. Invalid queueSlot!",
|
||||
GetPlayerInfo().c_str(), queueSlot, unk, time, action);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -449,27 +451,39 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
|
||||
GroupQueueInfo ginfo;
|
||||
if (!bgQueue.GetPlayerGroupInfoData(_player->GetGUID(), &ginfo))
|
||||
{
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "BattlegroundHandler: itrplayerstatus not found.");
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, Action: %u. Player not in queue (No player Group Info)!",
|
||||
GetPlayerInfo().c_str(), queueSlot, unk, time, action);
|
||||
return;
|
||||
}
|
||||
// if action == 1, then instanceId is required
|
||||
if (!ginfo.IsInvitedToBGInstanceGUID && action == 1)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "BattlegroundHandler: instance not found.");
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, Action: %u. Player is not invited to any bg!",
|
||||
GetPlayerInfo().c_str(), queueSlot, unk, time, action);
|
||||
return;
|
||||
}
|
||||
|
||||
Battleground* bg = sBattlegroundMgr->GetBattleground(ginfo.IsInvitedToBGInstanceGUID, bgTypeId);
|
||||
|
||||
// bg template might and must be used in case of leaving queue, when instance is not created yet
|
||||
if (!bg && action == 0)
|
||||
bg = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId);
|
||||
if (!bg)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "BattlegroundHandler: bg_template not found for type id %u.", bgTypeId);
|
||||
return;
|
||||
if (action)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, Action: %u. Cant find BG with id %u!",
|
||||
GetPlayerInfo().c_str(), queueSlot, unk, time, action);
|
||||
return;
|
||||
}
|
||||
|
||||
bg = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId);
|
||||
if (!bg)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "BattlegroundHandler: bg_template not found for type id %u.", bgTypeId);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, Action: %u.",
|
||||
GetPlayerInfo().c_str(), queueSlot, unk, time, action);
|
||||
|
||||
// expected bracket entry
|
||||
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel());
|
||||
if (!bracketEntry)
|
||||
@@ -486,87 +500,83 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
|
||||
sBattlegroundMgr->BuildStatusFailedPacket(&data2, bg, _player, 0, ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS);
|
||||
_player->GetSession()->SendPacket(&data2);
|
||||
action = 0;
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: player %s (%u) has a deserter debuff, do not port him to battleground!", _player->GetName().c_str(), _player->GetGUIDLow());
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Player %s (%u) has a deserter debuff, do not port him to battleground!", _player->GetName().c_str(), _player->GetGUIDLow());
|
||||
}
|
||||
//if player don't match battleground max level, then do not allow him to enter! (this might happen when player leveled up during his waiting in queue
|
||||
if (_player->getLevel() > bg->GetMaxLevel())
|
||||
{
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "Battleground: Player %s (%u) has level (%u) higher than maxlevel (%u) of battleground (%u)! Do not port him to battleground!",
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Player %s (%u) has level (%u) higher than maxlevel (%u) of battleground (%u)! Do not port him to battleground!",
|
||||
_player->GetName().c_str(), _player->GetGUIDLow(), _player->getLevel(), bg->GetMaxLevel(), bg->GetTypeID());
|
||||
action = 0;
|
||||
}
|
||||
}
|
||||
|
||||
WorldPacket data;
|
||||
switch (action)
|
||||
if (action)
|
||||
{
|
||||
case 1: // port to battleground
|
||||
if (!_player->IsInvitedForBattlegroundQueueType(bgQueueTypeId))
|
||||
return; // cheating?
|
||||
if (!_player->IsInvitedForBattlegroundQueueType(bgQueueTypeId))
|
||||
return; // cheating?
|
||||
|
||||
if (!_player->InBattleground())
|
||||
_player->SetBattlegroundEntryPoint();
|
||||
if (!_player->InBattleground())
|
||||
_player->SetBattlegroundEntryPoint();
|
||||
|
||||
// resurrect the player
|
||||
if (!_player->isAlive())
|
||||
// resurrect the player
|
||||
if (!_player->isAlive())
|
||||
{
|
||||
_player->ResurrectPlayer(1.0f);
|
||||
_player->SpawnCorpseBones();
|
||||
}
|
||||
// stop taxi flight at port
|
||||
if (_player->isInFlight())
|
||||
{
|
||||
_player->GetMotionMaster()->MovementExpired();
|
||||
_player->CleanupAfterTaxiFlight();
|
||||
}
|
||||
|
||||
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, _player, queueSlot, STATUS_IN_PROGRESS, _player->GetBattlegroundQueueJoinTime(bgTypeId), bg->GetElapsedTime(), bg->GetArenaType());
|
||||
_player->GetSession()->SendPacket(&data);
|
||||
// remove battleground queue status from BGmgr
|
||||
bgQueue.RemovePlayer(_player->GetGUID(), false);
|
||||
// this is still needed here if battleground "jumping" shouldn't add deserter debuff
|
||||
// also this is required to prevent stuck at old battleground after SetBattlegroundId set to new
|
||||
if (Battleground* currentBg = _player->GetBattleground())
|
||||
currentBg->RemovePlayerAtLeave(_player->GetGUID(), false, true);
|
||||
|
||||
// set the destination instance id
|
||||
_player->SetBattlegroundId(bg->GetInstanceID(), bgTypeId);
|
||||
// set the destination team
|
||||
_player->SetBGTeam(ginfo.Team);
|
||||
// bg->HandleBeforeTeleportToBattleground(_player);
|
||||
sBattlegroundMgr->SendToBattleground(_player, ginfo.IsInvitedToBGInstanceGUID, bgTypeId);
|
||||
// add only in HandleMoveWorldPortAck()
|
||||
// bg->AddPlayer(_player, team);
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: player %s (%u) joined battle for bg %u, bgtype %u, queue type %u.", _player->GetName().c_str(), _player->GetGUIDLow(), bg->GetInstanceID(), bg->GetTypeID(), bgQueueTypeId);
|
||||
}
|
||||
else // leave queue
|
||||
{
|
||||
if (bg->isArena() && bg->GetStatus() > STATUS_WAIT_QUEUE)
|
||||
return;
|
||||
|
||||
// if player leaves rated arena match before match start, it is counted as he played but he lost
|
||||
if (ginfo.IsRated && ginfo.IsInvitedToBGInstanceGUID)
|
||||
{
|
||||
ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(ginfo.Team);
|
||||
if (at)
|
||||
{
|
||||
_player->ResurrectPlayer(1.0f);
|
||||
_player->SpawnCorpseBones();
|
||||
}
|
||||
// stop taxi flight at port
|
||||
if (_player->isInFlight())
|
||||
{
|
||||
_player->GetMotionMaster()->MovementExpired();
|
||||
_player->CleanupAfterTaxiFlight();
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "UPDATING memberLost's personal arena rating for %u by opponents rating: %u, because he has left queue!", GUID_LOPART(_player->GetGUID()), ginfo.OpponentsTeamRating);
|
||||
at->MemberLost(_player, ginfo.OpponentsMatchmakerRating);
|
||||
at->SaveToDB();
|
||||
}
|
||||
}
|
||||
_player->RemoveBattlegroundQueueId(bgQueueTypeId); // must be called this way, because if you move this call to queue->removeplayer, it causes bugs
|
||||
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, _player, queueSlot, STATUS_NONE, _player->GetBattlegroundQueueJoinTime(bgTypeId), 0, 0);
|
||||
|
||||
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, _player, queueSlot, STATUS_IN_PROGRESS, _player->GetBattlegroundQueueJoinTime(bgTypeId), bg->GetElapsedTime(), bg->GetArenaType());
|
||||
_player->GetSession()->SendPacket(&data);
|
||||
// remove battleground queue status from BGmgr
|
||||
bgQueue.RemovePlayer(_player->GetGUID(), false);
|
||||
// this is still needed here if battleground "jumping" shouldn't add deserter debuff
|
||||
// also this is required to prevent stuck at old battleground after SetBattlegroundId set to new
|
||||
if (Battleground* currentBg = _player->GetBattleground())
|
||||
currentBg->RemovePlayerAtLeave(_player->GetGUID(), false, true);
|
||||
|
||||
// set the destination instance id
|
||||
_player->SetBattlegroundId(bg->GetInstanceID(), bgTypeId);
|
||||
// set the destination team
|
||||
_player->SetBGTeam(ginfo.Team);
|
||||
// bg->HandleBeforeTeleportToBattleground(_player);
|
||||
sBattlegroundMgr->SendToBattleground(_player, ginfo.IsInvitedToBGInstanceGUID, bgTypeId);
|
||||
// add only in HandleMoveWorldPortAck()
|
||||
// bg->AddPlayer(_player, team);
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: player %s (%u) joined battle for bg %u, bgtype %u, queue type %u.", _player->GetName().c_str(), _player->GetGUIDLow(), bg->GetInstanceID(), bg->GetTypeID(), bgQueueTypeId);
|
||||
break;
|
||||
case 0: // leave queue
|
||||
if (bg->isArena() && bg->GetStatus() > STATUS_WAIT_QUEUE)
|
||||
return;
|
||||
|
||||
// if player leaves rated arena match before match start, it is counted as he played but he lost
|
||||
if (ginfo.IsRated && ginfo.IsInvitedToBGInstanceGUID)
|
||||
{
|
||||
ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(ginfo.Team);
|
||||
if (at)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "UPDATING memberLost's personal arena rating for %u by opponents rating: %u, because he has left queue!", GUID_LOPART(_player->GetGUID()), ginfo.OpponentsTeamRating);
|
||||
at->MemberLost(_player, ginfo.OpponentsMatchmakerRating);
|
||||
at->SaveToDB();
|
||||
}
|
||||
}
|
||||
_player->RemoveBattlegroundQueueId(bgQueueTypeId); // must be called this way, because if you move this call to queue->removeplayer, it causes bugs
|
||||
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, _player, queueSlot, STATUS_NONE, _player->GetBattlegroundQueueJoinTime(bgTypeId), 0, 0);
|
||||
|
||||
bgQueue.RemovePlayer(_player->GetGUID(), true);
|
||||
// player left queue, we should update it - do not update Arena Queue
|
||||
if (!ginfo.ArenaType)
|
||||
sBattlegroundMgr->ScheduleQueueUpdate(ginfo.ArenaMatchmakerRating, ginfo.ArenaType, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
|
||||
SendPacket(&data);
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: player %s (%u) left queue for bgtype %u, queue type %u.", _player->GetName().c_str(), _player->GetGUIDLow(), bg->GetTypeID(), bgQueueTypeId);
|
||||
break;
|
||||
default:
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "Battleground port: unknown action %u", action);
|
||||
break;
|
||||
bgQueue.RemovePlayer(_player->GetGUID(), true);
|
||||
// player left queue, we should update it - do not update Arena Queue
|
||||
if (!ginfo.ArenaType)
|
||||
sBattlegroundMgr->ScheduleQueueUpdate(ginfo.ArenaMatchmakerRating, ginfo.ArenaType, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
|
||||
SendPacket(&data);
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: player %s (%u) left queue for bgtype %u, queue type %u.", _player->GetName().c_str(), _player->GetGUIDLow(), bg->GetTypeID(), bgQueueTypeId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1445,25 +1445,21 @@ void WorldSession::HandleFarSightOpcode(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_FAR_SIGHT");
|
||||
|
||||
uint8 apply;
|
||||
bool apply;
|
||||
recvData >> apply;
|
||||
|
||||
switch (apply)
|
||||
if (apply)
|
||||
{
|
||||
case 0:
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Player %u set vision to self", _player->GetGUIDLow());
|
||||
_player->SetSeer(_player);
|
||||
break;
|
||||
case 1:
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Added FarSight " UI64FMTD " to player %u", _player->GetUInt64Value(PLAYER_FARSIGHT), _player->GetGUIDLow());
|
||||
if (WorldObject* target = _player->GetViewpoint())
|
||||
_player->SetSeer(target);
|
||||
else
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "Player %s requests non-existing seer " UI64FMTD, _player->GetName().c_str(), _player->GetUInt64Value(PLAYER_FARSIGHT));
|
||||
break;
|
||||
default:
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Unhandled mode in CMSG_FAR_SIGHT: %u", apply);
|
||||
return;
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Added FarSight " UI64FMTD " to player %u", _player->GetUInt64Value(PLAYER_FARSIGHT), _player->GetGUIDLow());
|
||||
if (WorldObject* target = _player->GetViewpoint())
|
||||
_player->SetSeer(target);
|
||||
else
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "Player %s requests non-existing seer " UI64FMTD, _player->GetName().c_str(), _player->GetUInt64Value(PLAYER_FARSIGHT));
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Player %u set vision to self", _player->GetGUIDLow());
|
||||
_player->SetSeer(_player);
|
||||
}
|
||||
|
||||
GetPlayer()->UpdateVisibilityForPlayer();
|
||||
@@ -1530,7 +1526,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket& recvData)
|
||||
|
||||
if (mode >= MAX_DUNGEON_DIFFICULTY)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetDungeonDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode);
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetDungeonDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1541,7 +1537,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket& recvData)
|
||||
Map* map = _player->FindMap();
|
||||
if (map && map->IsDungeon())
|
||||
{
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetDungeonDifficultyOpcode: player (Name: %s, GUID: %u) tried to reset the instance while player is inside!",
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetDungeonDifficultyOpcode: player (Name: %s, GUID: %u) tried to reset the instance while player is inside!",
|
||||
_player->GetName().c_str(), _player->GetGUIDLow());
|
||||
return;
|
||||
}
|
||||
@@ -1562,7 +1558,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket& recvData)
|
||||
|
||||
if (groupGuy->GetMap()->IsNonRaidDungeon())
|
||||
{
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while group member (Name: %s, GUID: %u) is inside!",
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while group member (Name: %s, GUID: %u) is inside!",
|
||||
_player->GetGUIDLow(), groupGuy->GetName().c_str(), groupGuy->GetGUIDLow());
|
||||
return;
|
||||
}
|
||||
@@ -1597,7 +1593,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recvData)
|
||||
Map* map = _player->FindMap();
|
||||
if (map && map->IsDungeon())
|
||||
{
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1620,7 +1616,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recvData)
|
||||
|
||||
if (groupGuy->GetMap()->IsRaid())
|
||||
{
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -958,8 +958,8 @@ enum TrinityStrings
|
||||
LANG_BATTLEGROUND = 5015,
|
||||
LANG_ARENA = 5016,
|
||||
LANG_RAID = 5017,
|
||||
LANG_HEROIC = 5018,
|
||||
LANG_MOUNTABLE = 5019,
|
||||
//= 5018,
|
||||
//= 5019,
|
||||
LANG_NPCINFO_PHASEMASK = 5020,
|
||||
LANG_NPCINFO_ARMOR = 5021,
|
||||
LANG_CHANNEL_ENABLE_OWNERSHIP = 5022,
|
||||
|
||||
@@ -208,7 +208,7 @@ bool MoveSplineInitArgs::Validate(Unit* unit) const
|
||||
#define CHECK(exp) \
|
||||
if (!(exp))\
|
||||
{\
|
||||
sLog->outError(LOG_FILTER_GENERAL, "MoveSplineInitArgs::Validate: expression '%s' failed for GUID: %u", #exp, unit->GetTypeId() == TYPEID_PLAYER ? unit->GetGUIDLow() : unit->ToCreature()->GetDBTableGUIDLow());\
|
||||
sLog->outError(LOG_FILTER_GENERAL, "MoveSplineInitArgs::Validate: expression '%s' failed for GUID: %u Entry: %u", #exp, unit->GetTypeId() == TYPEID_PLAYER ? unit->GetGUIDLow() : unit->ToCreature()->GetDBTableGUIDLow(), unit->GetEntry());\
|
||||
return false;\
|
||||
}
|
||||
CHECK(path.size() > 1);
|
||||
|
||||
@@ -918,6 +918,17 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
uint32 recruiter = fields[9].GetUInt32();
|
||||
std::string os = fields[10].GetString();
|
||||
|
||||
// Must be done before WorldSession is created
|
||||
if (sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED) && os != "Win" && os != "OSX")
|
||||
{
|
||||
packet.Initialize(SMSG_AUTH_RESPONSE, 1);
|
||||
packet << uint8(AUTH_REJECT);
|
||||
SendPacket(packet);
|
||||
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: Client %s attempted to log in using invalid client OS (%s).", GetRemoteAddress().c_str(), os.c_str());
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Checks gmlevel per Realm
|
||||
stmt = LoginDatabase.GetPreparedStatement(LOGIN_GET_GMLEVEL_BY_REALMID);
|
||||
|
||||
|
||||
@@ -5469,6 +5469,9 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
|
||||
if (target->GetCharmerGUID())
|
||||
return SPELL_FAILED_CHARMED;
|
||||
|
||||
if (target->GetOwner() && target->GetOwner()->GetTypeId() == TYPEID_PLAYER)
|
||||
return SPELL_FAILED_TARGET_IS_PLAYER_CONTROLLED;
|
||||
|
||||
int32 damage = CalculateDamage(i, target);
|
||||
if (damage && int32(target->getLevel()) > damage)
|
||||
|
||||
@@ -65,6 +65,47 @@ class CreatureTextBuilder
|
||||
uint64 _targetGUID;
|
||||
};
|
||||
|
||||
class PlayerTextBuilder
|
||||
{
|
||||
public:
|
||||
PlayerTextBuilder(WorldObject* obj, WorldObject* speaker, ChatMsg msgtype, uint8 textGroup, uint32 id, uint32 language, uint64 targetGUID)
|
||||
: _source(obj), _talker(speaker), _msgType(msgtype), _textGroup(textGroup), _textId(id), _language(language), _targetGUID(targetGUID)
|
||||
{
|
||||
}
|
||||
|
||||
size_t operator()(WorldPacket* data, LocaleConstant locale) const
|
||||
{
|
||||
std::string const& text = sCreatureTextMgr->GetLocalizedChatString(_source->GetEntry(), _textGroup, _textId, locale);
|
||||
|
||||
*data << uint8(_msgType);
|
||||
*data << uint32(_language);
|
||||
*data << uint64(_talker->GetGUID());
|
||||
*data << uint32(1); // 2.1.0
|
||||
*data << uint32(_talker->GetName().size() + 1);
|
||||
*data << _talker->GetName();
|
||||
size_t whisperGUIDpos = data->wpos();
|
||||
*data << uint64(_targetGUID); // Unit Target
|
||||
if (_targetGUID && !IS_PLAYER_GUID(_targetGUID))
|
||||
{
|
||||
*data << uint32(1); // target name length
|
||||
*data << uint8(0); // target name
|
||||
}
|
||||
*data << uint32(text.length() + 1);
|
||||
*data << text;
|
||||
*data << uint8(0); // ChatTag
|
||||
|
||||
return whisperGUIDpos;
|
||||
}
|
||||
|
||||
WorldObject* _source;
|
||||
WorldObject* _talker;
|
||||
ChatMsg _msgType;
|
||||
uint8 _textGroup;
|
||||
uint32 _textId;
|
||||
uint32 _language;
|
||||
uint64 _targetGUID;
|
||||
};
|
||||
|
||||
void CreatureTextMgr::LoadCreatureTexts()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
@@ -261,8 +302,16 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, uint64 whisp
|
||||
if (iter->emote)
|
||||
SendEmote(finalSource, iter->emote);
|
||||
|
||||
CreatureTextBuilder builder(finalSource, finalType, iter->group, iter->id, finalLang, whisperGuid);
|
||||
SendChatPacket(finalSource, builder, finalType, whisperGuid, range, team, gmOnly);
|
||||
if (srcPlr)
|
||||
{
|
||||
PlayerTextBuilder builder(source, finalSource, finalType, iter->group, iter->id, finalLang, whisperGuid);
|
||||
SendChatPacket(finalSource, builder, finalType, whisperGuid, range, team, gmOnly);
|
||||
}
|
||||
else
|
||||
{
|
||||
CreatureTextBuilder builder(finalSource, finalType, iter->group, iter->id, finalLang, whisperGuid);
|
||||
SendChatPacket(finalSource, builder, finalType, whisperGuid, range, team, gmOnly);
|
||||
}
|
||||
if (isEqualChanced || (!isEqualChanced && totalChance == 100.0f))
|
||||
SetRepeatId(source, textGroup, iter->id);
|
||||
|
||||
|
||||
@@ -151,13 +151,28 @@ bool Warden::IsValidCheckSum(uint32 checksum, const uint8* data, const uint16 le
|
||||
}
|
||||
}
|
||||
|
||||
struct keyData {
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint8 bytes[20];
|
||||
} bytes;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 ints[5];
|
||||
} ints;
|
||||
};
|
||||
};
|
||||
|
||||
uint32 Warden::BuildChecksum(const uint8* data, uint32 length)
|
||||
{
|
||||
uint8 hash[20];
|
||||
SHA1(data, length, hash);
|
||||
keyData hash;
|
||||
SHA1(data, length, hash.bytes.bytes);
|
||||
uint32 checkSum = 0;
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
checkSum = checkSum ^ *(uint32*)(&hash[0] + i * 4);
|
||||
checkSum = checkSum ^ hash.ints.ints[i];
|
||||
|
||||
return checkSum;
|
||||
}
|
||||
|
||||
@@ -114,17 +114,32 @@ void WardenMac::RequestHash()
|
||||
_session->SendPacket(&pkt);
|
||||
}
|
||||
|
||||
struct keyData {
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint8 bytes[16];
|
||||
} bytes;
|
||||
|
||||
struct
|
||||
{
|
||||
int ints[4];
|
||||
} ints;
|
||||
};
|
||||
};
|
||||
|
||||
void WardenMac::HandleHashResult(ByteBuffer &buff)
|
||||
{
|
||||
|
||||
// test
|
||||
int keyIn[4];
|
||||
|
||||
uint8 mod_seed[16] = { 0x4D, 0x80, 0x8D, 0x2C, 0x77, 0xD9, 0x05, 0xC4, 0x1A, 0x63, 0x80, 0xEC, 0x08, 0x58, 0x6A, 0xFE };
|
||||
keyData mod_seed = { { { { 0x4D, 0x80, 0x8D, 0x2C, 0x77, 0xD9, 0x05, 0xC4, 0x1A, 0x63, 0x80, 0xEC, 0x08, 0x58, 0x6A, 0xFE } } } };
|
||||
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
keyIn[i] = *(int*)(&mod_seed[0] + i * 4);
|
||||
keyIn[i] = mod_seed.ints.ints[i];
|
||||
}
|
||||
|
||||
int keyOut[4];
|
||||
|
||||
@@ -1027,109 +1027,72 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleLookupMapCommand(ChatHandler* /*handler*/, char const* args)
|
||||
static bool HandleLookupMapCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
/*
|
||||
|
||||
std::string namePart = args;
|
||||
std::wstring wNamePart;
|
||||
|
||||
// converting string that we try to find to lower case
|
||||
if (!Utf8toWStr(namePart, wNamePart))
|
||||
return false;
|
||||
|
||||
wstrToLower(wNamePart);
|
||||
|
||||
bool found = false;
|
||||
uint32 counter = 0;
|
||||
uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
|
||||
uint8 locale = handler->GetSession() ? handler->GetSession()->GetSessionDbcLocale() : sWorld->GetDefaultDbcLocale();
|
||||
|
||||
// search in Map.dbc
|
||||
for (uint32 id = 0; id < sMapStore.GetNumRows(); id++)
|
||||
{
|
||||
MapEntry const* MapInfo = sMapStore.LookupEntry(id);
|
||||
if (MapInfo)
|
||||
if (MapEntry const* mapInfo = sMapStore.LookupEntry(id))
|
||||
{
|
||||
uint8 locale = handler->GetSession() ? handler->GetSession()->GetSessionDbcLocale() : sWorld->GetDefaultDbcLocale();
|
||||
|
||||
std::string name = MapInfo->name[locale];
|
||||
std::string name = mapInfo->name[locale];
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
if (!Utf8FitTo(name, wNamePart))
|
||||
if (Utf8FitTo(name, wNamePart) && locale < TOTAL_LOCALES)
|
||||
{
|
||||
locale = LOCALE_enUS;
|
||||
for (; locale < TOTAL_LOCALES; locale++)
|
||||
if (maxResults && counter == maxResults)
|
||||
{
|
||||
if (handler->GetSession() && locale == handler->GetSession()->GetSessionDbcLocale())
|
||||
continue;
|
||||
|
||||
name = MapInfo->name[locale];
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
if (Utf8FitTo(name, wNamePart))
|
||||
break;
|
||||
handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (locale < TOTAL_LOCALES)
|
||||
{
|
||||
// send map in "id - [name][Continent][Instance/Battleground/Arena][Raid reset time:][Heroic reset time:][Mountable]" format
|
||||
std::ostringstream ss;
|
||||
ss << id << " - [" << name << ']';
|
||||
|
||||
if (handler->GetSession())
|
||||
ss << id << " - |cffffffff|Hmap:" << id << "|h[" << name << ']';
|
||||
else // console
|
||||
ss << id << " - [" << name << ']';
|
||||
|
||||
if (MapInfo->IsContinent())
|
||||
if (mapInfo->IsContinent())
|
||||
ss << handler->GetTrinityString(LANG_CONTINENT);
|
||||
|
||||
switch (MapInfo->map_type)
|
||||
switch (mapInfo->map_type)
|
||||
{
|
||||
case MAP_INSTANCE: ss << handler->GetTrinityString(LANG_INSTANCE); break;
|
||||
case MAP_BATTLEGROUND: ss << handler->GetTrinityString(LANG_BATTLEGROUND); break;
|
||||
case MAP_ARENA: ss << handler->GetTrinityString(LANG_ARENA); break;
|
||||
case MAP_INSTANCE:
|
||||
ss << handler->GetTrinityString(LANG_INSTANCE);
|
||||
break;
|
||||
case MAP_RAID:
|
||||
ss << handler->GetTrinityString(LANG_RAID);
|
||||
break;
|
||||
case MAP_BATTLEGROUND:
|
||||
ss << handler->GetTrinityString(LANG_BATTLEGROUND);
|
||||
break;
|
||||
case MAP_ARENA:
|
||||
ss << handler->GetTrinityString(LANG_ARENA);
|
||||
break;
|
||||
}
|
||||
|
||||
if (MapInfo->IsRaid())
|
||||
ss << handler->GetTrinityString(LANG_RAID);
|
||||
handler->SendSysMessage(ss.str().c_str());
|
||||
|
||||
if (MapInfo->SupportsHeroicMode())
|
||||
ss << handler->GetTrinityString(LANG_HEROIC);
|
||||
|
||||
uint32 ResetTimeRaid = MapInfo->resetTimeRaid;
|
||||
|
||||
std::string ResetTimeRaidStr;
|
||||
if (ResetTimeRaid)
|
||||
ResetTimeRaidStr = secsToTimeString(ResetTimeRaid, true, false);
|
||||
|
||||
uint32 ResetTimeHeroic = MapInfo->resetTimeHeroic;
|
||||
std::string ResetTimeHeroicStr;
|
||||
if (ResetTimeHeroic)
|
||||
ResetTimeHeroicStr = secsToTimeString(ResetTimeHeroic, true, false);
|
||||
|
||||
if (MapInfo->IsMountAllowed())
|
||||
ss << handler->GetTrinityString(LANG_MOUNTABLE);
|
||||
|
||||
if (ResetTimeRaid && !ResetTimeHeroic)
|
||||
handler->PSendSysMessage(ss.str().c_str(), ResetTimeRaidStr.c_str());
|
||||
else if (!ResetTimeRaid && ResetTimeHeroic)
|
||||
handler->PSendSysMessage(ss.str().c_str(), ResetTimeHeroicStr.c_str());
|
||||
else if (ResetTimeRaid && ResetTimeHeroic)
|
||||
handler->PSendSysMessage(ss.str().c_str(), ResetTimeRaidStr.c_str(), ResetTimeHeroicStr.c_str());
|
||||
else
|
||||
handler->SendSysMessage(ss.str().c_str());
|
||||
|
||||
if (!found)
|
||||
found = true;
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
if (!counter)
|
||||
handler->SendSysMessage(LANG_COMMAND_NOMAPFOUND);
|
||||
*/
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "SpellScript.h"
|
||||
#include "Spell.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "PassiveAI.h"
|
||||
|
||||
//
|
||||
// Emerald Dragon NPCs and IDs (kept here for reference)
|
||||
@@ -91,14 +92,12 @@ struct emerald_dragonAI : public WorldBossAI
|
||||
{
|
||||
emerald_dragonAI(Creature* creature) : WorldBossAI(creature)
|
||||
{
|
||||
// me->m_CombatDistance = 12.0f;
|
||||
// me->m_SightDistance = 60.0f;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
_Reset();
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NON_ATTACKABLE);
|
||||
WorldBossAI::Reset();
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
DoCast(me, SPELL_MARK_OF_NATURE_AURA, true);
|
||||
events.ScheduleEvent(EVENT_TAIL_SWEEP, 4000);
|
||||
@@ -109,7 +108,8 @@ struct emerald_dragonAI : public WorldBossAI
|
||||
// Target killed during encounter, mark them as suspectible for Aura Of Nature
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
who->CastSpell(who, SPELL_MARK_OF_NATURE, true);
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
who->CastSpell(who, SPELL_MARK_OF_NATURE, true);
|
||||
}
|
||||
|
||||
// Execute and reschedule base events shared between all Emerald Dragons
|
||||
@@ -215,109 +215,6 @@ class npc_dream_fog : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* --- Spell: Dream Fog
|
||||
*/
|
||||
|
||||
class DreamFogTargetSelector
|
||||
{
|
||||
public:
|
||||
DreamFogTargetSelector() { }
|
||||
|
||||
bool operator()(WorldObject* object) const
|
||||
{
|
||||
return object->ToUnit() && object->ToUnit()->HasAura(SPELL_SLEEP);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_dream_fog_sleep : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_dream_fog_sleep() : SpellScriptLoader("spell_dream_fog_sleep") { }
|
||||
|
||||
class spell_dream_fog_sleep_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_dream_fog_sleep_SpellScript);
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& unitList)
|
||||
{
|
||||
unitList.remove_if(DreamFogTargetSelector());
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_dream_fog_sleep_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_dream_fog_sleep_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* --- Spell: Mark of Nature
|
||||
*/
|
||||
|
||||
class MarkOfNatureTargetSelector
|
||||
{
|
||||
public:
|
||||
MarkOfNatureTargetSelector() { }
|
||||
|
||||
bool operator()(WorldObject* object) const
|
||||
{
|
||||
if (Unit* unit = object->ToUnit())
|
||||
// return anyone that isn't tagged or already under the influence of Aura of Nature
|
||||
return !(unit->HasAura(SPELL_MARK_OF_NATURE) && !unit->HasAura(SPELL_AURA_OF_NATURE));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class spell_mark_of_nature : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_mark_of_nature() : SpellScriptLoader("spell_mark_of_nature") { }
|
||||
|
||||
class spell_mark_of_nature_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_mark_of_nature_SpellScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_MARK_OF_NATURE))
|
||||
return false;
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_AURA_OF_NATURE))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(MarkOfNatureTargetSelector());
|
||||
}
|
||||
|
||||
void HandleEffect(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
|
||||
if (GetHitUnit())
|
||||
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_AURA_OF_NATURE, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mark_of_nature_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_mark_of_nature_SpellScript::HandleEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_mark_of_nature_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* ---
|
||||
* --- Dragonspecific scripts and handling: YSONDRE
|
||||
@@ -355,7 +252,6 @@ class boss_ysondre : public CreatureScript
|
||||
void Reset()
|
||||
{
|
||||
_stage = 1;
|
||||
_Reset();
|
||||
emerald_dragonAI::Reset();
|
||||
events.ScheduleEvent(EVENT_LIGHTNING_WAVE, 12000);
|
||||
}
|
||||
@@ -394,7 +290,7 @@ class boss_ysondre : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
uint8 _stage;
|
||||
uint8 _stage;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
@@ -409,8 +305,6 @@ class boss_ysondre : public CreatureScript
|
||||
* ---
|
||||
*
|
||||
* TODO:
|
||||
* - NPC helper for spirit shades(?)
|
||||
* - Spirit shade NPC moves towards Lethon and heals him if close enough (each shade heals for 15000 HP)
|
||||
* - Spell: Shadow bolt whirl casts needs custom handling (spellscript)
|
||||
*/
|
||||
|
||||
@@ -424,7 +318,12 @@ enum LethonSpells
|
||||
{
|
||||
SPELL_DRAW_SPIRIT = 24811,
|
||||
SPELL_SHADOW_BOLT_WHIRL = 24834,
|
||||
SPELL_SPIRIT_SHADE_VISUAL = 24908,
|
||||
SPELL_DARK_OFFERING = 24804,
|
||||
};
|
||||
|
||||
enum LethonCreatures
|
||||
{
|
||||
NPC_SPIRIT_SHADE = 15261,
|
||||
};
|
||||
|
||||
class boss_lethon : public CreatureScript
|
||||
@@ -441,7 +340,6 @@ class boss_lethon : public CreatureScript
|
||||
void Reset()
|
||||
{
|
||||
_stage = 1;
|
||||
_Reset();
|
||||
emerald_dragonAI::Reset();
|
||||
events.ScheduleEvent(EVENT_SHADOW_BOLT_WHIRL, 10000);
|
||||
}
|
||||
@@ -462,12 +360,22 @@ class boss_lethon : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell)
|
||||
{
|
||||
if (spell->Id == SPELL_DRAW_SPIRIT && target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Position targetPos;
|
||||
target->GetPosition(&targetPos);
|
||||
me->GetMap()->SummonCreature(NPC_SPIRIT_SHADE, targetPos, NULL, 50000, (Unit*)this);
|
||||
}
|
||||
}
|
||||
|
||||
void ExecuteEvent(uint32 const eventId)
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_SHADOW_BOLT_WHIRL:
|
||||
DoCast(me, SPELL_SHADOW_BOLT_WHIRL, true);
|
||||
me->CastSpell((Unit*)NULL, SPELL_SHADOW_BOLT_WHIRL, false);
|
||||
events.ScheduleEvent(EVENT_SHADOW_BOLT_WHIRL, urand(15000, 30000));
|
||||
break;
|
||||
default:
|
||||
@@ -477,7 +385,7 @@ class boss_lethon : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
uint8 _stage;
|
||||
uint8 _stage;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
@@ -486,6 +394,42 @@ class boss_lethon : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
class npc_spirit_shade : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_spirit_shade() : CreatureScript("npc_spirit_shade") { }
|
||||
|
||||
struct npc_spirit_shadeAI : public PassiveAI
|
||||
{
|
||||
npc_spirit_shadeAI(Creature* creature) : PassiveAI(creature), _summonerGuid(0)
|
||||
{
|
||||
}
|
||||
|
||||
void IsSummonedBy(Unit* summoner)
|
||||
{
|
||||
_summonerGuid = summoner->GetGUID();
|
||||
me->GetMotionMaster()->MoveFollow(summoner, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
void MovementInform(uint32 moveType, uint32 data)
|
||||
{
|
||||
if (moveType == FOLLOW_MOTION_TYPE && data == _summonerGuid)
|
||||
{
|
||||
me->CastSpell((Unit*)NULL, SPELL_DARK_OFFERING, false);
|
||||
me->DespawnOrUnsummon(1000);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 _summonerGuid;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_spirit_shadeAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* ---
|
||||
* --- Dragonspecific scripts and handling: EMERISS
|
||||
@@ -519,7 +463,6 @@ class boss_emeriss : public CreatureScript
|
||||
void Reset()
|
||||
{
|
||||
_stage = 1;
|
||||
_Reset();
|
||||
emerald_dragonAI::Reset();
|
||||
events.ScheduleEvent(EVENT_VOLATILE_INFECTION, 12000);
|
||||
}
|
||||
@@ -562,7 +505,7 @@ class boss_emeriss : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
uint8 _stage;
|
||||
uint8 _stage;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
@@ -607,10 +550,6 @@ class boss_taerar : public CreatureScript
|
||||
{
|
||||
boss_taerarAI(Creature* creature) : emerald_dragonAI(creature)
|
||||
{
|
||||
_stage = 1;
|
||||
_shades = 0;
|
||||
_banished = false;
|
||||
_banishedTimer = 0;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
@@ -622,7 +561,6 @@ class boss_taerar : public CreatureScript
|
||||
_banished = false;
|
||||
_banishedTimer = 0;
|
||||
|
||||
_Reset();
|
||||
emerald_dragonAI::Reset();
|
||||
events.ScheduleEvent(EVENT_ARCANE_BLAST, 12000);
|
||||
events.ScheduleEvent(EVENT_BELLOWING_ROAR, 30000);
|
||||
@@ -655,11 +593,11 @@ class boss_taerar : public CreatureScript
|
||||
|
||||
uint32 count = sizeof(TaerarShadeSpells) / sizeof(uint32);
|
||||
for (uint32 i = 0; i < count; ++i)
|
||||
DoCastVictim(TaerarShadeSpells[i], true);
|
||||
DoCast(me->getVictim(), TaerarShadeSpells[i], true);
|
||||
_shades += count;
|
||||
|
||||
DoCast(SPELL_SHADE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
|
||||
++_stage;
|
||||
@@ -696,7 +634,7 @@ class boss_taerar : public CreatureScript
|
||||
{
|
||||
_banished = false;
|
||||
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->RemoveAurasDueToSpell(SPELL_SHADE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
}
|
||||
@@ -714,10 +652,10 @@ class boss_taerar : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
bool _banished; // used for shades activation testing
|
||||
uint32 _banishedTimer; // counter for banishment timeout
|
||||
uint8 _shades; // keep track of how many shades are dead
|
||||
uint8 _stage; // check which "shade phase" we're at (75-50-25 percentage counters)
|
||||
bool _banished; // used for shades activation testing
|
||||
uint32 _banishedTimer; // counter for banishment timeout
|
||||
uint8 _shades; // keep track of how many shades are dead
|
||||
uint8 _stage; // check which "shade phase" we're at (75-50-25 percentage counters)
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
@@ -726,18 +664,122 @@ class boss_taerar : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* --- Spell: Dream Fog
|
||||
*/
|
||||
|
||||
class DreamFogTargetSelector
|
||||
{
|
||||
public:
|
||||
DreamFogTargetSelector() { }
|
||||
|
||||
bool operator()(WorldObject* object)
|
||||
{
|
||||
if (Unit* unit = object->ToUnit())
|
||||
return unit->HasAura(SPELL_SLEEP);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class spell_dream_fog_sleep : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_dream_fog_sleep() : SpellScriptLoader("spell_dream_fog_sleep") { }
|
||||
|
||||
class spell_dream_fog_sleep_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_dream_fog_sleep_SpellScript);
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(DreamFogTargetSelector());
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_dream_fog_sleep_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_dream_fog_sleep_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* --- Spell: Mark of Nature
|
||||
*/
|
||||
|
||||
class MarkOfNatureTargetSelector
|
||||
{
|
||||
public:
|
||||
MarkOfNatureTargetSelector() { }
|
||||
|
||||
bool operator()(WorldObject* object)
|
||||
{
|
||||
// return those not tagged or already under the influence of Aura of Nature
|
||||
if (Unit* unit = object->ToUnit())
|
||||
return !(unit->HasAura(SPELL_MARK_OF_NATURE) && !unit->HasAura(SPELL_AURA_OF_NATURE));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class spell_mark_of_nature : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_mark_of_nature() : SpellScriptLoader("spell_mark_of_nature") { }
|
||||
|
||||
class spell_mark_of_nature_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_mark_of_nature_SpellScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_MARK_OF_NATURE))
|
||||
return false;
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_AURA_OF_NATURE))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(MarkOfNatureTargetSelector());
|
||||
}
|
||||
|
||||
void HandleEffect(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_AURA_OF_NATURE, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mark_of_nature_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_mark_of_nature_SpellScript::HandleEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_mark_of_nature_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_emerald_dragons()
|
||||
{
|
||||
// helper NPC scripts
|
||||
new npc_dream_fog();
|
||||
|
||||
// dragon spellscripts
|
||||
new spell_dream_fog_sleep();
|
||||
new spell_mark_of_nature();
|
||||
new npc_spirit_shade();
|
||||
|
||||
// dragons
|
||||
new boss_ysondre();
|
||||
new boss_taerar();
|
||||
new boss_emeriss();
|
||||
new boss_lethon();
|
||||
|
||||
// dragon spellscripts
|
||||
new spell_dream_fog_sleep();
|
||||
new spell_mark_of_nature();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user