diff options
297 files changed, 10596 insertions, 2291 deletions
diff --git a/issue_template.md b/issue_template.md new file mode 100644 index 00000000000..87f2e21af41 --- /dev/null +++ b/issue_template.md @@ -0,0 +1,23 @@ +**Description**: + +**Current behaviour**: Tell us what happens + +**Expected behaviour**: Tell us what should happen instead + +**Steps to reproduce the problem**: + +1. +2. +3. + +**Branch(es)**: 335/6x + +**TC hash/commit**: + +**TDB version**: + +**Operating system**: + + +[//]: # (This template is for problem reports, for other type of reports edit it accordingly) +[//]: # (If this is a crash report, include the crashlog with https://gist.github.com/) diff --git a/pull_request_template.md b/pull_request_template.md new file mode 100644 index 00000000000..7438ed561cf --- /dev/null +++ b/pull_request_template.md @@ -0,0 +1,13 @@ +**Changes proposed**: + +- +- +- + +**Target branch(es)**: 335/6x + +**Issues addressed**: Fixes # + +**Tests performed**: (Does it build? Tested in-game?) + +**Known issues and TODO list**: diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql index 69c6c990e1e..02061aaf976 100644 --- a/sql/base/characters_database.sql +++ b/sql/base/characters_database.sql @@ -783,6 +783,7 @@ CREATE TABLE `character_instance` ( `guid` int(10) unsigned NOT NULL DEFAULT '0', `instance` int(10) unsigned NOT NULL DEFAULT '0', `permanent` tinyint(3) unsigned NOT NULL DEFAULT '0', + `extendState` TINYINT(2) UNSIGNED NOT NULL DEFAULT '1', PRIMARY KEY (`guid`,`instance`), KEY `instance` (`instance`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -2539,7 +2540,7 @@ CREATE TABLE `updates` ( LOCK TABLES `updates` WRITE; /*!40000 ALTER TABLE `updates` DISABLE KEYS */; -INSERT INTO `updates` VALUES ('2015_03_20_00_characters.sql','B761760804EA73BD297F296C5C1919687DF7191C','ARCHIVED','2015-03-21 21:44:15',0),('2015_03_20_01_characters.sql','894F08B70449A5481FFAF394EE5571D7FC4D8A3A','ARCHIVED','2015-03-21 21:44:15',0),('2015_03_20_02_characters.sql','97D7BE0CAADC79F3F11B9FD296B8C6CD40FE593B','ARCHIVED','2015-03-21 21:44:51',0),('2015_06_26_00_characters_335.sql','C2CC6E50AFA1ACCBEBF77CC519AAEB09F3BBAEBC','ARCHIVED','2015-07-13 23:49:22',0),('2015_09_28_00_characters_335.sql','F8682A431D50E54BDC4AC0E7DBED21AE8AAB6AD4','ARCHIVED','2015-09-28 21:00:00',0),('2015_08_26_00_characters_335.sql','C7D6A3A00FECA3EBFF1E71744CA40D3076582374','ARCHIVED','2015-08-26 21:00:00',0),('2015_10_06_00_characters.sql','16842FDD7E8547F2260D3312F53EFF8761EFAB35','ARCHIVED','2015-10-06 16:06:38',0),('2015_10_07_00_characters.sql','E15AB463CEBE321001D7BFDEA4B662FF618728FD','ARCHIVED','2015-10-07 23:32:00',0),('2015_10_12_00_characters.sql','D6F9927BDED72AD0A81D6EC2C6500CBC34A39FA2','ARCHIVED','2015-10-12 15:35:47',0),('2015_10_28_00_characters.sql','622A9CA8FCE690429EBE23BA071A37C7A007BF8B','ARCHIVED','2015-10-19 14:32:22',0),('2015_10_29_00_characters_335.sql','4555A7F35C107E54C13D74D20F141039ED42943E','ARCHIVED','2015-10-29 17:05:43',0),('2015_11_03_00_characters.sql','CC045717B8FDD9733351E52A5302560CD08AAD57','ARCHIVED','2015-10-12 15:23:33',0),('2015_11_07_00_characters.sql','BAF9F6B8F97A30D04BDBBA8127A62A1720F9B904','RELEASED','2015-11-07 15:40:47',0); +INSERT INTO `updates` VALUES ('2015_03_20_00_characters.sql','B761760804EA73BD297F296C5C1919687DF7191C','ARCHIVED','2015-03-21 21:44:15',0),('2015_03_20_01_characters.sql','894F08B70449A5481FFAF394EE5571D7FC4D8A3A','ARCHIVED','2015-03-21 21:44:15',0),('2015_03_20_02_characters.sql','97D7BE0CAADC79F3F11B9FD296B8C6CD40FE593B','ARCHIVED','2015-03-21 21:44:51',0),('2015_06_26_00_characters_335.sql','C2CC6E50AFA1ACCBEBF77CC519AAEB09F3BBAEBC','ARCHIVED','2015-07-13 23:49:22',0),('2015_09_28_00_characters_335.sql','F8682A431D50E54BDC4AC0E7DBED21AE8AAB6AD4','ARCHIVED','2015-09-28 21:00:00',0),('2015_08_26_00_characters_335.sql','C7D6A3A00FECA3EBFF1E71744CA40D3076582374','ARCHIVED','2015-08-26 21:00:00',0),('2015_10_06_00_characters.sql','16842FDD7E8547F2260D3312F53EFF8761EFAB35','ARCHIVED','2015-10-06 16:06:38',0),('2015_10_07_00_characters.sql','E15AB463CEBE321001D7BFDEA4B662FF618728FD','ARCHIVED','2015-10-07 23:32:00',0),('2015_10_12_00_characters.sql','D6F9927BDED72AD0A81D6EC2C6500CBC34A39FA2','ARCHIVED','2015-10-12 15:35:47',0),('2015_10_28_00_characters.sql','622A9CA8FCE690429EBE23BA071A37C7A007BF8B','ARCHIVED','2015-10-19 14:32:22',0),('2015_10_29_00_characters_335.sql','4555A7F35C107E54C13D74D20F141039ED42943E','ARCHIVED','2015-10-29 17:05:43',0),('2015_11_03_00_characters.sql','CC045717B8FDD9733351E52A5302560CD08AAD57','ARCHIVED','2015-10-12 15:23:33',0),('2015_11_07_00_characters.sql','BAF9F6B8F97A30D04BDBBA8127A62A1720F9B904','RELEASED','2015-11-07 15:40:47',0),('2016_02_10_00_characters.sql','F1B4DA202819CABC7319A4470A2D224A34609E97','RELEASED','2016-02-10 00:00:00',0); /*!40000 ALTER TABLE `updates` ENABLE KEYS */; UNLOCK TABLES; diff --git a/sql/updates/characters/2016_02_10_00_characters.sql b/sql/updates/characters/2016_02_10_00_characters.sql new file mode 100644 index 00000000000..d49ed155bc8 --- /dev/null +++ b/sql/updates/characters/2016_02_10_00_characters.sql @@ -0,0 +1,2 @@ +-- extend=0 is expired, extend=1 is normal, extend=2 is extended +ALTER TABLE `character_instance` ADD COLUMN `extendState` TINYINT(2) UNSIGNED NOT NULL DEFAULT '1'; diff --git a/sql/updates/world/2015_11_09_02_world335.sql b/sql/updates/world/2015_11_09_02_world_335.sql index 84c0fd423ad..84c0fd423ad 100644 --- a/sql/updates/world/2015_11_09_02_world335.sql +++ b/sql/updates/world/2015_11_09_02_world_335.sql diff --git a/sql/updates/world/2015_12_16_02_world335.sql b/sql/updates/world/2015_12_16_02_world_335.sql index 20c1ac94a39..20c1ac94a39 100644 --- a/sql/updates/world/2015_12_16_02_world335.sql +++ b/sql/updates/world/2015_12_16_02_world_335.sql diff --git a/sql/updates/world/2015_12_20_00_world.sql b/sql/updates/world/2015_12_20_00_world.sql index 51f762c5fd7..7c658877f13 100644 --- a/sql/updates/world/2015_12_20_00_world.sql +++ b/sql/updates/world/2015_12_20_00_world.sql @@ -1,5 +1,5 @@ SET @OGUID:=78976; -DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+543; +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+544; 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 , 187567, 530, 1, 1, -2972.565, 2562.675, 83.66947, 5.829401, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3744) (@OGUID+1 , 187567, 530, 1, 1, -2955.605, 2554.495, 110.3285, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3744) diff --git a/sql/updates/world/2016_01_02_00_world335.sql b/sql/updates/world/2016_01_02_00_world_335.sql index b46a41bc6e9..b46a41bc6e9 100644 --- a/sql/updates/world/2016_01_02_00_world335.sql +++ b/sql/updates/world/2016_01_02_00_world_335.sql diff --git a/sql/updates/world/2016_01_10_05_world335.sql b/sql/updates/world/2016_01_10_05_world_335.sql index 7fb021cc9dd..7fb021cc9dd 100644 --- a/sql/updates/world/2016_01_10_05_world335.sql +++ b/sql/updates/world/2016_01_10_05_world_335.sql diff --git a/sql/updates/world/2016_01_12_01_world335.sql b/sql/updates/world/2016_01_12_01_world_335.sql index c3206e70ac4..c3206e70ac4 100644 --- a/sql/updates/world/2016_01_12_01_world335.sql +++ b/sql/updates/world/2016_01_12_01_world_335.sql diff --git a/sql/updates/world/2016_01_12_02_world335.sql b/sql/updates/world/2016_01_12_02_world_335.sql index 354d0bc129d..354d0bc129d 100644 --- a/sql/updates/world/2016_01_12_02_world335.sql +++ b/sql/updates/world/2016_01_12_02_world_335.sql diff --git a/sql/updates/world/2016_01_15_00_world.sql b/sql/updates/world/2016_01_15_00_world.sql new file mode 100644 index 00000000000..b5f3da2dd99 --- /dev/null +++ b/sql/updates/world/2016_01_15_00_world.sql @@ -0,0 +1,29 @@ +-- +SET @GUID := 52323; +SET @pool_id := 1107; + +DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+3; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`curhealth`,`curmana`,`MovementType`) VALUES +(@GUID+0, 18684, 530, 1, 1, 0, 0, -1768.23, 6737.47, -21.3348, 6.18901, 28800, 15, 9784, 5692, 1), +(@GUID+1, 18684, 530, 1, 1, 0, 0, -2585.25, 6416.29, 26.8608, 5.44446, 28800, 15, 9784, 5692, 1), +(@GUID+2, 18684, 530, 1, 1, 0, 0, -2002.52, 7622.98, -88.0942, 5.61332, 28800, 15, 9784, 5692, 1), +(@GUID+3, 18684, 530, 1, 1, 0, 0, -1200.42, 8810.52, 41.1305, 4.35118, 28800, 15, 9784, 5692, 1); + +DELETE FROM `pool_template` WHERE `entry` = @pool_id; +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@pool_id, 1, 'Bro''Gaz the Clanless'); + +DELETE FROM `pool_creature` WHERE `guid` BETWEEN @GUID AND @GUID+3; +INSERT INTO `pool_creature` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@GUID+0, @pool_id, 0, 'Bro''Gaz the Clanless - Spawn 1'), +(@GUID+1, @pool_id, 0, 'Bro''Gaz the Clanless - Spawn 2'), +(@GUID+2, @pool_id, 0, 'Bro''Gaz the Clanless - Spawn 3'), +(@GUID+3, @pool_id, 0, 'Bro''Gaz the Clanless - Spawn 4'); + +SET @ENTRY := 18684; +UPDATE `creature_template` SET `AIName`='SmartAI', `unit_flags`=0 WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,0,2000,7000,10000,16000,11,12468,0,0,0,0,0,2,0,0,0,0,0,0,0,'Bro''Gaz the Clanless - IC - Cast Flamestrike'), +(@ENTRY,0,1,0,0,0,100,0,8000,11000,12000,15000,11,15586,0,0,0,0,0,1,0,0,0,0,0,0,0,'Bro''Gaz the Clanless IC - Cast heal'), +(@ENTRY,0,2,0,0,0,100,0,6000,10000,9000,10000,11,12555,0,0,0,0,0,2,0,0,0,0,0,0,0,'Bro''Gaz the Clanless IC - Cast Pummel'); diff --git a/sql/updates/world/2016_01_16_00_world_335.sql b/sql/updates/world/2016_01_16_00_world_335.sql new file mode 100644 index 00000000000..14362432555 --- /dev/null +++ b/sql/updates/world/2016_01_16_00_world_335.sql @@ -0,0 +1,5 @@ +-- +UPDATE `creature` SET `phaseMask`=1 WHERE `id` IN (25328,31105) AND `guid` IN (26169,68282); +UPDATE `creature` SET `phaseMask`=16 WHERE `id` IN (38421, 37950); +UPDATE `creature` SET `phaseMask`=64 WHERE `id` IN (31314, 30698, 31306, 31428); +UPDATE `creature` SET `phaseMask`=255 WHERE `phaseMask` =131; diff --git a/sql/updates/world/2016_01_16_01_world.sql b/sql/updates/world/2016_01_16_01_world.sql new file mode 100644 index 00000000000..235378a7a84 --- /dev/null +++ b/sql/updates/world/2016_01_16_01_world.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `npc_text` WHERE `ID` = 10884; +DELETE FROM `gossip_menu` WHERE `entry`=8441 AND `text_id`=10884; diff --git a/sql/updates/world/2016_01_16_02_world.sql b/sql/updates/world/2016_01_16_02_world.sql new file mode 100644 index 00000000000..b36d7d69ff6 --- /dev/null +++ b/sql/updates/world/2016_01_16_02_world.sql @@ -0,0 +1,7 @@ +-- +DELETE FROM `creature_template_addon` WHERE `entry` IN (16525); +INSERT INTO `creature_template_addon` (`entry`, `bytes2`, `auras`) VALUES +(16525, 1, '29920'); + +UPDATE `smart_scripts` SET `event_chance`=100 WHERE `entryorguid`=16525 AND `source_type`=0; +UPDATE `smart_scripts` SET `event_flags`=3, `event_param1`=0, `event_param2`=0, `event_param3`=0, `event_param4`=0, `action_type`=28, `comment`="Spell Shade - In Combat - Remove Aura 'Phasing Invisibility' (Normal Dungeon)" WHERE `entryorguid`=16525 AND `source_type`=0 AND `id`=3; diff --git a/sql/updates/world/2016_01_16_03_world.sql b/sql/updates/world/2016_01_16_03_world.sql new file mode 100644 index 00000000000..5a06cfaecca --- /dev/null +++ b/sql/updates/world/2016_01_16_03_world.sql @@ -0,0 +1,11 @@ +-- +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=29333; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=29333; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (29329, 29330, 29338) 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 +(29329,0,2,0,8,0,100,0,52741,0,0,0,41,1000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Onslaught Paladin - On spell hit "Darkmender''s Tincture" - Despawn'), +(29330,0,2,0,8,0,100,0,52741,0,0,0,41,1000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Onslaught Harbor Guard - On spell hit "Darkmender''s Tincture" - Despawn'), +(29338,0,2,0,8,0,100,0,52741,0,0,0,41,1000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Raven Bishop - On spell hit "Darkmender''s Tincture" - Despawn'), +(29333,0,0,0,8,0,100,0,52741,0,0,0,41,1000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Onslaught Gryphon Rider - On spell hit "Darkmender''s Tincture" - Despawn'); + +UPDATE `spell_scripts` SET `datalong2`=2, `dataint`=0 WHERE `id`=52741 AND `command`=15; diff --git a/sql/updates/world/2016_01_16_04_world.sql b/sql/updates/world/2016_01_16_04_world.sql new file mode 100644 index 00000000000..a6bb7ae185c --- /dev/null +++ b/sql/updates/world/2016_01_16_04_world.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `spell_id`=53651; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(53651, 'spell_pal_light_s_beacon'); diff --git a/sql/updates/world/2016_01_16_05_world.sql b/sql/updates/world/2016_01_16_05_world.sql new file mode 100644 index 00000000000..46511cb0de8 --- /dev/null +++ b/sql/updates/world/2016_01_16_05_world.sql @@ -0,0 +1,32 @@ +-- +SET @guid=87572; +DELETE FROM `creature` WHERE `guid` BETWEEN 87572 AND 87592; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `curhealth`) VALUES +(@Guid+0, 23008, 530, 1, 1, 0, 0, 3647.45, 1918.92, 118.17, 3.80525, 600, 0, 13285), +(@Guid+1, 23008, 530, 1, 1, 0, 0, 3600.99, 1898.07, 111.36, 4.56316, 600, 0, 13285), +(@Guid+2, 23008, 530, 1, 1, 0, 0, 3573.03, 1861.43, 108.895, 2.74103, 600, 0, 13285), +(@Guid+3, 23008, 530, 1, 1, 0, 0, 3669.82, 1815.83, 126.059, 6.17322, 600, 0, 13285), +(@Guid+4, 23008, 530, 1, 1, 0, 0, 3685.04, 1772.15, 130.008, 5.97294, 600, 0, 13285), +(@Guid+5, 23008, 530, 1, 1, 0, 0, 3718.62, 1728.71, 138.644, 5.75303, 600, 0, 13285), +(@Guid+6, 23008, 530, 1, 1, 0, 0, 3770.45, 1704.41, 149.751, 4.0016, 600, 0, 13285), +(@Guid+7, 23008, 530, 1, 1, 0, 0, 3793.48, 1638.27, 135.625, 0.0691063, 600, 0, 13285), +(@Guid+8, 23008, 530, 1, 1, 0, 0, 3805.98, 1573.23, 118.196, 1.39643, 600, 0, 13285), +(@Guid+9, 23008, 530, 1, 1, 0, 0, 3835.62, 1614.66, 127.926, 1.56529, 600, 0, 13285), +(@Guid+10, 23008, 530, 1, 1, 0, 0, 3894.74, 1649.2, 127.552, 4.65976, 600, 0, 13285), +(@Guid+11, 23008, 530, 1, 1, 0, 0, 3930.28, 1647.93, 126.538, 0.685644, 600, 0, 13285), +(@Guid+12, 23008, 530, 1, 1, 0, 0, 4057.55, 1698.7, 136.879, 4.81684, 600, 0, 13285), +(@Guid+13, 23008, 530, 1, 1, 0, 0, 4097.41, 1710.19, 137.963, 0.756329, 600, 0, 13285), +(@Guid+14, 23008, 530, 1, 1, 0, 0, 4123.97, 1661.08, 126.587, 0.316505, 600, 0, 13285), +(@Guid+15, 23008, 530, 1, 1, 0, 0, 4162.44, 1671.21, 116.169, 1.18437, 600, 0, 13285), +(@Guid+16, 23008, 530, 1, 1, 0, 0, 4196.29, 1697.37, 118.356, 1.66346, 600, 0, 13285), +(@Guid+17, 23008, 530, 1, 1, 0, 0, 4227.59, 1710.46, 121.084, 2.26429, 600, 0, 13285), +(@Guid+18, 23008, 530, 1, 1, 0, 0, 4221.32, 1766.66, 130.509, 2.1779, 600, 0, 13285), +(@Guid+19, 23008, 530, 1, 1, 0, 0, 4252.49, 1835.95, 143.106, 2.0758, 600, 0, 13285), +(@Guid+20, 23008, 530, 1, 1, 0, 0, 4285.64, 1900.79, 134.852, 2.0758, 600, 0, 13285); + +SET @ENTRY := 23008; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,0,3000,4000,12000,16000,11,35924,0,0,0,0,0,2,0,0,0,0,0,0,0,'Ethereum Jailor - IC - Cast Energy Flux'), +(@ENTRY,0,1,0,0,0,100,0,4000,5000,9000,17000,11,36513,0,0,0,0,0,2,0,0,0,0,0,0,0,'Ethereum Jailor - IC - Cast Intangible Presence'); diff --git a/sql/updates/world/2016_01_17_00_world_335.sql b/sql/updates/world/2016_01_17_00_world_335.sql new file mode 100644 index 00000000000..abb3579fb07 --- /dev/null +++ b/sql/updates/world/2016_01_17_00_world_335.sql @@ -0,0 +1,26 @@ +-- +SET @NPC := 26577; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-2369.16,`position_y`=-876.936,`position_z`=-9.42208 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-2369.16,-876.936,-9.42208,0,0,0,0,100,0), +(@PATH,2,-2366.53,-856.691,-9.36085,0,0,0,0,100,0), +(@PATH,3,-2357.15,-811.864,-9.42138,0,0,0,0,100,0), +(@PATH,4,-2345.23,-748.967,-9.42454,0,0,0,0,100,0), +(@PATH,5,-2341.13,-700.582,-9.29519,0,0,0,0,100,0), +(@PATH,6,-2335.57,-673.555,-9.41523,0,0,0,0,100,0), +(@PATH,7,-2323.8,-641.711,-9.34184,0,0,0,0,100,0), +(@PATH,8,-2310.09,-613.217,-9.42431,0,0,0,0,100,0), +(@PATH,9,-2295.38,-586.808,-9.4231,2.396761,21600,0,0,100,0), +(@PATH,10,-2323.09,-595.375,-9.42242,0,0,0,0,100,0), +(@PATH,11,-2312.27,-614.66,-9.42405,0,0,0,0,100,0), +(@PATH,12,-2326.41,-645.536,-9.34993,0,0,0,0,100,0), +(@PATH,13,-2336.51,-676.214,-9.40864,0,0,0,0,100,0), +(@PATH,14,-2344.05,-723.843,-9.42353,0,0,0,0,100,0), +(@PATH,15,-2346.75,-760.367,-9.42353,0,0,0,0,100,0), +(@PATH,16,-2357.56,-811.652,-9.42353,0,0,0,0,100,0), +(@PATH,17,-2366.12,-855.675,-9.32695,0,0,0,0,100,0), +(@PATH,18,-2376.83,-896.428,-9.39643,6.216497,21600,0,0,100,0); diff --git a/sql/updates/world/2016_01_17_01_world.sql b/sql/updates/world/2016_01_17_01_world.sql new file mode 100644 index 00000000000..8e5bcd22a07 --- /dev/null +++ b/sql/updates/world/2016_01_17_01_world.sql @@ -0,0 +1,9 @@ +-- +DELETE FROM `creature_template_addon` WHERE `entry` IN (21694,21914,17796,17797,20629,20630); +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(21694,0,0x0,0x1,'18950'), -- 21694 - 18950 +(21914,0,0x0,0x1,'18950'), -- 21914 - 18950 +(17796,0,0x0,0x1,'18950'), -- 17796 - 18950 +(17797,0,0x0,0x1,'18950'), -- 17797 - 18950 +(20629,0,0x0,0x1,'18950'), -- 20629 - 18950 +(20630,0,0x0,0x1,'18950'); -- 20630 - 18950 diff --git a/sql/updates/world/2016_01_17_02_world.sql b/sql/updates/world/2016_01_17_02_world.sql new file mode 100644 index 00000000000..f019b927228 --- /dev/null +++ b/sql/updates/world/2016_01_17_02_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `creature_onkill_reputation` WHERE `creature_id`=20477; +INSERT INTO `creature_onkill_reputation` (`creature_id`, `RewOnKillRepFaction1`, `RewOnKillRepFaction2`, `MaxStanding1`, `IsTeamAward1`, `RewOnKillRepValue1`, `MaxStanding2`, `IsTeamAward2`, `RewOnKillRepValue2`, `TeamDependent`) VALUES +(20477, 942, 0, 5, 0, 7, 0, 0, 0, 0); diff --git a/sql/updates/world/2016_01_17_03_world.sql b/sql/updates/world/2016_01_17_03_world.sql new file mode 100644 index 00000000000..cf43c650888 --- /dev/null +++ b/sql/updates/world/2016_01_17_03_world.sql @@ -0,0 +1,46 @@ +SET @OGUID:=66937; +SET @CGUID:=12545; +SET @Event:=2; + +-- Add missing xmas ornaments in silvermoon +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+26; +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, 187567, 530, 1, 1, 9757.145, -7186.155, 23.50618, 2.897245, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+1, 187567, 530, 1, 1, 9799.123, -7310.608, 35.23363, 2.199115, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+2, 187567, 530, 1, 1, 9790.945, -7316.393, 35.23556, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+3, 187567, 530, 1, 1, 9752.514, -7336.514, 34.97601, 1.919862, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+4, 187567, 530, 1, 1, 9724.499, -7346.248, 34.95547, 1.919862, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+5, 187567, 530, 1, 1, 9743.402, -7339.749, 34.94567, 1.902409, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+6, 187567, 530, 1, 1, 9734.03, -7343.019, 35.02362, 1.902409, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+7, 187567, 530, 1, 1, 9767.382, -7480.58, 28.18164, 3.194002, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+8, 187567, 530, 1, 1, 9767.383, -7495.052, 28.28906, 3.054327, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+9, 187567, 530, 1, 1, 9694.368, -7495.957, 25.62033, 1.605702, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+10, 187567, 530, 1, 1, 9683.361, -7495.406, 26.99795, 1.53589, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+11, 187567, 530, 1, 1, 9638.369, -7397.279, 22.68563, 4.782203, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+12, 187567, 530, 1, 1, 9672.388, -7495.991, 25.67016, 1.53589, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+13, 187567, 530, 1, 1, 9648.386, -7152.304, 23.26344, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+14, 187567, 530, 1, 1, 9665.867, -7135.831, 23.16022, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+15, 187567, 530, 1, 1, 9631.138, -7135.575, 23.11801, 6.265733, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+16, 187567, 530, 1, 1, 9648.528, -7119.087, 23.2984, 4.729844, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+17, 187567, 530, 1, 1, 9485.029, -7132.405, 24.43083, 0, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+18, 187194, 530, 1, 1, 9954.997, -7098.571, 59.86189, 3.996807, 0, 0, 0, 1, 120, 255, 1), -- 187194 (Area: 3487) +(@OGUID+19, 187194, 530, 1, 1, 10007.34, -7030.903, 57.97285, 4.06662, 0, 0, 0, 1, 120, 255, 1), -- 187194 (Area: 3487) +(@OGUID+20, 187194, 530, 1, 1, 10002.23, -7202.467, 44.06782, 1.466076, 0, 0, 0, 1, 120, 255, 1), -- 187194 (Area: 3487) +(@OGUID+21, 187194, 530, 1, 1, 10010.68, -7199.167, 44.22095, 2.478367, 0, 0, 0, 1, 120, 255, 1), -- 187194 (Area: 3487) +(@OGUID+22, 187194, 530, 1, 1, 9992.33, -7205.063, 44.06255, 2.18166, 0, 0, 0, 1, 120, 255, 1), -- 187194 (Area: 3487) +(@OGUID+23, 187194, 530, 1, 1, 9952.419, -7232.268, 43.9028, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 187194 (Area: 3487) +(@OGUID+24, 187194, 530, 1, 1, 9945.498, -7242.049, 43.90578, 2.792518, 0, 0, 0, 1, 120, 255, 1), -- 187194 (Area: 3487) +(@OGUID+25, 187235, 530, 1, 1, 9982.972, -7098.827, 47.70499, 6.056293, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 3487) +(@OGUID+26, 187235, 530, 1, 1, 9987.122, -7093.597, 47.70498, 5.253442, 0, 0, 0, 1, 120, 255, 1); -- 187235 (Area: 3487) + +DELETE FROM `game_event_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+26 AND `eventEntry`=@Event; +INSERT INTO `game_event_gameobject` SELECT @Event, gameobject.guid FROM `gameobject` WHERE gameobject.guid BETWEEN @OGUID+0 AND @OGUID+26; + +-- Add spawns Pat's Snowcloud Guy +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+1; +INSERT INTO `creature` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `curhealth`) VALUES +(@CGUID+0, 15730, 530, 9346.396, -7265.283, 20.67977, 6.021386, 120, 0), -- 15730 (Area: 0) (Auras: 26000 - 26000) +(@CGUID+1, 15730, 530, 9347.098, -7267.961, 20.6914, 3.263766, 120, 0); -- 15730 (Area: 0) (Auras: 26000 - 26000) + +DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+1 AND `eventEntry`=@Event; +INSERT INTO `game_event_creature` SELECT @Event, creature.guid FROM `creature` WHERE creature.guid BETWEEN @CGUID+0 AND @CGUID+1; diff --git a/sql/updates/world/2016_01_17_04_world.sql b/sql/updates/world/2016_01_17_04_world.sql new file mode 100644 index 00000000000..6d72807e0b1 --- /dev/null +++ b/sql/updates/world/2016_01_17_04_world.sql @@ -0,0 +1,81 @@ +SET @OGUID:=79522; +SET @CGUID:=52022; +SET @Event:=2; + +-- Add missing xmas ornaments in Azuremyst Isle (Exodar) +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+61; +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 , 178425, 530, 1, 1, -3949.436, -11658.67, -138.7108, 3.141593, 0, 0, 0, 1, 120, 255, 1), -- 178425 (Area: 0) +(@OGUID+1 , 178746, 530, 1, 1, -3954.361, -11657.59, -138.7044, 2.513274, 0, 0, 0, 1, 120, 255, 1), -- 178746 (Area: 0) +(@OGUID+2 , 178428, 530, 1, 1, -3951.378, -11661.31, -138.977, 0.7504908, 0, 0, 0, 1, 120, 255, 1), -- 178428 (Area: 0) +(@OGUID+3 , 178428, 530, 1, 1, -3953.229, -11658.62, -138.7581, 2.426008, 0, 0, 0, 1, 120, 255, 1), -- 178428 (Area: 0) +(@OGUID+4 , 178428, 530, 1, 1, -3951.486, -11658.68, -138.7432, 4.677484, 0, 0, 0, 1, 120, 255, 1), -- 178428 (Area: 0) +(@OGUID+5 , 178429, 530, 1, 1, -3950.01, -11652.94, -138.6416, 5.358162, 0, 0, 0, 1, 120, 255, 1), -- 178429 (Area: 0) +(@OGUID+6 , 178429, 530, 1, 1, -3950.755, -11660.4, -138.7645, 5.654869, 0, 0, 0, 1, 120, 255, 1), -- 178429 (Area: 0) +(@OGUID+7 , 178430, 530, 1, 1, -3952.516, -11660.61, -138.7691, 3.38594, 0, 0, 0, 1, 120, 255, 1), -- 178430 (Area: 0) +(@OGUID+8 , 178430, 530, 1, 1, -3949.488, -11653.97, -138.6341, 1.954769, 0, 0, 0, 1, 120, 255, 1), -- 178430 (Area: 0) +(@OGUID+9 , 178430, 530, 1, 1, -3951.285, -11659.1, -138.3316, 1.047198, 0, 0, 0, 1, 120, 255, 1), -- 178430 (Area: 0) +(@OGUID+10, 178431, 530, 1, 1, -3952.399, -11660.72, -138.4649, 2.426008, 0, 0, 0, 1, 120, 255, 1), -- 178431 (Area: 0) +(@OGUID+11, 178431, 530, 1, 1, -3950.715, -11659.36, -138.9473, 1.134463, 0, 0, 0, 1, 120, 255, 1), -- 178431 (Area: 0) +(@OGUID+12, 178432, 530, 1, 1, -3950.486, -11661.66, -138.9796, 6.073746, 0, 0, 0, 1, 120, 255, 1), -- 178432 (Area: 0) +(@OGUID+13, 178432, 530, 1, 1, -3951.252, -11654.2, -138.6518, 4.468043, 0, 0, 0, 1, 120, 255, 1), -- 178432 (Area: 0) +(@OGUID+14, 178432, 530, 1, 1, -3952.455, -11658.96, -138.7532, 2.705255, 0, 0, 0, 1, 120, 255, 1), -- 178432 (Area: 0) +(@OGUID+15, 178433, 530, 1, 1, -3949.59, -11660.9, -138.9695, 4.921829, 0, 0, 0, 1, 120, 255, 1), -- 178433 (Area: 0) +(@OGUID+16, 178433, 530, 1, 1, -3953.01, -11659.64, -138.7615, 1.815142, 0, 0, 0, 1, 120, 255, 1), -- 178433 (Area: 0) +(@OGUID+17, 178433, 530, 1, 1, -3950.47, -11653.59, -138.645, 4.01426, 0, 0, 0, 1, 120, 255, 1), -- 178433 (Area: 0) +(@OGUID+18, 187567, 530, 1, 1, -4213.729, -11685.4, -130.8234, 0.9424766, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 0) +(@OGUID+19, 187567, 530, 1, 1, -4145.799, -11745.62, -124.1529, 2.024579, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 0) +(@OGUID+20, 187567, 530, 1, 1, -4205.994, -12527.13, 50.12775, 0.7155849, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 0) +(@OGUID+21, 187567, 530, 1, 1, -4152.035, -12529.42, 49.52319, 2.670348, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3576) +(@OGUID+22, 187567, 530, 1, 1, -4171.053, -13734.39, 82.08741, 2.775069, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3526) +(@OGUID+23, 187567, 530, 1, 1, -4054.646, -13772.28, 84.39475, 5.881761, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3527) +(@OGUID+24, 187235, 530, 1, 1, -4214.633, -12476, 45.07409, 5.497789, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+25, 187235, 530, 1, 1, -4212.527, -12510.34, 45.44406, 0.2268925, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+26, 187235, 530, 1, 1, -4209.379, -12517.65, 45.81722, 0.3316107, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+27, 187235, 530, 1, 1, -4185.712, -12504.83, 44.36132, 3.560473, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 3576) +(@OGUID+28, 187235, 530, 1, 1, -4158.139, -12463.08, 45.08138, 3.717554, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 3576) +(@OGUID+29, 187235, 530, 1, 1, -4176.958, -12493.97, 44.361, 1.361356, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 3576) +(@OGUID+30, 187235, 530, 1, 1, -4171.624, -12506.62, 44.36132, 5.550147, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 3576) +(@OGUID+31, 187235, 530, 1, 1, -4153.742, -12484.6, 44.51342, 3.909541, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 3576) +(@OGUID+32, 187235, 530, 1, 1, -4158.644, -12533.33, 45.45204, 2.129301, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 3576) +(@OGUID+33, 187235, 530, 1, 1, -3928.31, -11712.54, -135.2059, 5.148723, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+34, 187235, 530, 1, 1, -3938.107, -11702.05, -135.2763, 1.500983, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+35, 187235, 530, 1, 1, -3891.189, -11640.65, -134.4907, 1.291542, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+36, 187235, 530, 1, 1, -3919.52, -11641.97, -134.8313, 0.2094394, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+37, 187235, 530, 1, 1, -3905.643, -11638.75, -134.6634, 5.864307, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+38, 187235, 530, 1, 1, -3943.941, -11674.08, -135.2386, 3.595379, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+39, 187235, 530, 1, 1, -3939.98, -11660.92, -135.1454, 3.874631, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+40, 187235, 530, 1, 1, -3943.487, -11689.1, -135.2892, 0.6108634, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+41, 187235, 530, 1, 1, -3931.237, -11649.39, -135.003, 1.710422, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+42, 187235, 530, 1, 1, -3877.953, -11647.35, -134.3679, 4.677484, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+43, 187235, 530, 1, 1, -4040.372, -11581.41, -138.4519, 0.6806767, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+44, 187235, 530, 1, 1, -4025.329, -11590.4, -138.3277, 1.762782, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+45, 187235, 530, 1, 1, -4006.567, -11572.73, -138.0419, 2.670348, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+46, 187235, 530, 1, 1, -4228.949, -11818.94, -115.9345, 0.802851, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+47, 187235, 530, 1, 1, -4048.503, -13778.93, 75.01585, 0.2967052, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 3527) +(@OGUID+48, 187193, 530, 1, 1, -3929.128, -11744.82, -138.6122, 0.6283169, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+49, 187193, 530, 1, 1, -3970.78, -11722.88, -138.8356, 1.518436, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+50, 187193, 530, 1, 1, -3862.003, -11617.36, -136.8326, 4.939284, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+51, 187193, 530, 1, 1, -3935.253, -11599.68, -138.455, 5.654869, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+52, 187193, 530, 1, 1, -3903.503, -11599.64, -137.7858, 3.926996, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+53, 187193, 530, 1, 1, -3821.196, -11515.72, -138.6442, 1.518436, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+54, 187193, 530, 1, 1, -3843.451, -11503.5, -139.0975, 0.7853968, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+55, 187193, 530, 1, 1, -3753.633, -11517.73, -134.327, 2.094393, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+56, 187193, 530, 1, 1, -3898.609, -11445.35, -132.8523, 0.1047193, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+57, 187193, 530, 1, 1, -3732.545, -11501.01, -134.0293, 2.373644, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+58, 187193, 530, 1, 1, -3657.605, -11491.42, -119.0973, 1.989672, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+59, 187193, 530, 1, 1, -3640.533, -11468.59, -118.8086, 3.019413, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+60, 187193, 530, 1, 1, -3903.453, -11420.75, -132.7737, 0.1919852, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+61, 187193, 530, 1, 1, -3985.045, -11695.91, -139.3659, 5.742135, 0, 0, 0, 1, 120, 255, 1); -- 187193 (Area: 0) + +DELETE FROM `game_event_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+61 AND `eventEntry`=@Event; +INSERT INTO `game_event_gameobject` SELECT @Event, gameobject.guid FROM `gameobject` WHERE gameobject.guid BETWEEN @OGUID+0 AND @OGUID+61; + +-- Add spawns Pat's Snowcloud Guy +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+1; +INSERT INTO `creature` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `curhealth`) VALUES +(@CGUID+0, 15730, 530, -3997.986, -11908.32, -1.411356, 0.2617994, 120, 0), -- 15730 (Area: 0) (Auras: 26000 - 26000) +(@CGUID+1, 15730, 530, -3997.807, -11908.79, 0.8329293, 4.782202, 120, 0); -- 15730 (Area: 0) (Auras: 26000 - 26000) + +DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+1 AND `eventEntry`=@Event; +INSERT INTO `game_event_creature` SELECT @Event, creature.guid FROM `creature` WHERE creature.guid BETWEEN @CGUID+0 AND @CGUID+1; diff --git a/sql/updates/world/2016_01_17_05_world.sql b/sql/updates/world/2016_01_17_05_world.sql new file mode 100644 index 00000000000..2d253bae713 --- /dev/null +++ b/sql/updates/world/2016_01_17_05_world.sql @@ -0,0 +1,16 @@ +UPDATE`spell_dbc` SET `Effect1`=28, `EffectMiscValueB1`=64 WHERE `Id`IN(14313,14307,14252); + +-- Spell 14313 Summon Enraged Gryphon +-- Spell 14307 Summon Enraged Wyvern +-- Spell 14252 Summon Enraged Felbat +-- Spell 14329 Summon Enraged Hippogryph + +DELETE FROM `smart_scripts` WHERE `source_type` =0 AND `action_type` =12 AND `action_param1` =9297 AND `id`=1; +DELETE FROM `smart_scripts` WHERE `source_type` =0 AND `action_type` =12 AND `action_param1` =9526 AND `id`=1; +DELETE FROM `smart_scripts` WHERE `source_type` =0 AND `action_type` =12 AND `action_param1` =9521 AND `id`=1; +DELETE FROM `smart_scripts` WHERE `source_type` =0 AND `action_type` =12 AND `action_param1` =9527 AND `id`=1; + +UPDATE `smart_scripts` SET `action_type`=11, `action_param1`=14307, `action_param2`=2, `action_param3`=0,`link`=0 WHERE `source_type` =0 AND `action_type` =12 AND `action_param1` =9297; +UPDATE `smart_scripts` SET `action_type`=11, `action_param1`=14313, `action_param2`=2, `action_param3`=0,`link`=0 WHERE `source_type` =0 AND `action_type` =12 AND `action_param1` =9526; +UPDATE `smart_scripts` SET `action_type`=11, `action_param1`=14252, `action_param2`=2, `action_param3`=0,`link`=0 WHERE `source_type` =0 AND `action_type` =12 AND `action_param1` =9521; +UPDATE `smart_scripts` SET `action_type`=11, `action_param1`=14329, `action_param2`=2, `action_param3`=0,`link`=0 WHERE `source_type` =0 AND `action_type` =12 AND `action_param1` =9527; diff --git a/sql/updates/world/2016_01_17_06_world.sql b/sql/updates/world/2016_01_17_06_world.sql new file mode 100644 index 00000000000..659f146845a --- /dev/null +++ b/sql/updates/world/2016_01_17_06_world.sql @@ -0,0 +1,5 @@ +UPDATE `smart_scripts` SET `id`=5 WHERE `source_type` = 9 AND `entryorguid` = 2229300 AND `id`=4 AND `action_type`=51; + +DELETE FROM `smart_scripts` WHERE `source_type` = 9 AND `entryorguid` = 2229300 AND `id`=4; +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 +(2229300, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 85, 38758, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Inactive Fel Reaver - Action list - Invoker Cast [PH] Quest reward: Nether Gas In a Fel Fire Engine'); diff --git a/sql/updates/world/2016_01_17_07_world.sql b/sql/updates/world/2016_01_17_07_world.sql new file mode 100644 index 00000000000..df588168d38 --- /dev/null +++ b/sql/updates/world/2016_01_17_07_world.sql @@ -0,0 +1,22 @@ +DELETE FROM `creature_formations` WHERE `leaderGUID`=33658; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(33658, 33658, 0, 0, 1), +(33658, 33657, 10, 0, 2); + +-- Pathing for Hazzas Entry: 5722 'TDB FORMAT' +SET @NPC := 33658; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-649.7056,`position_y`=131.495,`position_z`=-90.5838 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-649.7056,131.495,-90.5838,0,0,1,0,100,0), -- 14:04:57 +(@PATH,2,-665.5804,131.4927,-90.58052,0,0,1,0,100,0), -- 14:05:00 +(@PATH,3,-673.0132,94.911,-90.58176,0,0,1,0,100,0), -- 14:05:02 +(@PATH,4,-673.0271,83.92074,-90.58344,0,0,1,0,100,0), -- 14:05:04 +(@PATH,5,-665.4554,60.56186,-90.5854,0,0,1,0,100,0), -- 14:05:07 +(@PATH,6,-649.9196,60.34818,-90.58607,0,0,1,0,100,0), -- 14:05:08 +(@PATH,7,-641.7787,99.33066,-90.58942,0,0,1,0,100,0), -- 14:05:10 +(@PATH,8,-644.1965,115.6559,-90.58284,0,0,1,0,100,0); -- 14:05:13 +-- 0x1C30A00DA00596800034A9000018FBD3 .go -649.7056 131.495 -90.5838 diff --git a/sql/updates/world/2016_01_17_08_world.sql b/sql/updates/world/2016_01_17_08_world.sql new file mode 100644 index 00000000000..48cd420a242 --- /dev/null +++ b/sql/updates/world/2016_01_17_08_world.sql @@ -0,0 +1,408 @@ +-- Pathing for Exodar Peacekeeper Entry: 16733 'TDB FORMAT' +SET @NPC := 57733; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-4259.922,`position_y`=-11744.17,`position_z`=-132.7823 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-4259.922,-11744.17,-132.7823,0,0,0,0,100,0), -- 10:11:34 +(@PATH,2,-4253.737,-11752.62,-132.103,0,0,0,0,100,0), -- 10:11:50 +(@PATH,3,-4251.487,-11755.87,-132.603,0,0,0,0,100,0), -- 10:11:50 +(@PATH,4,-4248.737,-11759.37,-132.603,0,0,0,0,100,0), -- 10:11:50 +(@PATH,5,-4242.487,-11767.87,-131.853,0,0,0,0,100,0), -- 10:11:50 +(@PATH,6,-4234.163,-11770.65,-131.4757,0,0,0,0,100,0), -- 10:12:04 +(@PATH,7,-4205.663,-11771.65,-131.9757,0,0,0,0,100,0), -- 10:12:04 +(@PATH,8,-4199.815,-11770.93,-132.2653,0,0,0,0,100,0), -- 10:12:20 +(@PATH,9,-4176.882,-11762.18,-132.0013,0,0,0,0,100,0), -- 10:12:29 +(@PATH,10,-4166.132,-11757.68,-136.7513,0,0,0,0,100,0), -- 10:12:29 +(@PATH,11,-4166.266,-11739.91,-136.6903,0,0,0,0,100,0), -- 10:12:36 +(@PATH,12,-4166.516,-11733.41,-136.6903,0,0,0,0,100,0), -- 10:12:36 +(@PATH,13,-4166.766,-11730.66,-136.6903,0,0,0,0,100,0), -- 10:12:36 +(@PATH,14,-4179.53,-11763.62,-132.2955,0,0,0,0,100,0), -- 10:13:15 +(@PATH,15,-4180.446,-11764.02,-132.2955,0,0,0,0,100,0), -- 10:13:15 +(@PATH,16,-4200.114,-11771.23,-132.5309,0,0,0,0,100,0), -- 10:13:15 +(@PATH,17,-4202.051,-11771.94,-132.4386,0,0,0,0,100,0), -- 10:13:15 +(@PATH,18,-4202.051,-11771.94,-132.4386,0,0,0,0,100,0), -- 10:13:15 +(@PATH,19,-4205.86,-11771.68,-132.0416,0,0,0,0,100,0), -- 10:13:17 +(@PATH,20,-4234.11,-11770.68,-131.5416,0,0,0,0,100,0), -- 10:13:17 +(@PATH,21,-4248.942,-11759.42,-132.5334,0,0,0,0,100,0), -- 10:13:33 +(@PATH,22,-4251.192,-11755.92,-132.5334,0,0,0,0,100,0), -- 10:13:33 +(@PATH,23,-4253.692,-11752.67,-132.0334,0,0,0,0,100,0), -- 10:13:33 +(@PATH,24,-4258.692,-11745.92,-132.5334,0,0,0,0,100,0), -- 10:13:33 +(@PATH,25,-4259.942,-11744.17,-132.7834,0,0,0,0,100,0); -- 10:13:33 + +-- Pathing for Exodar Peacekeeper Entry: 16733 'TDB FORMAT' +SET @NPC := 57732; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-4216.665,`position_y`=-11647.06,`position_z`=-143.7448 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-4216.665,-11647.06,-143.7448,4.590216,5000,0,0,100,0), -- 10:39:00 +(@PATH,2,-4216.917,-11623.43,-132.8519,0,0,0,0,100,0), -- 10:39:16 +(@PATH,3,-4216.917,-11613.93,-128.6019,0,0,0,0,100,0), -- 10:39:16 +(@PATH,4,-4216.917,-11607.68,-125.8519,0,0,0,0,100,0), -- 10:39:16 +(@PATH,5,-4216.917,-11604.68,-125.8519,0,0,0,0,100,0), -- 10:39:16 +(@PATH,6,-4216.917,-11602.93,-125.8519,0,0,0,0,100,0), -- 10:39:16 +(@PATH,7,-4217.17,-11602.3,-125.959,4.817109,5000,0,0,100,0), -- 10:39:36 +(@PATH,8,-4197.176,-11597.41,-124.0743,0,0,0,0,100,0), -- 10:39:56 +(@PATH,9,-4195.676,-11597.16,-125.3243,0,0,0,0,100,0), -- 10:39:56 +(@PATH,10,-4187.176,-11595.16,-124.8243,0,0,0,0,100,0), -- 10:39:56 +(@PATH,11,-4183.45,-11596.95,-124.1946,0,0,0,0,100,0), -- 10:40:08 +(@PATH,12,-4179.45,-11604.45,-121.1946,0,0,0,0,100,0), -- 10:40:08 +(@PATH,13,-4175.45,-11610.7,-119.1946,0,0,0,0,100,0), -- 10:40:08 +(@PATH,14,-4164.444,-11628.77,-104.9988,0,0,0,0,100,0), -- 10:40:21 +(@PATH,15,-4160.194,-11635.52,-97.99881,0,0,0,0,100,0), -- 10:40:21 +(@PATH,16,-4162.848,-11643.82,-98.11985,0,0,0,0,100,0), -- 10:40:31 +(@PATH,17,-4165.893,-11649.45,-98.40599,3.246312,5000,0,0,100,0), -- 10:40:39 +(@PATH,18,-4166.085,-11630.18,-104.5746,0,0,0,0,100,0), -- 10:40:53 +(@PATH,19,-4174.826,-11610.26,-119.0268,0,0,0,0,100,0), -- 10:41:04 +(@PATH,20,-4178.826,-11602.76,-121.5268,0,0,0,0,100,0), -- 10:41:04 +(@PATH,21,-4182.576,-11596.51,-124.0268,0,0,0,0,100,0), -- 10:41:04 +(@PATH,22,-4186.426,-11593.54,-124.7621,0,0,0,0,100,0), -- 10:41:19 +(@PATH,23,-4193.426,-11591.54,-124.7621,0,0,0,0,100,0), -- 10:41:19 +(@PATH,24,-4198.176,-11589.79,-125.2621,0,0,0,0,100,0), -- 10:41:19 +(@PATH,25,-4209.176,-11586.04,-125.5121,0,0,0,0,100,0), -- 10:41:19 +(@PATH,26,-4211.554,-11587.69,-125.6955,0,0,0,0,100,0), -- 10:41:30 +(@PATH,27,-4212.304,-11589.44,-125.6955,0,0,0,0,100,0), -- 10:41:30 +(@PATH,28,-4213.554,-11592.69,-125.6955,0,0,0,0,100,0), -- 10:41:30 +(@PATH,29,-4215.804,-11597.44,-125.6955,0,0,0,0,100,0), -- 10:41:30 +(@PATH,30,-4217.054,-11600.69,-125.6955,0,0,0,0,100,0), -- 10:41:30 +(@PATH,31,-4217.554,-11601.69,-125.6955,0,0,0,0,100,0), -- 10:41:30 +(@PATH,32,-4218.49,-11603.42,-126.0363,4.834562,5000,0,0,100,0), -- 10:41:39 +(@PATH,33,-4217.827,-11613.99,-128.6406,0,0,0,0,100,0), -- 10:41:55 +(@PATH,34,-4217.577,-11622.99,-132.6406,0,0,0,0,100,0), -- 10:41:55 +(@PATH,35,-4217.077,-11638.74,-139.8906,0,0,0,0,100,0), -- 10:41:55 +(@PATH,36,-4216.827,-11644.74,-143.3906,0,0,0,0,100,0); -- 10:41:55 + +-- Pathing for Exodar Peacekeeper Entry: 16733 'TDB FORMAT' +SET @NPC := 57731; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-4055.538,`position_y`=-11719.55,`position_z`=-138.8952 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-4055.538,-11719.55,-138.8952,0,0,0,0,100,0), -- 10:45:16 +(@PATH,2,-4069.275,-11725.09,-138.3611,0,0,0,0,100,0), -- 10:45:34 +(@PATH,3,-4092.408,-11723.83,-139.1332,0,0,0,0,100,0), -- 10:45:49 +(@PATH,4,-4099.328,-11724.08,-139.0543,0,0,0,0,100,0), -- 10:45:56 +(@PATH,5,-4111.578,-11729.58,-139.3043,0,0,0,0,100,0), -- 10:45:56 +(@PATH,6,-4117.578,-11732.08,-136.3043,0,0,0,0,100,0), -- 10:45:56 +(@PATH,7,-4119.328,-11733.08,-136.3043,0,0,0,0,100,0), -- 10:45:56 +(@PATH,8,-4139.16,-11723.72,-136.5828,0,0,0,0,100,0), -- 10:46:09 +(@PATH,9,-4143.91,-11720.22,-136.5828,0,0,0,0,100,0), -- 10:46:09 +(@PATH,10,-4125.933,-11733.08,-136.3418,0,0,0,0,100,0), -- 10:46:21 +(@PATH,11,-4117.555,-11732.18,-136.3103,0,0,0,0,100,0), -- 10:46:31 +(@PATH,12,-4111.555,-11729.43,-139.3103,0,0,0,0,100,0), -- 10:46:31 +(@PATH,13,-4099.305,-11723.93,-139.0603,0,0,0,0,100,0), -- 10:46:31 +(@PATH,14,-4080.146,-11728.12,-138.7241,0,0,0,0,100,0), -- 10:46:43 +(@PATH,15,-4069.389,-11725.02,-138.4003,0,0,0,0,100,0), -- 10:46:51 +(@PATH,16,-4067.389,-11724.27,-138.4003,0,0,0,0,100,0), -- 10:46:51 +(@PATH,17,-4055.639,-11719.52,-138.9003,0,0,0,0,100,0); -- 10:46:51 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=57722; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(57722, 57722, 0, 0, 1), +(57722, 57723, 2, 270, 2); + +-- Pathing for Exodar Peacekeeper Entry: 16733 'TDB FORMAT' +SET @NPC := 57722; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-4035.478,`position_y`=-11451.96,`position_z`=-55.53455 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-4035.478,-11451.96,-55.53455,0,15000,0,0,100,0), -- 10:28:52 +(@PATH,2,-4038.098,-11441.65,-62.00945,0,0,0,0,100,0), -- 10:29:19 +(@PATH,3,-4048.067,-11425.79,-72.46973,0,0,0,0,100,0), -- 10:29:29 +(@PATH,4,-4072.011,-11409.6,-88.05364,0,0,0,0,100,0), -- 10:29:37 +(@PATH,5,-4090.952,-11407.41,-98.80654,0,0,0,0,100,0), -- 10:29:48 +(@PATH,6,-4100.202,-11406.66,-104.3065,0,0,0,0,100,0), -- 10:29:48 +(@PATH,7,-4118.357,-11413.92,-114.891,0,0,0,0,100,0), -- 10:30:01 +(@PATH,8,-4134.707,-11426.21,-125.61,0,0,0,0,100,0), -- 10:30:13 +(@PATH,9,-4137.963,-11431.42,-128.7505,0,0,0,0,100,0), -- 10:30:21 +(@PATH,10,-4144.455,-11462.52,-130.7656,0,0,0,0,100,0), -- 10:30:26 +(@PATH,11,-4143.278,-11481.03,-130.6259,0,0,0,0,100,0), -- 10:30:36 +(@PATH,12,-4141.778,-11489.78,-130.6259,0,0,0,0,100,0), -- 10:30:36 +(@PATH,13,-4133.984,-11497.89,-130.5813,0,0,0,0,100,0), -- 10:30:46 +(@PATH,14,-4123.734,-11506.64,-135.3313,0,0,0,0,100,0), -- 10:30:46 +(@PATH,15,-4118.456,-11529.87,-135.6161,0,0,0,0,100,0), -- 10:30:57 +(@PATH,16,-4118.632,-11541.07,-135.6777,0,15000,0,0,100,0), -- 10:31:08 +(@PATH,17,-4107.033,-11536.5,-135.5405,0,0,0,0,100,0), -- 10:31:33 +(@PATH,18,-4095.169,-11530.58,-135.5151,0,0,0,0,100,0), -- 10:31:43 +(@PATH,19,-4072.678,-11526.62,-135.1866,0,0,0,0,100,0), -- 10:31:50 +(@PATH,20,-4068.678,-11527.37,-135.6866,0,0,0,0,100,0), -- 10:31:50 +(@PATH,21,-4062.178,-11528.87,-138.1866,0,0,0,0,100,0), -- 10:31:50 +(@PATH,22,-4044.695,-11532.02,-138.1443,0,0,0,0,100,0), -- 10:31:59 +(@PATH,23,-4042.251,-11532.67,-138.0262,0,0,0,0,100,0), -- 10:32:05 +(@PATH,24,-4035.501,-11537.42,-138.0262,0,0,0,0,100,0), -- 10:32:05 +(@PATH,25,-4028.77,-11550.78,-137.9687,0,0,0,0,100,0), -- 10:32:09 +(@PATH,26,-4026.27,-11555.78,-137.9687,0,0,0,0,100,0), -- 10:32:09 +(@PATH,27,-4020.903,-11567.01,-137.9309,0,0,0,0,100,0), -- 10:32:18 +(@PATH,28,-4006.608,-11590.79,-135.6749,0,0,0,0,100,0), -- 10:32:27 +(@PATH,29,-4001.739,-11597.25,-134.446,0,15000,0,0,100,0), -- 10:32:37 +(@PATH,30,-4003.607,-11589.51,-135.0951,0,0,0,0,100,0), -- 10:33:00 +(@PATH,31,-4008.607,-11582.01,-137.5951,0,0,0,0,100,0), -- 10:33:00 +(@PATH,32,-4020.018,-11566.11,-137.9106,0,0,0,0,100,0), -- 10:33:08 +(@PATH,33,-4028.915,-11551.29,-137.955,0,0,0,0,100,0), -- 10:33:18 +(@PATH,34,-4035.739,-11537.94,-137.9934,0,0,0,0,100,0), -- 10:33:27 +(@PATH,35,-4044.477,-11531.19,-138.0956,0,0,0,0,100,0), -- 10:33:30 +(@PATH,36,-4064.476,-11525.09,-135.8434,0,0,0,0,100,0), -- 10:33:36 +(@PATH,37,-4070.578,-11522.78,-135.0313,0,0,0,0,100,0), -- 10:33:44 +(@PATH,38,-4073.483,-11514.04,-135.0202,0,15000,0,0,100,0), -- 10:33:47 +(@PATH,39,-4112.552,-11504.43,-135.4866,0,0,0,0,100,0), -- 10:34:12 +(@PATH,40,-4118.729,-11500.47,-135.2996,0,0,0,0,100,0), -- 10:34:27 +(@PATH,41,-4131.229,-11491.97,-130.2996,0,0,0,0,100,0), -- 10:34:27 +(@PATH,42,-4134.815,-11481.72,-130.2471,0,0,0,0,100,0), -- 10:34:37 +(@PATH,43,-4135.565,-11478.97,-130.2471,0,0,0,0,100,0), -- 10:34:37 +(@PATH,44,-4136.778,-11458.39,-130.6105,0,0,0,0,100,0), -- 10:34:47 +(@PATH,45,-4136.778,-11457.14,-130.6105,0,0,0,0,100,0), -- 10:34:47 +(@PATH,46,-4133.271,-11441.38,-130.0716,0,0,0,0,100,0), -- 10:34:56 +(@PATH,47,-4122.668,-11422.46,-118.9364,0,0,0,0,100,0), -- 10:35:04 +(@PATH,48,-4108.187,-11412.36,-108.8878,0,0,0,0,100,0), -- 10:35:11 +(@PATH,49,-4089.786,-11408.53,-98.16229,0,0,0,0,100,0), -- 10:35:20 +(@PATH,50,-4071.33,-11410.57,-87.74048,0,0,0,0,100,0), -- 10:35:28 +(@PATH,51,-4054.675,-11419.34,-76.96556,0,0,0,0,100,0), -- 10:35:37 +(@PATH,52,-4047.425,-11424.59,-72.71556,0,0,0,0,100,0), -- 10:35:37 +(@PATH,53,-4042.097,-11435.35,-65.71899,0,0,0,0,100,0), -- 10:35:48 +(@PATH,54,-4039.347,-11441.85,-62.21899,0,0,0,0,100,0); -- 10:35:48 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=57721; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(57721, 57721, 0, 0, 1), +(57721, 57720, 2, 270, 2); + +-- Pathing for Exodar Peacekeeper Entry: 16733 'TDB FORMAT' +SET @NPC := 57721; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-3967.541,`position_y`=-11439.45,`position_z`=-136.5146 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-3967.541,-11439.45,-136.5146,0,0,0,0,100,0), -- 10:19:30 +(@PATH,2,-3988.034,-11458.35,-136.91,0,0,0,0,100,0), -- 10:19:56 +(@PATH,3,-3995.157,-11467.58,-136.9,0,0,0,0,100,0), -- 10:20:09 +(@PATH,4,-3998.407,-11481.33,-137.15,0,0,0,0,100,0), -- 10:20:09 +(@PATH,5,-3998.143,-11483.91,-137.1721,0,0,0,0,100,0), -- 10:20:18 +(@PATH,6,-3993.893,-11490.66,-137.1721,0,0,0,0,100,0), -- 10:20:18 +(@PATH,7,-3991.643,-11494.16,-136.9221,0,0,0,0,100,0), -- 10:20:18 +(@PATH,8,-3990.893,-11495.41,-136.9221,0,0,0,0,100,0), -- 10:20:18 +(@PATH,9,-3985.393,-11504.16,-136.9221,0,0,0,0,100,0), -- 10:20:18 +(@PATH,10,-3982.393,-11509.16,-136.9221,0,0,0,0,100,0), -- 10:20:18 +(@PATH,11,-3978.886,-11514.21,-136.8319,0,0,0,0,100,0), -- 10:20:31 +(@PATH,12,-3965.32,-11535.52,-135.6286,0,0,0,0,100,0), -- 10:20:39 +(@PATH,13,-3962.82,-11541.27,-134.3786,0,0,0,0,100,0), -- 10:20:39 +(@PATH,14,-3962.07,-11543.27,-134.1286,0,0,0,0,100,0), -- 10:20:39 +(@PATH,15,-3960.32,-11547.27,-134.1286,0,0,0,0,100,0), -- 10:20:39 +(@PATH,16,-3953.078,-11561.7,-133.8862,0,0,0,0,100,0), -- 10:20:49 +(@PATH,17,-3952.157,-11563.7,-133.8141,0,0,0,0,100,0), -- 10:20:55 +(@PATH,18,-3954.035,-11559.74,-134.0775,0,0,0,0,100,0), -- 10:21:18 +(@PATH,19,-3958.522,-11542.85,-134.0628,0,0,0,0,100,0), -- 10:21:24 +(@PATH,20,-3958.772,-11541.35,-134.3128,0,0,0,0,100,0), -- 10:21:24 +(@PATH,21,-3959.772,-11534.6,-135.5628,0,0,0,0,100,0), -- 10:21:24 +(@PATH,22,-3960.772,-11530.1,-136.5628,0,0,0,0,100,0), -- 10:21:24 +(@PATH,23,-3976.953,-11511.68,-136.8674,0,0,0,0,100,0), -- 10:21:33 +(@PATH,24,-3980.453,-11507.68,-136.8674,0,0,0,0,100,0), -- 10:21:33 +(@PATH,25,-3984.203,-11503.68,-136.8674,0,0,0,0,100,0), -- 10:21:33 +(@PATH,26,-3991.703,-11495.68,-136.8674,0,0,0,0,100,0), -- 10:21:33 +(@PATH,27,-3992.703,-11494.68,-136.8674,0,0,0,0,100,0), -- 10:21:33 +(@PATH,28,-3995.201,-11491.97,-137.0053,0,0,0,0,100,0), -- 10:21:52 +(@PATH,29,-4000.951,-11484.97,-137.0053,0,0,0,0,100,0), -- 10:21:52 +(@PATH,30,-4001.701,-11483.97,-137.0053,0,0,0,0,100,0), -- 10:21:52 +(@PATH,31,-3997.792,-11464.48,-137.0493,0,0,0,0,100,0), -- 10:22:02 +(@PATH,32,-3990.042,-11456.23,-136.7993,0,0,0,0,100,0), -- 10:22:02 +(@PATH,33,-3987.292,-11453.23,-136.7993,0,0,0,0,100,0), -- 10:22:02 +(@PATH,34,-3986.042,-11451.73,-136.7993,0,0,0,0,100,0); -- 10:22:02 + +-- Pathing for Exodar Peacekeeper Entry: 16733 'TDB FORMAT' +SET @NPC := 57735; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-4251.791,`position_y`=-11767.84,`position_z`=-93.89223 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-4251.791,-11767.84,-93.89223,0,0,0,0,100,0), -- 10:07:56 +(@PATH,2,-4253.477,-11770.7,-93.53635,0,0,0,0,100,0), -- 10:08:00 +(@PATH,3,-4266.667,-11783.95,-93.56421,0,0,0,0,100,0), -- 10:08:04 +(@PATH,4,-4287.891,-11793.3,-94.06949,0,0,0,0,100,0), -- 10:08:13 +(@PATH,5,-4292.896,-11799.17,-94.09827,0,0,0,0,100,0), -- 10:08:21 +(@PATH,6,-4291.396,-11801.67,-94.09827,0,0,0,0,100,0), -- 10:08:21 +(@PATH,7,-4284.396,-11814.92,-99.59827,0,0,0,0,100,0), -- 10:08:21 +(@PATH,8,-4283.396,-11816.67,-99.59827,0,0,0,0,100,0), -- 10:08:21 +(@PATH,9,-4271.257,-11813.78,-99.64638,0,0,0,0,100,0), -- 10:08:33 +(@PATH,10,-4247.323,-11799.34,-95.82317,0,0,0,0,100,0), -- 10:08:40 +(@PATH,11,-4244.717,-11797.41,-95.79004,0,0,0,0,100,0), -- 10:08:50 +(@PATH,12,-4237.407,-11793.06,-95.55835,0,0,0,0,100,0), -- 10:08:53 +(@PATH,13,-4233.212,-11797.79,-95.51921,0,0,0,0,100,0), -- 10:08:57 +(@PATH,14,-4230.32,-11804.69,-95.54309,0,0,0,0,100,0), -- 10:08:59 +(@PATH,15,-4242.375,-11806.88,-95.75206,0,0,0,0,100,0), -- 10:09:02 +(@PATH,16,-4249.163,-11807,-98.797,0,0,0,0,100,0), -- 10:09:08 +(@PATH,17,-4271.709,-11816.08,-99.78216,0,0,0,0,100,0), -- 10:09:15 +(@PATH,18,-4278.459,-11818.83,-99.78216,0,0,0,0,100,0), -- 10:09:15 +(@PATH,19,-4278.884,-11823.21,-99.79669,0,0,0,0,100,0), -- 10:09:21 +(@PATH,20,-4277.884,-11824.96,-99.79669,0,0,0,0,100,0), -- 10:09:21 +(@PATH,21,-4267.689,-11842.01,-112.3755,0,0,0,0,100,0), -- 10:09:25 +(@PATH,22,-4266.437,-11843.94,-112.2757,0,0,0,0,100,0), -- 10:09:34 +(@PATH,23,-4257.481,-11844.73,-112.4191,0,0,0,0,100,0), -- 10:09:36 +(@PATH,24,-4256.231,-11843.73,-112.4191,0,0,0,0,100,0), -- 10:09:36 +(@PATH,25,-4255.231,-11843.23,-112.1691,0,0,0,0,100,0), -- 10:09:36 +(@PATH,26,-4249.231,-11839.98,-115.6691,0,0,0,0,100,0), -- 10:09:36 +(@PATH,27,-4239.349,-11833.89,-115.6299,0,0,0,0,100,0), -- 10:09:43 +(@PATH,28,-4231.849,-11829.14,-115.6299,0,0,0,0,100,0), -- 10:09:43 +(@PATH,29,-4226.349,-11825.89,-115.6299,0,0,0,0,100,0), -- 10:09:43 +(@PATH,30,-4221.665,-11822.42,-116.7485,0,0,0,0,100,0), -- 10:09:55 +(@PATH,31,-4219.165,-11820.92,-117.9985,0,0,0,0,100,0), -- 10:09:55 +(@PATH,32,-4216.665,-11819.17,-119.2485,0,0,0,0,100,0), -- 10:09:55 +(@PATH,33,-4207.821,-11811.86,-123.7914,0,0,0,0,100,0), -- 10:10:00 +(@PATH,34,-4204.571,-11808.86,-125.5414,0,0,0,0,100,0), -- 10:10:00 +(@PATH,35,-4202.321,-11806.86,-126.7914,0,0,0,0,100,0), -- 10:10:00 +(@PATH,36,-4199.845,-11803.17,-128.7961,0,0,0,0,100,0), -- 10:10:08 +(@PATH,37,-4198.095,-11800.17,-130.2961,0,0,0,0,100,0), -- 10:10:08 +(@PATH,38,-4194.845,-11794.67,-132.7961,0,0,0,0,100,0), -- 10:10:08 +(@PATH,39,-4199.826,-11803.24,-128.946,0,0,0,0,100,0), -- 10:10:15 +(@PATH,40,-4207.697,-11811.62,-124.236,0,0,0,0,100,0), -- 10:10:20 +(@PATH,41,-4210.447,-11813.87,-122.736,0,0,0,0,100,0), -- 10:10:20 +(@PATH,42,-4216.582,-11818.92,-119.3844,0,0,0,0,100,0), -- 10:10:27 +(@PATH,43,-4218.832,-11820.67,-118.1344,0,0,0,0,100,0), -- 10:10:27 +(@PATH,44,-4221.582,-11822.42,-116.6344,0,0,0,0,100,0), -- 10:10:27 +(@PATH,45,-4222.832,-11823.42,-115.6344,0,0,0,0,100,0), -- 10:10:27 +(@PATH,46,-4224.417,-11824.55,-115.6566,0,0,0,0,100,0), -- 10:10:32 +(@PATH,47,-4226.417,-11825.8,-115.6566,0,0,0,0,100,0), -- 10:10:32 +(@PATH,48,-4231.917,-11829.3,-115.9066,0,0,0,0,100,0), -- 10:10:32 +(@PATH,49,-4239.417,-11833.8,-115.9066,0,0,0,0,100,0), -- 10:10:32 +(@PATH,50,-4255.09,-11843.43,-112.396,0,0,0,0,100,0), -- 10:10:44 +(@PATH,51,-4255.84,-11843.93,-112.396,0,0,0,0,100,0), -- 10:10:44 +(@PATH,52,-4257.34,-11844.68,-112.396,0,0,0,0,100,0), -- 10:10:44 +(@PATH,53,-4259.59,-11846.18,-112.396,0,0,0,0,100,0), -- 10:10:44 +(@PATH,54,-4266.089,-11844.57,-112.6297,0,0,0,0,100,0), -- 10:10:51 +(@PATH,55,-4267.195,-11842.41,-112.1786,0,0,0,0,100,0), -- 10:10:54 +(@PATH,56,-4278.661,-11823.64,-99.84711,0,0,0,0,100,0), -- 10:11:03 +(@PATH,57,-4271.714,-11815.94,-99.62749,0,0,0,0,100,0), -- 10:11:06 +(@PATH,58,-4269.714,-11815.19,-99.62749,0,0,0,0,100,0), -- 10:11:06 +(@PATH,59,-4266.714,-11813.94,-99.62749,0,0,0,0,100,0), -- 10:11:06 +(@PATH,60,-4249.543,-11807.19,-99.2198,0,0,0,0,100,0), -- 10:11:13 +(@PATH,61,-4238.826,-11807.14,-95.64388,0,0,0,0,100,0), -- 10:11:21 +(@PATH,62,-4234.899,-11806.84,-95.56003,0,0,0,0,100,0), -- 10:11:25 +(@PATH,63,-4230.451,-11804.73,-95.52745,0,0,0,0,100,0), -- 10:11:28 +(@PATH,64,-4237.342,-11793.27,-95.53383,0,0,0,0,100,0), -- 10:11:30 +(@PATH,65,-4244.645,-11797.43,-95.85562,0,0,0,0,100,0), -- 10:11:34 +(@PATH,66,-4247.373,-11799.21,-95.78325,0,0,0,0,100,0), -- 10:11:38 +(@PATH,67,-4252.373,-11802.46,-99.03325,0,0,0,0,100,0), -- 10:11:38 +(@PATH,68,-4270.794,-11813.47,-99.60289,0,0,0,0,100,0), -- 10:11:48 +(@PATH,69,-4284.358,-11814.79,-99.57885,0,0,0,0,100,0), -- 10:11:55 +(@PATH,70,-4291.358,-11801.79,-94.07885,0,0,0,0,100,0), -- 10:11:55 +(@PATH,71,-4292.858,-11799.29,-94.07885,0,0,0,0,100,0), -- 10:11:55 +(@PATH,72,-4294.358,-11796.54,-94.07885,0,0,0,0,100,0), -- 10:11:55 +(@PATH,73,-4282.959,-11793.07,-93.84309,0,0,0,0,100,0), -- 10:12:07 +(@PATH,74,-4266.636,-11784.24,-93.59824,0,0,0,0,100,0), -- 10:12:14 +(@PATH,75,-4252.229,-11768.59,-93.55703,0,0,0,0,100,0); -- 10:12:24 + +-- Pathing for Worker Entry: 18800 'TDB FORMAT' +SET @NPC := 67155; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-4045.227,`position_y`=-11567.36,`position_z`=-138.4557 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-4045.227,-11567.36,-138.4557,2.657736,60000,0,0,100,0), -- 10:20:52 +(@PATH,2,-4041.453,-11566.98,-138.16,0,0,0,0,100,0), -- 10:21:06 +(@PATH,3,-4037.367,-11566.4,-138.3107,0,0,0,0,100,0), -- 10:21:08 +(@PATH,4,-4031.307,-11552.28,-137.9972,0,0,0,0,100,0), -- 10:21:13 +(@PATH,5,-4042.002,-11530.51,-138.0085,0,0,0,0,100,0), -- 10:21:19 +(@PATH,6,-4041.574,-11527.51,-138.0677,0,0,0,0,100,0), -- 10:21:24 +(@PATH,7,-4038.824,-11520.26,-141.0677,0,0,0,0,100,0), -- 10:21:24 +(@PATH,8,-4026.281,-11500.64,-140.7895,0,0,0,0,100,0), -- 10:21:29 +(@PATH,9,-4015.825,-11486.67,-139.4373,0,0,0,0,100,0), -- 10:21:42 +(@PATH,10,-4014.075,-11484.67,-138.1873,0,0,0,0,100,0), -- 10:21:42 +(@PATH,11,-4012.325,-11483.17,-137.1873,0,0,0,0,100,0), -- 10:21:42 +(@PATH,12,-4009.575,-11480.42,-137.1873,0,0,0,0,100,0), -- 10:21:42 +(@PATH,13,-3995.471,-11465.6,-136.9284,0,0,0,0,100,0), -- 10:21:51 +(@PATH,14,-3967.808,-11441.67,-136.644,0,0,0,0,100,0), -- 10:22:00 +(@PATH,15,-3952.092,-11437.37,-136.3886,0,0,0,0,100,0), -- 10:22:13 +(@PATH,16,-3933.094,-11436.87,-134.5441,0,0,0,0,100,0), -- 10:22:20 +(@PATH,17,-3913.105,-11438.32,-132.681,0,0,0,0,100,0), -- 10:22:28 +(@PATH,18,-3905.355,-11438.57,-132.681,0,0,0,0,100,0), -- 10:22:28 +(@PATH,19,-3898.855,-11439.07,-132.681,0,0,0,0,100,0), -- 10:22:28 +(@PATH,20,-3894.605,-11439.32,-132.681,0,0,0,0,100,0), -- 10:22:28 +(@PATH,21,-3878.679,-11443.58,-132.5145,0,0,0,0,100,0), -- 10:22:44 +(@PATH,22,-3872.179,-11446.33,-132.2645,0,0,0,0,100,0), -- 10:22:44 +(@PATH,23,-3840.745,-11457.86,-131.9258,0,0,0,0,100,0), -- 10:22:59 +(@PATH,24,-3839.995,-11457.86,-131.9258,0,0,0,0,100,0), -- 10:22:59 +(@PATH,25,-3834.995,-11459.36,-135.1758,0,0,0,0,100,0), -- 10:22:59 +(@PATH,26,-3829.995,-11461.11,-138.1758,0,0,0,0,100,0), -- 10:22:59 +(@PATH,27,-3828.745,-11461.61,-138.1758,0,0,0,0,100,0), -- 10:22:59 +(@PATH,28,-3825.995,-11462.36,-138.1758,0,0,0,0,100,0), -- 10:22:59 +(@PATH,29,-3819.628,-11464.71,-138.4012,0,0,0,0,100,0), -- 10:23:11 +(@PATH,30,-3812.128,-11467.21,-138.1512,0,0,0,0,100,0), -- 10:23:11 +(@PATH,31,-3795.622,-11472.34,-137.6514,0,0,0,0,100,0), -- 10:23:21 +(@PATH,32,-3789.372,-11473.84,-134.6514,0,0,0,0,100,0), -- 10:23:21 +(@PATH,33,-3786.872,-11474.34,-134.4014,0,0,0,0,100,0), -- 10:23:21 +(@PATH,34,-3778.248,-11477.4,-134.2023,0,20000,0,0,100,0), -- 10:23:29 +(@PATH,35,-3779.69,-11479.03,-134.2154,0,0,0,0,100,0), -- 10:23:51 +(@PATH,36,-3790.385,-11476.55,-134.3773,0,0,0,0,100,0), -- 10:23:57 +(@PATH,37,-3795.885,-11475.05,-137.3773,0,0,0,0,100,0), -- 10:23:57 +(@PATH,38,-3796.885,-11474.8,-137.8773,0,0,0,0,100,0), -- 10:23:57 +(@PATH,39,-3798.306,-11474.22,-137.853,0,0,0,0,100,0), -- 10:24:02 +(@PATH,40,-3800.556,-11473.22,-137.853,0,0,0,0,100,0), -- 10:24:02 +(@PATH,41,-3812.556,-11467.97,-137.853,0,0,0,0,100,0), -- 10:24:02 +(@PATH,42,-3819.806,-11464.72,-138.103,0,0,0,0,100,0), -- 10:24:02 +(@PATH,43,-3825.306,-11462.22,-138.103,0,0,0,0,100,0), -- 10:24:02 +(@PATH,44,-3829.718,-11460.37,-138.1092,0,0,0,0,100,0), -- 10:24:15 +(@PATH,45,-3834.718,-11458.62,-135.1092,0,0,0,0,100,0), -- 10:24:15 +(@PATH,46,-3839.718,-11456.87,-132.1092,0,0,0,0,100,0), -- 10:24:15 +(@PATH,47,-3840.718,-11456.62,-132.1092,0,0,0,0,100,0), -- 10:24:15 +(@PATH,48,-3872.166,-11446.86,-132.4203,0,0,0,0,100,0), -- 10:24:22 +(@PATH,49,-3880.416,-11444.36,-132.4203,0,0,0,0,100,0), -- 10:24:22 +(@PATH,50,-3894.63,-11440.23,-132.5016,0,0,0,0,100,0), -- 10:24:39 +(@PATH,51,-3898.38,-11438.98,-132.7516,0,0,0,0,100,0), -- 10:24:39 +(@PATH,52,-3905.38,-11436.98,-132.7516,0,0,0,0,100,0), -- 10:24:39 +(@PATH,53,-3909.953,-11436.46,-132.7919,0,0,0,0,100,0), -- 10:24:49 +(@PATH,54,-3919.703,-11436.96,-132.7919,0,0,0,0,100,0), -- 10:24:49 +(@PATH,55,-3932.703,-11437.46,-134.2919,0,0,0,0,100,0), -- 10:24:49 +(@PATH,56,-3955.675,-11438.13,-136.1737,0,0,0,0,100,0), -- 10:25:01 +(@PATH,57,-3967.982,-11443.01,-136.5633,0,0,0,0,100,0), -- 10:25:10 +(@PATH,58,-3987.157,-11453.09,-136.8458,0,0,0,0,100,0), -- 10:25:22 +(@PATH,59,-3990.157,-11456.09,-136.8458,0,0,0,0,100,0), -- 10:25:22 +(@PATH,60,-3998.407,-11464.34,-137.0958,0,0,0,0,100,0), -- 10:25:22 +(@PATH,61,-3999.407,-11465.34,-137.0958,0,0,0,0,100,0), -- 10:25:22 +(@PATH,62,-4014.187,-11479.69,-137.1316,0,0,0,0,100,0), -- 10:25:33 +(@PATH,63,-4015.437,-11481.19,-138.1316,0,0,0,0,100,0), -- 10:25:33 +(@PATH,64,-4017.937,-11483.44,-139.6316,0,0,0,0,100,0), -- 10:25:33 +(@PATH,65,-4019.687,-11485.19,-140.6316,0,0,0,0,100,0), -- 10:25:33 +(@PATH,66,-4020.62,-11486.18,-140.636,0,0,0,0,100,0), -- 10:25:41 +(@PATH,67,-4029.12,-11499.68,-140.886,0,0,0,0,100,0), -- 10:25:41 +(@PATH,68,-4042.905,-11526.72,-138.0882,0,0,0,0,100,0), -- 10:25:57 +(@PATH,69,-4041.908,-11531.32,-138.0012,0,0,0,0,100,0), -- 10:26:02 +(@PATH,70,-4035.658,-11537.57,-138.0012,0,0,0,0,100,0), -- 10:26:02 +(@PATH,71,-4033.483,-11539.54,-137.9768,0,0,0,0,100,0), -- 10:26:08 +(@PATH,72,-4033.447,-11555.33,-138.039,0,0,0,0,100,0), -- 10:26:12 +(@PATH,73,-4041.411,-11566.91,-138.1366,0,0,0,0,100,0), -- 10:26:19 +(@PATH,74,-4043.277,-11567.36,-138.179,0,0,0,0,100,0); -- 10:26:21 + +-- Add missing Exodar Peace Keepers +SET @CGUID:=87912; +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+15; +INSERT INTO `creature` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `curhealth`) VALUES +(@CGUID+0, 16733, 530, -4014.95, -11691.79, -134.8826, 3.211406, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+1, 16733, 530, -3872.768, -11745.65, -107.2824, 1.937315, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+2, 16733, 530, -3858.128, -11736.21, -107.0747, 2.111848, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+3, 16733, 530, -3874.034, -11619.76, -137.4797, 4.118977, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+4, 16733, 530, -3896.759, -11608.23, -137.7288, 4.13643, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+5, 16733, 530, -3883.912, -11577.22, -132.7659, 1.169371, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+6, 16733, 530, -3857.081, -11591.1, -132.5431, 0.8901179, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+7, 16733, 530, -3928.165, -11568.19, -150.2529, 1.012291, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+8, 16733, 530, -3983.486, -11659.17, -139.0413, 6.126106, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+9, 16733, 530, -4128.439, -11441.22, -130.4346, 3.892084, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+10, 16733, 530, -4145.358, -11432.4, -130.6977, 4.13643, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+11, 16733, 530, -3958.252, -11432.68, -136.5482, 3.089233, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+12, 16733, 530, -3957.141, -11443.25, -136.5704, 2.984513, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+13, 16733, 530, -3914.363, -11441.08, -132.8212, 0.01745329, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+14, 16733, 530, -3915.224, -11430.32, -132.7888, 0, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+15, 16733, 530, -3735.099, -11505.95, -133.9994, 2.722714, 120, 0); -- 16733 (Area: -1) (Auras: ) diff --git a/sql/updates/world/2016_01_17_09_world.sql b/sql/updates/world/2016_01_17_09_world.sql new file mode 100644 index 00000000000..85e6f535866 --- /dev/null +++ b/sql/updates/world/2016_01_17_09_world.sql @@ -0,0 +1,31 @@ +SET @OGUID:=6362; +SET @CGUID:=78301; +SET @Event:=2; + +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, 180796, 0, 1, 1, -3826.189, -771.3663, 8.083211, 2.146753, 0, 0, 0, 1, 120, 255, 1), -- 180796 (Area: 150) +(@OGUID+1, 180797, 0, 1, 1, -3825.66, -770.9445, 8.083211, 5.270896, 0, 0, 0, 1, 120, 255, 1), -- 180797 (Area: 150) +(@OGUID+2, 178746, 0, 1, 1, -3822.936, -769.4861, 8.083211, 1.518436, 0, 0, 0, 1, 120, 255, 1); -- 178746 (Area: 150) + +DELETE FROM `game_event_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+2 AND `eventEntry`=@Event; +INSERT INTO `game_event_gameobject` SELECT @Event, gameobject.guid FROM `gameobject` WHERE gameobject.guid BETWEEN @OGUID+0 AND @OGUID+2; + +-- Add spawns Pat's Snowcloud Guy & Wonderform Operator <Smokywood Pastures> +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+10; +INSERT INTO `creature` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `curhealth`) VALUES +(@CGUID+0, 15730, 0, 2051.343, 272.4555, 57.25123, 0, 120, 0), -- 15730 (Area: 159) (Auras: 26000 - 26000) +(@CGUID+1, 15730, 0, 2051.359, 272.4567, 57.25214, 0, 120, 0), -- 15730 (Area: 159) (Auras: 26000 - 26000) +(@CGUID+2, 15730, 0, -5049.26, -818.5426, 495.3753, 0, 120, 0), -- 15730 (Area: 809) (Auras: 26000 - 26000) +(@CGUID+3, 15730, 0, -5049.293, -818.5344, 495.3785, 0, 120, 0), -- 15730 (Area: 809) (Auras: 26000 - 26000) +(@CGUID+4, 15730, 0, -8823.889, 540.5417, 96.89484, 5.951573, 120, 0), -- 15730 (Area: 5148) (Auras: 26000 - 26000) +(@CGUID+5, 15730, 0, -8823.89, 540.528, 96.89533, 2.443461, 120, 0), -- 15730 (Area: 5148) (Auras: 26000 - 26000) +(@CGUID+6, 15730, 0, -14294.22, 516.1476, 9.037167, 5.340707, 120, 0), -- 15730 (Area: 35) (Auras: 26000 - 26000) +(@CGUID+7, 15730, 0, -14294.3, 516.146, 9.037253, 1.815142, 120, 0), -- 15730 (Area: 35) (Auras: 26000 - 26000) +(@CGUID+8, 15730, 0, -3826.132, -771.75, 8.083211, 0.1396263, 120, 0), -- 15730 (Area: 150) (Auras: 26000 - 26000) +(@CGUID+9, 15730, 0, -3826.108, -771.7864, 8.083211, 3.665191, 120, 0), -- 15730 (Area: 150) (Auras: 26000 - 26000) +(@CGUID+10, 15732, 0, -3821.368, -768.9375, 8.083211, 1.745329, 120, 0); -- 15732 (Area: 150) + +DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+10 AND `eventEntry`=@Event; +INSERT INTO `game_event_creature` SELECT @Event, creature.guid FROM `creature` WHERE creature.guid BETWEEN @CGUID+0 AND @CGUID+10; + diff --git a/sql/updates/world/2016_01_17_10_world.sql b/sql/updates/world/2016_01_17_10_world.sql new file mode 100644 index 00000000000..0fdc04eb60f --- /dev/null +++ b/sql/updates/world/2016_01_17_10_world.sql @@ -0,0 +1 @@ +UPDATE `creature` SET `MovementType`=0 WHERE `guid`=131180; diff --git a/sql/updates/world/2016_01_17_11_world.sql b/sql/updates/world/2016_01_17_11_world.sql new file mode 100644 index 00000000000..9ab963a2ff2 --- /dev/null +++ b/sql/updates/world/2016_01_17_11_world.sql @@ -0,0 +1,10 @@ +UPDATE `smart_scripts` SET `event_type`=4 WHERE `entryorguid` in (18942,7823,18789,16587,17554,2859,2858,523,352,26876,3615,18937,24032,26852,16192,4312,27344,1571,12596,2409,931,6026,12577,16822,1572,8610,4407,1387,3310,19181,18808,1573,2995,2835,3838,2389,12740,2226,18939,3841,2299,26879,18931,2432,10897,6726,2851,2861,2941,12578,4321,3305,4314,11899,15178,31426,12636,4267,26881,4317,4319,4551,22935,6706,7824,8018,8019,8020,20762,18791,8609,12616,18807,19317,26878,10378,11138,11139,37915,26846,22485,11900,11901,12617,13177,18938,15177,16189,16227,17555,24366,18785,18788,18809,26602,18930,18953,19558,20234,21107,26844,22936,23736,24061,24155,26847,25288,26566,26845,26848,26850,26853,26877,26880,29762,30271) and id =2; +UPDATE `smart_scripts` SET `link`=3, `event_type`=4 WHERE `entryorguid`=18931 AND `source_type`=0 AND `id`=2 AND `link`=0; +UPDATE `smart_scripts` SET `link`=2 WHERE `entryorguid`=26602 AND `source_type`=0 AND `id`=0 AND `link`=0; +UPDATE `smart_scripts` SET `link`=2 WHERE `entryorguid`=26853 AND `source_type`=0 AND `id`=0 AND `link`=0; +UPDATE `smart_scripts` SET `link`=2 WHERE `entryorguid`=26881 AND `source_type`=0 AND `id`=0 AND `link`=0; +UPDATE `smart_scripts` SET `link`=2 WHERE `entryorguid`=20234 AND `source_type`=0 AND `id`=0 AND `link`=0; +UPDATE `smart_scripts` SET `link`=2 WHERE `entryorguid`=26876 AND `source_type`=0 AND `id`=0 AND `link`=0; +UPDATE `smart_scripts` SET `link`=3, `event_type`=4 WHERE `entryorguid`=18930 AND `source_type`=0 AND `id`=2 AND `link`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=2385900 AND `source_type`=9 AND `id`=2 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11, `action_param1`=14313, `action_param2`=2, `action_param3`=0, `target_type`=1 WHERE `entryorguid`=2385900 AND `source_type`=9 AND `id`=1 AND `link`=0; diff --git a/sql/updates/world/2016_01_17_12_world.sql b/sql/updates/world/2016_01_17_12_world.sql new file mode 100644 index 00000000000..e4e8ab5e9e2 --- /dev/null +++ b/sql/updates/world/2016_01_17_12_world.sql @@ -0,0 +1,30 @@ +-- +SET @pool_id=369; +SET @GUID=87572; +DELETE FROM `pool_template` WHERE `entry` = @pool_id; +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@pool_id, 5, 'Ethereum Jailor'); + +DELETE FROM `pool_creature` WHERE `guid` BETWEEN @GUID AND @GUID+20; +INSERT INTO `pool_creature` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@GUID+0, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+1, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+2, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+3, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+4, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+5, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+6, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+7, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+8, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+9, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+10, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+11, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+12, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+13, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+14, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+15, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+16, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+17, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+18, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+19, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+20, @pool_id, 0, 'Ethereum Jailor'); diff --git a/sql/updates/world/2016_01_17_13_world.sql b/sql/updates/world/2016_01_17_13_world.sql new file mode 100644 index 00000000000..163aa3fb659 --- /dev/null +++ b/sql/updates/world/2016_01_17_13_world.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `creature` WHERE `guid`=66270; +UPDATE `creature` SET `position_x`=-3047.323, `position_y`=4081.128, `position_z`=2.707369, `orientation`=5.484657, `spawndist`=10, `MovementType`=1 WHERE `guid`=66343; diff --git a/sql/updates/world/2016_01_17_14_world.sql b/sql/updates/world/2016_01_17_14_world.sql new file mode 100644 index 00000000000..c8b9405abff --- /dev/null +++ b/sql/updates/world/2016_01_17_14_world.sql @@ -0,0 +1,203 @@ +-- Delete all existing spawns +DELETE FROM `creature` WHERE `guid` IN (97259, 97261, 97258, 97257, 97256, 97255, 131106, 109804, 109803, 109802); + +-- Respawn all spawns +SET @CGUID:=134849; +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+31; +INSERT INTO `creature` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `curhealth`) VALUES +(@CGUID+0 , 27284, 571, 3970.129, -831.1373, 123.1972, 1.419617, 120, 10, 0), -- 27284 (Area: 4177) (possible waypoints or random movement) +(@CGUID+1 , 27284, 571, 3892.15, -898.545, 116.7031, 4.747295, 120, 0, 0), -- 27284 (Area: 0) (Auras: 51307 - 51307) +(@CGUID+2 , 27284, 571, 3877.338, -886.6799, 119.6563, 5.410521, 120, 0, 0), -- 27284 (Area: 0) (Auras: 51307 - 51307) +(@CGUID+3 , 27284, 571, 3981.821, -915.338, 103.8165, 0.4941546, 120, 10, 0), -- 27284 (Area: 4178) (possible waypoints or random movement) +(@CGUID+4 , 27284, 571, 4063.601, -863.5172, 112.0916, 3.294994, 120, 10, 0), -- 27284 (Area: 0) (possible waypoints or random movement) +(@CGUID+5 , 27284, 571, 4029.796, -817.8798, 122.6137, 5.148721, 120, 10, 0), -- 27284 (Area: 0) (possible waypoints or random movement) +(@CGUID+6 , 27284, 571, 4020.966, -913.8099, 107.1895, 1.902651, 120, 0, 0), -- 27284 (Area: 0) +(@CGUID+7 , 27401, 571, 4012.309, -778.3416, 119.4081, 5.117236, 120, 10, 0), -- 27401 (Area: 4177) (Auras: ) (possible waypoints or random movement) +(@CGUID+8 , 27401, 571, 3957.39, -879.4473, 120.6337, 1.665177, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+9 , 27401, 571, 3979.763, -878.6928, 118.7674, 2.167667, 120, 0, 0), -- 27401 (Area: 0) (Auras: ) +(@CGUID+10, 27401, 571, 3891.449, -871.9622, 110.0855, 4.131083, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+11, 27401, 571, 3908.99, -867.735, 108.25, 0.07704493, 120, 0, 0), -- 27401 (Area: 0) (Auras: ) +(@CGUID+12, 27401, 571, 4005.749, -911.3463, 107.528, 3.572126, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+13, 27401, 571, 4018.18, -838.5659, 120.1189, 3.396627, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+14, 27401, 571, 3997.235, -935.1, 104.7279, 0.895307, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+15, 27401, 571, 4046.337, -872.1385, 115.5023, 2.777797, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+16, 27401, 571, 4040.803, -824.1927, 119.995, 3.689994, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+17, 27401, 571, 4079.794, -860.7454, 111.5424, 3.844261, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+18, 27401, 571, 4112.891, -862.1273, 114.5041, 5.726786, 120, 0, 0), -- 27401 (Area: 0) (Auras: ) +(@CGUID+19, 27401, 571, 3962.095, -841.9584, 121.1146, 1.314913, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+20, 27401, 571, 3972.828, -817.3924, 124.1117, 1.684451, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+21, 27401, 571, 3927.054, -862.1707, 121.9197, 5.969274, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+22, 27401, 571, 3983.165, -884.7412, 117.6653, 3.801475, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+23, 27401, 571, 4000.266, -806.4115, 124.4378, 2.8901, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+24, 27401, 571, 3996.695, -804.8523, 124.5836, 5.710121, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+25, 27401, 571, 4029.536, -842.3114, 117.1135, 5.811058, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+26, 27401, 571, 4063.478, -903.8126, 115.2312, 3.785855, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+27, 27401, 571, 3971.025, -913.7602, 104.5964, 1.58825, 120, 0, 0), -- 27401 (Area: 0) (Auras: ) +(@CGUID+28, 27401, 571, 3992.506, -939.1702, 105.5502, 4.213991, 120, 0, 0), -- 27401 (Area: 0) (Auras: ) +(@CGUID+29, 27401, 571, 3930.066, -870.2675, 104.4508, 0.4872836, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+30, 27401, 571, 3961.272, -872.5833, 104.2002, 2.95032, 120, 0, 0), -- 27401 (Area: 0) (Auras: ) +(@CGUID+31, 27401, 571, 3912.686, -865.0364, 120.8479, 6.199958, 120, 0, 0); -- 27401 (Area: 0) (Auras: ) + +-- Pathing for Risen Wintergarde Defender Entry: 27284 'TDB FORMAT' +SET @NPC := 134849; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3962.255,`position_y`=-845.7626,`position_z`=120.7226 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,3962.255,-845.7626,120.7226,0,0,0,0,100,0), -- 17:07:32 +(@PATH,2,3964.674,-842.7882,121.4607,0,0,0,0,100,0), -- 17:07:33 +(@PATH,3,3967.174,-837.5382,122.2107,0,0,0,0,100,0), -- 17:07:33 +(@PATH,4,3971.408,-823.0021,124.1822,0,0,0,0,100,0), -- 17:07:39 +(@PATH,5,3972.536,-818.4142,124.181,0,0,0,0,100,0), -- 17:07:44 +(@PATH,6,3974.286,-811.9142,124.181,0,0,0,0,100,0), -- 17:07:44 +(@PATH,7,3977.374,-807.4382,123.8934,0,0,0,0,100,0), -- 17:07:49 +(@PATH,8,3990.374,-797.4382,122.8934,0,0,0,0,100,0), -- 17:07:49 +(@PATH,9,3996.358,-796.3887,122.3552,0,0,0,0,100,0), -- 17:07:58 +(@PATH,10,4002.608,-795.8887,121.8552,0,0,0,0,100,0), -- 17:07:58 +(@PATH,11,4005.141,-794.809,121.2954,0,0,0,0,100,0), -- 17:08:19 +(@PATH,12,3991.292,-796.7651,122.3158,0,0,0,0,100,0), -- 17:08:19 +(@PATH,13,3989.065,-798.5057,122.8027,0,0,0,0,100,0), -- 17:08:23 +(@PATH,14,3977.315,-807.5057,123.8027,0,0,0,0,100,0), -- 17:08:23 +(@PATH,15,3973.799,-814.1797,124.0833,0,0,0,0,100,0), -- 17:08:32 +(@PATH,16,3972.049,-819.9297,124.0833,0,0,0,0,100,0), -- 17:08:32 +(@PATH,17,3971.736,-820.819,124.0339,0,0,0,0,100,0), -- 17:08:37 +(@PATH,18,3970.236,-831.069,123.5339,0,0,0,0,100,0), -- 17:08:37 +(@PATH,19,3967.212,-837.6317,122.1643,0,0,0,0,100,0), -- 17:08:41 +(@PATH,20,3964.712,-842.6317,121.4143,0,0,0,0,100,0), -- 17:08:41 +(@PATH,21,3955.197,-848.4968,121.6359,0,0,0,0,100,0), -- 17:08:48 +(@PATH,22,3950.197,-850.4968,122.3859,0,0,0,0,100,0), -- 17:08:48 +(@PATH,23,3946.476,-852.2645,122.539,0,0,0,0,100,0), -- 17:08:54 +(@PATH,24,3938.226,-855.0145,122.289,0,0,0,0,100,0), -- 17:08:54 +(@PATH,25,3935.217,-855.6635,122.2252,0,0,0,0,100,0), -- 17:08:59 +(@PATH,26,3928.967,-856.4135,121.7252,0,0,0,0,100,0), -- 17:08:59 +(@PATH,27,3935.146,-855.8206,122.0987,0,0,0,0,100,0), -- 17:09:05 +(@PATH,28,3938.241,-854.9574,122.219,0,0,0,0,100,0), -- 17:09:07 +(@PATH,29,3946.491,-852.2074,122.719,0,0,0,0,100,0), -- 17:09:07 +(@PATH,30,3954.914,-848.747,121.6653,0,0,0,0,100,0); -- 17:09:13 + +-- Pathing for Risen Wintergarde Defender Entry: 27284 'TDB FORMAT' +SET @NPC := 134854; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4008.271,`position_y`=-870.0803,`position_z`=117.5745 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4008.271,-870.0803,117.5745,0,0,0,0,100,0), -- 16:58:23 +(@PATH,2,3996.876,-880.48,118.3026,0,0,0,0,100,0), -- 16:58:29 +(@PATH,3,3991.834,-882.1507,118.5546,0,0,0,0,100,0), -- 16:58:32 +(@PATH,4,3961.252,-886.0806,119.2003,0,0,0,0,100,0), -- 16:58:43 +(@PATH,5,3958.834,-887.8701,119.2766,0,0,0,0,100,0), -- 16:58:47 +(@PATH,6,3958.712,-888.809,119.2599,0,0,0,0,100,0), -- 16:58:48 +(@PATH,7,3983.712,-886.309,118.0099,0,0,0,0,100,0), -- 16:58:48 +(@PATH,8,3990.516,-884.9421,118.4627,0,0,0,0,100,0), -- 16:58:59 +(@PATH,9,4001.527,-882.609,118.6914,0,0,0,0,100,0), -- 16:59:05 +(@PATH,10,4009.196,-881.325,118.3849,0,0,0,0,100,0), -- 16:59:09 +(@PATH,11,4017.301,-863.9352,116.9195,0,0,0,0,100,0), -- 16:59:16 +(@PATH,12,4023.301,-849.1852,116.9195,0,0,0,0,100,0), -- 16:59:16 +(@PATH,13,4025.668,-847.6936,116.7459,0,0,0,0,100,0), -- 16:59:23 +(@PATH,14,4036.918,-842.1936,116.7459,0,0,0,0,100,0), -- 16:59:23 +(@PATH,15,4041.683,-837.2839,117.6779,0,0,0,0,100,0), -- 16:59:31 +(@PATH,16,4031.176,-820.0336,121.8801,0,0,0,0,100,0), -- 16:59:47 +(@PATH,17,4027.651,-834.1048,118.0815,0,0,0,0,100,0), -- 16:59:47 +(@PATH,18,4023.714,-843.688,117.5524,0,0,0,0,100,0), -- 16:59:50 +(@PATH,19,4020.757,-848.9363,117.5502,0,0,0,0,100,0), -- 16:59:55 +(@PATH,20,4010.505,-867.1548,117.3328,0,0,0,0,100,0); -- 17:00:03 + +-- Pathing for Risen Wintergarde Defender Entry: 27284 'TDB FORMAT' +SET @NPC := 134855; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3998.09,`position_y`=-941.3831,`position_z`=105.5378 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,3998.09,-941.3831,105.5378,0,0,0,0,100,0), -- 16:58:00 +(@PATH,2,3982.87,-921.863,104.2338,0,0,0,0,100,0), -- 16:58:00 +(@PATH,3,3980.532,-918.3081,104.4937,0,0,0,0,100,0), -- 16:58:01 +(@PATH,4,3980.812,-915.6993,104.2544,0,0,0,0,100,0), -- 16:58:03 +(@PATH,5,3993.312,-909.1993,106.0044,0,0,0,0,100,0), -- 16:58:03 +(@PATH,6,4001.392,-906.8644,107.0495,0,0,0,0,100,0), -- 16:58:10 +(@PATH,7,4005.606,-907.3997,107.3568,0,0,0,0,100,0), -- 16:58:13 +(@PATH,8,4018.356,-914.8997,106.8568,0,0,0,0,100,0), -- 16:58:13 +(@PATH,9,4019.2,-915.515,107.0822,0,0,0,0,100,0), -- 16:58:21 +(@PATH,10,4016.712,-901.4606,107.2446,0,0,0,0,100,0), -- 16:58:23 +(@PATH,11,4006.091,-900.8485,107.6517,0,0,0,0,100,0), -- 16:58:28 +(@PATH,12,3999.341,-903.3485,107.4017,0,0,0,0,100,0), -- 16:58:28 +(@PATH,13,3990.741,-907.1246,106.0392,0,0,0,0,100,0), -- 16:58:38 +(@PATH,14,3981.241,-911.3746,104.0392,0,0,0,0,100,0), -- 16:58:38 +(@PATH,15,3998.09,-941.3831,105.5378,0,0,0,0,100,0); -- 16:59:21 + +-- Pathing for Risen Wintergarde Defender Entry: 27284 'TDB FORMAT' +SET @NPC := 134852; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3954.649,`position_y`=-896.4279,`position_z`=104.172 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,3954.649,-896.4279,104.172,0,0,0,0,100,0), -- 16:57:59 +(@PATH,2,3956.389,-893.2208,104.3171,0,0,0,0,100,0), -- 16:58:01 +(@PATH,3,3950.639,-880.2208,104.8171,0,0,0,0,100,0), -- 16:58:01 +(@PATH,4,3948.071,-877.5638,104.6277,0,0,0,0,100,0), -- 16:58:09 +(@PATH,5,3934.321,-870.3138,103.8777,0,0,0,0,100,0), -- 16:58:09 +(@PATH,6,3933.527,-870.0614,103.9755,0,0,0,0,100,0), -- 16:58:16 +(@PATH,7,3922.027,-870.3114,105.9755,0,0,0,0,100,0), -- 16:58:16 +(@PATH,8,3917.903,-870.4968,106.363,0,0,0,0,100,0), -- 16:58:22 +(@PATH,9,3905.903,-870.4968,108.363,0,0,0,0,100,0), -- 16:58:22 +(@PATH,10,3897.389,-869.1989,109.0091,0,0,0,0,100,0), -- 16:58:28 +(@PATH,11,3895.139,-868.6989,109.0091,0,0,0,0,100,0), -- 16:58:28 +(@PATH,12,3893.163,-868.3932,109.3621,0,0,0,0,100,0), -- 16:58:33 +(@PATH,13,3903.502,-871.1569,108.7203,0,0,0,0,100,0), -- 16:58:34 +(@PATH,14,3918.319,-872.118,105.7782,0,0,0,0,100,0), -- 16:58:49 +(@PATH,15,3935.749,-871.7728,103.4062,0,0,0,0,100,0), -- 16:58:49 +(@PATH,16,3937.464,-872.5975,104.0017,0,0,0,0,100,0), -- 16:58:51 +(@PATH,17,3946.714,-877.3475,104.5017,0,0,0,0,100,0), -- 16:58:51 +(@PATH,18,3953.698,-875.124,104.5628,0,0,0,0,100,0), -- 16:58:57 +(@PATH,19,3959.198,-868.874,104.0628,0,0,0,0,100,0), -- 16:58:57 +(@PATH,20,3964.888,-870.4577,104.2536,0,0,0,0,100,0), -- 16:59:04 +(@PATH,21,3960.319,-875.5621,104.8488,0,0,0,0,100,0), -- 16:59:07 +(@PATH,22,3955.069,-879.8121,104.8488,0,0,0,0,100,0), -- 16:59:07 +(@PATH,23,3953.761,-883.5623,104.9101,0,0,0,0,100,0), -- 16:59:13 +(@PATH,24,3954.511,-894.0623,104.4101,0,0,0,0,100,0); -- 16:59:13 + +-- Pathing for Risen Wintergarde Defender Entry: 27284 'TDB FORMAT' +SET @NPC := 134853; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4070.011,`position_y`=-911.9304,`position_z`=115.397 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4070.011,-911.9304,115.397,0,0,0,0,100,0), -- 17:00:27 +(@PATH,2,4063.844,-904.7043,115.3745,0,0,0,0,100,0), -- 17:00:29 +(@PATH,3,4058.64,-895.9709,115.1423,0,0,0,0,100,0), -- 17:00:34 +(@PATH,4,4057.89,-894.7209,115.1423,0,0,0,0,100,0), -- 17:00:34 +(@PATH,5,4055.97,-891.5008,115.2825,0,0,0,0,100,0), -- 17:00:38 +(@PATH,6,4052.97,-881.5008,114.5325,0,0,0,0,100,0), -- 17:00:38 +(@PATH,7,4052.165,-878.6388,114.2091,0,0,0,0,100,0), -- 17:00:44 +(@PATH,8,4051.415,-864.6388,113.4591,0,0,0,0,100,0), -- 17:00:44 +(@PATH,9,4054.136,-862.9764,112.8409,0,0,0,0,100,0), -- 17:00:50 +(@PATH,10,4066.636,-860.9764,112.3409,0,0,0,0,100,0), -- 17:00:50 +(@PATH,11,4072.034,-859.8044,112.1062,0,0,0,0,100,0), -- 17:00:57 +(@PATH,12,4086.284,-857.0544,112.1062,0,0,0,0,100,0), -- 17:00:57 +(@PATH,13,4091.908,-853.9102,112.7256,0,0,0,0,100,0), -- 17:01:05 +(@PATH,14,4101.408,-844.1602,113.7256,0,0,0,0,100,0), -- 17:01:05 +(@PATH,15,4105.021,-846.8843,114.2492,0,0,0,0,100,0), -- 17:01:14 +(@PATH,16,4106.521,-848.6343,114.2492,0,0,0,0,100,0), -- 17:01:14 +(@PATH,17,4109.933,-852.9023,114.737,0,0,0,0,100,0), -- 17:01:18 +(@PATH,18,4111.266,-854.6176,115.0273,0,0,0,0,100,0), -- 17:01:19 +(@PATH,19,4108.093,-862.4123,113.6716,0,0,0,0,100,0), -- 17:01:22 +(@PATH,20,4093.593,-861.4123,113.6716,0,0,0,0,100,0), -- 17:01:22 +(@PATH,21,4087.883,-860.7225,112.5768,0,0,0,0,100,0), -- 17:01:30 +(@PATH,22,4084.479,-860.3036,112.2872,0,0,0,0,100,0), -- 17:01:32 +(@PATH,23,4063.229,-863.3036,112.5372,0,0,0,0,100,0), -- 17:01:32 +(@PATH,24,4059.42,-867.1846,112.8684,0,0,0,0,100,0), -- 17:01:43 +(@PATH,25,4058.17,-873.9346,113.6184,0,0,0,0,100,0), -- 17:01:43 +(@PATH,26,4058.563,-877.7594,113.9066,0,0,0,0,100,0), -- 17:01:47 +(@PATH,27,4060.313,-890.0094,114.1566,0,0,0,0,100,0), -- 17:01:47 +(@PATH,28,4065.274,-896.5776,114.7585,0,0,0,0,100,0), -- 17:01:54 +(@PATH,29,4071.021,-903.6585,115.7979,0,0,0,0,100,0), -- 17:02:00 +(@PATH,30,4073.021,-911.4085,115.0479,0,0,0,0,100,0); -- 17:02:00 diff --git a/sql/updates/world/2016_01_17_15_world.sql b/sql/updates/world/2016_01_17_15_world.sql new file mode 100644 index 00000000000..da949d7100d --- /dev/null +++ b/sql/updates/world/2016_01_17_15_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_text` SET `TextRange`=3 WHERE `entry`=32871; diff --git a/sql/updates/world/2016_01_18_00_world.sql b/sql/updates/world/2016_01_18_00_world.sql new file mode 100644 index 00000000000..85f41cfc0c5 --- /dev/null +++ b/sql/updates/world/2016_01_18_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=21126 AND `source_type`=0 AND `id` IN (4,5); diff --git a/sql/updates/world/2016_01_18_01_world.sql b/sql/updates/world/2016_01_18_01_world.sql new file mode 100644 index 00000000000..9768ecda6c0 --- /dev/null +++ b/sql/updates/world/2016_01_18_01_world.sql @@ -0,0 +1,8 @@ +UPDATE `creature` SET `MovementType`=1 WHERE `guid` IN (134870, 134856, 134857, 134859, 134861, 134862, 134863, 134864, 134865, 134866, 134868, 134871, 134878, 134872, 134873, 134874, 134875); +UPDATE `creature` SET `spawndist`=0 WHERE `guid`=131180; + +UPDATE `smart_scripts` SET `event_type`=61 WHERE `entryorguid`=26853 AND `source_type`=0 AND `id`=2 AND `link`=0; +UPDATE `smart_scripts` SET `event_type`=61 WHERE `entryorguid`=26881 AND `source_type`=0 AND `id`=2 AND `link`=0; +UPDATE `smart_scripts` SET `event_type`=61 WHERE `entryorguid`=20234 AND `source_type`=0 AND `id`=2 AND `link`=0; +UPDATE `smart_scripts` SET `event_type`=61 WHERE `entryorguid`=26876 AND `source_type`=0 AND `id`=2 AND `link`=0; +UPDATE `smart_scripts` SET `event_type`=61 WHERE `entryorguid`=26602 AND `source_type`=0 AND `id`=2 AND `link`=0; diff --git a/sql/updates/world/2016_01_18_02_world.sql b/sql/updates/world/2016_01_18_02_world.sql new file mode 100644 index 00000000000..ec9a8748cc8 --- /dev/null +++ b/sql/updates/world/2016_01_18_02_world.sql @@ -0,0 +1,39 @@ +DELETE FROM `smart_scripts` WHERE `entryorguid`IN(27450,27355) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`IN(2735500) AND `source_type`=9; + +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 +(27450,0,0,1,8,0,100,0,48790,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Neltharions Flame Control Bunny - On Spellhit (Neltharions Flame) - Store Targetlist'), +(27450,0,1,2,61,0,100,0,48790,0,0,0,33,27450,0,0,0,0,0,7,0,0,0,0,0,0,0,'Neltharions Flame Control Bunny - On Spellhit (Neltharions Flame) - Give Kill Credit'), +(27450,0,2,3,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,9,27449,0,200,0,0,0,0, 'Neltharions Flame Control Bunny - Linked with Previous Event - Set Data 1 1 on Neltharions Flame Fire Bunny'), +(27450,0,3,4,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,9,27355,0,200,0,0,0,0, 'Neltharions Flame Control Bunny - Linked with Previous Event - Set Data 1 1 on Rothin the Decaying'), +(27450,0,4,0,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,9,27355,0,200,0,0,0,0, 'Neltharions Flame Control Bunny - Linked with Previous Event - Send Targetlist to Rothin the Decaying'), +(27355,0,0,0,25,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - On Reset - Set Phase 0'), +(27355,0,1,2,4,0,100,0,0,0,0,0,11,9613,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - On Agro - Cast Shadowbolt'), +(27355,0,2,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - Linked with Previous Event - Set Phase 1'), +(27355,0,3,0,9,1,100,0,0,40,3400,4800,11,9613,64,0,0,0,0,7,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - On Range (Phase 1) - Cast Shadow Bolt'), +(27355,0,4,0,0,0,100,0,12000,17000,15000,20000,11,51337,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - IC - On Range (Phase 1) - Cast Shadow Flame'), +(27355,0,5,0,2,0,100,1,0,30,9500,11000,11,51512,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - On Less than 30% HP - Cast Aegis of Neltharion'), +(27355,0,6,0,6,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - On Death - Say'), +(27355,0,7,0,1,0,100,0,10000,10000,10000,10000,11,48685,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying - OOC - Cast Imbue Power'), +(27355,0,8,0,25,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying - On Reset - Set Passive'), +(27355,0,9,0,38,0,100,0,1,1,30000,30000,80,2735500,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - On Data Set 1 1 - Run Script'), +(2735500,9,0,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,12,1,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - Script - Face Target'), +(2735500,9,1,0,0,0,100,0,0,0,0,0,28,48685,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - Script - Remove Aura Imbue Power'), +(2735500,9,2,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - Script - Say'), +(2735500,9,3,0,0,0,100,0,7000,7000,0,0,28,48695,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying - Script - Remove Aura Imbue Power Shield State'), +(2735500,9,4,0,0,0,100,0,0,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying - Script - Set Aggresive'), +(2735500,9,5,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - script - Say'), +(2735500,9,6,0,0,0,100,0,0,0,0,0,49,0,0,0,0,0,0,12,1,0,0,0,0,0,0,'Rothin the Decaying - Script - Attack Target'); + +DELETE FROM `creature_template_addon` WHERE `entry`=27355; +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES +(27355, 0, 0, 0x0, 0x1, 0, '48695'); -- -- 27355 - 48695 - 48695 + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=48685; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=27355; + +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 48685, 0, 0, 31, 0, 3, 27418, 0, 0, 0, 0, '', 'Imbue Power targets Rothins Spell Bunny'), +(13, 1, 48685, 0, 1, 31, 0, 3, 26475, 0, 0, 0, 0, '', 'Imbue Power targets Magmawyrm'), +(22, 10, 27355, 0, 0, 36, 1, 0, 0, 0, 0, 0, 0, '', 'Only execute SAI if Rothin the Decaying alive'), +(22, 2, 27355, 0, 0, 1, 1, 48695, 0, 0, 1, 0, 0, '', 'Only execute SAI if Rothin the Decaying does not have aura Imbue Power Shield State'); diff --git a/sql/updates/world/2016_01_18_03_world.sql b/sql/updates/world/2016_01_18_03_world.sql new file mode 100644 index 00000000000..4b8eb4ae0c9 --- /dev/null +++ b/sql/updates/world/2016_01_18_03_world.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `creature_text` WHERE `entry` = 11856; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(11856, 0, 0, "Let's go before they find out I'm free!", 12, 0, 100, 1, 0, 0, 8327, 0, 'Kaya SAY_START'), +(11856, 1, 0, "Look out! We're under attack!", 12, 0, 100, 5, 0, 0, 8328, 0, 'Kaya SAY_AMBUSH'), +(11856, 2, 0, "Thank you for helping me. I know my way back from here.", 12, 0, 100, 3, 0, 0, 8329, 0, 'Kaya SAY_END'); diff --git a/sql/updates/world/2016_01_18_04_world.sql b/sql/updates/world/2016_01_18_04_world.sql new file mode 100644 index 00000000000..28ab2d96731 --- /dev/null +++ b/sql/updates/world/2016_01_18_04_world.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `creature` WHERE id=27535; +DELETE FROM `vehicle_template_accessory` WHERE `entry` IN (27761); +INSERT INTO `vehicle_template_accessory` (`entry`, `accessory_entry`, `minion`, `description`, `summontype`) VALUES (27761, 27535,1, "Fordragon Battle Steed", 7); +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=27761; diff --git a/sql/updates/world/2016_01_18_05_world.sql b/sql/updates/world/2016_01_18_05_world.sql new file mode 100644 index 00000000000..0d28cd17642 --- /dev/null +++ b/sql/updates/world/2016_01_18_05_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `creature` SET `MovementType`= 1 WHERE `guid`= 134869 AND `id`= 27401; +DELETE FROM `creature_addon` WHERE `guid` IN (97255,97256,97257,97258,97259,97261,131106); diff --git a/sql/updates/world/2016_01_18_06_world.sql b/sql/updates/world/2016_01_18_06_world.sql new file mode 100644 index 00000000000..f8b90c15f54 --- /dev/null +++ b/sql/updates/world/2016_01_18_06_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `disenchant_loot_template` SET `MinCount`=2,`MaxCount`=3 WHERE `Entry` IN (15,34) AND `Item`=34054; +UPDATE `disenchant_loot_template` SET `MinCount`=4,`MaxCount`=7 WHERE `Entry` IN (16,35) AND `Item`=34054; diff --git a/sql/updates/world/2016_01_19_00_world.sql b/sql/updates/world/2016_01_19_00_world.sql new file mode 100644 index 00000000000..f210b95c13a --- /dev/null +++ b/sql/updates/world/2016_01_19_00_world.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=11142; +INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`) VALUES +(11142, 5, 66303, 0), +(11142, 16, 404, 0); diff --git a/sql/updates/world/2016_01_19_01_world.sql b/sql/updates/world/2016_01_19_01_world.sql new file mode 100644 index 00000000000..a10bc7e278f --- /dev/null +++ b/sql/updates/world/2016_01_19_01_world.sql @@ -0,0 +1,28 @@ +-- +DELETE FROM `gossip_menu` WHERE `entry` IN (7482, 7483); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(7482, 9067), +(7483, 9068); + +DELETE FROM `npc_text` WHERE `ID` IN (9068); +INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `Probability0`, `em0_0`, `BroadcastTextID0`) VALUES +(9068, 'How did you learn about the ore? Not even the Baron knew...$B$BTake the cursed things. They''ve brought me nothing but misfortune anyway. I hid them IN the stables just off the courtyard.$B$B<A low growl begins TO emanate FROM the back of Landen''s throat.>', '', 0, 1, 20, 14393); + +DELETE FROM `gossip_menu_option` WHERE (`menu_id`=7482); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES +(7482,0,0,'Listen to me, human. I care nothing for your plight, but you have something I require. Tell me where to find the bloodforged ingots.',14392,1,1,7483,0,0,0,'',0); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=7482; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,7482,0,0,9,9692,0,0,0,'', 'gossip option on Landen Stilwell requires The Path of the Adept taken'); + +UPDATE `creature_template` SET `npcflag`=1,`gossip_menu_id` =7482, `AIName`='SmartAI', `flags_extra`=0 WHERE `entry` =17822; + +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=17822; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=1782200; +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 +(17822,0,0,0,64,0,100,1,0,0,0,0,80,1782200,2,0,0,0,0,1,0,0,0,0,0,0,0,'Landen Stilwell - on gossip hello - Actionlist'), +(1782200,9,0,0,0,0,100,0,20000,20000,0,0,11,31310,0,0,0,0,0,1,0,0,0,0,0,0,0,'Landen Stilwell - Action list - cast Landen Stilwell Transform'), +(1782200,9,1,0,0,0,100,0,0,0,0,0,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0,'Landen Stilwell - Action list - set faction'), +(1782200,9,2,0,0,0,100,0,0,0,0,0,49,0,0,0,0,0,0,21,50,0,0,0,0,0,0,'Landen Stilwell - Action list - start attack'), +(17822,0,1,0,0,0,100,1,0,0,0,0,11,31310,0,0,0,0,0,1,0,0,0,0,0,0,0,'Landen Stilwell - IC - cast Landen Stilwell Transform'); diff --git a/sql/updates/world/2016_01_19_02_world.sql b/sql/updates/world/2016_01_19_02_world.sql new file mode 100644 index 00000000000..7c71156b248 --- /dev/null +++ b/sql/updates/world/2016_01_19_02_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `BaseAttackTime` = 1200 WHERE `entry` = 15516; diff --git a/sql/updates/world/2016_01_19_03_world.sql b/sql/updates/world/2016_01_19_03_world.sql new file mode 100644 index 00000000000..0d559ace044 --- /dev/null +++ b/sql/updates/world/2016_01_19_03_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `InhabitType` = 5 WHERE `entry` = 14517; diff --git a/sql/updates/world/2016_01_19_04_world.sql b/sql/updates/world/2016_01_19_04_world.sql new file mode 100644 index 00000000000..f4fe95f5539 --- /dev/null +++ b/sql/updates/world/2016_01_19_04_world.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `gameobject` WHERE `guid`=7230 AND `id`=175946; +DELETE FROM `gameobject` WHERE `guid`=250 AND `id`=175946; +UPDATE `gameobject` SET `orientation`=5.323256 WHERE `guid`=67867; +UPDATE `gameobject_template` SET `faction`=114, `flags`=32 WHERE `entry`=176965; +UPDATE `gameobject_template` SET `faction`=14 WHERE `entry`=177807; diff --git a/sql/updates/world/2016_01_19_05_world.sql b/sql/updates/world/2016_01_19_05_world.sql new file mode 100644 index 00000000000..5afd9e2b8a5 --- /dev/null +++ b/sql/updates/world/2016_01_19_05_world.sql @@ -0,0 +1 @@ +DELETE FROM `creature_text` WHERE `entry` IN (17900,17901) AND `BroadcastTextId`=8329; diff --git a/sql/updates/world/2016_01_19_06_world.sql b/sql/updates/world/2016_01_19_06_world.sql new file mode 100644 index 00000000000..cece0c623bf --- /dev/null +++ b/sql/updates/world/2016_01_19_06_world.sql @@ -0,0 +1,97 @@ +-- gothik the harvester rework +-- creature (13 entries) +SET @CGUID = 127618; -- PR NOTE: This needs to match the value set in boss_gothik.cpp for the CGUID_TRIGGER const + +-- boss messages +DELETE FROM `creature_text` WHERE `entry`=16060; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`probability`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(16060,0,0,"Foolishly you have sought your own demise.",14,100,8807,13030,3,"Gothik SAY_INTRO_1"), +(16060,1,0,"Brazenly you have disregarded powers beyond your understanding.",14,100,0,13031,3,"Gothik SAY_INTRO_2"), +(16060,2,0,"You have fought hard to invade the realm of the harvester.",14,100,0,13032,3,"Gothik SAY_INTRO_3"), +(16060,3,0,"Now there is only one way out- to walk the lonely path of the damned.",14,100,0,13033,3,"Gothik SAY_INTRO_4"), +(16060,4,0,"I have waited long enough. Now you face the harvester of souls.",14,100,8808,13028,3,"Gothik SAY_PHASE_TWO"), +(16060,5,0,"I... am... undone.",14,100,8805,13026,3,"Gothik SAY_DEATH"), +(16060,6,0,"Death is the only escape!",14,20,8806,13027,3,"Gothik SAY_KILL"), +(16060,7,0,"%s teleports into the fray!",41,100,0,32306,3,"Gothik EMOTE_PHASE_TWO"), +(16060,8,0,"The central gate opens!",41,100,0,32307,3,"Gothik EMOTE_GATE_OPENED"); + +-- minion AI +UPDATE `creature_template` SET `ScriptName`="npc_gothik_minion_livingtrainee" WHERE `entry`=16124; +UPDATE `creature_template` SET `ScriptName`="npc_gothik_minion_livingknight" WHERE `entry`=16125; +UPDATE `creature_template` SET `ScriptName`="npc_gothik_minion_livingrider" WHERE `entry`=16126; +UPDATE `creature_template` SET `ScriptName`="npc_gothik_minion_spectraltrainee" WHERE `entry`=16127; +UPDATE `creature_template` SET `ScriptName`="npc_gothik_minion_spectralknight" WHERE `entry`=16148; +UPDATE `creature_template` SET `ScriptName`="npc_gothik_minion_spectralrider" WHERE `entry`=16150; +UPDATE `creature_template` SET `ScriptName`="npc_gothik_minion_spectralhorse" WHERE `entry`=16149; + +-- minion difficulty spell entries +DELETE FROM `spelldifficulty_dbc` WHERE `id` IN (55604,27825,27831,27989,56408,27993,55606,27994,55648); +INSERT INTO `spelldifficulty_dbc` (`id`,`spellid0`,`spellid1`) VALUES +(55604,55604,55645), -- death plague +(27831,27831,55638), -- shadow bolt volley +(27989,27989,56407), -- arcane explosion +(55606,55606,55608), -- unholy aura +(27994,27994,55646), -- drain life +(55648,55648,27995); -- unholy frenzy + +-- rider damage aura + visual aura +DELETE FROM `creature_template_addon` WHERE `entry` IN (16126,29986,16148,29990,16150,29988); +INSERT INTO `creature_template_addon` (`entry`,`mount`,`auras`) VALUES +(16126,25278,"55606"), +(29986,25278,"55608"), +(16148, 0,"10848"), +(29990, 0,"10848"), +(16150, 0,"55606 10848"), +(29988, 0,"55608 10848"); + +-- trigger AI +UPDATE `creature_template` SET `ScriptName`="npc_gothik_trigger",`InhabitType`=7 WHERE `entry`=16137; +-- re-do spawn locations for triggers +DELETE FROM `creature` WHERE `id`=16137; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`movementtype`) VALUES +(@CGUID+00,16137,533,3,1,2643.731,-3399.681,284.1829,0,0,0,0), -- living side soul trigger (south) +(@CGUID+01,16137,533,3,1,2739.995,-3399.779,284.2946,0,0,0,0), -- living side soul trigger (north) +(@CGUID+02,16137,533,3,1,2643.731,-3321.727,284.2327,0,0,0,0), -- spectral side soul trigger (south) +(@CGUID+03,16137,533,3,1,2739.995,-3321.727,284.2316,0,0,0,0), -- spectral side soul trigger (north) +(@CGUID+04,16137,533,3,1,2692.161,-3430.746,268.6462,0,0,0,0), -- living side spawn trigger (center back) +(@CGUID+05,16137,533,3,1,2714.562,-3430.61 ,268.6462,0,0,0,0), -- living side spawn trigger (north) +(@CGUID+06,16137,533,3,1,2692.213,-3428.783,268.6462,0,0,0,0), -- living side spawn trigger (center front) +(@CGUID+07,16137,533,3,1,2669.581,-3428.859,268.6462,0,0,0,0), -- living side spawn trigger (south) +(@CGUID+08,16137,533,3,1,2733.457,-3349.388,267.7677,0,0,0,0), -- spectral side spawn trigger (northeast) +(@CGUID+09,16137,533,3,1,2725.818,-3309.567,267.7686,0,0,0,0), -- spectral side spawn trigger (northwest) +(@CGUID+10,16137,533,3,1,2700.269,-3322.354,267.7678,0,0,0,0), -- spectral side spawn trigger (center) +(@CGUID+11,16137,533,3,1,2664.872,-3340.749,267.7674,0,0,0,0), -- spectral side spawn trigger (southeast) +(@CGUID+12,16137,533,3,1,2683.886,-3304.213,267.768 ,0,0,0,0); -- spectral side spawn trigger (southwest) + +-- make visuals target proper triggers +-- to anchor 1: 27892 (Trainee), 27928 (DK), 27935 (Rider) +-- to anchor 2: 27893 (Trainee), 27929 (DK), 27936 (Rider) +-- anchor -> skull: 27915 (Trainee), 27931 (DK), 27937 (Rider) +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (27892,27928,27935,27893,27929,27936,27915,27931,27937); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionTarget`,`ElseGroup`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`Comment`) VALUES +(13,1,27892,31,0,0,3,16137,@CGUID+0,"To Anchor 1 - Target Anchor Living South"), +(13,1,27892,31,0,1,3,16137,@CGUID+1,"To Anchor 1 - Target Anchor Living North"), +(13,1,27928,31,0,0,3,16137,@CGUID+0,"To Anchor 1 - Target Anchor Living South"), +(13,1,27928,31,0,1,3,16137,@CGUID+1,"To Anchor 1 - Target Anchor Living North"), +(13,1,27935,31,0,0,3,16137,@CGUID+0,"To Anchor 1 - Target Anchor Living South"), +(13,1,27935,31,0,1,3,16137,@CGUID+1,"To Anchor 1 - Target Anchor Living North"), + +(13,1,27893,31,0,0,3,16137,@CGUID+2,"To Anchor 2 - Target Anchor Spectral South"), +(13,1,27893,31,0,1,3,16137,@CGUID+3,"To Anchor 2 - Target Anchor Spectral North"), +(13,1,27929,31,0,0,3,16137,@CGUID+2,"To Anchor 2 - Target Anchor Spectral South"), +(13,1,27929,31,0,1,3,16137,@CGUID+3,"To Anchor 2 - Target Anchor Spectral North"), +(13,1,27936,31,0,0,3,16137,@CGUID+2,"To Anchor 2 - Target Anchor Spectral South"), +(13,1,27936,31,0,1,3,16137,@CGUID+3,"To Anchor 2 - Target Anchor Spectral North"); + +-- disable LoS check for visuals to ensure they always work +DELETE FROM `disables` WHERE `sourceType`=0 AND `entry` IN (27892,27928,27935,27893,27929,27936,27915,27931,27937); +INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`comment`) VALUES +(0,27892,64,"Gothik - To Anchor 1 - Ignore LoS"), +(0,27928,64,"Gothik - To Anchor 1 - Ignore LoS"), +(0,27935,64,"Gothik - To Anchor 1 - Ignore LoS"), +(0,27893,64,"Gothik - To Anchor 2 - Ignore LoS"), +(0,27929,64,"Gothik - To Anchor 2 - Ignore LoS"), +(0,27936,64,"Gothik - To Anchor 2 - Ignore LoS"), +(0,27915,64,"Gothik - Anchor To Skulls - Ignore LoS"), +(0,27931,64,"Gothik - Anchor To Skulls - Ignore LoS"), +(0,27937,64,"Gothik - Anchor To Skulls - Ignore LoS"); diff --git a/sql/updates/world/2016_01_19_07_world.sql b/sql/updates/world/2016_01_19_07_world.sql new file mode 100644 index 00000000000..e1a72398a5f --- /dev/null +++ b/sql/updates/world/2016_01_19_07_world.sql @@ -0,0 +1,23 @@ +-- four horsemen rewrite +UPDATE `creature_template` SET `ScriptName`='boss_four_horsemen_baron' WHERE `entry`=30549; +UPDATE `creature_template` SET `ScriptName`='boss_four_horsemen_thane' WHERE `entry`=16064; +UPDATE `creature_template` SET `ScriptName`='boss_four_horsemen_lady' WHERE `entry`=16065; +UPDATE `creature_template` SET `ScriptName`='boss_four_horsemen_sir' WHERE `entry`=16063; + +-- add ragecast texts +DELETE FROM `creature_text` WHERE `entry` IN (16064,16065,16063,30549) AND `groupid`=7; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`probability`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(16063,7,0,"%s casts Condemnation on everyone!",41,100,33088,3,"zeliek EMOTE_RAGECAST"), +(16065,7,0,"%s casts Unyielding Pain on everyone!",41,100,33087,3,"blaumeux EMOTE_RAGECAST"); +-- slay text probability to DB +UPDATE `creature_text` SET `probability`=30 WHERE `entry` IN (16064,16065,16063,30549) AND `groupid`=3; + +-- difficulty based spell ids +DELETE FROM `spelldifficulty_dbc` WHERE `id` IN (28882,28884,57374,28863,57376,28883); +INSERT INTO `spelldifficulty_dbc` (`id`,`spellid0`,`spellid1`) VALUES +(28882,28882,57369), -- Rivendare: Unholy Shadow +(28884,28884,57467), -- Korth'azz: Meteor +(57374,57374,57464), -- Blaumeux: Shadow Bolt +(28863,28863,57463), -- Blaumeux: Void Zone +(57376,57376,57465), -- Zeliek: Holy Bolt +(28883,28883,57466); -- Zeliek: Holy Wrath diff --git a/sql/updates/world/2016_01_19_08_world.sql b/sql/updates/world/2016_01_19_08_world.sql new file mode 100644 index 00000000000..d078c059201 --- /dev/null +++ b/sql/updates/world/2016_01_19_08_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `npcflag`=3, `gossip_menu_id`=140 WHERE `entry`=1139; diff --git a/sql/updates/world/2016_01_20_00_world.sql b/sql/updates/world/2016_01_20_00_world.sql new file mode 100644 index 00000000000..26ce069edd8 --- /dev/null +++ b/sql/updates/world/2016_01_20_00_world.sql @@ -0,0 +1,70 @@ +DELETE FROM gossip_menu_option WHERE `menu_id` IN (11013, 11014, 11015, 11016, 11017, 11018); +INSERT INTO gossip_menu_option (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES +(11013, 1, 0, 'Teleport to the Oratory of the Damned.', 37722, 1, 1, 0, 0, 0, 0, '', 0), -- Light's Hammer +(11013, 3, 0, 'Teleport to the Rampart of Skulls.', 37723, 1, 1, 0, 0, 0, 0, '', 0), -- Light's Hammer +(11013, 4, 0, 'Teleport to the Deathbringer''s Rise.', 37724, 1, 1, 0, 0, 0, 0, '', 0), -- Light's Hammer +(11013, 5, 0, 'Teleport to the Upper Spire.', 37725, 1, 1, 0, 0, 0, 0, '', 0), -- Light's Hammer +(11013, 6, 0, 'Teleport to Sindragosa''s Lair.', 37728, 1, 1, 0, 0, 0, 0, '', 0), -- Light's Hammer + +(11014, 0, 0, 'Teleport to Light''s Hammer.', 37671, 1, 1, 0, 0, 0, 0, '', 0), -- Oratory of the Damned +(11014, 3, 0, 'Teleport to the Rampart of Skulls.', 37723, 1, 1, 0, 0, 0, 0, '', 0), -- Oratory of the Damned +(11014, 4, 0, 'Teleport to the Deathbringer''s Rise.', 37724, 1, 1, 0, 0, 0, 0, '', 0), -- Oratory of the Damned +(11014, 5, 0, 'Teleport to the Upper Spire.', 37725, 1, 1, 0, 0, 0, 0, '', 0), -- Oratory of the Damned +(11014, 6, 0, 'Teleport to Sindragosa''s Lair.', 37728, 1, 1, 0, 0, 0, 0, '', 0), -- Oratory of the Damned + +(11015, 0, 0, 'Teleport to Light''s Hammer.', 37671, 1, 1, 0, 0, 0, 0, '', 0), -- Rampart of Skulls +(11015, 1, 0, 'Teleport to the Oratory of the Damned.', 37722, 1, 1, 0, 0, 0, 0, '', 0), -- Rampart of Skulls +(11015, 4, 0, 'Teleport to the Deathbringer''s Rise.', 37724, 1, 1, 0, 0, 0, 0, '', 0), -- Rampart of Skulls +(11015, 5, 0, 'Teleport to the Upper Spire.', 37725, 1, 1, 0, 0, 0, 0, '', 0), -- Rampart of Skulls +(11015, 6, 0, 'Teleport to Sindragosa''s Lair.', 37728, 1, 1, 0, 0, 0, 0, '', 0), -- Rampart of Skulls + +(11016, 0, 0, 'Teleport to Light''s Hammer.', 37671, 1, 1, 0, 0, 0, 0, '', 0), -- Deathbringer's Rise +(11016, 1, 0, 'Teleport to the Oratory of the Damned.', 37722, 1, 1, 0, 0, 0, 0, '', 0), -- Deathbringer's Rise +(11016, 3, 0, 'Teleport to the Rampart of Skulls.', 37723, 1, 1, 0, 0, 0, 0, '', 0), -- Deathbringer's Rise +(11016, 5, 0, 'Teleport to the Upper Spire.', 37725, 1, 1, 0, 0, 0, 0, '', 0), -- Deathbringer's Rise +(11016, 6, 0, 'Teleport to Sindragosa''s Lair.', 37728, 1, 1, 0, 0, 0, 0, '', 0), -- Deathbringer's Rise + +(11017, 0, 0, 'Teleport to Light''s Hammer.', 37671, 1, 1, 0, 0, 0, 0, '', 0), -- Upper Spire +(11017, 1, 0, 'Teleport to the Oratory of the Damned.', 37722, 1, 1, 0, 0, 0, 0, '', 0), -- Upper Spire +(11017, 3, 0, 'Teleport to the Rampart of Skulls.', 37723, 1, 1, 0, 0, 0, 0, '', 0), -- Upper Spire +(11017, 4, 0, 'Teleport to the Deathbringer''s Rise.', 37724, 1, 1, 0, 0, 0, 0, '', 0), -- Upper Spire +(11017, 6, 0, 'Teleport to Sindragosa''s Lair.', 37728, 1, 1, 0, 0, 0, 0, '', 0), -- Upper Spire + +(11018, 0, 0, 'Teleport to Light''s Hammer.', 37671, 1, 1, 0, 0, 0, 0, '', 0), -- Sindragosa's Lair +(11018, 1, 0, 'Teleport to the Oratory of the Damned.', 37722, 1, 1, 0, 0, 0, 0, '', 0), -- Sindragosa's Lair +(11018, 3, 0, 'Teleport to the Rampart of Skulls.', 37723, 1, 1, 0, 0, 0, 0, '', 0), -- Sindragosa's Lair +(11018, 4, 0, 'Teleport to the Deathbringer''s Rise.', 37724, 1, 1, 0, 0, 0, 0, '', 0), -- Sindragosa's Lair +(11018, 5, 0, 'Teleport to the Upper Spire.', 37725, 1, 1, 0, 0, 0, 0, '', 0); -- Sindragosa's Lair + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (11013, 11014, 11015, 11016, 11017, 11018); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,11013,1,0,0,13,0,0,3,2,0,0,0,'','Show option ''Teleport to the Oratory of the Damned.'' only if BossState DATA_LORD_MARROWGAR is DONE'), +(15,11013,3,0,0,13,0,1,3,2,0,0,0,'','Show option ''Teleport to the Rampart of Skulls.'' only if BossState DATA_LADY_DEATHWHISPER is DONE'), +(15,11013,4,0,0,13,0,2,3,2,0,0,0,'','Show option ''Teleport to the Deathbringer''s Rise.'' only if BossState DATA_ICECROWN_GUNSHIP_BATTLE is DONE'), +(15,11013,5,0,0,13,0,41,3,0,0,0,0,'','Show option ''Teleport to the Upper Spire.'' only if DATA_UPPERSPIRE_TELE_ACT is DONE'), +(15,11013,6,0,0,13,0,10,3,2,0,0,0,'','Show option ''Teleport to Sindragosa''s Lair.'' only if BossState DATA_VALITHRIA_DREAMWALKER is DONE'), + +(15,11014,3,0,0,13,0,1,3,2,0,0,0,'','Show option ''Teleport to the Rampart of Skulls.'' only if BossState DATA_LADY_DEATHWHISPER is DONE'), +(15,11014,4,0,0,13,0,2,3,2,0,0,0,'','Show option ''Teleport to the Deathbringer''s Rise.'' only if BossState DATA_ICECROWN_GUNSHIP_BATTLE is DONE'), +(15,11014,5,0,0,13,0,41,3,0,0,0,0,'','Show option ''Teleport to the Upper Spire.'' only if DATA_UPPERSPIRE_TELE_ACT is DONE'), +(15,11014,6,0,0,13,0,10,3,2,0,0,0,'','Show option ''Teleport to Sindragosa''s Lair.'' only if BossState DATA_VALITHRIA_DREAMWALKER is DONE'), + +(15,11015,1,0,0,13,0,0,3,2,0,0,0,'','Show option ''Teleport to the Oratory of the Damned.'' only if BossState DATA_LORD_MARROWGAR is DONE'), +(15,11015,4,0,0,13,0,2,3,2,0,0,0,'','Show option ''Teleport to the Deathbringer''s Rise.'' only if BossState DATA_ICECROWN_GUNSHIP_BATTLE is DONE'), +(15,11015,5,0,0,13,0,41,3,0,0,0,0,'','Show option ''Teleport to the Upper Spire.'' only if DATA_UPPERSPIRE_TELE_ACT is DONE'), +(15,11015,6,0,0,13,0,10,3,2,0,0,0,'','Show option ''Teleport to Sindragosa''s Lair.'' only if BossState DATA_VALITHRIA_DREAMWALKER is DONE'), + +(15,11016,1,0,0,13,0,0,3,2,0,0,0,'','Show option ''Teleport to the Oratory of the Damned.'' only if BossState DATA_LORD_MARROWGAR is DONE'), +(15,11016,3,0,0,13,0,1,3,2,0,0,0,'','Show option ''Teleport to the Rampart of Skulls.'' only if BossState DATA_LADY_DEATHWHISPER is DONE'), +(15,11016,5,0,0,13,0,41,3,0,0,0,0,'','Show option ''Teleport to the Upper Spire.'' only if DATA_UPPERSPIRE_TELE_ACT is DONE'), +(15,11016,6,0,0,13,0,10,3,2,0,0,0,'','Show option ''Teleport to Sindragosa''s Lair.'' only if BossState DATA_VALITHRIA_DREAMWALKER is DONE'), + +(15,11017,1,0,0,13,0,0,3,2,0,0,0,'','Show option ''Teleport to the Oratory of the Damned.'' only if BossState DATA_LORD_MARROWGAR is DONE'), +(15,11017,3,0,0,13,0,1,3,2,0,0,0,'','Show option ''Teleport to the Rampart of Skulls.'' only if BossState DATA_LADY_DEATHWHISPER is DONE'), +(15,11017,4,0,0,13,0,2,3,2,0,0,0,'','Show option ''Teleport to the Deathbringer''s Rise.'' only if BossState DATA_ICECROWN_GUNSHIP_BATTLE is DONE'), +(15,11017,6,0,0,13,0,10,3,2,0,0,0,'','Show option ''Teleport to Sindragosa''s Lair.'' only if BossState DATA_VALITHRIA_DREAMWALKER is DONE'), + +(15,11018,1,0,0,13,0,0,3,2,0,0,0,'','Show option ''Teleport to the Oratory of the Damned.'' only if BossState DATA_LORD_MARROWGAR is DONE'), +(15,11018,3,0,0,13,0,1,3,2,0,0,0,'','Show option ''Teleport to the Rampart of Skulls.'' only if BossState DATA_LADY_DEATHWHISPER is DONE'), +(15,11018,4,0,0,13,0,2,3,2,0,0,0,'','Show option ''Teleport to the Deathbringer''s Rise.'' only if BossState DATA_ICECROWN_GUNSHIP_BATTLE is DONE'), +(15,11018,5,0,0,13,0,41,3,0,0,0,0,'','Show option ''Teleport to the Upper Spire.'' only if DATA_UPPERSPIRE_TELE_ACT is DONE'); diff --git a/sql/updates/world/2016_01_20_01_world.sql b/sql/updates/world/2016_01_20_01_world.sql new file mode 100644 index 00000000000..b1c6e0de756 --- /dev/null +++ b/sql/updates/world/2016_01_20_01_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `gossip_menu` WHERE `entry` IN (9578) AND `text_id`=12927; +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(9578, 12927); diff --git a/sql/updates/world/2016_01_20_02_world.sql b/sql/updates/world/2016_01_20_02_world.sql new file mode 100644 index 00000000000..d026c3cb478 --- /dev/null +++ b/sql/updates/world/2016_01_20_02_world.sql @@ -0,0 +1,475 @@ +DELETE FROM `creature_formations` WHERE `leaderGUID`=12869; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(12869, 12869, 0, 0, 2), +(12869, 12853, 10, 90, 2), +(12869, 12854, 10, 270, 2); + +DELETE FROM `creature_formations` WHERE `leaderGUID`=12866; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(12866, 12866, 0, 0, 2), +(12866, 12851, 10, 90, 2), +(12866, 12852, 10, 270, 2); + +DELETE FROM `creature_formations` WHERE `leaderGUID`=13415; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(13415, 13415, 0, 0, 2), +(13415, 13414, 3, 90, 2); + +-- Pathing for Aqueous Spawn Entry: 22883 'TDB FORMAT' +SET @NPC := 13415; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=467.9448,`position_y`=847.3433,`position_z`=15.00103 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,467.9448,847.3433,15.00103,0,0,1,0,100,0), -- 20:18:04 +(@PATH,2,469.2407,849.0333,14.97786,0,0,1,0,100,0), -- 20:18:07 +(@PATH,3,473.5281,853.7736,15.31754,0,0,1,0,100,0), -- 20:18:07 +(@PATH,4,474.0281,857.5236,15.31754,0,0,1,0,100,0), -- 20:18:07 +(@PATH,5,473.7495,860.6138,15.416,0,0,1,0,100,0), -- 20:18:10 +(@PATH,6,472.7495,861.8638,15.416,0,0,1,0,100,0), -- 20:18:10 +(@PATH,7,471.7495,864.1138,15.166,0,0,1,0,100,0), -- 20:18:10 +(@PATH,8,467.3445,873.2086,15.48424,0,0,1,0,100,0), -- 20:18:12 +(@PATH,9,466.7931,879.0881,15.64043,0,0,1,0,100,0), -- 20:18:15 +(@PATH,10,465.5614,888.2678,15.55727,0,0,1,0,100,0), -- 20:18:17 +(@PATH,11,465.6077,896.3718,15.43029,0,0,1,0,100,0), -- 20:18:20 +(@PATH,12,467.8163,900.2317,15.73285,0,0,1,0,100,0), -- 20:18:21 +(@PATH,13,468.6377,905.9084,15.83779,0,0,1,0,100,0), -- 20:18:22 +(@PATH,14,466.0126,916.0297,15.82569,0,0,1,0,100,0), -- 20:18:24 +(@PATH,15,470.3526,931.8629,14.75142,0,0,1,0,100,0), -- 20:18:27 +(@PATH,16,469.243,921.0674,15.69238,0,0,1,0,100,0), -- 20:18:33 +(@PATH,17,466.0515,931.413,15.39575,0,0,1,0,100,0), -- 20:18:37 +(@PATH,18,466.0515,916.163,15.89575,0,0,1,0,100,0), -- 20:18:37 +(@PATH,19,466.9939,913.4012,15.84451,0,0,1,0,100,0), -- 20:18:44 +(@PATH,20,468.8083,905.5721,15.84772,0,0,1,0,100,0), -- 20:18:46 +(@PATH,21,465.8907,896.822,15.64862,0,0,1,0,100,0), -- 20:18:48 +(@PATH,22,465.9131,888.7125,15.57837,0,0,1,0,100,0), -- 20:18:50 +(@PATH,23,466.5535,879.3544,15.68201,0,0,1,0,100,0), -- 20:18:52 +(@PATH,24,468.5858,869.7411,15.54825,0,0,1,0,100,0), -- 20:18:55 +(@PATH,25,472.7863,862.353,15.26673,0,0,1,0,100,0), -- 20:18:57 +(@PATH,26,473.7863,860.603,15.51673,0,0,1,0,100,0), -- 20:18:57 +(@PATH,27,473.6846,860.4615,15.38147,0,0,1,0,100,0), -- 20:18:58 +(@PATH,28,474.4346,859.4615,15.38147,0,0,1,0,100,0), -- 20:18:58 +(@PATH,29,474.1846,858.2115,15.38147,0,0,1,0,100,0), -- 20:18:58 +(@PATH,30,473.6846,854.2115,15.13147,0,0,1,0,100,0), -- 20:18:58 +(@PATH,31,473.1513,852.6404,15.02536,0,0,1,0,100,0); -- 20:19:01 +-- 0x1C16F446801658C0006A5B000A1D4854 .go 467.9448 847.3433 15.00103 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=13418; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(13418, 13418, 0, 0, 2), +(13418, 13416, 3, 90, 2); + +-- Pathing for Aqueous Spawn Entry: 22883 'TDB FORMAT' +SET @NPC := 13418; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=277.868,`position_y`=842.4459,`position_z`=-23.75307 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,277.868,842.4459,-23.75307,0,0,1,0,100,0), -- 20:20:58 +(@PATH,2,277.4133,846.7463,-23.75651,0,0,1,0,100,0), -- 20:21:00 +(@PATH,3,278.9133,848.4963,-23.75651,0,0,1,0,100,0), -- 20:21:00 +(@PATH,4,280.4133,850.2463,-23.75651,0,0,1,0,100,0), -- 20:21:00 +(@PATH,5,282.6633,852.9963,-23.50651,0,0,1,0,100,0), -- 20:21:00 +(@PATH,6,283.827,860.8285,-23.04886,0,0,1,0,100,0), -- 20:21:01 +(@PATH,7,284.327,862.8285,-23.04886,0,0,1,0,100,0), -- 20:21:01 +(@PATH,8,282.827,867.8285,-23.79886,0,0,1,0,100,0), -- 20:21:01 +(@PATH,9,281.3427,869.1567,-23.76081,0,0,1,0,100,0), -- 20:21:02 +(@PATH,10,277.5927,871.6567,-23.76081,0,0,1,0,100,0), -- 20:21:02 +(@PATH,11,277.0927,875.9067,-23.76081,0,0,1,0,100,0), -- 20:21:02 +(@PATH,12,276.0927,884.1567,-23.76081,0,0,1,0,100,0), -- 20:21:02 +(@PATH,13,275.7303,886.521,-23.90997,0,0,1,0,100,0), -- 20:21:04 +(@PATH,14,277.0383,899.6908,-30.63255,0,0,1,0,100,0), -- 20:21:05 +(@PATH,15,280.329,915.5177,-38.46265,0,0,1,0,100,0), -- 20:21:06 +(@PATH,16,281.5613,931.75,-46.90573,0,0,1,0,100,0), -- 20:21:07 +(@PATH,17,277.2371,957.6002,-59.79856,0,0,1,0,100,0), -- 20:21:09 +(@PATH,18,276.8787,969.0604,-59.80925,0,0,1,0,100,0), -- 20:21:11 +(@PATH,19,280.0755,977.5538,-60.08774,0,0,1,0,100,0), -- 20:21:12 +(@PATH,20,283.3255,979.3038,-60.08774,0,0,1,0,100,0), -- 20:21:12 +(@PATH,21,284.8255,980.0538,-60.08774,0,0,1,0,100,0), -- 20:21:12 +(@PATH,22,289.5755,980.3038,-60.33774,0,0,1,0,100,0), -- 20:21:12 +(@PATH,23,292.3255,980.3038,-60.33774,0,0,1,0,100,0), -- 20:21:12 +(@PATH,24,295.7121,979.2697,-60.03576,0,0,1,0,100,0), -- 20:21:13 +(@PATH,25,299.2121,976.2697,-60.03576,0,0,1,0,100,0), -- 20:21:13 +(@PATH,26,295.9117,979.6497,-60.04585,0,0,1,0,100,0), -- 20:21:16 +(@PATH,27,292.6617,980.3997,-60.04585,0,0,1,0,100,0), -- 20:21:16 +(@PATH,28,289.9117,980.3997,-60.04585,0,0,1,0,100,0), -- 20:21:16 +(@PATH,29,285.0618,980.2185,-60.09282,0,0,1,0,100,0), -- 20:21:17 +(@PATH,30,283.3118,979.2185,-60.09282,0,0,1,0,100,0), -- 20:21:17 +(@PATH,31,280.0618,977.4685,-60.09282,0,0,1,0,100,0), -- 20:21:17 +(@PATH,32,278.8118,976.9685,-60.09282,0,0,1,0,100,0), -- 20:21:17 +(@PATH,33,276.8872,969.0083,-59.83573,0,0,1,0,100,0), -- 20:21:18 +(@PATH,34,277.1372,958.0083,-59.83573,0,0,1,0,100,0), -- 20:21:18 +(@PATH,35,281.6861,931.6771,-46.47077,0,0,1,0,100,0), -- 20:21:22 +(@PATH,36,280.2155,915.3389,-38.22446,0,0,1,0,100,0), -- 20:21:23 +(@PATH,37,276.9022,899.6358,-30.47937,0,0,1,0,100,0), -- 20:21:24 +(@PATH,38,275.9023,884.4814,-23.95735,0,0,1,0,100,0), -- 20:21:26 +(@PATH,39,276.1523,882.4814,-23.95735,0,0,1,0,100,0), -- 20:21:26 +(@PATH,40,276.9797,876.0508,-23.88462,0,0,1,0,100,0), -- 20:21:27 +(@PATH,41,277.4797,871.5508,-23.88462,0,0,1,0,100,0), -- 20:21:27 +(@PATH,42,281.2297,869.0508,-23.88462,0,0,1,0,100,0), -- 20:21:27 +(@PATH,43,282.8904,867.748,-23.63595,0,0,1,0,100,0), -- 20:21:28 +(@PATH,44,284.3904,863.248,-23.13595,0,0,1,0,100,0), -- 20:21:28 +(@PATH,45,283.8904,860.998,-23.13595,0,0,1,0,100,0), -- 20:21:28 +(@PATH,46,282.8904,853.748,-23.13595,0,0,1,0,100,0), -- 20:21:28 +(@PATH,47,280.6286,850.2665,-24.00388,0,0,1,0,100,0), -- 20:21:29 +(@PATH,48,278.8786,848.5165,-23.75388,0,0,1,0,100,0), -- 20:21:29 +(@PATH,49,277.3786,846.7665,-23.75388,0,0,1,0,100,0); -- 20:21:29 +-- 0x1C16F446801658C0006A5B000B1D4854 .go 277.868 842.4459 -23.75307 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=13774; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(13774, 13774, 0, 0, 2), +(13774, 13429, 3, 270, 2); + +-- Pathing for Aqueous Spawn Entry: 22883 'TDB FORMAT' +SET @NPC := 13774; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=226.3641,`position_y`=842.9598,`position_z`=-23.60787 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,226.3641,842.9598,-23.60787,0,0,1,0,100,0), -- 20:18:44 +(@PATH,2,224.6499,848.3411,-23.63753,0,0,1,0,100,0), -- 20:18:46 +(@PATH,3,222.3999,850.3411,-23.63753,0,0,1,0,100,0), -- 20:18:46 +(@PATH,4,219.3999,852.8411,-23.13753,0,0,1,0,100,0), -- 20:18:46 +(@PATH,5,220.1499,858.5911,-23.13753,0,0,1,0,100,0), -- 20:18:46 +(@PATH,6,220.6499,863.3411,-23.13753,0,0,1,0,100,0), -- 20:18:46 +(@PATH,7,220.7801,865.7321,-23.06377,0,0,1,0,100,0), -- 20:18:48 +(@PATH,8,223.5301,867.7321,-23.31377,0,0,1,0,100,0), -- 20:18:48 +(@PATH,9,226.2801,869.7321,-23.81377,0,0,1,0,100,0), -- 20:18:48 +(@PATH,10,229.0301,872.2321,-24.31377,0,0,1,0,100,0), -- 20:18:48 +(@PATH,11,230.5301,873.4821,-24.81377,0,0,1,0,100,0), -- 20:18:48 +(@PATH,12,231.5301,874.2321,-25.56377,0,0,1,0,100,0), -- 20:18:48 +(@PATH,13,234.6127,879.7501,-25.39395,0,0,1,0,100,0), -- 20:18:49 +(@PATH,14,235.3627,886.7501,-25.39395,0,0,1,0,100,0), -- 20:18:49 +(@PATH,15,235.054,896.0424,-30.38491,0,0,1,0,100,0), -- 20:18:50 +(@PATH,16,235.666,933.9497,-49.77283,0,0,1,0,100,0), -- 20:18:54 +(@PATH,17,235.166,951.4497,-58.52283,0,0,1,0,100,0), -- 20:18:54 +(@PATH,18,239.472,955.8605,-61.06985,0,0,1,0,100,0), -- 20:18:56 +(@PATH,19,241.722,957.8605,-62.31985,0,0,1,0,100,0), -- 20:18:56 +(@PATH,20,245.0305,960.8606,-62.1322,0,0,1,0,100,0), -- 20:18:57 +(@PATH,21,241.0371,985.8208,-62.71188,0,0,1,0,100,0), -- 20:18:58 +(@PATH,22,237.0147,1001.326,-62.45633,0,0,1,0,100,0), -- 20:19:00 +(@PATH,23,236.5147,1005.076,-62.45633,0,0,1,0,100,0), -- 20:19:00 +(@PATH,24,230.5381,1024.512,-61.63638,0,0,1,0,100,0), -- 20:19:02 +(@PATH,25,228.5381,1026.512,-60.88638,0,0,1,0,100,0), -- 20:19:02 +(@PATH,26,225.485,1029.62,-60.43474,0,0,1,0,100,0), -- 20:19:03 +(@PATH,27,223.485,1032.12,-60.43474,0,0,1,0,100,0), -- 20:19:03 +(@PATH,28,220.485,1035.37,-59.68474,0,0,1,0,100,0), -- 20:19:03 +(@PATH,29,220.5529,1045.221,-59.55603,0,0,1,0,100,0), -- 20:19:05 +(@PATH,30,224.0529,1048.471,-59.80603,0,0,1,0,100,0), -- 20:19:05 +(@PATH,31,225.0529,1049.221,-60.30603,0,0,1,0,100,0), -- 20:19:05 +(@PATH,32,226.3029,1050.721,-60.55603,0,0,1,0,100,0), -- 20:19:05 +(@PATH,33,228.6076,1053.052,-60.2848,0,0,1,0,100,0), -- 20:19:06 +(@PATH,34,229.8576,1054.552,-60.5348,0,0,1,0,100,0), -- 20:19:06 +(@PATH,35,230.8576,1055.552,-61.2848,0,0,1,0,100,0), -- 20:19:06 +(@PATH,36,233.3576,1058.052,-62.2848,0,0,1,0,100,0), -- 20:19:06 +(@PATH,37,230.8576,1061.052,-61.2848,0,0,1,0,100,0), -- 20:19:06 +(@PATH,38,229.8576,1062.302,-60.2848,0,0,1,0,100,0), -- 20:19:06 +(@PATH,39,227.7166,1065.36,-60.65356,0,0,1,0,100,0), -- 20:19:07 +(@PATH,40,227.7166,1066.86,-60.65356,0,0,1,0,100,0), -- 20:19:07 +(@PATH,41,229.6661,1062.701,-60.48591,0,0,1,0,100,0), -- 20:19:10 +(@PATH,42,230.9161,1061.201,-61.48591,0,0,1,0,100,0), -- 20:19:10 +(@PATH,43,233.2057,1058.173,-62.12091,0,0,1,0,100,0), -- 20:19:12 +(@PATH,44,230.7057,1055.173,-61.37091,0,0,1,0,100,0), -- 20:19:12 +(@PATH,45,229.9557,1054.423,-60.62091,0,0,1,0,100,0), -- 20:19:12 +(@PATH,46,228.7057,1052.923,-60.37091,0,0,1,0,100,0), -- 20:19:12 +(@PATH,47,226.2057,1050.923,-60.37091,0,0,1,0,100,0), -- 20:19:12 +(@PATH,48,224.9557,1049.423,-60.37091,0,0,1,0,100,0), -- 20:19:12 +(@PATH,49,224.1507,1048.499,-59.69673,0,0,1,0,100,0), -- 20:19:13 +(@PATH,50,220.6507,1045.249,-59.69673,0,0,1,0,100,0), -- 20:19:13 +(@PATH,51,220.4007,1035.749,-59.69673,0,0,1,0,100,0), -- 20:19:13 +(@PATH,52,223.1507,1032.499,-59.94673,0,0,1,0,100,0), -- 20:19:13 +(@PATH,53,225.6915,1029.523,-60.42624,0,0,1,0,100,0), -- 20:19:14 +(@PATH,54,228.1915,1026.773,-60.92624,0,0,1,0,100,0), -- 20:19:14 +(@PATH,55,230.4415,1024.773,-61.42624,0,0,1,0,100,0), -- 20:19:14 +(@PATH,56,231.6957,1023.582,-61.96358,0,0,1,0,100,0), -- 20:19:16 +(@PATH,57,236.1957,1005.332,-62.21358,0,0,1,0,100,0), -- 20:19:16 +(@PATH,58,236.6957,1001.582,-62.21358,0,0,1,0,100,0), -- 20:19:16 +(@PATH,59,239.3251,989.6144,-62.72815,0,0,1,0,100,0), -- 20:19:18 +(@PATH,60,239.3251,989.1144,-62.72815,0,0,1,0,100,0), -- 20:19:18 +(@PATH,61,241.0751,985.1144,-62.72815,0,0,1,0,100,0), -- 20:19:18 +(@PATH,62,244.6287,965.7533,-62.47226,0,0,1,0,100,0), -- 20:19:19 +(@PATH,63,242.1768,958.4319,-62.1866,0,0,1,0,100,0), -- 20:19:21 +(@PATH,64,239.1768,956.1819,-61.1866,0,0,1,0,100,0), -- 20:19:21 +(@PATH,65,235.3233,952.653,-59.28426,0,0,1,0,100,0), -- 20:19:22 +(@PATH,66,236.0733,933.903,-49.78426,0,0,1,0,100,0), -- 20:19:22 +(@PATH,67,235.6809,889.4034,-27.06503,0,0,1,0,100,0), -- 20:19:25 +(@PATH,68,235.3604,887.6078,-26.10506,0,0,1,0,100,0), -- 20:19:28 +(@PATH,69,234.6104,879.8578,-25.60506,0,0,1,0,100,0), -- 20:19:28 +(@PATH,70,231.5102,874.4667,-25.5617,0,0,1,0,100,0), -- 20:19:29 +(@PATH,71,229.0102,872.4667,-24.3117,0,0,1,0,100,0), -- 20:19:29 +(@PATH,72,226.2602,869.9667,-23.8117,0,0,1,0,100,0), -- 20:19:29 +(@PATH,73,223.6137,867.7607,-23.35828,0,0,1,0,100,0), -- 20:19:30 +(@PATH,74,220.8637,865.5107,-23.10828,0,0,1,0,100,0), -- 20:19:30 +(@PATH,75,220.6137,863.5107,-23.10828,0,0,1,0,100,0), -- 20:19:30 +(@PATH,76,219.2268,853.074,-23.14473,0,0,1,0,100,0), -- 20:19:31 +(@PATH,77,221.9768,850.824,-23.39473,0,0,1,0,100,0), -- 20:19:31 +(@PATH,78,224.7268,848.324,-23.64473,0,0,1,0,100,0), -- 20:19:31 +(@PATH,79,225.7792,847.1718,-23.69841,0,0,1,0,100,0); -- 20:19:33 +-- 0x1C16F446801658C0006A5B000D1D4854 .go 226.3641 842.9598 -23.60787 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=13411; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(13411, 13411, 0, 0, 2), +(13411, 13410, 3, 90, 2); + +-- Pathing for Aqueous Spawn Entry: 22883 'TDB FORMAT' +SET @NPC := 13411; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=341.5303,`position_y`=833.1406,`position_z`=3.273792 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,341.5303,833.1406,3.273792,0,0,1,0,100,0), -- 20:28:58 +(@PATH,2,348.7275,829.2892,1.651913,0,0,1,0,100,0), -- 20:29:00 +(@PATH,3,354.4775,827.0392,3.901913,0,0,1,0,100,0), -- 20:29:00 +(@PATH,4,359.5842,829.374,5.242831,0,0,1,0,100,0), -- 20:29:01 +(@PATH,5,361.0842,829.874,5.742831,0,0,1,0,100,0), -- 20:29:01 +(@PATH,6,364.5842,835.374,7.242831,0,0,1,0,100,0), -- 20:29:01 +(@PATH,7,367.8342,835.374,8.242831,0,0,1,0,100,0), -- 20:29:01 +(@PATH,8,373.5842,835.124,10.74283,0,0,1,0,100,0), -- 20:29:01 +(@PATH,9,379.5842,835.124,12.49283,0,0,1,0,100,0), -- 20:29:01 +(@PATH,10,385.9604,833.4543,14.87675,0,0,1,0,100,0), -- 20:29:04 +(@PATH,11,389.4604,828.2043,16.12675,0,0,1,0,100,0), -- 20:29:04 +(@PATH,12,385.9604,833.4543,14.87675,0,0,1,0,100,0), -- 20:29:04 +(@PATH,13,379.3574,835.0835,12.43179,0,0,1,0,100,0), -- 20:29:05 +(@PATH,14,373.6074,835.0835,10.93179,0,0,1,0,100,0), -- 20:29:05 +(@PATH,15,367.6338,835.3248,8.312333,0,0,1,0,100,0), -- 20:29:06 +(@PATH,16,364.6338,835.3248,7.062333,0,0,1,0,100,0), -- 20:29:06 +(@PATH,17,360.7854,829.9193,5.526537,0,0,1,0,100,0), -- 20:29:07 +(@PATH,18,359.5354,829.4193,5.276537,0,0,1,0,100,0), -- 20:29:07 +(@PATH,19,354.5487,827.0881,3.989071,0,0,1,0,100,0), -- 20:29:08 +(@PATH,20,348.5487,829.3381,1.739071,0,0,1,0,100,0); -- 20:29:08 +-- 0x1C16F446801658C0006A5B000E1D4854 .go 341.5303 833.1406 3.273792 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=13412; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(13412, 13412, 0, 0, 2), +(13412, 13413, 3, 270, 2); + +-- Pathing for Aqueous Spawn Entry: 22883 'TDB FORMAT' +SET @NPC := 13412; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=225.5994,`position_y`=787.1674,`position_z`=-24.18544 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,225.5994,787.1674,-24.18544,0,0,1,0,100,0), -- 20:21:40 +(@PATH,2,226.2546,784.0085,-23.94931,0,0,1,0,100,0), -- 20:21:42 +(@PATH,3,219.7546,774.2585,-23.44931,0,0,1,0,100,0), -- 20:21:42 +(@PATH,4,219.399,766.433,-23.47102,0,0,1,0,100,0), -- 20:21:44 +(@PATH,5,225.7847,743.8611,-23.80148,0,0,1,0,100,0), -- 20:21:45 +(@PATH,6,225.8589,730.2358,-15.95089,0,0,1,0,100,0), -- 20:21:46 +(@PATH,7,226.6089,726.4858,-13.95089,0,0,1,0,100,0), -- 20:21:46 +(@PATH,8,236.528,706.583,-4.811245,0,0,1,0,100,0), -- 20:21:50 +(@PATH,9,265.2675,707.3212,-4.301136,0,0,1,0,100,0), -- 20:21:51 +(@PATH,10,272.3554,719.12,-10.19584,0,0,1,0,100,0), -- 20:21:52 +(@PATH,11,275.1298,743.1734,-24.00938,0,0,1,0,100,0), -- 20:21:54 +(@PATH,12,279.3289,758.15,-23.90574,0,0,1,0,100,0), -- 20:21:56 +(@PATH,13,281.9902,760.6749,-23.69596,0,0,1,0,100,0), -- 20:21:57 +(@PATH,14,282.8818,767.9795,-23.45871,0,0,1,0,100,0), -- 20:21:58 +(@PATH,15,277.356,793.042,-24.15166,0,0,1,0,100,0), -- 20:22:00 +(@PATH,16,285.9649,799.7314,-23.8582,0,0,1,0,100,0), -- 20:22:01 +(@PATH,17,292.1205,799.7032,-22.67317,0,0,1,0,100,0), -- 20:22:02 +(@PATH,18,303.1205,795.2032,-17.17317,0,0,1,0,100,0), -- 20:22:02 +(@PATH,19,295.6266,798.3845,-20.68238,0,0,1,0,100,0), -- 20:22:04 +(@PATH,20,286.1266,799.6345,-23.93238,0,0,1,0,100,0), -- 20:22:04 +(@PATH,21,276.8643,782.9451,-23.92551,0,0,1,0,100,0), -- 20:22:07 +(@PATH,22,282.1143,770.6951,-23.42551,0,0,1,0,100,0), -- 20:22:07 +(@PATH,23,279.3628,758.2788,-24.0036,0,0,1,0,100,0), -- 20:22:09 +(@PATH,24,275.2263,743.7703,-24.04942,0,0,1,0,100,0), -- 20:22:10 +(@PATH,25,272.4308,719.3824,-10.38001,0,0,1,0,100,0), -- 20:22:12 +(@PATH,26,266.0668,708.079,-4.459149,0,0,1,0,100,0), -- 20:22:14 +(@PATH,27,258.0668,704.329,-4.959149,0,0,1,0,100,0), -- 20:22:14 +(@PATH,28,236.2906,706.6432,-3.633104,0,0,1,0,100,0), -- 20:22:16 +(@PATH,29,226.6268,726.214,-13.62222,0,0,1,0,100,0), -- 20:22:18 +(@PATH,30,225.8902,730.3877,-15.93307,0,0,1,0,100,0), -- 20:22:19 +(@PATH,31,226.0625,743.5709,-23.90323,0,0,1,0,100,0), -- 20:22:20 +(@PATH,32,220.6384,762.8275,-23.16604,0,0,1,0,100,0), -- 20:22:21 +(@PATH,33,218.6304,769.206,-23.46703,0,0,1,0,100,0), -- 20:22:23 +(@PATH,34,226.297,784.1191,-24.1624,0,0,1,0,100,0); -- 20:22:25 +-- 0x1C16F446801658C0006A5B000C1D4854 .go 225.5994 787.1674 -24.18544 + +-- Update spawn distance & movementype so they move around randomly +UPDATE `creature` SET `spawndist`=5, `MovementType`=1 WHERE `guid` IN (13393, 13395, 13399, 13396, 13236, 13268, 13398, 13255, 13316, 13397, 13408, 13401, 13407, 13403, 13402, 13409, 13406, 13404, 13405, 13400); + +-- Pathing for Bonechewer Taskmaster Entry: 23028 'TDB FORMAT' +SET @NPC := 53819; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=824.2386,`position_y`=922.0986,`position_z`=56.91497 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,824.2386,922.0986,56.91497,0,0,0,0,100,0), -- 20:24:16 +(@PATH,2,821.0174,923.827,56.86291,0,0,0,0,100,0), -- 20:24:21 +(@PATH,3,818.0731,927.4094,57.30012,0,0,0,0,100,0), -- 20:24:23 +(@PATH,4,814.8231,931.1594,56.80012,0,0,0,0,100,0), -- 20:24:23 +(@PATH,5,812.9963,933.0051,56.42346,0,0,0,0,100,0), -- 20:24:28 +(@PATH,6,812.416,948.0172,56.81141,0,0,0,0,100,0), -- 20:24:31 +(@PATH,7,813.5654,956.6572,55.9874,0,0,0,0,100,0), -- 20:24:35 +(@PATH,8,814.4669,959.6799,55.61625,0,0,0,0,100,0), -- 20:24:39 +(@PATH,9,815.8135,960.5793,55.61554,0,0,0,0,100,0), -- 20:24:44 +(@PATH,10,813.7318,955.5559,56.19109,0,0,0,0,100,0), -- 20:24:47 +(@PATH,11,812.7902,950.8799,56.58345,0,0,0,0,100,0), -- 20:24:50 +(@PATH,12,812.5013,941.1736,56.22784,0,0,0,0,100,0), -- 20:24:54 +(@PATH,13,816.401,926.7815,57.39321,0,0,0,0,100,0), -- 20:24:57 +(@PATH,14,818.651,925.7815,57.39321,0,0,0,0,100,0); -- 20:24:57 +-- 0x1C16F44680167D00006A5B00001D4972 .go 824.2386 922.0986 56.91497 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=53817; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(53817, 53817, 0, 0, 2), +(53817, 53818, 4, 270, 2); + +-- Pathing for Bonechewer Taskmaster Entry: 23028 'TDB FORMAT' +SET @NPC := 53817; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=779.7964,`position_y`=907.3997,`position_z`=55.31417 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,779.7964,907.3997,55.31417,0,0,0,0,100,0), -- 20:24:46 +(@PATH,2,787.9648,919.118,56.01221,0,0,0,0,100,0), -- 20:24:51 +(@PATH,3,793.1609,922.2444,56.78314,0,0,0,0,100,0), -- 20:24:55 +(@PATH,4,795.3989,923.1378,56.98447,0,0,0,0,100,0), -- 20:24:57 +(@PATH,5,801.3021,923.3855,57.17341,0,0,0,0,100,0), -- 20:25:00 +(@PATH,6,808.4121,919.6089,57.23282,0,0,0,0,100,0), -- 20:25:04 +(@PATH,7,812.0118,913.3118,57.18176,0,0,0,0,100,0), -- 20:25:06 +(@PATH,8,812.204,913.6752,57.22612,0,0,0,0,100,0), -- 20:25:12 +(@PATH,9,808.2915,919.7905,57.18939,0,0,0,0,100,0), -- 20:25:14 +(@PATH,10,801.1031,923.2393,57.11441,0,0,0,0,100,0), -- 20:25:18 +(@PATH,11,790.0347,920.629,56.37698,0,0,0,0,100,0), -- 20:25:21 +(@PATH,12,786.2445,917.2216,55.7047,0,0,0,0,100,0), -- 20:25:23 +(@PATH,13,783.3309,914.0374,55.27817,0,0,0,0,100,0); -- 20:25:27 +-- 0x1C16F44680167D00006A5B00009D4972 .go 779.7964 907.3997 55.31417 + +-- Pathing for Bonechewer Taskmaster Entry: 23028 'TDB FORMAT' +SET @NPC := 53815; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=614.9688,`position_y`=905.1718,`position_z`=59.02773 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,614.9688,905.1718,59.02773,0,0,0,0,100,0), -- 20:27:39 +(@PATH,2,602.5994,900.3304,59.40689,0,0,0,0,100,0), -- 20:27:41 +(@PATH,3,601.3251,900.2347,59.64486,0,0,0,0,100,0), -- 20:27:45 +(@PATH,4,596.3672,905.3165,59.73195,0,0,0,0,100,0), -- 20:27:47 +(@PATH,5,594.7749,909.9604,59.21187,0,0,0,0,100,0), -- 20:27:49 +(@PATH,6,598.7663,913.3591,58.69057,0,0,0,0,100,0), -- 20:27:53 +(@PATH,7,609.4606,912.4673,58.62482,0,0,0,0,100,0), -- 20:27:57 +(@PATH,8,615.0436,905.1978,58.98429,0,0,0,0,100,0); -- 20:28:00 +-- 0x1C16F44680167D00006A5B00019D4973 .go 614.9688 905.1718 59.02773 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=53820; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(53820, 53820, 0, 0, 2), +(53820, 53821, 4, 270, 2); + +-- Pathing for Bonechewer Taskmaster Entry: 23028 'TDB FORMAT' +SET @NPC := 53820; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=633.2257,`position_y`=963.4147,`position_z`=55.95343 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,633.2257,963.4147,55.95343,0,0,0,0,100,0), -- 20:24:38 +(@PATH,2,626.0544,963.9803,56.37569,0,0,0,0,100,0), -- 20:24:42 +(@PATH,3,620.5211,966.0339,56.25259,0,0,0,0,100,0), -- 20:24:43 +(@PATH,4,620.7354,966.1735,56.31302,0,0,0,0,100,0), -- 20:24:49 +(@PATH,5,626.1029,963.9597,56.25856,0,0,0,0,100,0), -- 20:24:52 +(@PATH,6,639.0172,964.6981,55.65588,0,0,0,0,100,0), -- 20:24:55 +(@PATH,7,640.4229,965.3899,55.41632,0,0,0,0,100,0), -- 20:24:58 +(@PATH,8,640.1735,965.0356,55.36687,0,0,0,0,100,0), -- 20:25:03 +(@PATH,9,634.595,963.6308,56.07304,0,0,0,0,100,0); -- 20:25:05 +-- 0x1C16F44680167D00006A5B00001D4973 .go 633.2257 963.4147 55.95343 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=52890; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(52890, 52890, 0, 0, 2), +(52890, 52889, 4, 270, 2); + +-- Pathing for Dragonmaw Wyrmcaller Entry: 22960 'TDB FORMAT' +SET @NPC := 52890; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=648.1636,`position_y`=938.5795,`position_z`=55.75506 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,648.1636,938.5795,55.75506,0,0,0,0,100,0), -- 20:22:53 +(@PATH,2,645.2552,922.6402,57.29848,0,0,0,0,100,0), -- 20:22:58 +(@PATH,3,645.6837,916.9199,58.23938,0,0,0,0,100,0), -- 20:23:03 +(@PATH,4,646.1837,910.1699,58.73938,0,0,0,0,100,0), -- 20:23:03 +(@PATH,5,645.2875,920.4247,58.00103,0,0,0,0,100,0), -- 20:23:11 +(@PATH,6,645.5131,925.1226,56.93448,0,0,0,0,100,0), -- 20:23:15 +(@PATH,7,645.7631,930.8726,56.43448,0,0,0,0,100,0), -- 20:23:15 +(@PATH,8,650.084,943.375,55.52758,0,0,0,0,100,0); -- 20:23:21 +-- 0x1C16F44680166C00006A5B00031D4972 .go 648.1636 938.5795 55.75506 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=52887; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(52887, 52887, 0, 0, 2), +(52887, 52888, 4, 270, 2); + +-- Pathing for Dragonmaw Wyrmcaller Entry: 22960 'TDB FORMAT' +SET @NPC := 52887; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=785.6938,`position_y`=775.3997,`position_z`=66.39993 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,785.6938,775.3997,66.39993,0,0,0,0,100,0), -- 20:24:19 +(@PATH,2,785.8984,794.7227,65.27033,0,0,0,0,100,0), -- 20:24:27 +(@PATH,3,786.6484,798.7227,64.77033,0,0,0,0,100,0), -- 20:24:27 +(@PATH,4,787.1109,818.1139,62.89856,0,0,0,0,100,0), -- 20:24:34 +(@PATH,5,787.1109,821.1139,62.39856,0,0,0,0,100,0), -- 20:24:34 +(@PATH,6,787.1893,815.1113,63.54066,0,0,0,0,100,0), -- 20:24:44 +(@PATH,7,787.1893,811.3613,64.04066,0,0,0,0,100,0), -- 20:24:44 +(@PATH,8,785.7648,793.4683,65.52825,0,0,0,0,100,0), -- 20:24:51 +(@PATH,9,785.2648,789.4683,66.27825,0,0,0,0,100,0), -- 20:24:51 +(@PATH,10,787.0689,764.1604,68.09256,0,0,0,0,100,0); -- 20:25:00 +-- 0x1C16F44680166C00006A5B00021D4972 .go 785.6938 775.3997 66.39993 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=52873; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(52873, 52873, 0, 0, 2), +(52873, 52874, 4, 270, 2); + +-- Pathing for Dragonmaw Wyrmcaller Entry: 22960 'TDB FORMAT' +SET @NPC := 52873; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=703.7258,`position_y`=793.4444,`position_z`=63.46073 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,703.7258,793.4444,63.46073,0,0,0,0,100,0), -- 20:22:58 +(@PATH,2,707.7258,805.4444,62.96073,0,0,0,0,100,0), -- 20:22:58 +(@PATH,3,707.654,812.1962,61.59881,0,0,0,0,100,0), -- 20:23:08 +(@PATH,4,706.654,814.9462,60.84881,0,0,0,0,100,0), -- 20:23:08 +(@PATH,5,705.904,817.9462,60.09881,0,0,0,0,100,0), -- 20:23:08 +(@PATH,6,705.404,820.6962,59.59881,0,0,0,0,100,0), -- 20:23:08 +(@PATH,7,704.5902,823.67,59.79628,0,0,0,0,100,0), -- 20:23:15 +(@PATH,8,704.8102,841.6521,58.77011,0,0,0,0,100,0), -- 20:23:20 +(@PATH,9,704.6913,842.5567,58.75265,0,0,0,0,100,0), -- 20:23:27 +(@PATH,10,704.126,829.2064,60.07757,0,0,0,0,100,0), -- 20:23:31 +(@PATH,11,707.3738,813.0848,61.42086,0,0,0,0,100,0), -- 20:23:36 +(@PATH,12,706.2325,801.4998,63.37791,0,0,0,0,100,0), -- 20:23:42 +(@PATH,13,702.9825,791.2498,63.87791,0,0,0,0,100,0), -- 20:23:42 +(@PATH,14,700.8631,770.6361,65.44987,0,0,0,0,100,0), -- 20:23:52 +(@PATH,15,700.8631,765.6361,65.94987,0,0,0,0,100,0), -- 20:23:52 +(@PATH,16,700.9891,782.0386,64.53194,0,0,0,0,100,0); -- 20:24:04 +-- 0x1C16F44680166C00006A5B00011D4972 .go 703.7258 793.4444 63.46073 diff --git a/sql/updates/world/2016_01_23_00_world.sql b/sql/updates/world/2016_01_23_00_world.sql new file mode 100644 index 00000000000..02eaa7c370d --- /dev/null +++ b/sql/updates/world/2016_01_23_00_world.sql @@ -0,0 +1,43 @@ +DELETE FROM `creature_formations` WHERE `leaderGUID`=63381; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(63381, 63381, 0, 0, 1), +(63381, 63380, 2, 270, 2); + +-- Pathing for Blade of Argus Entry: 17659 'TDB FORMAT' +SET @NPC := 63381; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-2393.32,`position_y`=-12009.38,`position_z`=26.83788 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-2393.32,-12009.38,26.83788,0,0,0,0,100,0), -- 09:35:02 +(@PATH,2,-2430.895,-12030.52,28.6322,0,0,0,0,100,0), -- 09:35:35 +(@PATH,3,-2449.131,-12041.39,30.04015,0,0,0,0,100,0), -- 09:35:47 +(@PATH,4,-2469.279,-12052.41,30.91039,0,0,0,0,100,0), -- 09:35:58 +(@PATH,5,-2485.917,-12057.62,31.67413,0,0,0,0,100,0), -- 09:36:06 +(@PATH,6,-2499.339,-12060.41,32.19662,0,0,0,0,100,0), -- 09:36:16 +(@PATH,7,-2551.131,-12097.43,31.56079,0,0,0,0,100,0), -- 09:36:26 +(@PATH,8,-2561.849,-12106.37,30.36333,0,0,0,0,100,0), -- 09:36:45 +(@PATH,9,-2594.441,-12132.8,25.2879,0,0,0,0,100,0), -- 09:36:59 +(@PATH,10,-2614.055,-12144.08,22.40907,0,0,0,0,100,0), -- 09:37:10 +(@PATH,11,-2646.337,-12163.92,17.16356,0,0,0,0,100,0), -- 09:37:24 +(@PATH,12,-2662.804,-12174.26,14.88417,0,0,0,0,100,0), -- 09:37:33 +(@PATH,13,-2684.956,-12188.63,12.24028,0,0,0,0,100,0), -- 09:37:43 +(@PATH,14,-2717.39,-12205.54,9.461565,0,0,0,0,100,0), -- 09:37:57 +(@PATH,15,-2734.083,-12209.19,8.946226,0,0,0,0,100,0), -- 09:38:09 +(@PATH,16,-2734.196,-12209.07,8.88302,0,0,0,0,100,0), -- 09:38:21 +(@PATH,17,-2716.481,-12205.85,9.632504,0,0,0,0,100,0), -- 09:38:31 +(@PATH,18,-2690.927,-12193.18,11.25666,0,0,0,0,100,0), -- 09:38:43 +(@PATH,19,-2673.976,-12180.86,13.79457,0,0,0,0,100,0), -- 09:38:55 +(@PATH,20,-2653.271,-12168.26,16.31552,0,0,0,0,100,0), -- 09:39:06 +(@PATH,21,-2634.485,-12156.3,19.4272,0,0,0,0,100,0), -- 09:39:16 +(@PATH,22,-2600.122,-12135.83,24.54786,0,0,0,0,100,0), -- 09:39:29 +(@PATH,23,-2580.325,-12122.89,27.64962,0,0,0,0,100,0), -- 09:39:40 +(@PATH,24,-2535.282,-12085.34,32.13941,0,0,0,0,100,0), -- 09:39:54 +(@PATH,25,-2520.165,-12073.53,32.51933,0,0,0,0,100,0), -- 09:40:14 +(@PATH,26,-2475.724,-12055.97,31.22906,0,0,0,0,100,0), -- 09:40:24 +(@PATH,27,-2463.655,-12049.68,30.5184,0,0,0,0,100,0), -- 09:40:33 +(@PATH,28,-2435.532,-12033.4,29.11832,0,0,0,0,100,0), -- 09:40:42 +(@PATH,29,-2407.538,-12018.4,27.76891,0,0,0,0,100,0), -- 09:40:53 +(@PATH,30,-2393.296,-12009.36,26.8369,0,0,0,0,100,0); -- 09:41:05 diff --git a/sql/updates/world/2016_01_24_00_world.sql b/sql/updates/world/2016_01_24_00_world.sql new file mode 100644 index 00000000000..a28b3fa25b8 --- /dev/null +++ b/sql/updates/world/2016_01_24_00_world.sql @@ -0,0 +1,62 @@ +-- +SET @guid:=134881; +DELETE FROM `creature` WHERE `guid` BETWEEN @guid+0 AND @guid+53; +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES +(@guid+0, 18927, 571, 0, 0, 1, 1, 18800, 0, 5740.71, 686.122, 643.896, 3.82227, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+1, 18927, 571, 0, 0, 1, 1, 18801, 0, 5739.36, 684.622, 644.191, 0.872665, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+2, 18927, 571, 0, 0, 1, 1, 18800, 0, 5664.31, 666.273, 652.064, 1.39626, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+3, 18927, 571, 0, 0, 1, 1, 18801, 0, 5664.37, 668.047, 652.051, 4.90438, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+4, 18927, 0, 0, 0, 1, 1, 18800, 0, -8364.87207, 617.860, 95.345, 2.580013, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+5, 18927, 0, 0, 0, 1, 1, 18801, 0, -8367.4511, 619.1992, 95.2811, 5.804225, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+6, 19169, 530, 0, 0, 1, 1, 18785, 0, 9375.07, -7157.06, 9.25588, 1.6057, 5, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+7, 19169, 530, 0, 0, 1, 1, 18793, 0, 9374.67, -7155.09, 9.33675, 4.95674, 5, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+8, 19169, 530, 0, 0, 1, 1, 18785, 0, 9689.33, -7345.39, 11.9144, 4.20624, 180, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+9, 19169, 530, 0, 0, 1, 1, 18793, 0, 9687.96, -7346.09, 11.956, 1.50098, 180, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+10, 19169, 530, 0, 0, 1, 1, 18785, 0, 9556.56, -7157.38, 14.2799, 6.10865, 120, 0, 0, 1, 0, 0, 3, 0, 0, 0), +(@guid+11, 19169, 530, 0, 0, 1, 1, 18793, 0, 9558.34, -7157.94, 14.3132, 2.63545, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+12, 19169, 530, 0, 0, 1, 1, 18785, 0, 9757.39, -7485.7, 13.6171, 4.76475, 120, 0, 0, 1, 0, 0, 3, 0, 0, 0), +(@guid+13, 19169, 530, 0, 0, 1, 1, 18793, 0, 9757.64, -7487.37, 13.6167, 1.55334, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+14, 19169, 571, 0, 0, 1, 1, 18785, 0, 5942.95, 629.234, 650.668, 1.5708, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+15, 19169, 571, 0, 0, 1, 1, 18793, 0, 5943.17, 630.894, 650.666, 4.90438, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+16, 19169, 571, 0, 0, 1, 1, 18785, 0, 5899.04, 532.766, 640.979, 4.90438, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+17, 19169, 571, 0, 0, 1, 1, 18793, 0, 5899.1, 530.898, 641.056, 1.67552, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+18, 19171, 530, 0, 0, 1, 1, 18795, 0, -4270.06, -11333.1, 5.57545, 4.67748, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+19, 19171, 530, 0, 0, 1, 1, 18794, 0, -4269.71, -11336.5, 5.80931, 1.69297, 120, 0, 0, 1, 0, 0, 3, 0, 0, 0), +(@guid+20, 19175, 1, 0, 0, 1, 1, 18804, 0, 1609.47, -4323.21, 2.33176, 3.34811, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+21, 19175, 1, 0, 0, 1, 1, 18805, 0, 1605.95, -4324.2, 2.19915, 0.0101724, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+22, 19177, 1, 0, 0, 1, 1, 18808, 0, 1748.94, -4497.53, 28.793, 5.47104, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+23, 19177, 1, 0, 0, 1, 1, 18808, 0, 1752.58, -4499.43, 28.2911, 2.89886, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+24, 19178, 0, 0, 0, 1, 1, 18810, 0, 1629.95, 219.238, -43.1027, 1.91079, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+25, 20102, 0, 0, 0, 1, 1, 19342, 0, -14313.5, 508.853, 8.69121, 4.27606, 180, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+26, 20102, 0, 0, 0, 1, 1, 19339, 0, -14314, 507.109, 8.68829, 1.22173, 180, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+27, 20102, 1, 0, 0, 1, 1, 19342, 0, -1030.97, -3678.41, 23.2479, 1.62316, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+28, 20102, 1, 0, 0, 1, 1, 19339, 0, -1031.03, -3676.2, 23.1851, 4.69494, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+29, 20102, 1, 0, 0, 1, 1, 19342, 0, -924.656, -3715.91, 9.13173, 5.06145, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+30, 20102, 1, 0, 0, 1, 1, 19339, 0, -924.099, -3718, 9.18514, 1.69297, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+31, 20102, 1, 0, 0, 1, 1, 19342, 0, 6791.34, -4747.01, 701.617, 2.21657, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+32, 20102, 1, 0, 0, 1, 1, 19339, 0, -7144.12, -3830.95, 8.50543, 3.26377, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+33, 20102, 1, 0, 0, 1, 1, 19342, 0, -7147.06, -3830.22, 8.51396, 6.05629, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+34, 20102, 1, 0, 0, 1, 1, 19339, 0, -7217.57, -3735.16, 8.45314, 2.28638, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+35, 20102, 1, 0, 0, 1, 1, 19342, 0, -7219.66, -3731.91, 8.4635, 5.13127, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+36, 20102, 1, 0, 0, 1, 1, 19339, 0, -7053.62, -3777.21, 10.2047, 5.25344, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+37, 20102, 1, 0, 0, 1, 1, 19342, 0, -7053, -3779.9, 10.1478, 1.53589, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+38, 20102, 530, 0, 0, 1, 1, 19339, 0, -1818.99, 5305.67, -12.3448, 4.03171, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+39, 20102, 530, 0, 0, 1, 1, 19342, 0, -1821.12, 5303.35, -12.3448, 0.767945, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+40, 20102, 530, 0, 0, 1, 1, 19339, 0, -1748.08, 5493.86, -12.3448, 4.2586, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+41, 20102, 530, 0, 0, 1, 1, 19342, 0, -1747.9, 5492.11, -12.3448, 1.3439, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+42, 20102, 530, 0, 0, 1, 1, 19339, 0, -1978.82, 5365.21, -12.3448, 3.63029, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+43, 20102, 530, 0, 0, 1, 1, 19342, 0, -1980.72, 5364.88, -12.3225, 0.226893, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+44, 20102, 530, 0, 0, 1, 1, 19339, 0, -1875.93, 5376.2, -12.3448, 0.820305, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+45, 20102, 530, 0, 0, 1, 1, 19342, 0, -1875.06, 5378.04, -12.3448, 4.36332, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+46, 20102, 530, 0, 0, 1, 1, 19339, 0, -2175.76, 5414.62, 50.3112, 5.60251, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+47, 20102, 530, 0, 0, 1, 1, 19342, 0, -2174.14, 5413.06, 50.3112, 2.56563, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+48, 20102, 530, 0, 0, 1, 1, 19339, 0, -1809.92, 5418.64, -12.3448, 5.55015, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+49, 20102, 530, 0, 0, 1, 1, 19342, 0, -1808.36, 5417.01, -12.3448, 2.32129, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+50, 20102, 530, 0, 0, 1, 1, 19339, 0, -1917.81, 5441.85, -12.3448, 2.35619, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+51, 20102, 530, 0, 0, 1, 1, 19342, 0, -1920.17, 5443.52, -12.3448, 5.86431, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+52, 20102, 530, 0, 0, 1, 1, 19339, 0, -1883.61, 5769.28, 129.641, 4.15388, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+53, 20102, 530, 0, 0, 1, 1, 19342, 0, -1884.14, 5766.55, 129.641, 1.309, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0); + +SET @Event=2; +DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @guid+0 AND @guid+53 AND `eventEntry`=@Event; +INSERT INTO `game_event_creature` SELECT @Event, creature.guid FROM `creature` WHERE creature.guid BETWEEN @guid+0 AND @guid+53; diff --git a/sql/updates/world/2016_01_26_00_world.sql b/sql/updates/world/2016_01_26_00_world.sql new file mode 100644 index 00000000000..71fe8dc21e3 --- /dev/null +++ b/sql/updates/world/2016_01_26_00_world.sql @@ -0,0 +1,11 @@ +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=28931; +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 +(28931, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Data Set 1 1 - Set Unit Flags'), +(28931, 0, 1, 6, 7, 0, 100, 0, 0, 0, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Evade - Set Unit Flags'), +(28931, 0, 2, 0, 8, 0, 100, 0, 61492, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Spellhit (Despawn Blightblood) - Despawn'), +(28931, 0, 3, 7, 54, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Just Summoned - Set Phase 1'), +(28931, 0, 4, 0, 4, 0, 100, 1, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Agro - Set Phase 2'), +(28931, 0, 5, 6, 8, 0, 100, 0, 53103, 0, 30000, 30000, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Spellhit (Charm Blightblood Troll) - Set Phase 2'), +(28931, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Spellhit (Charm Blightblood Troll) - Set Aggresie'), +(28931, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Just Summoned - Set Passive'), +(28931, 0, 8, 0, 1, 2, 100, 1, 0, 0, 0, 0, 45, 3, 3, 0, 0, 0, 0, 19, 29100, 10, 0, 0, 0, 0, 0, 'Blightblood Troll - OOC (Phase 2) - Set Data 3 3 on Totally Generic Bunny (JSB)'); diff --git a/sql/updates/world/2016_01_28_00_world_335.sql b/sql/updates/world/2016_01_28_00_world_335.sql new file mode 100644 index 00000000000..64b32cb2d89 --- /dev/null +++ b/sql/updates/world/2016_01_28_00_world_335.sql @@ -0,0 +1,12 @@ +-- Create new gossip_menu_option 3223 for Apothecary Dithers and 3228 for Alchemist Arbington: +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (3223,3228,3229) AND `OptionBroadcastTextID` IN (6516,6517,6518,6519,6531); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES +(3223,0,0,"What's needed for the cauldron at Felstone Field?",6516,3,131,0,0,0,0,'',0), +(3223,1,0,"What's needed for the cauldron at Dalson's Tears?",6517,3,131,0,0,0,0,'',0), +(3223,2,0,"What's needed for the cauldron at the Writhing Haunt?",6518,3,131,0,0,0,0,'',0), +(3223,3,0,"What's needed for the cauldron at Gahrron's Withering?",6519,3,131,0,0,0,0,'',0), +(3228,0,0,"What's needed for the cauldron at Felstone Field?",6516,3,131,0,0,0,0,'',0), +(3228,1,0,"What's needed for the cauldron at Dalson's Tears?",6517,3,131,0,0,0,0,'',0), +(3228,2,0,"What's needed for the cauldron at the Writhing Haunt?",6518,3,131,0,0,0,0,'',0), +(3228,3,0,"What's needed for the cauldron at Gahrron's Withering?",6519,3,131,0,0,0,0,'',0), +(3229,0,0,"I need a Vitreous Focuser.",6531,3,131,0,0,0,0,'',0); diff --git a/sql/updates/world/2016_01_28_01_world.sql b/sql/updates/world/2016_01_28_01_world.sql new file mode 100644 index 00000000000..3c4cadb310d --- /dev/null +++ b/sql/updates/world/2016_01_28_01_world.sql @@ -0,0 +1,194 @@ +SET @ENTRY := 177226; +SET @GOSSIP_ID := 7058; +SET @NPC_TEXT_UNLEARN := 8321; +SET @NPC_TEXT_LEARN_ENG := 6; +SET @NPC_TEXT_LEARN_LW := 7; +UPDATE `gameobject_template` SET `ScriptName`='go_soothsaying_for_dummies' WHERE `entry`=@ENTRY; +-- Missing gossip texts +DELETE FROM `npc_text` WHERE `ID` IN (@NPC_TEXT_LEARN_ENG,@NPC_TEXT_LEARN_LW); +INSERT INTO `npc_text` (`ID`,`text0_0`,`text0_1`,`BroadcastTextID0`,`lang0`,`Probability0`,`em0_0`,`em0_1`,`em0_2`,`em0_3`,`em0_4`,`em0_5`,`text1_0`,`text1_1`,`BroadcastTextID1`,`lang1`,`Probability1`,`em1_0`,`em1_1`,`em1_2`,`em1_3`,`em1_4`,`em1_5`,`text2_0`,`text2_1`,`BroadcastTextID2`,`lang2`,`Probability2`,`em2_0`,`em2_1`,`em2_2`,`em2_3`,`em2_4`,`em2_5`,`text3_0`,`text3_1`,`BroadcastTextID3`,`lang3`,`Probability3`,`em3_0`,`em3_1`,`em3_2`,`em3_3`,`em3_4`,`em3_5`,`text4_0`,`text4_1`,`BroadcastTextID4`,`lang4`,`Probability4`,`em4_0`,`em4_1`,`em4_2`,`em4_3`,`em4_4`,`em4_5`,`text5_0`,`text5_1`,`BroadcastTextID5`,`lang5`,`Probability5`,`em5_0`,`em5_1`,`em5_2`,`em5_3`,`em5_4`,`em5_5`,`text6_0`,`text6_1`,`BroadcastTextID6`,`lang6`,`Probability6`,`em6_0`,`em6_1`,`em6_2`,`em6_3`,`em6_4`,`em6_5`,`text7_0`,`text7_1`,`BroadcastTextID7`,`lang7`,`Probability7`,`em7_0`,`em7_1`,`em7_2`,`em7_3`,`em7_4`,`em7_5`,`VerifiedBuild`) VALUES +(@NPC_TEXT_LEARN_ENG,'Hundreds of various diagrams and schematics begin to take shape on the pages of the book. You recognize some of the diagrams while others remain foreign but familiar.','Hundreds of various diagrams and schematics begin to take shape on the pages of the book. You recognize some of the diagrams while others remain foreign but familiar.',11875,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,0), +(@NPC_TEXT_LEARN_LW,'The assortment of images, shapes, and markings come together before your eyes. The book seems to know your skill with leatherworking and offers you a choice - but be warned - you may only select one and once you have done so, may not change your mind!:','The assortment of images, shapes, and markings come together before your eyes. The book seems to know your skill with leatherworking and offers you a choice - but be warned - you may only select one and once you have done so, may not change your mind!:',11892,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,0); +-- Link gossip to menu +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP_ID AND `text_id` IN (@NPC_TEXT_LEARN_ENG,@NPC_TEXT_LEARN_LW); +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES +(@GOSSIP_ID, @NPC_TEXT_LEARN_ENG), +(@GOSSIP_ID, @NPC_TEXT_LEARN_LW); + +DELETE FROM `gossip_menu_option` WHERE `menu_id`=@GOSSIP_ID; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES +(@GOSSIP_ID,0,0,'I wish to unlearn my Gnomish Engineering specialization!',36143,1,0,0,0,0,1500000,'Do you really want to unlearn your Gnomish Engineering specialization and lose all associated recipes?',36144), +(@GOSSIP_ID,1,0,'I wish to unlearn my Goblin Engineering specialization!',36146,1,0,0,0,0,1500000,'Do you really want to unlearn your Goblin Engineering specialization and lose all associated recipes?',36145), +(@GOSSIP_ID,2,0,'I am 100% confident that I wish to learn in the ways of gnomish engineering.',11878,1,0,0,0,0,0,'',0), +(@GOSSIP_ID,3,0,'I am 100% confident that I wish to learn in the ways of goblin engineering.',11876,1,0,0,0,0,0,'',0), +(@GOSSIP_ID,4,0,'I am absolutely certain that I want to learn dragonscale leatherworking.',11889,1,0,0,0,0,0,'',0), +(@GOSSIP_ID,5,0,'I am absolutely certain that I want to learn elemental leatherworking.',11890,1,0,0,0,0,0,'',0), +(@GOSSIP_ID,6,0,'I am absolutely certain that I want to learn tribal leatherworking.',11891,1,0,0,0,0,0,'',0); + +-- Conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP_ID; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,0,7,0,202,200,0,0,0,0,'','Show this menu if player has engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,0,8,0,3639,0,0,0,0,0,'','Show this menu if player has rewarded Show your Work [Goblin]'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,0,25,0,20219,0,0,1,0,0,'','Show this menu if player doesn''t have Gnomish Engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,0,25,0,20222,0,0,1,0,0,'','Show this menu if player doesn''t have Goblin Engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,1,7,0,202,200,0,0,0,0,'','Show this menu if player has engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,1,8,0,3641,0,0,0,0,0,'','Show this menu if player has rewarded Show your Work [Alliance]'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,1,25,0,20219,0,0,1,0,0,'','Show this menu if player doesn''t have Gnomish Engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,1,25,0,20222,0,0,1,0,0,'','Show this menu if player doesn''t have Goblin Engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,2,7,0,202,200,0,0,0,0,'','Show this menu if player has engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,2,8,0,3643,0,0,0,0,0,'','Show this menu if player has rewarded Show your Work [Horde]'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,2,25,0,20219,0,0,1,0,0,'','Show this menu if player doesn''t have Gnomish Engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,2,25,0,20222,0,0,1,0,0,'','Show this menu if player doesn''t have Goblin Engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,0,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,0,8,0,5141,0,0,0,0,0,'','Show this menu if player has rewarded Dragonscale Leatherworking [Alliance]'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,0,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,0,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,0,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,1,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,1,8,0,5143,0,0,0,0,0,'','Show this menu if player has rewarded Tribal Leatherworking [Alliance]'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,1,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,1,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,1,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,2,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,2,8,0,5144,0,0,0,0,0,'','Show this menu if player has rewarded Elemental Leatherworking [Alliance]'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,2,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,2,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,2,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,3,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,3,8,0,5145,0,0,0,0,0,'','Show this menu if player has rewarded Dragonscale Leatherworking [Horde]'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,3,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,3,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,3,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,4,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,4,8,0,5148,0,0,0,0,0,'','Show this menu if player has rewarded Tribal Leatherworking [Horde]'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,4,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,4,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,4,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,5,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,5,8,0,5146,0,0,0,0,0,'','Show this menu if player has rewarded Elemental Leatherworking [Horde]'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,5,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,5,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,5,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_UNLEARN,0,0,7,0,202,200,0,0,0,0,'','Show this menu if player has engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_UNLEARN,0,0,25,0,20219,0,0,0,0,0,'','Show this menu if player does have Gnomish Engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_UNLEARN,0,1,7,0,202,200,0,0,0,0,'','Show this menu if player has engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_UNLEARN,0,1,25,0,20222,0,0,0,0,0,'','Show this menu if player does have Goblin Engineering'), +(15,@GOSSIP_ID,0,0,0,7,0,202,200,0,0,0,0,'','Show option if player has engineering'), +(15,@GOSSIP_ID,0,0,0,25,0,20219,0,0,0,0,0,'','Show option if player does have Gnomish Engineering'), +(15,@GOSSIP_ID,1,0,0,7,0,202,200,0,0,0,0,'','Show option if player has engineering'), +(15,@GOSSIP_ID,1,0,0,25,0,20222,0,0,0,0,0,'','Show option if player does have Gnomish Engineering'), +(15,@GOSSIP_ID,2,0,0,7,0,202,200,0,0,0,0,'','Show option if player has engineering'), +(15,@GOSSIP_ID,2,0,0,8,0,3639,0,0,0,0,0,'','Show option if player has rewarded Show your Work [Goblin]'), +(15,@GOSSIP_ID,2,0,0,25,0,20219,0,0,1,0,0,'','Show option if player doesn''t have Gnomish Engineering'), +(15,@GOSSIP_ID,2,0,0,25,0,20222,0,0,1,0,0,'','Show option if player doesn''t have Goblin Engineering'), +(15,@GOSSIP_ID,2,0,1,7,0,202,200,0,0,0,0,'','Show option if player has engineering'), +(15,@GOSSIP_ID,2,0,1,8,0,3641,0,0,0,0,0,'','Show option if player has rewarded Show your Work [Alliance]'), +(15,@GOSSIP_ID,2,0,1,25,0,20219,0,0,1,0,0,'','Show option if player doesn''t have Gnomish Engineering'), +(15,@GOSSIP_ID,2,0,1,25,0,20222,0,0,1,0,0,'','Show option if player doesn''t have Goblin Engineering'), +(15,@GOSSIP_ID,2,0,2,7,0,202,200,0,0,0,0,'','Show option if player has engineering'), +(15,@GOSSIP_ID,2,0,2,8,0,3643,0,0,0,0,0,'','Show option if player has rewarded Show your Work [Horde]'), +(15,@GOSSIP_ID,2,0,2,25,0,20219,0,0,1,0,0,'','Show option if player doesn''t have Gnomish Engineering'), +(15,@GOSSIP_ID,2,0,2,25,0,20222,0,0,1,0,0,'','Show option if player doesn''t have Goblin Engineering'), +(15,@GOSSIP_ID,3,0,0,7,0,202,200,0,0,0,0,'','Show option if player has engineering'), +(15,@GOSSIP_ID,3,0,0,8,0,3639,0,0,0,0,0,'','Show option if player has rewarded Show your Work [Goblin]'), +(15,@GOSSIP_ID,3,0,0,25,0,20219,0,0,1,0,0,'','Show option if player doesn''t have Gnomish Engineering'), +(15,@GOSSIP_ID,3,0,0,25,0,20222,0,0,1,0,0,'','Show option if player doesn''t have Goblin Engineering'), +(15,@GOSSIP_ID,3,0,1,7,0,202,200,0,0,0,0,'','Show option if player has engineering'), +(15,@GOSSIP_ID,3,0,1,8,0,3641,0,0,0,0,0,'','Show option if player has rewarded Show your Work [Alliance]'), +(15,@GOSSIP_ID,3,0,1,25,0,20219,0,0,1,0,0,'','Show option if player doesn''t have Gnomish Engineering'), +(15,@GOSSIP_ID,3,0,1,25,0,20222,0,0,1,0,0,'','Show option if player doesn''t have Goblin Engineering'), +(15,@GOSSIP_ID,3,0,2,7,0,202,200,0,0,0,0,'','Show option if player has engineering'), +(15,@GOSSIP_ID,3,0,2,8,0,3643,0,0,0,0,0,'','Show option if player has rewarded Show your Work [Horde]'), +(15,@GOSSIP_ID,3,0,2,25,0,20219,0,0,1,0,0,'','Show option if player doesn''t have Gnomish Engineering'), +(15,@GOSSIP_ID,3,0,2,25,0,20222,0,0,1,0,0,'','Show option if player doesn''t have Goblin Engineering'), +(15,@GOSSIP_ID,4,0,0,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,4,0,0,8,0,5141,0,0,0,0,0,'','Show this menu if player has rewarded Dragonscale Leatherworking [Alliance]'), +(15,@GOSSIP_ID,4,0,0,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,4,0,0,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,4,0,0,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,4,0,1,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,4,0,1,8,0,5143,0,0,0,0,0,'','Show this menu if player has rewarded Tribal Leatherworking [Alliance]'), +(15,@GOSSIP_ID,4,0,1,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,4,0,1,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,4,0,1,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,4,0,2,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,4,0,2,8,0,5144,0,0,0,0,0,'','Show this menu if player has rewarded Elemental Leatherworking [Alliance]'), +(15,@GOSSIP_ID,4,0,2,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,4,0,2,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,4,0,2,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,4,0,3,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,4,0,3,8,0,5145,0,0,0,0,0,'','Show this menu if player has rewarded Dragonscale Leatherworking [Horde]'), +(15,@GOSSIP_ID,4,0,3,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,4,0,3,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,4,0,3,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,4,0,4,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,4,0,4,8,0,5148,0,0,0,0,0,'','Show this menu if player has rewarded Tribal Leatherworking [Horde]'), +(15,@GOSSIP_ID,4,0,4,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,4,0,4,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,4,0,4,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,4,0,5,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,4,0,5,8,0,5146,0,0,0,0,0,'','Show this menu if player has rewarded Elemental Leatherworking [Horde]'), +(15,@GOSSIP_ID,4,0,5,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,4,0,5,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,4,0,5,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,5,0,0,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,5,0,0,8,0,5141,0,0,0,0,0,'','Show this menu if player has rewarded Dragonscale Leatherworking [Alliance]'), +(15,@GOSSIP_ID,5,0,0,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,5,0,0,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,5,0,0,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,5,0,1,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,5,0,1,8,0,5143,0,0,0,0,0,'','Show this menu if player has rewarded Tribal Leatherworking [Alliance]'), +(15,@GOSSIP_ID,5,0,1,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,5,0,1,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,5,0,1,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,5,0,2,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,5,0,2,8,0,5144,0,0,0,0,0,'','Show this menu if player has rewarded Elemental Leatherworking [Alliance]'), +(15,@GOSSIP_ID,5,0,2,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,5,0,2,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,5,0,2,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,5,0,3,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,5,0,3,8,0,5145,0,0,0,0,0,'','Show this menu if player has rewarded Dragonscale Leatherworking [Horde]'), +(15,@GOSSIP_ID,5,0,3,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,5,0,3,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,5,0,3,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,5,0,4,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,5,0,4,8,0,5148,0,0,0,0,0,'','Show this menu if player has rewarded Tribal Leatherworking [Horde]'), +(15,@GOSSIP_ID,5,0,4,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,5,0,4,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,5,0,4,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,5,0,5,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,5,0,5,8,0,5146,0,0,0,0,0,'','Show this menu if player has rewarded Elemental Leatherworking [Horde]'), +(15,@GOSSIP_ID,5,0,5,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,5,0,5,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,5,0,5,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,6,0,0,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,6,0,0,8,0,5141,0,0,0,0,0,'','Show this menu if player has rewarded Dragonscale Leatherworking [Alliance]'), +(15,@GOSSIP_ID,6,0,0,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,6,0,0,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,6,0,0,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,6,0,1,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,6,0,1,8,0,5143,0,0,0,0,0,'','Show this menu if player has rewarded Tribal Leatherworking [Alliance]'), +(15,@GOSSIP_ID,6,0,1,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,6,0,1,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,6,0,1,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,6,0,2,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,6,0,2,8,0,5144,0,0,0,0,0,'','Show this menu if player has rewarded Elemental Leatherworking [Alliance]'), +(15,@GOSSIP_ID,6,0,2,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,6,0,2,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,6,0,2,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,6,0,3,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,6,0,3,8,0,5145,0,0,0,0,0,'','Show this menu if player has rewarded Dragonscale Leatherworking [Horde]'), +(15,@GOSSIP_ID,6,0,3,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,6,0,3,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,6,0,3,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,6,0,4,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,6,0,4,8,0,5148,0,0,0,0,0,'','Show this menu if player has rewarded Tribal Leatherworking [Horde]'), +(15,@GOSSIP_ID,6,0,4,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,6,0,4,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,6,0,4,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,6,0,5,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,6,0,5,8,0,5146,0,0,0,0,0,'','Show this menu if player has rewarded Elemental Leatherworking [Horde]'), +(15,@GOSSIP_ID,6,0,5,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,6,0,5,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,6,0,5,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'); diff --git a/sql/updates/world/2016_01_30_00_world_335.sql b/sql/updates/world/2016_01_30_00_world_335.sql new file mode 100644 index 00000000000..43025f581d7 --- /dev/null +++ b/sql/updates/world/2016_01_30_00_world_335.sql @@ -0,0 +1,65 @@ +-- NPC 4488 Parqual Fintallas creature_template script name update: +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName`= '' WHERE `entry` = 4488; + +-- new gossip_menu_option 4764: +DELETE FROM `gossip_menu_option` WHERE `menu_id`= 4764 AND `id` IN (0,1,2,3); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES +(4764, 0, 0, "Kel'Thuzad is my answer.", 8377, 1, 1, 0,0,0,0,'',0), +(4764, 1, 0, "Gul'dan is my answer.", 8378, 1, 1, 0,0,0,0,'',0), +(4764, 2, 0, "Kil'jaeden is my answer.", 8379, 1, 1, 0,0,0,0,'',0), +(4764, 3, 0, "Ner'zhul is my answer.", 8380, 1, 1, 0,0,0,0,'',0); + +-- new gossip_menu.entry linking quest text to gossip menu: +DELETE FROM `gossip_menu` WHERE `entry`= 4764 AND `text_id`= 5822; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4764, 5822); + +-- broadcast_text English grammar correction: +UPDATE `broadcast_text` SET `MaleText`= "Kel'Thuzad? If you know that name at all, then perhaps you did read the book I sent you to get.$B$BUnfortunately, your answer is incorrect." WHERE `ID`= 8373; + +-- creature_text (say lines) in reply to the selected options: +DELETE FROM `creature_text` WHERE `entry` = 4488 AND `groupid` IN (0,1,2,3,4); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(4488,0,0,"Kel'Thuzad? If you know that name at all, then perhaps you did read the book I sent you to get.$B$BUnfortunately, your answer is incorrect.",12,0,100,1,5000,0,8373,0,'Parqual replies to option 1'), +(4488,1,0,"Gul'dan. Not a name many have heard on Azeroth.$B$BUnfortunately, not the correct answer.", 12,0,100,1,5000,0,8374,0,'Parqual replies to option 2'), +(4488,2,0,'An interesting response to my question... and the wrong one.', 12,0,100,1,5000,0,8375,0,'Parqual replies to option 3'), +(4488,3,0,"Ah, Ner'zhul. Not a name that should be uttered lightly, but I did ask you for an answer.$B$BAnd Ner'zhul is the correct one.", 12,0,100,1,5000,0,8376,0,'Parqual replies to option 4'), +(4488,4,0,"I'm afraid not, $n. Now, feel the shame you have brought upon yourself.", 12,0,100,1,3000,0,8394,0,'Parqual, reply 2 to option 1-3'); + +-- new SmartAI script for NPC 4488 Parqual Fintallas: +DELETE FROM `smart_scripts` WHERE `entryorguid` = 4488 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 +(4488,0, 0, 1, 62,0,100,0, 4764, 0,0,0, 83, 3, 0,0,0,0,0, 10, 32022, 4488,0,0,0,0,0,'Parqual Fintallas - On Gossip Option 0 Selected - Remove npcflags Gossip & Questgiver'), +(4488,0, 1, 2, 61,0,100,0, 0, 0,0,0, 72, 0, 0,0,0,0,0, 7, 0, 0,0,0,0,0,0,'Parqual Fintallas - On Gossip Option 0 Selected - Close Gossip'), +(4488,0, 2, 0, 61,0,100,0, 0, 0,0,0, 1, 0, 5000,0,0,0,0, 7, 0, 0,0,0,0,0,0,'Parqual Fintallas - On Gossip Option 0 Selected - Say Text 0'), +(4488,0, 3, 0, 52,0,100,0, 0, 4488,0,0, 1, 4, 3000,0,0,0,0, 7, 0, 0,0,0,0,0,0,'Parqual Fintallas - On Text 0 Over - Say Text 4'), +(4488,0, 4, 5, 52,0,100,0, 4, 4488,0,0, 11, 6767, 2,0,0,0,0, 7, 0, 0,0,0,0,0,0,'Parqual Fintallas - On Text 4 Over - Cast \'Mark of Shame\''), +(4488,0, 5, 0, 61,0,100,0, 0, 0,0,0, 81, 3, 0,0,0,0,0, 10, 32022, 4488,0,0,0,0,0,'Parqual Fintallas - On Text 4 Over - Set npcflags Gossip & Questgiver'), +(4488,0, 6, 7, 62,0,100,0, 4764, 1,0,0, 83, 3, 0,0,0,0,0, 10, 32022, 4488,0,0,0,0,0,'Parqual Fintallas - On Gossip Option 1 Selected - Remove npcflags Gossip & Questgiver'), +(4488,0, 7, 8, 61,0,100,0, 0, 0,0,0, 72, 0, 0,0,0,0,0, 7, 0, 0,0,0,0,0,0,'Parqual Fintallas - On Gossip Option 1 Selected - Close Gossip'), +(4488,0, 8, 0, 61,0,100,0, 0, 0,0,0, 1, 1, 5000,0,0,0,0, 7, 0, 0,0,0,0,0,0,'Parqual Fintallas - On Gossip Option 1 Selected - Say Text 1'), +(4488,0, 9, 0, 52,0,100,0, 1, 4488,0,0, 1, 4, 3000,0,0,0,0, 7, 0, 0,0,0,0,0,0,'Parqual Fintallas - On Text 1 Over - Say Text 4'), +(4488,0, 10, 11, 62,0,100,0, 4767, 2,0,0, 83, 3, 0,0,0,0,0, 10, 32022, 4488,0,0,0,0,0,'Parqual Fintallas - On Gossip Option 2 Selected - Remove npcflags Gossip & Questgiver'), +(4488,0, 11, 12, 61,0,100,0, 0, 0,0,0, 72, 0, 0,0,0,0,0, 7, 0, 0,0,0,0,0,0,'Parqual Fintallas - On Gossip Option 2 Selected - Close Gossip'), +(4488,0, 12, 0, 61,0,100,0, 0, 0,0,0, 1, 2, 5000,0,0,0,0, 7, 0, 0,0,0,0,0,0,'Parqual Fintallas - On Gossip Option 2 Selected - Say Text 2'), +(4488,0, 13, 0, 52,0,100,0, 2, 4488,0,0, 1, 4, 3000,0,0,0,0, 7, 0, 0,0,0,0,0,0,'Parqual Fintallas - On Text 2 Over - Say Text 4'), +(4488,0, 14, 15, 62,0,100,0, 4764, 3,0,0, 83, 3, 0,0,0,0,0, 10, 32022, 4488,0,0,0,0,0,'Parqual Fintallas - On Gossip Option 3 Selected - Remove npcflags Gossip & Questgiver'), +(4488,0, 15, 16, 61,0,100,0, 0, 0,0,0, 72, 0, 0,0,0,0,0, 7, 0, 0,0,0,0,0,0,'Parqual Fintallas - On Gossip Option 3 Selected - Close Gossip'), +(4488,0, 16, 17, 61,0,100,0, 0, 0,0,0, 1, 3, 3000,0,0,0,0, 7, 0, 0,0,0,0,0,0,'Parqual Fintallas - On Gossip Option 3 Selected - Say Text 3'), +(4488,0, 17, 18, 61,0,100,0, 0, 0,0,0, 5, 2, 0,0,0,0,0, 7, 0, 0,0,0,0,0,0,'Parqual Fintallas - On Gossip Option 3 Selected - Play Emote 2 '), +(4488,0, 18, 19, 61,0,100,0, 0, 0,0,0, 15, 6628, 0,0,0,0,0, 7, 0, 0,0,0,0,0,0,'Parqual Fintallas - On Gossip Option 3 Selected - Credit quest 6628 \'Test of Lore\''), +(4488,0, 19, 0, 61,0,100,0, 0, 0,0,0, 81, 3, 0,0,0,0,0, 10, 32022, 4488,0,0,0,0,0,'Parqual Fintallas - On Gossip Option 3 Selected - Set npcflags Gossip & Questgiver'); + +-- conditions showing gossip menu and gossip menu options only when Quest 6628 is active and Mark of Shame is not. +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 14 AND `SourceGroup`= 4764 AND `SourceEntry` IN (5821,5822); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 15 AND `SourceGroup`= 4764 AND `SourceEntry` IN (0,1,2,3); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14, 4764, 5821, 0, 0, 9, 0, 6628, 0, 0, 1, 0, 0, '', 'Show gossip dialog text 5821 if Quest 6628 is NOT taken'), +(14, 4764, 5822, 0, 0, 9, 0, 6628, 0, 0, 0, 0, 0, '', 'Show gossip dialog text 5822 if Quest 6628 is taken (active)'), +(15, 4764, 0, 0, 0, 9, 0, 6628, 0, 0, 0, 0, 0, '', 'Show gossip option 4764 id 0 if Quest 6628 is taken (active)'), +(15, 4764, 1, 0, 0, 9, 0, 6628, 0, 0, 0, 0, 0, '', 'Show gossip option 4764 id 1 if Quest 6628 is taken (active)'), +(15, 4764, 2, 0, 0, 9, 0, 6628, 0, 0, 0, 0, 0, '', 'Show gossip option 4764 id 2 if Quest 6628 is taken (active)'), +(15, 4764, 3, 0, 0, 9, 0, 6628, 0, 0, 0, 0, 0, '', 'Show gossip option 4764 id 3 if Quest 6628 is taken (active)'), +(15, 4764, 0, 0, 0, 1, 0, 6767, 0, 0, 1, 0, 0, '', 'Show gossip option 4764 id 0 if Player does NOT have Aura from spell 6767'), +(15, 4764, 1, 0, 0, 1, 0, 6767, 0, 0, 1, 0, 0, '', 'Show gossip option 4764 id 1 if Player does NOT have Aura from spell 6767'), +(15, 4764, 2, 0, 0, 1, 0, 6767, 0, 0, 1, 0, 0, '', 'Show gossip option 4764 id 2 if Player does NOT have Aura from spell 6767'), +(15, 4764, 3, 0, 0, 1, 0, 6767, 0, 0, 1, 0, 0, '', 'Show gossip option 4764 id 3 if Player does NOT have Aura from spell 6767'); diff --git a/sql/updates/world/2016_01_30_01_world.sql b/sql/updates/world/2016_01_30_01_world.sql new file mode 100644 index 00000000000..c9405c4ee61 --- /dev/null +++ b/sql/updates/world/2016_01_30_01_world.sql @@ -0,0 +1,6 @@ +-- +SET @Guid:=6177; +DELETE FROM `gameobject` WHERE `guid` IN (@Guid+0, @Guid+1); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`) VALUES +(@Guid+0, 201888, 631, 0, 0, 15, 1, 4312.29, 3025.22, 360.518, 2.92954, 0, 0, 0.994384, 0.105829, 604800, 0, 1, 0), +(@Guid+1, 201889, 631, 0, 0, 15, 1, 4403.27, 3027.19, 360.52, 0.0274907, 0, 0, 0.0137449, 0.999906, 604800, 0, 1, 0); diff --git a/sql/updates/world/2016_01_30_02_world.sql b/sql/updates/world/2016_01_30_02_world.sql new file mode 100644 index 00000000000..25325dddd7a --- /dev/null +++ b/sql/updates/world/2016_01_30_02_world.sql @@ -0,0 +1,336 @@ +SET @CGUID := 106855; + +UPDATE `creature_template` SET `unit_flags`=33536 WHERE `entry`=31029; +UPDATE `creature_template` SET `unit_flags`=33088 WHERE `entry`=31016; +UPDATE `creature_template` SET `unit_flags`=768 WHERE `entry`=31083; +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry` IN(31050,31030,31029,31087); +UPDATE `creature_template` SET `unit_flags`=256 WHERE `entry`=31050; +UPDATE `creature_template` SET `unit_flags`=33555200 WHERE `entry`=31077; +UPDATE `creature_template_addon` SET `auras`='0' WHERE `entry`=31083; + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN(4020); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 4020, 0, 0, 31, 0, 3, 31077, 0, 0, 0, 0, '', ''); + +DELETE FROM `creature` WHERE `id`=31077; +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+23 AND `id` IN(31030,31077); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID+0, 31030, 571, 1, 1, 7108.229, 4428.539, 837.9857, 4.782202, 120, 0, 0), -- 31030 (Area: 210) (Auras: 4366 - 4366) (possible waypoints or random movement) +(@CGUID+1, 31030, 571, 1, 1, 7092.146, 4431.81, 836.628, 4.590216, 120, 0, 0), -- 31030 (Area: 210) (Auras: 4366 - 4366) (possible waypoints or random movement) +(@CGUID+2, 31030, 571, 1, 1, 7118.42, 4432.598, 837.9554, 4.869469, 120, 0, 0), -- 31030 (Area: 210) (Auras: 4366 - 4366) (possible waypoints or random movement) +(@CGUID+3, 31030, 571, 1, 1, 7083.883, 4438.466, 834.9834, 4.572762, 120, 0, 0), -- 31030 (Area: 210) (Auras: 4366 - 4366) (possible waypoints or random movement) +(@CGUID+4, 31030, 571, 1, 1, 7111.272, 4445.171, 838.5065, 4.834562, 120, 0, 0), -- 31030 (Area: 210) (Auras: 4366 - 4366) (possible waypoints or random movement) +(@CGUID+5, 31030, 571, 1, 1, 7090.73, 4446.96, 837.0818, 3.402185, 120, 0, 0), -- 31030 (Area: 210) (Auras: 4366 - 4366) +(@CGUID+6, 31077, 571, 1, 1, 7081.854, 4311.559, 871.1456, 0.8552113, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+7, 31077, 571, 1, 1, 7097.221, 4343.909, 871.829, 4.24115, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+8, 31077, 571, 1, 1, 7073.036, 4321.123, 871.2318, 4.118977, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+9, 31077, 571, 1, 1, 7058.097, 4318.563, 871.0363, 2.216568, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+10, 31077, 571, 1, 1, 7069.263, 4307.413, 870.969, 3.769911, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+11, 31077, 571, 1, 1, 7091.653, 4324.766, 871.4558, 6.161012, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+12, 31077, 571, 1, 1, 7105.507, 4331.751, 871.8961, 5.270895, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+13, 31077, 571, 1, 1, 7081.499, 4355.459, 871.8806, 3.089233, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+14, 31077, 571, 1, 1, 7107.956, 4349.756, 872.166, 3.316126, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+15, 31077, 571, 1, 1, 7060.825, 4333.478, 871.3121, 2.565634, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+16, 31077, 571, 1, 1, 7077.684, 4338.44, 871.5625, 1.710423, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+17, 31077, 571, 1, 1, 7103.35, 4365.286, 872.2496, 2.792527, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+18, 31077, 571, 1, 1, 7069.498, 4374.775, 872.0762, 3.700098, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+19, 31077, 571, 1, 1, 7056.396, 4366.188, 871.9349, 4.415683, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+20, 31077, 571, 1, 1, 7088.755, 4385.249, 872.4426, 0.4014257, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+21, 31077, 571, 1, 1, 7084.891, 4370.708, 872.1652, 3.525565, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+22, 31077, 571, 1, 1, 7065.018, 4353.726, 871.6901, 5.899213, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+23, 31077, 571, 1, 1, 7048.843, 4346.518, 871.6175, 2.984513, 120, 0, 0); -- 31077 (Area: 210) + +DELETE FROM `vehicle_template_accessory` WHERE `entry`=31050; +INSERT INTO `vehicle_template_accessory` (`entry`, `accessory_entry`, `seat_id`, `minion`, `description`, `summontype`, `summontimer`) VALUES +(31050, 31016, 0, 0, '31050 - 31016', 6, 30000); -- 31050 - 31016 + +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=31050; +INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES +(31050, 46598, 1, 0); + +DELETE FROM `spell_group` WHERE `id`=4307; + +DELETE FROM `spell_group_stack_rules` WHERE `group_id`=4307; + +DELETE FROM `creature_addon` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+5; +INSERT INTO `creature_addon` (`guid`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(@CGUID+0, 26882, 0x3000000, 0x1, '4366'), -- 31030 - 4366 - 4366 0xF130793600719D57 +(@CGUID+1, 26882, 0x3000000, 0x1, '4366'), -- 31030 - 4366 - 4366 0xF130793600719D58 +(@CGUID+2, 26882, 0x3000000, 0x1, '4366'), -- 31030 - 4366 - 4366 0xF130793600719D59 +(@CGUID+3, 26882, 0x3000000, 0x1, '4366'), -- 31030 - 4366 - 4366 0xF130793600719D5A +(@CGUID+4, 26882, 0x3000000, 0x1, '4366'), -- 31030 - 4366 - 4366 0xF130793600719D5B +(@CGUID+5, 26882, 0x3000000, 0x1, '4366'); -- 31030 - 4366 - 4366 0xF130793600719D5C + +DELETE FROM `creature_template_addon` WHERE `entry` IN(31016,31083,31029,31050); +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(31016, 0, 0x0, 0x1, '61081'), -- 31016 - 61081 +(31083, 0, 0x0, 0x1, '34427'), -- 31083 - 34427 +(31029, 0, 0x3000000, 0x1, '58102'), -- 31029 - 58102 +(31050, 0, 0x3000000, 0x1, ''); -- 31050 - 4366 + +DELETE FROM `event_scripts` WHERE `id`=20108; +INSERT INTO `event_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES +(20108,0,10,31029,1800000,0,7116.824,4308.362,883.3842,2.46227), -- Possessed Vardmadra 0xF130793500719D55 +(20108,0,16,14969,0,0,0,0,0,0); + +UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=193028; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`IN(31016,31029,31030,31050,31083,31087,31077); +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`IN(31016,31029,31030,31050,31083,31087,31077); +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` BETWEEN -@CGUID-5 AND -@CGUID-0; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`IN(3105000,3105001,3101600,3108300,3108301,19302800); +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`IN(193028); + +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 +(31077, 0, 0, 0, 8, 0, 100, 0, 4020, 0, 0, 0, 11, 4307, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrangs Chill target - On Spell Hit Safirdrangs Chill - Cast Safirdrangs Chill'), +(31077, 0, 1, 2, 25, 0, 100, 0, 0, 0, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrangs Chill target - On Reset - Set Unit Flags'), +(31077, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 2, 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrangs Chill target - On Reset - Set Faction'), +(193028, 1, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 32, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'War Horn of Jotunheim - On Data Set - Reset Go'), +(31083, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 80, 3108300, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - On Just Summoned Run Script'), +(31083, 0, 1, 0, 38, 0, 100, 0, 1, 1, 0, 0, 53, 0, 3108300, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - On Data Set - Start WP (Path 2)'), +(31083, 0, 2, 0, 40, 0, 100, 0, 1, 3108300, 0, 0, 80, 3108301, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - On Reached WP1 (Path 2) - Run Script 2'), +(31083, 0, 3, 0, 40, 0, 100, 0, 4, 31083, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 4.468043, 'The Lich King - On Reached WP4 (Path 1) - Set Orientation'), +(31083, 0, 4, 5, 40, 0, 100, 0, 2, 31083, 0, 0, 54, 35600, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - On Reached WP2 (Path 1) - Set Pause WP'), +(31083, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'The Lich King - On Reached WP2 (Path 1) - Face Possessed Vardmadra'), +(3108300, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 11, 34427, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Cast Ethereal Teleport'), +(3108300, 9, 1, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 45, 3, 3, 0, 0, 0, 0, 10, @CGUID+0, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script - Despawn Balargarde Elite'), +(3108300, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 3, 3, 0, 0, 0, 0, 10, @CGUID+1, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script - Despawn Balargarde Elite'), +(3108300, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 3, 3, 0, 0, 0, 0, 10, @CGUID+2, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script - Despawn Balargarde Elite'), +(3108300, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 3, 3, 0, 0, 0, 0, 10, @CGUID+3, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script - Despawn Balargarde Elite'), +(3108300, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 3, 3, 0, 0, 0, 0, 10, @CGUID+4, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script - Despawn Balargarde Elite'), +(3108300, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 3, 3, 0, 0, 0, 0, 10, @CGUID+5, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script - Despawn Balargarde Elite'), +(3108300, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 53274, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Cast Icebound Visage'), +(3108300, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Face Possessed Vardmadra'), +(3108300, 9, 9, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Say Line 0 '), +(3108300, 9, 10, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 45, 3, 3, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Set Data on Possessed Vardmadra'), +(3108300, 9, 11, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Say Line 1 '), +(3108300, 9, 12, 0, 0, 0, 100, 0, 0, 0, 0, 0, 53, 0, 31083, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Start WP '), +(3108300, 9, 13, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Say Line 2 on Possessed Vardmadra '), +(3108300, 9, 14, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Say Line 2 '), +(3108300, 9, 15, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 11, 42904, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Cast Cosmetic - Combat Special Attack 2H (Whirlwind SFX) '), +(3108300, 9, 16, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Set Data on Possessed Vardmadra '), +(3108300, 9, 17, 0, 0, 0, 100, 0, 600, 600, 0, 0, 45, 5, 5, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Set Data on Possessed Vardmadra '), +(3108300, 9, 18, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 4, 15714, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Play sound 15714'), +(3108300, 9, 19, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Say Line 3 '), +(3108300, 9, 20, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 31016, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Face Overthane Balargarde <Master of Jotunheim>'), +(3108300, 9, 21, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 19, 31016, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Say Line 6 on Overthane Balargarde <Master of Jotunheim> '), +(3108300, 9, 22, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Say Line 4 '), +(3108300, 9, 23, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 19, 31016, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Say Line 7 on Overthane Balargarde <Master of Jotunheim> '), +(3108300, 9, 24, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 45, 3, 3, 0, 0, 0, 0, 19, 31016, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Set Data on Overthane Balargarde <Master of Jotunheim> '), +(3108301, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 4, 4, 0, 0, 0, 0, 19, 31050, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Set Data on Safirdrang '), +(3108301, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Face Player'), +(3108301, 9, 2, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Say Line 5'), +(3108301, 9, 3, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Say Line 6'), +(3108301, 9, 4, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 11, 34427, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Cast Ethereal Teleport'), +(3108301, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+0, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Despawn Balargarde Elite'), +(3108301, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+1, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Despawn Balargarde Elite'), +(3108301, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+2, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Despawn Balargarde Elite'), +(3108301, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+3, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Despawn Balargarde Elite'), +(3108301, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+4, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Despawn Balargarde Elite'), +(3108301, 9, 10, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+5, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Despawn Balargarde Elite'), +(3108301, 9, 11, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 31050, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Despawn Safirdrang'), +(3108301, 9, 12, 0, 0, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 31087, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Despawn Lady Nightswood'), +(3108301, 9, 13, 0, 0, 0, 100, 0, 0, 0, 0, 0, 41, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Despawn'), +(31087, 0, 0, 0, 1, 0, 100, 1, 20000, 20000, 0, 0, 53, 1, 31087, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Nightswood - OOC (No repeat) - Start WP'), +(31087, 0, 1, 0, 40, 0, 100, 0, 3, 31087, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Nightswood - On Reached WP3 - Despawn'), +(31087, 0, 2, 0, 54, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Lady Nightswood - On Just Summoned - Face The Lich King'), +(31016, 0, 1, 2, 38, 0, 100, 0, 1, 1, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Data Set - Remove Flags Immune to PC'), +(31016, 0, 2, 3, 61, 0, 100, 0, 1, 1, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Data Set - Set Home Position'), +(31016, 0, 3, 0, 61, 0, 100, 0, 1, 1, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Data Set - Start Attack'), +(31016, 0, 4, 18, 4, 0, 100, 0, 0, 0, 0, 0, 42, 0, 49, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Agro - Set Invincibility HP'), +(31016, 0, 5, 6, 7, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 31050, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Evade - Set Data Safirdrang'), +(31016, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+0, 31030, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Evade - Set Data Balargarde Elite'), +(31016, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+1, 31030, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Evade - Set Data Balargarde Elite'), +(31016, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+2, 31030, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Evade - Set Data Balargarde Elite'), +(31016, 0, 9, 10, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+3, 31030, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Evade - Set Data Balargarde Elite'), +(31016, 0, 10, 11, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+4, 31030, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Evade - Set Data Balargarde Elite'), +(31016, 0, 11, 12, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+5, 31030, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Evade - Set Data Balargarde Elite'), +(31016, 0, 12, 22, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Evade - Despawn'), +(31016, 0, 13, 0, 38, 0, 100, 0, 2, 2, 0, 0, 28, 4366, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Data Set - Set Visible'), +(31016,0,14,0,0,3,100,0,20000,30000,25000,32000,11,60108,0,0,0,0,0,5,0,0,0,0,0,0,0,"Overthane Balargarde - In Combat (Phase 1 & 2) - Cast 'Heroic Leap'"), +(31016,0,15,0,9,3,100,0,0,5,60000,90000,11,61076,0,0,0,0,0,1,0,0,0,0,0,0,0,"Overthane Balargarde - On Range (Phase 1 & 2) - Cast 'Whirlwind'"), +(31016,0,16,0,0,3,100,0,20000,25000,25000,30000,11,15043,0,0,0,0,0,2,0,0,0,0,0,0,0,"Overthane Balargarde - In Combat (Phase 1 & 2) - Cast 'Frostbolt'"), +(31016,0,17,0,0,3,100,0,15000,25000,25000,35000,11,61085,0,0,0,0,0,5,0,0,0,0,0,0,0,"Overthane Balargarde - In Combat (Phase 1 & 2) - Cast 'Blizzard'"), +(31016, 0, 18, 0, 61, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Agro - Set Phase 1'), +(31016, 0, 19, 20, 2, 0, 100, 1, 0, 80, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - At 80% HP - Say Line 4'), +(31016, 0, 20, 0, 61, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - At 80% HP - Set Phase 2'), +(31016, 0, 21, 0, 2, 0, 100, 1, 0, 50, 0, 0, 80, 3101600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - At 50% HP - Run Script'), +(31016, 0, 22, 28, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Agro - Set Phase 1'), +(31016, 0, 23, 24, 38, 0, 100, 0, 3, 3, 0, 0, 20, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Data Set - Enable Attack'), +(31016, 0, 24, 25, 61, 0, 100, 0, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Data Set - Enable Comabt Movement'), +(31016, 0, 25, 26, 61, 0, 100, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Data Set - Turn Invincebility HP Off'), +(31016, 0, 26, 33, 61, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Data Set - Set Phase 1'), +(31016, 0, 27, 29, 6, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Death - Set Data on the Lich King'), +(31016, 0, 28, 29, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 31087, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Agro - Set Phase 1'), +(31016, 0, 29, 32, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 14, 62011, 193028, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Link - Set Data on War Horn of Jotunheim'), +(31016,0,31,0,0,2,100,0,3000,5000,13000,14000,45,3,3,0,0,0,0,19,31050,0,0,0,0,0,0,"Overthane Balargarde - In Combat (Phase 2) - Set Data on Safirdrang"), +(31016, 0, 32, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Agro - Set Phase 1'), +(31016, 0, 33, 0, 61, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Script - Remove Bytes 1'), +(31016, 0, 34, 0, 0, 4, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - IC (Phase 3) - Face the Lich King'), +(3101600, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Script - Set Phase 3'), +(3101600, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Script - Stop Attack'), +(3101600, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Script - Disable Combat Movement'), +(3101600, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Script - Say Line 5'), +(3101600, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 31083, 8, 0, 0, 0, 0, 8, 0, 0, 0, 7088.768, 4385.59, 872.4484, 4.468043, 'Overthane Balargarde <Master of Jotunheim> - Script - Summon The Lich King'), +(3101600, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 18, 33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Script - Add Unit Flags UNIT_FLAG_NOT_SELECTABLE'), +(3101600, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Script - Set Bytes 1'), +(3101600, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Script - Face the Lich King'), +(3101600, 9, 8, 0, 0, 0, 100, 0, 100, 100, 0, 0, 19, 33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Script - Remove Unit Flags UNIT_FLAG_NOT_SELECTABLE'), +(31029, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 53, 1, 31029, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Just Summoned - Start WP'), +(31029, 0, 1, 2, 40, 0, 100, 0, 4, 31029, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, @CGUID+0, 31030, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Reached WP4 - Set Data Balargarde Elite'), +(31029, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, @CGUID+1, 31030, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Reached WP4 - Set Data Balargarde Elite'), +(31029, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, @CGUID+2, 31030, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Reached WP4 - Set Data Balargarde Elite'), +(31029, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, @CGUID+3, 31030, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Reached WP4 - Set Data Balargarde Elite'), +(31029, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, @CGUID+4, 31030, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Reached WP4 - Set Data Balargarde Elite'), +(31029, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, @CGUID+5, 31030, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Reached WP4 - Set Data Balargarde Elite'), +(31029, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 31016, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Just Summoned - Set Data Balargarde Elite'), +(31029, 0, 8, 0, 61, 0, 100, 0, 0, 0, 0, 0, 12, 31050, 8, 0, 0, 0, 0, 8, 0, 0, 0, 7097.292,4416.581,831.8486,4.485496, 'Possessed Vardmadra - On Data Set - Start WP Path 2'), +(31029, 0, 9, 10, 38, 0, 100, 0, 1, 1, 0, 0, 11, 58359, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Data Set - Cast Banshees Revenge: Summon Lady Nightswood'), +(31029, 0, 10, 16, 61, 0, 100, 0, 0, 0, 0, 0, 11, 51744, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Data Set - Cast Suicide (No Log)'), +(31029, 0, 12, 13, 38, 0, 100, 0, 3, 3, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Data Set - Set Bytes 1'), +(31029, 0, 13, 14, 61, 0, 100, 0, 0, 0, 0, 0, 53, 1, 3102900, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Data Set - Start WP (Path 2)'), +(31029, 0, 14, 0, 61, 0, 100, 0, 0, 0, 0, 0, 60, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Data Set - Turn Fly Off'), +(31029, 0, 15, 0, 40, 0, 100, 0, 4, 31029, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Reached WP4 - Say Line 0'), +(31029, 0, 16, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 15000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Data Set - Despawn after 15 seconds'), +(31029, 0, 17, 0, 38, 0, 100, 0, 5, 5, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Data Set - Say Line 3'), +(31050, 0, 0, 3, 54, 0, 100, 0, 0, 0, 0, 0, 53, 1, 31050, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrang - On Data Set - Start WP'), +(31050, 0, 1, 0, 40, 0, 100, 0, 6, 31050, 0, 0, 80, 3105000, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrang - On Reached WP6 - Run Script'), +(31050, 0, 2, 0, 38, 0, 100, 0, 2, 2, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrang - On Data Set - Despawn'), +(31050, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 28, 4366, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrang - On Data Set - Set Visible'), +(31050, 0, 4, 0, 38, 0, 100, 0, 3, 3, 0, 0, 80, 3105001, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrang - On Data Set - Run Script'), +(31050, 0, 5, 0, 38, 0, 100, 0, 4, 4, 0, 0, 53, 1, 3105000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrang - On Data Set - Start WP (Path 2)'), +(31050, 0, 6, 0, 40, 0, 100, 0, 4, 3105000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrang - On Reached WP4 (Path 2) - Despawn'), +(3105001, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script 2 - Face Player'), +(3105001, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 4020, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script 2 - Cast Safirdrangs Chill'), +(3105001, 9, 2, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 66, 0, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script 2 - Face Player'), +(3105000, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 31016, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script - Say Line 1 on Overthane Balargarde'), -- 20:05:22.766 +(3105000, 9, 1, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script - Say Line 1 on Possessed Vardmadra'), -- 20:05:28.375 +(3105000, 9, 2, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 31016, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script - Say Line 2 on Overthane Balargarde'), -- 20:05:34.422 +(3105000, 9, 3, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 19, 31016, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script - Say Line 3 on Overthane Balargarde'), -- 20:05:40.828 +(3105000, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 28, 46598, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script - Eject Overthane Balargarde'), -- 20:05:22.766 +(3105000, 9, 5, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 31016, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script - Eject Overthane Balargarde'), -- 20:05:22.766 +(3105000, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script - Set Home Position'), -- 20:05:22.766 +(-@CGUID-0, 0, 0, 3, 38, 0, 100, 0, 1, 1, 0, 0, 53, 1, 3103001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Start WP'), +(-@CGUID-1, 0, 0, 3, 38, 0, 100, 0, 1, 1, 0, 0, 53, 1, 3103002, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Start WP'), +(-@CGUID-2, 0, 0, 3, 38, 0, 100, 0, 1, 1, 0, 0, 53, 1, 3103003, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Start WP'), +(-@CGUID-3, 0, 0, 3, 38, 0, 100, 0, 1, 1, 0, 0, 53, 1, 3103004, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Start WP'), +(-@CGUID-4, 0, 0, 3, 38, 0, 100, 0, 1, 1, 0, 0, 53, 1, 3103005, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Start WP'), +(-@CGUID-5, 0, 0, 3, 38, 0, 100, 0, 1, 1, 0, 0, 53, 1, 3103006, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Start WP'), +(-@CGUID-0, 0, 1, 0, 40, 0, 100, 0, 5, 3103001, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Reached WP5 - Set Phase 1'), +(-@CGUID-1, 0, 1, 0, 40, 0, 100, 0, 5, 3103002, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Reached WP5 - Set Phase 1'), +(-@CGUID-2, 0, 1, 0, 40, 0, 100, 0, 5, 3103003, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Reached WP5 - Set Phase 1'), +(-@CGUID-3, 0, 1, 0, 40, 0, 100, 0, 6, 3103004, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Reached WP6 - Set Phase 1'), +(-@CGUID-4, 0, 1, 0, 40, 0, 100, 0, 5, 3103005, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Reached WP5 - Set Phase 1'), +(-@CGUID-5, 0, 1, 0, 40, 0, 100, 0, 8, 3103006, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Reached WP8 - Set Phase 1'), +(-@CGUID-0, 0, 2, 0, 38, 0, 100, 0, 2, 2, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Evade'), +(-@CGUID-1, 0, 2, 0, 38, 0, 100, 0, 2, 2, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Evade'), +(-@CGUID-2, 0, 2, 0, 38, 0, 100, 0, 2, 2, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Evade'), +(-@CGUID-3, 0, 2, 0, 38, 0, 100, 0, 2, 2, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Evade'), +(-@CGUID-4, 0, 2, 0, 38, 0, 100, 0, 2, 2, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Evade'), +(-@CGUID-5, 0, 2, 0, 38, 0, 100, 0, 2, 2, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Evade'), +(-@CGUID-0, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 28, 4366, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Remove Aura'), +(-@CGUID-1, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 28, 4366, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Remove Aura'), +(-@CGUID-2, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 28, 4366, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Remove Aura'), +(-@CGUID-3, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 28, 4366, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Remove Aura'), +(-@CGUID-4, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 28, 4366, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Remove Aura'), +(-@CGUID-5, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 28, 4366, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Remove Aura'), +(-@CGUID-0, 0, 4, 0, 38, 0, 100, 0, 3, 3, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Set Phase 2'), +(-@CGUID-1, 0, 4, 0, 38, 0, 100, 0, 3, 3, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Set Phase 2'), +(-@CGUID-2, 0, 4, 0, 38, 0, 100, 0, 3, 3, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Set Phase 2'), +(-@CGUID-3, 0, 4, 0, 38, 0, 100, 0, 3, 3, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Set Phase 2'), +(-@CGUID-4, 0, 4, 0, 38, 0, 100, 0, 3, 3, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Set Phase 2'), +(-@CGUID-5, 0, 4, 0, 38, 0, 100, 0, 3, 3, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Set Phase 2'), +(-@CGUID-0, 0, 5, 0, 1, 1, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 1) - Face Possessed Vardmadra'), +(-@CGUID-1, 0, 5, 0, 1, 1, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 1) - Face Possessed Vardmadra'), +(-@CGUID-2, 0, 5, 0, 1, 1, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 1) - Face Possessed Vardmadra'), +(-@CGUID-3, 0, 5, 0, 1, 1, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 1) - Face Possessed Vardmadra'), +(-@CGUID-4, 0, 5, 0, 1, 1, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 1) - Face Possessed Vardmadra'), +(-@CGUID-5, 0, 5, 0, 1, 1, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 1) - Face Possessed Vardmadra'), +(-@CGUID-0, 0, 6, 0, 1, 2, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 2) - Face The Lich King'), +(-@CGUID-1, 0, 6, 0, 1, 2, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 2) - Face The Lich King'), +(-@CGUID-2, 0, 6, 0, 1, 2, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 2) - Face The Lich King'), +(-@CGUID-3, 0, 6, 0, 1, 2, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 2) - Face The Lich King'), +(-@CGUID-4, 0, 6, 0, 1, 2, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 2) - Face The Lich King'), +(-@CGUID-5, 0, 6, 0, 1, 2, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 2) - Face The Lich King'); + +-- Texts +DELETE FROM `creature_text` WHERE `entry` IN(31016,31029,31083); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `comment`) VALUES +(31016, 1, 0, 'You dare to challenge me? You haven''t earned the right!', 14, 0, 100, 25, 0, 15633, 31597, 'Overthane Balargarde to Safirdrang'), +(31016, 2, 0, 'Vardmadra?! Did the Lich King send you personally?', 14, 0, 100, 66, 0, 15634, 31599, 'Overthane Balargarde to Possessed Vardmadra'), +(31016, 3, 0, 'Very well. I will dispatch these creatures. It is only an inconvenience. Prepare to die!', 14, 0, 100, 0, 0, 15635, 31600, 'Overthane Balargarde to Possessed Vardmadra'), +(31016, 4, 0, 'Safirdrang, let them feel the chill of Icecrown!', 14, 0, 100, 0, 0, 15636, 31601, 'Overthane Balargarde to 0'), +(31016, 5, 0, 'STOP! Kneel you fools, it''s the Lich King!', 14, 0, 100, 0, 0, 15637, 31627, 'Overthane Balargarde to The Lich King'), +(31016, 6, 0, 'But, my lord...?', 14, 0, 100, 0, 0, 15638, 31635, 'Overthane Balargarde to The Lich King'), +(31016, 7, 0, 'DIE DOGS!', 14, 0, 100, 0, 0, 15639, 31637, 'Overthane Balargarde to The Lich King'), +(31029, 0, 0, 'He''s on his way!', 14, 0, 100, 457, 0, 15643, 31595, 'Possessed Vardmadra to Player'), +(31029, 1, 0, 'Wrong, Balargarde. You WILL accept this challenge!', 14, 0, 100, 457, 0, 15644, 31598, 'Possessed Vardmadra to Overthane Balargarde'), +(31029, 2, 0, 'My lord.', 14, 0, 100, 457, 0, 15645, 31631, 'Possessed Vardmadra to The Lich King'), +(31029, 3, 0, 'But...!', 14, 0, 100, 0, 0, 15646, 31633, 'Possessed Vardmadra to The Lich King'), +(31083, 0, 0, 'Honor guard stay where you are.', 14, 0, 100, 1, 0, 15600, 31628, 'The Lich King to 0'), +(31083, 1, 0, 'Vardmadra. I''d wondered where you disappeared to. How is Iskalder?', 14, 0, 100, 6, 0, 15601, 31629, 'The Lich King to 0'), +(31083, 2, 0, 'I see through your disguise, Lady Nightswood. YOU THINK THAT YOU CAN FOOL ME?!', 14, 0, 100, 5, 0, 15602, 31632, 'The Lich King to 0'), +(31083, 3, 0, 'You may continue your combat, overthane.', 14, 0, 100, 25, 0, 15603, 31634, 'The Lich King to 0'), +(31083, 4, 0, 'But nothing! Finish them! DO NOT FAIL ME, BALARGARDE!', 14, 0, 100, 5, 0, 15604, 31636, 'The Lich King to Overthane Balargarde'), +(31083, 5, 0, 'You have bested one of my finest, but your efforts are for naught.', 14, 0, 100, 1, 0, 15605, 31693, 'The Lich King to 0'), +(31083, 6, 0, 'The frozen heart of Icecrown awaits....', 14, 0, 100, 1, 0, 15606, 31695, 'The Lich King to 0'); + +-- Waypoints +DELETE FROM `waypoints` WHERE `entry` IN(31029,31050,3103001,3103002,3103003,3103004,3103005,3103006,31087,3105000,31083,3108300,3102900); +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(31029, 1, 7119.714 , 4305.82 , 883.7371, 'Possessed Vardmadra'), +(31029, 2, 7119.045 , 4306.563 , 883.7371, 'Possessed Vardmadra'), +(31029, 3, 7094.592 , 4326.246 , 879.7935, 'Possessed Vardmadra'), +(31029, 4, 7094.592 , 4326.246 , 879.7935, 'Possessed Vardmadra'), +(3102900, 1, 7094.592, 4326.246, 871.4232, 'Possessed Vardmadra (Path 2)'), +(31087, 1, 7079.599, 4301.017, 874.3533, 'Lady Nightswood'), +(31087, 2, 7082.374, 4283.685, 878.2528, 'Lady Nightswood'), +(31087, 3, 7093.269, 4251.247, 855.1418, 'Lady Nightswood'), +(31050, 1, 7097.518 ,4417.555 ,831.8486, 'Safirdrang'), +(31050, 2, 7097.292 ,4416.581 ,831.8486, 'Safirdrang'), +(31050, 3, 7097.876 ,4416.293 ,832.2352, 'Safirdrang'), +(31050, 4, 7096.67 ,4412.85 ,892.0963, 'Safirdrang'), +(31050, 5, 7083.72 ,4365.534 ,886.1511, 'Safirdrang'), +(31050, 6, 7083.72 ,4365.534 ,886.1511, 'Safirdrang'), +(3105000, 1, 7053.937, 4377.317, 901.5513, 'Safirdrang (Path 2)'), +(3105000, 2, 7020.913, 4415.733, 938.7733, 'Safirdrang (Path 2)'), +(3105000, 3, 7014.491, 4475.228, 933.1346, 'Safirdrang (Path 2)'), +(3105000, 4, 7053.163, 4507.731, 899.1902, 'Safirdrang (Path 2)'), +(3103001, 1, 7108.212 ,4429.457 ,837.8948, 'Balargarde Elite Path 1'), +(3103001, 2, 7108.282 ,4428.459 ,837.8948, 'Balargarde Elite Path 1'), +(3103001, 3, 7106.677 ,4418.644 ,890.2556, 'Balargarde Elite Path 1'), +(3103001, 4, 7105.132 ,4316.933 ,890.2556, 'Balargarde Elite Path 1'), +(3103001, 5, 7105.132 ,4316.933 ,890.2556, 'Balargarde Elite Path 1'), +(3103002, 1, 7092.335 ,4432.937 ,836.562, 'Balargarde Elite Path 2'), +(3103002, 2, 7092.213 ,4431.944 ,836.562, 'Balargarde Elite Path 2'), +(3103002, 3, 7088.707 ,4422.627 ,890.4507, 'Balargarde Elite Path 2'), +(3103002, 4, 7042.402 ,4334.195 ,890.4507, 'Balargarde Elite Path 2'), +(3103002, 5, 7042.402 ,4334.195 ,890.4507, 'Balargarde Elite Path 2'), +(3103003, 1, 7118.292 ,4433.163 ,837.6826, 'Balargarde Elite Path 3'), +(3103003, 2, 7118.448 ,4432.175 ,837.6826, 'Balargarde Elite Path 3'), +(3103003, 3, 7118.339 ,4415.652 ,891.2397, 'Balargarde Elite Path 3'), +(3103003, 4, 7116.423 ,4360.689 ,891.2397, 'Balargarde Elite Path 3'), +(3103003, 5, 7116.423 ,4360.689 ,891.2397, 'Balargarde Elite Path 3'), +(3103004, 1, 7084.022 ,4439.456 ,834.9834, 'Balargarde Elite Path 4'), +(3103004, 2, 7083.883 ,4438.466 ,834.9834, 'Balargarde Elite Path 4'), +(3103004, 3, 7084.125 ,4439.286 ,835.0841, 'Balargarde Elite Path 4'), +(3103004, 4, 7078.116 ,4422.103 ,891.0005, 'Balargarde Elite Path 4'), +(3103004, 5, 7052.648 ,4376.112 ,891.0005, 'Balargarde Elite Path 4'), +(3103004, 6, 7052.648 ,4376.112 ,891.0005, 'Balargarde Elite Path 4'), +(3103005, 1, 7111.17 ,4446.118 ,838.3093, 'Balargarde Elite Path 5'), +(3103005, 2, 7111.292 ,4445.125 ,838.3093, 'Balargarde Elite Path 5'), +(3103005, 3, 7097.193 ,4415.753 ,886.4199, 'Balargarde Elite Path 5'), +(3103005, 4, 7091.205 ,4393.473 ,886.4199, 'Balargarde Elite Path 5'), +(3103005, 5, 7091.205 ,4393.473 ,886.4199, 'Balargarde Elite Path 5'), +(3103006, 1, 7095.478 ,4449.356 ,836.9002, 'Balargarde Elite Path 6'), +(3103006, 2, 7095.443 ,4448.357 ,836.9002, 'Balargarde Elite Path 6'), +(3103006, 3, 7052.521 ,4434.108 ,838.8722, 'Balargarde Elite Path 6'), +(3103006, 4, 7003.175 ,4398.929 ,844.0392, 'Balargarde Elite Path 6'), +(3103006, 5, 6988.518 ,4335.11 ,856.9001, 'Balargarde Elite Path 6'), +(3103006, 6, 7018.119 ,4279.629 ,875.7885, 'Balargarde Elite Path 6'), +(3103006, 7, 7067.475 ,4300.513 ,892.5076, 'Balargarde Elite Path 6'), +(3103006, 8, 7067.475 ,4300.513 ,892.5076, 'Balargarde Elite Path 6'), +(31083, 1, 7092.936, 4343.906, 871.9753, 'The Lich King'), +(31083, 2, 7094.104, 4331.222, 871.5023, 'The Lich King'), +(31083, 3, 7092.936, 4343.906, 871.9331, 'The Lich King'), +(31083, 4, 7088.768, 4385.59, 872.3639, 'The Lich King'), +(3108300, 1, 7091.374, 4344.362, 871.9679, 'The Lich King Path 2'); diff --git a/sql/updates/world/2016_01_30_03_world.sql b/sql/updates/world/2016_01_30_03_world.sql new file mode 100644 index 00000000000..06c4b0826c0 --- /dev/null +++ b/sql/updates/world/2016_01_30_03_world.sql @@ -0,0 +1,136 @@ +-- Pathing for Bloodcursed Naga Entry: 17713 'TDB FORMAT' +SET @NPC := 63485; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-1928.789,`position_y`=-12869.43,`position_z`=86.3521 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-1928.789,-12869.43,86.3521,0,0,0,0,100,0), -- 09:15:24 +(@PATH,2,-1926.808,-12868.42,86.50182,0,0,0,0,100,0), -- 09:15:32 +(@PATH,3,-1915.362,-12863.29,87.48274,0,0,0,0,100,0), -- 09:15:37 +(@PATH,4,-1895.262,-12862.47,87.17763,0,0,0,0,100,0), -- 09:15:44 +(@PATH,5,-1888.151,-12870.06,85.72816,0,0,0,0,100,0), -- 09:15:50 +(@PATH,6,-1881.628,-12885.19,81.05202,0,0,0,0,100,0), -- 09:15:58 +(@PATH,7,-1882.931,-12895.07,76.1616,0,0,0,0,100,0), -- 09:16:03 +(@PATH,8,-1896.266,-12915.07,69.35283,0,0,0,0,100,0), -- 09:16:13 +(@PATH,9,-1908.279,-12924.68,66.72368,0,0,0,0,100,0), -- 09:16:19 +(@PATH,10,-1933.388,-12933.09,64.4604,0,0,0,0,100,0), -- 09:16:28 +(@PATH,11,-1947.921,-12933.25,61.58389,0,0,0,0,100,0), -- 09:16:36 +(@PATH,12,-1964.046,-12931.37,54.13368,0,0,0,0,100,0), -- 09:16:45 +(@PATH,13,-1985.971,-12921.06,46.1943,0,0,0,0,100,0), -- 09:16:54 +(@PATH,14,-2008.113,-12899.47,43.04699,0,0,0,0,100,0), -- 09:17:06 +(@PATH,15,-2009.894,-12861.36,40.86951,0,0,0,0,100,0), -- 09:17:15 +(@PATH,16,-2002.674,-12851.02,38.75832,0,0,0,0,100,0), -- 09:17:26 +(@PATH,17,-1982.862,-12829.53,35.24951,0,0,0,0,100,0), -- 09:17:38 +(@PATH,18,-1963.942,-12804.68,29.6003,0,0,0,0,100,0), -- 09:17:50 +(@PATH,19,-1947.879,-12792.53,25.92624,0,0,0,0,100,0), -- 09:18:00 +(@PATH,20,-1936.599,-12789.01,24.07749,0,0,0,0,100,0), -- 09:18:06 +(@PATH,21,-1922.057,-12789.15,21.28288,0,0,0,0,100,0), -- 09:18:15 +(@PATH,22,-1919.057,-12789.16,20.79777,0,0,0,0,100,0), -- 09:18:16 +(@PATH,23,-1910.856,-12787.78,18.40594,0,0,0,0,100,0), -- 09:18:17 +(@PATH,24,-1865.516,-12783.02,8.171058,0,0,0,0,100,0), -- 09:18:33 +(@PATH,25,-1828.088,-12780.68,5.281821,0,0,0,0,100,0), -- 09:18:47 +(@PATH,26,-1821.925,-12778.83,4.372193,0,0,0,0,100,0), -- 09:18:55 +(@PATH,27,-1808.465,-12775.22,3.311753,0,0,0,0,100,0), -- 09:19:11 +(@PATH,28,-1840.72,-12785.45,6.14157,0,0,0,0,100,0), -- 09:19:26 +(@PATH,29,-1857.858,-12783.72,7.100934,0,0,0,0,100,0), -- 09:19:32 +(@PATH,30,-1882.401,-12782.23,10.96099,0,0,0,0,100,0), -- 09:19:47 +(@PATH,31,-1918.945,-12788.79,20.91866,0,0,0,0,100,0), -- 09:20:03 +(@PATH,32,-1946.804,-12792.22,25.9647,0,0,0,0,100,0), -- 09:20:12 +(@PATH,33,-1957.95,-12798.83,28.51275,0,0,0,0,100,0), -- 09:20:18 +(@PATH,34,-1972.832,-12814.32,31.96672,0,0,0,0,100,0), -- 09:20:28 +(@PATH,35,-1998.71,-12847.28,38.17815,0,0,0,0,100,0), -- 09:20:41 +(@PATH,36,-2010.876,-12865.39,41.37553,0,0,0,0,100,0), -- 09:20:52 +(@PATH,37,-2008.604,-12898.32,42.78571,0,0,0,0,100,0), -- 09:21:03 +(@PATH,38,-1999.134,-12909.23,44.42824,0,0,0,0,100,0), -- 09:21:12 +(@PATH,39,-1977.069,-12925.9,48.62286,0,0,0,0,100,0), -- 09:21:25 +(@PATH,40,-1960.811,-12931.79,56.09935,0,0,0,0,100,0), -- 09:21:34 +(@PATH,41,-1938.755,-12933.6,63.95058,0,0,0,0,100,0), -- 09:21:43 +(@PATH,42,-1901.555,-12919.94,68.1657,0,0,0,0,100,0), -- 09:21:59 +(@PATH,43,-1892.329,-12910.31,70.69868,0,0,0,0,100,0), -- 09:22:05 +(@PATH,44,-1881.857,-12893.26,77.24239,0,0,0,0,100,0), -- 09:22:15 +(@PATH,45,-1882.775,-12878.57,83.94725,0,0,0,0,100,0), -- 09:22:21 +(@PATH,46,-1903.748,-12860.37,87.55596,0,0,0,0,100,0), -- 09:22:30 +(@PATH,47,-1921.45,-12865.49,86.99675,0,0,0,0,100,0), -- 09:22:34 +(@PATH,48,-1928.858,-12869.55,86.33754,0,0,0,0,100,0); -- 09:22:43 +-- 0x1C09E44240114C4000002500002C696C .go -1928.789 -12869.43 86.3521 + +-- Pathing for Bloodcursed Naga Entry: 17713 'TDB FORMAT' +SET @NPC := 63492; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-1796.121,`position_y`=-12771.99,`position_z`=2.181608 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-1796.121,-12771.99,2.181608,0,0,0,0,100,0), -- 09:11:36 +(@PATH,2,-1808.465,-12775.22,3.311753,0,0,0,0,100,0), -- 09:11:53 +(@PATH,3,-1840.747,-12785.32,6.340456,0,0,0,0,100,0), -- 09:12:08 +(@PATH,4,-1857.898,-12783.8,7.071639,0,0,0,0,100,0), -- 09:12:14 +(@PATH,5,-1882.401,-12782.29,10.8823,0,0,0,0,100,0), -- 09:12:29 +(@PATH,6,-1921.118,-12788.98,21.68076,0,0,0,0,100,0), -- 09:12:45 +(@PATH,7,-1946.973,-12792.21,25.87914,0,0,0,0,100,0), -- 09:12:55 +(@PATH,8,-1957.784,-12798.69,28.39876,0,0,0,0,100,0), -- 09:13:01 +(@PATH,9,-1972.893,-12814.4,31.85242,0,0,0,0,100,0), -- 09:13:10 +(@PATH,10,-1998.871,-12847.28,38.12544,0,0,0,0,100,0), -- 09:13:23 +(@PATH,11,-2009.722,-12860.75,40.77156,0,0,0,0,100,0), -- 09:13:34 +(@PATH,12,-2008.599,-12898.46,42.77578,0,0,0,0,100,0), -- 09:13:46 +(@PATH,13,-1998.956,-12909.28,44.34562,0,0,0,0,100,0), -- 09:13:55 +(@PATH,14,-1977.231,-12926.03,48.51125,0,0,0,0,100,0), -- 09:14:07 +(@PATH,15,-1960.969,-12931.87,56.10593,0,0,0,0,100,0), -- 09:14:15 +(@PATH,16,-1938.779,-12933.54,63.8186,0,0,0,0,100,0), -- 09:14:25 +(@PATH,17,-1913.007,-12927.43,66.26051,0,0,0,0,100,0), -- 09:14:34 +(@PATH,18,-1898.97,-12917.32,68.56851,0,0,0,0,100,0), -- 09:14:42 +(@PATH,19,-1893.777,-12912.74,70.14345,0,0,0,0,100,0), -- 09:14:47 +(@PATH,20,-1881.76,-12893.25,77.15878,0,0,0,0,100,0), -- 09:14:57 +(@PATH,21,-1882.529,-12878.56,83.82611,0,0,0,0,100,0), -- 09:15:03 +(@PATH,22,-1903.836,-12860.37,87.51022,0,0,0,0,100,0), -- 09:15:11 +(@PATH,23,-1921.361,-12865.68,87.0482,0,0,0,0,100,0), -- 09:15:17 +(@PATH,24,-1928.789,-12869.43,86.3521,0,0,0,0,100,0), -- 09:15:24 +(@PATH,25,-1926.808,-12868.42,86.50182,0,0,0,0,100,0), -- 09:15:32 +(@PATH,26,-1915.362,-12863.29,87.48274,0,0,0,0,100,0), -- 09:15:37 +(@PATH,27,-1895.262,-12862.47,87.17763,0,0,0,0,100,0), -- 09:15:44 +(@PATH,28,-1888.151,-12870.06,85.72816,0,0,0,0,100,0), -- 09:15:50 +(@PATH,29,-1881.628,-12885.19,81.05202,0,0,0,0,100,0), -- 09:15:58 +(@PATH,30,-1882.931,-12895.07,76.1616,0,0,0,0,100,0), -- 09:16:03 +(@PATH,31,-1896.266,-12915.07,69.35283,0,0,0,0,100,0), -- 09:16:13 +(@PATH,32,-1908.279,-12924.68,66.72368,0,0,0,0,100,0), -- 09:16:19 +(@PATH,33,-1933.388,-12933.09,64.4604,0,0,0,0,100,0), -- 09:16:28 +(@PATH,34,-1947.921,-12933.25,61.58389,0,0,0,0,100,0), -- 09:16:36 +(@PATH,35,-1964.046,-12931.37,54.13368,0,0,0,0,100,0), -- 09:16:45 +(@PATH,36,-1985.971,-12921.06,46.1943,0,0,0,0,100,0), -- 09:16:54 +(@PATH,37,-2008.113,-12899.47,43.04699,0,0,0,0,100,0), -- 09:17:06 +(@PATH,38,-2009.894,-12861.36,40.86951,0,0,0,0,100,0), -- 09:17:15 +(@PATH,39,-2002.674,-12851.02,38.75832,0,0,0,0,100,0), -- 09:17:26 +(@PATH,40,-1982.862,-12829.53,35.24951,0,0,0,0,100,0), -- 09:17:38 +(@PATH,41,-1963.942,-12804.68,29.6003,0,0,0,0,100,0), -- 09:17:50 +(@PATH,42,-1947.879,-12792.53,25.92624,0,0,0,0,100,0), -- 09:18:00 +(@PATH,43,-1936.599,-12789.01,24.07749,0,0,0,0,100,0), -- 09:18:06 +(@PATH,44,-1922.057,-12789.15,21.28288,0,0,0,0,100,0), -- 09:18:15 +(@PATH,45,-1919.057,-12789.16,20.79777,0,0,0,0,100,0), -- 09:18:16 +(@PATH,46,-1910.856,-12787.78,18.40594,0,0,0,0,100,0), -- 09:18:17 +(@PATH,47,-1870.516,-12782.52,8.421058,0,0,0,0,100,0), -- 09:18:33 +(@PATH,48,-1828.088,-12780.68,5.281821,0,0,0,0,100,0), -- 09:18:47 +(@PATH,49,-1821.925,-12778.83,4.372193,0,0,0,0,100,0), -- 09:18:55 +(@PATH,50,-1808.465,-12775.22,3.311753,0,0,0,0,100,0); -- 09:19:11 +-- 0x1C09E44240114C4000002500002C696C .go -1796.121 -12771.99 2.181608 + +-- Bloodcursed Naga SAI +SET @ENTRY := 17713; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,25,0,100,0,0,0,0,0,11,12544,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bloodcursed Naga - On Reset - Cast 'Frost Armor'"); + +-- Pathing for Lord Xiz Entry: 17701 'TDB FORMAT' +SET @NPC := 63448; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-2226.604,`position_y`=-12321.21,`position_z`=57.54912 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-2253.258,-12320.91,57.29495,0,0,0,0,100,0), -- 09:08:14 +(@PATH,2,-2214.95,-12321.52,57.30329,0,0,0,0,100,0); -- 09:08:29 +-- 0x1C09E4424011494000002500002C576E .go -2226.604 -12321.21 57.54912 diff --git a/sql/updates/world/2016_01_30_04_world.sql b/sql/updates/world/2016_01_30_04_world.sql new file mode 100644 index 00000000000..b90e7b95810 --- /dev/null +++ b/sql/updates/world/2016_01_30_04_world.sql @@ -0,0 +1,11 @@ +-- Pathing for Mine Car Entry: 23289 'TDB FORMAT' +SET @NPC := 143599; +SET @PATH := @NPC * 10; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '40684'); + +-- Pathing for Mine Car Entry: 23289 'TDB FORMAT' +SET @NPC := 143600; +SET @PATH := @NPC * 10; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '40684'); diff --git a/sql/updates/world/2016_01_30_05_world.sql b/sql/updates/world/2016_01_30_05_world.sql new file mode 100644 index 00000000000..1e341506dfc --- /dev/null +++ b/sql/updates/world/2016_01_30_05_world.sql @@ -0,0 +1,2 @@ +UPDATE `smart_scripts` SET `event_param1`=60600, `event_param2`=60600 WHERE `entryorguid`=3101600 AND `source_type`=9 AND `id`=8 AND `link`=0; +UPDATE `smart_scripts` SET `action_param1`=2, `comment`='Overthane Balargarde <Master of Jotunheim> - On Data Set - Set Phase 2' WHERE `entryorguid`=31016 AND `source_type`=0 AND `id`=26 AND `link`=33; diff --git a/sql/updates/world/2016_01_31_00_world.sql b/sql/updates/world/2016_01_31_00_world.sql new file mode 100644 index 00000000000..f64d9182784 --- /dev/null +++ b/sql/updates/world/2016_01_31_00_world.sql @@ -0,0 +1,2 @@ +-- fix cyanigosa hitbox +UPDATE `creature_model_info` SET `BoundingRadius`=0.2325, `CombatReach`=6.25 WHERE `DisplayID`=27340; diff --git a/sql/updates/world/2016_02_02_00_world.sql b/sql/updates/world/2016_02_02_00_world.sql new file mode 100644 index 00000000000..ce561af3a61 --- /dev/null +++ b/sql/updates/world/2016_02_02_00_world.sql @@ -0,0 +1,5 @@ +-- Transition some creatures to use new CREATURE_FLAGS_EXTRA_NO_PLAYER_DAMAGE_REQ +-- 27685/27686/27531: Target creatures for Quest 12416 ("Heated Battle") +-- 24051/24063: Target creatures for Quest 11243 ("If Valgarde Falls...") +-- 28034/28035/28036: Targets for Quest 12508 ("Mopping Up") +UPDATE `creature_template` SET `flags_extra`=(`flags_extra`|2097152) WHERE `entry` IN (27685,27686,27531,24051,24063,28034,28035,28036); diff --git a/sql/updates/world/2016_02_02_01_world.sql b/sql/updates/world/2016_02_02_01_world.sql new file mode 100644 index 00000000000..f1b181a29e3 --- /dev/null +++ b/sql/updates/world/2016_02_02_01_world.sql @@ -0,0 +1,4 @@ +-- new gossip_menu for NPC 3678 Disciple of Naralex: +DELETE FROM `gossip_menu_option` WHERE `menu_id`= 201 AND `OptionBroadcastTextID`= 2662; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES +(201, 0, 0, 'Let the event begin!', 2662, 1, 1, 0, 0, 0, 0, '', 0); diff --git a/sql/updates/world/2016_02_04_00_world.sql b/sql/updates/world/2016_02_04_00_world.sql new file mode 100644 index 00000000000..758286544af --- /dev/null +++ b/sql/updates/world/2016_02_04_00_world.sql @@ -0,0 +1,54 @@ +UPDATE `quest_template` SET `AllowableRaces`=1101 WHERE `ID`=11921; +UPDATE `quest_template` SET `AllowableRaces`=690 WHERE `ID`=11926; +UPDATE `quest_template` SET `TimeAllowed`=45 WHERE `ID` IN (11922,11731); +UPDATE `quest_template` SET `TimeAllowed`=90 WHERE `ID` IN (11921,11926); +UPDATE `quest_template_addon` SET `PrevQuestId`=11731 WHERE `ID`=11921; -- More Torch Tossing(A) requires Torch Tossing +UPDATE `quest_template_addon` SET `PrevQuestId`=11922 WHERE `ID`=11926; -- More Torch Tossing(H) requires Torch Tossing +UPDATE `quest_template_addon` SET `PrevQuestId`=11731 WHERE `ID`=11657; -- Torch Catching(A) requires Torch Tossing(A) +UPDATE `quest_template_addon` SET `PrevQuestId`=11922 WHERE `ID`=11923; -- Torch Catching(H) requires Torch Tossing(H) +UPDATE `quest_template_addon` SET `PrevQuestId`=11657 WHERE `ID`=11924; -- More Torch Catching(A) requires Torch Catching +UPDATE `quest_template_addon` SET `PrevQuestId`=11923 WHERE `ID`=11925; -- More Torch Catching(H) requires Torch Catching + +DELETE FROM `creature_queststarter` WHERE `id` IN (26113,25975); +-- Master Flame/Fire Eater SAI +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN (25975,26113); +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`IN (25975,26113); +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 +(25975,0,0,0,19,0,100,0,11731,0,0,0,11,45716,2,0,0,0,0,7,0,0,0,0,0,0,0,'Master Fire Eater - On Quest \'Torch Tossing\' Accepted - Cast \'Torch Tossing Training\''), +(25975,0,1,0,19,0,100,0,11921,0,0,0,11,46630,2,0,0,0,0,7,0,0,0,0,0,0,0,'Master Fire Eater - On Quest \'More Torch Tossing\' Accepted - Cast \'Torch Tossing Practice\''), +(26113,0,0,0,19,0,100,0,11922,0,0,0,11,45716,2,0,0,0,0,7,0,0,0,0,0,0,0,'Master Flame Eater - On Quest \'Torch Tossing\' Accepted - Cast \'Torch Tossing Training\''), +(26113,0,1,0,19,0,100,0,11926,0,0,0,11,46630,2,0,0,0,0,7,0,0,0,0,0,0,0,'Master Flame Eater - On Quest \'More Torch Tossing\' Accepted - Cast \'Torch Tossing Practice\''); + +-- [DNT] Torch Tossing Target Bunny +DELETE FROM `creature_template_addon` WHERE `entry`=25535; +INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(25535,0,0,0,0,0,45720); + +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=25535; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25535; +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 +(25535,0,0,0,8,0,100,0,45732,0,0,0,11,45724,2,0,0,0,0,7,0,0,0,0,0,0,0,'[DNT] Torch Tossing Target Bunny - On Spellhit \'Torch Land\' - Cast \'Brazzier Hit\''); + +-- [DNT] Torch Tossing Target Bunny Controller +UPDATE `creature_template` SET `ScriptName`='npc_torch_tossing_target_bunny_controller' WHERE `entry`=25536; + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (45732); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,45732,0,0,1,0,45723,0,0,0,0,'','Spell \'Torch Toss\' can only hit targets with Aura \'Target Indicator\''); + +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (45719,46651,46630,45723,-46630,45716,-45716); +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES +(45719,-46630,0,'Torch Tossing Success remove Torch Tossing Practice'), +(46651,-45716,0,'Torch Tossing Success remove Torch Tossing Training'), +(46630,45725 ,2,'Torch Tossing Practice trigger Detect Invisibility'), +(45716,45725 ,2,'Torch Tossing Training trigger Detect Invisibility'), +(46630,-45724,0,'Torch Tossing Practice remove Brazier Hit'), +(45716,-45724,0,'Torch Tossing Training remove Brazier Hit'), +(-46630,-45724,0,'Torch Tossing Practice expired - clear Braziers Hit!'), +(-45716,-45724,0,'Torch Tossing Training expired - clear Braziers Hit!'), +(45723,43313,2,'Target Indicator(duration) trigger Target Indicator(visual)'); + +-- Fix A Thief's Reward +DELETE FROM `creature_queststarter` WHERE `quest` IN (9365, 9339); +UPDATE `quest_template_addon` SET `NextQuestID`=9365 WHERE `ID` IN (9324,9325,9326,11935); +UPDATE `quest_template_addon` SET `NextQuestID`=9339 WHERE `ID` IN (9330,9331,9332,11933); diff --git a/sql/updates/world/2016_02_05_00_world.sql b/sql/updates/world/2016_02_05_00_world.sql new file mode 100644 index 00000000000..46f2b488b9a --- /dev/null +++ b/sql/updates/world/2016_02_05_00_world.sql @@ -0,0 +1,6 @@ +-- Implement "Toy Train Set" and "Wind-Up Train Wrecker" +UPDATE `gameobject_template` SET `ScriptName`="go_toy_train_set" WHERE `entry`=193963; +UPDATE `creature_template` SET `ScriptName`="npc_train_wrecker" WHERE `entry`=33404; +DELETE FROM `spell_script_names` WHERE `spell_id`=61551; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(61551,"spell_item_toy_train_set_pulse"); diff --git a/sql/updates/world/2016_02_06_00_world.sql b/sql/updates/world/2016_02_06_00_world.sql new file mode 100644 index 00000000000..d303a8b5b85 --- /dev/null +++ b/sql/updates/world/2016_02_06_00_world.sql @@ -0,0 +1,2 @@ +-- Implement Egbert's running +UPDATE creature_template SET ScriptName = "npc_egbert" WHERE entry = 23258; diff --git a/sql/updates/world/2016_02_06_01_world.sql b/sql/updates/world/2016_02_06_01_world.sql new file mode 100644 index 00000000000..6812c4af52e --- /dev/null +++ b/sql/updates/world/2016_02_06_01_world.sql @@ -0,0 +1,3 @@ +-- +-- Stinky + Precious - Knockbackimmunity +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|0x40000000 WHERE `entry` IN (37025, 38064, 37217, 38103); diff --git a/sql/updates/world/2016_02_06_02_world.sql b/sql/updates/world/2016_02_06_02_world.sql new file mode 100644 index 00000000000..b9fd7cd9d63 --- /dev/null +++ b/sql/updates/world/2016_02_06_02_world.sql @@ -0,0 +1,20 @@ +-- +-- Knockbackimmunity Cleanup +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|0x40000000 WHERE `entry` IN ( +-- npc_kinetic_bomb +38454, 38775, 38776, 38777, +-- npc_iron_roots +33088, 33396, 33168, 33397, +-- npc_saronite_vapors +33488, 33789, +-- NPC_GAS_CLOUD +37562, 38602, 38760, 38761, +-- NPC_VOLATILE_OOZE +37697, 38604, 38758, 38759, +-- npc_training_dummy +2673, 2674, 17578, 16111, 24792, 32543, 32546, 32547, 32542, 32545, 30527, 31143, 31144, 31146, 32541, 32666, 32667, +-- npc_tournament_training_dummy +33229, 33243, 33272, +-- npc_ice_tomb +36980, 38320, 38321, 38322 +); diff --git a/sql/updates/world/2016_02_06_03_world.sql b/sql/updates/world/2016_02_06_03_world.sql new file mode 100644 index 00000000000..85f8d3c6ae7 --- /dev/null +++ b/sql/updates/world/2016_02_06_03_world.sql @@ -0,0 +1,6 @@ +-- +-- Warsong Recruitment Officer gives dublicate quest +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND (`SourceEntry`=11586 OR `SourceEntry`=11585); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionValue1`,`Comment`) VALUES +(19, 11586, 14, 10172, "Accept quest 11586 - Quest 10172 needs to be incomplete"), +(19, 11585, 8, 10172, "Accept quest 11585 - Quest 10172 needs to be rewarded"); diff --git a/sql/updates/world/2016_02_06_04_world.sql b/sql/updates/world/2016_02_06_04_world.sql new file mode 100644 index 00000000000..188b3b5f2a7 --- /dev/null +++ b/sql/updates/world/2016_02_06_04_world.sql @@ -0,0 +1,6 @@ +-- +-- Quest: Scalps! +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=52090 AND `ElseGroup`=1; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 52090, 0, 1, 31, 1, 3, 28465, 0, 0, 173, 0, '', 'Item 38731 "Ahunae\'s Knife" targets 28465 "Heb\'Drakkar Striker'), +(17, 0, 52090, 0, 1, 36, 1, 0, 0, 0, 1, 173, 0, '', 'Item 38731 "Ahunae\'s Knife" targets 28465 "Heb\'Drakkar Striker'); diff --git a/sql/updates/world/2016_02_06_05_world.sql b/sql/updates/world/2016_02_06_05_world.sql new file mode 100644 index 00000000000..823a8abaca6 --- /dev/null +++ b/sql/updates/world/2016_02_06_05_world.sql @@ -0,0 +1,20 @@ +-- +-- Silithus Stone spells should ignore LoS +DELETE FROM `disables` WHERE `sourceType`=0 AND `entry` IN (24803,24745,24747,24757,24759,24761,24762,24766,24769,24771,24773,24785,24787,24791,24792,24793); +INSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES +(0, 24803, 64, '', '', 'Abyssal Punishment ignores LoS'), +(0, 24745, 64, '', '', 'Summon Templar, Trigger ignores LoS'), +(0, 24747, 64, '', '', 'Summon Templar Fire, Trigger ignores LoS'), +(0, 24757, 64, '', '', 'Summon Templar Air, Trigger ignores LoS'), +(0, 24759, 64, '', '', 'Summon Templar Earth, Trigger ignores LoS'), +(0, 24761, 64, '', '', 'Summon Templar Water, Trigger ignores LoS'), +(0, 24762, 64, '', '', 'Summon Duke, Trigger ignores LoS'), +(0, 24766, 64, '', '', 'Summon Duke Fire, Trigger ignores LoS'), +(0, 24769, 64, '', '', 'Summon Duke Air, Trigger ignores LoS'), +(0, 24771, 64, '', '', 'Summon Duke Earth, Trigger ignores LoS'), +(0, 24773, 64, '', '', 'Summon Duke Water, Trigger ignores LoS'), +(0, 24785, 64, '', '', 'Summon Royal, Trigger ignores LoS'), +(0, 24787, 64, '', '', 'Summon Royal Fire, Trigger ignores LoS'), +(0, 24791, 64, '', '', 'Summon Royal Air, Trigger ignores LoS'), +(0, 24792, 64, '', '', 'Summon Royal Earth, Trigger ignores LoS'), +(0, 24793, 64, '', '', 'Summon Royal Water, Trigger ignores LoS'); diff --git a/sql/updates/world/2016_02_06_06_world.sql b/sql/updates/world/2016_02_06_06_world.sql new file mode 100644 index 00000000000..37df2ef0868 --- /dev/null +++ b/sql/updates/world/2016_02_06_06_world.sql @@ -0,0 +1,7 @@ +-- +-- Defias Gunpowder SAI +SET @ENTRY := 17155; +UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,1,0,0,70,0,100,0,2,0,0,0,12,4417,3,120000,1,0,0,8,0,0,0,-123.77,-613.586,14.126,6.035,"Defias Gunpowder - On Gossip Hello - Summon Creature 'Defias Taskmaster' (No Repeat)"); diff --git a/sql/updates/world/2016_02_06_07_world.sql b/sql/updates/world/2016_02_06_07_world.sql new file mode 100644 index 00000000000..c5d6434321a --- /dev/null +++ b/sql/updates/world/2016_02_06_07_world.sql @@ -0,0 +1,8 @@ +-- +-- Pustulating Horror SAI +SET @ENTRY := 10404; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,0,2000,6000,10000,10000,11,71089,0,0,0,0,0,5,0,0,0,0,0,0,0,"Pustulating Horror - In Combat - Cast 'Bubbling Pus'"), +(@ENTRY,0,1,0,2,0,100,0,0,10,60000,60000,11,71088,0,0,0,0,0,1,0,0,0,0,0,0,0,"Pustulating Horror - Between 0-10% Health - Cast 'Blight Bomb'"); diff --git a/sql/updates/world/2016_02_06_08_world.sql b/sql/updates/world/2016_02_06_08_world.sql new file mode 100644 index 00000000000..f0855ba348a --- /dev/null +++ b/sql/updates/world/2016_02_06_08_world.sql @@ -0,0 +1,9 @@ +-- +-- DB/Creature: Koren - Gossipoptions +DELETE FROM `gossip_menu_option` WHERE `menu_id`=7435; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES +(7435, 0, 1, 'I\'m in need of your skill as a blacksmith, Koren.', 14188, 3, 128, 0, 0, 0, 0, NULL, 0); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceID` = 15 AND `SourceGroup` = 7435; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 7435, 0, 0, 0, 5, 0, 967, 224, 0, 0, 0, 0, '', 'Koren - Show Vendor option if Honored Exalted with Violet Eye'); diff --git a/sql/updates/world/2016_02_06_09_world.sql b/sql/updates/world/2016_02_06_09_world.sql new file mode 100644 index 00000000000..bf92b89e1c2 --- /dev/null +++ b/sql/updates/world/2016_02_06_09_world.sql @@ -0,0 +1,3 @@ +-- +-- Fiery Payback mage talent +DELETE FROM `spell_ranks` WHERE `first_spell_id`=44440; diff --git a/sql/updates/world/2016_02_06_10_world.sql b/sql/updates/world/2016_02_06_10_world.sql new file mode 100644 index 00000000000..291bd0bb333 --- /dev/null +++ b/sql/updates/world/2016_02_06_10_world.sql @@ -0,0 +1,19 @@ + +-- Estelle Gendry - Gossip +DELETE FROM `gossip_menu_option` WHERE (`menu_id`=161 AND `id`=0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES +(161, 0, 0, 'I need another set of thieves'' tools.', 2643, 1, 1, 0, 0, 0, 0, NULL, 0); + +-- Estelle Gendry SAI +SET @ENTRY := 6566; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,62,0,100,0,161,0,0,0,11,9949,2,0,0,0,0,7,0,0,0,0,0,0,0,"Estelle Gendry - On Gossip Option 0 Selected - Invoker Cast 'Thieves' Tool Rack Conjure'"), +(@ENTRY,0,1,0,61,0,100,0,161,0,0,0,72,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Estelle Gendry - On Gossip Option 0 Selected - Close Gossip"); + + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=161 AND `SourceEntry`=0; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`, `NegativeCondition`) VALUES +(15,161,0,0,0,9,0,1999,0,0,0,"","Show Gossip if player has Quest: Tools of the Trade", 0), +(15,161,0,0,0,2,0,5060,1,1,0,"","Show Gossip if player has not item: Thieves' Tools", 1); diff --git a/sql/updates/world/2016_02_06_11_world.sql b/sql/updates/world/2016_02_06_11_world.sql new file mode 100644 index 00000000000..cea352fec36 --- /dev/null +++ b/sql/updates/world/2016_02_06_11_world.sql @@ -0,0 +1,2 @@ +-- Implement Pandaran Monk's pet abilitys +UPDATE creature_template SET ScriptName = "npc_pandaren_monk" WHERE entry = 36911; diff --git a/sql/updates/world/2016_02_06_12_world.sql b/sql/updates/world/2016_02_06_12_world.sql new file mode 100644 index 00000000000..df550156bc1 --- /dev/null +++ b/sql/updates/world/2016_02_06_12_world.sql @@ -0,0 +1,4 @@ +-- +-- DB/Conditions: Meridith the Mermaiden +UPDATE `conditions` SET `NegativeCondition`=0 WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=6658 AND `SourceEntry`=7916; +UPDATE `conditions` SET `NegativeCondition`=1 WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=6658 AND `SourceEntry`=7917; diff --git a/sql/updates/world/2016_02_06_13_world_335.sql b/sql/updates/world/2016_02_06_13_world_335.sql new file mode 100644 index 00000000000..22bd5596d98 --- /dev/null +++ b/sql/updates/world/2016_02_06_13_world_335.sql @@ -0,0 +1,3 @@ +-- +-- DB/Quest: Avenging The Fallen +UPDATE `quest_template_addon` SET `SpecialFlags`=0 WHERE `Id`=7830; diff --git a/sql/updates/world/2016_02_06_14_world.sql b/sql/updates/world/2016_02_06_14_world.sql new file mode 100644 index 00000000000..7bf05b61c71 --- /dev/null +++ b/sql/updates/world/2016_02_06_14_world.sql @@ -0,0 +1,3 @@ +-- +-- DB/Quest: Venomhide Eggs +UPDATE `quest_template_addon` SET `PrevQuestID`=13850 WHERE `ID`=13887; diff --git a/sql/updates/world/2016_02_07_00_world.sql b/sql/updates/world/2016_02_07_00_world.sql new file mode 100644 index 00000000000..5a49f8fd310 --- /dev/null +++ b/sql/updates/world/2016_02_07_00_world.sql @@ -0,0 +1,5 @@ +-- +-- Creature: Injured Goblin Miner conditional gossip +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceID` = 15 AND `SourceGroup` = 9859 AND `SourceEntry` = 0; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,9859,0,0,0,9,0,12832,0,0,0,0,'','Injured Goblin Miner - Show gossip option 0 if player has taken quest ID 12832'); diff --git a/sql/updates/world/2016_02_07_01_world_335.sql b/sql/updates/world/2016_02_07_01_world_335.sql new file mode 100644 index 00000000000..5f1d5f4280e --- /dev/null +++ b/sql/updates/world/2016_02_07_01_world_335.sql @@ -0,0 +1,8 @@ +-- DB/Item: "Deprecated BKP "Impact" Shot" +-- Restore correct values for bullet item "Deprecated BKP "Impact" Shot": +UPDATE `item_template` SET `name`= 'Deprecated BKP "Impact" Shot', `Quality`= 1, + `Flags`= 16, `FlagsExtra`= 8192, `BuyCount`= 200, `BuyPrice`= 450, `SellPrice`= 0, + `ItemLevel`= 35, `RequiredLevel`= 30, `stackable`= 1000, `StatsCount`= 0, + `stat_type1`= 0, `stat_value1`= 0, `stat_type2`= 0, `stat_value2`= 0, `dmg_min1`= 9, + `dmg_max1`= 9, `armor`= 0, `delay`= 3000, `bonding`= 0, `MaxDurability`= 0, `BagFamily`= 2, + `RequiredDisenchantSkill`= -1, `DisenchantID`= 0 WHERE `entry`= 3034; diff --git a/sql/updates/world/2016_02_07_02_world_335.sql b/sql/updates/world/2016_02_07_02_world_335.sql new file mode 100644 index 00000000000..ea4608f3a6b --- /dev/null +++ b/sql/updates/world/2016_02_07_02_world_335.sql @@ -0,0 +1,13 @@ +-- +-- DB/Quest: Escape Through Force +DELETE FROM `smart_scripts` WHERE `entryorguid`=3692 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 +(3692, 0, 0, 1, 19, 0, 100, 0, 994, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Volcor - On Quest \'Escape Through Force\' Taken - Store Targetlist'), +(3692, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Volcor - On Quest \'Escape Through Force\' Taken - Set Unit Flags'), +(3692, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 369200, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Volcor - On Quest \'Escape Through Force\' Taken - Run Script'), +(3692, 0, 3, 4, 19, 0, 100, 0, 995, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Volcor - On Quest \'Escape Through Stealth\' Taken - Store Targetlist'), +(3692, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Volcor - On Quest \'Escape Through Stealth\' Taken - Set Unit Flags'), +(3692, 0, 5, 0, 61, 0, 100, 0, 995, 0, 0, 0, 80, 369201, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Volcor - On Quest \'Escape Through Stealth\' Taken - Run Script'), +(3692, 0, 6, 0, 40, 0, 100, 0, 15, 3692, 0, 0, 41, 5000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Volcor - On Waypoint 15 Reached - Despawn 5 Seconds'); + +UPDATE `smart_scripts` SET `target_type`=12, `target_param1`=1 WHERE `entryorguid` IN(369200,369201) AND `source_type`=9 AND `id`IN(2,3); diff --git a/sql/updates/world/2016_02_07_03_world_335.sql b/sql/updates/world/2016_02_07_03_world_335.sql new file mode 100644 index 00000000000..8322ff59c4c --- /dev/null +++ b/sql/updates/world/2016_02_07_03_world_335.sql @@ -0,0 +1,65 @@ +-- +-- Sorrow Wing (3.3.5) loot items +DELETE FROM `creature_loot_template` WHERE `Entry`= 5928; +INSERT INTO `creature_loot_template` (`Entry`,`Item`,`Reference`,`Chance`,`QuestRequired`,`LootMode`,`GroupID`,`MinCount`,`MaxCount`,`Comment`) VALUES +(5928, 5808,0, 50, 1,1,0,1,1,'Pridewing Venom Sac (Quest item)'), +(5928, 5137,0, 0.8, 0,1,0,1,2,'Bright Eyeball'), +(5928, 1686,0, 10, 0,1,0,1,2,'Bristly Whisker'), +(5928, 7073,0, 88, 0,1,0,1,2,'Broken Fang'), +(5928, 3381,0,0.19, 0,1,0,1,1,'Cross-Stitched Bracers'), +(5928, 1783,0, 0.3, 0,1,0,1,1,'Cross-Stitched Gloves'), +(5928, 2785,0,0.16, 0,1,0,1,1,'Stiff Recurve Bow'), +(5928, 2221,0, 0.2, 0,1,0,1,1,'Targe Shield'), +(5928, 1808,0,0.16, 0,1,0,1,1,'Tough Leather Pants'), +(5928, 5136,0, 0.8, 0,1,0,1,2,'Torn Furry Ear'), +(5928, 9837,0, 0.9, 0,1,0,1,1,'Banded Bracers'), +(5928, 9838,0, 1.3, 0,1,0,1,1,'Banded Cloak'), +(5928, 9839,0, 0.8, 0,1,0,1,1,'Banded Gauntlets'), +(5928, 9840,0, 0.3, 0,1,0,1,1,'Banded Girdle'), +(5928, 6592,0, 1.2, 0,1,0,1,1,'Battleforge Armor'), +(5928, 6590,0, 1.4, 0,1,0,1,1,'Battleforge Boots'), +(5928, 6595,0, 3, 0,1,0,1,1,'Battleforge Gauntlets'), +(5928, 6594,0, 3, 0,1,0,1,1,'Battleforge Girdle'), +(5928, 6596,0, 4, 0,1,0,1,1,'Battleforge Legguards'), +(5928, 6597,0, 3, 0,1,0,1,1,'Battleforge Shoulderguards'), +(5928, 6591,0, 3, 0,1,0,1,1,'Battleforge Wristguards'), +(5928, 6600,0, 3, 0,1,0,1,1,'Dervish Belt'), +(5928, 6601,0, 5, 0,1,0,1,1,'Dervish Boots'), +(5928, 6602,0, 3, 0,1,0,1,1,'Dervish Bracers'), +(5928, 6605,0, 3, 0,1,0,1,1,'Dervish Gloves'), +(5928, 7415,0, 1.5, 0,1,0,1,1,'Dervish Spaulders'), +(5928, 6607,0, 1.3, 0,1,0,1,1,'Dervish Leggings'), +(5928, 6603,0, 2, 0,1,0,1,1,'Dervish Tunic'), +(5928,10404,0, 1.6, 0,1,0,1,1,'Durable Belt'), +(5928, 9820,0, 0.4, 0,1,0,1,1,'Durable Boots'), +(5928, 9821,0, 1.1, 0,1,0,1,1,'Durable Bracers'), +(5928, 9822,0, 1.3, 0,1,0,1,1,'Durable Cape'), +(5928, 9823,0, 0.5, 0,1,0,1,1,'Durable Gloves'), +(5928, 7355,0, 0.8, 0,1,0,1,1,'Elders Bracers'), +(5928, 7356,0, 0.9, 0,1,0,1,1,'Elders Cloak'), +(5928, 7370,0, 0.7, 0,1,0,1,1,'Elders Sash'), +(5928, 4715,0, 6, 0,1,0,1,1,'Emblazoned Cloak'), +(5928, 7410,0, 0.7, 0,1,0,1,1,'Infiltrator Bracers'), +(5928, 7411,0, 0.6, 0,1,0,1,1,'Infiltrator Cloak'), +(5928, 9796,0, 3, 0,1,0,1,1,'Ivycloth Mantle'), +(5928, 9797,0, 3, 0,1,0,1,1,'Ivycloth Pants'), +(5928, 9791,0, 1.3, 0,1,0,1,1,'Ivycloth Tunic'), +(5928, 7416,0, 0.6, 0,1,0,1,1,'Phalanx Bracers'), +(5928, 7419,0, 1.1, 0,1,0,1,1,'Phalanx Cloak'), +(5928, 6612,0, 3, 0,1,0,1,1,'Sages Boots'), +(5928, 6613,0, 4, 0,1,0,1,1,'Sages Bracers'), +(5928,10288,0, 0.8, 0,1,0,1,1,'Sages Circlet'), +(5928, 6614,0, 4, 0,1,0,1,1,'Sages Cloak'), +(5928, 6615,0, 0.9, 0,1,0,1,1,'Sages Gloves'), +(5928, 6617,0, 1.2, 0,1,0,1,1,'Sages Mantle'), +(5928, 6611,0, 2, 0,1,0,1,1,'Sages Sash'), +(5928, 9831,0, 1.8, 0,1,0,1,1,'Scaled Cloak'), +(5928, 9827,0, 0.8, 0,1,0,1,1,'Scaled Leather Belt'), +(5928, 9828,0, 0.9, 0,1,0,1,1,'Scaled Leather Boots'), +(5928, 9829,0, 1.6, 0,1,0,1,1,'Scaled Leather Bracers'), +(5928, 9832,0, 0.9, 0,1,0,1,1,'Scaled Leather Gloves'), +(5928, 9806,0, 3, 0,1,0,1,1,'Superior Gloves'), +(5928, 9808,0, 3, 0,1,0,1,1,'Superior Leggings'), +(5928, 9807,0, 3, 0,1,0,1,1,'Superior Shoulders'), +(5928, 9809,0, 4, 0,1,0,1,1,'Superior Tunic'), +(5928,15539,0,0.03, 0,1,0,1,1,'Wicked Chain Waistband'); diff --git a/sql/updates/world/2016_02_07_04_world.sql b/sql/updates/world/2016_02_07_04_world.sql new file mode 100644 index 00000000000..3a3a7a393d7 --- /dev/null +++ b/sql/updates/world/2016_02_07_04_world.sql @@ -0,0 +1,67 @@ +-- DB/Quest: The Collapse +DELETE FROM `event_scripts` WHERE `id`=16929; +INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) VALUES +(16929, 10, 8, 25742, 0, 0, 0, 0, 0, 0), +(16929, 3, 10, 25742, 360000, 0, 3517.290039, 4538.782715, -12.983689, 4.428759), +(16929, 7, 10, 25629, 360000, 0, 3492.105469, 4478.011719, -12.997340, 0.210166), +(16929, 7, 10, 25652, 360000, 0, 3507.666260, 4509.300293, -14.792936, 0.945820), +(16929, 7, 10, 25652, 360000, 0, 3505.954834, 4506.928223, -14.817587, 0.945820), +(16929, 7, 10, 25652, 360000, 0, 3505.296631, 4506.016113, -14.837238, 0.945820), +(16929, 7, 10, 25652, 360000, 0, 3504.330322, 4504.676758, -14.837238, 0.945820); + +-- Alluvius SAI +SET @ENTRY := 25742; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,54,0,100,0,0,0,0,0,53,1,25742,0,0,0,0,1,0,0,0,0,0,0,0,"Alluvius - On Just Summoned - Start Waypoint"), +(@ENTRY,0,1,0,40,0,100,0,1,25742,0,0,80,@ENTRY*100+00,2,0,0,0,0,1,0,0,0,0,0,0,0,"Alluvius - On Waypoint 1 Reached - Run Script"); + +DELETE FROM `waypoints` WHERE `entry`=25742; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(25742, 1, 3511.336426, 4519.295898, -11.937509, 'Alluvius'); + +-- Actionlist SAI +SET @ENTRY := 2574200; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,9,0,0,0,0,100,0,5000,5000,5000,5000,45,1,1,0,0,0,0,9,25652,0,25,0,0,0,0,"Alluvius - On Script - Set Data 1 1"), +(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,5,36,0,0,0,0,0,1,0,0,0,0,0,0,0,"Alluvius - On Script - Play Emote 36"), +(@ENTRY,9,2,0,0,0,100,0,10000,10000,10000,10000,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Alluvius - On Script - Despawn Instant"); + +-- Nerub'ar Scarab SAI +SET @ENTRY := 25652; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,38,0,100,0,1,1,0,0,53,0,25652,0,0,0,0,1,0,0,0,0,0,0,0,"Nerub'ar Scarab - On Data Set 1 1 - Start Waypoint"), +(@ENTRY,0,1,0,40,0,100,0,6,25652,0,0,41,1000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Nerub'ar Scarab - On Waypoint 6 Reached - Despawn In 1000 ms"); + +DELETE FROM `waypoints` WHERE `entry`=25652; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(25652, 1, 3509.71, 4510.5, -14.6752, 'Nerub\'ar Scarab'), +(25652, 2, 3515.16, 4512.57, -13.4052, 'Nerub\'ar Scarab'), +(25652, 3, 3520.58, 4511.77, -12.5632, 'Nerub\'ar Scarab'), +(25652, 4, 3530.14, 4507.88, -12.9948, 'Nerub\'ar Scarab'), +(25652, 5, 3536.34, 4508.6, -12.9948, 'Nerub\'ar Scarab'), +(25652, 6, 3553.48, 4510.25, -12.9948, 'Nerub\'ar Scarab'); + +-- Lord Kryxix SAI +SET @ENTRY := 25629; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,54,0,100,0,0,0,0,0,53,1,25629,0,0,0,2,1,0,0,0,0,0,0,0,"Lord Kryxix - On Just Summoned - Start Waypoint"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lord Kryxix - On Just Summoned - Say Line 0"), +(@ENTRY,0,2,0,40,0,100,0,4,25629,0,0,49,0,0,0,0,0,0,21,80,0,0,0,0,0,0,"Lord Kryxix - On Waypoint 4 Reached - Start Attacking"); + +DELETE FROM `waypoints` WHERE `entry`=25629; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(25629, 1, 3529.33, 4490.55, -12.9951, 'Lord Kryxix'), +(25629, 2, 3534.51, 4509.94, -12.9951, 'Lord Kryxix'), +(25629, 3, 3533.52, 4527.86, -12.9951, 'Lord Kryxix'), +(25629, 4, 3512.91, 4539.59, -12.987, 'Lord Kryxix'); + +DELETE FROM `creature_text` WHERE `entry`=25629; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextId`) VALUES +(25629, 0, 0, 'Foolish elemental slave! You an your master will pay for your medding!', 14, 0, 100, 0, 0, 0, 'Lord Kryxix', 24956); diff --git a/sql/updates/world/2016_02_07_05_world_335.sql b/sql/updates/world/2016_02_07_05_world_335.sql new file mode 100644 index 00000000000..794b3d80411 --- /dev/null +++ b/sql/updates/world/2016_02_07_05_world_335.sql @@ -0,0 +1,4 @@ +-- +-- Wotlk armor value +UPDATE `creature_classlevelstats` SET `basearmor`=10643 WHERE `level`=83 AND `class`=1; +UPDATE `creature_classlevelstats` SET `basearmor`=10643 WHERE `level`=83 AND `class`=2; diff --git a/sql/updates/world/2016_02_07_06_world.sql b/sql/updates/world/2016_02_07_06_world.sql new file mode 100644 index 00000000000..31ecf826660 --- /dev/null +++ b/sql/updates/world/2016_02_07_06_world.sql @@ -0,0 +1,71 @@ +-- +-- Diremaul North Rndmemotes +-- Gordok Mauler SAI +SET @ENTRY := 11442; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=4; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,4,0,1,0,100,0,3000,3000,5000,10000,10,1,11,391,0,0,0,1,0,0,0,0,0,0,0,"Gordok Mauler - Out of Combat - Play Random Emote (1, 11, 391)"); + +-- Gordok Mage-Lord SAI +SET @ENTRY := 11444; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=7; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,7,0,1,0,100,0,3000,3000,5000,10000,10,1,11,391,0,0,0,1,0,0,0,0,0,0,0,"Gordok Mage Lord - Out of Combat - Play Random Emote (1, 11, 391)"); + +-- Gordok Brute SAI +SET @ENTRY := 11441; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=6; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,6,0,1,0,100,0,3000,3000,5000,10000,10,1,11,391,0,0,0,1,0,0,0,0,0,0,0,"Gordok Brute - Out of Combat - Play Random Emote (1, 11, 391)"); + +-- Stomper Kreeg SAI +SET @ENTRY := 14322; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=6; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,6,0,1,0,100,0,1000,1000,20000,20000,80,@ENTRY*100+00,2,0,0,0,0,1,0,0,0,0,0,0,0,"Stomper Kreeg - Out of Combat - Run Script"); +-- Actionlist SAI +SET @ENTRY := 1432200; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,9,0,0,0,0,100,0,1000,1000,0,0,90,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stomper Kreeg - On Script - Set Flag Standstate Sleep"), +(@ENTRY,9,1,0,0,0,100,0,8000,8000,0,0,91,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stomper Kreeg - On Script - Remove Flag Standstate Sleep"), +(@ENTRY,9,2,0,0,0,100,0,2000,2000,0,0,17,10,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stomper Kreeg - On Script - Set Emote State 10"); + +-- Gordok Bushwacker SAI +SET @ENTRY := 14351; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 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 +(@ENTRY,0,3,0,1,0,100,0,3000,3000,5000,10000,10,1,11,391,0,0,0,1,0,0,0,0,0,0,0,"Gordok Bushwacker - Out of Combat - Play Random Emote (1, 11, 391)"); + +-- Gordok Reaver SAI +SET @ENTRY := 11450; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 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 +(@ENTRY,0,3,0,1,0,100,0,3000,3000,5000,10000,10,1,11,391,0,0,0,1,0,0,0,0,0,0,0,"Gordok Reaver - Out of Combat - Play Random Emote (1, 11, 391)"); + +-- Gordok Warlock SAI +SET @ENTRY := 11448; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=7; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,7,0,1,0,100,0,3000,3000,5000,10000,10,1,11,391,0,0,0,1,0,0,0,0,0,0,0,"Gordok Warlock - Out of Combat - Play Random Emote (1, 11, 391)"); + +-- Gordok Spirit SAI +SET @ENTRY := 11446; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,1,0,100,0,3000,3000,5000,10000,10,1,11,391,0,0,0,1,0,0,0,0,0,0,0,"Gordok Spirit - Out of Combat - Play Random Emote (1, 11, 397)"); + +-- Gordok Captain SAI +SET @ENTRY := 11445; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=4; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,4,0,1,0,100,0,3000,3000,5000,10000,10,1,11,391,0,0,0,1,0,0,0,0,0,0,0,"Gordok Captain - Out of Combat - Play Random Emote (1, 11, 397)"); diff --git a/sql/updates/world/2016_02_07_07_world_335.sql b/sql/updates/world/2016_02_07_07_world_335.sql new file mode 100644 index 00000000000..af323a47bda --- /dev/null +++ b/sql/updates/world/2016_02_07_07_world_335.sql @@ -0,0 +1,6 @@ +-- +-- Remove skinning_loot_template 100008 from non-skinnable beasts: +UPDATE `creature_template` SET `skinloot`= 0 WHERE `skinloot`= 100008 AND `entry` NOT IN (1042,1043,1069); + +UPDATE `skinning_loot_template` SET `Comment`='Light Leather' WHERE `Item`= 2318 AND `Entry` IN (3098,3124); +UPDATE `skinning_loot_template` SET `Comment`='Ruined Leather Scraps' WHERE `Item`= 2934 AND `Entry` IN (3098,3124); diff --git a/sql/updates/world/2016_02_07_08_world_335.sql b/sql/updates/world/2016_02_07_08_world_335.sql new file mode 100644 index 00000000000..2b78a317f95 --- /dev/null +++ b/sql/updates/world/2016_02_07_08_world_335.sql @@ -0,0 +1,72 @@ +-- DB/Quest: Urok Doomhowl - Summonscript +SET @MAGUS = 10602; +SET @ENFORCER = 10601; +SET @UROK = 10584; +SET @OGUID = 21202; + +UPDATE `creature_template` SET `faction`=40 WHERE `entry`IN(10601,10602); + + +DELETE FROM `gameobject` WHERE `id` IN(175571,175584); +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, 175571, 229, 3, 1, -47.90947, -369.0891, 51.54253, 1.378809, 0, 0, 0, 1, -1, 255, 1), -- 175571 (Area: 0) +(@OGUID+1, 175571, 229, 3, 1, -27.88039, -385.8911, 48.50668, 3.700105, 0, 0, 0, 1, -1, 255, 1), -- 175571 (Area: 0) +(@OGUID+2, 175571, 229, 3, 1, -13.72754, -384.8161, 48.97457, 3.68265, 0, 0, 0, 1, -1, 255, 1), -- 175571 (Area: 0) +(@OGUID+3, 175571, 229, 3, 1, -12.36894, -376.4748, 49.335, 5.044002, 0, 0, 0, 1, -1, 255, 1), -- 175571 (Area: 0) +(@OGUID+4, 175571, 229, 3, 1, -24.88243, -369.6189, 49.70592, 3.403396, 0, 0, 0, 1, -1, 255, 1), -- 175571 (Area: 0) +(@OGUID+5, 175584, 229, 3, 1, -14.3415, -395.7287, 48.53813, 2.862335, 0, 0, 0, 1, -1, 255, 0), -- 175584 (Area: 0) +(@OGUID+6, 175571, 229, 3, 1, -34.54366, -370.2325, 50.3396, 5.358161, 0, 0, 0, 1, -1, 255, 1); -- 175571 (Area: 0) + +UPDATE `gameobject` SET `position_y`=-395.729 WHERE `guid`=99791; + +DELETE FROM `event_scripts` WHERE `id`=4845; +INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) VALUES +(4845, 0, 9, @OGUID+0, 66, 0, 0, 0, 0, 0), +(4845, 0, 9, @OGUID+1, 66, 0, 0, 0, 0, 0), +(4845, 0, 9, @OGUID+2, 66, 0, 0, 0, 0, 0), +(4845, 0, 9, @OGUID+3, 66, 0, 0, 0, 0, 0), +(4845, 0, 9, @OGUID+4, 66, 0, 0, 0, 0, 0), +(4845, 0, 9, @OGUID+5, 66, 0, 0, 0, 0, 0), +(4845, 0, 9, @OGUID+6, 66, 0, 0, 0, 0, 0), + +(4845, 5, 10, @MAGUS, 900000, 0, -33.04, -385.57, 48.60, 5.98), +(4845, 5, 10, @ENFORCER, 900000, 0, -16.12, -376.99, 49.20, 4.89), +(4845, 5, 10, @ENFORCER, 900000, 0, -25.13, -376.60, 48.94, 5.17), +(4845, 13, 10, @MAGUS, 900000, 0, -14.93, -381.99, 49.04, 4.70), +(4845, 28, 10, @MAGUS, 900000, 0, -35.47, -371.36, 50.22, 4.79), +(4845, 28, 10, @ENFORCER, 900000, 0, -47.54, -368.11, 51.67, 5.70), +(4845, 42, 10, @MAGUS, 900000, 0, -33.04, -385.57, 48.60, 5.98), +(4845, 42, 10, @MAGUS, 900000, 0, -14.58, -375.16, 49.31, 4.73), +(4845, 42, 10, @ENFORCER, 900000, 0, -24.91, -376.41, 48.95, 4.67), +(4845, 58, 10, @MAGUS, 900000, 0, -47.54, -368.11, 51.67, 5.70), +(4845, 66, 10, @UROK, 900000, 0, -23.97, -391.89, 48.58, 1.68); + +-- Urok Ogre Magus SAI +SET @ENTRY := 10602; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,2,0,0,3400,4700,11,15979,64,0,0,0,0,2,0,0,0,0,0,0,0,"Urok Ogre Magus - In Combat - Cast 'Arcane Bolt' (Normal Dungeon)"), +(@ENTRY,0,1,2,2,0,100,3,0,15,0,0,25,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Urok Ogre Magus - Between 0-15% Health - Flee For Assist (No Repeat) (Normal Dungeon)"), +(@ENTRY,0,2,0,61,0,100,3,0,15,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Urok Ogre Magus - Between 0-15% Health - Say Line 0 (No Repeat) (Normal Dungeon)"), +(@ENTRY,0,3,0,16,0,100,2,6742,30,10000,15000,11,6742,0,0,0,0,0,7,0,0,0,0,0,0,0,"Urok Ogre Magus - On Friendly Unit Missing Buff 'Bloodlust' - Cast 'Bloodlust' (Normal Dungeon)"), +(@ENTRY,0,4,0,0,0,100,2,3000,4000,5000,8000,11,13747,1,0,0,0,0,2,0,0,0,0,0,0,0,"Urok Ogre Magus - In Combat - Cast 'Slow' (Normal Dungeon)"), +(@ENTRY,0,5,0,54,0,100,1,0,0,0,0,11,64195,2,0,0,0,0,1,0,0,0,0,0,0,0,"Urok Ogre Magus - On Just Summoned - Cast 'Simple Teleport' (No Repeat)"), +(@ENTRY,0,6,0,54,0,100,1,0,0,0,0,49,0,0,0,0,0,0,21,50,0,0,0,0,0,0,"Urok Ogre Magus - On Just Summoned - Start Attacking (No Repeat)"); + +-- NPC talk text insert +SET @ENTRY := 10602; +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(@ENTRY,0,0, '%s attempts to run away in fear!',16,0,100,0,0,0, 'combat Flee', 1150); + +-- Urok Enforcer SAI +SET @ENTRY := 10601; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,2,3000,5000,3000,6000,11,16856,2,0,0,0,0,2,0,0,0,0,0,0,0,"Urok Enforcer - In Combat - Cast 'Mortal Strike' (Normal Dungeon)"), +(@ENTRY,0,1,0,0,0,100,1,0,1000,6000,7000,11,11084,2,0,0,0,0,2,0,0,0,0,0,0,0,"Urok Enforcer - In Combat - Cast 'Shock' (No Repeat)"), +(@ENTRY,0,2,0,0,0,100,2,8000,8000,12000,17000,11,14516,2,0,0,0,0,2,0,0,0,0,0,0,0,"Urok Enforcer - In Combat - Cast 'Strike' (Normal Dungeon)"), +(@ENTRY,0,3,0,54,0,100,1,0,0,0,0,11,64195,2,0,0,0,0,1,0,0,0,0,0,0,0,"Urok Enforcer - On Just Summoned - Cast 'Simple Teleport' (No Repeat)"), +(@ENTRY,0,4,0,54,0,100,1,0,0,0,0,49,0,0,0,0,0,0,21,50,0,0,0,0,0,0,"Urok Enforcer - On Just Summoned - Start Attacking (No Repeat)"); diff --git a/sql/updates/world/2016_02_07_09_world.sql b/sql/updates/world/2016_02_07_09_world.sql new file mode 100644 index 00000000000..8057534fbb8 --- /dev/null +++ b/sql/updates/world/2016_02_07_09_world.sql @@ -0,0 +1,6 @@ +-- +-- Solace of the Defeated/Solace of the Fallen (Normal/Heroic) proc fix +DELETE FROM `spell_proc_event` WHERE `entry` IN (67698,67752); +INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES +(67698, 0, 0, 0, 0, 0, 0, 65536, 0, 0, 0), +(67752, 0, 0, 0, 0, 0, 0, 65536, 0, 0, 0); diff --git a/sql/updates/world/2016_02_07_10_world.sql b/sql/updates/world/2016_02_07_10_world.sql new file mode 100644 index 00000000000..c2e59c15d9c --- /dev/null +++ b/sql/updates/world/2016_02_07_10_world.sql @@ -0,0 +1,7 @@ +-- DB/Item: Bryntroll, the Bone Arbiter +UPDATE `item_template` SET `spellcooldown_1`=-1 WHERE `entry`=50415; +UPDATE `item_template` SET `spellppmRate_1`=2 WHERE `entry` IN (50415,50709); +DELETE FROM `spell_bonus_data` WHERE `entry` IN (71839,71838); +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES +(71839,0,0,0,0,'Drain Life'), +(71838,0,0,0,0,'Drain Life'); diff --git a/sql/updates/world/2016_02_07_11_world.sql b/sql/updates/world/2016_02_07_11_world.sql new file mode 100644 index 00000000000..c40b663c205 --- /dev/null +++ b/sql/updates/world/2016_02_07_11_world.sql @@ -0,0 +1,29 @@ +-- +-- Razorthorn Ravager SAI +SET @ENTRY := 24922; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 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 +(@ENTRY,0,3,4,8,0,100,0,44935,0,0,0,69,0,0,0,0,0,0,20,187073,30,0,0,0,0,0,"Razorthorn Ravager - On Spellhit 'Expose Razorthorn Root' - Move To Closest Gameobject 'Razorthorn Dirt Mound'"), +(@ENTRY,0,4,5,61,0,100,0,44935,0,0,0,45,1,1,0,0,0,0,20,187073,30,0,0,0,0,0,"Razorthorn Ravager - On Spellhit 'Expose Razorthorn Root' - Set Data 1 1"), +(@ENTRY,0,5,0,61,0,100,0,44935,0,0,0,80,@ENTRY*100,2,0,0,0,0,1,0,0,0,0,0,0,0,"Razorthorn Ravager - On Spellhit 'Expose Razorthorn Root' - Run Script"); + +-- Actionlist SAI +SET @ENTRY := 2492200; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,9,0,0,0,0,100,0,3000,3000,0,0,11,44941,2,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Cast 'Summon Razorthorn Root'"); + +-- Razorthorn Dirt Mound SAI +SET @ENTRY := 187073; +UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,1,0,0,38,0,100,0,1,1,0,0,80,18707300,2,0,0,0,0,1,0,0,0,0,0,0,0,"Razorthorn Dirt Mound - On Data Set 1 1 - Run Script"); + +-- Actionlist SAI +SET @ENTRY := 18707300; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,9,0,0,0,0,100,0,10,10,0,0,44,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Set Phase 2"), +(@ENTRY,9,1,0,0,0,100,0,120000,120000,0,0,44,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Set Phase 1"); diff --git a/sql/updates/world/2016_02_07_12_world.sql b/sql/updates/world/2016_02_07_12_world.sql new file mode 100644 index 00000000000..c85265d857d --- /dev/null +++ b/sql/updates/world/2016_02_07_12_world.sql @@ -0,0 +1,29 @@ +-- DB/Quest: Drop It then Rock It! +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (24640, 24015); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (24640, 24015) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (2464000, 24015*100) AND `source_type`=9; +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 +(24640, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 80, 2464000, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Alliance Banner - just summoned - Action list'), +(24640, 0, 1, 0, 0, 0, 100, 0, 1000, 1000, 2000, 2000, 19, 2048, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Alliance Banner - IC- remove unit flag'), +(24640, 0, 2, 0, 1, 0, 100, 0, 1000, 1000, 2000, 2000, 19, 2048, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Alliance Banner - OOC - remove unit flag'), +(2464000, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Alliance Banner - Action list - Set react passif'), +(2464000, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Alliance Banner - Action list - Set root'), +(2464000, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Alliance Banner - Action list - Set health regen off'), +(2464000, 9, 3, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 12, 24015, 4, 60000, 0, 1, 0, 8, 0, 0, 0, 1483.793091, -5352.790039, 192.023712, 1.431473, 'Alliance Banner - Action list - Summon Winterskorn Defender'), +(2464000, 9, 4, 0, 0, 0, 100, 0, 20000, 20000, 0, 0, 12, 24015, 4, 60000, 0, 1, 0, 8, 0, 0, 0, 1460.096436, -5342.498535, 195.991714, 0.339768, 'Alliance Banner - Action list - Summon Winterskorn Defender'), +(2464000, 9, 5, 0, 0, 0, 100, 0, 20000, 20000, 0, 0, 12, 24015, 4, 60000, 0, 1, 0, 8, 0, 0, 0, 1468.549561, -5300.886230, 195.633850, 5.760584, 'Alliance Banner - Action list - Summon Winterskorn Defender'), +(2464000, 9, 6, 0, 0, 0, 100, 0, 20000, 20000, 0, 0, 11, 44124, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 'Alliance Banner - Action list - Quest Credit'), +(2464000, 9, 7, 0, 0, 0, 100, 0, 100, 100, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Alliance Banner - Action list - Despawn'), + +(24015, 0, 0, 0, 0, 0, 100, 0, 3000, 5000, 5000, 7000, 11, 15496, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Winterskorn Defender - IC - Cast Cleave'), +(24015, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 10000, 15000, 11, 18812, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Winterskorn Defender - IC - Cast Knockdown'), +(24015, 0, 2, 0, 54, 0, 100, 0, 0, 0, 0, 0, 80, 24015*100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Winterskorn Defender - Just sumoned - Action list'), +(24015*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Winterskorn Defender - Action list - Talk'), +(24015*100, 9, 1, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 1499.201538, -5319.049316, 195.300629, 0.451290, 'Winterskorn Defender - Action list - move to pos'); + +DELETE FROM `creature_text` WHERE `entry` IN (24015); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(24015, 0, 0, 'Your remains will be fed TO the sharks of Daggercap!', 14, 0, 100, 0, 0, 0, 23619, 0, 'Winterskorn Defender'), +(24015, 0, 1, 'The sacrifices NOW bring themselves TO us? Have you NO sense!?', 14, 0, 100, 0, 0, 0, 23618, 0, 'Winterskorn Defender'), +(24015, 0, 2, 'You dare challenge Winterskorn?! I will impale you ON your own puny flag!', 14, 0, 100, 0, 0, 0, 23617, 0, 'Winterskorn Defender'); diff --git a/sql/updates/world/2016_02_07_13_world.sql b/sql/updates/world/2016_02_07_13_world.sql new file mode 100644 index 00000000000..612fef2274d --- /dev/null +++ b/sql/updates/world/2016_02_07_13_world.sql @@ -0,0 +1,413 @@ +DELETE FROM `creature_formations` WHERE `leaderGUID`=81531; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(81531, 81531, 0, 0, 1), +(81531, 81532, 2, 310, 2), +(81531, 81530, 2, 40, 2); + +-- Pathing for Sul'lithuz Sandcrawler Entry: 8095 'TDB FORMAT' +SET @NPC := 81531; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1843.703,`position_y`=1193.693,`position_z`=9.399462 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,1843.703,1193.693,9.399462,0,0,0,0,100,0), -- 09:47:28 +(@PATH,2,1853.01,1172.636,11.64427,0,0,0,0,100,0), -- 09:47:34 +(@PATH,3,1866.308,1173.398,9.788191,0,0,0,0,100,0), -- 09:47:39 +(@PATH,4,1872.583,1166.405,9.729328,0,0,0,0,100,0), -- 09:47:46 +(@PATH,5,1871.299,1156.692,10.96628,0,0,0,0,100,0), -- 09:47:47 +(@PATH,6,1871.138,1151.655,11.56361,0,0,0,0,100,0), -- 09:47:52 +(@PATH,7,1868.171,1128.227,15.75623,0,0,0,0,100,0), -- 09:47:54 +(@PATH,8,1867.59,1117.35,10.0786,0,0,0,0,100,0), -- 09:48:03 +(@PATH,9,1867.531,1112.539,9.42872,0,0,0,0,100,0), -- 09:48:08 +(@PATH,10,1869.916,1103.111,9.419256,0,0,0,0,100,0), -- 09:48:11 +(@PATH,11,1885.483,1101.25,12.69302,0,0,0,0,100,0), -- 09:48:15 +(@PATH,12,1895.659,1106.266,13.07423,0,0,0,0,100,0), -- 09:48:20 +(@PATH,13,1899.068,1114.828,11.51437,0,0,0,0,100,0), -- 09:48:24 +(@PATH,14,1897.243,1124.311,9.819095,0,0,0,0,100,0), -- 09:48:27 +(@PATH,15,1895.536,1129.667,9.065989,0,0,0,0,100,0), -- 09:48:32 +(@PATH,16,1892.813,1140.595,9.251789,0,0,0,0,100,0), -- 09:48:36 +(@PATH,17,1895.494,1145.588,9.251789,0,0,0,0,100,0), -- 09:48:38 +(@PATH,18,1912.283,1152.97,9.721882,0,0,0,0,100,0), -- 09:48:42 +(@PATH,19,1918.871,1158.545,10.8794,0,0,0,0,100,0), -- 09:48:45 +(@PATH,20,1920.596,1160.717,11.4007,0,0,0,0,100,0), -- 09:48:49 +(@PATH,21,1918.562,1168.737,10.45978,0,0,0,0,100,0), -- 09:48:51 +(@PATH,22,1911.641,1178.46,9.442093,0,0,0,0,100,0), -- 09:48:55 +(@PATH,23,1909.036,1182.083,9.251789,0,0,0,0,100,0), -- 09:48:59 +(@PATH,24,1902.43,1192.171,9.225698,0,0,0,0,100,0), -- 09:49:02 +(@PATH,25,1901.362,1201.077,9.209784,0,0,0,0,100,0), -- 09:49:06 +(@PATH,26,1904.497,1211.609,9.074608,0,0,0,0,100,0), -- 09:49:10 +(@PATH,27,1909.629,1219.002,9.34004,0,0,0,0,100,0), -- 09:49:13 +(@PATH,28,1893.508,1226.117,9.880462,0,0,0,0,100,0), -- 09:49:16 +(@PATH,29,1882.001,1223.113,9.380271,0,0,0,0,100,0), -- 09:49:20 +(@PATH,30,1874.822,1220.509,9.350756,0,0,0,0,100,0), -- 09:49:27 +(@PATH,31,1857.651,1200.784,9.280435,0,0,0,0,100,0), -- 09:49:33 +(@PATH,32,1856.005,1198.657,9.078081,0,0,0,0,100,0); -- 09:49:37 +-- 0x1C16F41A2007E7C00020100000370E69 .go 1843.703 1193.693 9.399462 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=81581; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(81581, 81581, 0, 0, 1), +(81581, 81583, 2, 310, 2), +(81581, 81582, 2, 40, 2); + +-- Pathing for Sul'lithuz Sandcrawler Entry: 8095 'TDB FORMAT' +SET @NPC := 81581; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1675.997,`position_y`=1232.113,`position_z`=8.987229 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,1675.997,1232.113,8.987229,0,0,0,0,100,0), -- 09:41:26 +(@PATH,2,1664.236,1222.652,9.116917,0,0,0,0,100,0), -- 09:41:35 +(@PATH,3,1652.006,1213.038,9.562586,0,0,0,0,100,0), -- 09:41:42 +(@PATH,4,1637.653,1203.694,9.001921,0,0,0,0,100,0), -- 09:41:48 +(@PATH,5,1629.32,1192.027,9.076674,0,0,0,0,100,0), -- 09:41:52 +(@PATH,6,1625.091,1172.658,10.96705,0,0,0,0,100,0), -- 09:41:57 +(@PATH,7,1626.96,1164.297,9.917568,0,0,0,0,100,0), -- 09:42:02 +(@PATH,8,1629.299,1156.629,9.361486,0,0,0,0,100,0), -- 09:42:07 +(@PATH,9,1636.125,1149.019,9.258444,0,0,0,0,100,0), -- 09:42:11 +(@PATH,10,1643.561,1144.494,9.247617,0,0,0,0,100,0), -- 09:42:13 +(@PATH,11,1655.12,1139.766,9.255368,0,0,0,0,100,0), -- 09:42:18 +(@PATH,12,1661.656,1140.804,9.253,0,0,0,0,100,0), -- 09:42:20 +(@PATH,13,1668.802,1147.428,9.253811,0,0,0,0,100,0), -- 09:42:24 +(@PATH,14,1676.315,1157.238,9.244503,0,0,0,0,100,0), -- 09:42:29 +(@PATH,15,1685.79,1169.683,9.239374,0,0,0,0,100,0), -- 09:42:34 +(@PATH,16,1692.607,1177.311,9.237229,0,0,0,0,100,0), -- 09:42:37 +(@PATH,17,1699.878,1182.912,9.244503,0,0,0,0,100,0), -- 09:42:41 +(@PATH,18,1713.954,1196.856,10.56152,0,0,0,0,100,0), -- 09:42:44 +(@PATH,19,1723.85,1206.719,12.34495,0,0,0,0,100,0), -- 09:42:49 +(@PATH,20,1727.292,1213.318,11.02762,0,0,0,0,100,0), -- 09:42:54 +(@PATH,21,1729.919,1225.602,9.878916,0,0,0,0,100,0), -- 09:42:57 +(@PATH,22,1731.314,1244.776,10.92413,0,0,0,0,100,0), -- 09:43:04 +(@PATH,23,1728.812,1260.437,12.06071,0,0,0,0,100,0), -- 09:43:10 +(@PATH,24,1727.822,1263.875,12.22826,0,0,0,0,100,0), -- 09:43:15 +(@PATH,25,1711.478,1264.379,11.21737,0,0,0,0,100,0), -- 09:43:20 +(@PATH,26,1713.401,1265.821,11.66045,0,0,0,0,100,0), -- 09:43:25 +(@PATH,27,1716.675,1267.497,11.77379,0,0,0,0,100,0), -- 09:43:28 +(@PATH,28,1729.911,1256.21,11.58052,0,0,0,0,100,0), -- 09:43:32 +(@PATH,29,1731.174,1235.849,10.49311,0,0,0,0,100,0), -- 09:43:38 +(@PATH,30,1731.024,1231.776,10.09937,0,0,0,0,100,0), -- 09:43:44 +(@PATH,31,1725.16,1208.78,11.51352,0,0,0,0,100,0), -- 09:43:50 +(@PATH,32,1720.919,1203.628,11.9393,0,0,0,0,100,0), -- 09:43:54 +(@PATH,33,1709.198,1192.878,9.553079,0,0,0,0,100,0), -- 09:43:57 +(@PATH,34,1706.149,1190.558,9.102777,0,0,0,0,100,0), -- 09:44:02 +(@PATH,35,1699.551,1182.485,9.240244,0,0,0,0,100,0), -- 09:44:06 +(@PATH,36,1692.22,1177.217,9.237229,0,0,0,0,100,0), -- 09:44:10 +(@PATH,37,1685.667,1169.501,9.244503,0,0,0,0,100,0), -- 09:44:13 +(@PATH,38,1675.968,1157.188,9.250818,0,0,0,0,100,0), -- 09:44:19 +(@PATH,39,1668.579,1147.053,9.257448,0,0,0,0,100,0), -- 09:44:23 +(@PATH,40,1661.406,1140.643,9.253025,0,0,0,0,100,0), -- 09:44:26 +(@PATH,41,1655.021,1139.765,9.252222,0,0,0,0,100,0), -- 09:44:29 +(@PATH,42,1643.208,1144.652,9.247617,0,0,0,0,100,0), -- 09:44:34 +(@PATH,43,1635.916,1149.401,9.287905,0,0,0,0,100,0), -- 09:44:37 +(@PATH,44,1626.234,1167.293,10.93676,0,0,0,0,100,0), -- 09:44:41 +(@PATH,45,1623.834,1178.643,9.497221,0,0,0,0,100,0), -- 09:44:45 +(@PATH,46,1623.34,1181.442,9.245241,0,0,0,0,100,0), -- 09:44:49 +(@PATH,47,1629.774,1192.288,9.232269,0,0,0,0,100,0), -- 09:44:54 +(@PATH,48,1637.901,1204.049,9.117538,0,0,0,0,100,0), -- 09:44:59 +(@PATH,49,1652.142,1213.244,9.560089,0,0,0,0,100,0), -- 09:45:05 +(@PATH,50,1664.489,1222.979,8.98844,0,0,0,0,100,0); -- 09:45:11 +-- 0x1C16F41A2007E7C00020100000370E6A .go 1675.997 1232.113 8.987229 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=81587; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(81587, 81587, 0, 0, 1), +(81587, 81601, 2, 310, 2), +(81587, 81588, 2, 40, 2); + +-- Pathing for Sul'lithuz Sandcrawler Entry: 8095 'TDB FORMAT' +SET @NPC := 81587; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1600.69,`position_y`=1126.462,`position_z`=12.41756 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,1600.69,1126.462,12.41756,0,0,0,0,100,0), -- 09:39:21 +(@PATH,2,1598.398,1122.63,11.59186,0,0,0,0,100,0), -- 09:39:26 +(@PATH,3,1593.572,1109.275,10.02831,0,0,0,0,100,0), -- 09:39:30 +(@PATH,4,1592.7,1107.054,9.462294,0,0,0,0,100,0), -- 09:39:33 +(@PATH,5,1588.454,1097.563,9.271156,0,0,0,0,100,0), -- 09:39:38 +(@PATH,6,1583.779,1087.09,9.251778,0,0,0,0,100,0), -- 09:39:42 +(@PATH,7,1577.599,1072.18,9.251631,0,0,0,0,100,0), -- 09:39:48 +(@PATH,8,1572.181,1059.509,9.217859,0,0,0,0,100,0), -- 09:39:53 +(@PATH,9,1566.106,1048.195,9.189631,0,0,0,0,100,0), -- 09:39:58 +(@PATH,10,1561.209,1038.885,9.217978,0,0,0,0,100,0), -- 09:40:01 +(@PATH,11,1554.598,1029.24,9.240252,0,0,0,0,100,0), -- 09:40:05 +(@PATH,12,1551.634,1018.51,9.219183,0,0,0,0,100,0), -- 09:40:10 +(@PATH,13,1564.537,989.8197,10.66319,0,0,0,0,100,0), -- 09:40:17 +(@PATH,14,1573.23,992.3699,9.814154,0,0,0,0,100,0), -- 09:40:23 +(@PATH,15,1585.951,1004.943,9.409527,0,0,0,0,100,0), -- 09:40:32 +(@PATH,16,1583.934,1017.611,9.291721,0,0,0,0,100,0), -- 09:40:36 +(@PATH,17,1570.175,1035.014,9.251503,0,0,0,0,100,0), -- 09:40:45 +(@PATH,18,1572.35,1046.109,9.251484,0,0,0,0,100,0), -- 09:40:48 +(@PATH,19,1579.434,1059.837,9.251631,0,0,0,0,100,0), -- 09:40:55 +(@PATH,20,1580.449,1072.369,9.251754,0,0,0,0,100,0), -- 09:40:59 +(@PATH,21,1584.936,1085.009,9.251778,0,0,0,0,100,0), -- 09:41:04 +(@PATH,22,1588.972,1094.886,9.251778,0,0,0,0,100,0), -- 09:41:08 +(@PATH,23,1596.379,1107.74,9.251778,0,0,0,0,100,0), -- 09:41:13 +(@PATH,24,1603.914,1114.008,9.251778,0,0,0,0,100,0), -- 09:41:16 +(@PATH,25,1613.207,1117.757,9.251778,0,0,0,0,100,0), -- 09:41:20 +(@PATH,26,1622.645,1121.169,9.251778,0,0,0,0,100,0), -- 09:41:24 +(@PATH,27,1626.143,1131.002,9.106209,0,0,0,0,100,0), -- 09:41:27 +(@PATH,28,1613.163,1134.797,10.02532,0,0,0,0,100,0); -- 09:41:31 +-- 0x1C16F41A2007E7C00020100000B70E69 .go 1600.69 1126.462 12.41756 + +-- Pathing for Sandfury Blood Drinker Entry: 5649 'TDB FORMAT' +SET @NPC := 45709; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1617.601,`position_y`=983.7964,`position_z`=9.916536 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,1617.601,983.7964,9.916536,0,0,0,0,100,0), -- 09:32:38 +(@PATH,2,1633.528,955.7834,9.235924,0,0,0,0,100,0), -- 09:32:59 +(@PATH,3,1648.17,936.5194,9.250045,0,0,0,0,100,0), -- 09:33:09 +(@PATH,4,1676.1,915.9411,9.25178,0,0,0,0,100,0), -- 09:33:22 +(@PATH,5,1688.716,903.3527,9.251783,0,0,0,0,100,0), -- 09:33:29 +(@PATH,6,1688.836,903.3895,9.001781,0,0,0,0,100,0), -- 09:33:39 +(@PATH,7,1688.783,903.5739,9.251781,0,0,0,0,100,0), -- 09:33:45 +(@PATH,8,1675.767,916.0085,9.251778,0,0,0,0,100,0), -- 09:33:52 +(@PATH,9,1647.774,936.6549,9.231987,0,0,0,0,100,0), -- 09:34:05 +(@PATH,10,1633.304,956.1119,9.007839,0,0,0,0,100,0); -- 09:34:15 +-- 0x1C16F41A200584400020100000B70E69 .go 1617.601 983.7964 9.916536 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=44170; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(44170, 44170, 0, 0, 1), +(44170, 44177, 4, 0, 2); + +-- Pathing for Sandfury Shadowhunter Entry: 7246 'TDB FORMAT' +SET @NPC := 44170; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1655.273,`position_y`=905.2343,`position_z`=9.25178 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,1655.273,905.2343,9.25178,0,0,0,0,100,0), -- 09:33:10 +(@PATH,2,1655.911,899.7297,9.251781,0,0,0,0,100,0), -- 09:33:13 +(@PATH,3,1659.89,895.1904,9.251783,0,0,0,0,100,0), -- 09:33:15 +(@PATH,4,1666.527,892.6587,9.251785,0,0,0,0,100,0), -- 09:33:19 +(@PATH,5,1671.451,893.4264,9.251785,0,0,0,0,100,0), -- 09:33:20 +(@PATH,6,1677.89,896.6896,9.251787,0,0,0,0,100,0), -- 09:33:24 +(@PATH,7,1682.431,897.1668,9.251787,0,0,0,0,100,0), -- 09:33:25 +(@PATH,8,1687.213,895.057,9.251787,0,0,0,0,100,0), -- 09:33:27 +(@PATH,9,1691.418,891.8385,9.251787,0,0,0,0,100,0), -- 09:33:30 +(@PATH,10,1707.106,892.9658,9.001792,0,0,0,0,100,0), -- 09:33:35 +(@PATH,11,1707.17,893.1018,9.251791,0,0,0,0,100,0), -- 09:33:37 +(@PATH,12,1707.188,899.764,9.251793,0,0,0,0,100,0), -- 09:33:41 +(@PATH,13,1705.826,907.7333,9.051537,0,0,0,0,100,0), -- 09:33:43 +(@PATH,14,1696.466,915.4108,10.69149,0,0,0,0,100,0), -- 09:33:45 +(@PATH,15,1695.094,916.186,11.46166,0,0,0,0,100,0), -- 09:33:49 +(@PATH,16,1684.856,919.5836,10.99732,0,0,0,0,100,0), -- 09:33:51 +(@PATH,17,1683.066,920.494,10.5781,0,0,0,0,100,0), -- 09:33:54 +(@PATH,18,1674.156,923.7375,10.20567,0,0,0,0,100,0), -- 09:33:57 +(@PATH,19,1664.302,928.6282,9.453308,0,0,0,0,100,0), -- 09:34:00 +(@PATH,20,1661.029,929.8394,9.146419,0,0,0,0,100,0), -- 09:34:04 +(@PATH,21,1655.01,926.2007,9.26087,0,0,0,0,100,0), -- 09:34:07 +(@PATH,22,1652.682,919.4923,9.257462,0,0,0,0,100,0), -- 09:34:10 +(@PATH,23,1651.4,910.429,9.254412,0,0,0,0,100,0), -- 09:34:13 +(@PATH,24,1647.536,904.8036,9.126776,0,0,0,0,100,0), -- 09:34:16 +(@PATH,25,1644.714,900.452,9.315964,0,0,0,0,100,0), -- 09:34:18 +(@PATH,26,1643.629,893.2144,9.066956,0,0,0,0,100,0), -- 09:34:21 +(@PATH,27,1647.002,888.5004,9.251783,0,0,0,0,100,0), -- 09:34:23 +(@PATH,28,1653.137,885.6685,9.281507,0,0,0,0,100,0), -- 09:34:26 +(@PATH,29,1662.074,885.7325,10.57716,0,0,0,0,100,0), -- 09:34:29 +(@PATH,30,1671.613,886.2659,10.16994,0,0,0,0,100,0), -- 09:34:32 +(@PATH,31,1674.008,886.346,9.495081,0,0,0,0,100,0), -- 09:34:35 +(@PATH,32,1681.862,881.2953,9.280839,0,0,0,0,100,0), -- 09:34:39 +(@PATH,33,1685.906,877.4709,9.251787,0,0,0,0,100,0), -- 09:34:41 +(@PATH,34,1691.133,874.519,9.251787,0,0,0,0,100,0), -- 09:34:44 +(@PATH,35,1698.035,875.4692,9.251789,0,0,0,0,100,0), -- 09:34:46 +(@PATH,36,1701.057,884.8716,9.251791,0,0,0,0,100,0), -- 09:34:50 +(@PATH,37,1700.372,888.9851,9.251789,0,0,0,0,100,0), -- 09:34:52 +(@PATH,38,1697.707,894.2527,9.251787,0,0,0,0,100,0), -- 09:34:55 +(@PATH,39,1695.577,900.1669,9.251783,0,0,0,0,100,0), -- 09:34:57 +(@PATH,40,1691.47,905.3853,9.251781,0,0,0,0,100,0), -- 09:34:59 +(@PATH,41,1685.541,907.8835,9.251781,0,0,0,0,100,0), -- 09:35:02 +(@PATH,42,1677.038,912.5565,9.251781,0,0,0,0,100,0), -- 09:35:06 +(@PATH,43,1673.069,915.2619,9.251778,0,0,0,0,100,0), -- 09:35:08 +(@PATH,44,1663.253,918.3373,9.251777,0,0,0,0,100,0), -- 09:35:12 +(@PATH,45,1657.931,912.8817,9.251776,0,0,0,0,100,0); -- 09:35:15 +-- 0x1C16F41A200713800020100003B70E69 .go 1655.273 905.2343 9.25178 + +UPDATE `creature` SET `id`=7246 WHERE `guid`=81449; + +-- Pathing for Sandfury Shadowhunter Entry: 7246 'TDB FORMAT' +SET @NPC := 81449; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1714.547,`position_y`=751.6357,`position_z`=31.01397 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,1714.547,751.6357,31.01397,0,0,0,0,100,0), -- 09:33:36 +(@PATH,2,1706.419,767.5251,20.53269,0,0,0,0,100,0), -- 09:33:47 +(@PATH,3,1713.905,783.2459,18.27732,0,0,0,0,100,0), -- 09:33:56 +(@PATH,4,1736.666,804.5889,19.37791,0,0,0,0,100,0), -- 09:34:06 +(@PATH,5,1756.694,816.8251,17.76507,0,0,0,0,100,0), -- 09:34:16 +(@PATH,6,1777.771,811.2102,24.82411,0,0,0,0,100,0), -- 09:34:28 +(@PATH,7,1798.088,809.4211,17.09367,0,0,0,0,100,0), -- 09:34:38 +(@PATH,8,1799.94,798.6746,14.59042,0,0,0,0,100,0), -- 09:34:46 +(@PATH,9,1796.858,772.2805,14.40658,0,0,0,0,100,0), -- 09:34:55 +(@PATH,10,1795.703,767.491,14.4094,0,0,0,0,100,0), -- 09:35:03 +(@PATH,11,1783.244,740.9023,16.0862,0,0,0,0,100,0), -- 09:35:12 +(@PATH,12,1753.258,723.8399,20.43831,0,0,0,0,100,0), -- 09:35:20 +(@PATH,13,1739.673,704.8474,24.96986,0,0,0,0,100,0), -- 09:35:30 +(@PATH,14,1732.086,695.3857,29.82811,0,0,0,0,100,0), -- 09:35:41 +(@PATH,15,1730.985,682.3048,37.22635,0,0,0,0,100,0), -- 09:35:46 +(@PATH,16,1730.52,664.7642,46.17672,0,0,0,0,100,0), -- 09:35:52 +(@PATH,17,1730.83,680.5409,37.68767,0,0,0,0,100,0), -- 09:36:01 +(@PATH,18,1730.119,692.5168,32.08631,0,0,0,0,100,0), -- 09:36:09 +(@PATH,19,1737.599,702.1305,26.13027,0,0,0,0,100,0), -- 09:36:14 +(@PATH,20,1749.973,719.9585,21.75875,0,0,0,0,100,0), -- 09:36:18 +(@PATH,21,1770.449,731.5471,16.75012,0,0,0,0,100,0), -- 09:36:29 +(@PATH,22,1787.836,744.8066,15.48635,0,0,0,0,100,0), -- 09:36:39 +(@PATH,23,1790.129,746.8105,14.82397,0,0,0,0,100,0), -- 09:36:48 +(@PATH,24,1800.35,786.1299,15.01233,0,0,0,0,100,0), -- 09:36:56 +(@PATH,25,1799.381,808.5591,16.25235,0,0,0,0,100,0), -- 09:37:05 +(@PATH,26,1784.557,809.4543,26.70631,0,0,0,0,100,0), -- 09:37:13 +(@PATH,27,1768.491,817.0541,16.94501,0,0,0,0,100,0), -- 09:37:22 +(@PATH,28,1740.522,807.2539,18.77644,0,0,0,0,100,0), -- 09:37:32 +(@PATH,29,1719.27,792.5435,17.62323,0,0,0,0,100,0), -- 09:37:44 +(@PATH,30,1707.021,770.4479,18.85983,0,0,0,0,100,0); -- 09:37:53 +-- 0x1C16F41A200713800020100003B70E6B .go 1714.547 751.6357 31.01397 + +-- Pathing for Hydromancer Velratha Entry: 7795 'TDB FORMAT' +SET @NPC := 81570; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1680.114,`position_y`=1177.732,`position_z`=8.987229 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,1680.114,1177.732,8.987229,2.303835,0,0,0,100,0), -- 09:34:01 +(@PATH,2,1700.927,1195.028,9.603146,0,0,0,0,100,0), -- 09:34:01 +(@PATH,3,1707.2,1200.687,9.403647,0,0,0,0,100,0), -- 09:34:14 +(@PATH,4,1692.938,1213.952,8.987229,3.909538,0,0,0,100,0), -- 09:34:23 +(@PATH,5,1680.51,1225.099,8.987229,0,0,0,0,100,0), -- 09:34:42 +(@PATH,6,1680.468,1225.099,9.265305,0,0,0,0,100,0), -- 09:34:48 +(@PATH,7,1660.3,1205.108,9.04338,5.5676,0,0,0,100,0), -- 09:35:00 +(@PATH,8,1681.249,1229.22,8.987229,0,0,0,0,100,0), -- 09:35:00 +(@PATH,9,1701.589,1207.354,9.564609,0,0,0,0,100,0), -- 09:35:12 +(@PATH,10,1694.085,1190.304,9.394554,0,0,0,0,100,0); -- 09:35:27 +-- 0x1C16F41A20079CC00020100000370E68 .go 1680.114 1177.732 8.987229 + +UPDATE `creature` SET `id`=5650 WHERE `guid`=81575; +UPDATE `creature` SET `id`=5649 WHERE `guid`=81623; + +-- Pathing for Sandfury Blood Drinker Entry: 5649 'TDB FORMAT' +SET @NPC := 81623; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1467.867,`position_y`=814.7855,`position_z`=9.265823 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,1467.867,814.7855,9.265823,0,0,0,0,100,0), -- 09:33:47 +(@PATH,2,1487.211,800.545,9.218481,0,0,0,0,100,0), -- 09:33:56 +(@PATH,3,1511.808,811.0946,9.178488,0,0,0,0,100,0), -- 09:34:07 +(@PATH,4,1515.796,829.2292,9.161482,0,0,0,0,100,0), -- 09:34:16 +(@PATH,5,1536.178,831.7927,8.960844,0,0,0,0,100,0), -- 09:34:23 +(@PATH,6,1571.074,854.2294,9.261095,0,0,0,0,100,0), -- 09:34:40 +(@PATH,7,1591.516,871.9385,9.265827,0,0,0,0,100,0), -- 09:34:51 +(@PATH,8,1607.848,876.8568,9.265826,0,0,0,0,100,0), -- 09:34:58 +(@PATH,9,1607.711,876.7318,9.015826,0,0,0,0,100,0), -- 09:35:10 +(@PATH,10,1607.748,876.855,9.265827,0,0,0,0,100,0), -- 09:35:19 +(@PATH,11,1591.351,871.8887,9.265827,0,0,0,0,100,0), -- 09:35:26 +(@PATH,12,1570.754,854.1002,9.208826,0,0,0,0,100,0), -- 09:35:37 +(@PATH,13,1535.719,831.4611,9.164757,0,0,0,0,100,0), -- 09:35:54 +(@PATH,14,1515.512,828.9963,9.170406,0,0,0,0,100,0), -- 09:36:03 +(@PATH,15,1511.881,810.6445,8.968481,0,0,0,0,100,0), -- 09:36:10 +(@PATH,16,1486.829,800.4541,9.261948,0,0,0,0,100,0); -- 09:36:21 +-- 0x1C16F41A200584400020100004370E69 .go 1467.867 814.7855 9.265823 + +-- Update spawn distance & movementype so they move around randomly +UPDATE `creature` SET `spawndist`=10, `MovementType`=1 WHERE `guid` IN (81566, 81569, 81580, 81568, 81597, 81598, 81539, 81538, 81542, 81548, 81551, 45710, 81482, 81517, 81515, 81518, 81468, 81452, 81579, 81460, 81461, 81512, 81516); + +UPDATE `creature` SET `id`=5650 WHERE `guid`=81578; + +-- Pathing for Sandfury Witch Doctor Entry: 5650 'TDB FORMAT' +SET @NPC := 81578; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1676.368,`position_y`=1157.151,`position_z`=9.249697 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,1676.368,1157.151,9.249697,0,0,0,0,100,0), -- 13:40:40 +(@PATH,2,1653.736,1135.86,9.245178,0,0,0,0,100,0), -- 13:40:52 +(@PATH,3,1626.023,1177.506,9.271156,0,0,0,0,100,0), -- 13:41:05 +(@PATH,4,1625.849,1178.628,9.327552,0,0,0,0,100,0), -- 13:41:14 +(@PATH,5,1641.739,1209.753,9.657928,0,0,0,0,100,0), -- 13:41:25 +(@PATH,6,1681.225,1250.528,10.47596,0,0,0,0,100,0), -- 13:41:38 +(@PATH,7,1696.953,1250.462,10.17584,0,0,0,0,100,0), -- 13:41:54 +(@PATH,8,1714.498,1240.271,9.738787,0,0,0,0,100,0), -- 13:42:06 +(@PATH,9,1717.624,1219.73,9.457044,0,0,0,0,100,0), -- 13:42:15 +(@PATH,10,1704.706,1187.339,9.265233,0,0,0,0,100,0); -- 13:42:29 +-- 0x1C16F41A2005848000491D0001B743F7 .go 1676.368 1157.151 9.249697 + +-- Pathing for Sandfury Witch Doctor Entry: 5650 'TDB FORMAT' +SET @NPC := 81526; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1879.829,`position_y`=1016.147,`position_z`=9.251789 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,1879.829,1016.147,9.251789,0,0,0,0,100,0), -- 13:59:01 +(@PATH,2,1866.291,1028.589,9.251736,0,0,0,0,100,0), -- 13:59:23 +(@PATH,3,1853.719,1035.176,9.251698,0,0,0,0,100,0), -- 13:59:28 +(@PATH,4,1847.862,1044.768,9.251684,0,0,0,0,100,0), -- 13:59:33 +(@PATH,5,1853.86,1062.672,9.252108,0,0,0,0,100,0), -- 13:59:40 +(@PATH,6,1870.639,1091.271,9.252114,0,0,0,0,100,0), -- 13:59:53 +(@PATH,7,1875.563,1107.849,9.25185,0,0,0,0,100,0), -- 14:00:00 +(@PATH,8,1890.563,1129.902,9.251789,0,0,0,0,100,0), -- 14:00:11 +(@PATH,9,1888.277,1155.863,9.251789,0,0,0,0,100,0), -- 14:00:21 +(@PATH,10,1895.958,1173.92,9.251789,0,0,0,0,100,0), -- 14:00:30 +(@PATH,11,1903.501,1197.795,9.251789,0,0,0,0,100,0), -- 14:00:39 +(@PATH,12,1899.594,1215.067,9.227224,0,0,0,0,100,0), -- 14:00:47 +(@PATH,13,1899.237,1214.72,9.001789,0,0,0,0,100,0), -- 14:00:57 +(@PATH,14,1899.508,1214.759,9.285032,0,0,0,0,100,0), -- 14:01:05 +(@PATH,15,1903.433,1197.489,9.251789,0,0,0,0,100,0), -- 14:01:12 +(@PATH,16,1895.648,1173.515,9.251789,0,0,0,0,100,0), -- 14:01:22 +(@PATH,17,1888.245,1155.736,9.251789,0,0,0,0,100,0), -- 14:01:30 +(@PATH,18,1890.73,1129.828,9.25179,0,0,0,0,100,0), -- 14:01:40 +(@PATH,19,1875.201,1107.714,9.25216,0,0,0,0,100,0), -- 14:01:51 +(@PATH,20,1870.43,1091.029,9.252037,0,0,0,0,100,0), -- 14:01:58 +(@PATH,21,1853.549,1062.582,9.251722,0,0,0,0,100,0), -- 14:02:12 +(@PATH,22,1847.7,1044.523,9.251684,0,0,0,0,100,0), -- 14:02:19 +(@PATH,23,1853.871,1034.924,9.251736,0,0,0,0,100,0), -- 14:02:24 +(@PATH,24,1866.429,1028.186,9.251782,0,0,0,0,100,0); -- 14:02:30 +-- 0x1C16F41A2005848000491D0001B743F4 .go 1879.829 1016.147 9.251789 + +UPDATE `creature` SET `id`=5649 WHERE `guid`=81505; + +-- Pathing for Sandfury Blood Drinker Entry: 5649 'TDB FORMAT' +SET @NPC := 81505; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1822.724,`position_y`=914.1884,`position_z`=9.001788 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,1822.724,914.1884,9.001788,0,0,0,0,100,0), -- 13:59:35 +(@PATH,2,1829.56,924.1556,9.251788,0,0,0,0,100,0), -- 13:59:41 +(@PATH,3,1837.984,936.5698,9.251788,0,0,0,0,100,0), -- 13:59:47 +(@PATH,4,1844.23,947.9322,9.251788,0,0,0,0,100,0), -- 13:59:53 +(@PATH,5,1853.508,963.5331,9.251788,0,0,0,0,100,0), -- 14:00:00 +(@PATH,6,1858.897,971.714,9.251788,0,0,0,0,100,0), -- 14:00:04 +(@PATH,7,1862.767,977.868,9.251788,0,0,0,0,100,0), -- 14:00:06 +(@PATH,8,1862.533,977.6647,9.001788,0,0,0,0,100,0), -- 14:00:13 +(@PATH,9,1862.49,977.5964,9.251788,0,0,0,0,100,0), -- 14:00:17 +(@PATH,10,1858.673,971.532,9.251788,0,0,0,0,100,0), -- 14:00:19 +(@PATH,11,1853.258,963.3405,9.251788,0,0,0,0,100,0), -- 14:00:24 +(@PATH,12,1844.16,947.6928,9.251788,0,0,0,0,100,0), -- 14:00:32 +(@PATH,13,1837.749,936.4601,9.251788,0,0,0,0,100,0), -- 14:00:36 +(@PATH,14,1829.292,923.94,9.251788,0,0,0,0,100,0); -- 14:00:43 +-- 0x1C16F41A2005844000491D00033743F5 .go 1822.724 914.1884 9.001788 diff --git a/sql/updates/world/2016_02_07_14_world.sql b/sql/updates/world/2016_02_07_14_world.sql new file mode 100644 index 00000000000..6550e53f9c9 --- /dev/null +++ b/sql/updates/world/2016_02_07_14_world.sql @@ -0,0 +1,55 @@ +-- An end to the suffering +UPDATE `creature_template` SET `unit_flags`=33536 WHERE `entry`=28416; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` =28416; +DELETE FROM `smart_scripts` WHERE `entryorguid`=28416 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=2841600 AND `source_type`=9; + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(-113558,-113482,-113483,-113481) 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 +(-113558, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 11, 51607, 0, 0, 0, 0, 0, 10, 95460, 28416, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Data Set - Cast \'Rhunok\'s Chains\''), +(-113558, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 92, 0, 51607, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Data Set - Remove Aura \'Rhunok\'s Chains\''), +(-113558, 0, 2, 0, 1, 0, 100, 1, 5000, 5000, 0, 0, 11, 51607, 0, 0, 0, 0, 0, 10, 95460, 28416, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Spawn - Cast \'Rhunok\'s Chains\''), +(-113482, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 11, 51607, 0, 0, 0, 0, 0, 10, 95460, 28416, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Data Set - Cast \'Rhunok\'s Chains\''), +(-113482, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 92, 0, 51607, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Data Set - Remove Aura \'Rhunok\'s Chains\''), +(-113482, 0, 2, 0, 1, 0, 100, 1, 5000, 5000, 0, 0, 11, 51607, 0, 0, 0, 0, 0, 10, 95460, 28416, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Spawn - Cast \'Rhunok\'s Chains\''), +(-113483, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 11, 51607, 0, 0, 0, 0, 0, 10, 95460, 28416, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Data Set - Cast \'Rhunok\'s Chains\''), +(-113483, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 92, 0, 51607, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Data Set - Remove Aura \'Rhunok\'s Chains\''), +(-113483, 0, 2, 0, 1, 0, 100, 1, 5000, 5000, 0, 0, 11, 51607, 0, 0, 0, 0, 0, 10, 95460, 28416, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Spawn - Cast \'Rhunok\'s Chains\''), +(-113481, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 11, 51607, 0, 0, 0, 0, 0, 10, 95460, 28416, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Data Set - Cast \'Rhunok\'s Chains\''), +(-113481, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 92, 0, 51607, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Data Set - Remove Aura \'Rhunok\'s Chains\''), +(-113481, 0, 2, 0, 1, 0, 100, 1, 5000, 5000, 0, 0, 11, 51607, 0, 0, 0, 0, 0, 10, 95460, 28416, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Spawn - Cast \'Rhunok\'s Chains\''), +(28416, 0, 0, 1, 25, 0, 100, 0, 0, 0, 0, 0, 18, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - On Reset - Set Unit Flags'), +(28416, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 90, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - On Reset - Set Bytes 1'), +(28416, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, 113558, 26298, 0, 0, 0, 0, 0, 'Rhunok - On Reset - Set Data on ELM General Purpose Bunny (scale x0.01) Large'), +(28416, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, 113482, 26298, 0, 0, 0, 0, 0, 'Rhunok - On Reset - Set Data on ELM General Purpose Bunny (scale x0.01) Large'), +(28416, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, 113481, 26298, 0, 0, 0, 0, 0, 'Rhunok - On Reset - Set Data on ELM General Purpose Bunny (scale x0.01) Large'), +(28416, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, 113483, 26298, 0, 0, 0, 0, 0, 'Rhunok - On Reset - Set Data on ELM General Purpose Bunny (scale x0.01) Large'), +(28416, 0, 6, 7, 8, 0, 100, 0, 51964, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, 113558, 26298, 0, 0, 0, 0, 0, 'Rhunok - Spellhit - Set Data on ELM General Purpose Bunny (scale x0.01) Large'), -- 17:16:47.641 +(28416, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, 113481, 26298, 0, 0, 0, 0, 0, 'Rhunok - Spellhit - Set Data on ELM General Purpose Bunny (scale x0.01) Large'), +(28416, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, 113482, 26298, 0, 0, 0, 0, 0, 'Rhunok - Spellhit - Set Data on ELM General Purpose Bunny (scale x0.01) Large'), +(28416, 0, 9, 10, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, 113483, 26298, 0, 0, 0, 0, 0, 'Rhunok - Spellhit - Set Data on ELM General Purpose Bunny (scale x0.01) Large'), +(28416, 0, 10, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 2841600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - Spellhit - Run Script'), +(28416, 0, 11, 0, 9, 0, 100, 0, 0, 5, 1000, 5000, 11, 34298, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - On Range - Cast Maul'), +(28416, 0, 12, 0, 2, 0, 100, 1, 0, 25, 0, 0, 11, 57861, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - On 25% HP - Cast Roar of Rhunok'), +(28416, 0, 13, 0, 8, 0, 100, 0, 51603, 0, 0, 0, 4, 477, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - On Spellhit - Play Sound'), +(2841600, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 91, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - Script - Remove Bytes 1'), +(2841600, 9, 1, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 66, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - Script - Face Invoker'), +(2841600, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 45111, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - Script - Cast Enrage'), +(2841600, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - Script - Say'), +(2841600, 9, 4, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - Script - Remove Unit Flags'), +(2841600, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 50, 0, 0, 0, 0, 0, 0, 'Rhunok - Script - Start Attack'); + +DELETE FROM `creature_text` WHERE `entry`=28416; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `comment`) VALUES +(28416, 0, 0, 'I will not simply lay here and allow you to slay me! You will have to earn your right to draw another breath if you want to kill me, mortal!', 14, 0, 100, 0, 0, 478, 28544, 'Rhunok to Player'); + +DELETE FROM `disables` WHERE `sourceType`=0 AND `entry`=51964; +INSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES +(0, 51964, 64, '', '', 'Ignore LOS on Tormentor''s Incense'); +-- Catching up with Brann linking +UPDATE quest_template_addon SET PrevQuestID = 12917 WHERE ID = 12920; +-- Valkyrion Must Burn +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (30066) AND `source_type`=0 AND `id`=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 +(30066,0,1,0,28,0,100,0,0,0,0,0,81,16777216,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Valkyrion Harpoon Gun - On Passenger Dismounted - Set NPC Flags'); diff --git a/sql/updates/world/2016_02_07_15_world.sql b/sql/updates/world/2016_02_07_15_world.sql new file mode 100644 index 00000000000..ceec02f881b --- /dev/null +++ b/sql/updates/world/2016_02_07_15_world.sql @@ -0,0 +1,175 @@ +SET @Guid := 52030; + +DELETE FROM `creature` WHERE `id` IN(37964,37981,36817); +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES +(@Guid, 37964, 0, 0, 0, 1, 1, 0, 0, 1484.662, 348.019, -64.54687, 0.8377581, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@Guid+1, 37981, 1, 0, 0, 1, 1, 0, 0, 9843.134, 2430.733, 1313.6, 5.5676, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@Guid+2, 36817, 0, 0, 0, 1, 1, 0, 0, -8796.021, 775.0364, 95.22309, 0.01745329, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0); + +DELETE FROM `game_event_creature` WHERE `eventEntry`=8 AND `guid` BETWEEN @Guid AND @Guid+2; +INSERT INTO `game_event_creature` (`eventEntry`, `guid`) VALUES +(8, @Guid), +(8, @Guid+1), +(8, @Guid+2); + +UPDATE `creature_template` SET `InhabitType`=4,`npcflag`=16777216,`VehicleId`=616,`IconName`='vehichleCursor' WHERE `entry` =37966; +UPDATE `creature_template` SET `InhabitType`=4,`npcflag`=16777216,`VehicleId`=615,`IconName`='vehichleCursor' WHERE `entry` =37980; +UPDATE `creature_template` SET `InhabitType`=4,`npcflag`=16777216,`VehicleId`=548,`IconName`='vehichleCursor' WHERE `entry`=36812; + +UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` IN(37966,37964,37981,37980,36817,36812); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(37966,37964,37980,37981,36817,36812) 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 +(37964, 0, 0, 0, 1, 0, 100, 0, 0, 0, 20000, 20000, 11, 70846, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '[DND] Love Boat Summoner 02 - OOC - Cast Love Boat Summon'), +(37981, 0, 0, 0, 1, 0, 100, 0, 0, 0, 20000, 20000, 11, 70863, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '[DND] Love Boat Summoner 03 - OOC - Cast Love Boat Summon'), +(36817, 0, 0, 0, 1, 0, 100, 0, 0, 0, 20000, 20000, 11, 69371, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '[DND] Love Boat Summoner - OOC - Cast Love Boat Summon'), +(37964, 0, 1, 0, 11, 0, 100, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '[DND] Love Boat Summoner 02 - On Spawn - Set Active'), +(37981, 0, 1, 0, 11, 0, 100, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '[DND] Love Boat Summoner 03 - On Spawn - Set Active'), +(36817, 0, 1, 0, 11, 0, 100, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '[DND] Love Boat Summoner - On Spawn - Set Active'), +(37966, 0, 0, 0, 1, 0, 100, 1, 5000, 5000, 0, 0, 53, 0, 37966, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undercity Love Boat - OOC - Start WP'), +(37966, 0, 1, 2, 40, 0, 100, 0, 31, 37966, 0, 0, 11, 50630, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undercity Love Boat - On Reached WP31 - Cast Eject All Passengers'), +(37966, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 2000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undercity Love Boat - On Reached WP31 - Despawn'), +(37966, 0, 3, 4, 54, 0, 100, 0, 0, 0, 0, 0, 11, 70143, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undercity Love Boat - On Just Summoned - Cast Vehicle Test'), +(37966, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undercity Love Boat - On Just Summoned - Set Active'), +(37966, 0, 5, 0, 1, 0, 100, 0, 0, 0, 3000, 3000, 75, 69341, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undercity Love Boat - OOC - Cast Love Boat'), +(37966, 0, 6, 0, 23, 0, 100, 0, 69342, 2, 1000, 1000, 75, 62011, 0, 0, 0, 0, 0, 17, 0, 20, 0, 0, 0, 0, 0, 'Undercity Love Boat - On Has Aura (2) - Add Aura'), +(37966, 0, 7, 0, 28, 0, 100, 0, 0, 0, 0, 0, 28, 62011, 0, 0, 0, 0, 0, 17, 0, 20, 0, 0, 0, 0, 0, 'Undercity Love Boat - On Passenger Dismounted - Remove Aura'), +(37980, 0, 0, 0, 1, 0, 100, 1, 5000, 5000, 0, 0, 53, 0, 37980, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darnassus Love Boat - OOC - Start WP'), +(37980, 0, 1, 2, 40, 0, 100, 0, 60, 37980, 0, 0, 11, 50630, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darnassus Love Boat - On Reached WP60 - Cast Eject All Passengers'), +(37980, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 2000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darnassus Love Boat - On Reached WP31 - Despawn'), +(37980, 0, 3, 4, 54, 0, 100, 0, 0, 0, 0, 0, 11, 70143, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darnassus Love Boat - On Just Summoned - Cast Vehicle Test'), +(37980, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darnassus Love Boat - On Just Summoned - Set Active'), +(37980, 0, 5, 0, 1, 0, 100, 0, 0, 0, 3000, 3000, 75, 69341, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darnassus Love Boat - On Passenger Boarded - Cast Love Boat'), +(37980, 0, 6, 0, 23, 0, 100, 0, 69342, 2, 1000, 1000, 75, 62011, 0, 0, 0, 0, 0, 17, 0, 20, 0, 0, 0, 0, 0, 'Darnassus Love Boat - On Has Aura (2) - Add Aura'), +(37980, 0, 7, 0, 28, 0, 100, 0, 0, 0, 0, 0, 28, 62011, 0, 0, 0, 0, 0, 17, 0, 20, 0, 0, 0, 0, 0, 'Darnassus Love Boat - On Passenger Removed - Remove Aura'), +(36812, 0, 0, 0, 1, 0, 100, 1, 5000, 5000, 0, 0, 53, 0, 36812, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Stormwind Love Boat - OOC - Start WP'), +(36812, 0, 1, 2, 40, 0, 100, 0, 21, 36812, 0, 0, 11, 50630, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Stormwind Love Boat - On Reached WP21 - Cast Eject All Passengers'), +(36812, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 2000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Stormwind Love Boat - On Reached 19 - Despawn'), +(36812, 0, 3, 4, 54, 0, 100, 0, 0, 0, 0, 0, 11, 70143, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Stormwind Love Boat - On Just Summoned - Cast Vehicle Test'), +(36812, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Stormwind - Love Boat - On Just Summoned - Set Active'), +(36812, 0, 5, 0, 1, 0, 100, 0, 0, 0, 3000, 3000, 75, 69341, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Stormwind Love Boat - OOC - Cast Love Boat'), +(36812, 0, 6, 0, 23, 0, 100, 0, 69342, 2, 1000, 1000, 75, 62011, 0, 0, 0, 0, 0, 17, 0, 20, 0, 0, 0, 0, 0, 'Stormwind Love Boat - On Has Aura (2) - Add Aura'), +(36812, 0, 7, 0, 28, 0, 100, 0, 0, 0, 0, 0, 28, 62011, 0, 0, 0, 0, 0, 17, 0, 20, 0, 0, 0, 0, 0, 'Stormwind Love Boat - On Pasenger Removed - Remove Aura'); + +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`IN(37966,37980,36812); +INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES +(37966, 69342, 1, 0), +(37980, 69342, 1, 0), +(36812, 69342, 1, 0); + + +DELETE FROM `waypoints` WHERE `entry` IN(37966,37980,36812); +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(37966, 1, 1485.332, 348.7621, -64.54687, 'Undercity Love Boat'), +(37966, 2, 1487.063, 350.9445, -64.86743, 'Undercity Love Boat'), +(37966, 3, 1494.434, 360.592, -64.86742, 'Undercity Love Boat'), +(37966, 4, 1505.792, 368.026, -64.81186, 'Undercity Love Boat'), +(37966, 5, 1520.413, 376.7361, -64.81187, 'Undercity Love Boat'), +(37966, 6, 1542.724, 389.7309, -64.81187, 'Undercity Love Boat'), +(37966, 7, 1555.352, 393.1875, -64.81187, 'Undercity Love Boat'), +(37966, 8, 1577.076, 397.1563, -64.81187, 'Undercity Love Boat'), +(37966, 9, 1618.071, 395.9705, -64.81187, 'Undercity Love Boat'), +(37966, 10, 1642.727, 391.0139, -64.81187, 'Undercity Love Boat'), +(37966, 11, 1685.007, 370.4167, -64.81187, 'Undercity Love Boat'), +(37966, 12, 1711.104, 350.4514, -64.81187, 'Undercity Love Boat'), +(37966, 13, 1738.417, 310.0278, -64.81187, 'Undercity Love Boat'), +(37966, 14, 1746.345, 286.441, -64.81187, 'Undercity Love Boat'), +(37966, 15, 1752.087, 240.5399, -64.81187, 'Undercity Love Boat'), +(37966, 16, 1750.016, 206.7309, -64.81187, 'Undercity Love Boat'), +(37966, 17, 1737.47, 167.8559, -64.81187, 'Undercity Love Boat'), +(37966, 18, 1707.885, 128.5122, -64.81187, 'Undercity Love Boat'), +(37966, 19, 1667.977, 99.80035, -64.81187, 'Undercity Love Boat'), +(37966, 20, 1624.948, 85.43229, -64.81187, 'Undercity Love Boat'), +(37966, 21, 1583.814, 83.33507, -64.81187, 'Undercity Love Boat'), +(37966, 22, 1539.444, 94.43403, -64.81187, 'Undercity Love Boat'), +(37966, 23, 1502.849, 114.3142, -64.81187, 'Undercity Love Boat'), +(37966, 24, 1482.955, 132.6806, -64.81187, 'Undercity Love Boat'), +(37966, 25, 1456.214, 170.0521, -64.81187, 'Undercity Love Boat'), +(37966, 26, 1441.738, 207.8819, -64.81187, 'Undercity Love Boat'), +(37966, 27, 1438.825, 244.4427, -64.81187, 'Undercity Love Boat'), +(37966, 28, 1450.882, 299.3177, -64.81187, 'Undercity Love Boat'), +(37966, 29, 1462.38, 320.4583, -64.81187, 'Undercity Love Boat'), +(37966, 30, 1467.97, 333.1337, -64.81187, 'Undercity Love Boat'), +(37966, 31, 1471.193, 337.8559, -64.81187, 'Undercity Love Boat'), +(37980, 1, 9843.134, 2430.733, 1313.6, 'Darnassus Love Boat'), +(37980, 2, 9847.023, 2427.627, 1313.516, 'Darnassus Love Boat'), +(37980, 3, 9856.224, 2423.156, 1313.516, 'Darnassus Love Boat'), +(37980, 4, 9871.393, 2416.719, 1313.516, 'Darnassus Love Boat'), +(37980, 5, 9888.688, 2408.337, 1313.516, 'Darnassus Love Boat'), +(37980, 6, 9901.832, 2399.545, 1313.516, 'Darnassus Love Boat'), +(37980, 7, 9915.912, 2390.616, 1313.516, 'Darnassus Love Boat'), +(37980, 8, 9930.722, 2381.382, 1313.516, 'Darnassus Love Boat'), +(37980, 9, 9946.339, 2377.861, 1313.516, 'Darnassus Love Boat'), +(37980, 10, 9964.972, 2377.967, 1313.516, 'Darnassus Love Boat'), +(37980, 11, 9977.46, 2379.141, 1313.516, 'Darnassus Love Boat'), +(37980, 12, 9989.397, 2375.556, 1313.516, 'Darnassus Love Boat'), +(37980, 13, 10006.68, 2364.491, 1313.516, 'Darnassus Love Boat'), +(37980, 14, 10022.01, 2353.608, 1313.516, 'Darnassus Love Boat'), +(37980, 15, 10031.78, 2353.427, 1313.516, 'Darnassus Love Boat'), +(37980, 16, 10041.6, 2366.207, 1313.516, 'Darnassus Love Boat'), +(37980, 17, 10043.1, 2373.267, 1313.516, 'Darnassus Love Boat'), +(37980, 18, 10040.94, 2384.248, 1313.516, 'Darnassus Love Boat'), +(37980, 19, 10040.11, 2396.392, 1313.516, 'Darnassus Love Boat'), +(37980, 20, 10043.54, 2406.759, 1313.516, 'Darnassus Love Boat'), +(37980, 21, 10051.08, 2414.868, 1313.516, 'Darnassus Love Boat'), +(37980, 22, 10059.58, 2421.014, 1313.516, 'Darnassus Love Boat'), +(37980, 23, 10061.45, 2433.856, 1313.516, 'Darnassus Love Boat'), +(37980, 24, 10056.65, 2445.88, 1313.516, 'Darnassus Love Boat'), +(37980, 25, 10049.1, 2453.844, 1313.516, 'Darnassus Love Boat'), +(37980, 26, 10039.64, 2458.193, 1313.516, 'Darnassus Love Boat'), +(37980, 27, 10030.21, 2461.353, 1313.516, 'Darnassus Love Boat'), +(37980, 28, 10013.85, 2465.007, 1313.516, 'Darnassus Love Boat'), +(37980, 29, 10007.3, 2472.648, 1313.516, 'Darnassus Love Boat'), +(37980, 30, 10001.77, 2490.97, 1313.516, 'Darnassus Love Boat'), +(37980, 31, 10007.02, 2503.859, 1313.516, 'Darnassus Love Boat'), +(37980, 32, 10014.66, 2519.925, 1313.516, 'Darnassus Love Boat'), +(37980, 33, 10022.5, 2532.248, 1313.516, 'Darnassus Love Boat'), +(37980, 34, 10032.06, 2559.106, 1313.516, 'Darnassus Love Boat'), +(37980, 35, 10032.88, 2579.188, 1313.516, 'Darnassus Love Boat'), +(37980, 36, 10032.36, 2598.909, 1313.516, 'Darnassus Love Boat'), +(37980, 37, 10029.7, 2612.815, 1313.516, 'Darnassus Love Boat'), +(37980, 38, 10022.64, 2648.693, 1313.516, 'Darnassus Love Boat'), +(37980, 39, 9999.638, 2667.306, 1313.516, 'Darnassus Love Boat'), +(37980, 40, 9985.304, 2673.353, 1313.516, 'Darnassus Love Boat'), +(37980, 41, 9967.442, 2671.7, 1313.516, 'Darnassus Love Boat'), +(37980, 42, 9938.718, 2668.114, 1313.516, 'Darnassus Love Boat'), +(37980, 43, 9898.393, 2665.895, 1313.516, 'Darnassus Love Boat'), +(37980, 44, 9874.026, 2660.383, 1313.516, 'Darnassus Love Boat'), +(37980, 45, 9848.894, 2657.903, 1313.516, 'Darnassus Love Boat'), +(37980, 46, 9834.57, 2658.452, 1313.516, 'Darnassus Love Boat'), +(37980, 47, 9820.689, 2652.576, 1313.516, 'Darnassus Love Boat'), +(37980, 48, 9802.497, 2636.835, 1313.516, 'Darnassus Love Boat'), +(37980, 49, 9795.239, 2622.99, 1313.516, 'Darnassus Love Boat'), +(37980, 50, 9785.92, 2605.789, 1313.516, 'Darnassus Love Boat'), +(37980, 51, 9784.899, 2593.911, 1313.516, 'Darnassus Love Boat'), +(37980, 52, 9793.405, 2574.175, 1313.516, 'Darnassus Love Boat'), +(37980, 53, 9812.471, 2555.666, 1313.516, 'Darnassus Love Boat'), +(37980, 54, 9829.779, 2539.537, 1313.516, 'Darnassus Love Boat'), +(37980, 55, 9841.714, 2520.574, 1313.516, 'Darnassus Love Boat'), +(37980, 56, 9847.395, 2499.439, 1313.516, 'Darnassus Love Boat'), +(37980, 57, 9850.591, 2481.936, 1313.516, 'Darnassus Love Boat'), +(37980, 58, 9846.033, 2466.465, 1313.516, 'Darnassus Love Boat'), +(37980, 59, 9838.938, 2451.995, 1313.516, 'Darnassus Love Boat'), +(37980, 60, 9833.917, 2446.236, 1313.516, 'Darnassus Love Boat'), +(36812, 1, -8795.021, 775.0364, 95.22309, 'Stormwind Love Boat'), +(36812, 2, -8791.573, 776.316, 95.0583, 'Stormwind Love Boat'), +(36812, 3, -8783.189, 778.1111, 95.0583, 'Stormwind Love Boat'), +(36812, 4, -8769.04, 777.9063, 95.0583, 'Stormwind Love Boat'), +(36812, 5, -8757.161, 764.092, 95.0583, 'Stormwind Love Boat'), +(36812, 6, -8750.976, 741.6354, 95.08608, 'Stormwind Love Boat'), +(36812, 7, -8733.618, 717.3299, 95.08608, 'Stormwind Love Boat'), +(36812, 8, -8717.854, 698.5886, 95.0583, 'Stormwind Love Boat'), +(36812, 9, -8698.192, 662.2465, 95.0583, 'Stormwind Love Boat'), +(36812, 10, -8688.56, 630.1719, 95.11386, 'Stormwind Love Boat'), +(36812, 11, -8696.212, 596.9983, 95.08608, 'Stormwind Love Boat'), +(36812, 12, -8702.024, 577.2761, 95.0583, 'Stormwind Love Boat'), +(36812, 13, -8691.561, 565.0538, 95.0583, 'Stormwind Love Boat'), +(36812, 14, -8671.857, 565.382, 95.0583, 'Stormwind Love Boat'), +(36812, 15, -8646.634, 563.7743, 95.0583, 'Stormwind Love Boat'), +(36812, 16, -8631.895, 554.441, 95.0583, 'Stormwind Love Boat'), +(36812, 17, -8618.281, 557.4114, 95.0583, 'Stormwind Love Boat'), +(36812, 18, -8608.049, 577.191, 95.0583, 'Stormwind Love Boat'), +(36812, 19, -8602.768, 595.4983, 95.0583, 'Stormwind Love Boat'), +(36812, 20, -8594.357, 623.566, 95.0583, 'Stormwind Love Boat'), +(36812, 21, -8581.717, 629.7882, 95.08608, 'Stormwind Love Boat'); diff --git a/sql/updates/world/2016_02_08_00_world_335.sql b/sql/updates/world/2016_02_08_00_world_335.sql new file mode 100644 index 00000000000..83091035e3c --- /dev/null +++ b/sql/updates/world/2016_02_08_00_world_335.sql @@ -0,0 +1,2 @@ +-- http://wowwiki.wikia.com/wiki/Love_Rocket?oldid=2190122 +UPDATE `item_template` SET `BuyCount`=5 WHERE `entry`=34258; diff --git a/sql/updates/world/2016_02_08_01_world.sql b/sql/updates/world/2016_02_08_01_world.sql new file mode 100644 index 00000000000..9f8fa3dc4ed --- /dev/null +++ b/sql/updates/world/2016_02_08_01_world.sql @@ -0,0 +1,25 @@ +SET @JOVAAN := 21633; -- Deathbringer Jovaan +SET @TRIGGER := 4548; -- Smart Trigger +SET @DEVICE := 184833;-- Legion Communication Device +SET @GO_INFERNAL := 184834;-- Gobject that needs to be despawned during the script +SET @GO_INFERNAL2 := 184835;-- Gobject that needs to be despawned during the script +SET @EVENTID := 13852; -- From spell_dbc id 37492 + +DELETE FROM event_scripts WHERE id =@EVENTID; +INSERT INTO event_scripts (id, command, datalong, datalong2, x, y, z, o) VALUES +(@EVENTID, 10, @JOVAAN, 57000, -3310.995, 2951.892, 171.2171, 5.5355); + +DELETE FROM areatrigger_scripts WHERE entry=@TRIGGER; +DELETE FROM smart_scripts WHERE entryorguid=@TRIGGER AND source_type=2; + +UPDATE gameobject_template SET AIName ='' WHERE entry =@DEVICE; +DELETE FROM smart_scripts WHERE source_type=1 AND entryorguid =@DEVICE; + +DELETE FROM smart_scripts WHERE entryorguid=@JOVAAN 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 +(@JOVAAN,0,0,1,11,0,100,0,0,0,0,0,11,34427,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathbringer Jovaan - Just summoned - Spellcast Etheral Teleport'), +(@JOVAAN,0,1,2,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,14,25737,@GO_INFERNAL,0,0,0,0,0,'Deathbringer Jovaan - Just summoned - Set Data GO'), +(@JOVAAN,0,2,3,61,0,100,0,0,0,0,0,45,0,2,0,0,0,0,14,25738,@GO_INFERNAL2,0,0,0,0,0,'Deathbringer Jovaan - Just summoned Set Data GO'), +(@JOVAAN,0,3,0,61,0,100,0,0,0,0,0,53,0,@JOVAAN,0,0,0,0,1,0,0,0,0,0,0,0,'Deathbringer Jovaan - Just summoned - Start WP movement'), +(@JOVAAN,0,4,5,40,0,100,0,4,@JOVAAN,0,0,54,45000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathbringer Jovaan - On WP 4 reached - Pause 45 seconds'), +(@JOVAAN,0,5,0,61,0,100,0,0,0,0,0,80,@JOVAAN*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Deathbringer Jovaan - On WP 4 reached - Run Script'); diff --git a/sql/updates/world/2016_02_08_02_world.sql b/sql/updates/world/2016_02_08_02_world.sql new file mode 100644 index 00000000000..0f22abafe8e --- /dev/null +++ b/sql/updates/world/2016_02_08_02_world.sql @@ -0,0 +1,10 @@ +-- +UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|1|2|4|8|16|32|64|256|512|1024|2048|4096|8192|65536|131072|524288|4194304|8388608|33554432|67108864|536870912 WHERE `entry` IN ( +37697, -- 10N Volatile Ooze +38604, -- 10H Volatile Ooze +38758, -- 25N Volatize Ooze +38759, -- 25H Volatile Ooze +37562, -- 10N Gas Cloud +38602, -- 10H Gas Cloud +38760, -- 25N Gas Cloud +38761); -- 25H Gas Cloud diff --git a/sql/updates/world/2016_02_08_03_world.sql b/sql/updates/world/2016_02_08_03_world.sql new file mode 100644 index 00000000000..fe429cf42c8 --- /dev/null +++ b/sql/updates/world/2016_02_08_03_world.sql @@ -0,0 +1,5 @@ +-- +-- DB/Creature: Frost Freeze Trap - Spellcast +DELETE FROM `disables` WHERE `sourceType`=0 AND `entry`=70460; +INSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES +(0, 70460, 64, '', '', 'Ignore LOS for Coldflame Jets'); diff --git a/sql/updates/world/2016_02_08_04_world.sql b/sql/updates/world/2016_02_08_04_world.sql new file mode 100644 index 00000000000..f8a9e2c776a --- /dev/null +++ b/sql/updates/world/2016_02_08_04_world.sql @@ -0,0 +1,2 @@ +-- Lock and Load - Procc +UPDATE `spell_proc_event` SET `SchoolMask`=0, `SpellFamilyName`=9, `SpellFamilyMask0`=0, `SpellFamilyMask1`=0, `SpellFamilyMask2`=0, `procFlags`=2430272, `procEx`=0, `ppmRate`=0, `CustomChance`=0, `Cooldown`=22 WHERE (`entry`=-56342); diff --git a/sql/updates/world/2016_02_08_05_world.sql b/sql/updates/world/2016_02_08_05_world.sql new file mode 100644 index 00000000000..d2cc597a6ac --- /dev/null +++ b/sql/updates/world/2016_02_08_05_world.sql @@ -0,0 +1,2 @@ +-- diseases immunity tbc +UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask` &~ 2097152 WHERE `exp` = 1; diff --git a/sql/updates/world/2016_02_08_06_world.sql b/sql/updates/world/2016_02_08_06_world.sql new file mode 100644 index 00000000000..c9e93889790 --- /dev/null +++ b/sql/updates/world/2016_02_08_06_world.sql @@ -0,0 +1,2 @@ +-- fix quest reward text for "The Key to the Focusing Iris" and "The Key to the Heroic Focusing Iris" +UPDATE `quest_offer_reward` SET `RewardText`="These keys are held by the most ancient members of the blue dragonflight. Only they are entrusted with them by their master, Malygos.$b$bThis is the break that we've been waiting for to strike at the Aspect of Magic!$b$b<The queen of dragons studies you for a brief moment.>$b$bYou are not able to use the key as-is to access the Focusing Iris, but I can imbue you with a portion of my power; enough to enable you to use it to open the iris a fraction.$b$bIt will be enough to draw Malygos's ire!" WHERE `ID` in (13372,13375); diff --git a/sql/updates/world/2016_02_08_07_world.sql b/sql/updates/world/2016_02_08_07_world.sql new file mode 100644 index 00000000000..1d90630d829 --- /dev/null +++ b/sql/updates/world/2016_02_08_07_world.sql @@ -0,0 +1,82 @@ +-- +-- DB/Quest: King of the Foulweald +DELETE FROM `spell_script_names` WHERE `spell_id`=20783; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(20783, 'spell_destroy_karangs_banner'); + +-- remove this stuff - eventscripts will be running even without gameobject +DELETE FROM `event_scripts` where id=6721; + +-- Karang's Banner SAI +SET @ENTRY := 178205; +UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,1,0,0,1,0,100,1,5000,5000,0,0,80,@ENTRY*100+00,2,0,0,0,0,1,0,0,0,0,0,0,0,"Karang's Banner - Out of Combat - Run Script (No Repeat)"); + +-- Actionlist SAI +SET @ENTRY := 17820500; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,12,3749,3,180000,0,0,0,8,0,0,0,2237.48,-1524.45,89.7827,0,"On Script - Summon Creature 'Foulweald Ursa'"), +(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,12,3743,3,180000,0,0,0,8,0,0,0,2202.16,-1544.48,87.796,0,"On Script - Summon Creature 'Foulweald Warrior'"), +(@ENTRY,9,2,0,0,0,100,0,20000,20000,0,0,12,3750,3,180000,0,0,0,8,0,0,0,2208.93,-1567.59,87.2283,0,"On Script - Summon Creature 'Foulweald Totemic'"), +(@ENTRY,9,3,0,0,0,100,0,0,0,0,0,12,3749,3,180000,0,0,0,8,0,0,0,2235.44,-1578.43,86.4944,0,"On Script - Summon Creature 'Foulweald Ursa'"), +(@ENTRY,9,4,0,0,0,100,0,0,0,0,0,12,3743,3,180000,0,0,0,8,0,0,0,2260.9,-1547.91,89.1733,0,"On Script - Summon Creature 'Foulweald Warrior'"), +(@ENTRY,9,5,0,0,0,100,0,30000,30000,0,0,12,3750,3,180000,0,0,0,8,0,0,0,2237.48,-1524.45,89.7827,0,"On Script - Summon Creature 'Foulweald Totemic'"), +(@ENTRY,9,6,0,0,0,100,0,0,0,0,0,12,3749,3,180000,0,0,0,8,0,0,0,2202.16,-1544.48,87.796,0,"On Script - Summon Creature 'Foulweald Ursa'"), +(@ENTRY,9,7,0,0,0,100,0,20000,20000,0,0,12,3743,3,180000,0,0,0,8,0,0,0,2208.93,-1567.59,87.2283,0,"On Script - Summon Creature 'Foulweald Warrior'"), +(@ENTRY,9,8,0,0,0,100,0,0,0,0,0,12,3750,3,180000,0,0,0,8,0,0,0,2235.44,-1578.43,86.4944,0,"On Script - Summon Creature 'Foulweald Totemic'"), +(@ENTRY,9,9,0,0,0,100,0,0,0,0,0,12,3749,3,180000,0,0,0,8,0,0,0,2260.9,-1547.91,89.1733,0,"On Script - Summon Creature 'Foulweald Ursa'"), +(@ENTRY,9,10,0,0,0,100,0,30000,30000,0,0,12,3743,3,180000,0,0,0,8,0,0,0,2237.48,-1524.45,89.7827,0,"On Script - Summon Creature 'Foulweald Warrior'"), +(@ENTRY,9,11,0,0,0,100,0,0,0,0,0,12,3750,3,180000,0,0,0,8,0,0,0,2202.16,-1544.48,87.796,0,"On Script - Summon Creature 'Foulweald Totemic'"), +(@ENTRY,9,12,0,0,0,100,0,20000,20000,0,0,12,3749,3,180000,0,0,0,8,0,0,0,2208.93,-1567.59,87.2283,0,"On Script - Summon Creature 'Foulweald Ursa'"), +(@ENTRY,9,13,0,0,0,100,0,0,0,0,0,12,3743,3,180000,0,0,0,8,0,0,0,2235.44,-1578.43,86.4944,0,"On Script - Summon Creature 'Foulweald Warrior'"), +(@ENTRY,9,14,0,0,0,100,0,0,0,0,0,12,3750,3,180000,0,0,0,8,0,0,0,2260.9,-1547.91,89.1733,0,"On Script - Summon Creature 'Foulweald Totemic'"), +(@ENTRY,9,15,0,0,0,100,0,30000,30000,0,0,12,3749,3,180000,0,0,0,8,0,0,0,2237.48,-1524.45,89.7827,0,"On Script - Summon Creature 'Foulweald Ursa'"), +(@ENTRY,9,16,0,0,0,100,0,0,0,0,0,12,3743,3,180000,0,0,0,8,0,0,0,2202.16,-1544.48,87.796,0,"On Script - Summon Creature 'Foulweald Warrior'"), +(@ENTRY,9,17,0,0,0,100,0,25000,25000,0,0,12,12918,3,180000,0,0,0,8,0,0,0,2208.93,-1567.59,87.2283,0,"On Script - Summon Creature 'Chief Murgut'"); + +-- Foulweald Ursa SAI +SET @ENTRY := 3749; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`>=4; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,4,0,1,0,100,0,2000,2000,20000,20000,69,1,0,0,0,0,0,20,178205,100,0,0,0,0,0,"Foulweald Ursa - Out of Combat - Move To Position"), +(@ENTRY,0,5,0,34,0,100,0,8,1,0,0,11,20786,0,0,0,0,0,1,0,0,0,0,0,0,0,"Foulweald Ursa - On Reached Point 1 - Cast 'Destroy Karang's Banner'"); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup`=5 AND `SourceEntry`=3749; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(22,5,3749,0,0,30,1,178205,35,0,0,"","Foulweald SAI - ONLY near Banner"); + +-- Foulweald Warrior SAI +SET @ENTRY := 3743; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 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 +(@ENTRY,0,2,0,1,0,100,0,2000,2000,20000,20000,69,1,0,0,0,0,0,20,178205,100,0,0,0,0,0,"Foulweald Warrior - Out of Combat - Move To Closest Gameobject 'Karang's Banner' (Phase 1)"), +(@ENTRY,0,3,0,34,0,100,0,8,1,0,0,11,20786,0,0,0,0,0,1,0,0,0,0,0,0,0,"Foulweald Warrior - On Reached Point 1 - Cast 'Destroy Karang's Banner'"); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup`=3 AND `SourceEntry`=3743; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(22,3,3743,0,0,30,1,178205,35,0,0,"","Foulweald SAI - ONLY near Banner"); + +-- Foulweald Totemic SAI +SET @ENTRY := 3750; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`>=4; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,4,0,1,0,100,0,2000,2000,20000,20000,69,1,0,0,0,0,0,20,178205,100,0,0,0,0,0,"Foulweald Totemic - Out of Combat - Move To Closest Gameobject 'Karang's Banner' (Phase 1)"), +(@ENTRY,0,5,0,34,0,100,0,8,1,0,0,11,20786,0,0,0,0,0,1,0,0,0,0,0,0,0,"Foulweald Totemic - On Reached Point 1 - Cast 'Destroy Karang's Banner'"); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup`=5 AND `SourceEntry`=3750; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(22,5,3750,0,0,30,1,178205,35,0,0,"","Foulweald SAI - ONLY near Banner"); + +-- Chief Murgut SAI +SET @ENTRY := 12918; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`>=4; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,4,0,1,0,100,0,2000,2000,20000,20000,69,1,0,0,0,0,0,20,178205,100,0,0,0,0,0,"Chief Murgut - Out of Combat - Move To Closest Gameobject 'Karang's Banner' (Phase 1)"), +(@ENTRY,0,5,0,34,0,100,0,8,1,0,0,11,20786,0,0,0,0,0,1,0,0,0,0,0,0,0,"Chief Murgut - On Reached Point 1 - Cast 'Destroy Karang's Banner'"); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup`=5 AND `SourceEntry`=12918; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(22,5,12918,0,0,30,1,178205,35,0,0,"","Foulweald SAI - ONLY near Banner"); diff --git a/sql/updates/world/2016_02_08_08_world.sql b/sql/updates/world/2016_02_08_08_world.sql new file mode 100644 index 00000000000..ae4f454bc91 --- /dev/null +++ b/sql/updates/world/2016_02_08_08_world.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_sha_totemic_mastery'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(38443, 'spell_sha_totemic_mastery'); diff --git a/sql/updates/world/2016_02_09_00_world.sql b/sql/updates/world/2016_02_09_00_world.sql new file mode 100644 index 00000000000..c93a1d8fed1 --- /dev/null +++ b/sql/updates/world/2016_02_09_00_world.sql @@ -0,0 +1,3 @@ +-- Garhal (Examples To Be Made quest target): Add CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ, spawn time = 60 seconds; closes #16084 +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|2097152 WHERE `entry`=30147; +UPDATE `creature` SET `spawntimesecs`=60 WHERE `guid`=114369; diff --git a/sql/updates/world/2016_02_09_01_world.sql b/sql/updates/world/2016_02_09_01_world.sql new file mode 100644 index 00000000000..7878ea7faa2 --- /dev/null +++ b/sql/updates/world/2016_02_09_01_world.sql @@ -0,0 +1,211 @@ +-- Razorfen Kraul (Update SAI) +-- Razorfen Handler + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4530; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4530; +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 +(4530, 0, 0, 0, 9, 0, 100, 0, 0, 30, 2300, 3900, 11, 6660, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Handler - Within 0-30 Range - Cast \'Shoot\''); + +-- Razorfen Quilguard + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4436; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4436 AND `id` IN (1, 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 +(4436, 0, 1, 0, 4, 0, 100, 1, 0, 0, 0, 0, 11, 8258, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Quilguard - On Aggro - Cast \'Devotion Aura\''), +(4436, 0, 2, 0, 0, 0, 100, 0, 4000, 8000, 12000, 16000, 11, 15548, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Quilguard - In Combat - Cast \'Thunderclap\''); + +-- Razorfen Geomancer + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4520; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4520 AND `id` IN (0, 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 +(4520, 0, 0, 0, 0, 0, 100, 0, 0, 0, 3400, 4800, 11, 9532, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Geomancer - In Combat CMC - Cast \'Lightning Bolt\''), +(4520, 0, 1, 0, 25, 0, 100, 0, 0, 0, 0, 0, 11, 8270, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Geomancer - On Reset - Cast to summon Earth Rumbler'); + +-- Razorfen Defender + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4442; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4442 AND `id` IN (0, 1, 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 +(4442, 0, 0, 0, 0, 0, 100, 1, 1000, 1000, 180000, 180000, 11, 7164, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Defender - In Combat - Cast \'Defensive Stance\''), +(4442, 0, 1, 0, 0, 0, 100, 0, 6000, 11000, 19000, 25000, 11, 11972, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Defender - In Combat - Cast \'Shield Bash\''), +(4442, 0, 2, 0, 0, 0, 100, 0, 2000, 5000, 12000, 15000, 11, 3248, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Defender - In Combat - Cast \'Improved Blocking\''); + +-- Death's Head Adept + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4516; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4516; +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 +(4516, 0, 0, 0, 0, 0, 100, 2, 0, 0, 2400, 3800, 11, 9672, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Death\'s Head Adept - In Combat CMC - Cast \'Frostbolt\''), +(4516, 0, 1, 0, 0, 0, 100, 2, 3000, 6000, 10000, 15000, 11, 113, 1, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Death\'s Head Adept - In Combat - Cast \'Chains of Ice\' '), +(4516, 0, 2, 0, 2, 0, 100, 3, 0, 15, 0, 0, 25, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Death\'s Head Adept - Between 0-15% Health - Flee For Assist (No Repeat)'); + +-- Razorfen Groundshaker + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4523; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4523; +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 +(4523, 0, 0, 0, 0, 0, 100, 0, 7700, 14500, 11000, 26300, 11, 6524, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Groundshaker - In Combat - Cast \'Ground Tremor\''), +(4523, 0, 1, 0, 0, 0, 100, 0, 3000, 6000, 10000, 15000, 11, 8046, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Groundshaker - In Combat - Cast \'Earth Shock\''); + +-- Razorfen Beastmaster + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4532; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4532; +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 +(4532, 0, 0, 0, 9, 0, 100, 0, 0, 30, 2300, 3900, 11, 6660, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Beastmaster - Within 0-30 Range - Cast \'Shoot\''), +(4532, 0, 1, 0, 25, 0, 100, 0, 0, 0, 0, 0, 11, 8276, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Beastmaster - On Reset - Cast to summon Tamed Hyena'), +(4532, 0, 2, 0, 9, 0, 100, 1, 0, 30, 4000, 6000, 11, 8275, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Beastmaster - Within 0-30 Range - Cast \'Poisoned Shot\'(No Repeat)'); + + -- Razorfen Dustweaver + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4522; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4522; +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 +(4522, 0, 0, 0, 0, 0, 100, 0, 12000, 12000, 28000, 28000, 11, 6728, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Dustweaver - In Combat - Cast \'Enveloping Winds\''); + +-- Razorfen Beast Trainer + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4531; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4531; +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 +(4531, 0, 0, 0, 0, 0, 100, 0, 0, 30, 2300, 3900, 11, 6660, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Beast Trainer - Within 0-30 Range - Cast \'Shoot\''), +(4531, 0, 1, 0, 0, 0, 100, 0, 0, 30, 4000, 6000, 11, 6984, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Beast Trainer - Within 0-30 Range - Cast \'Frost Shot\''); + +-- Aggem Thorncurse <Death's Head Prophet> + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4424; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4424; +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 +(4424, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 9128, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Aggem Thorncurse - In Combat - Cast \'Battle Shout\''), +(4424, 0, 1, 0, 0, 0, 100, 0, 10000, 10000, 26000, 26000, 11, 8286, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Aggem Thorncurse - In Combat - Cast \'Summon Boar Spirit\''); + +-- Razorfen Totemic + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4440; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4440; +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 +(4440, 0, 0, 0, 0, 0, 100, 0, 6000, 6000, 30000, 30000, 11, 4971, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Totemic - In Combat - Cast \'Healing Ward\' (No Repeat)'), +(4440, 0, 1, 0, 0, 0, 100, 0, 4000, 4000, 32000, 32000, 11, 8376, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Totemic - In Combat - Cast \'Earthgrab Totem\''); + +-- Death Speaker Jargba + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4428; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4428; +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 +(4428, 0, 0, 0, 0, 0, 100, 2, 0, 0, 2400, 3800, 11, 9613, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Death Speaker Jargba - In Combat CMC - Cast \'Shadow Bolt\''), +(4428, 0, 1, 0, 0, 0, 100, 2, 7000, 10000, 10000, 15000, 11, 14515, 1, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 'Death Speaker Jargba - In Combat - Cast \'Dominate Mind\''); + +-- Quilguard Champion + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4623; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4623; +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 +(4623, 0, 0, 0, 4, 0, 100, 1, 0, 0, 0, 0, 11, 8258, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Quilguard Champion - On Aggro - Cast \'Devotion Aura\''), +(4623, 0, 1, 0, 0, 0, 100, 1, 1000, 1000, 180000, 180000, 11, 7164, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Quilguard Champion - In Combat - Cast \'Defensive Stance\''), +(4623, 0, 2, 0, 0, 0, 100, 0, 2000, 10000, 6000, 15000, 11, 15572, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Quilguard Champion - In Combat - Cast \'Sunder Armor\'(No Repeat)'); + +-- Overlord Ramtusk + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4420; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4420 AND `id` IN (1, 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 (4420, 0, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 9128, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overlord Ramtusk - In Combat - Cast \'Battle Shout\''), +(4420, 0, 2, 0, 0, 0, 100, 0, 4000, 8000, 12000, 16000, 11, 15548, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overlord Ramtusk - In Combat - Cast \'Thunderclap\''); + +-- Razorfen Earthbreaker + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4525; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4525; +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 (4525, 0, 0, 0, 0, 0, 100, 0, 7700, 14500, 11000, 26300, 11, 8272, 32, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Groundshaker - In Combat - Cast \'Mind Tremor\''), +(4525, 0, 1, 0, 0, 0, 100, 0, 3000, 6000, 10000, 15000, 11, 8046, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Groundshaker - In Combat - Cast \'Earth Shock\''); + +-- Kraul Bat + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4538; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4538; +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 +(4538, 0, 0, 0, 0, 0, 100, 0, 5000, 8000, 10000, 12000, 11, 12553, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Kraul Bat - In Combat - Cast \'Shock\''); + +-- Ward Guardian + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4427; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4427; +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 +(4427, 0, 0, 0, 14, 0, 100, 0, 500, 40, 10000, 12000, 11, 959, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ward Guardian - Friendly At 500 Health - Cast \'Healing Wave\''), +(4427, 0, 1, 0, 9, 0, 100, 0, 0, 35, 3400, 4800, 11, 8400, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Ward Guardian - Within 0-35 Range - Cast \'Fireball\''); + +-- Agathelos the Raging + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4422; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4422; +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 +(4422, 0, 0, 0, 0, 0, 100, 0, 5000, 8000, 12000, 14000, 11, 8285, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Agathelos the Raging - In Combat - Cast \'Rampage\''); + +-- Death's Head Priest + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4517; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4517; +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 +(4517, 0, 0, 0, 1, 0, 100, 2, 1000, 1000, 1800000, 1800000, 11, 1245, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Death\'s Head Priest - Out of Combat - Cast \'Power Word: Fortitude\''), +(4517, 0, 1, 0, 0, 0, 100, 2, 0, 0, 2400, 3800, 11, 9613, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Death\'s Head Priest - In Combat CMC - Cast \'Shadow Bolt\' (No Repeat)'), +(4517, 0, 2, 0, 2, 0, 100, 2, 0, 40, 14000, 20000, 11, 6063, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Death\'s Head Priest - Between 0-40% Health - Cast \'Heal\' (Normal Dungeon)'), +(4517, 0, 3, 0, 2, 0, 100, 3, 0, 15, 0, 0, 25, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Death\'s Head Priest - Between 0-15% Health - Flee For Assist (No Repeat)'); + +-- Razorfen Warden + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4437; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4437; +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 +(4437, 0, 0, 0, 0, 0, 100, 0, 3500, 7500, 20100, 33400, 11, 6533, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Warden - In Combat - Cast \'Net\' (No Repeat)'); + +-- Raging Agam'ar + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4514; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4514; +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 +(4514, 0, 0, 0, 2, 0, 100, 1, 0, 50, 0, 0, 11, 8269, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Raging Agam\'ar - Between 0-50% Health - Cast \'Frenzy\''); + +-- Agam'ar + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4511; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4511; +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 +(4511, 0, 0, 0, 4, 0, 15, 1, 0, 0, 0, 0, 11, 6268, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Agam\'ar - On Aggro - Cast \'Rushing Charge\' (No Repeat)'); + +-- Blood of Agamaggan + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4541; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4541; +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 +(4541, 0, 0, 0, 0, 0, 100, 0, 5000, 9000, 15000, 25000, 11, 8282, 32, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Blood of Agamaggan - In Combat - Cast \'Curse of Blood\''); + +-- Roogug + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=6168; +DELETE FROM `smart_scripts` WHERE `entryorguid`=6168; +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 +(6168, 0, 0, 0, 0, 0, 100, 0, 0, 40, 3700, 7500, 11, 9532, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Roogug - In Combat CMC - Cast \'Lightning Bolt\''), +(6168, 0, 1, 0, 0, 0, 100, 0, 0, 30, 6000, 8000, 11, 943, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Roogug - In Combat - Cast \'Lightning Bolt\''); + +-- Charlga Razorflank <The Crone> SAI +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4421; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4421 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 +(4421, 0, 0, 0, 4, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Charlga Razorflank - On Aggro - Yell Line 0'), +(4421, 0, 1, 0, 5, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Charlga Razorflank - On Killed Unit - Yell Line 1'), +(4421, 0, 2, 0, 2, 0, 100, 1, 0, 75, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Charlga Razorflank - Between 0-75% Health - Yell Line 2''(No Repeat)'), +(4421, 0, 3, 0, 2, 0, 100, 1, 0, 50, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Charlga Razorflank - Between 0-50% Health - Yell Line 3''(No Repeat)'), +(4421, 0, 4, 0, 2, 0, 100, 1, 0, 25, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Charlga Razorflank - Between 0-25% Health - Yell Line 4''(No Repeat)'), +(4421, 0, 5, 0, 0, 0, 100, 0, 0, 0, 78000, 78000, 11, 8361, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Charlga Razorflank - In combat - Cast \'Purity\''), +(4421, 0, 6, 0, 2, 0, 100, 0, 0, 80, 15000, 18000, 11, 6077, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Charlga Razorflank - Between 0-80% Health - Cast \'Renew\''), +(4421, 0, 7, 0, 0, 0, 100, 0, 6000, 6000, 8000, 8000, 11, 8292, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Charlga Razorflank - In Combat - Cast \'Chain Bolt\''), +(4421, 0, 8, 0, 3, 0, 100, 0, 0, 5, 0, 0, 11, 8358, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Charlga Razorflank - Between 0-5% Mana - Cast \'Mana Spike\''); + +DELETE FROM `creature_text` WHERE `entry`= 4421 AND `groupid` IN (0, 1, 2, 3, 4); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(4421,0,0,"Troublesome whelps. I'll teach you to interfere!", 14,0,100,0,0,0,6179,3,'Charlga Razorflank - on initial aggro'), +(4421,1,0,"Who's next?", 14,0,100,0,0,0,6180,3,'Charlga Razorflank - killing a player'), +(4421,2,0,"You outsiders will pay for encroaching on our land!",14,0,100,0,0,0,6181,3,'Charlga Razorflank - on 75% hp reached'), +(4421,3,0,"Bah! My power rules here!", 14,0,100,0,0,0,6182,3,'Charlga Razorflank - on 50% hp reached'), +(4421,4,0,"Our new allies will avenge us!", 14,0,100,0,0,0,6183,3,'Charlga Razorflank - on 25% hp reached'); diff --git a/sql/updates/world/2016_02_09_02_world.sql b/sql/updates/world/2016_02_09_02_world.sql new file mode 100644 index 00000000000..891c8c2ff4b --- /dev/null +++ b/sql/updates/world/2016_02_09_02_world.sql @@ -0,0 +1,21 @@ +-- Sunblade Mage Guard SAI +SET @ENTRY := 24683; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,1,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Out of Combat - Disable Combat Movement"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,20,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Out of Combat - Stop Attacking"), +(@ENTRY,0,2,0,0,0,100,7,0,0,0,0,11,44475,1,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - In Combat - Cast 'Magic Dampening Field' (No Repeat) (Dungeon)"), +(@ENTRY,0,3,4,9,0,100,0,0,60,5000,5000,11,44478,0,0,0,0,0,2,0,0,0,0,0,0,0,"Sunblade Mage Guard - Within 0-60 Range - Cast 'Glaive Throw'"), +(@ENTRY,0,4,0,61,0,100,0,0,60,5000,5000,40,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Within 0-60 Range - Set Sheath Ranged"), +(@ENTRY,0,5,6,9,0,100,0,45,80,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Within 45-80 Range - Enable Combat Movement"), +(@ENTRY,0,6,0,61,0,100,0,45,80,0,0,20,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Within 45-80 Range - Start Attacking"), +(@ENTRY,0,7,0,9,0,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Within 0-5 Range - Enable Combat Movement"), +(@ENTRY,0,8,9,9,0,100,0,0,0,0,0,40,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Within 0-0 Range - Set Sheath Melee"), +(@ENTRY,0,9,0,61,0,100,0,0,0,0,0,20,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Within 0-0 Range - Start Attacking"), +(@ENTRY,0,10,11,9,0,100,0,5,20,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Within 5-20 Range - Disable Combat Movement"), +(@ENTRY,0,11,0,61,0,100,0,5,20,0,0,20,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Within 5-20 Range - Stop Attacking"), +(@ENTRY,0,12,0,2,0,100,7,0,15,0,0,23,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Between 0-15% Health - Increment Phase (No Repeat) (Dungeon)"), +(@ENTRY,0,13,14,2,0,100,1,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Between 0-15% Health - Enable Combat Movement (No Repeat)"), +(@ENTRY,0,14,0,61,0,100,1,0,15,0,0,25,1,0,0,0,0,0,7,0,0,0,0,0,0,0,"Sunblade Mage Guard - Between 0-15% Health - Flee For Assist (No Repeat)"), +(@ENTRY,0,15,0,7,0,100,0,0,0,0,0,40,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - On Evade - Set Sheath Melee"); diff --git a/sql/updates/world/2016_02_09_02_world_335.sql b/sql/updates/world/2016_02_09_02_world_335.sql new file mode 100644 index 00000000000..a8612c5d88d --- /dev/null +++ b/sql/updates/world/2016_02_09_02_world_335.sql @@ -0,0 +1,29 @@ +-- move script 'npc_myranda_the_hag' to SAI (PR #16438) +UPDATE `gossip_menu_option` SET `option_id`=1 WHERE `menu_id`=3801; +DELETE FROM `gossip_menu` WHERE `entry`=3801 AND `text_id`=4773; +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(3801, 4773); + +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=11872; +DELETE FROM `smart_scripts` WHERE `entryorguid`=11872 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 +(11872, 0, 0, 1, 62, 0, 100, 0, 3801, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Myranda the Hag - On Gossip Option 0 Selected - Close Gossip'), +(11872, 0, 1, 0, 61, 0, 100, 0, 3801, 0, 0, 0, 85, 17961, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Myranda the Hag - On Gossip Option 0 Selected - Invoker Cast \'Scarlet Illusion\''); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=3801; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=3801; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 3801, 0, 0, 0, 28, 0, 5862, 0, 0, 0, 0, 0, '', 'Only show gossip menu option if quest \'Scarlet Subterfuge\' is complete'), +(15, 3801, 0, 0, 0, 28, 0, 5944, 0, 0, 1, 0, 0, '', 'Only show gossip menu option if quest \'In Dreams\' is not complete'), +(15, 3801, 0, 0, 0, 8, 0, 5944, 0, 0, 1, 0, 0, '', 'Only show gossip menu option if quest \'In Dreams\' is not rewarded'), +(15, 3801, 0, 0, 0, 1, 0, 17961, 0, 0, 1, 0, 0, '', 'Only show gossip menu option if no \'Scarlet Illusion\' Aura'), +(15, 3801, 0, 0, 1, 8, 0, 5862, 0, 0, 0, 0, 0, '', 'Only show gossip menu option if quest \'Scarlet Subterfuge\' is rewarded'), +(15, 3801, 0, 0, 1, 28, 0, 5944, 0, 0, 1, 0, 0, '', 'Only show gossip menu option if quest \'In Dreams\' is not complete'), +(15, 3801, 0, 0, 1, 8, 0, 5944, 0, 0, 1, 0, 0, '', 'Only show gossip menu option if quest \'In Dreams\' is not rewarded'), +(15, 3801, 0, 0, 1, 1, 0, 17961, 0, 0, 1, 0, 0, '', 'Only show gossip menu option if no \'Scarlet Illusion\' Aura'), +(14, 3801, 4773, 0, 0, 28, 0, 5862, 0, 0, 0, 0, 0, '', 'Only show text if quest \'Scarlet Subterfuge\' is complete'), +(14, 3801, 4773, 0, 0, 28, 0, 5944, 0, 0, 1, 0, 0, '', 'Only show text if quest \'In Dreams\' is not complete'), +(14, 3801, 4773, 0, 0, 8, 0, 5944, 0, 0, 1, 0, 0, '', 'Only show text if quest \'In Dreams\' is not rewarded'), +(14, 3801, 4773, 0, 1, 8, 0, 5862, 0, 0, 0, 0, 0, '', 'Only show text if quest \'Scarlet Subterfuge\' is rewarded'), +(14, 3801, 4773, 0, 1, 28, 0, 5944, 0, 0, 1, 0, 0, '', 'Only show text if quest \'In Dreams\' is not complete'), +(14, 3801, 4773, 0, 1, 8, 0, 5944, 0, 0, 1, 0, 0, '', 'Only show text if quest \'In Dreams\' is not rewarded'); diff --git a/sql/updates/world/2016_02_09_03_world.sql b/sql/updates/world/2016_02_09_03_world.sql new file mode 100644 index 00000000000..bd012f0d172 --- /dev/null +++ b/sql/updates/world/2016_02_09_03_world.sql @@ -0,0 +1,124 @@ +-- +-- DB/Quest: Translation to Ello +DELETE FROM `waypoints` WHERE `entry`=412; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`) VALUES +(412, 1, -10290.1, 73.7148, 38.849), +(412, 2, -10290.4, 81.547, 38.7702), +(412, 3, -10283.2, 86.6661, 38.7694), +(412, 4, -10271.1, 83.5772, 39.1122), +(412, 5, -10266, 76.0585, 39.4047), +(412, 6, -10272.4, 65.7703, 39.524), +(412, 7, -10283.4, 59.1681, 40.6902), +(412, 8, -10300.2, 45.8306, 47.3053), +(412, 9, -10315.3, 45.1015, 48.0097), +(412, 10, -10324.4, 38.7441, 47.3935), +(412, 11, -10330.2, 27.0829, 50.5753), +(412, 12, -10335.3, 13.4164, 50.1259), +(412, 13, -10342.2, 3.3501, 51.1675), +(412, 14, -10354.6, -13.0266, 47.1154), +(412, 15, -10379.4, -27.1456, 49.2841), +(412, 16, -10401, -30.8108, 48.1353), +(412, 17, -10416.5, -28.4794, 48.4772), +(412, 18, -10436.4, -34.2376, 46.5064), +(412, 19, -10468.7, -38.8985, 48.7035), +(412, 20, -10500.2, -44.6662, 45.882), +(412, 21, -10539.1, -39.3422, 43.0622), +(412, 22, -10568, -35.1434, 37.2048), +(412, 23, -10585.6, -37.5056, 37.4296), +(412, 24, -10606.3, -51.7202, 36.0713), +(412, 25, -10629.2, -64.211, 32.6163), +(412, 26, -10645.9, -73.4561, 32.7337), +(412, 27, -10671, -81.8316, 35.6535), +(412, 28, -10687.6, -85.57, 34.1549), +(412, 29, -10702.8, -89.2772, 37.9242), +(412, 30, -10709.1, -97.5837, 37.892), +(412, 31, -10725.6, -101.348, 34.5892), +(412, 32, -10748, -99.1517, 38.2323), +(412, 33, -10759.9, -93.0657, 38.5876), +(412, 34, -10774.9, -89.8001, 34.8007), +(412, 35, -10788.6, -86.7376, 33.4988), +(412, 36, -10802.7, -88.6347, 29.0679), +(412, 37, -10811.5, -97.1736, 29.2451), +(412, 38, -10821.4, -121.335, 30.142), +(412, 39, -10826.2, -134.391, 31.7845), +(412, 40, -10830.6, -148.284, 31.7985), +(412, 41, -10835.3, -164.201, 33.8299), +(412, 42, -10840.4, -182.63, 34.0254), +(412, 43, -10843.3, -193.104, 35.8227), +(412, 44, -10848.7, -215.175, 37.7986), +(412, 45, -10851.7, -235.779, 38.6853), +(412, 46, -10857.4, -264.019, 38.0974), +(412, 47, -10866.6, -293.454, 37.9429), +(412, 48, -10882.9, -332.562, 37.9688), +(412, 49, -10900, -365.26, 39.4542), +(412, 50, -10904.1, -393.833, 41.0451), +(412, 51, -10905.7, -431.964, 42.7237), +(412, 52, -10908, -461.901, 46.7191), +(412, 53, -10911.2, -510.492, 52.0594), +(412, 54, -10915.1, -533.78, 53.8047), +(412, 55, -10927, -565.685, 54.042), +(412, 56, -10936.5, -581.62, 53.8887), +(412, 57, -10950.1, -597.371, 55.177), +(412, 58, -10957.9, -619.554, 55.0689), +(412, 59, -10958.8, -637.183, 55.2047), +(412, 60, -10954.3, -652.46, 55.4423), +(412, 61, -10931.8, -681.568, 55.3955), +(412, 62, -10916.9, -710.733, 55.6988), +(412, 63, -10902.9, -734.1, 55.1313), +(412, 64, -10878.3, -760.091, 55.5638), +(412, 65, -10851.1, -787.76, 56.1885), +(412, 66, -10831.9, -818.655, 56.2795), +(412, 67, -10825.2, -833.223, 55.5758), +(412, 68, -10808.3, -873.497, 55.9567), +(412, 69, -10796.7, -912.719, 55.8731), +(412, 70, -10796.1, -934.562, 56.2303), +(412, 71, -10800.5, -949.721, 56.5614), +(412, 72, -10807.1, -969.027, 56.2941), +(412, 73, -10806.8, -992.166, 53.8349), +(412, 74, -10804.6, -1030.41, 47.0768), +(412, 75, -10801.3, -1047.26, 44.0233), +(412, 76, -10787.8, -1074.49, 37.7652), +(412, 77, -10783.3, -1095.07, 33.6488), +(412, 78, -10781.2, -1112.66, 30.3863), +(412, 79, -10763.6, -1138.91, 27.0977), +(412, 80, -10738, -1158.02, 26.4475), +(412, 81, -10705.3, -1179.29, 26.3723), +(412, 82, -10682.3, -1190.45, 27.2793), +(412, 83, -10662.5, -1193.06, 28.2884), +(412, 84, -10641.6, -1189.92, 28.5594), +(412, 85, -10615.7, -1182.78, 28.5022), +(412, 86, -10586.8, -1177.32, 28.3931), +(412, 87, -10576.4, -1179.26, 28.1946), +(412, 88, -10566.7, -1189.27, 27.8756), +(412, 89, -10557, -1192.38, 28.0606), +(412, 90, -10550.4, -1185.71, 27.8428), +(412, 91, -10554.4, -1167.97, 27.5984); + +-- Lord Ello Ebonlocke SAI +SET @ENTRY := 263; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,1,0,100,0,20000,30000,120000,120000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lord Ello Ebonlocke - Out of Combat - Say Line 0"), +(@ENTRY,0,1,0,20,0,100,0,252,0,0,0,12,412,3,3600000,0,0,0,8,0,0,0,-10290.171875,72.781136,38.881119,4.801499,"Lord Ello Ebonlocke - On Quest 'Translation to Ello' Finished - Summon Creature 'Stitches'"); + +-- Stitches SAI +SET @ENTRY := 412; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,0,6900,12100,3500,11300,11,3106,0,0,0,0,0,2,0,0,0,0,0,0,0,"Stitches - In Combat - Cast 'Aura of Rot'"), +(@ENTRY,0,1,2,54,0,100,0,0,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stitches - On Just Summoned - Set Active On"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,53,1,412,0,0,0,2,0,0,0,0,0,0,0,0,"Stitches - On Just Summoned - Start Waypoint"), +(@ENTRY,0,3,0,40,0,100,0,47,412,0,0,1,0,0,0,0,0,0,19,468,200,0,0,0,0,0,"Stitches - On Waypoint 47 Reached - Say Line 0"), +(@ENTRY,0,5,6,40,0,100,0,50,412,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stitches - On Waypoint 50 Reached - Say Line 0"), +(@ENTRY,0,6,0,61,0,100,0,50,412,0,0,1,1,0,0,0,0,0,19,468,200,0,0,0,0,0,"Stitches - On Waypoint 50 Reached - Say Line 1"), +(@ENTRY,0,7,8,40,0,100,0,91,412,0,0,101,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stitches - On Waypoint 91 Reached - Set Home Position"), +(@ENTRY,0,8,0,61,0,100,0,91,412,0,0,89,20,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stitches - On Waypoint 91 Reached - Start Random Movement"); + +DELETE FROM `creature_text` WHERE `entry` IN (468, 412); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextId`) VALUES +(468, 0, 0, 'An abomination of the undead is approaching!', 14, 0, 100, 0, 0, 0, 'Guard', 89), +(468, 1, 0, 'The abomination has overrun the Night Watch camp! Quickly, we must intercept it before it reaches town!', 14, 0, 100, 0, 0, 0, 'Guard', 90), +(412, 0, 0, 'ROARRRRR!!', 14, 0, 100, 0, 0, 0, 'Stitches', 278), +(412, 0, 1, 'DARKSHIRE... I HUNGER!!', 14, 0, 100, 0, 0, 0, 'Stitches', 277); diff --git a/sql/updates/world/2016_02_09_04_world.sql b/sql/updates/world/2016_02_09_04_world.sql new file mode 100644 index 00000000000..015ab519557 --- /dev/null +++ b/sql/updates/world/2016_02_09_04_world.sql @@ -0,0 +1,5 @@ +-- +SET @SPELL_ATTR0_CU_ALLOW_INFLIGHT_TARGET := 262144; +DELETE FROM `spell_custom_attr` WHERE `entry`=43419; +INSERT INTO `spell_custom_attr` (`entry`, `attributes`) VALUES +(43419, @SPELL_ATTR0_CU_ALLOW_INFLIGHT_TARGET); diff --git a/sql/updates/world/2016_02_09_05_world.sql b/sql/updates/world/2016_02_09_05_world.sql new file mode 100644 index 00000000000..3612c270d02 --- /dev/null +++ b/sql/updates/world/2016_02_09_05_world.sql @@ -0,0 +1,62 @@ +-- +-- DB/Quest: Absholutely... Thish Will Work (11330) +SET @Prisoner :=24284; -- Dragonflayer Vrykul Prisoner +SET @PeppysMix :=43386; -- Spell Peppy's Special Mix +SET @WGDefender :=23842; -- Westguard Defender +SET @WGDguid1 :=99009; -- Westguard Defender Guid 1 +SET @WGDguid2 :=99010; -- Westguard Defender Guid 2 +SET @WGDguid3 :=99008; -- Westguard Defender Guid 3 +SET @WGDguid4 :=99013; -- Westguard Defender Guid 4 +SET @WGOfficer :=23844; -- Westguard Officer +SET @WGOguid :=99195; -- Westguard Officer Guid +SET @HumoVerde :=18951; -- Spirit Particles (green) / humo verde +SET @CuerpoVerde:=39168; -- Vertex Color Green / efecto verde +SET @MocoVerde :=28989; -- Plague Slime (Green) / Morph de Moco-Ooze +SET @Crazed :=48147; -- Crazed (enrage) - Only Defender +SET @Defensive :=7164; -- Defensive stance +SET @ImpBlocking:=3639; -- improved blocking +SET @ShieldBash :=11972; -- Shield Bash +SET @Shoot :=6660; -- Shoot +SET @DemorlShout:=16244; -- Demoralizing Shout - Only Officer + +UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry` IN (@Prisoner,@WGDefender,@WGOfficer); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@Prisoner,@WGDefender,@WGOfficer) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@Prisoner*100) AND `source_type`=9; +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 +(@Prisoner,0,0,0,8,0,100,0,@PeppysMix,0,0,0,80,@Prisoner*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - On Spell Hit (Olakin''s Torch) - Run Script'), +(@Prisoner*100,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Say'), +(@Prisoner*100,9,1,0,0,0,100,0,3000,3000,0,0,11,@HumoVerde,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Cast Spirit Particles (green)'), +(@Prisoner*100,9,2,0,0,0,100,0,1000,1000,0,0,45,1,1,0,0,0,0,10,@WGDguid1,@WGDefender,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Set Data to Westguard Defender'), +(@Prisoner*100,9,3,0,0,0,100,0,3000,3000,0,0,45,1,1,0,0,0,0,10,@WGDguid3,@WGDefender,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Set Data to Westguard Defender'), +(@Prisoner*100,9,4,0,0,0,100,0,2000,2000,0,0,11,@CuerpoVerde,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Vertex Color Green'), +(@Prisoner*100,9,5,0,0,0,100,0,2000,2000,0,0,45,1,1,0,0,0,0,10,@WGDguid2,@WGDefender,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Set Data to Westguard Defender'), +(@Prisoner*100,9,6,0,0,0,100,0,3000,3000,0,0,45,1,1,0,0,0,0,10,@WGDguid4,@WGDefender,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Set Data to Westguard Defender'), +(@Prisoner*100,9,7,0,0,0,100,0,2000,2000,0,0,11,@MocoVerde,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Plague Slime (Green)'), +(@Prisoner*100,9,8,0,0,0,100,0,3000,3000,0,0,45,1,1,0,0,0,0,10,@WGOguid,@WGOfficer,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Set Data to Westguard Defender'), +(@Prisoner*100,9,9,0,0,0,100,0,2000,2000,0,0,33,@Prisoner,0,0,0,0,0,7,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Call Killedmonster'), +(@Prisoner*100,9,10,0,0,0,100,0,20000,20000,0,0,28,@HumoVerde,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Remove Spirit Particles'), +(@Prisoner*100,9,11,0,0,0,100,0,0,0,0,0,28,@CuerpoVerde,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Remove Vertex Color Green'), +(@Prisoner*100,9,12,0,0,0,100,0,0,0,0,0,28,@MocoVerde,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Remove Plage Slime'), +(@WGDefender,0,0,0,38,0,100,0,1,1,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - On Data set - Say'), +(@WGDefender,0,1,0,0,0,100,0,5000,15000,20000,40000,11,@Crazed,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast Crazed'), +(@WGDefender,0,2,0,0,0,100,1,500,500,0,0,11,@Defensive,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast Defensive'), +(@WGDefender,0,3,0,0,0,100,0,1000,3000,10400,10400,11,@ImpBlocking,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast Improved Blocking'), +(@WGDefender,0,4,0,0,0,100,0,2000,5000,10000,21000,11,@ShieldBash,0,0,0,0,0,2,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast ShieldBash'), +(@WGDefender,0,5,0,0,0,100,0,0,5000,1000,6000,11,@Shoot,0,0,0,0,0,2,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast Shoot'), +(@WGOfficer,0,0,0,38,0,100,0,1,1,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Officer - On Data set - Say'), +(@WGOfficer,0,1,0,0,0,100,0,10000,15000,20000,30000,11,@DemorlShout,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Officer - IC - Cast Demoralizing Shout'), +(@WGOfficer,0,2,0,0,0,100,1,500,500,0,0,11,@Defensive,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Officer - IC - Cast Defensive'), +(@WGOfficer,0,3,0,0,0,100,0,1000,3000,10400,10400,11,@ImpBlocking,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Officer - IC - Cast Improved Blocking'), +(@WGOfficer,0,4,0,0,0,100,0,2000,5000,8000,21000,11,@ShieldBash,0,0,0,0,0,2,0,0,0,0,0,0,0,'Westguard Officer - IC - Cast ShieldBash'), +(@WGOfficer,0,5,0,0,0,100,0,0,5000,1000,6000,11,@Shoot,0,0,0,0,0,2,0,0,0,0,0,0,0,'Westguard Officer - IC - Cast Shoot'); + +DELETE FROM `creature_text` WHERE `entry` IN (@Prisoner,@WGDefender,@WGOfficer); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(@Prisoner,0,0,'The vrykul clutches at his throat as he begins to gag and thrash about.',16,0,100,1,0,0,'Dragonflayer Vrykul Prisoner', 23087), +(@WGOfficer,0,0,'Is he okay?',12,0,100,1,0,0,'Westguard Officer - Say', 23105), +(@WGDefender,0,0,'Yikes.',12,0,100,1,0,0,'Westguard Defender - Say', 23104), +(@WGDefender,0,1,'Captain''s not gonna like this.',12,0,100,1,0,0,'Westguard Defender - Say', 23106), +(@WGDefender,0,2,'What kind of sicko are you?',12,0,100,1,0,0,'Westguard Defender - Say', 23095), +(@WGDefender,0,3,'Heh, cool!',12,0,100,1,0,0,'Westguard Defender - Say', 23094), +(@WGDefender,0,4,'That''s the new Forsaken plague?',12,0,100,1,0,0,'Westguard Defender - Say', 23098), +(@WGDefender,0,5,'Oh, sick!',12,0,100,1,0,0,'Westguard Defender - Say', 23091); diff --git a/sql/updates/world/2016_02_09_06_world.sql b/sql/updates/world/2016_02_09_06_world.sql new file mode 100644 index 00000000000..03fe998cca5 --- /dev/null +++ b/sql/updates/world/2016_02_09_06_world.sql @@ -0,0 +1,14 @@ +-- Karazhan Optional Boss spawn +-- Hyakiss the Lurker SAI +SET @ENTRY := 16179; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,0,5000,5000,35000,35000,11,29901,0,0,0,0,0,2,0,0,0,0,0,0,0,"Hyakiss the Lurker - In Combat - Cast 'Acidic Fang'"); + +-- Rokad the Ravager SAI +SET @ENTRY := 16181; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,0,2000,3000,12000,15000,11,29906,0,0,0,0,0,2,0,0,0,0,0,0,0,"Rokad the Ravager - In Combat - Cast 'Ravage'"); diff --git a/sql/updates/world/2016_02_09_07_world.sql b/sql/updates/world/2016_02_09_07_world.sql new file mode 100644 index 00000000000..84d65e2eda5 --- /dev/null +++ b/sql/updates/world/2016_02_09_07_world.sql @@ -0,0 +1,77 @@ +UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry` IN(23842,24284); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(23842,24284) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(23844) AND `source_type`=0 AND `id`=0; + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(2428400,2428401,2384200) AND `source_type`=9; + +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 +(23842,0,0,0,38,0,30,0,1,1,0,0,80,2384200,2,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - On Data Set - Run Script'), +(23842,0,1,0,0,0,100,0,5000,15000,20000,40000,11,48147,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast Crazed'), +(23842,0,2,0,0,0,100,1,500,500,0,0,11,7164,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast Defensive'), +(23842,0,3,0,0,0,100,0,1000,3000,10400,10400,11,3639,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast Improved Blocking'), +(23842,0,4,0,0,0,100,0,2000,5000,10000,21000,11,11972,0,0,0,0,0,2,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast ShieldBash'), +(23842,0,5,0,0,0,100,0,0,5000,1000,6000,11,6660,0,0,0,0,0,2,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast Shoot'), +(24284,0,0,0,8,0,100,0,43386,0,0,0,80,2428400,2,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - On Spell Hit (Peppys Special Mix) - Run Script'), +(24284,0,1,2,40,0,100,0,1,24284,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - On Reached WP1 - Say Line 0'), +(24284,0,2,0,61,0,100,0,0,0,0,0,54,1000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - On Reached WP1 - Pause WP'), +(24284,0,3,4,40,0,100,0,9,24284,0,0,11,43401,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - On Reached WP9 - Cast Cosmetic - Blood Explosion Green - Large'), +(24284,0,4,5,61,0,100,0,0,0,0,0,3,0,1145,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - On Reached WP9 - Change displayid to 1145'), +(24284,0,5,0,61,0,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - On Reached WP9 - Set Phase 2'), +(24284,0,6,0,1,2,100,1,4000,4000,0,0,80,2428401,2,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - OOC (Phase 2) - Run Script'), +(2384200,9,0,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,19,24288,0,0,0,0,0,0,'Westguard Defender - Script - Face Target'), -- 19:36:43.046 +(2384200,9,1,0,0,0,100,0,0,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - Script - Set Bytes 1'), -- 19:36:43.046 +(2384200,9,2,0,0,0,100,0,1000,1000,0,0,11,43391,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - Script - Cast Vomit'), -- 19:36:44.231 +(2384200,9,3,0,0,0,100,0,9000,9000,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - Script - Set Bytes 1'), -- 19:36:53.872 +(2384200,9,4,0,0,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - Script - Evade'), +(2428401,9,0,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,10,99027,23842,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script 2 - Say'), +(2428401,9,1,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,10,99023,23842,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script 2 - Say'), +(2428401,9,2,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,10,99012,23842,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script 2 - Say'), +(2428401,9,3,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,10,99010,23842,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script 2 - Say'), +(2428401,9,4,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,10,99024,23842,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script 2 - Say'), +(2428401,9,5,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,10,99026,23842,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script 2 - Say'), +(2428401,9,6,0,0,0,100,0,0,0,0,0,45,1,1,0,0,0,0,9,23842,0,80,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script 2 - Set Data'), +(2428401,9,7,0,0,0,100,0,1000,1000,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script 2 - Cast Suicide, No Blood, No Logging'), +(2428400,9,0,0,0,0,100,0,0,0,0,0,5,7,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Play Emote (OneShotEat)'), -- 19:36:18.195 +(2428400,9,1,0,0,0,100,0,0,0,0,0,71,0,0,2200,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Equip item 2200 to Slot 1'), -- 19:36:18.195 +(2428400,9,2,0,0,0,100,0,2800,2800,0,0,11,21862,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Cast Radiation'), -- 19:36:20.925 +(2428400,9,3,0,0,0,100,0,0,0,0,0,33,24284,0,0,0,0,0,7,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Give Quest Credit'), +(2428400,9,4,0,0,0,100,0,0,0,0,0,71,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - UnEquip item'), -- 19:36:20.925 +(2428400,9,5,0,0,0,100,0,0,0,0,0,91,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Remove Bytes 1'), -- 19:36:20.925 +(2428400,9,6,0,0,0,100,0,3200,3200,0,0,4,9110,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Play Sound 9110'), -- 19:36:23.421 +(2428400,9,7,0,0,0,100,0,0,0,0,0,5,53,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Play Emote OneShotBattleRoar'), -- 19:36:23.421 +(2428400,9,8,0,0,0,100,0,1200,1200,0,0,53,0,24284,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Start WP'), -- 19:36:24.622 +(2428400,9,9,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,10,99027,23842,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Say'), -- 19:36:24.622 +(2428400,9,10,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,10,99023,23842,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Say'), -- 19:36:24.622 +(2428400,9,11,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,10,99012,23842,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Say'); -- 19:36:24.622 + + +DELETE FROM `waypoints` WHERE `entry`=24284; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(24284, 1, 1366.673, -3179.636, 153.576, 'Dragonflayer Vrykul Prisoner'), +(24284, 2, 1367.06, -3177.925, 153.576, 'Dragonflayer Vrykul Prisoner'), +(24284, 3, 1368.679, -3181.09, 153.576, 'Dragonflayer Vrykul Prisoner'), +(24284, 4, 1367.308, -3179.079, 153.576, 'Dragonflayer Vrykul Prisoner'), +(24284, 5, 1366.374, -3179.791, 153.576, 'Dragonflayer Vrykul Prisoner'), +(24284, 6, 1365.373, -3179.188, 153.576, 'Dragonflayer Vrykul Prisoner'), +(24284, 7, 1365.733, -3179.677, 153.576, 'Dragonflayer Vrykul Prisoner'), +(24284, 8, 1366.468, -3176.728, 153.576, 'Dragonflayer Vrykul Prisoner'), +(24284, 9, 1365.269, -3181.054, 153.576, 'Dragonflayer Vrykul Prisoner'); + +DELETE FROM `creature_text` WHERE `entry`IN(24284,23842); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `comment`) VALUES +(24284, 0, 0, 'The vrykul clutches at his throat as he begins to gag and thrash about.', 16, 0, 100, 53, 0, 0, 23087, 'Dragonflayer Vrykul Prisoner to Player'), +(23842, 0, 0, 'Uh...?', 12, 7, 100, 1, 0, 0, 23103, 'Westguard Defender to Player'), +(23842, 0, 1, 'Interesting.', 12, 7, 100, 1, 0, 0, 23107, 'Westguard Defender to Player'), +(23842, 0, 2, 'Yikes.', 12, 7, 100, 0, 0, 0, 23104, 'Westguard Defender to Player'), +(23842, 0, 3, 'Is he okay?', 12, 7, 100, 0, 0, 0, 23105, 'Westguard Defender to Player'), +(23842, 0, 4, 'Captain''s not gonna like this.', 12, 7, 100, 0, 0, 0, 23106, 'Westguard Defender to Player'), +(23842, 0, 5, 'Whoa.', 12, 7, 100, 0, 0, 0, 23108, 'Westguard Defender to Player'), +(23842, 1, 0, 'I didn''t know they could do that.', 12, 7, 100, 1, 0, 0, 23096, 'Westguard Defender to Player'), +(23842, 1, 1, 'That''s... special.', 12, 7, 100, 1, 0, 0, 23097, 'Westguard Defender to Player'), +(23842, 1, 2, 'Heh, cool!', 12, 7, 100, 1, 0, 0, 23094, 'Westguard Defender to Player'), +(23842, 1, 3, 'That''s the new Forsaken plague?', 12, 7, 100, 1, 0, 0, 23098, 'Westguard Defender to Player'), +(23842, 1, 4, 'What kind of sicko are you?', 12, 7, 100, 1, 0, 0, 23095, 'Westguard Defender to Player'), +(23842, 1, 5, 'Oh, sick!', 12, 7, 100, 1, 0, 0, 23091, 'Westguard Defender to Player'), +(23842, 1, 6, 'I feel ill.', 12, 7, 100, 1, 0, 0, 23093, 'Westguard Defender to Player'), +(23842, 1, 7, 'That did NOT just happen!', 12, 7, 100, 1, 0, 0, 23092, 'Westguard Defender to Player'); + diff --git a/sql/updates/world/2016_02_09_08_world.sql b/sql/updates/world/2016_02_09_08_world.sql new file mode 100644 index 00000000000..307a9f9a0b3 --- /dev/null +++ b/sql/updates/world/2016_02_09_08_world.sql @@ -0,0 +1 @@ +UPDATE `gameobject` SET `state`=1 WHERE `guid`=61216; diff --git a/sql/updates/world/2016_02_10_00_world.sql b/sql/updates/world/2016_02_10_00_world.sql new file mode 100644 index 00000000000..872861b08dc --- /dev/null +++ b/sql/updates/world/2016_02_10_00_world.sql @@ -0,0 +1,18 @@ +-- Pathing for Kalecgos Entry: 24844 'TDB FORMAT' +SET @NPC := 24844; +SET @PATH := @NPC * 10; +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,163.9735,-398.0906,2.083333,0,0,0,0,100,0), -- 16:16:43 +(@PATH,2,164.3802,-397.1771,2.083333,0,0,0,0,100,0), -- 16:16:43 +(@PATH,3,162.7923,-386.1964,15.67094,0,0,0,0,100,0), -- 16:16:43 +(@PATH,4,151.5555,-345.349,5.92646,0,0,0,0,100,0), -- 16:16:43 +(@PATH,5,162.2416,-299.8032,-5.436685,0,0,0,0,100,0), -- 16:16:43 +(@PATH,6,199.7482,-272.3315,-7.186677,0,0,0,0,100,0), -- 16:16:43 +(@PATH,7,199.7482,-272.3315,-7.186677,0,0,0,0,100,0), -- 16:16:43 +(@PATH,8,199.7482,-272.3315,-7.186677,0.06981317,0,0,0,100,0); -- 16:16:54 +-- 0x1C2F2C4920184300001F1D000038BF6E .go 163.9735 -398.0906 2.083333 + +DELETE FROM `creature_text` WHERE `entry` = 24844 AND `groupid` = 0; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(24844, 0, 0, 'Be still, mortals, and hearken to my words.', 14, 0, 100, 0, 0, 0, 23936, 3, 'Kalecgos - SAY_KALECGOS_SPAWN'); diff --git a/sql/updates/world/2016_02_10_01_world.sql b/sql/updates/world/2016_02_10_01_world.sql new file mode 100644 index 00000000000..9ffe2e81c1c --- /dev/null +++ b/sql/updates/world/2016_02_10_01_world.sql @@ -0,0 +1,21 @@ +-- Nethurbian Crater KC Bunny SAI +SET @ENTRY := 28352; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,8,0,100,0,51381,0,180000,180000,33,28352,0,0,0,0,0,7,0,0,0,0,0,0,0,"Nethurbian Crater KC Bunny - On Spellhit 'Toss Grenade' - Quest Credit ''"), +(@ENTRY,0,1,0,61,0,100,0,51381,0,180000,180000,45,1,1,0,0,0,0,20,190555,2,0,0,0,0,0,"Nethurbian Crater KC Bunny - On Spellhit 'Toss Grenade' - Set Data 1 1"); + +-- Nerubian Crater SAI +SET @ENTRY := 190555; +UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,1,0,0,38,0,100,0,1,1,0,0,80,@ENTRY*100+00,2,0,0,0,0,1,0,0,0,0,0,0,0,"Nerubian Crater - On Data Set 1 1 - Run Script"); + +-- Actionlist SAI +SET @ENTRY := 19055500; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,44,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Set Phase 2"), +(@ENTRY,9,1,0,0,0,100,0,180000,180000,0,0,44,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Set Phase 1"); diff --git a/sql/updates/world/2016_02_10_02_world.sql b/sql/updates/world/2016_02_10_02_world.sql new file mode 100644 index 00000000000..92ee165dd83 --- /dev/null +++ b/sql/updates/world/2016_02_10_02_world.sql @@ -0,0 +1,19 @@ +DELETE FROM `gossip_menu_option` WHERE `menu_id`=9546; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES +(9546, 0, 2, 'Where would you like to fly to?', 10753, 4, 8192, 0, 0, 0, 0, '', 0), +(9546, 1, 0, 'I need to get to Wintergarde Keep fast!', 26697, 1, 1, 0, 0, 0, 0, '', 0), +(9546, 2, 0, 'Greer, I need a gryphon to ride and some bombs to drop on New Agamand!', 23112, 1, 1, 0, 0, 0, 0, '', 0); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9546; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 9546, 1, 0, 0, 28, 0, 12298, 0, 0, 0, 0, 0, '', 'Greer Orehammer - Show gossip option only if player has taken quest 12298'), +(15, 9546, 2, 0, 0, 9, 0, 11332, 0, 0, 0, 0, 0, '', 'Greer Orehammer - Show gossip option only if player has taken quest 11332'); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=23859 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 +(23859, 0, 0, 0, 4, 0, 100, 0, 0, 0, 0, 0, 80, 2385900, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Greer Orehammer - On Aggro - Run Script'), +(23859, 0, 1, 2, 62, 0, 100, 0, 9546, 2, 0, 0, 56, 33634, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Greer Orehammer - On Gossip Option 1 Selected - Add Item \'Orehammer\'s Precision Bombs\' 10 Times'), +(23859, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 52, 745, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Greer Orehammer - On Gossip Option 1 Selected - Cast \'High Commander Halford Wyrmbane: Westguard Keep to Wintergarde Keep Taxi\''), +(23859, 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, 'Greer Orehammer - On Gossip Option 1 Selected - Close Gossip'), +(23859, 0, 4, 5, 62, 0, 100, 0, 9546, 1, 0, 0, 11, 48862, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Greer Orehammer - On gossip select - Invoker spellcast'), +(23859, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Greer Orehammer - On gossip select - Close gossip'); diff --git a/sql/updates/world/2016_02_10_03_world.sql b/sql/updates/world/2016_02_10_03_world.sql new file mode 100644 index 00000000000..f52872c3431 --- /dev/null +++ b/sql/updates/world/2016_02_10_03_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `gameobject` SET `spawnmask`=1 WHERE `map`=229; diff --git a/sql/updates/world/2016_02_10_04_world.sql b/sql/updates/world/2016_02_10_04_world.sql new file mode 100644 index 00000000000..1349b83f442 --- /dev/null +++ b/sql/updates/world/2016_02_10_04_world.sql @@ -0,0 +1,6 @@ +-- Honor among thieves +DELETE FROM `spell_script_names` WHERE `scriptname` = 'spell_rog_honor_among_thieves'; +DELETE FROM `spell_script_names` WHERE `scriptname` = 'spell_rog_honor_among_thieves_proc'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(-51698, 'spell_rog_honor_among_thieves'), +(52916, 'spell_rog_honor_among_thieves_proc'); diff --git a/sql/updates/world/2016_02_10_05_world.sql b/sql/updates/world/2016_02_10_05_world.sql new file mode 100644 index 00000000000..c19dd8feb06 --- /dev/null +++ b/sql/updates/world/2016_02_10_05_world.sql @@ -0,0 +1,7 @@ +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=47482; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 47482, 0, 0, 21, 0, 1024, 0, 0, 1, 103, 0, '', 'Ghoul Leap - not using Ghoul Leap while rooted'); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=49376; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 49376, 0, 0, 21, 0, 1024, 0, 0, 1, 103, 0, '', 'Cat charge - not using Cat charge while rooted'); diff --git a/sql/updates/world/2016_02_10_06_world.sql b/sql/updates/world/2016_02_10_06_world.sql new file mode 100644 index 00000000000..9e24ab31ce1 --- /dev/null +++ b/sql/updates/world/2016_02_10_06_world.sql @@ -0,0 +1,26 @@ +UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry` IN(24283); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(24283) AND `source_type`=0; + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(2428300) AND `source_type`=9; + +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 +(24283,0,0,0,20,1,100,0,11328,0,0,0,80,2428300,2,0,0,0,0,1,0,0,0,0,0,0,0,'Peppy Wrongnozzle - On Quest Reward (Mission: Forsaken Intel) - Run Script'), +(24283,0,1,0,25,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Peppy Wrongnozzle - On Spawn - Set Phase 1'), +(24283,0,2,0,1,1,100,0,8000,10000,8000,10000,5,92,0,0,0,0,0,1,0,0,0,0,0,0,0,'Peppy Wrongnozzle - OOC (Phase 1) - Play emote OneShotEatNoSheathe'), +(2428300,9,0,0,0,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Peppy Wrongnozzle - Script - Set Phase 2'), +(2428300,9,1,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Peppy Wrongnozzle - Script - Face Player '), -- 19:35:27.323 +(2428300,9,2,0,0,0,100,0,0,0,0,0,71,0,0,2200,3698,0,0,1,0,0,0,0,0,0,0,'Peppy Wrongnozzle - Script - Equip item 2200 to Slot 1 & 3698 to slot 2'), -- 19:35:27.573 +(2428300,9,3,0,0,0,100,0,700,700,0,0,17,133,0,0,0,0,0,1,0,0,0,0,0,0,0,'Peppy Wrongnozzle - Script - Set Emote state 133'), -- 19:35:29.226 +(2428300,9,4,0,0,0,100,0,5000,5000,0,0,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Peppy Wrongnozzle - Script - Set Emote state 0'), -- 19:35:34.405 +(2428300,9,5,0,0,0,100,0,1300,1300,0,0,71,0,0,2705,0,0,0,1,0,0,0,0,0,0,0,'Peppy Wrongnozzle - Script - Equip item 2705 to Slot 1 & Unequip slot 2'), -- 19:35:35.638 +(2428300,9,6,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Peppy Wrongnozzle - Script - Say Line 0'), -- 19:35:35.638 +(2428300,9,7,0,0,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Peppy Wrongnozzle - Script - Set Phase 1'), +(2428300,9,8,0,0,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Peppy Wrongnozzle - Script - Evade'); + +DELETE FROM `creature_template_addon` WHERE `entry`=24283; +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(24283, 0, 0x0, 0x101, '35777'); -- 24283 - 35777 + +DELETE FROM `creature_text` WHERE `entry`IN(24283); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `comment`) VALUES +(24283, 0, 0, 'Right, that should do it. I think ...hic.', 12, 7, 100, 396, 0, 0, 23086, 'Peppy Wrongnozzle to Player'); diff --git a/sql/updates/world/2016_02_10_07_world.sql b/sql/updates/world/2016_02_10_07_world.sql new file mode 100644 index 00000000000..5feb4f44163 --- /dev/null +++ b/sql/updates/world/2016_02_10_07_world.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `command` WHERE `name`="debug raidreset"; +INSERT INTO `command` (`name`,`permission`,`help`) VALUES ("debug raidreset",414,"Syntax: .debug raidreset mapid [difficulty] +Forces a global reset of the specified map on all difficulties (or only the specific difficulty if specified). Effectively the same as setting the specified map's reset timer to now."); + +UPDATE `trinity_string` SET `content_default`="Map: %d | ID: %d | perm: %s | extended: %s | diff: %d | canReset: %s | TTR: %s" WHERE `entry`=5045; diff --git a/sql/updates/world/2016_02_11_00_world.sql b/sql/updates/world/2016_02_11_00_world.sql new file mode 100644 index 00000000000..b130133a2ca --- /dev/null +++ b/sql/updates/world/2016_02_11_00_world.sql @@ -0,0 +1,6 @@ +-- Scarlet Insignia Ring - Questloot +DELETE FROM `creature_loot_template` WHERE `Entry` IN (1538,1539,1540) AND `Item`= 2875; +INSERT INTO `creature_loot_template` (`Entry`,`Item`,`Reference`,`Chance`,`QuestRequired`,`LootMode`,`GroupId`,`MinCount`,`MaxCount`,`Comment`) VALUES +(1538, 2875, 0, 40, 1, 1, 0, 1, 1, 'Scarlet Friar - Scarlet Insignia Ring'), +(1539, 2875, 0, 40, 1, 1, 0, 1, 1, 'Scarlet Neophyte - Scarlet Insignia Ring'), +(1540, 2875, 0, 40, 1, 1, 0, 1, 1, 'Scarlet Vanguard - Scarlet Insignia Ring'); diff --git a/sql/updates/world/2016_02_11_01_world.sql b/sql/updates/world/2016_02_11_01_world.sql new file mode 100644 index 00000000000..ec1c98659e1 --- /dev/null +++ b/sql/updates/world/2016_02_11_01_world.sql @@ -0,0 +1,5 @@ +-- Imperial Eagle SAI +SET @ENTRY := 26369; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=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 +(@ENTRY,0,1,0,8,0,100,0,49546,0,0,0,41,4000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Imperial Eagle - On Spellhit 'Eagle Eyes' - Despawn In 4000 ms"); diff --git a/sql/updates/world/2016_02_11_02_world.sql b/sql/updates/world/2016_02_11_02_world.sql new file mode 100644 index 00000000000..9228e2d99d7 --- /dev/null +++ b/sql/updates/world/2016_02_11_02_world.sql @@ -0,0 +1,18 @@ +-- DB/Item: Sealed Tome +DELETE FROM `gameobject_loot_template` WHERE `Entry`=18509; +INSERT INTO `gameobject_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(18509,1054,1054,100,0,1,1,1,1,NULL); + +DELETE FROM `reference_loot_template` WHERE `Entry`=1054; +INSERT INTO `reference_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(1054,23864,0,0,0,1,1,1,1,NULL), -- Torment of the Worgen +(1054,23857,0,0,0,1,1,1,1,NULL), -- Legacy of the Mountain King +(1054,23862,0,0,0,1,1,1,1,NULL), -- Redemption of the Fallen +(1054,23865,0,0,0,1,1,1,1, NULL); -- Wrath of the Titans + +DELETE FROM `conditions` WHERE `SourceEntry` IN (30562, 30557, 30550, 30567) AND `SourceTypeOrReferenceId`=17; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `Comment`) VALUES +(17,0,30562,0,0,23,0,3457,0,0,0,0,0,'Legacy of the Mountain King needs area 3457'), +(17,0,30557,0,0,23,0,3457,0,0,0,0,0,'Wrath of the Titans needs area 3457'), +(17,0,30550,0,0,23,0,3457,0,0,0,0,0,'Redemption of the Fallen needs area 3457'), +(17,0,30567,0,0,23,0,3457,0,0,0,0,0,'Torment of the Worgen needs area 3457'); diff --git a/sql/updates/world/2016_02_11_03_world.sql b/sql/updates/world/2016_02_11_03_world.sql new file mode 100644 index 00000000000..4dfefb12281 --- /dev/null +++ b/sql/updates/world/2016_02_11_03_world.sql @@ -0,0 +1,11 @@ +-- DB/Quest: Souls at Unrest +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceGroup`=0 AND `SourceEntry`=48974; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 48974, 0, 0, 31, 1, 3, 26891, 0, 0, 0, 0, '', 'Burn Corpse - only targets Undead Miner'), +(17, 0, 48974, 0, 0, 36, 1, 0, 0, 0, 1, 0, 0, '', 'Burn Corpse - only targets dead Undead Miner'); + +-- Undead Miner SAI +SET @ENTRY := 26891; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 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 +(@ENTRY,0,2,0,8,0,100,0,48974,0,0,0,41,2000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Undead Miner - On Spellhit 'Burn Corpse' - Despawn In 2000 ms"); diff --git a/sql/updates/world/2016_02_11_04_world.sql b/sql/updates/world/2016_02_11_04_world.sql new file mode 100644 index 00000000000..41f648b5f6e --- /dev/null +++ b/sql/updates/world/2016_02_11_04_world.sql @@ -0,0 +1,4 @@ +-- DB/Quest: The Exorcism ( Mage Quest 1955) +DELETE FROM `smart_scripts` WHERE `entryorguid`=6546 AND `id`=5; +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 +(6546, 0, 5, 0, 19, 0, 100, 0, 1955, 0, 0, 0, 80, 654600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tabetha - On Quest \'The Exorcism\' Taken - Run Script (No Repeat)'); diff --git a/sql/updates/world/2016_02_11_05_world.sql b/sql/updates/world/2016_02_11_05_world.sql new file mode 100644 index 00000000000..76b59765d08 --- /dev/null +++ b/sql/updates/world/2016_02_11_05_world.sql @@ -0,0 +1,2 @@ +-- Iron Rune Avenger +UPDATE `creature_template` SET `flags_extra`=(`flags_extra`|2097152) WHERE `entry` IN (26786); diff --git a/sql/updates/world/2016_02_11_06_world.sql b/sql/updates/world/2016_02_11_06_world.sql new file mode 100644 index 00000000000..bbf9880dca9 --- /dev/null +++ b/sql/updates/world/2016_02_11_06_world.sql @@ -0,0 +1,206 @@ +SET @OGUID:=79584; +SET @CGUID:=61988; +SET @Event:=7; + +-- Add missing lunar objects +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+182; +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 , 180766, 571, 1, 1, 5827.364, 638.9564, 647.2116, 1.082103, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 4613) +(@OGUID+1 , 180766, 571, 1, 1, 5827.502, 645.6351, 647.1417, 1.937312, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 4613) +(@OGUID+2 , 180766, 571, 1, 1, 5821.811, 633.4114, 647.1953, 0, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 4613) +(@OGUID+3 , 180766, 571, 1, 1, 5822.486, 652.9247, 647.212, 3.071766, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 4613) +(@OGUID+4 , 180766, 571, 1, 1, 5815.521, 643.1665, 647.1968, 4.642576, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 4613) +(@OGUID+5 , 180766, 571, 1, 1, 5818.29, 648.6586, 647.173, 4.118979, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 4613) +(@OGUID+6 , 180766, 571, 1, 1, 5818.406, 635.2549, 647.1855, 5.515242, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 4613) +(@OGUID+7 , 180766, 571, 1, 1, 5816.469, 638.8152, 647.1979, 5.113817, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 4613) +(@OGUID+8 , 180765, 571, 1, 1, 5862.578, 608.9785, 622.725, 3.525572, 0, 0, 0, 1, 120, 255, 1), -- 180765 (Area: 4613) +(@OGUID+9 , 180765, 571, 1, 1, 5818.557, 689.6754, 617.5377, 5.811947, 0, 0, 0, 1, 120, 255, 1), -- 180765 (Area: 4613) +(@OGUID+10 , 180765, 571, 1, 1, 5759.772, 714.2535, 653.2266, 1.867502, 0, 0, 0, 1, 120, 255, 1), -- 180765 (Area: 4620) +(@OGUID+11 , 180765, 571, 1, 1, 5760.561, 701.3275, 623.345, 4.520406, 0, 0, 0, 1, 120, 255, 1), -- 180765 (Area: 0) +(@OGUID+12 , 180765, 571, 1, 1, 5731.914, 677.9752, 653.3376, 3.071766, 0, 0, 0, 1, 120, 255, 1), -- 180765 (Area: 0) +(@OGUID+13 , 180765, 571, 1, 1, 5670.342, 779.5948, 669.5635, 5.550147, 0, 0, 0, 1, 120, 255, 1), -- 180765 (Area: 4569) +(@OGUID+14 , 180765, 571, 1, 1, 5753.294, 594.6252, 618.5057, 5.358162, 0, 0, 0, 1, 120, 255, 1), -- 180765 (Area: 4560) +(@OGUID+15 , 180765, 571, 1, 1, 5819.917, 557.6574, 655.4913, 5.742135, 0, 0, 0, 1, 120, 255, 1), -- 180765 (Area: 4570) +(@OGUID+16 , 180878, 571, 1, 1, 5831.143, 655.095, 647.124, 5.567601, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 4613) +(@OGUID+17 , 180878, 571, 1, 1, 5830.427, 655.5619, 647.1938, 2.687807, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 4613) +(@OGUID+18 , 180878, 571, 1, 1, 5829.478, 652.8141, 647.3889, 5.585054, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 4613) +(@OGUID+19 , 180878, 571, 1, 1, 5829.293, 656.304, 647.3473, 2.129301, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 4613) +(@OGUID+20 , 180878, 571, 1, 1, 5830.003, 656.1676, 647.2794, 3.543024, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 4613) +(@OGUID+21 , 180878, 571, 1, 1, 5829.671, 655.4982, 647.2844, 4.502952, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 4613) +(@OGUID+22 , 180878, 571, 1, 1, 5828.868, 653.2474, 647.4297, 4.869471, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 4613) +(@OGUID+23 , 180770, 571, 1, 1, 5948.266, 620.9393, 660.9077, 2.792518, 0, 0, 0, 1, 120, 255, 1), -- 180770 (Area: 4613) +(@OGUID+24 , 180770, 571, 1, 1, 5885.173, 625.6719, 667.6763, 5.637414, 0, 0, 0, 1, 120, 255, 1), -- 180770 (Area: 4613) +(@OGUID+25 , 180770, 571, 1, 1, 5834.693, 718.492, 659.2477, 4.06662, 0, 0, 0, 1, 120, 255, 1), -- 180770 (Area: 4613) +(@OGUID+26 , 180770, 571, 1, 1, 5728.38, 609.739, 668.472, 0.8901166, 0, 0, 0, 1, 120, 255, 1), -- 180770 (Area: 4560) +(@OGUID+27 , 180770, 571, 1, 1, 5671.689, 646.728, 664.1037, 0.2967052, 0, 0, 0, 1, 120, 255, 1), -- 180770 (Area: 4560) +(@OGUID+28 , 180770, 571, 1, 1, 5783.651, 561.3226, 663.734, 0.8901166, 0, 0, 0, 1, 120, 255, 1), -- 180770 (Area: 4560) +(@OGUID+29 , 180770, 571, 1, 1, 5659.569, 679.338, 662.2587, 5.864307, 0, 0, 0, 1, 120, 255, 1), -- 180770 (Area: 4560) +(@OGUID+30 , 180769, 571, 1, 1, 5909.365, 661.7691, 649.1791, 3.979355, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4613) +(@OGUID+31 , 180769, 571, 1, 1, 5886.387, 624.8147, 653.553, 2.460913, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4613) +(@OGUID+32 , 180769, 571, 1, 1, 5931.343, 575.7878, 615.0651, 3.857183, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4613) +(@OGUID+33 , 180769, 571, 1, 1, 5881.342, 611.066, 654.6136, 2.495818, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4613) +(@OGUID+34 , 180769, 571, 1, 1, 5901.177, 684.3577, 647.6432, 2.391098, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4613) +(@OGUID+35 , 180769, 571, 1, 1, 5929.563, 561.2188, 615.4888, 2.44346, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4613) +(@OGUID+36 , 180769, 571, 1, 1, 5913.596, 558.0538, 615.162, 1.274088, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4613) +(@OGUID+37 , 180769, 571, 1, 1, 5859.038, 634.4976, 653.8649, 5.585054, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4613) +(@OGUID+38 , 180769, 571, 1, 1, 5915.081, 710.2066, 646.7171, 3.071766, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4613) +(@OGUID+39 , 180769, 571, 1, 1, 5855.796, 664.7435, 653.7689, 0.9075702, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4613) +(@OGUID+40 , 180769, 571, 1, 1, 5858.535, 699.8768, 647.4109, 4.01426, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4613) +(@OGUID+41 , 180769, 571, 1, 1, 5852.463, 690.137, 614.8257, 4.031712, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4613) +(@OGUID+42 , 180769, 571, 1, 1, 5873.14, 725.0781, 647.2786, 1.780234, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4613) +(@OGUID+43 , 180769, 571, 1, 1, 5883.378, 741.8604, 644.6421, 4.921829, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4613) +(@OGUID+44 , 180769, 571, 1, 1, 5817.372, 694.9447, 653.3386, 0.8901166, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4613) +(@OGUID+45 , 180769, 571, 1, 1, 5901.752, 746.1671, 645.9257, 4.502952, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4613) +(@OGUID+46 , 180769, 571, 1, 1, 5864.876, 738.8313, 644.7396, 5.113817, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4613) +(@OGUID+47 , 180769, 571, 1, 1, 5835.081, 719.8969, 646.1445, 4.01426, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4613) +(@OGUID+48 , 180769, 571, 1, 1, 5786.942, 691.6105, 653.3179, 2.426008, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4620) +(@OGUID+49 , 180769, 571, 1, 1, 5768.04, 709.3449, 623.6602, 5.585054, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4620) +(@OGUID+50 , 180769, 571, 1, 1, 5768.866, 732.3944, 645.68, 5.777041, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4620) +(@OGUID+51 , 180769, 571, 1, 1, 5769.894, 668.6614, 650.4285, 2.460913, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 0) +(@OGUID+52 , 180769, 571, 1, 1, 5788.438, 653.5104, 654.6097, 5.602507, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 0) +(@OGUID+53 , 180769, 571, 1, 1, 5750.353, 646.9713, 656.329, 2.478367, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4560) +(@OGUID+54 , 180769, 571, 1, 1, 5753.372, 616.3696, 656.3885, 4.049168, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4560) +(@OGUID+55 , 180769, 571, 1, 1, 5730.582, 607.2877, 652.4621, 0.8901166, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4560) +(@OGUID+56 , 180769, 571, 1, 1, 5687.786, 619.9709, 652.2067, 0.5759573, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4560) +(@OGUID+57 , 180769, 571, 1, 1, 5675.173, 631.3223, 652.21, 0.5235979, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4560) +(@OGUID+58 , 180769, 571, 1, 1, 5671.983, 646.4656, 652.1304, 0.2967052, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4560) +(@OGUID+59 , 180769, 571, 1, 1, 5783.131, 561.6129, 655.8354, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4560) +(@OGUID+60 , 180769, 571, 1, 1, 5809.257, 575.9974, 656.7222, 4.834563, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4560) +(@OGUID+61 , 180769, 571, 1, 1, 5844.062, 569.6259, 656.8289, 2.478367, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 4570) +(@OGUID+62 , 180763, 571, 1, 1, 5944.821, 630.5286, 652.4573, 2.967041, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4613) +(@OGUID+63 , 180763, 571, 1, 1, 5890.119, 630.0712, 650.7103, 2.391098, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4613) +(@OGUID+64 , 180763, 571, 1, 1, 5883.333, 613.3351, 651.5501, 2.33874, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4613) +(@OGUID+65 , 180763, 571, 1, 1, 5983.581, 603.4676, 653.0666, 2.862335, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4613) +(@OGUID+66 , 180763, 571, 1, 1, 5986.168, 610.6107, 653.0659, 2.967041, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 0) +(@OGUID+67 , 180763, 571, 1, 1, 5913.733, 726.7258, 645.9022, 3.298687, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4613) +(@OGUID+68 , 180763, 571, 1, 1, 5820.595, 692.2194, 647.6371, 0.9948372, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4613) +(@OGUID+69 , 180763, 571, 1, 1, 5867.973, 739.8099, 641.4172, 5.410522, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4613) +(@OGUID+70 , 180763, 571, 1, 1, 5903.759, 687.3698, 644.8055, 5.235988, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4620) +(@OGUID+71 , 180763, 571, 1, 1, 5871.152, 724.772, 643.811, 1.954769, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4620) +(@OGUID+72 , 180763, 571, 1, 1, 5752.106, 717.1315, 641.7864, 3.944446, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 0) +(@OGUID+73 , 180763, 571, 1, 1, 5746.831, 728.174, 641.7136, 4.031712, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 0) +(@OGUID+74 , 180763, 571, 1, 1, 5733.553, 726.9333, 642.7537, 2.548179, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 0) +(@OGUID+75 , 180763, 571, 1, 1, 5735.731, 678.2547, 647.2717, 5.532695, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 0) +(@OGUID+76 , 180763, 571, 1, 1, 5732.593, 674.2257, 647.2732, 2.932139, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4560) +(@OGUID+77 , 180763, 571, 1, 1, 5716.352, 722.8108, 643.5378, 0.9599299, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4560) +(@OGUID+78 , 180763, 571, 1, 1, 5709.845, 727.9358, 643.5585, 0.8726639, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4560) +(@OGUID+79 , 180763, 571, 1, 1, 5703.215, 733.3229, 643.576, 0.8203033, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4560) +(@OGUID+80 , 180763, 571, 1, 1, 5833.685, 645.7676, 610.1852, 4.118979, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4560) +(@OGUID+81 , 180763, 571, 1, 1, 5669.793, 808.6216, 655.2228, 4.171338, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4569) +(@OGUID+82 , 180763, 571, 1, 1, 5746.831, 728.174, 641.7136, 4.031712, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4569) +(@OGUID+83 , 180763, 571, 1, 1, 5657.733, 814.1997, 654.9894, 4.869471, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4569) +(@OGUID+84 , 180763, 571, 1, 1, 5640.182, 793.6152, 654.9894, 0.1919852, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4569) +(@OGUID+85 , 180763, 571, 1, 1, 5648.342, 782.4639, 654.989, 0.8203033, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4569) +(@OGUID+86 , 180763, 571, 1, 1, 5646.54, 805.8158, 654.9894, 5.707228, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4569) +(@OGUID+87 , 180763, 571, 1, 1, 5752.106, 717.1315, 641.7864, 3.944446, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4569) +(@OGUID+88 , 180763, 571, 1, 1, 5733.553, 726.9333, 642.7537, 2.548179, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4560) +(@OGUID+89 , 180763, 571, 1, 1, 5820.595, 692.2194, 647.6371, 0.9948372, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4560) +(@OGUID+90 , 180763, 571, 1, 1, 5703.215, 733.3229, 643.576, 0.8203033, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4560) +(@OGUID+91 , 180763, 571, 1, 1, 5689.638, 617.3722, 649.33, 0.802851, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4560) +(@OGUID+92 , 180763, 571, 1, 1, 5668.561, 683.9375, 653.5638, 5.951575, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4560) +(@OGUID+93 , 180763, 571, 1, 1, 5821.209, 557.6127, 652.8544, 1.815142, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4570) +(@OGUID+94 , 180763, 571, 1, 1, 5845.696, 572.116, 653.2255, 2.44346, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4570) +(@OGUID+95 , 180763, 571, 1, 1, 5828.66, 517.7811, 659.3014, 5.131269, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4570) +(@OGUID+96 , 180763, 571, 1, 1, 5735.731, 678.2547, 647.2717, 5.532695, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4570) +(@OGUID+97 , 180763, 571, 1, 1, 5732.593, 674.2257, 647.2732, 2.932139, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4570) +(@OGUID+98 , 180763, 571, 1, 1, 5883.333, 613.3351, 651.5501, 2.33874, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4570) +(@OGUID+99 , 180763, 571, 1, 1, 5890.119, 630.0712, 650.7103, 2.391098, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4570) +(@OGUID+100, 180763, 571, 1, 1, 5903.759, 687.3698, 644.8055, 5.235988, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 0) +(@OGUID+101, 180763, 571, 1, 1, 5944.821, 630.5286, 652.4573, 2.967041, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 0) +(@OGUID+102, 180763, 571, 1, 1, 5939.341, 616.0452, 652.3865, 2.740162, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 0) +(@OGUID+103, 180763, 571, 1, 1, 5871.152, 724.772, 643.811, 1.954769, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 0) +(@OGUID+104, 180763, 571, 1, 1, 5983.581, 603.4676, 653.0666, 2.862335, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4560) +(@OGUID+105, 180763, 571, 1, 1, 5828.66, 517.7811, 659.3014, 5.131269, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4560) +(@OGUID+106, 180763, 571, 1, 1, 5872.536, 687.5123, 647.7181, 4.136433, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4613) +(@OGUID+107, 180763, 571, 1, 1, 5812.34, 554.8807, 652.9316, 2.007128, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4616) +(@OGUID+108, 180763, 571, 1, 1, 5820.595, 692.2194, 647.6371, 0.9948372, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4739) +(@OGUID+109, 180763, 571, 1, 1, 5735.731, 678.2547, 647.2717, 5.532695, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4739) +(@OGUID+110, 180763, 571, 1, 1, 5733.001, 605.4604, 649.6217, 0.9948372, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 4739) +(@OGUID+111, 180764, 571, 1, 1, 5939.341, 616.0452, 652.3865, 2.740162, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+112, 180764, 571, 1, 1, 5930.153, 592.1089, 640.6768, 2.670348, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+113, 180764, 571, 1, 1, 5920.96, 592.6715, 640.6837, 1.937312, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+114, 180764, 571, 1, 1, 5938.111, 587.7853, 640.6421, 3.036838, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+115, 180764, 571, 1, 1, 5912.436, 589.316, 640.6563, 0.7330382, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+116, 180764, 571, 1, 1, 5943.503, 581.1985, 640.6602, 5.619962, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+117, 180764, 571, 1, 1, 5946.514, 572.8181, 640.6762, 3.42085, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+118, 180764, 571, 1, 1, 5986.168, 610.6107, 653.0659, 2.967041, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+119, 180764, 571, 1, 1, 5945.639, 564.164, 640.7072, 5.951575, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+120, 180764, 571, 1, 1, 5941.456, 556.3479, 640.7192, 1.658062, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+121, 180764, 571, 1, 1, 5934.847, 550.7705, 640.6883, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+122, 180764, 571, 1, 1, 5864.014, 600.7278, 652.6012, 2.373644, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+123, 180764, 571, 1, 1, 5903.759, 687.3698, 644.8055, 5.235988, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+124, 180764, 571, 1, 1, 5853.561, 587.517, 652.7214, 2.530723, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+125, 180764, 571, 1, 1, 5872.536, 687.5123, 647.7181, 4.136433, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+126, 180764, 571, 1, 1, 5914.998, 716.574, 643.6473, 3.194002, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+127, 180764, 571, 1, 1, 5893.063, 706.0598, 648.3202, 1.012289, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+128, 180764, 571, 1, 1, 5890.119, 630.0712, 650.7103, 2.391098, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 0) +(@OGUID+129, 180764, 571, 1, 1, 5938.111, 587.7853, 640.6421, 3.036838, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 0) +(@OGUID+130, 180764, 571, 1, 1, 5983.581, 603.4676, 653.0666, 2.862335, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 0) +(@OGUID+131, 180764, 571, 1, 1, 5912.436, 589.316, 640.6563, 0.7330382, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 0) +(@OGUID+132, 180764, 571, 1, 1, 5934.847, 550.7705, 640.6883, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 0) +(@OGUID+133, 180764, 571, 1, 1, 5872.536, 687.5123, 647.7181, 4.136433, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+134, 180764, 571, 1, 1, 5945.639, 564.164, 640.7072, 5.951575, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+135, 180764, 571, 1, 1, 5833.685, 645.7676, 610.1852, 4.118979, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+136, 180764, 571, 1, 1, 5827.226, 645.5917, 648.326, 3.316144, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+137, 180764, 571, 1, 1, 5845.696, 572.116, 653.2255, 2.44346, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+138, 180764, 571, 1, 1, 5871.152, 724.772, 643.811, 1.954769, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+139, 180764, 571, 1, 1, 5816.614, 639.0052, 648.413, 2.164206, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+140, 180764, 571, 1, 1, 5883.333, 613.3351, 651.5501, 2.33874, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+141, 180764, 571, 1, 1, 5898.784, 746.4573, 642.1553, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4613) +(@OGUID+142, 180764, 571, 1, 1, 5893.063, 706.0598, 648.3202, 1.012289, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4620) +(@OGUID+143, 180764, 571, 1, 1, 5763.81, 725.4814, 620.0308, 0.9424766, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4620) +(@OGUID+144, 180764, 571, 1, 1, 5763.81, 725.4814, 620.0308, 0.9424766, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4560) +(@OGUID+145, 180764, 571, 1, 1, 5867.973, 739.8099, 641.4172, 5.410522, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4560) +(@OGUID+146, 180764, 571, 1, 1, 5872.536, 687.5123, 647.7181, 4.136433, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4560) +(@OGUID+147, 180764, 571, 1, 1, 5733.001, 605.4604, 649.6217, 0.9948372, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4560) +(@OGUID+148, 180764, 571, 1, 1, 5674.231, 639.6476, 649.1661, 0.2792516, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4560) +(@OGUID+149, 180764, 571, 1, 1, 5785.611, 560.2617, 652.6686, 3.874631, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4560) +(@OGUID+150, 180764, 571, 1, 1, 5812.34, 554.8807, 652.9316, 2.007128, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4560) +(@OGUID+151, 180764, 571, 1, 1, 5662.389, 669.6667, 653.5421, 6.265733, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4560) +(@OGUID+152, 180764, 571, 1, 1, 5853.561, 587.517, 652.7214, 2.530723, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4570) +(@OGUID+153, 180764, 571, 1, 1, 5864.014, 600.7278, 652.6012, 2.373644, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4570) +(@OGUID+154, 180764, 571, 1, 1, 5920.96, 592.6715, 640.6837, 1.937312, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 0) +(@OGUID+155, 180764, 571, 1, 1, 5912.436, 589.316, 640.6563, 0.7330382, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 0) +(@OGUID+156, 180764, 571, 1, 1, 5930.153, 592.1089, 640.6768, 2.670348, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 0) +(@OGUID+157, 180764, 571, 1, 1, 5938.111, 587.7853, 640.6421, 3.036838, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 0) +(@OGUID+158, 180764, 571, 1, 1, 5943.503, 581.1985, 640.6602, 5.619962, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4560) +(@OGUID+159, 180764, 571, 1, 1, 5945.639, 564.164, 640.7072, 5.951575, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 4560) +(@OGUID+160, 180879, 571, 1, 1, 5829.639, 654.4427, 647.3204, 5.689774, 0, 0, 0, 1, 120, 255, 1), -- 180879 (Area: 4613) +(@OGUID+161, 180767, 571, 1, 1, 5867.941, 616.2357, 622.7247, 2.460913, 0, 0, 0, 1, 120, 255, 1), -- 180767 (Area: 4613) +(@OGUID+162, 180767, 571, 1, 1, 5897.854, 555.5522, 648.3434, 0.5061446, 0, 0, 0, 1, 120, 255, 1), -- 180767 (Area: 4613) +(@OGUID+163, 180767, 571, 1, 1, 5892.568, 549.7327, 648.2482, 2.740162, 0, 0, 0, 1, 120, 255, 1), -- 180767 (Area: 4613) +(@OGUID+164, 180767, 571, 1, 1, 5814.174, 684.2547, 617.5809, 4.450591, 0, 0, 0, 1, 120, 255, 1), -- 180767 (Area: 4613) +(@OGUID+165, 180767, 571, 1, 1, 5774.229, 717.9037, 623.3556, 2.199115, 0, 0, 0, 1, 120, 255, 1), -- 180767 (Area: 4620) +(@OGUID+166, 180767, 571, 1, 1, 5770.015, 581.1361, 618.5083, 2.495818, 0, 0, 0, 1, 120, 255, 1), -- 180767 (Area: 4560) +(@OGUID+167, 180767, 571, 1, 1, 5813.308, 555.64, 655.5086, 0.087266, 0, 0, 0, 1, 120, 255, 1), -- 180767 (Area: 4560) +(@OGUID+168, 188215, 571, 1, 1, 5927.629, 731.5903, 643.1697, 4.76475, 0, 0, 0, 1, 120, 255, 1), -- 188215 (Area: 4613) +(@OGUID+169, 180880, 571, 1, 1, 5828.156, 651.3569, 647.5219, 3.42085, 0, 0, 0, 1, 120, 255, 1), -- 180880 (Area: 4613) +(@OGUID+170, 180881, 571, 1, 1, 5829.097, 651.775, 647.4488, 4.799657, 0, 0, 0, 1, 120, 255, 1), -- 180881 (Area: 4613) +(@OGUID+171, 180882, 571, 1, 1, 5829.017, 651.1241, 647.4738, 3.769912, 0, 0, 0, 1, 120, 255, 1), -- 180882 (Area: 4613) +(@OGUID+172, 180883, 571, 1, 1, 5828.462, 652.3148, 647.4636, 5.445428, 0, 0, 0, 1, 120, 255, 1), -- 180883 (Area: 4613) +(@OGUID+173, 180883, 571, 1, 1, 5828.013, 651.9222, 647.5066, 5.811947, 0, 0, 0, 1, 120, 255, 1), -- 180883 (Area: 4613) +(@OGUID+174, 180868, 571, 1, 1, 5820.396, 633.1682, 647.392, 4.171338, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 4613) +(@OGUID+175, 180868, 571, 1, 1, 5818.986, 634.1285, 647.392, 4.118979, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 4613) +(@OGUID+176, 180868, 571, 1, 1, 5815.437, 644.6893, 647.392, 2.652894, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 4613) +(@OGUID+177, 180868, 571, 1, 1, 5818.691, 650.1199, 647.3958, 2.460913, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 4613) +(@OGUID+178, 180868, 571, 1, 1, 5817.034, 647.832, 647.392, 2.635444, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 4613) +(@OGUID+179, 180868, 571, 1, 1, 5819.984, 651.618, 647.4, 2.408554, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 4613) +(@OGUID+180, 180868, 571, 1, 1, 5816.064, 637.7977, 647.3924, 3.665196, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 4613) +(@OGUID+181, 180869, 571, 1, 1, 5816.274, 646.3437, 647.392, 2.652894, 0, 0, 0, 1, 120, 255, 1), -- 180869 (Area: 4613) +(@OGUID+182, 180869, 571, 1, 1, 5817.032, 636.2288, 647.392, 3.735006, 0, 0, 0, 1, 120, 255, 1); -- 180869 (Area: 4613) + +DELETE FROM `game_event_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+182 AND `eventEntry`=@Event; +INSERT INTO `game_event_gameobject` SELECT @Event, gameobject.guid FROM `gameobject` WHERE gameobject.guid BETWEEN @OGUID+0 AND @OGUID+182; + +-- Add missing lunar spawns +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+5; +INSERT INTO `creature` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `curhealth`) VALUES +(@CGUID+0, 15892, 571, 5825.602, 642.9196, 647.8765, 3.106686, 120, 0), -- 15892 (Area: 4613) +(@CGUID+1, 15892, 571, 5820.262, 646.1699, 647.8525, 5.235988, 120, 0), -- 15892 (Area: 4613) +(@CGUID+2, 15892, 571, 5819.783, 639.3316, 647.9127, 1.029744, 120, 0), -- 15892 (Area: 4613) +(@CGUID+3, 15898, 571, 5827.147, 654.6258, 647.5777, 3.159046, 120, 0), -- 15898 (Area: 4613) (Auras: ) +(@CGUID+4, 15895, 571, 5824.651, 657.0713, 647.6139, 3.246312, 120, 0), -- 15895 (Area: 4613) (Auras: ) +(@CGUID+5, 15897, 571, 5821.922, 642.784, 648.11, 5.166174, 120, 0); -- 15897 (Area: 4613) (Auras: 25824 - 25824) + +DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+5 AND `eventEntry`=@Event; +INSERT INTO `game_event_creature` SELECT @Event, creature.guid FROM `creature` WHERE creature.guid BETWEEN @CGUID+0 AND @CGUID+5; diff --git a/sql/updates/world/2016_02_11_07_world.sql b/sql/updates/world/2016_02_11_07_world.sql new file mode 100644 index 00000000000..e34106cb44c --- /dev/null +++ b/sql/updates/world/2016_02_11_07_world.sql @@ -0,0 +1,145 @@ +SET @OGUID:=79767; +SET @CGUID:=97677; +SET @Event:=7; + +-- Add missing lunar objects +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+109; +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 , 180768, 530, 1, 1, -1813.065, 5493.691, -12.42814, 4.433136, 0, 0, 0, 1, 120, 255, 1), -- 180768 (Area: 3703) +(@OGUID+1 , 180768, 530, 1, 1, -1810.529, 5502.124, -12.42814, 3.560473, 0, 0, 0, 1, 120, 255, 1), -- 180768 (Area: 3703) +(@OGUID+2 , 180768, 530, 1, 1, -1797.383, 5484.879, -12.42814, 0.8726639, 0, 0, 0, 1, 120, 255, 1), -- 180768 (Area: 3703) +(@OGUID+3 , 180768, 530, 1, 1, -1802.372, 5503.944, -12.42814, 2.879789, 0, 0, 0, 1, 120, 255, 1), -- 180768 (Area: 3703) +(@OGUID+4 , 180768, 530, 1, 1, -1804.87, 5483.975, -12.42814, 0.122173, 0, 0, 0, 1, 120, 255, 1), -- 180768 (Area: 3703) +(@OGUID+5 , 180768, 530, 1, 1, -1796.439, 5505.653, -12.42814, 3.822273, 0, 0, 0, 1, 120, 255, 1), -- 180768 (Area: 3703) +(@OGUID+6 , 180768, 530, 1, 1, -1791.092, 5498.224, -12.42814, 0.6283169, 0, 0, 0, 1, 120, 255, 1), -- 180768 (Area: 3703) +(@OGUID+7 , 180768, 530, 1, 1, -1793.718, 5492.52, -12.42814, 1.274088, 0, 0, 0, 1, 120, 255, 1), -- 180768 (Area: 3703) +(@OGUID+8 , 180768, 530, 1, 1, 9487.017, -7295.95, 14.34292, 1.274088, 0, 0, 0, 1, 120, 255, 1), -- 180768 (Area: 3487) +(@OGUID+9 , 180768, 530, 1, 1, 9484.238, -7301.355, 14.38242, 0.8726639, 0, 0, 0, 1, 120, 255, 1), -- 180768 (Area: 3487) +(@OGUID+10 , 180768, 530, 1, 1, 9489.608, -7291.334, 14.31547, 0.6283169, 0, 0, 0, 1, 120, 255, 1), -- 180768 (Area: 3487) +(@OGUID+11 , 180768, 530, 1, 1, 9477.151, -7304.068, 14.36639, 0.122173, 0, 0, 0, 1, 120, 255, 1), -- 180768 (Area: 3487) +(@OGUID+12 , 180768, 530, 1, 1, 9486.314, -7286.41, 14.28697, 3.822273, 0, 0, 0, 1, 120, 255, 1), -- 180768 (Area: 3487) +(@OGUID+13 , 180768, 530, 1, 1, 9475.41, -7288.148, 14.25113, 3.560473, 0, 0, 0, 1, 120, 255, 1), -- 180768 (Area: 3487) +(@OGUID+14 , 180768, 530, 1, 1, 9481.289, -7287.188, 14.267, 2.879789, 0, 0, 0, 1, 120, 255, 1), -- 180768 (Area: 3487) +(@OGUID+15 , 180768, 530, 1, 1, 9470.736, -7293.924, 14.30253, 4.433136, 0, 0, 0, 1, 120, 255, 1), -- 180768 (Area: 3487) +(@OGUID+16 , 180766, 530, 1, 1, -1784.918, 5443.967, -12.42814, 4.084071, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 3703) +(@OGUID+17 , 180766, 530, 1, 1, -1782.34, 5432.168, -12.42814, 5.864307, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 3703) +(@OGUID+18 , 180766, 530, 1, 1, -1779.882, 5450.221, -12.42814, 3.438303, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 3703) +(@OGUID+19 , 180766, 530, 1, 1, -1771.785, 5447.635, -12.42814, 2.740162, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 3703) +(@OGUID+20 , 180766, 530, 1, 1, -1768.499, 5435.3, -12.42814, 0.7853968, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 3703) +(@OGUID+21 , 180766, 530, 1, 1, -1774.774, 5428.898, -12.42814, 0.2268925, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 3703) +(@OGUID+22 , 180766, 530, 1, 1, -1764.911, 5447.474, -12.42814, 3.42085, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 3703) +(@OGUID+23 , 180766, 530, 1, 1, -1762.984, 5438.721, -12.42814, 0.157079, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 3703) +(@OGUID+24 , 180778, 530, 1, 1, -1807.913, 5485.737, -12.42814, 0.7504908, 0, 0, 0, 1, 120, 255, 1), -- 180778 (Area: 3703) +(@OGUID+25 , 180778, 530, 1, 1, -1812.186, 5490.322, -12.42814, 3.874631, 0, 0, 0, 1, 120, 255, 1), -- 180778 (Area: 3703) +(@OGUID+26 , 180778, 530, 1, 1, 9471.936, -7298.056, 14.34922, 3.874631, 0, 0, 0, 1, 120, 255, 1), -- 180778 (Area: 3487) +(@OGUID+27 , 180778, 530, 1, 1, 9474.56, -7301.353, 14.37097, 0.7504908, 0, 0, 0, 1, 120, 255, 1), -- 180778 (Area: 3487) +(@OGUID+28 , 180878, 530, 1, 1, -1790.338, 5498.744, -12.42814, 3.857183, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3703) +(@OGUID+29 , 180878, 530, 1, 1, -1790.234, 5496.288, -12.42814, 4.01426, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3703) +(@OGUID+30 , 180878, 530, 1, 1, -1790.902, 5497.011, -12.42814, 5.777041, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3703) +(@OGUID+31 , 180878, 530, 1, 1, -1789.234, 5496.14, -12.42814, 6.003934, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3703) +(@OGUID+32 , 180878, 530, 1, 1, -1789.172, 5498.917, -12.42814, 0.1047193, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3703) +(@OGUID+33 , 180878, 530, 1, 1, -1788.415, 5496.598, -12.42814, 3.089183, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3703) +(@OGUID+34 , 180878, 530, 1, 1, -1788.392, 5498.381, -12.42814, 4.24115, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3703) +(@OGUID+35 , 180878, 530, 1, 1, -1788.111, 5497.561, -12.42814, 1.413715, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3703) +(@OGUID+36 , 180878, 530, 1, 1, -1765.722, 5449.934, -12.42814, 3.543024, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3703) +(@OGUID+37 , 180878, 530, 1, 1, -1764.807, 5450.181, -12.42814, 2.129301, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3703) +(@OGUID+38 , 180878, 530, 1, 1, -1766.226, 5448.125, -12.42814, 2.687807, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3703) +(@OGUID+39 , 180878, 530, 1, 1, -1766.088, 5449.026, -12.42814, 4.502952, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3703) +(@OGUID+40 , 180878, 530, 1, 1, -1765.541, 5447.308, -12.42814, 5.567601, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3703) +(@OGUID+41 , 180878, 530, 1, 1, -1763.994, 5449.78, -12.42814, 5.585054, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3703) +(@OGUID+42 , 180878, 530, 1, 1, -1763.402, 5449.152, -12.42814, 4.869471, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3703) +(@OGUID+43 , 180878, 530, 1, 1, 9491.685, -7292.46, 14.32974, 0.1047193, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3487) +(@OGUID+44 , 180878, 530, 1, 1, 9490.622, -7293.794, 14.33648, 1.413715, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3487) +(@OGUID+45 , 180878, 530, 1, 1, 9491.373, -7293.285, 14.3349, 4.24115, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3487) +(@OGUID+46 , 180878, 530, 1, 1, 9489.716, -7293.833, 14.33415, 3.089183, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3487) +(@OGUID+47 , 180878, 530, 1, 1, 9488.958, -7293.352, 14.32843, 6.003934, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3487) +(@OGUID+48 , 180878, 530, 1, 1, 9491.266, -7291.555, 14.32187, 3.857183, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3487) +(@OGUID+49 , 180878, 530, 1, 1, 9488.673, -7292.52, 14.32149, 4.01426, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3487) +(@OGUID+50 , 180878, 530, 1, 1, 9488.967, -7291.694, 14.31627, 5.777041, 0, 0, 0, 1, 120, 255, 1), -- 180878 (Area: 3487) +(@OGUID+51 , 180763, 530, 1, 1, -1804.848, 5484.874, -11.5462, 0.6981314, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 3703) +(@OGUID+52 , 180763, 530, 1, 1, -1795.721, 5504.963, -11.49064, 0.4537851, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 3703) +(@OGUID+53 , 180763, 530, 1, 1, -1779.698, 5450.049, -11.14342, 0.2967052, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 3703) +(@OGUID+54 , 180763, 530, 1, 1, -1784.666, 5443.933, -11.10175, 3.351047, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 3703) +(@OGUID+55 , 180763, 530, 1, 1, -1774.672, 5429.127, -11.12259, 3.281239, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 3703) +(@OGUID+56 , 180763, 530, 1, 1, -1762.88, 5438.89, -11.18509, 0.2792516, 0, 0, 0, 1, 120, 255, 1), -- 180763 (Area: 3703) +(@OGUID+57 , 180764, 530, 1, 1, 9489.186, -7290.492, 15.29506, 3.961899, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 3487) +(@OGUID+58 , 180764, 530, 1, 1, 9471.669, -7294.084, 15.2562, 0.6981314, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 3487) +(@OGUID+59 , 180879, 530, 1, 1, -1764.911, 5448.846, -12.42814, 1.204277, 0, 0, 0, 1, 120, 255, 1), -- 180879 (Area: 3703) +(@OGUID+60 , 180777, 530, 1, 1, -1784.936, 5439.937, -12.42814, 3.351047, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 3703) +(@OGUID+61 , 180777, 530, 1, 1, -1784.008, 5435.997, -12.42814, 0.2094394, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 3703) +(@OGUID+62 , 180880, 530, 1, 1, -1789.301, 5498.034, -11.72675, 2.740162, 0, 0, 0, 1, 120, 255, 1), -- 180880 (Area: 3703) +(@OGUID+63 , 180880, 530, 1, 1, -1789.678, 5498.17, -11.71286, 1.989672, 0, 0, 0, 1, 120, 255, 1), -- 180880 (Area: 3703) +(@OGUID+64 , 180880, 530, 1, 1, -1764.493, 5448.475, -10.58786, 3.42085, 0, 0, 0, 1, 120, 255, 1), -- 180880 (Area: 3703) +(@OGUID+65 , 180880, 530, 1, 1, 9490.517, -7292.749, 15.03819, 2.740162, 0, 0, 0, 1, 120, 255, 1), -- 180880 (Area: 3487) +(@OGUID+66 , 180880, 530, 1, 1, 9490.091, -7292.49, 15.04175, 1.989672, 0, 0, 0, 1, 120, 255, 1), -- 180880 (Area: 3487) +(@OGUID+67 , 180881, 530, 1, 1, -1789.489, 5497.099, -11.74759, 6.143561, 0, 0, 0, 1, 120, 255, 1), -- 180881 (Area: 3703) +(@OGUID+68 , 180881, 530, 1, 1, -1790.061, 5497.251, -11.74064, 4.572764, 0, 0, 0, 1, 120, 255, 1), -- 180881 (Area: 3703) +(@OGUID+69 , 180881, 530, 1, 1, -1764.79, 5449.202, -10.61564, 4.799657, 0, 0, 0, 1, 120, 255, 1), -- 180881 (Area: 3703) +(@OGUID+70 , 180881, 530, 1, 1, 9489.579, -7292.59, 15.02525, 4.572764, 0, 0, 0, 1, 120, 255, 1), -- 180881 (Area: 3487) +(@OGUID+71 , 180881, 530, 1, 1, 9489.869, -7292.061, 15.01508, 6.143561, 0, 0, 0, 1, 120, 255, 1), -- 180881 (Area: 3487) +(@OGUID+72 , 180882, 530, 1, 1, -1789.633, 5497.666, -11.7337, 3.647741, 0, 0, 0, 1, 120, 255, 1), -- 180882 (Area: 3703) +(@OGUID+73 , 180882, 530, 1, 1, -1790.078, 5497.862, -11.7337, 4.956738, 0, 0, 0, 1, 120, 255, 1), -- 180882 (Area: 3703) +(@OGUID+74 , 180882, 530, 1, 1, -1764.311, 5449.006, -10.6087, 3.769912, 0, 0, 0, 1, 120, 255, 1), -- 180882 (Area: 3703) +(@OGUID+75 , 180882, 530, 1, 1, 9490.705, -7292.344, 15.01931, 4.956738, 0, 0, 0, 1, 120, 255, 1), -- 180882 (Area: 3487) +(@OGUID+76 , 180882, 530, 1, 1, 9490.47, -7292.036, 15.02789, 3.647741, 0, 0, 0, 1, 120, 255, 1), -- 180882 (Area: 3487) +(@OGUID+77 , 180883, 530, 1, 1, -1789.06, 5497.521, -11.7337, 5.654869, 0, 0, 0, 1, 120, 255, 1), -- 180883 (Area: 3703) +(@OGUID+78 , 180883, 530, 1, 1, -1764.884, 5448.252, -10.58786, 5.445428, 0, 0, 0, 1, 120, 255, 1), -- 180883 (Area: 3703) +(@OGUID+79 , 180883, 530, 1, 1, -1765.275, 5448.697, -10.6087, 5.811947, 0, 0, 0, 1, 120, 255, 1), -- 180883 (Area: 3703) +(@OGUID+80 , 180883, 530, 1, 1, 9490.114, -7293.036, 15.03141, 5.654869, 0, 0, 0, 1, 120, 255, 1), -- 180883 (Area: 3487) +(@OGUID+81 , 180888, 530, 1, 1, -1789.768, 5497.439, -12.42814, 1.937312, 0, 0, 0, 1, 120, 255, 1), -- 180888 (Area: 3703) +(@OGUID+82 , 180888, 530, 1, 1, 9489.949, -7292.669, 14.32627, 1.937312, 0, 0, 0, 1, 120, 255, 1), -- 180888 (Area: 3487) +(@OGUID+83 , 180868, 530, 1, 1, -1809.283, 5488.518, -12.42814, 0.7330382, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3703) +(@OGUID+84 , 180868, 530, 1, 1, -1798.701, 5502.052, -12.42814, 0.7155849, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3703) +(@OGUID+85 , 180868, 530, 1, 1, -1801.822, 5499.706, -12.42814, 0.7155849, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3703) +(@OGUID+86 , 180868, 530, 1, 1, -1804.326, 5487.32, -12.42814, 0.7504908, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3703) +(@OGUID+87 , 180868, 530, 1, 1, -1796.721, 5493.617, -12.42814, 0.7504908, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3703) +(@OGUID+88 , 180868, 530, 1, 1, -1809.226, 5493.723, -12.42814, 0.7155849, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3703) +(@OGUID+89 , 180868, 530, 1, 1, -1794.08, 5495.903, -12.42814, 0.7504908, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3703) +(@OGUID+90 , 180868, 530, 1, 1, -1780.21, 5435.097, -12.42814, 0.2617982, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3703) +(@OGUID+91 , 180868, 530, 1, 1, -1781.543, 5442.225, -12.42814, 0.1919852, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3703) +(@OGUID+92 , 180868, 530, 1, 1, -1784.189, 5438.144, -12.42814, 0.2268925, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3703) +(@OGUID+93 , 180868, 530, 1, 1, -1770.829, 5437.18, -12.42814, 0.2617982, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3703) +(@OGUID+94 , 180868, 530, 1, 1, -1768.798, 5445.465, -12.42814, 0.1919852, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3703) +(@OGUID+95 , 180868, 530, 1, 1, -1772.664, 5444.496, -12.42814, 0.1919852, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3703) +(@OGUID+96 , 180868, 530, 1, 1, -1766.992, 5438.217, -12.42814, 0.2617982, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3703) +(@OGUID+97 , 180868, 530, 1, 1, 9487.395, -7292.862, 14.32032, 0.7504908, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3487) +(@OGUID+98 , 180868, 530, 1, 1, 9485.133, -7294.792, 14.32811, 0.7504908, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3487) +(@OGUID+99 , 180868, 530, 1, 1, 9483.845, -7288.145, 14.27744, 0.7155849, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3487) +(@OGUID+100, 180868, 530, 1, 1, 9478.389, -7299.729, 14.37478, 0.7504908, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3487) +(@OGUID+101, 180868, 530, 1, 1, 9474.005, -7299.41, 14.36638, 0.7330382, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3487) +(@OGUID+102, 180868, 530, 1, 1, 9481.45, -7289.982, 14.28201, 0.7155849, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3487) +(@OGUID+103, 180868, 530, 1, 1, 9474.831, -7294.813, 14.31686, 0.7155849, 0, 0, 0, 1, 120, 255, 1), -- 180868 (Area: 3487) +(@OGUID+104, 180869, 530, 1, 1, -1808.304, 5498.599, -12.42814, 5.148723, 0, 0, 0, 1, 120, 255, 1), -- 180869 (Area: 3703) +(@OGUID+105, 180869, 530, 1, 1, -1799.88, 5487.621, -12.42814, 2.44346, 0, 0, 0, 1, 120, 255, 1), -- 180869 (Area: 3703) +(@OGUID+106, 180869, 530, 1, 1, -1778.706, 5445.924, -12.42814, 4.677484, 0, 0, 0, 1, 120, 255, 1), -- 180869 (Area: 3703) +(@OGUID+107, 180869, 530, 1, 1, -1775.92, 5433.098, -12.42814, 0.2792516, 0, 0, 0, 1, 120, 255, 1), -- 180869 (Area: 3703) +(@OGUID+108, 180869, 530, 1, 1, 9482.434, -7299.702, 14.37898, 2.44346, 0, 0, 0, 1, 120, 255, 1), -- 180869 (Area: 3487) +(@OGUID+109, 180869, 530, 1, 1, 9476.028, -7289.976, 14.26634, 5.148723, 0, 0, 0, 1, 120, 255, 1); -- 180869 (Area: 3487) + +DELETE FROM `game_event_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+109 AND `eventEntry`=@Event; +INSERT INTO `game_event_gameobject` SELECT @Event, gameobject.guid FROM `gameobject` WHERE gameobject.guid BETWEEN @OGUID+0 AND @OGUID+109; + +-- Add missing lunar spawns +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+17; +INSERT INTO `creature` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `curhealth`) VALUES +(@CGUID+0 , 15892, 530, -1781.75, 5438.715, -12.34481, 0.2617994, 120, 0), -- 15892 (Area: 3703) +(@CGUID+1 , 15892, 530, -1775.563, 5444.455, -12.34481, 4.223697, 120, 0), -- 15892 (Area: 3703) +(@CGUID+2 , 15892, 530, -1773.548, 5436.28, -12.3448, 2.495821, 120, 0), -- 15892 (Area: 3703) +(@CGUID+3 , 15898, 530, -1790.075, 5499.826, -12.34481, 0.6981317, 120, 0), -- 15898 (Area: 3703) +(@CGUID+4 , 15898, 530, -1763.572, 5447.717, -12.34481, 0.2268928, 120, 0), -- 15898 (Area: 3703) (Auras: ) +(@CGUID+5 , 15898, 530, 9490.617, -7290.235, 14.39641, 0.6981317, 120, 0), -- 15898 (Area: 3487) +(@CGUID+6 , 15895, 530, -1794.924, 5506.388, -12.34481, 0.6806784, 120, 0), -- 15895 (Area: 3703) +(@CGUID+7 , 15895, 530, -1762.115, 5439.025, -12.34481, 0.3316126, 120, 0), -- 15895 (Area: 3703) (Auras: ) +(@CGUID+8 , 15895, 530, 9487.328, -7285.737, 14.37371, 0.6806784, 120, 0), -- 15895 (Area: 3487) +(@CGUID+9 , 15891, 530, -1799.079, 5491.603, -12.34481, 2.879793, 120, 0), -- 15891 (Area: 3703) +(@CGUID+10, 15891, 530, -1804.241, 5498.248, -12.34481, 4.694936, 120, 0), -- 15891 (Area: 3703) +(@CGUID+11, 15891, 530, -1807.636, 5489.974, -12.34481, 0.7504916, 120, 0), -- 15891 (Area: 3703) +(@CGUID+12, 15891, 530, 9483.579, -7296.714, 14.43082, 2.879793, 120, 0), -- 15891 (Area: 3487) +(@CGUID+13, 15891, 530, 9479.115, -7290.209, 14.36029, 4.694936, 120, 0), -- 15891 (Area: 3487) +(@CGUID+14, 15891, 530, 9475.681, -7297.988, 14.43598, 0.7504916, 120, 0), -- 15891 (Area: 3487) +(@CGUID+15, 15897, 530, -1804.344, 5492.794, -12.34481, 5.375614, 120, 0), -- 15897 (Area: 3703) (Auras: 25824 - 25824) +(@CGUID+16, 15897, 530, -1778.063, 5439.687, -12.34481, 4.415683, 120, 0), -- 15897 (Area: 3703) (Auras: 25824 - 25824) +(@CGUID+17, 15897, 530, 9479.258, -7295.212, 14.4095, 4.39823, 120, 0); -- 15897 (Area: 3487) (Auras: 25824 - 25824) + +DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+17 AND `eventEntry`=@Event; +INSERT INTO `game_event_creature` SELECT @Event, creature.guid FROM `creature` WHERE creature.guid BETWEEN @CGUID+0 AND @CGUID+17; diff --git a/sql/updates/world/2016_02_12_00_world.sql b/sql/updates/world/2016_02_12_00_world.sql new file mode 100644 index 00000000000..af599148e04 --- /dev/null +++ b/sql/updates/world/2016_02_12_00_world.sql @@ -0,0 +1,7 @@ +-- +-- Spawn creature ID 16399 Bloodsail Traitor: +SET @CGUID := 1528; -- selected by TC team + +DELETE FROM `creature` WHERE `id` = 16399; +INSERT INTO `creature` (`guid`,`id`,`map`,`zoneId`,`areaId`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`,`VerifiedBuild`) VALUES +(@CGUID, 16399, 0, 0, 0, 1, 1, 2557, 1, -14184.4, 192.764, 20.6905, 3.735, 300, 0, 0, 2059, 0, 0, 0, 0, 0, 0); diff --git a/sql/updates/world/2016_02_13_00_world.sql b/sql/updates/world/2016_02_13_00_world.sql new file mode 100644 index 00000000000..2341e33a8b5 --- /dev/null +++ b/sql/updates/world/2016_02_13_00_world.sql @@ -0,0 +1,4 @@ +SET @ENTRY:=23258; +SET @AURA:=40670; +DELETE FROM `creature_template_addon` WHERE `entry` = @ENTRY; +INSERT INTO `creature_template_addon` (`entry`, `auras`) VALUES (@ENTRY, @AURA); diff --git a/sql/updates/world/2016_02_13_01_world.sql b/sql/updates/world/2016_02_13_01_world.sql new file mode 100644 index 00000000000..29f94a9f41d --- /dev/null +++ b/sql/updates/world/2016_02_13_01_world.sql @@ -0,0 +1,206 @@ +SET @OGUID:=79877; +SET @Event:=7; + +-- Add missing lunar objects +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+152; +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 , 180879, 1, 1, 1, 7593.807, -2222.592, 469.1576, 3.804818, 0, 0, 0, 1, 120, 255, 1), -- 180879 (Area: 493) +(@OGUID+1 , 180879, 1, 1, 1, 7595.46, -2226.798, 468.3849, 4.76475, 0, 0, 0, 1, 120, 255, 1), -- 180879 (Area: 493) +(@OGUID+2 , 180879, 1, 1, 1, 7592.46, -2218.003, 469.6433, 2.199115, 0, 0, 0, 1, 120, 255, 1), -- 180879 (Area: 493) +(@OGUID+3 , 180880, 1, 1, 1, 7593.197, -2221.986, 470.9921, 2.321287, 0, 0, 0, 1, 120, 255, 1), -- 180880 (Area: 493) +(@OGUID+4 , 180880, 1, 1, 1, 7596.01, -2226.955, 470.215, 4.782203, 0, 0, 0, 1, 120, 255, 1), -- 180880 (Area: 493) +(@OGUID+5 , 180880, 1, 1, 1, 7591.976, -2217.98, 471.4845, 1.466076, 0, 0, 0, 1, 120, 255, 1), -- 180880 (Area: 493) +(@OGUID+6 , 180880, 1, 1, 1, 7593.209, -2218.238, 471.4679, 4.450591, 0, 0, 0, 1, 120, 255, 1), -- 180880 (Area: 493) +(@OGUID+7 , 180881, 1, 1, 1, 7595.163, -2227.192, 470.1959, 4.136433, 0, 0, 0, 1, 120, 255, 1), -- 180881 (Area: 493) +(@OGUID+8 , 180881, 1, 1, 1, 7594.063, -2222.041, 470.9863, 3.595379, 0, 0, 0, 1, 120, 255, 1), -- 180881 (Area: 493) +(@OGUID+9 , 180881, 1, 1, 1, 7595.476, -2226.666, 470.2082, 2.024579, 0, 0, 0, 1, 120, 255, 1), -- 180881 (Area: 493) +(@OGUID+10 , 180881, 1, 1, 1, 7592.764, -2218.324, 471.472, 5.393069, 0, 0, 0, 1, 120, 255, 1), -- 180881 (Area: 493) +(@OGUID+11 , 180881, 1, 1, 1, 7592.445, -2217.559, 471.4581, 0.7330382, 0, 0, 0, 1, 120, 255, 1), -- 180881 (Area: 493) +(@OGUID+12 , 180882, 1, 1, 1, 7593.618, -2221.826, 470.969, 6.108654, 0, 0, 0, 1, 120, 255, 1), -- 180882 (Area: 493) +(@OGUID+13 , 180882, 1, 1, 1, 7595.62, -2227.267, 470.2169, 3.961899, 0, 0, 0, 1, 120, 255, 1), -- 180882 (Area: 493) +(@OGUID+14 , 180882, 1, 1, 1, 7595.934, -2226.421, 470.1891, 1.710422, 0, 0, 0, 1, 120, 255, 1), -- 180882 (Area: 493) +(@OGUID+15 , 180882, 1, 1, 1, 7592.151, -2218.304, 471.4556, 2.18166, 0, 0, 0, 1, 120, 255, 1), -- 180882 (Area: 493) +(@OGUID+16 , 180882, 1, 1, 1, 7592.401, -2218.573, 471.4416, 2.91469, 0, 0, 0, 1, 120, 255, 1), -- 180882 (Area: 493) +(@OGUID+17 , 180883, 1, 1, 1, 7595.268, -2226.156, 470.2048, 3.246347, 0, 0, 0, 1, 120, 255, 1), -- 180883 (Area: 493) +(@OGUID+18 , 180883, 1, 1, 1, 7594.821, -2226.714, 470.1994, 0.2792516, 0, 0, 0, 1, 120, 255, 1), -- 180883 (Area: 493) +(@OGUID+19 , 180883, 1, 1, 1, 7593.012, -2217.75, 471.4669, 3.124123, 0, 0, 0, 1, 120, 255, 1), -- 180883 (Area: 493) +(@OGUID+20 , 180851, 1, 1, 1, 7564.366, -2224.284, 475.4654, 5.148725, 0, 0, 0, 1, 120, 255, 1), -- 180851 (Area: 493) +(@OGUID+21 , 180851, 1, 1, 1, 7600.833, -2219.168, 473.4156, 1.274088, 0, 0, 0, 1, 120, 255, 1), -- 180851 (Area: 493) +(@OGUID+22 , 180851, 1, 1, 1, 7588.353, -2200.221, 479.1006, 4.20625, 0, 0, 0, 1, 120, 255, 1), -- 180851 (Area: 493) +(@OGUID+23 , 180851, 1, 1, 1, 7592.721, -2256.181, 467.8657, 1.326448, 0, 0, 0, 1, 120, 255, 1), -- 180851 (Area: 493) +(@OGUID+24 , 180851, 1, 1, 1, 7600.807, -2205.065, 476.8404, 5.061459, 0, 0, 0, 1, 120, 255, 1), -- 180851 (Area: 493) +(@OGUID+25 , 180851, 1, 1, 1, 7588.353, -2200.221, 479.1006, 4.20625, 0, 0, 0, 1, 120, 255, 1), -- 180851 (Area: 493) +(@OGUID+26 , 180851, 1, 1, 1, 7612.306, -2222.548, 473.3903, 4.468043, 0, 0, 0, 1, 120, 255, 1), -- 180851 (Area: 493) +(@OGUID+27 , 180851, 1, 1, 1, 7577.153, -2226.377, 475.8007, 1.937312, 0, 0, 0, 1, 120, 255, 1), -- 180851 (Area: 493) +(@OGUID+28 , 180851, 1, 1, 1, 7573.452, -2244.367, 470.6506, 1.291542, 0, 0, 0, 1, 120, 255, 1), -- 180851 (Area: 493) +(@OGUID+29 , 180851, 1, 1, 1, 7588.164, -2211.207, 476.1555, 2.024579, 0, 0, 0, 1, 120, 255, 1), -- 180851 (Area: 493) +(@OGUID+30 , 180851, 1, 1, 1, 7581.566, -2236.441, 474.0557, 3.455756, 0, 0, 0, 1, 120, 255, 1), -- 180851 (Area: 493) +(@OGUID+31 , 180851, 1, 1, 1, 7607.799, -2215.778, 473.6258, 2.373644, 0, 0, 0, 1, 120, 255, 1), -- 180851 (Area: 493) +(@OGUID+32 , 180851, 1, 1, 1, 7592.721, -2256.181, 467.8657, 1.326448, 0, 0, 0, 1, 120, 255, 1), -- 180851 (Area: 493) +(@OGUID+33 , 180851, 1, 1, 1, 7579.257, -2243.993, 471.6541, 2.18166, 0, 0, 0, 1, 120, 255, 1), -- 180851 (Area: 493) +(@OGUID+34 , 180851, 1, 1, 1, 7612.306, -2222.548, 473.3903, 4.468043, 0, 0, 0, 1, 120, 255, 1), -- 180851 (Area: 493) +(@OGUID+35 , 180851, 1, 1, 1, 7600.601, -2238.859, 470.7188, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180851 (Area: 493) +(@OGUID+36 , 180851, 1, 1, 1, 7588.164, -2211.207, 476.1555, 2.024579, 0, 0, 0, 1, 120, 255, 1), -- 180851 (Area: 493) +(@OGUID+37 , 180851, 1, 1, 1, 7617.579, -2233.563, 470.0322, 2.548179, 0, 0, 0, 1, 120, 255, 1), -- 180851 (Area: 493) +(@OGUID+38 , 180861, 1, 1, 1, 7575.579, -2210.406, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+39 , 180861, 1, 1, 1, 7575.579, -2213.406, 486.1616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+40 , 180861, 1, 1, 1, 7575.579, -2213.406, 477.1616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+41 , 180861, 1, 1, 1, 7575.579, -2210.406, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+42 , 180861, 1, 1, 1, 7575.579, -2213.406, 486.1616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+43 , 180861, 1, 1, 1, 7575.579, -2213.406, 477.1616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+44 , 180861, 1, 1, 1, 7575.579, -2213.406, 477.1616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+45 , 180861, 1, 1, 1, 7575.579, -2213.406, 486.1616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+46 , 180861, 1, 1, 1, 7575.579, -2210.406, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+47 , 180861, 1, 1, 1, 7575.579, -2210.406, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+48 , 180861, 1, 1, 1, 7575.579, -2213.406, 486.1616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+49 , 180861, 1, 1, 1, 7575.579, -2213.406, 477.1616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+50 , 180861, 1, 1, 1, 7575.579, -2213.406, 486.1616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+51 , 180861, 1, 1, 1, 7575.579, -2213.406, 477.1616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+52 , 180861, 1, 1, 1, 7575.579, -2210.406, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+53 , 180861, 1, 1, 1, 7575.579, -2213.406, 477.1616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+54 , 180861, 1, 1, 1, 7575.579, -2213.406, 486.1616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+55 , 180861, 1, 1, 1, 7575.579, -2210.406, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+56 , 180861, 1, 1, 1, 7575.579, -2210.406, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+57 , 180861, 1, 1, 1, 7575.579, -2213.406, 486.1616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+58 , 180861, 1, 1, 1, 7575.579, -2213.406, 477.1616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+59 , 180861, 1, 1, 1, 7575.579, -2210.406, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+60 , 180861, 1, 1, 1, 7575.579, -2213.406, 486.1616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+61 , 180861, 1, 1, 1, 7575.579, -2213.406, 477.1616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+62 , 180861, 1, 1, 1, 7575.579, -2213.406, 477.1616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+63 , 180861, 1, 1, 1, 7575.579, -2213.406, 486.1616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+64 , 180861, 1, 1, 1, 7575.579, -2210.406, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180861 (Area: 493) +(@OGUID+65 , 180864, 1, 1, 1, 7580.829, -2214.906, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180864 (Area: 493) +(@OGUID+66 , 180864, 1, 1, 1, 7570.329, -2214.906, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180864 (Area: 493) +(@OGUID+67 , 180864, 1, 1, 1, 7580.829, -2214.906, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180864 (Area: 493) +(@OGUID+68 , 180864, 1, 1, 1, 7570.329, -2214.906, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180864 (Area: 493) +(@OGUID+69 , 180864, 1, 1, 1, 7570.329, -2214.906, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180864 (Area: 493) +(@OGUID+70 , 180864, 1, 1, 1, 7580.829, -2214.906, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180864 (Area: 493) +(@OGUID+71 , 180864, 1, 1, 1, 7570.329, -2214.906, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180864 (Area: 493) +(@OGUID+72 , 180864, 1, 1, 1, 7580.829, -2214.906, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180864 (Area: 493) +(@OGUID+73 , 180864, 1, 1, 1, 7580.829, -2214.906, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180864 (Area: 493) +(@OGUID+74 , 180864, 1, 1, 1, 7570.329, -2214.906, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180864 (Area: 493) +(@OGUID+75 , 180864, 1, 1, 1, 7570.329, -2214.906, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180864 (Area: 493) +(@OGUID+76 , 180864, 1, 1, 1, 7580.829, -2214.906, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180864 (Area: 493) +(@OGUID+77 , 180864, 1, 1, 1, 7580.829, -2214.906, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180864 (Area: 493) +(@OGUID+78 , 180864, 1, 1, 1, 7570.329, -2214.906, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180864 (Area: 493) +(@OGUID+79 , 180864, 1, 1, 1, 7580.829, -2214.906, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180864 (Area: 493) +(@OGUID+80 , 180864, 1, 1, 1, 7570.329, -2214.906, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180864 (Area: 493) +(@OGUID+81 , 180864, 1, 1, 1, 7580.829, -2214.906, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180864 (Area: 493) +(@OGUID+82 , 180864, 1, 1, 1, 7570.329, -2214.906, 481.6616, 4.084075, 0, 0, 0, 1, 120, 255, 1), -- 180864 (Area: 493) +(@OGUID+83 , 180769, 1, 1, 1, 7879.087, -2219.161, 479.2853, 5.689774, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 2362) +(@OGUID+84 , 180769, 1, 1, 1, 7837.341, -2197, 478.0439, 2.548179, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 2362) +(@OGUID+85 , 180769, 1, 1, 1, 7868.952, -2191.253, 486.3665, 0.9075702, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 2362) +(@OGUID+86 , 180879, 1, 1, 1, 7946.622, -2621.156, 492.3542, 1.850049, 0, 0, 0, 1, 120, 255, 1), -- 180879 (Area: 2361) +(@OGUID+87 , 180909, 1, 1, 1, 7946.665, -2621.123, 494.2065, 2.775069, 0, 0, 0, 1, 120, 255, 1), -- 180909 (Area: 2361) +(@OGUID+88 , 180909, 1, 1, 1, 7946.252, -2621.753, 494.1519, 6.161013, 0, 0, 0, 1, 120, 255, 1), -- 180909 (Area: 2361) +(@OGUID+89 , 180909, 1, 1, 1, 7946.777, -2621.559, 494.1994, 3.263772, 0, 0, 0, 1, 120, 255, 1), -- 180909 (Area: 2361) +(@OGUID+90 , 180909, 1, 1, 1, 7947.238, -2621.351, 494.1782, 3.822273, 0, 0, 0, 1, 120, 255, 1), -- 180909 (Area: 2361) +(@OGUID+91 , 180777, 1, 1, 1, 7951.528, -2615.867, 492.9226, 1.710422, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 2361) +(@OGUID+92 , 180777, 1, 1, 1, 7948.855, -2629.297, 493.1261, 1.361356, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 2361) +(@OGUID+93 , 180910, 1, 1, 1, 7946.681, -2621.326, 494.1927, 5.131269, 0, 0, 0, 1, 120, 255, 1), -- 180910 (Area: 2361) +(@OGUID+94 , 188215, 1, 1, 1, 7947.822, -2622.942, 492.8509, 2.809975, 0, 0, 0, 1, 120, 255, 1), -- 188215 (Area: 2361) - !!! might be temporary spawn !!! +(@OGUID+95 , 188215, 1, 1, 1, 7948.878, -2619.704, 492.7197, 2.303831, 0, 0, 0, 1, 120, 255, 1), -- 188215 (Area: 2361) - !!! might be temporary spawn !!! +(@OGUID+96 , 180764, 1, 1, 1, 7781.23, -2437.568, 494.049, 6.003934, 0, 0, 0, 1, 120, 255, 1), -- 180764 (Area: 2361) +(@OGUID+97 , 180769, 1, 1, 1, 7797.483, -2417.394, 497.058, 1.937312, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 2361) +(@OGUID+98 , 180769, 1, 1, 1, 7439.099, -2809.767, 473.9281, 3.508117, 0, 0, 0, 1, 120, 255, 1), -- 180769 (Area: 656) +(@OGUID+99 , 180777, 1, 1, 1, 7619.005, -2221.212, 469.807, 0.8377575, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 0) +(@OGUID+100, 180777, 1, 1, 1, 7586.018, -2220.791, 471.5764, 2.408554, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 0) +(@OGUID+101, 180777, 1, 1, 1, 7591.077, -2214.273, 471.4059, 5.689774, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 0) +(@OGUID+102, 180777, 1, 1, 1, 7585.201, -2209.946, 473.8624, 5.532695, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 0) +(@OGUID+103, 180777, 1, 1, 1, 7580.083, -2215.166, 473.3982, 2.391098, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 0) +(@OGUID+104, 180777, 1, 1, 1, 7587.347, -2196.992, 476.204, 1.343901, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 0) +(@OGUID+105, 180777, 1, 1, 1, 7562.486, -2227.179, 471.6295, 3.595379, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 0) +(@OGUID+106, 180777, 1, 1, 1, 7571.573, -2207.698, 474.8347, 2.321287, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 0) +(@OGUID+107, 180777, 1, 1, 1, 7577.507, -2201.813, 475.4521, 5.532695, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 0) +(@OGUID+108, 180777, 1, 1, 1, 7497.841, -2203.225, 480.2202, 6.248279, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 0) +(@OGUID+109, 180777, 1, 1, 1, 7499.098, -2191.63, 480.452, 3.054327, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 0) +(@OGUID+110, 180777, 1, 1, 1, 7937.66, -2362.064, 488.5504, 4.642576, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 2362) +(@OGUID+111, 180777, 1, 1, 1, 7971.51, -2352.85, 488.2709, 1.727875, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 2362) +(@OGUID+112, 180777, 1, 1, 1, 7993.134, -2468.059, 489.5084, 3.124123, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 2361) +(@OGUID+113, 180777, 1, 1, 1, 7960.454, -2515.816, 485.9554, 5.340709, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 2361) +(@OGUID+114, 180777, 1, 1, 1, 7925.333, -2550.147, 486.0686, 4.101525, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 2361) +(@OGUID+115, 180777, 1, 1, 1, 7951.528, -2615.867, 492.9226, 1.710422, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 2361) +(@OGUID+116, 180777, 1, 1, 1, 7948.855, -2629.297, 493.1261, 1.361356, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 2361) +(@OGUID+117, 180777, 1, 1, 1, 7530.31, -2850.198, 458.604, 2.513274, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 656) +(@OGUID+118, 180777, 1, 1, 1, 7532.818, -2852.513, 458.175, 2.321287, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 656) +(@OGUID+119, 180777, 1, 1, 1, 7562.452, -2873.018, 460.911, 2.530723, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 656) +(@OGUID+120, 180777, 1, 1, 1, 7559.907, -2871.458, 460.6194, 2.583081, 0, 0, 0, 1, 120, 255, 1), -- 180777 (Area: 656) +(@OGUID+121, 180875, 1, 1, 1, 7531.745, -2851.107, 457.8172, 2.408554, 0, 0, 0, 1, 120, 255, 1), -- 180875 (Area: 656) +(@OGUID+122, 180875, 1, 1, 1, 7561.202, -2872.201, 459.9906, 2.583081, 0, 0, 0, 1, 120, 255, 1), -- 180875 (Area: 656) +(@OGUID+123, 180773, 1, 1, 1, 7562.604, -2903.484, 462.9012, 1.413715, 0, 0, 0, 1, 120, 255, 1), -- 180773 (Area: 656) +(@OGUID+124, 180773, 1, 1, 1, 7570.199, -2903.755, 462.812, 1.640607, 0, 0, 0, 1, 120, 255, 1), -- 180773 (Area: 656) +(@OGUID+125, 180765, 1, 1, 1, 7478.559, -2652.309, 455.1449, 3.822273, 0, 0, 0, 1, 120, 255, 1), -- 180765 (Area: 656) +(@OGUID+126, 180765, 1, 1, 1, 7532.16, -2467.022, 455.5912, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 180765 (Area: 0) +(@OGUID+127, 180766, 1, 1, 1, 7572.346, -2366.04, 454.7335, 4.01426, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 0) +(@OGUID+128, 180766, 1, 1, 1, 7535.119, -2436.779, 453.7722, 1.291542, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 0) +(@OGUID+129, 180766, 1, 1, 1, 7528.662, -2481.222, 454.3387, 4.32842, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 0) +(@OGUID+130, 180766, 1, 1, 1, 7499.897, -2487.684, 457.2921, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 0) +(@OGUID+131, 180766, 1, 1, 1, 7520.417, -2504.377, 454.1295, 4.276057, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 0) +(@OGUID+132, 180766, 1, 1, 1, 7479.219, -2479.521, 461.8409, 0.1745321, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 0) +(@OGUID+133, 180766, 1, 1, 1, 7497.929, -2564.247, 454.2826, 4.258607, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 656) +(@OGUID+134, 180766, 1, 1, 1, 7496.524, -2532.186, 452.8313, 0.9424766, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 656) +(@OGUID+135, 180766, 1, 1, 1, 7464.938, -2691.611, 454.3436, 1.396262, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 656) +(@OGUID+136, 180766, 1, 1, 1, 7475.028, -2597.744, 452.8322, 1.239183, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 656) +(@OGUID+137, 180766, 1, 1, 1, 7483.91, -2632.364, 453.8647, 4.415683, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 656) +(@OGUID+138, 180766, 1, 1, 1, 7463.901, -2741.921, 459.2945, 1.396262, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 656) +(@OGUID+139, 180766, 1, 1, 1, 7494.413, -2822.02, 461.3461, 4.991644, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 656) +(@OGUID+140, 180766, 1, 1, 1, 7481.923, -2829.692, 461.2198, 1.745327, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 656) +(@OGUID+141, 180766, 1, 1, 1, 7461.356, -2813.827, 462.3748, 1.797689, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 656) +(@OGUID+142, 180766, 1, 1, 1, 7474.328, -2795.222, 462.4803, 4.625124, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 656) +(@OGUID+143, 180766, 1, 1, 1, 7461.583, -2802.854, 462.1353, 1.396262, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 656) +(@OGUID+144, 180766, 1, 1, 1, 7475.494, -2750.214, 460.2916, 4.625124, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 656) +(@OGUID+145, 180766, 1, 1, 1, 7533.194, -2849.556, 456.259, 5.585054, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 656) +(@OGUID+146, 180766, 1, 1, 1, 7560.079, -2900.277, 460.4167, 2.949595, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 656) +(@OGUID+147, 180766, 1, 1, 1, 7562.421, -2870.49, 458.3398, 5.742135, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 656) +(@OGUID+148, 180766, 1, 1, 1, 7572.878, -2900.665, 460.2018, 3.159062, 0, 0, 0, 1, 120, 255, 1), -- 180766 (Area: 656) +(@OGUID+149, 180767, 1, 1, 1, 7472.893, -2651.321, 455.1381, 5.480334, 0, 0, 0, 1, 120, 255, 1), -- 180767 (Area: 656) +(@OGUID+150, 180767, 1, 1, 1, 7526.87, -2464.803, 455.183, 0.087266, 0, 0, 0, 1, 120, 255, 1), -- 180767 (Area: 0) +(@OGUID+151, 180767, 1, 1, 1, 7553.503, -2401.662, 456.9937, 1.483528, 0, 0, 0, 1, 120, 255, 1), -- 180767 (Area: 0) +(@OGUID+152, 180767, 1, 1, 1, 7547.994, -2399.728, 456.7213, 0.8203033, 0, 0, 0, 1, 120, 255, 1); -- 180767 (Area: 0) + +DELETE FROM `game_event_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+152 AND `eventEntry`=@Event; +INSERT INTO `game_event_gameobject` SELECT @Event, gameobject.guid FROM `gameobject` WHERE gameobject.guid BETWEEN @OGUID+0 AND @OGUID+152; + +UPDATE `creature_addon` SET `emote`=0 WHERE `guid` IN (91639, 91644, 91657, 91658, 91663, 91669, 91671, 91676); + +-- Darnassus Reveler SAI +SET @ENTRY := 15905; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,1,0,100,0,5000,5000,5000,10000,10,11,94,0,0,0,0,1,0,0,0,0,0,0,0,"Darnassus Reveler - Out of Combat - Play Random Emote (11, 94)"); + +-- Ironforge Reveler SAI +SET @ENTRY := 15906; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,1,0,100,0,5000,5000,5000,10000,10,11,94,0,0,0,0,1,0,0,0,0,0,0,0,"Ironforge Reveler - Out of Combat - Play Random Emote (11, 94)"); + +-- Stormwind Reveler SAI +SET @ENTRY := 15694; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,1,0,100,0,5000,5000,5000,10000,10,11,94,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind Reveler - Out of Combat - Play Random Emote (11, 94)"); + +-- Orgrimmar Reveler SAI +SET @ENTRY := 15908; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,1,0,100,0,5000,5000,5000,10000,10,11,94,0,0,0,0,1,0,0,0,0,0,0,0,"Orgrimmar Reveler - Out of Combat - Play Random Emote (11, 94)"); + +-- Thunder Bluff Reveler SAI +SET @ENTRY := 15719; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,1,0,100,0,5000,5000,5000,10000,10,11,94,0,0,0,0,1,0,0,0,0,0,0,0,"Thunder Bluff Reveler - Out of Combat - Play Random Emote (11, 94)"); + +-- Undercity Reveler SAI +SET @ENTRY := 15907; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,1,0,100,0,5000,5000,5000,10000,10,11,94,0,0,0,0,1,0,0,0,0,0,0,0,"Undercity Reveler - Out of Combat - Play Random Emote (11, 94)"); diff --git a/sql/updates/world/2016_02_13_02_world.sql b/sql/updates/world/2016_02_13_02_world.sql new file mode 100644 index 00000000000..5a4633fee41 --- /dev/null +++ b/sql/updates/world/2016_02_13_02_world.sql @@ -0,0 +1,74 @@ +-- Update aura for Manifest Nightmare +UPDATE `creature_template_addon` SET `auras`='39579 37509' WHERE `entry`=22889; +-- Update aura for Phantasmal Lash +UPDATE `creature_template_addon` SET `auras`='34427' WHERE `entry`=22902; + +-- Pathing for Moonglade Warden Entry: 11822 'TDB FORMAT' +SET @NPC := 42393; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7546.649,`position_y`=-2901.733,`position_z`=462.5362 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7546.649,-2901.733,462.5362,0,0,0,0,100,0), -- 13:28:53 +(@PATH,2,7528.728,-2908.457,461.338,0,0,0,0,100,0), -- 13:28:57 +(@PATH,3,7517.918,-2920.282,461.923,0,0,0,0,100,0), -- 13:29:03 +(@PATH,4,7512.568,-2933.285,464.4847,0,0,0,0,100,0), -- 13:29:09 +(@PATH,5,7509.731,-2947.129,463.4818,0,0,0,0,100,0), -- 13:29:15 +(@PATH,6,7510.136,-2952.441,461.5912,0,0,0,0,100,0), -- 13:29:20 +(@PATH,7,7511.554,-2961.568,462.0287,0,0,0,0,100,0), -- 13:29:26 +(@PATH,8,7529.275,-2970.313,461.0047,0,0,0,0,100,0), -- 13:29:30 +(@PATH,9,7534.475,-2972.501,460.6516,0,0,0,0,100,0), -- 13:29:36 +(@PATH,10,7542.61,-2984.713,461.6914,0,0,0,0,100,0), -- 13:29:41 +(@PATH,11,7541.939,-2996.007,464.5852,0,0,0,0,100,0), -- 13:29:44 +(@PATH,12,7537.476,-3005.4,466.0187,0,0,0,0,100,0), -- 13:29:47 +(@PATH,13,7535.565,-3017.812,466.2273,0,0,0,0,100,0), -- 13:29:52 +(@PATH,14,7550.125,-3028.802,462.2839,0,0,0,0,100,0), -- 13:29:57 +(@PATH,15,7566.678,-3023.841,461.0449,0,0,0,0,100,0), -- 13:30:05 +(@PATH,16,7574.592,-3019.921,460.4108,0,0,0,0,100,0), -- 13:30:16 +(@PATH,17,7580.481,-3005.122,461.308,0,0,0,0,100,0), -- 13:30:19 +(@PATH,18,7581.311,-2996.924,462.5332,0,0,0,0,100,0), -- 13:30:23 +(@PATH,19,7589.289,-2980.43,460.9365,0,0,0,0,100,0), -- 13:30:28 +(@PATH,20,7589.837,-2979.668,460.4661,0,0,0,0,100,0), -- 13:30:33 +(@PATH,21,7606.989,-2972.392,461.5837,0,0,0,0,100,0), -- 13:30:37 +(@PATH,22,7617.824,-2965.905,461.3898,0,0,0,0,100,0), -- 13:30:43 +(@PATH,23,7620.032,-2963.793,461.5444,0,0,0,0,100,0), -- 13:30:47 +(@PATH,24,7653.39,-2955.129,463.8018,0,0,0,0,100,0), -- 13:30:51 +(@PATH,25,7668.529,-2958.117,464.894,0,0,0,0,100,0), -- 13:31:05 +(@PATH,26,7652.024,-2942.818,463.3503,0,0,0,0,100,0), -- 13:31:13 +(@PATH,27,7648.988,-2940.365,462.6953,0,0,0,0,100,0), -- 13:31:24 +(@PATH,28,7623.73,-2923.926,462.5015,0,0,0,0,100,0), -- 13:31:36 +(@PATH,29,7596.945,-2907.005,462.287,0,0,0,0,100,0), -- 13:31:43 +(@PATH,30,7589.421,-2904.872,461.6304,0,0,0,0,100,0), -- 13:31:51 +(@PATH,31,7591.465,-2904.978,461.9995,0,0,0,0,100,0), -- 13:31:58 +(@PATH,32,7600.53,-2909.323,462.908,0,0,0,0,100,0), -- 13:32:02 +(@PATH,33,7610.539,-2915.46,462.7303,0,0,0,0,100,0), -- 13:32:10 +(@PATH,34,7623.934,-2924.251,462.4937,0,0,0,0,100,0), -- 13:32:16 +(@PATH,35,7670.327,-2956.833,465.3539,0,0,0,0,100,0), -- 13:32:28 +(@PATH,36,7656.929,-2955.638,464.1862,0,0,0,0,100,0), -- 13:32:40 +(@PATH,37,7622.145,-2953.092,462.1255,0,0,0,0,100,0), -- 13:32:49 +(@PATH,38,7621.655,-2953.013,461.7986,0,0,0,0,100,0), -- 13:33:01 +(@PATH,39,7615.943,-2966.924,461.1361,0,0,0,0,100,0), -- 13:33:06 +(@PATH,40,7603.335,-2972.608,460.9927,0,0,0,0,100,0), -- 13:33:12 +(@PATH,41,7598.073,-2973.764,460.5677,0,0,0,0,100,0), -- 13:33:16 +(@PATH,42,7584.056,-2987.697,461.8174,0,0,0,0,100,0), -- 13:33:20 +(@PATH,43,7581.24,-2999.696,462.0973,0,0,0,0,100,0), -- 13:33:25 +(@PATH,44,7580.043,-3009.624,460.9475,0,0,0,0,100,0), -- 13:33:29 +(@PATH,45,7579.715,-3010.909,460.7065,0,0,0,0,100,0), -- 13:33:34 +(@PATH,46,7556.479,-3028.306,461.8019,0,0,0,0,100,0), -- 13:33:38 +(@PATH,47,7535.963,-3018.814,465.7519,0,0,0,0,100,0), -- 13:33:48 +(@PATH,48,7541.39,-2997.226,464.9632,0,0,0,0,100,0), -- 13:34:01 +(@PATH,49,7544.303,-2989.159,462.7299,0,0,0,0,100,0), -- 13:34:06 +(@PATH,50,7542.205,-2983.293,461.2471,0,0,0,0,100,0), -- 13:34:09 +(@PATH,51,7540.801,-2981.162,461.0032,0,0,0,0,100,0), -- 13:34:13 +(@PATH,52,7521.677,-2967.251,461.8644,0,0,0,0,100,0), -- 13:34:17 +(@PATH,53,7519.106,-2965.93,461.9445,0,0,0,0,100,0), -- 13:34:24 +(@PATH,54,7509.905,-2950.868,462.2672,0,0,0,0,100,0), -- 13:34:28 +(@PATH,55,7510.615,-2942.81,464.3668,0,0,0,0,100,0), -- 13:34:33 +(@PATH,56,7515.797,-2924.253,463.1058,0,0,0,0,100,0), -- 13:34:37 +(@PATH,57,7521.769,-2915.139,460.8744,0,0,0,0,100,0), -- 13:34:45 +(@PATH,58,7537.507,-2902.868,462.3076,0,0,0,0,100,0), -- 13:34:50 +(@PATH,59,7538.777,-2902.161,462.3616,0,0,0,0,100,0), -- 13:34:56 +(@PATH,60,7546.649,-2901.733,462.5362,0,0,0,0,100,0); -- 13:35:03 +-- 0x1C392000200B8B8000003800003F2E06 .go 7546.649 -2901.733 462.5362 diff --git a/sql/updates/world/2016_02_13_03_world.sql b/sql/updates/world/2016_02_13_03_world.sql new file mode 100644 index 00000000000..136a068bd9e --- /dev/null +++ b/sql/updates/world/2016_02_13_03_world.sql @@ -0,0 +1,166 @@ + +SET @CGUID := 145042; +SET @OGUID := 82917; + + +DELETE FROM `spell_area` WHERE `spell`=58139 AND `area`IN(4530,4531); +INSERT INTO `spell_area` (`spell`, `area`, `quest_start`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`, `quest_start_status`, `quest_end_status`) VALUES +(58139, 4531, 13144, 0, 0, 0, 2, 1, 64, 11), -- The Fleshweks after Killing two scourge with one skeleton +(58139, 4530, 13144, 0, 0, 0, 2, 1, 64, 11); -- Sanctumn on renaimation after Killing two scourge with one skeleton + +DELETE FROM `creature` WHERE `id` IN(30703,30704,31015,30697,30696,31432); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID+0, 31015, 571, 1, 64, 6661.146, 3261.688, 668.9714, 4.115243, 120, 5, 1), -- 31015 (Area: 4588) (possible waypoints or random movement) +(@CGUID+1, 31015, 571, 1, 64, 6627.71, 3189.896, 647.9885, 2.84596, 120, 5, 1), -- 31015 (Area: 4588) (possible waypoints or random movement) +(@CGUID+2, 31015, 571, 1, 64, 6659.174, 3212.105, 667.0215, 0.1042775, 120, 5, 1), -- 31015 (Area: 4588) (possible waypoints or random movement) +(@CGUID+3, 31015, 571, 1, 64, 6654.514, 3239.867, 670.2061, 5.907172, 120, 5, 1), -- 31015 (Area: 4588) (possible waypoints or random movement) +(@CGUID+4, 31015, 571, 1, 64, 6610.869, 3232.499, 668.5587, 2.604744, 120, 5, 1), -- 31015 (Area: 4588) (possible waypoints or random movement) +(@CGUID+5, 31015, 571, 1, 64, 6605.338, 3153.076, 665.3033, 5.409661, 120, 5, 1), -- 31015 (Area: 4588) (possible waypoints or random movement) +(@CGUID+6, 31015, 571, 1, 64, 6702.106, 3154.25, 654.8233, 5.986479, 120, 5, 1), -- 31015 (Area: 4588) (possible waypoints or random movement) +(@CGUID+7, 31015, 571, 1, 64, 6583.975, 3157.158, 665.6695, 2.269745, 120, 5, 1), -- 31015 (Area: 4588) (possible waypoints or random movement) +(@CGUID+8, 31015, 571, 1, 64, 6565.48, 3315.214, 667.1922, 3.576956, 120, 0, 0), -- 31015 (Area: 4588) +(@CGUID+9, 31015, 571, 1, 64, 6498.057, 3314.354, 664.8021, 0.5061455, 120, 5, 1), -- 31015 (Area: 4588) (possible waypoints or random movement) +(@CGUID+10, 31015, 571, 1, 64, 6518.352, 3309.556, 665.1537, 5.462881, 120, 5, 1), -- 31015 (Area: 4588) (possible waypoints or random movement) +(@CGUID+11, 31015, 571, 1, 64, 6571.921, 3315.821, 668.0949, 2.940412, 120, 0, 0), -- 31015 (Area: 4588) +(@CGUID+12, 31015, 571, 1, 64, 6572.489, 3319.39, 667.0414, -1.827478, 120, 0, 0), -- 31015 (Area: 4588) +(@CGUID+13, 31015, 571, 1, 64, 6530.034, 3256.114, 666.3459, 4.205114, 120, 0, 0), -- 31015 (Area: 4588) +(@CGUID+14, 31015, 571, 1, 64, 6493.935, 3292.664, 664.7191, 5.110613, 120, 5, 1), -- 31015 (Area: 4588) (possible waypoints or random movement) +(@CGUID+15, 31015, 571, 1, 64, 6569.369, 3316.948, 667.7736, -0.4594761, 120, 0, 0), -- 31015 (Area: 4588) (Auras: ) +(@CGUID+16, 31015, 571, 1, 64, 6530.081, 3256.11, 666.2975, 4.193476, 120, 0, 0), -- 31015 (Area: 4588) +(@CGUID+17, 31015, 571, 1, 64, 6464.674, 3252.994, 641.5389, 5.995564, 120, 0, 0), -- 31015 (Area: 4531) +(@CGUID+18, 31015, 571, 1, 64, 6489.055, 3385.385, 598.3196, -1.682238, 120, 0, 0), -- 31015 (Area: 4531) +(@CGUID+19, 31015, 571, 1, 64, 6456.603, 3166.644, 657.527, 1.598204, 120, 0, 0), -- 31015 (Area: 4531) +(@CGUID+20, 31015, 571, 1, 64, 6461.294, 3153.185, 657.5644, 4.921828, 120, 5, 1), -- 31015 (Area: 4531) (possible waypoints or random movement) +(@CGUID+21, 31015, 571, 1, 64, 6453.171, 3166.278, 657.5888, 0.3810751, 120, 0, 0), -- 31015 (Area: 4531) +(@CGUID+22, 31015, 571, 1, 64, 6455.606, 3164.106, 657.6061, 1.870695, 120, 0, 0), -- 31015 (Area: 4531) +(@CGUID+23, 31015, 571, 1, 64, 6412.766, 3231.688, 639.8654, 4.939847, 120, 5, 1), -- 31015 (Area: 4531) (possible waypoints or random movement) +(@CGUID+24, 31015, 571, 1, 64, 6667.497, 3354.504, 704.6642, -2.447248, 120, 0, 0), -- 31015 (Area: 4531) +(@CGUID+25, 30696, 571, 1, 64, 6638.812, 3160.733, 660.6064, 1.080401, 120, 5, 1), -- 30696 (Area: 4588) (possible waypoints or random movement) +(@CGUID+26, 30696, 571, 1, 64, 6686.414, 3147.764, 656.3453, 6.07866, 120, 5, 1), -- 30696 (Area: 4588) (possible waypoints or random movement) +(@CGUID+27, 30696, 571, 1, 64, 6526.674, 3303.937, 665.1752, 4.911891, 120, 5, 1), -- 30696 (Area: 4588) (possible waypoints or random movement) +(@CGUID+28, 30696, 571, 1, 64, 6548.213, 3310.022, 665.8172, 2.349988, 120, 0, 0), -- 30696 (Area: 4588) +(@CGUID+29, 30696, 571, 1, 64, 6532.149, 3256.876, 666.6301, -2.182277, 120, 0, 0), -- 30696 (Area: 4588) +(@CGUID+30, 30696, 571, 1, 64, 6521.981, 3320.334, 664.9473, 4.594295, 120, 0, 0), -- 30696 (Area: 4588) +(@CGUID+31, 30696, 571, 1, 64, 6470.161, 3250.802, 643.5604, 3.930473, 120, 0, 0), -- 30696 (Area: 4531) +(@CGUID+32, 30696, 571, 1, 64, 6487.702, 3380.006, 599.0916, 6.272988, 120, 0, 0), -- 30696 (Area: 4531) +(@CGUID+33, 30696, 571, 1, 64, 6488.242, 3194.719, 652.9039, 1.48353, 120, 0, 0), -- 30696 (Area: 4531) +(@CGUID+34, 30696, 571, 1, 64, 6435.536, 3141.343, 657.5279, 0.1379021, 120, 5, 1), -- 30696 (Area: 4531) (possible waypoints or random movement) +(@CGUID+35, 30696, 571, 1, 64, 6564.194, 3135.601, 666.2081, 0.4537856, 120, 0, 0), -- 30696 (Area: 4531) +(@CGUID+36, 30696, 571, 1, 64, 6410.666, 3233.757, 640.489, 4.667454, 120, 5, 1), -- 30696 (Area: 4531) (possible waypoints or random movement) +(@CGUID+37, 30696, 571, 1, 64, 6413.427, 3218.029, 638.4678, 0.122173, 120, 0, 0), -- 30696 (Area: 4531) +(@CGUID+38, 30696, 571, 1, 64, 6452.031, 3161.715, 657.5867, 0.9863433, 120, 0, 0), -- 30696 (Area: 4531) +(@CGUID+39, 30696, 571, 1, 64, 6459.535, 3110.506, 657.6054, 1.157361, 120, 5, 1), -- 30696 (Area: 4531) (possible waypoints or random movement) +(@CGUID+40, 30696, 571, 1, 64, 6679.659, 3345.589, 704.6539, 3.205272, 120, 5, 1), -- 30696 (Area: 4531) (possible waypoints or random movement) +(@CGUID+41, 30703, 571, 1, 64, 6571.963, 3314.406, 668.2784, 2.36651, 120, 0, 0), -- 30703 (Area: 4588) +(@CGUID+42, 30703, 571, 1, 64, 6517.844, 3323.566, 664.8954, -0.663258, 120, 0, 0), -- 30703 (Area: 4588) +(@CGUID+43, 30703, 571, 1, 64, 6528.306, 3259.301, 665.793, -1.073858, 120, 0, 0), -- 30703 (Area: 4588) +(@CGUID+44, 30703, 571, 1, 64, 6454.563, 3168.846, 657.5237, 5.535412, 120, 0, 0), -- 30703 (Area: 4531) +(@CGUID+45, 30703, 571, 1, 64, 6421.846, 3257.234, 640.0424, 2.456618, 120, 0, 0), -- 30703 (Area: 4531) (Auras: ) +(@CGUID+46, 30703, 571, 1, 64, 6669.027, 3354.094, 704.2711, 2.458861, 120, 0, 0), -- 30703 (Area: 4531) +(@CGUID+47, 30704, 571, 1, 64, 6572.606, 3315.346, 668.405, -2.30596, 120, 0, 0), -- 30704 (Area: 4588) +(@CGUID+48, 30704, 571, 1, 64, 6568.352, 3316.549, 667.683, 2.906086, 120, 0, 0), -- 30704 (Area: 4588) +(@CGUID+49, 30704, 571, 1, 64, 6571.605, 3316.023, 668.1923, -2.073231, 120, 0, 0), -- 30704 (Area: 4588) +(@CGUID+50, 30704, 571, 1, 64, 6530.246, 3252.483, 666.8104, 1.616269, 120, 0, 0), -- 30704 (Area: 4588) +(@CGUID+51, 30704, 571, 1, 64, 6543.361, 3308.063, 665.3945, 0.383608, 120, 0, 0), -- 30704 (Area: 4588) +(@CGUID+52, 30704, 571, 1, 64, 6529.136, 3252.577, 666.5628, 1.30948, 120, 0, 0), -- 30704 (Area: 4588) (Auras: ) +(@CGUID+53, 30704, 571, 1, 64, 6489.347, 3384.931, 598.3163, -1.893157, 120, 0, 0), -- 30704 (Area: 4531) +(@CGUID+54, 30704, 571, 1, 64, 6492.296, 3382.427, 598.8416, 5.579057, 120, 0, 0), -- 30704 (Area: 4531) +(@CGUID+55, 30704, 571, 1, 64, 6488.653, 3381.798, 598.9666, 1.330476, 120, 0, 0), -- 30704 (Area: 4531) +(@CGUID+56, 30704, 571, 1, 64, 6492.833, 3385.416, 598.5916, -3.133257, 120, 0, 0), -- 30704 (Area: 4531) +(@CGUID+57, 30704, 571, 1, 64, 6492.375, 3197.953, 653.0616, -2.477693, 120, 0, 0), -- 30704 (Area: 4531) +(@CGUID+58, 30704, 571, 1, 64, 6571.54, 3281.336, 670.894, 5.986175, 120, 0, 0), -- 30704 (Area: 4531) +(@CGUID+59, 30704, 571, 1, 64, 6463.915, 3257.741, 640.313, 0.01159616, 120, 0, 0), -- 30704 (Area: 4531) +(@CGUID+60, 30704, 571, 1, 64, 6462.88, 3253.862, 641.1767, 0.2747464, 120, 0, 0), -- 30704 (Area: 4531) +(@CGUID+61, 30704, 571, 1, 64, 6468.83, 3249.454, 643.105, 0.7893116, 120, 0, 0), -- 30704 (Area: 4531) +(@CGUID+62, 30704, 571, 1, 64, 6509.02, 3212.699, 658.4735, 2.319517, 120, 0, 0), -- 30704 (Area: 4531) +(@CGUID+63, 30704, 571, 1, 64, 6507.89, 3210.89, 658.0303, 1.634014, 120, 0, 0), -- 30704 (Area: 4531) +(@CGUID+64, 30704, 571, 1, 64, 6456.575, 3167.642, 657.5801, -1.838321, 120, 0, 0), -- 30704 (Area: 4531) +(@CGUID+65, 30704, 571, 1, 64, 6452.937, 3166.663, 657.6061, -0.005128502, 120, 0, 0), -- 30704 (Area: 4531) +(@CGUID+66, 30704, 571, 1, 64, 6454.717, 3168.428, 657.5237, 2.709053, 120, 0, 0), -- 30704 (Area: 4531) +(@CGUID+67, 30704, 571, 1, 64, 6455.861, 3167.833, 657.575, -1.598367, 120, 0, 0), -- 30704 (Area: 4531) +(@CGUID+68, 30704, 571, 1, 64, 6416.846, 3214.117, 639.7312, 2.10443, 120, 0, 0), -- 30704 (Area: 4531) +(@CGUID+69, 30704, 571, 1, 64, 6590.434, 3331.823, 667.183, 4.037075, 120, 0, 0), -- 30704 (Area: 4531) +(@CGUID+70, 30704, 571, 1, 64, 6668.725, 3357.257, 704.2558, -3.137703, 120, 0, 0), -- 30704 (Area: 4531) +(@CGUID+71, 30704, 571, 1, 64, 6664.69, 3352.166, 704.3459, 1.520238, 120, 0, 0), -- 30704 (Area: 4531) +(@CGUID+72, 30697, 571, 1, 64, 6559.192, 3333.02, 664.9217, 4.991642, 120, 0, 0), -- 30697 (Area: 4588) +(@CGUID+73, 30697, 571, 1, 64, 6512.84, 3320.273, 665.2345, 0.5819893, 120, 0, 0), -- 30697 (Area: 4588) +(@CGUID+74, 30697, 571, 1, 64, 6515.811, 3280.09, 665.0708, 0.1396263, 120, 0, 0), -- 30697 (Area: 4531) +(@CGUID+75, 30697, 571, 1, 64, 6476.128, 3146.229, 657.5644, 4.380776, 120, 0, 0), -- 30697 (Area: 4531) +(@CGUID+76, 30697, 571, 1, 64, 6417.988, 3260.385, 640.6262, -0.6849744, 120, 0, 0), -- 30697 (Area: 4531) +(@CGUID+77, 31432, 571, 1, 64, 6588.427, 3278.203, 818.2033, 5.044002, 120, 5, 1); -- 31432 (Area: 4588) (possible waypoints or random movement) + + +UPDATE `creature` SET `phaseMask`=64 WHERE `id` IN(31314,30698,31306,31428); +UPDATE `creature` SET `phaseMask`=65 WHERE `id` IN(30597,32467); +UPDATE `creature_template` SET `unit_flags`=768 WHERE `entry`=31432; +UPDATE `creature` SET `equipment_id`=1 WHERE `id` IN(30703,30704); + +DELETE FROM `vehicle_template_accessory` WHERE `entry`=31432; +INSERT INTO `vehicle_template_accessory` (`entry`, `accessory_entry`, `seat_id`, `minion`, `description`, `summontype`, `summontimer`) VALUES +(31432, 31428, 0, 0, '31432 - 31428', 6, 30000); -- 31432 - 31428 + + +DELETE FROM `gameobject` WHERE `id` IN(193203,193204); +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, 193203, 571, 1, 64, 6531.642, 3336.632, 666.5159, 2.565632, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+1, 193203, 571, 1, 64, 6541.198, 3337.612, 674.4935, 3.194002, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+2, 193203, 571, 1, 64, 6561.242, 3342.843, 667.0536, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+3, 193203, 571, 1, 64, 6575.444, 3336.632, 667.6539, 4.398232, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+4, 193203, 571, 1, 64, 6517.65, 3262.135, 668.0207, 0.3141584, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+5, 193204, 571, 1, 64, 6509.69, 3298.966, 670.1282, 3.892087, 0, 0, 0, 1, 120, 255, 1), -- 193204 (Area: 4531) +(@OGUID+6, 193203, 571, 1, 64, 6441.041, 3245.802, 643.5339, 4.433136, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+7, 193203, 571, 1, 64, 6523.465, 3403.516, 599.7352, 1.06465, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+8, 193204, 571, 1, 64, 6774.447, 3517.597, 670.3411, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 193204 (Area: 4531) +(@OGUID+9, 193204, 571, 1, 64, 6774.1, 3539.328, 670.2827, 3.961899, 0, 0, 0, 1, 120, 255, 1), -- 193204 (Area: 4531) +(@OGUID+10, 193203, 571, 1, 64, 6815.187, 3502.362, 691.7656, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+11, 193203, 571, 1, 64, 6836.54, 3514.926, 691.6472, 3.560473, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+12, 193204, 571, 1, 64, 6859.746, 3515.827, 696.0732, 4.747296, 0, 0, 0, 1, 120, 255, 1), -- 193204 (Area: 4531) +(@OGUID+13, 193203, 571, 1, 64, 6717.095, 3499.194, 656.2964, 1.308995, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+14, 193203, 571, 1, 64, 6716.513, 3544.395, 670.4061, 0.6632232, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+15, 193203, 571, 1, 64, 6671.143, 3539.871, 670.931, 3.560473, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+16, 193203, 571, 1, 64, 6656.081, 3455.363, 632.7549, 2.705255, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+17, 193203, 571, 1, 64, 6678.709, 3572.928, 671.7523, 4.06662, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+18, 193203, 571, 1, 64, 6665.039, 3553.045, 670.4769, 2.076939, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+19, 193203, 571, 1, 64, 6466.252, 3423.323, 598.091, 0.4537851, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+20, 193203, 571, 1, 64, 6522.733, 3429.231, 599.0632, 3.351047, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+21, 193203, 571, 1, 64, 6516.931, 3478.982, 597.8824, 4.729844, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+22, 193203, 571, 1, 64, 6498.917, 3480.367, 596.7786, 2.024579, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+23, 193203, 571, 1, 64, 6544.474, 3464.513, 597.8202, 0.1396245, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+24, 193203, 571, 1, 64, 6671.423, 3264.837, 669.0335, 5.724681, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+25, 193203, 571, 1, 64, 6669.524, 3338.208, 703.5842, 1.797689, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+26, 193204, 571, 1, 64, 6926.368, 3514.581, 713.6303, 4.031712, 0, 0, 0, 1, 120, 255, 1), -- 193204 (Area: 4531) +(@OGUID+27, 193203, 571, 1, 64, 6901.291, 3446.396, 704.4607, 2.583081, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+28, 193204, 571, 1, 64, 6885.061, 3495.637, 707.6733, 6.056293, 0, 0, 0, 1, 120, 255, 1), -- 193204 (Area: 4531) +(@OGUID+29, 193203, 571, 1, 64, 6907.985, 3453.707, 705.4143, 6.03884, 0, 0, 0, 1, 120, 255, 1), -- 193203 (Area: 4531) +(@OGUID+30, 193203, 571, 1, 64, 6680.36, 3371.357, 701.1601, 0.3141584, 0, 0, 0, 1, 120, 255, 1); -- 193203 (Area: 4531) + +DELETE FROM `creature_template_addon` WHERE `entry` IN(30703,30704,31432); +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(31432, 0, 0x3000000, 0x1, ''), -- 31432 +(30703, 25280, 0x0, 0x1, ''), -- 30703 +(30704, 28919, 0x0, 0x1, ''); -- 30704 + +DELETE FROM `creature_addon` WHERE `guid` IN(@CGUID+41,@CGUID+42,@CGUID+43,@CGUID+47,@CGUID+48,@CGUID+49,@CGUID+50,@CGUID+51,@CGUID+52); +INSERT INTO `creature_addon` (`guid`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(@CGUID+41, 0, 0x0, 0x1, ''), +(@CGUID+42, 0, 0x0, 0x1, ''), +(@CGUID+43, 0, 0x0, 0x1, ''), +(@CGUID+47, 0, 0x0, 0x1, ''), +(@CGUID+48, 0, 0x0, 0x1, ''), +(@CGUID+49, 0, 0x0, 0x1, ''), +(@CGUID+50, 0, 0x0, 0x1, ''), +(@CGUID+51, 0, 0x0, 0x1, ''), +(@CGUID+52, 0, 0x0, 0x1, ''); + +UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry` IN(30703,30704,31015); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(30703,30704,31015) 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 +(30703,0,0,0,4,0,100,0,0,0,0,0,43,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ebon Blade Champion - On Agro - Dismount'), +(30703,0,1,0,0,0,100,0,0,5000,25000,35000,11,58130,2,0,0,0,0,1,0,0,0,0,0,0,0,'Ebon Blade Champion - IC - Cast Icebound Fortitude'), +(30703,0,2,0,9,0,100,0,0,5,20000,30000,11,50688,2,0,0,0,0,2,0,0,0,0,0,0,0,'Ebon Blade Champion - On Range - Cast Plague Strike'), +(30704,0,0,0,4,0,100,0,0,0,0,0,43,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Argent Paladin - On Agro - Dismount'), +(30704,0,1,0,9,0,100,0,0,5,12000,15000,11,58127,2,0,0,0,0,2,0,0,0,0,0,0,0,'Argent Paladin - On Range - Cast Divine Storm'), +(31015,0,0,0,9,0,100,0,0,5,15000,25000,11,60873,2,0,0,0,0,2,0,0,0,0,0,0,0,'Intrepid Ghoul - On Range - Cast Festering Bite'), +(31015,0,1,0,9,0,100,0,0,5,9000,16000,11,60872,2,0,0,0,0,2,0,0,0,0,0,0,0,'Intrepid Ghoul - On Range - Cast Festering Bite'), +(31015,0,2,0,2,0,100,1,0,10,0,0,11,58137,2,0,0,0,0,2,0,0,0,0,0,0,0,'Intrepid Ghoul - On Less than 10% hp - Cast Ghoulplosion'); diff --git a/sql/updates/world/2016_02_13_04_world.sql b/sql/updates/world/2016_02_13_04_world.sql new file mode 100644 index 00000000000..83d95745052 --- /dev/null +++ b/sql/updates/world/2016_02_13_04_world.sql @@ -0,0 +1,51 @@ +-- +-- Arred +UPDATE `creature` SET `spawndist` = 0, `MovementType` = 0 WHERE `guid` = 63008; +UPDATE `creature_template` SET `MovementType` = 0 WHERE `Entry` = 17512; +-- Arred SAI +SET @ENTRY := 17512; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,25,0,100,0,0,0,0,0,53,0,17512,1,0,0,0,1,0,0,0,0,0,0,0,"Arred - On Reset - Start Waypoint"), +(@ENTRY,0,1,0,64,0,100,0,0,0,0,0,54,20000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Arred - On Gossip Hello - Pause Waypoint"), +(@ENTRY,0,2,0,40,0,100,0,1,17512,0,0,54,90000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Arred - On Waypoint 1 Reached - Pause Waypoint"), +(@ENTRY,0,3,0,40,0,100,0,3,17512,0,0,80,@ENTRY*100+00,2,0,0,0,0,1,0,0,0,0,0,0,0,"Arred - On Waypoint 3 Reached - Run Script"), +(@ENTRY,0,4,0,40,0,100,0,7,17512,0,0,80,@ENTRY*100+01,2,0,0,0,0,1,0,0,0,0,0,0,0,"Arred - On Waypoint 7 Reached - Run Script"), +(@ENTRY,0,5,0,40,0,100,0,8,17512,0,0,80,@ENTRY*100+02,2,0,0,0,0,1,0,0,0,0,0,0,0,"Arred - On Waypoint 8 Reached - Run Script"), +(@ENTRY,0,6,0,40,0,100,0,9,17512,0,0,54,210000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Arred - On Waypoint 9 Reached - Pause Waypoint"); + +-- Actionlist SAI +SET @ENTRY := 1751200; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,54,90000,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Pause Waypoint"), +(@ENTRY,9,1,0,0,0,100,0,88000,88000,0,0,5,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Play Emote 3"); + +-- Actionlist SAI +SET @ENTRY := 1751201; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,54,120000,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Pause Waypoint"), +(@ENTRY,9,1,0,0,0,100,0,3000,3000,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Set Flag Standstate Kneel"), +(@ENTRY,9,2,0,0,0,100,0,115000,115000,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Remove Flag Standstate Kneel"); + +-- Actionlist SAI +SET @ENTRY := 1751202; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,54,30000,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Pause Waypoint"), +(@ENTRY,9,1,0,0,0,100,0,4000,4000,0,0,5,25,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Play Emote 25"), +(@ENTRY,9,2,0,0,0,100,0,12000,12000,0,0,5,273,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Play Emote 273"); + +DELETE FROM `waypoints` WHERE `entry`=17512; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(17512,1,-3788.04,-11547.3,-134.842, 'Arred'), +(17512,2,-3789.79,-11543.9,-134.849, 'Arred'), +(17512,3,-3793.72,-11542.8,-134.892, 'Arred'), +(17512,4,-3789.94,-11543.8,-134.851, 'Arred'), +(17512,5,-3787.24,-11546.9,-134.831, 'Arred'), +(17512,6,-3786.81,-11549.6,-134.836, 'Arred'), +(17512,7,-3787.67,-11551.3,-134.853, 'Arred'), +(17512,8,-3784.96,-11550.9,-134.819, 'Arred'), +(17512,9,-3788.04,-11547.3,-134.842, 'Arred'); diff --git a/sql/updates/world/2016_02_14_00_world.sql b/sql/updates/world/2016_02_14_00_world.sql new file mode 100644 index 00000000000..961ecd74d4d --- /dev/null +++ b/sql/updates/world/2016_02_14_00_world.sql @@ -0,0 +1,3 @@ +-- Disallow flight form while affected by no-mount shapeshift +DELETE FROM `spell_script_names` WHERE `spell_id` IN (-33943, 33943, 40120); +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES (-33943, "spell_dru_flight_form"); diff --git a/sql/updates/world/2016_02_14_01_world.sql b/sql/updates/world/2016_02_14_01_world.sql new file mode 100644 index 00000000000..2ce06020621 --- /dev/null +++ b/sql/updates/world/2016_02_14_01_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature` SET `modelid`=0 WHERE `id`=27452; diff --git a/sql/updates/world/2016_02_14_02_world.sql b/sql/updates/world/2016_02_14_02_world.sql new file mode 100644 index 00000000000..1459b702cf0 --- /dev/null +++ b/sql/updates/world/2016_02_14_02_world.sql @@ -0,0 +1,16 @@ +-- Free at Last + +UPDATE `smart_scripts` SET `action_type`=45, `action_param1`=1, `action_param2`=1, `target_type`=1, `comment`='Runed Giant - On Script - Set Data Self' WHERE `entryorguid`=2641700 AND `source_type`=9 AND `id`=2 AND `link`=0; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=26417 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 +(26417, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 11, 47329, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Runed Giant - On Spellhit \'Gavrock\'s Runebreaker\' - Run Script (No Repeat)'), +(26417, 0, 1, 0, 38, 0, 100, 0, 1, 1, 0, 0, 33, 26783, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Runed Giant - On Script - Quest Credit \'Free at Last\''), +(26417, 0, 2, 3, 8, 0, 25, 0, 47604, 0, 10000, 10000, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Runed Giant - On Spell Hit - Store Target List'), +(26417, 0, 3, 0, 61, 0, 0, 0, 0, 0, 10000, 10000, 80, 2641700, 2, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Runed Giant - On Spell Hit - Start Script for Free At Last'); + +-- Put on Your Best Face for Loken +UPDATE `creature_template` SET `unit_flags`=33555200 WHERE `entry`=27212; + +-- Send them Packing +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=23977 AND `source_type`=0 AND `id`=0 AND `link`=0; diff --git a/sql/updates/world/2016_02_14_03_world.sql b/sql/updates/world/2016_02_14_03_world.sql new file mode 100644 index 00000000000..9a0237725c0 --- /dev/null +++ b/sql/updates/world/2016_02_14_03_world.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `linked_respawn` WHERE `guid`=150211 AND `linkedGuid`=150211; +DELETE FROM `creature` WHERE `guid`=150212 AND `id`=38995; diff --git a/sql/updates/world/2016_02_14_04_world.sql b/sql/updates/world/2016_02_14_04_world.sql new file mode 100644 index 00000000000..58e0aaee311 --- /dev/null +++ b/sql/updates/world/2016_02_14_04_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `flags_extra`=(`flags_extra`|2097152) WHERE `entry` IN (31304); diff --git a/sql/updates/world/2016_02_15_00_world.sql b/sql/updates/world/2016_02_15_00_world.sql new file mode 100644 index 00000000000..43c2ae69382 --- /dev/null +++ b/sql/updates/world/2016_02_15_00_world.sql @@ -0,0 +1,73 @@ +-- +UPDATE `creature_template` SET `unit_flags`=512, `VehicleId`=240, `InhabitType`=4 WHERE `entry`=30477; +UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `exp`=2, `unit_flags`=512, `VehicleId`=240, `InhabitType`=4 WHERE `entry`=30487; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (29428,30477,30487); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (29428,30477,30487) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (30477*100,30487*100) AND `source_type`=9; +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 +(29428,0,0,2,62,0,100,0,9917,0,0,0,11,58061,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ricket - On gossip select - Spellcast Forcecast Summon Rocket (Alliance)'), +(29428,0,1,2,62,0,100,0,9917,1,0,0,11,58062,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ricket - On gossip select - Spellcast Forcecast Summon Rocket (Horde)'), +(29428,0,2,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ricket - On gossip select - Close gossip'), +(30477,0,0,0,54,0,100,0,0,0,0,0,80,30477*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'D16 Propelled Delivery Device - Just summoned - Run script'), +(30477,0,1,2,40,0,100,0,18,30477,0,0,11,50630,0,0,0,0,0,1,0,0,0,0,0,0,0,'D16 Propelled Delivery Device - On WP 18 reached - Spellcast Eject All Passengers'), +(30477,0,2,0,61,0,100,0,0,0,0,0,11,42895,0,0,0,0,0,23,0,0,0,0,0,0,0,'D16 Propelled Delivery Device - On WP 18 reached - Spellcast Cosmetic - Combat Knockdown Foe'), +(30477,0,3,0,40,0,100,0,24,30477,0,0,41,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'D16 Propelled Delivery Device - On WP 24 reached - Despawn'), +(30487,0,0,0,54,0,100,0,0,0,0,0,80,30487*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'D16 Propelled Delivery Device - Just summoned - Run script'), +(30487,0,1,2,40,0,100,0,13,30487,0,0,11,50630,0,0,0,0,0,1,0,0,0,0,0,0,0,'D16 Propelled Delivery Device - On WP 13 reached - Spellcast Eject All Passengers'), +(30487,0,2,0,61,0,100,0,0,0,0,0,11,42895,0,0,0,0,0,23,0,0,0,0,0,0,0,'D16 Propelled Delivery Device - On WP 13 reached - Spellcast Cosmetic - Combat Knockdown Foe'), +(30487,0,3,0,40,0,100,0,17,30487,0,0,41,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'D16 Propelled Delivery Device - On WP 17 reached - Despawn'), +(30477*100,9,0,0,0,0,100,0,3000,3000,0,0,53,1,30477,0,0,0,0,1,0,0,0,0,0,0,0,'D16 Propelled Delivery Device script - Start WP movement'), +(30487*100,9,0,0,0,0,100,0,3000,3000,0,0,53,1,30487,0,0,0,0,1,0,0,0,0,0,0,0,'D16 Propelled Delivery Device script - Start WP movement'); + +DELETE FROM `waypoints` WHERE `entry` IN (30477,30487); +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(30477,1,6164.999,-1064.512,422.1189,'D16 Propelled Delivery Device'), +(30477,2,6204.096,-998.4872,457.5628,'D16 Propelled Delivery Device'), +(30477,3,6289.573,-952.1809,504.6187,'D16 Propelled Delivery Device'), +(30477,4,6307.788,-872.7999,541.7296,'D16 Propelled Delivery Device'), +(30477,5,6370.582,-821.9507,653.868,'D16 Propelled Delivery Device'), +(30477,6,6413.268,-660.4708,808.3953,'D16 Propelled Delivery Device'), +(30477,7,6554.813,-550.3772,1018.112,'D16 Propelled Delivery Device'), +(30477,8,6633.265,-419.3159,1173.914,'D16 Propelled Delivery Device'), +(30477,9,6760.503,-364.4665,1277.719,'D16 Propelled Delivery Device'), +(30477,10,6807.88,-427.5194,1399.109,'D16 Propelled Delivery Device'), +(30477,11,6808.07,-471.4465,1419.247,'D16 Propelled Delivery Device'), +(30477,12,6775.634,-529.2309,1394.387,'D16 Propelled Delivery Device'), +(30477,13,6720.645,-535.5529,1328.054,'D16 Propelled Delivery Device'), +(30477,14,6660.31,-486.8651,1238.553,'D16 Propelled Delivery Device'), +(30477,15,6658.937,-417.8409,1186.11,'D16 Propelled Delivery Device'), +(30477,16,6680.49,-329.3087,1098.609,'D16 Propelled Delivery Device'), +(30477,17,6683.783,-220.3454,972.7203,'D16 Propelled Delivery Device'), +(30477,18,6663.772,-192.1261,962.2485,'D16 Propelled Delivery Device'), +(30477,19,6654.82,-180.1689,958.1317,'D16 Propelled Delivery Device'), +(30477,20,6631.467,-171.3305,966.4633,'D16 Propelled Delivery Device'), +(30477,21,6598.223,-162.3664,984.2227,'D16 Propelled Delivery Device'), +(30477,22,6566.67,-155.2077,992.0551,'D16 Propelled Delivery Device'), +(30477,23,6529.651,-154.9363,992.0551,'D16 Propelled Delivery Device'), +(30477,24,6454.417,-152.1311,962.305,'D16 Propelled Delivery Device'), +(30487,1,6169.229,-1069.619,420.6945,'D16 Propelled Delivery Device'), +(30487,2,6232.725,-1031.598,505.7779,'D16 Propelled Delivery Device'), +(30487,3,6339.224,-1035.08,575.3331,'D16 Propelled Delivery Device'), +(30487,4,6431.492,-987.6745,694.8887,'D16 Propelled Delivery Device'), +(30487,5,6632.437,-925.9739,896.1384,'D16 Propelled Delivery Device'), +(30487,6,6822.084,-755.521,1171.194,'D16 Propelled Delivery Device'), +(30487,7,7090.693,-619.4874,1455.639,'D16 Propelled Delivery Device'), +(30487,8,7260.75,-282.75,1513.362,'D16 Propelled Delivery Device'), +(30487,9,7552.502,-334.6509,1657.668,'D16 Propelled Delivery Device'), +(30487,10,7692.301,-509.425,1536.5,'D16 Propelled Delivery Device'), +(30487,11,7799.192,-636.3267,1252.278,'D16 Propelled Delivery Device'), +(30487,12,7841.555,-726.5501,1193.916,'D16 Propelled Delivery Device'), +(30487,13,7844.731,-775.3613,1185.833,'D16 Propelled Delivery Device'), +(30487,14,7842.449,-815.5735,1186.396,'D16 Propelled Delivery Device'), +(30487,15,7838.703,-859.9572,1173.173,'D16 Propelled Delivery Device'), +(30487,16,7865.014,-911.2181,1163.979,'D16 Propelled Delivery Device'), +(30487,17,7856.225,-951.6568,1151.563,'D16 Propelled Delivery Device'); + +DELETE FROM `gossip_menu_option` WHERE `menu_id`=9917 AND `id`=1; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(9917,1,0,'I am ready to head further into Storm Peaks.',32890,1,1,0,0,0,0,''); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9917; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,9917,0,0,28,12862,0,0,0,'','Ricket - Show gossip option only if player has completed but not rewarded quest When All Else Fails'), +(15,9917,1,0,28,13060,0,0,0,'','Ricket - Show gossip option only if player has completed but not rewarded quest When All Else Fails'); diff --git a/sql/updates/world/2016_02_17_00_world.sql b/sql/updates/world/2016_02_17_00_world.sql new file mode 100644 index 00000000000..8f22aaa3e4e --- /dev/null +++ b/sql/updates/world/2016_02_17_00_world.sql @@ -0,0 +1,343 @@ +-- +DELETE FROM `creature_addon` WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id` IN (20102, 19172, 19169, 19173, 19171, 19148, 19177, 19176, 19178, 18927, 19175)); +DELETE FROM `game_event_creature` WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id` IN (20102, 19172, 19169, 19173, 19171, 19148, 19177, 19176, 19178, 18927, 19175)) AND `eventEntry` !=2; +DELETE FROM `creature` WHERE `id` IN (20102, 19172, 19169, 19173, 19171, 19148, 19177, 19176, 19178, 18927, 19175) AND `guid` NOT IN (SELECT `guid` FROM `game_event_creature` WHERE `eventEntry` =2); +DELETE FROM `creature_template_addon` WHERE `entry` IN (20102, 19172, 19169, 19173, 19171, 19148, 19177, 19176, 19178, 18927, 19175); +UPDATE `creature` SET `equipment_id`=0, `modelid`=0 WHERE `id` IN (20102, 19172, 19169, 19173, 19171, 19148, 19177, 19176, 19178, 18927, 19175); +UPDATE `creature_template` SET `npcflag`=3, `unit_flags`=`unit_flags`|768 WHERE `entry` IN (20102, 19172, 19169, 19173, 19171, 19148, 19177, 19176, 19178, 18927, 19175); + +INSERT INTO `game_event_creature` SELECT 12, creature.guid FROM `creature` WHERE creature.id IN (20102, 19172, 19169, 19173, 19171, 19148, 19177, 19176, 19178, 18927, 19175); +INSERT INTO `game_event_creature` SELECT 24, creature.guid FROM `creature` WHERE creature.id IN (20102, 19172, 19169, 19173, 19171, 19148, 19177, 19176, 19178, 18927, 19175); +INSERT INTO `game_event_creature` SELECT 7, creature.guid FROM `creature` WHERE creature.id IN (20102, 19172, 19169, 19173, 19171, 19148, 19177, 19176, 19178, 18927, 19175); +INSERT INTO `game_event_creature` SELECT 1, creature.guid FROM `creature` WHERE creature.id IN (20102, 19172, 19169, 19173, 19171, 19148, 19177, 19176, 19178, 18927, 19175); +INSERT INTO `game_event_creature` SELECT 26, creature.guid FROM `creature` WHERE creature.id IN (20102, 19172, 19169, 19173, 19171, 19148, 19177, 19176, 19178, 18927, 19175); +INSERT INTO `game_event_creature` SELECT 51, creature.guid FROM `creature` WHERE creature.id IN (20102, 19172, 19169, 19173, 19171, 19148, 19177, 19176, 19178, 18927, 19175); +INSERT INTO `game_event_creature` SELECT 50, creature.guid FROM `creature` WHERE creature.id IN (20102, 19172, 19169, 19173, 19171, 19148, 19177, 19176, 19178, 18927, 19175); +INSERT INTO `game_event_creature` SELECT 9, creature.guid FROM `creature` WHERE creature.id IN (20102, 19172, 19169, 19173, 19171, 19148, 19177, 19176, 19178, 18927, 19175); + +SET @entry1:=20102; +SET @entry2:=19172; +SET @entry3:=19169; +SET @entry4:=19173; +SET @entry5:=19171; +SET @entry6:=19148; +SET @entry7:=19177; +SET @entry8:=19176; +SET @entry9:=19178; +SET @entry10:=18927; +SET @entry11:=19175; + +DELETE FROM smart_scripts WHERE `entryorguid` IN(@entry1,@entry2,@entry3,@entry4,@entry5,@entry6,@entry7,@entry8,@entry9,@entry10,@entry11) AND source_type=0 AND id>12; +DELETE FROM smart_scripts WHERE `entryorguid` IN (@entry1*100, @entry1*100+1, @entry2*100, @entry2*100+1, @entry3*100, @entry3*100+1, @entry4*100, @entry4*100+1, @entry5*100, @entry5*100+1, @entry6*100, @entry6*100+1, @entry7*100, @entry7*100+1, @entry8*100, @entry8*100+1, @entry9*100, @entry9*100+1, @entry10*100, @entry10*100+1, @entry11*100, @entry11*100+1) AND source_type=9; +DELETE FROM smart_scripts WHERE `entryorguid` IN (@entry1*100+2, @entry1*100+3, @entry2*100+2, @entry2*100+3, @entry3*100+2, @entry3*100+3, @entry4*100+2, @entry4*100+3, @entry5*100+2, @entry5*100+3, @entry6*100+2, @entry6*100+3, @entry7*100+2, @entry7*100+3, @entry8*100+2, @entry8*100+3, @entry9*100+2, @entry9*100+3, @entry10*100+2, @entry10*100+3, @entry11*100+2, @entry11*100+3) AND source_type=9; +DELETE FROM smart_scripts WHERE `entryorguid` IN (@entry1*100+4, @entry1*100+5, @entry2*100+4, @entry2*100+5, @entry3*100+4, @entry3*100+5, @entry4*100+5, @entry4*100+4, @entry5*100+4, @entry5*100+5, @entry6*100+4, @entry6*100+5, @entry7*100+4, @entry7*100+5, @entry8*100+4, @entry8*100+5, @entry9*100+4, @entry9*100+5, @entry10*100+4, @entry10*100+5, @entry11*100+4, @entry11*100+5) AND source_type=9; +DELETE FROM smart_scripts WHERE `entryorguid` IN (@entry1*100+6, @entry1*100+7, @entry2*100+6, @entry2*100+7, @entry3*100+6, @entry3*100+7, @entry4*100+6, @entry4*100+7, @entry5*100+6, @entry5*100+7, @entry6*100+6, @entry6*100+7, @entry7*100+6, @entry7*100+7, @entry8*100+6, @entry8*100+7, @entry9*100+6, @entry9*100+7, @entry10*100+6, @entry10*100+7, @entry11*100+6, @entry11*100+7) AND source_type=9; +DELETE FROM smart_scripts WHERE `entryorguid` IN (@entry1*100+8, @entry1*100+9, @entry2*100+8, @entry2*100+9, @entry3*100+8, @entry3*100+9, @entry4*100+8, @entry4*100+9, @entry5*100+8, @entry5*100+9, @entry6*100+8, @entry6*100+9, @entry7*100+8, @entry7*100+9, @entry8*100+8, @entry8*100+9, @entry9*100+8, @entry9*100+9, @entry10*100+8, @entry10*100+9, @entry11*100+8, @entry11*100+9) AND source_type=9; +DELETE FROM smart_scripts WHERE `entryorguid` IN (@entry1*100+10, @entry1*100+11, @entry2*100+10, @entry2*100+11, @entry3*100+10, @entry3*100+11, @entry4*100+10, @entry4*100+11, @entry5*100+10, @entry5*100+11, @entry6*100+10, @entry6*100+11, @entry7*100+10, @entry7*100+11, @entry8*100+10, @entry8*100+11, @entry9*100+10, @entry9*100+11, @entry10*100+10, @entry10*100+11, @entry11*100+10, @entry11*100+11) AND source_type=9; +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 +(@entry1, 0, 13, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry1*100, @entry1*100+1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Goblin commoner - On respawn - random action list'), -- Goblin christmas +(@entry1*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 34845, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Goblin commoner - random action list - cast '), +(@entry1*100+1, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 34849, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Goblin commoner - random action list - cast'), +(@entry1, 0, 14, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry1*100+2, @entry1*100+3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Goblin commoner - On respawn - random action list'), -- Goblin Halloween +(@entry1*100+2, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43631, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Goblin commoner - random action list - cast '), +(@entry1*100+3, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43630, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Goblin commoner - random action list - cast'), +(@entry1, 0, 15, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry1*100+4, @entry1*100+5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Goblin commoner - On respawn - random action list'), -- Goblin Lunar +(@entry1*100+4, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 34848, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Goblin commoner - random action list - cast '), +(@entry1*100+5, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 34851, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Goblin commoner - random action list - cast'), +(@entry1, 0, 16, 0, 11, 0, 100, 0, 0, 0, 0, 0, 80, @entry1*100+6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Goblin commoner - On respawn - random action list'), -- Goblin Brewfest +(@entry1*100+6, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43911, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Goblin commoner - random action list - cast '), +(@entry1*100+6, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 71, 0, 0, 13861, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Goblin commoner - random action list - Equip'), +(@entry1, 0, 17, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry1*100+7, @entry1*100+8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Goblin commoner - On respawn - random action list'), -- Goblin DOTD +(@entry1*100+7, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29203, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Goblin commoner - random action list - Morph '), +(@entry1*100+8, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Goblin commoner - random action list - Morph'), +(@entry1, 0, 18, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry1*100+9, @entry1*100+10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Goblin commoner - On respawn - random action list'), -- Goblin pirates +(@entry1*100+9, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25036, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Goblin commoner - random action list - Morph '), +(@entry1*100+10, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25047, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Goblin commoner - random action list - Morph'), +(@entry1, 0, 19, 0, 11, 0, 100, 0, 0, 0, 0, 0, 3, 25872, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Goblin commoner - On respawn - Morph'), -- Goblin midsummer +(@entry2, 0, 13, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry2*100, @entry2*100+1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnome commoner - On respawn - random action list'), -- Gnome christmas +(@entry2*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33448, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnome commoner - random action list - cast '), +(@entry2*100+1, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33445, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnome commoner - random action list - cast'), +(@entry2, 0, 14, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry2*100+2, @entry2*100+3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnome commoner - On respawn - random action list'), -- Gnome Halloween +(@entry2*100+2, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43629, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnome commoner - random action list - cast '), +(@entry2*100+3, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43628, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnome commoner - random action list - cast'), +(@entry2, 0, 15, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry2*100+4, @entry2*100+5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnome - On respawn - random action list'), -- Gnome Lunar +(@entry2*100+4, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33446, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnome - random action list - cast '), +(@entry2*100+5, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33449, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnome - random action list - cast'), +(@entry2, 0, 16, 0, 11, 0, 100, 0, 0, 0, 0, 0, 80, @entry2*100+6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnome commoner - On respawn - random action list'), -- Gnome Brewfest +(@entry2*100+6, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43910, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnome commoner - random action list - cast '), +(@entry2*100+6, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 71, 0, 0, 13861, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnome commoner - random action list - Equip'), +(@entry2, 0, 17, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry2*100+7, @entry2*100+8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnome commoner - On respawn - random action list'), -- Gnome DOTD +(@entry2*100+7, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29203, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnome commoner - random action list - Morph '), +(@entry2*100+8, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnome commoner - random action list - Morph'), +(@entry2, 0, 18, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry2*100+9, @entry2*100+10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnome commoner - On respawn - random action list'), -- Gnome pirates +(@entry2*100+9, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25035, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnome commoner - random action list - Morph '), +(@entry2*100+10, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25046, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnome commoner - random action list - Morph'), +(@entry2, 0, 19, 0, 11, 0, 100, 0, 0, 0, 0, 0, 3, 25871, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnome commoner - On respawn - Morph'), -- Gnome midsummer +(@entry3, 0, 13, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry3*100, @entry3*100+1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bloodelf commoner - On respawn - random action list'), -- blood elf christmas +(@entry3*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33412, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bloodelf commoner - random action list - cast '), +(@entry3*100+1, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33415, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bloodelf commoner - random action list - cast'), +(@entry3, 0, 14, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry3*100+2, @entry3*100+3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bloodelf commoner - On respawn - random action list'), -- blood elf Halloween +(@entry3*100+2, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43406, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bloodelf commoner - random action list - cast '), +(@entry3*100+3, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43405, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bloodelf commoner - random action list - cast'), +(@entry3, 0, 15, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry3*100+4, @entry3*100+5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bloodelf commoner - On respawn - random action list'), -- blood elf Lunar +(@entry3*100+4, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33413, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bloodelf commoner - random action list - cast '), +(@entry3*100+5, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33416, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bloodelf commoner - random action list - cast'), +(@entry3, 0, 16, 0, 11, 0, 100, 0, 0, 0, 0, 0, 80, @entry3*100+6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bloodelf commoner - On respawn - random action list'), -- blood elf Brewfest +(@entry3*100+6, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43907, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bloodelf commoner - random action list - cast '), +(@entry3*100+6, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 71, 0, 0, 2703, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bloodelf commoner - random action list - Equip'), +(@entry3, 0, 17, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry3*100+7, @entry3*100+8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'blood elf commoner - On respawn - random action list'), -- blood elf DOTD +(@entry3*100+7, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29203, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'blood elf commoner - random action list - Morph '), +(@entry3*100+8, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'blood elf commoner - random action list - Morph'), +(@entry3, 0, 18, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry3*100+9, @entry3*100+10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'blood elf commoner - On respawn - random action list'), -- blood elf pirates +(@entry3*100+9, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25032, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'blood elf commoner - random action list - Morph '), +(@entry3*100+10, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25043, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'blood elf commoner - random action list - Morph'), +(@entry3, 0, 19, 0, 11, 0, 100, 0, 0, 0, 0, 0, 3, 25868, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'blood elf commoner - On respawn - Morph'), -- blood elf midsummer +(@entry4, 0, 13, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry4*100, @entry4*100+1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'night commoner - On respawn - random action list'), -- night elf christmas +(@entry4*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33439, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'night commoner - random action list - cast '), +(@entry4*100+1, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33442, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'night commoner - random action list - cast'), +(@entry4, 0, 14, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry4*100+2, @entry4*100+3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'night commoner - On respawn - random action list'), -- night elf Halloween +(@entry4*100+2, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43635, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'night commoner - random action list - cast '), +(@entry4*100+3, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43634, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'night commoner - random action list - cast'), +(@entry4, 0, 15, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry4*100+4, @entry4*100+5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'night commoner - On respawn - random action list'), -- night elf Lunar +(@entry4*100+4, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33443, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'night commoner - random action list - cast '), +(@entry4*100+5, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33440, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'night commoner - random action list - cast'), +(@entry4, 0, 16, 0, 11, 0, 100, 0, 0, 0, 0, 0, 80, @entry4*100+6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'night commoner - On respawn - random action list'), -- night elf Brewfest +(@entry4*100+6, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43913, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'night commoner - random action list - cast '), +(@entry4*100+6, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 71, 0, 0, 2703, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'night commoner - random action list - Equip'), +(@entry4, 0, 17, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry4*100+7, @entry4*100+8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'night commoner - On respawn - random action list'), -- night commoner DOTD +(@entry4*100+7, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29203, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'night commoner - random action list - Morph '), +(@entry4*100+8, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'night commoner - random action list - Morph'), +(@entry4, 0, 18, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry4*100+9, @entry4*100+10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'night elf commoner - On respawn - random action list'), -- night elf pirates +(@entry4*100+9, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'night elf commoner - random action list - Morph '), +(@entry4*100+10, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25049, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'night elf commoner - random action list - Morph'), +(@entry4, 0, 19, 0, 11, 0, 100, 0, 0, 0, 0, 0, 3, 25874, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'night elf commoner - On respawn - Morph'), -- night elf midsummer +(@entry5, 0, 13, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry5*100, @entry5*100+1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei - On respawn - random action list'), -- Draenei christmas +(@entry5*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33427, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei - random action list - cast '), +(@entry5*100+1, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33430, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei - random action list - cast'), +(@entry5, 0, 14, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry5*100+2, @entry5*100+3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei - On respawn - random action list'), -- Draenei Halloween +(@entry5*100+2, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43625, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei - random action list - cast '), +(@entry5*100+3, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43623, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei - random action list - cast'), +(@entry5, 0, 15, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry5*100+4, @entry5*100+5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei - On respawn - random action list'), -- Draenei Lunar +(@entry5*100+4, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33428, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei - random action list - cast '), +(@entry5*100+5, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33431, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei - random action list - cast'), +(@entry5, 0, 16, 0, 11, 0, 100, 0, 0, 0, 0, 0, 80, @entry5*100+6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei - On respawn - random action list'), -- Draenei Brewfest +(@entry5*100+6, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43908, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei - random action list - cast '), +(@entry5*100+6, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 71, 0, 0, 2703, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei commoner - random action list - Equip'), +(@entry5, 0, 17, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry5*100+7, @entry5*100+8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei commoner - On respawn - random action list'), -- Draenei DOTD +(@entry5*100+7, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29203, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei commoner - random action list - Morph '), +(@entry5*100+8, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei commoner - random action list - Morph'), +(@entry5, 0, 18, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry5*100+9, @entry5*100+10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei commoner - On respawn - random action list'), -- Draenei pirates +(@entry5*100+9, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25033, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei commoner - random action list - Morph '), +(@entry5*100+10, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25044, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei commoner - random action list - Morph'), +(@entry5, 0, 19, 0, 11, 0, 100, 0, 0, 0, 0, 0, 3, 25869, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei commoner - On respawn - Morph'), -- Draenei midsummer +(@entry6, 0, 13, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry6*100, @entry6*100+1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dwarf commoner - On respawn - random action list'), -- Dwarf christmas +(@entry6*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33433, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dwarf commoner - random action list - cast '), +(@entry6*100+1, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33436, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dwarf commoner - random action list - cast'), +(@entry6, 0, 14, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry6*100+2, @entry6*100+3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dwarf - On respawn - random action list'), -- Dwarf Halloween +(@entry6*100+2, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43626, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dwarf commoner - random action list - cast '), +(@entry6*100+3, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43627, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dwarf commoner - random action list - cast'), +(@entry6, 0, 15, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry6*100+4, @entry6*100+5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dwarf - On respawn - random action list'), -- Dwarf Lunar +(@entry6*100+4, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33437, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dwarf commoner - random action list - cast '), +(@entry6*100+5, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33434, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dwarf commoner - random action list - cast'), +(@entry6, 0, 16, 0, 11, 0, 100, 0, 0, 0, 0, 0, 80, @entry6*100+6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dwarf commoner - On respawn - random action list'), -- Dwarf Brewfest +(@entry6*100+6, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43909, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dwarf commoner - random action list - cast '), +(@entry6*100+6, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 71, 0, 0, 13861, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dwarf commoner - random action list - Equip'), +(@entry6, 0, 17, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry6*100+7, @entry6*100+8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dwarf commoner - On respawn - random action list'), -- Dwarf DOTD +(@entry6*100+7, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29203, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dwarf commoner - random action list - Morph '), +(@entry6*100+8, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dwarf commoner - random action list - Morph'), +(@entry6, 0, 18, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry6*100+9, @entry6*100+10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dwarf commoner - On respawn - random action list'), -- Dwarf pirates +(@entry6*100+9, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25034, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dwarf commoner - random action list - Morph '), +(@entry6*100+10, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25045, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dwarf commoner - random action list - Morph'), +(@entry6, 0, 19, 0, 11, 0, 100, 0, 0, 0, 0, 0, 3, 25870, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dwarf commoner - On respawn - Morph'), -- Dwarf midsummer +(@entry7, 0, 13, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry7*100, @entry7*100+1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Troll - On respawn - random action list'), -- Troll christmas +(@entry7*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33471, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Troll - random action list - cast '), +(@entry7*100+1, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33468, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Troll - random action list - cast'), +(@entry7, 0, 14, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry7*100+2, @entry7*100+3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Troll - On respawn - random action list'), -- Troll Halloween +(@entry7*100+2, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43641, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Troll - random action list - cast '), +(@entry7*100+3, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43640, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Troll - random action list - cast'), +(@entry7, 0, 15, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry7*100+4, @entry7*100+5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Troll - On respawn - random action list'), -- Troll Lunar +(@entry7*100+4, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33472, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Troll - random action list - cast '), +(@entry7*100+5, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33469, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Troll - random action list - cast'), +(@entry7, 0, 16, 0, 11, 0, 100, 0, 0, 0, 0, 0, 80, @entry7*100+6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Troll commoner - On respawn - random action list'), -- Troll Brewfest +(@entry7*100+6, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43916, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Troll commoner - random action list - cast '), +(@entry7*100+6, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 71, 0, 0, 2705, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Troll commoner - random action list - Equip'), +(@entry7, 0, 17, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry7*100+7, @entry7*100+8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Troll commoner - On respawn - random action list'), -- Troll DOTD +(@entry7*100+7, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29203, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Troll commoner - random action list - Morph '), +(@entry7*100+8, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Troll commoner - random action list - Morph'), +(@entry7, 0, 18, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry7*100+9, @entry7*100+10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Troll commoner - On respawn - random action list'), -- Troll pirates +(@entry7*100+9, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25041, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Troll commoner - random action list - Morph '), +(@entry7*100+10, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25052, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Troll commoner - random action list - Morph'), +(@entry7, 0, 19, 0, 11, 0, 100, 0, 0, 0, 0, 0, 3, 25877, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Troll commoner - On respawn - Morph'), -- Troll midsummer +(@entry8, 0, 13, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry8*100, @entry8*100+1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tauren - On respawn - random action list'), -- Tauren christmas +(@entry8*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33465, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tauren - random action list - cast '), +(@entry8*100+1, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33458, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tauren - random action list - cast'), +(@entry8, 0, 14, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry8*100+2, @entry8*100+3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tauren - On respawn - random action list'), -- Tauren Halloween +(@entry8*100+2, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43638, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tauren - random action list - cast '), +(@entry8*100+3, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43639, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tauren - random action list - cast'), +(@entry8, 0, 15, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry8*100+4, @entry8*100+5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tauren - On respawn - random action list'), -- Tauren Lunar +(@entry8*100+4, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33459, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tauren - random action list - cast '), +(@entry8*100+5, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33466, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tauren - random action list - cast'), +(@entry8, 0, 16, 0, 11, 0, 100, 0, 0, 0, 0, 0, 80, @entry8*100+6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tauren commoner - On respawn - random action list'), -- Tauren Brewfest +(@entry8*100+6, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43915, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tauren commoner - random action list - cast '), +(@entry8*100+6, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 71, 0, 0, 2705, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tauren commoner - random action list - Equip'), +(@entry8, 0, 17, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry8*100+7, @entry8*100+8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tauren commoner - On respawn - random action list'), -- Tauren DOTD +(@entry8*100+7, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29203, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tauren commoner - random action list - Morph '), +(@entry8*100+8, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tauren commoner - random action list - Morph'), +(@entry8, 0, 18, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry8*100+9, @entry8*100+10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tauren commoner - On respawn - random action list'), -- Tauren pirates +(@entry8*100+9, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25040, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tauren commoner - random action list - Morph '), +(@entry8*100+10, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25051, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tauren commoner - random action list - Morph'), +(@entry8, 0, 19, 0, 11, 0, 100, 0, 0, 0, 0, 0, 3, 25876, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tauren commoner - On respawn - Morph'), -- Tauren midsummer +(@entry9, 0, 13, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry9*100, @entry9*100+1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undead - On respawn - random action list'), -- Undead christmas +(@entry9*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33474, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undead - random action list - cast '), +(@entry9*100+1, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33477, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undead - random action list - cast'), +(@entry9, 0, 14, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry9*100+2, @entry9*100+3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undead - On respawn - random action list'), -- Undead christmas +(@entry9*100+2, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43642, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undead - random action list - cast '), +(@entry9*100+3, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43643, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undead - random action list - cast'), +(@entry9, 0, 15, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry9*100+4, @entry9*100+5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undead - On respawn - random action list'), -- Undead Lunar +(@entry9*100+4, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33478, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undead - random action list - cast '), +(@entry9*100+5, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33475, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undead - random action list - cast'), +(@entry9, 0, 16, 0, 11, 0, 100, 0, 0, 0, 0, 0, 80, @entry9*100+6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undead commoner - On respawn - random action list'), -- Undead Brewfest +(@entry9*100+6, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43917, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undead commoner - random action list - cast '), +(@entry9*100+6, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 71, 0, 0, 2705, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undead commoner - random action list - Equip'), +(@entry9, 0, 17, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry9*100+7, @entry9*100+8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undead commoner - On respawn - random action list'), -- Undead DOTD +(@entry9*100+7, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29203, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undead commoner - random action list - Morph '), +(@entry9*100+8, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undead commoner - random action list - Morph'), +(@entry9, 0, 18, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry9*100+9, @entry9*100+10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'undead commoner - On respawn - random action list'), -- undead pirates +(@entry9*100+9, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25042, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'undead commoner - random action list - Morph '), +(@entry9*100+10, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25053, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'undead commoner - random action list - Morph'), +(@entry9, 0, 19, 0, 11, 0, 100, 0, 0, 0, 0, 0, 3, 25878, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'undead commoner - On respawn - Morph'), -- undead midsummer +(@entry10, 0, 13, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry10*100, @entry10*100+1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Human - On respawn - random action list'), -- Human christmas +(@entry10*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33402, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Human - random action list - cast '), +(@entry10*100+1, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33403, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Human - random action list - cast'), +(@entry10, 0, 14, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry10*100+2, @entry10*100+3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Human - On respawn - random action list'), -- Human Halloween +(@entry10*100+2, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43633, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Human - random action list - cast '), +(@entry10*100+3, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43632, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Human - random action list - cast'), +(@entry10, 0, 15, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry10*100+4, @entry10*100+5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Human - On respawn - random action list'), -- Human Lunar +(@entry10*100+4, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33397, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Human - random action list - cast '), +(@entry10*100+5, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33398, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Human - random action list - cast'), +(@entry10, 0, 16, 0, 11, 0, 100, 0, 0, 0, 0, 0, 80, @entry10*100+6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Human commoner - On respawn - random action list'), -- Human Brewfest +(@entry10*100+6, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43912, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Human commoner - random action list - cast '), +(@entry10*100+6, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 71, 0, 0, 2705, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Human commoner - random action list - Equip'), +(@entry10, 0, 17, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry10*100+7, @entry10*100+8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Human commoner - On respawn - random action list'), -- Human DOTD +(@entry10*100+7, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29203, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Human commoner - random action list - Morph '), +(@entry10*100+8, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Human commoner - random action list - Morph'), +(@entry10, 0, 18, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry10*100+9, @entry10*100+10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Human commoner - On respawn - random action list'), -- Human pirates +(@entry10*100+9, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25037, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Human commoner - random action list - Morph '), +(@entry10*100+10, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25048, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Human commoner - random action list - Morph'), +(@entry10, 0, 19, 0, 11, 0, 100, 0, 0, 0, 0, 0, 3, 25873, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Human commoner - On respawn - Morph'), -- Human midsummer +(@entry11, 0, 13, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry11*100, @entry11*100+1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orc - On respawn - random action list'), -- Orc christmas +(@entry11*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33451, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orc - random action list - cast '), +(@entry11*100+1, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33455, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orc - random action list - cast'), +(@entry11, 0, 14, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry11*100+2, @entry11*100+3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orc - On respawn - random action list'), -- Orc Halloween +(@entry11*100+2, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43637, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orc - random action list - cast '), +(@entry11*100+3, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43636, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orc - random action list - cast'), +(@entry11, 0, 15, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry11*100+4, @entry11*100+5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orc - On respawn - random action list'), -- Orc Lunar +(@entry11*100+4, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33456, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orc - random action list - cast '), +(@entry11*100+5, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33453, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orc - random action list - cast'), +(@entry11, 0, 16, 0, 11, 0, 100, 0, 0, 0, 0, 0, 80, @entry11*100+6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orc commoner - On respawn - random action list'), -- Orc Brewfest +(@entry11*100+6, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 43914, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orc commoner - random action list - cast '), +(@entry11*100+6, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 71, 0, 0, 2705, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orc commoner - random action list - Equip'), +(@entry11, 0, 17, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry11*100+7, @entry11*100+8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orc commoner - On respawn - random action list'), -- Orc DOTD +(@entry11*100+7, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29203, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orc commoner - random action list - Morph '), +(@entry11*100+8, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 29204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orc commoner - random action list - Morph'), +(@entry11, 0, 18, 0, 11, 0, 100, 0, 0, 0, 0, 0, 87, @entry11*100+9, @entry11*100+10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orc commoner - On respawn - random action list'), -- Orc pirates +(@entry11*100+9, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25039, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orc commoner - random action list - Morph '), +(@entry11*100+10, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 3, 0, 25050, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orc commoner - random action list - Morph'), +(@entry11, 0, 19, 0, 11, 0, 100, 0, 0, 0, 0, 0, 3, 25875, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orc commoner - On respawn - Morph'); -- Orc midsummer + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry` IN (20102,18927,19177,19169,19175,19171,19172,19176,19178,19173,19148) AND `SourceGroup` >13; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22, 14, 19148, 0, 0, 12, 1, 2, 0, 0, 0, 0, 0, '', 'Commoner - Winter Veil must be active'), +(22, 14, 20102, 0, 0, 12, 1, 2, 0, 0, 0, 0, 0, '', 'Commoner - Winter Veil must be active'), +(22, 14, 18927, 0, 0, 12, 1, 2, 0, 0, 0, 0, 0, '', 'Commoner - Winter Veil must be active'), +(22, 14, 19171, 0, 0, 12, 1, 2, 0, 0, 0, 0, 0, '', 'Commoner - Winter Veil must be active'), +(22, 14, 19172, 0, 0, 12, 1, 2, 0, 0, 0, 0, 0, '', 'Commoner - Winter Veil must be active'), +(22, 14, 19173, 0, 0, 12, 1, 2, 0, 0, 0, 0, 0, '', 'Commoner - Winter Veil must be active'), +(22, 14, 19175, 0, 0, 12, 1, 2, 0, 0, 0, 0, 0, '', 'Commoner - Winter Veil must be active'), +(22, 14, 19176, 0, 0, 12, 1, 2, 0, 0, 0, 0, 0, '', 'Commoner - Winter Veil must be active'), +(22, 14, 19177, 0, 0, 12, 1, 2, 0, 0, 0, 0, 0, '', 'Commoner - Winter Veil must be active'), +(22, 14, 19178, 0, 0, 12, 1, 2, 0, 0, 0, 0, 0, '', 'Commoner - Winter Veil must be active'), +(22, 14, 19169, 0, 0, 12, 1, 2, 0, 0, 0, 0, 0, '', 'Commoner - Winter Veil must be active'), +(22, 15, 19148, 0, 0, 12, 1, 12, 0, 0, 0, 0, 0, '', 'Commoner - Hallow''s End must be active'), +(22, 15, 20102, 0, 0, 12, 1, 12, 0, 0, 0, 0, 0, '', 'Commoner - Hallow''s End must be active'), +(22, 15, 18927, 0, 0, 12, 1, 12, 0, 0, 0, 0, 0, '', 'Commoner - Hallow''s End must be active'), +(22, 15, 19171, 0, 0, 12, 1, 12, 0, 0, 0, 0, 0, '', 'Commoner - Hallow''s End must be active'), +(22, 15, 19172, 0, 0, 12, 1, 12, 0, 0, 0, 0, 0, '', 'Commoner - Hallow''s End must be active'), +(22, 15, 19173, 0, 0, 12, 1, 12, 0, 0, 0, 0, 0, '', 'Commoner - Hallow''s End must be active'), +(22, 15, 19175, 0, 0, 12, 1, 12, 0, 0, 0, 0, 0, '', 'Commoner - Hallow''s End must be active'), +(22, 15, 19176, 0, 0, 12, 1, 12, 0, 0, 0, 0, 0, '', 'Commoner - Hallow''s End must be active'), +(22, 15, 19177, 0, 0, 12, 1, 12, 0, 0, 0, 0, 0, '', 'Commoner - Hallow''s End must be active'), +(22, 15, 19178, 0, 0, 12, 1, 12, 0, 0, 0, 0, 0, '', 'Commoner - Hallow''s End must be active'), +(22, 15, 19169, 0, 0, 12, 1, 12, 0, 0, 0, 0, 0, '', 'Commoner - Hallow''s End must be active'), +(22, 16, 19148, 0, 0, 12, 1, 7, 0, 0, 0, 0, 0, '', 'Commoner - Lunar Festival must be active'), +(22, 16, 20102, 0, 0, 12, 1, 7, 0, 0, 0, 0, 0, '', 'Commoner - Lunar Festival must be active'), +(22, 16, 18927, 0, 0, 12, 1, 7, 0, 0, 0, 0, 0, '', 'Commoner - Lunar Festival must be active'), +(22, 16, 19171, 0, 0, 12, 1, 7, 0, 0, 0, 0, 0, '', 'Commoner - Lunar Festival must be active'), +(22, 16, 19172, 0, 0, 12, 1, 7, 0, 0, 0, 0, 0, '', 'Commoner - Lunar Festival must be active'), +(22, 16, 19173, 0, 0, 12, 1, 7, 0, 0, 0, 0, 0, '', 'Commoner - Lunar Festival must be active'), +(22, 16, 19175, 0, 0, 12, 1, 7, 0, 0, 0, 0, 0, '', 'Commoner - Lunar Festival must be active'), +(22, 16, 19176, 0, 0, 12, 1, 7, 0, 0, 0, 0, 0, '', 'Commoner - Lunar Festival must be active'), +(22, 16, 19177, 0, 0, 12, 1, 7, 0, 0, 0, 0, 0, '', 'Commoner - Lunar Festival must be active'), +(22, 16, 19178, 0, 0, 12, 1, 7, 0, 0, 0, 0, 0, '', 'Commoner - Lunar Festival must be active'), +(22, 16, 19169, 0, 0, 12, 1, 7, 0, 0, 0, 0, 0, '', 'Commoner - Lunar Festival must be active'), +(22, 17, 19148, 0, 0, 12, 1, 24, 0, 0, 0, 0, 0, '', 'Commoner - Brew Fest must be active'), +(22, 17, 20102, 0, 0, 12, 1, 24, 0, 0, 0, 0, 0, '', 'Commoner - Brew Fest must be active'), +(22, 17, 18927, 0, 0, 12, 1, 24, 0, 0, 0, 0, 0, '', 'Commoner - Brew Fest must be active'), +(22, 17, 19171, 0, 0, 12, 1, 24, 0, 0, 0, 0, 0, '', 'Commoner - Brew Fest must be active'), +(22, 17, 19172, 0, 0, 12, 1, 24, 0, 0, 0, 0, 0, '', 'Commoner - Brew Fest must be active'), +(22, 17, 19173, 0, 0, 12, 1, 24, 0, 0, 0, 0, 0, '', 'Commoner - Brew Fest must be active'), +(22, 17, 19175, 0, 0, 12, 1, 24, 0, 0, 0, 0, 0, '', 'Commoner - Brew Fest must be active'), +(22, 17, 19176, 0, 0, 12, 1, 24, 0, 0, 0, 0, 0, '', 'Commoner - Brew Fest must be active'), +(22, 17, 19177, 0, 0, 12, 1, 24, 0, 0, 0, 0, 0, '', 'Commoner - Brew Fest must be active'), +(22, 17, 19178, 0, 0, 12, 1, 24, 0, 0, 0, 0, 0, '', 'Commoner - Brew Fest must be active'), +(22, 17, 19169, 0, 0, 12, 1, 24, 0, 0, 0, 0, 0, '', 'Commoner - Brew Fest must be active'), +(22, 18, 19148, 0, 0, 12, 1, 51, 0, 0, 0, 0, 0, '', 'Commoner - DOTD must be active'), +(22, 18, 20102, 0, 0, 12, 1, 51, 0, 0, 0, 0, 0, '', 'Commoner - DOTD must be active'), +(22, 18, 18927, 0, 0, 12, 1, 51, 0, 0, 0, 0, 0, '', 'Commoner - DOTD must be active'), +(22, 18, 19171, 0, 0, 12, 1, 51, 0, 0, 0, 0, 0, '', 'Commoner - DOTD must be active'), +(22, 18, 19172, 0, 0, 12, 1, 51, 0, 0, 0, 0, 0, '', 'Commoner - DOTD must be active'), +(22, 18, 19173, 0, 0, 12, 1, 51, 0, 0, 0, 0, 0, '', 'Commoner - DOTD must be active'), +(22, 18, 19175, 0, 0, 12, 1, 51, 0, 0, 0, 0, 0, '', 'Commoner - DOTD must be active'), +(22, 18, 19176, 0, 0, 12, 1, 51, 0, 0, 0, 0, 0, '', 'Commoner - DOTD must be active'), +(22, 18, 19177, 0, 0, 12, 1, 51, 0, 0, 0, 0, 0, '', 'Commoner - DOTD must be active'), +(22, 18, 19178, 0, 0, 12, 1, 51, 0, 0, 0, 0, 0, '', 'Commoner - DOTD must be active'), +(22, 18, 19169, 0, 0, 12, 1, 51, 0, 0, 0, 0, 0, '', 'Commoner - DOTD must be active'), +(22, 19, 19148, 0, 0, 12, 1, 50, 0, 0, 0, 0, 0, '', 'Commoner - Pirates Day must be active'), +(22, 19, 20102, 0, 0, 12, 1, 50, 0, 0, 0, 0, 0, '', 'Commoner - Pirates Day must be active'), +(22, 19, 18927, 0, 0, 12, 1, 50, 0, 0, 0, 0, 0, '', 'Commoner - Pirates Day must be active'), +(22, 19, 19171, 0, 0, 12, 1, 50, 0, 0, 0, 0, 0, '', 'Commoner - Pirates Day must be active'), +(22, 19, 19172, 0, 0, 12, 1, 50, 0, 0, 0, 0, 0, '', 'Commoner - Pirates Day must be active'), +(22, 19, 19173, 0, 0, 12, 1, 50, 0, 0, 0, 0, 0, '', 'Commoner - Pirates Day must be active'), +(22, 19, 19175, 0, 0, 12, 1, 50, 0, 0, 0, 0, 0, '', 'Commoner - Pirates Day must be active'), +(22, 19, 19176, 0, 0, 12, 1, 50, 0, 0, 0, 0, 0, '', 'Commoner - Pirates Day must be active'), +(22, 19, 19177, 0, 0, 12, 1, 50, 0, 0, 0, 0, 0, '', 'Commoner - Pirates Day must be active'), +(22, 19, 19178, 0, 0, 12, 1, 50, 0, 0, 0, 0, 0, '', 'Commoner - Pirates Day must be active'), +(22, 19, 19169, 0, 0, 12, 1, 50, 0, 0, 0, 0, 0, '', 'Commoner - Pirates Day must be active'), +(22, 20, 19148, 0, 0, 12, 1, 1, 0, 0, 0, 0, 0, '', 'Commoner - Midsummer Fire Festival must be active'), +(22, 20, 20102, 0, 0, 12, 1, 1, 0, 0, 0, 0, 0, '', 'Commoner - Midsummer Fire Festival must be active'), +(22, 20, 18927, 0, 0, 12, 1, 1, 0, 0, 0, 0, 0, '', 'Commoner - Midsummer Fire Festival must be active'), +(22, 20, 19171, 0, 0, 12, 1, 1, 0, 0, 0, 0, 0, '', 'Commoner - Midsummer Fire Festival must be active'), +(22, 20, 19172, 0, 0, 12, 1, 1, 0, 0, 0, 0, 0, '', 'Commoner - Midsummer Fire Festival must be active'), +(22, 20, 19173, 0, 0, 12, 1, 1, 0, 0, 0, 0, 0, '', 'Commoner - Midsummer Fire Festival must be active'), +(22, 20, 19175, 0, 0, 12, 1, 1, 0, 0, 0, 0, 0, '', 'Commoner - Midsummer Fire Festival must be active'), +(22, 20, 19176, 0, 0, 12, 1, 1, 0, 0, 0, 0, 0, '', 'Commoner - Midsummer Fire Festival must be active'), +(22, 20, 19177, 0, 0, 12, 1, 1, 0, 0, 0, 0, 0, '', 'Commoner - Midsummer Fire Festival must be active'), +(22, 20, 19178, 0, 0, 12, 1, 1, 0, 0, 0, 0, 0, '', 'Commoner - Midsummer Fire Festival must be active'), +(22, 20, 19169, 0, 0, 12, 1, 1, 0, 0, 0, 0, 0, '', 'Commoner - Midsummer Fire Festival must be active'); + +DELETE FROM `game_event_creature_quest` WHERE `quest` IN (13483, 13484); +INSERT INTO `game_event_creature_quest` (`eventEntry`, `id`, `quest`) VALUES +(9, 19148, 13484), +(9, 18927, 13484), +(9, 19178, 13483), +(9, 19177, 13483), +(9, 19176, 13483), +(9, 19175, 13483), +(9, 19169, 13483), +(9, 19171, 13484), +(9, 19172, 13484), +(9, 19173, 13484), +(9, 20102, 13484), +(9, 20102, 13483); + +DELETE FROM `creature_queststarter` WHERE `id` IN(20102, 19172, 19169, 19173, 19171, 19148, 19177, 19176, 19178, 18927, 19175); diff --git a/sql/updates/world/2016_02_17_01_world.sql b/sql/updates/world/2016_02_17_01_world.sql new file mode 100644 index 00000000000..20f3605b197 --- /dev/null +++ b/sql/updates/world/2016_02_17_01_world.sql @@ -0,0 +1,40 @@ +UPDATE `creature_template` SET `AIName`='SmartAI',`npcflag`=1,`gossip_menu_id`=10990 WHERE `entry`IN(37671,38065); +UPDATE `creature` SET `npcflag`=3 WHERE `id`=38293; + +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN(37172,38066) AND `id`>2; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN(37671,38065); + +DELETE FROM `smart_scripts` WHERE `source_type`=2 AND `entryorguid` IN(5703,5705) AND `id`=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 +(37671, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'Crown Supply Guard - On Data Set - Say'), +(38065, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'Crown Supply Guard - On Data Set - Say'), +(37172, 0, 3, 0, 8, 0, 100, 0, 69445, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Detective Snap Snagglebolt - On Spellhit - say'), +(37172, 0, 4, 0, 8, 0, 100, 0, 69563, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Detective Snap Snagglebolt - On Spellhit - say'), +(37172, 0, 5, 0, 8, 0, 100, 0, 69489, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Detective Snap Snagglebolt - On Spellhit - say'), +(38066, 0, 3, 0, 8, 0, 100, 0, 69445, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Inspector Snip Snagglebolt - On Spellhit - say'), +(38066, 0, 4, 0, 8, 0, 100, 0, 69563, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Inspector Snip Snagglebolt - On Spellhit - say'), +(38066, 0, 5, 0, 8, 0, 100, 0, 69489, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Inspector Snip Snagglebolt - On Spellhit - say'), +(5703,2,1,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,10,208843,38065,0,0,0,0,0,"On Trigger - Set Data"), +(5705,2,1,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,10,48573,37671,0,0,0,0,0,"On Trigger - Set Data"); + +UPDATE `smart_scripts` SET `link`=1 WHERE `entryorguid`IN(5703,5705) AND `source_type`=2 AND `id`=0 AND `link`=0; + +DELETE FROM `creature_text` WHERE `entry` IN(37172,38066,37671,38065); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(37671, 0, 0, 'That crate won''t deliver itself, friend. Get a move on!', 12, 0, 100, 1, 0, 0, 38024, 0, 'Crown Supply Guard'), +(38065, 0, 0, 'That crate won''t deliver itself, friend. Get a move on!', 12, 0, 100, 1, 0, 0, 38024, 0, 'Crown Supply Guard'), +(37172, 0, 0, 'You know, that does smell pretty... Hey! Stop spraying that thing at me!', 12, 0, 100, 1, 0, 0, 38296, 0, 'Detective Snap Snagglebolt'), +(37172, 1, 0, 'Don''t tempt me! Do you even know what''s in those things?', 12, 0, 100, 1, 0, 0, 38382, 0, 'Detective Snap Snagglebolt'), +(38066, 0, 0, 'You know, that does smell pretty... Hey! Stop spraying that thing at me!', 12, 0, 100, 1, 0, 0, 38296, 0, 'Inspector Snip Snagglebolt'), +(38066, 1, 0, 'Don''t tempt me! Do you even know what''s in those things?', 12, 0, 100, 1, 0, 0, 38382, 0, 'Inspector Snip Snagglebolt'); + +DELETE FROM `gossip_menu` WHERE `entry`=10990; +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(10990, 15282), +(10990, 15280); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=10990; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14, 10990, 15280, 0, 0, 1, 0, 71450, 0, 0, 1, 0, 0, '', 'Crown Guard has different gossip if player has no aura Crown Parcel Service Uniform'), +(14, 10990, 15282, 0, 0, 1, 0, 71450, 0, 0, 0, 0, 0, '', 'Crown Guard has different gossip if player has aura Crown Parcel Service Uniform'); diff --git a/sql/updates/world/2016_02_17_02_world.sql b/sql/updates/world/2016_02_17_02_world.sql new file mode 100644 index 00000000000..6590396b7d9 --- /dev/null +++ b/sql/updates/world/2016_02_17_02_world.sql @@ -0,0 +1,21 @@ + UPDATE `creature_template` SET `gossip_menu_id`=10948, `npcflag`=3, `AIName`='SmartAI' WHERE `entry` IN(38045,38044,38043,38042,38041,38040,38039,37887); + + DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (38045,38044,38043,38042,38041,38040,38039,37887); + + 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 + (38045, 0, 0, 1, 62, 0, 100, 0, 10948, 0, 0, 0, 11, 70648, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Cast Create Lovely Charm Collectors Kit'), + (38045, 0, 1, 0, 61, 0, 100, 0, 10948, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Close Gossip'), + (38044, 0, 0, 1, 62, 0, 100, 0, 10948, 0, 0, 0, 11, 70648, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Cast Create Lovely Charm Collectors Kit'), + (38044, 0, 1, 0, 61, 0, 100, 0, 10948, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Close Gossip'), + (38043, 0, 0, 1, 62, 0, 100, 0, 10948, 0, 0, 0, 11, 70648, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Cast Create Lovely Charm Collectors Kit'), + (38043, 0, 1, 0, 61, 0, 100, 0, 10948, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Close Gossip'), + (38042, 0, 0, 1, 62, 0, 100, 0, 10948, 0, 0, 0, 11, 70648, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Cast Create Lovely Charm Collectors Kit'), + (38042, 0, 1, 0, 61, 0, 100, 0, 10948, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Close Gossip'), + (38041, 0, 0, 1, 62, 0, 100, 0, 10948, 0, 0, 0, 11, 70648, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Cast Create Lovely Charm Collectors Kit'), + (38041, 0, 1, 0, 61, 0, 100, 0, 10948, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Close Gossip'), + (38040, 0, 0, 1, 62, 0, 100, 0, 10948, 0, 0, 0, 11, 70648, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Cast Create Lovely Charm Collectors Kit'), + (38040, 0, 1, 0, 61, 0, 100, 0, 10948, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Close Gossip'), + (38039, 0, 0, 1, 62, 0, 100, 0, 10948, 0, 0, 0, 11, 70648, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Cast Create Lovely Charm Collectors Kit'), + (38039, 0, 1, 0, 61, 0, 100, 0, 10948, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Close Gossip'), + (37887, 0, 0, 1, 62, 0, 100, 0, 10948, 0, 0, 0, 11, 70648, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Cast Create Lovely Charm Collectors Kit'), + (37887, 0, 1, 0, 61, 0, 100, 0, 10948, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Close Gossip'); diff --git a/sql/updates/world/2016_02_18_00_world.sql b/sql/updates/world/2016_02_18_00_world.sql new file mode 100644 index 00000000000..c20196ddc80 --- /dev/null +++ b/sql/updates/world/2016_02_18_00_world.sql @@ -0,0 +1,7 @@ +-- Add missing creature text for Mr. Smite in Deadmines. +DELETE FROM creature_text WHERE entry=646; +INSERT INTO creature_text (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(646, 0, 0, 'You there, check out that noise!', 14, 0, 100, 0, 0, 5775, 1148, 2, 'smite SAY_ALARM1'), +(646, 1, 0, 'We\'re under attack! Avast, ye swabs! Repel the invaders!', 14, 0, 100, 0, 0, 5777, 1149, 2, 'smite SAY_ALARM2'), +(646, 2, 0, 'You landlubbers are tougher than I thought, I\'ll have to Improvise!', 12, 0, 100, 0, 0, 5778, 1344, 0, 'smite SAY_PHASE_1'), +(646, 3, 0, 'D\'ah! Now you\'re making me angry!', 12, 0, 100, 0, 0, 5779, 1345, 0, 'smite SAY_PHASE_2'); diff --git a/src/common/Define.h b/src/common/Define.h index df3dd37b503..b34edb6a549 100644 --- a/src/common/Define.h +++ b/src/common/Define.h @@ -83,10 +83,16 @@ # define ATTR_NORETURN __attribute__((__noreturn__)) # define ATTR_PRINTF(F, V) __attribute__ ((__format__ (__printf__, F, V))) # define ATTR_DEPRECATED __attribute__((__deprecated__)) +# define TRINITY_CONSTEXPR constexpr #else //COMPILER != COMPILER_GNU # define ATTR_NORETURN # define ATTR_PRINTF(F, V) # define ATTR_DEPRECATED +#if _MSC_VER >= 1900 +# define TRINITY_CONSTEXPR constexpr +#else +# define TRINITY_CONSTEXPR +#endif #endif //COMPILER == COMPILER_GNU #define UI64FMTD "%" PRIu64 diff --git a/src/server/shared/Containers.h b/src/common/Utilities/Containers.h index c2ebbf58a1e..f3e9432ca4c 100644 --- a/src/server/shared/Containers.h +++ b/src/common/Utilities/Containers.h @@ -19,10 +19,11 @@ #define TRINITY_CONTAINERS_H #include "Define.h" +#include "Random.h" +#include <algorithm> +#include <functional> #include <list> - -//! Because circular includes are bad -extern uint32 urand(uint32 min, uint32 max); +#include <vector> namespace Trinity { @@ -57,14 +58,64 @@ namespace Trinity list = listCopy; } - /* Select a random element from a container. Note: make sure you explicitly empty check the container */ - template <class C> typename C::value_type const& SelectRandomContainerElement(C const& container) + /* + * Select a random element from a container. + * + * Note: container cannot be empty + */ + template <class C> + typename C::value_type const& SelectRandomContainerElement(C const& container) { typename C::const_iterator it = container.begin(); std::advance(it, urand(0, container.size() - 1)); return *it; } + /* + * Select a random element from a container where each element has a different chance to be selected. + * + * @param container Container to select an element from + * @param weights Chances of each element to be selected, must be in the same order as elements in container. + * Caller is responsible for checking that sum of all weights is greater than 0. + * + * Note: container cannot be empty + */ + template <class C> + typename C::const_iterator SelectRandomWeightedContainerElement(C const& container, std::vector<double> weights) + { + Trinity::discrete_distribution_param<uint32> ddParam(weights.begin(), weights.end()); + std::discrete_distribution<uint32> dd(ddParam); + typename C::const_iterator it = container.begin(); + std::advance(it, dd(SFMTEngine::Instance())); + return it; + } + + /* + * Select a random element from a container where each element has a different chance to be selected. + * + * @param container Container to select an element from + * @param weightExtractor Function retrieving chance of each element in container, expected to take an element of the container and returning a double + * + * Note: container cannot be empty + */ + template <class C, class Fn> + typename C::const_iterator SelectRandomWeightedContainerElement(C const& container, Fn weightExtractor) + { + std::vector<double> weights; + weights.reserve(container.size()); + double weightSum = 0.0; + for (auto itr = container.begin(); itr != container.end(); ++itr) + { + double weight = weightExtractor(*itr); + weights.push_back(weight); + weightSum += weight; + } + if (weightSum <= 0.0) + weights.assign(container.size(), 1.0); + + return SelectRandomWeightedContainerElement(container, weights); + } + /** * @fn bool Trinity::Containers::Intersects(Iterator first1, Iterator last1, Iterator first2, Iterator last2) * diff --git a/src/common/Utilities/Random.cpp b/src/common/Utilities/Random.cpp new file mode 100644 index 00000000000..cc013110b01 --- /dev/null +++ b/src/common/Utilities/Random.cpp @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "Random.h" +#include "Common.h" +#include "Errors.h" +#include "SFMT.h" +#include <boost/thread/tss.hpp> + +static boost::thread_specific_ptr<SFMTRand> sfmtRand; + +static SFMTRand* GetRng() +{ + SFMTRand* rand = sfmtRand.get(); + + if (!rand) + { + rand = new SFMTRand(); + sfmtRand.reset(rand); + } + + return rand; +} + +int32 irand(int32 min, int32 max) +{ + ASSERT(max >= min); + return int32(GetRng()->IRandom(min, max)); +} + +uint32 urand(uint32 min, uint32 max) +{ + ASSERT(max >= min); + return GetRng()->URandom(min, max); +} + +uint32 urandms(uint32 min, uint32 max) +{ + ASSERT(max >= min); + ASSERT(INT_MAX / IN_MILLISECONDS >= max); + return GetRng()->URandom(min * IN_MILLISECONDS, max * IN_MILLISECONDS); +} + +float frand(float min, float max) +{ + ASSERT(max >= min); + return float(GetRng()->Random() * (max - min) + min); +} + +uint32 rand32() +{ + return GetRng()->BRandom(); +} + +double rand_norm() +{ + return GetRng()->Random(); +} + +double rand_chance() +{ + return GetRng()->Random() * 100.0; +} + +SFMTEngine& SFMTEngine::Instance() +{ + static SFMTEngine engine; + return engine; +} diff --git a/src/common/Utilities/Random.h b/src/common/Utilities/Random.h new file mode 100644 index 00000000000..5610651a83b --- /dev/null +++ b/src/common/Utilities/Random.h @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef Random_h__ +#define Random_h__ + +#include "Define.h" +#include <limits> +#include <random> + +/* Return a random number in the range min..max. */ +int32 irand(int32 min, int32 max); + +/* Return a random number in the range min..max (inclusive). */ +uint32 urand(uint32 min, uint32 max); + +/* Return a random millisecond value between min and max seconds. Functionally equivalent to urand(min*IN_MILLISECONDS, max*IN_MILLISECONDS). */ +uint32 urandms(uint32 min, uint32 max); + +/* Return a random number in the range 0 .. UINT32_MAX. */ +uint32 rand32(); + +/* Return a random number in the range min..max */ +float frand(float min, float max); + +/* Return a random double from 0.0 to 1.0 (exclusive). */ +double rand_norm(); + +/* Return a random double from 0.0 to 100.0 (exclusive). */ +double rand_chance(); + +/* Return true if a random roll fits in the specified chance (range 0-100). */ +inline bool roll_chance_f(float chance) +{ + return chance > rand_chance(); +} + +/* Return true if a random roll fits in the specified chance (range 0-100). */ +inline bool roll_chance_i(int chance) +{ + return chance > irand(0, 99); +} + +/* +* SFMT wrapper satisfying UniformRandomNumberGenerator concept for use in <random> algorithms +*/ +class SFMTEngine +{ +public: + typedef uint32 result_type; + + static TRINITY_CONSTEXPR result_type min() { return std::numeric_limits<result_type>::min(); } + static TRINITY_CONSTEXPR result_type max() { return std::numeric_limits<result_type>::max(); } + result_type operator()() const { return rand32(); } + + static SFMTEngine& Instance(); +}; + +// Ugly, horrible, i don't even..., hack for VS2013 to work around missing discrete_distribution(iterator, iterator) constructor +namespace Trinity +{ +#if COMPILER == COMPILER_MICROSOFT && _MSC_VER <= 1800 + template<typename T> + struct discrete_distribution_param : public std::discrete_distribution<T>::param_type + { + typedef typename std::discrete_distribution<T>::param_type base; + + template<typename InIt> + discrete_distribution_param(InIt begin, InIt end) : base(_Noinit()) + { + this->_Pvec.assign(begin, end); + this->_Init(); + } + }; +#else + template<typename T> + using discrete_distribution_param = typename std::discrete_distribution<T>::param_type; +#endif +} + +#endif // Random_h__ diff --git a/src/common/Utilities/Util.cpp b/src/common/Utilities/Util.cpp index 3eb901ca35d..1360253294f 100644 --- a/src/common/Utilities/Util.cpp +++ b/src/common/Utilities/Util.cpp @@ -20,10 +20,8 @@ #include "Common.h" #include "CompilerDefs.h" #include "utf8.h" -#include "SFMT.h" #include "Errors.h" // for ASSERT #include <stdarg.h> -#include <boost/thread/tss.hpp> #if COMPILER == COMPILER_GNU #include <sys/socket.h> @@ -31,61 +29,6 @@ #include <arpa/inet.h> #endif -static boost::thread_specific_ptr<SFMTRand> sfmtRand; - -static SFMTRand* GetRng() -{ - SFMTRand* rand = sfmtRand.get(); - - if (!rand) - { - rand = new SFMTRand(); - sfmtRand.reset(rand); - } - - return rand; -} - -int32 irand(int32 min, int32 max) -{ - ASSERT(max >= min); - return int32(GetRng()->IRandom(min, max)); -} - -uint32 urand(uint32 min, uint32 max) -{ - ASSERT(max >= min); - return GetRng()->URandom(min, max); -} - -uint32 urandms(uint32 min, uint32 max) -{ - ASSERT(max >= min); - ASSERT(INT_MAX/IN_MILLISECONDS >= max); - return GetRng()->URandom(min * IN_MILLISECONDS, max * IN_MILLISECONDS); -} - -float frand(float min, float max) -{ - ASSERT(max >= min); - return float(GetRng()->Random() * (max - min) + min); -} - -uint32 rand32() -{ - return GetRng()->BRandom(); -} - -double rand_norm() -{ - return GetRng()->Random(); -} - -double rand_chance() -{ - return GetRng()->Random() * 100.0; -} - Tokenizer::Tokenizer(const std::string &src, const char sep, uint32 vectorReserve) { m_str = new char[src.length() + 1]; diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h index f72c1430370..ab5cabca8d2 100644 --- a/src/common/Utilities/Util.h +++ b/src/common/Utilities/Util.h @@ -21,12 +21,14 @@ #include "Define.h" #include "Errors.h" +#include "Random.h" #include <algorithm> #include <string> #include <vector> #include <list> #include <map> +#include <ctime> // Searcher for map of structs template<typename T, class S> struct Finder @@ -76,39 +78,6 @@ std::string secsToTimeString(uint64 timeInSecs, bool shortText = false, bool hou uint32 TimeStringToSecs(const std::string& timestring); std::string TimeToTimestampStr(time_t t); -/* Return a random number in the range min..max. */ -int32 irand(int32 min, int32 max); - -/* Return a random number in the range min..max (inclusive). */ -uint32 urand(uint32 min, uint32 max); - -/* Return a random millisecond value between min and max seconds. Functionally equivalent to urand(min*IN_MILLISECONDS, max*IN_MILLISECONDS). */ -uint32 urandms(uint32 min, uint32 max); - -/* Return a random number in the range 0 .. UINT32_MAX. */ -uint32 rand32(); - -/* Return a random number in the range min..max */ -float frand(float min, float max); - -/* Return a random double from 0.0 to 1.0 (exclusive). */ -double rand_norm(); - -/* Return a random double from 0.0 to 100.0 (exclusive). */ -double rand_chance(); - -/* Return true if a random roll fits in the specified chance (range 0-100). */ -inline bool roll_chance_f(float chance) -{ - return chance > rand_chance(); -} - -/* Return true if a random roll fits in the specified chance (range 0-100). */ -inline bool roll_chance_i(int chance) -{ - return chance > irand(0, 99); -} - inline void ApplyPercentModFloatVar(float& var, float val, bool apply) { if (val == -100.0f) // prevent set var to zero diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp index 0c812ebd494..0618ec437b6 100644 --- a/src/server/authserver/Main.cpp +++ b/src/server/authserver/Main.cpp @@ -68,11 +68,14 @@ bool StartDB(); void StopDB(); void SignalHandler(const boost::system::error_code& error, int signalNumber); void KeepDatabaseAliveHandler(const boost::system::error_code& error); +void BanExpiryHandler(boost::system::error_code const& error); variables_map GetConsoleArguments(int argc, char** argv, std::string& configFile, std::string& configService); boost::asio::io_service* _ioService; boost::asio::deadline_timer* _dbPingTimer; uint32 _dbPingInterval; +boost::asio::deadline_timer* _banExpiryCheckTimer; +uint32 _banExpiryCheckInterval; LoginDatabaseWorkerPool LoginDatabase; int main(int argc, char** argv) @@ -169,6 +172,11 @@ int main(int argc, char** argv) _dbPingTimer->expires_from_now(boost::posix_time::minutes(_dbPingInterval)); _dbPingTimer->async_wait(KeepDatabaseAliveHandler); + _banExpiryCheckInterval = sConfigMgr->GetIntDefault("BanExpiryCheckInterval", 60); + _banExpiryCheckTimer = new boost::asio::deadline_timer(*_ioService); + _banExpiryCheckTimer->expires_from_now(boost::posix_time::seconds(_banExpiryCheckInterval)); + _banExpiryCheckTimer->async_wait(BanExpiryHandler); + #if PLATFORM == PLATFORM_WINDOWS if (m_ServiceStatus != -1) { @@ -181,6 +189,7 @@ int main(int argc, char** argv) // Start the io service worker loop _ioService->run(); + _banExpiryCheckTimer->cancel(); _dbPingTimer->cancel(); sAuthSocketMgr.StopNetwork(); @@ -192,6 +201,7 @@ int main(int argc, char** argv) signals.cancel(); + delete _banExpiryCheckTimer; delete _dbPingTimer; delete _ioService; return 0; @@ -242,6 +252,18 @@ void KeepDatabaseAliveHandler(const boost::system::error_code& error) } } +void BanExpiryHandler(boost::system::error_code const& error) +{ + if (!error) + { + LoginDatabase.Execute(LoginDatabase.GetPreparedStatement(LOGIN_DEL_EXPIRED_IP_BANS)); + LoginDatabase.Execute(LoginDatabase.GetPreparedStatement(LOGIN_UPD_EXPIRED_ACCOUNT_BANS)); + + _banExpiryCheckTimer->expires_from_now(boost::posix_time::seconds(_banExpiryCheckInterval)); + _banExpiryCheckTimer->async_wait(BanExpiryHandler); + } +} + #if PLATFORM == PLATFORM_WINDOWS void ServiceStatusWatcher(boost::system::error_code const& error) { diff --git a/src/server/authserver/Server/AuthSession.cpp b/src/server/authserver/Server/AuthSession.cpp index 60e9b734b13..519cd1f19f7 100644 --- a/src/server/authserver/Server/AuthSession.cpp +++ b/src/server/authserver/Server/AuthSession.cpp @@ -43,12 +43,6 @@ enum eAuthCmd XFER_CANCEL = 0x34 }; -enum eStatus -{ - STATUS_CONNECTED = 0, - STATUS_AUTHED -}; - #pragma pack(push, 1) typedef struct AUTH_LOGON_CHALLENGE_C @@ -115,11 +109,10 @@ enum class BufferSizes : uint32 SRP_6_S = 0x20, }; +#define MAX_ACCEPTED_CHALLENGE_SIZE (sizeof(AUTH_LOGON_CHALLENGE_C) + 16) + #define AUTH_LOGON_CHALLENGE_INITIAL_SIZE 4 #define REALM_LIST_PACKET_SIZE 5 -#define XFER_ACCEPT_SIZE 1 -#define XFER_RESUME_SIZE 9 -#define XFER_CANCEL_SIZE 1 std::unordered_map<uint8, AuthHandler> AuthSession::InitHandlers() { @@ -130,15 +123,98 @@ std::unordered_map<uint8, AuthHandler> AuthSession::InitHandlers() handlers[AUTH_RECONNECT_CHALLENGE] = { STATUS_CONNECTED, AUTH_LOGON_CHALLENGE_INITIAL_SIZE, &AuthSession::HandleReconnectChallenge }; handlers[AUTH_RECONNECT_PROOF] = { STATUS_CONNECTED, sizeof(AUTH_RECONNECT_PROOF_C), &AuthSession::HandleReconnectProof }; handlers[REALM_LIST] = { STATUS_AUTHED, REALM_LIST_PACKET_SIZE, &AuthSession::HandleRealmList }; - handlers[XFER_ACCEPT] = { STATUS_AUTHED, XFER_ACCEPT_SIZE, &AuthSession::HandleXferAccept }; - handlers[XFER_RESUME] = { STATUS_AUTHED, XFER_RESUME_SIZE, &AuthSession::HandleXferResume }; - handlers[XFER_CANCEL] = { STATUS_AUTHED, XFER_CANCEL_SIZE, &AuthSession::HandleXferCancel }; return handlers; } std::unordered_map<uint8, AuthHandler> const Handlers = AuthSession::InitHandlers(); +void AccountInfo::LoadResult(Field* fields) +{ + // 0 1 2 3 4 5 6 + //SELECT a.id, a.username, a.locked, a.lock_country, a.last_ip, a.failed_logins, ab.unbandate > UNIX_TIMESTAMP() OR ab.unbandate = ab.bandate, + // 7 8 9 10 11 12 + // ab.unbandate = ab.bandate, aa.gmlevel, a.token_key, a.sha_pass_hash, a.v, a.s + //FROM account a LEFT JOIN account_access aa ON a.id = aa.id LEFT JOIN account_banned ab ON ab.id = a.id AND ab.active = 1 WHERE a.username = ? + + Id = fields[0].GetUInt32(); + Login = fields[1].GetString(); + IsLockedToIP = fields[2].GetBool(); + LockCountry = fields[3].GetString(); + LastIP = fields[4].GetString(); + FailedLogins = fields[5].GetUInt32(); + IsBanned = fields[6].GetUInt64() != 0; + IsPermanenetlyBanned = fields[7].GetUInt64() != 0; + SecurityLevel = AccountTypes(fields[8].GetUInt8()); +} + +AuthSession::AuthSession(tcp::socket&& socket) : Socket(std::move(socket)), +_sentChallenge(false), _sentProof(false), +_status(STATUS_CONNECTED), _build(0), _expversion(0) +{ + N.SetHexStr("894B645E89E1535BBDAD5B8B290650530801B18EBFBF5E8FAB3C82872A3E9BB7"); + g.SetDword(7); +} + +void AuthSession::Start() +{ + std::string ip_address = GetRemoteIpAddress().to_string(); + TC_LOG_TRACE("session", "Accepted connection from %s", ip_address.c_str()); + + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_IP_INFO); + stmt->setString(0, ip_address); + stmt->setUInt32(1, inet_addr(ip_address.c_str())); + + _queryCallback = std::bind(&AuthSession::CheckIpCallback, this, std::placeholders::_1); + _queryFuture = LoginDatabase.AsyncQuery(stmt); +} + +bool AuthSession::Update() +{ + if (!AuthSocket::Update()) + return false; + + if (_queryFuture.valid() && _queryFuture.wait_for(std::chrono::seconds(0)) == std::future_status::ready) + { + auto callback = _queryCallback; + _queryCallback = nullptr; + callback(_queryFuture.get()); + } + + return true; +} + +void AuthSession::CheckIpCallback(PreparedQueryResult result) +{ + if (result) + { + bool banned = false; + do + { + Field* fields = result->Fetch(); + if (fields[0].GetUInt64() != 0) + banned = true; + + if (!fields[1].GetString().empty()) + _ipCountry = fields[1].GetString(); + + } while (result->NextRow()); + + if (banned) + { + ByteBuffer pkt; + pkt << uint8(AUTH_LOGON_CHALLENGE); + pkt << uint8(0x00); + pkt << uint8(WOW_FAIL_BANNED); + SendPacket(pkt); + TC_LOG_DEBUG("session", "[AuthSession::CheckIpCallback] Banned ip '%s:%d' tries to login!", GetRemoteIpAddress().to_string().c_str(), GetRemotePort()); + return; + } + } + + AsyncRead(); +} + void AuthSession::ReadHandler() { MessageBuffer& packet = GetReadBuffer(); @@ -153,6 +229,12 @@ void AuthSession::ReadHandler() break; } + if (_status != itr->second.status) + { + CloseSocket(); + return; + } + uint16 size = uint16(itr->second.packetSize); if (packet.GetActiveSize() < size) break; @@ -161,12 +243,17 @@ void AuthSession::ReadHandler() { sAuthLogonChallenge_C* challenge = reinterpret_cast<sAuthLogonChallenge_C*>(packet.GetReadPointer()); size += challenge->size; + if (size > MAX_ACCEPTED_CHALLENGE_SIZE) + { + CloseSocket(); + return; + } } if (packet.GetActiveSize() < size) break; - if (!(*this.*Handlers.at(cmd).handler)()) + if (!(*this.*itr->second.handler)()) { CloseSocket(); return; @@ -196,224 +283,203 @@ void AuthSession::SendPacket(ByteBuffer& packet) bool AuthSession::HandleLogonChallenge() { + if (_sentChallenge) + return false; + + _sentChallenge = true; + sAuthLogonChallenge_C* challenge = reinterpret_cast<sAuthLogonChallenge_C*>(GetReadBuffer().GetReadPointer()); + if (challenge->size - (sizeof(sAuthLogonChallenge_C) - AUTH_LOGON_CHALLENGE_INITIAL_SIZE - 1) != challenge->I_len) + return false; - //TC_LOG_DEBUG("server.authserver", "[AuthChallenge] got full packet, %#04x bytes", challenge->size); - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] name(%d): '%s'", challenge->I_len, challenge->I); + std::string login((const char*)challenge->I, challenge->I_len); + TC_LOG_DEBUG("server.authserver", "[AuthChallenge] '%s'", login.c_str()); - ByteBuffer pkt; + if (_queryCallback) + { + ByteBuffer pkt; + pkt << uint8(AUTH_LOGON_CHALLENGE); + pkt << uint8(0x00); + pkt << uint8(WOW_FAIL_DB_BUSY); + SendPacket(pkt); + + TC_LOG_DEBUG("server.authserver", "[AuthChallenge] %s attempted to log too quick after previous attempt!", login.c_str()); + return true; + } - _login.assign((const char*)challenge->I, challenge->I_len); _build = challenge->build; _expversion = uint8(AuthHelper::IsPostBCAcceptedClientBuild(_build) ? POST_BC_EXP_FLAG : (AuthHelper::IsPreBCAcceptedClientBuild(_build) ? PRE_BC_EXP_FLAG : NO_VALID_EXP_FLAG)); - _os = (const char*)challenge->os; - - if (_os.size() > 4) - return false; + std::array<char, 5> os; + os.fill('\0'); + memcpy(os.data(), challenge->os, sizeof(challenge->os)); + _os = os.data(); // Restore string order as its byte order is reversed std::reverse(_os.begin(), _os.end()); + _localizationName.resize(4); + for (int i = 0; i < 4; ++i) + _localizationName[i] = challenge->country[4 - i - 1]; + + // Get the account details from the account table + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_LOGONCHALLENGE); + stmt->setString(0, login); + + _queryCallback = std::bind(&AuthSession::LogonChallengeCallback, this, std::placeholders::_1); + _queryFuture = LoginDatabase.AsyncQuery(stmt); + return true; +} + +void AuthSession::LogonChallengeCallback(PreparedQueryResult result) +{ + ByteBuffer pkt; pkt << uint8(AUTH_LOGON_CHALLENGE); pkt << uint8(0x00); - // Verify that this IP is not in the ip_banned table - LoginDatabase.Execute(LoginDatabase.GetPreparedStatement(LOGIN_DEL_EXPIRED_IP_BANS)); + if (!result) + { + pkt << uint8(WOW_FAIL_UNKNOWN_ACCOUNT); + SendPacket(pkt); + return; + } + + Field* fields = result->Fetch(); + + _accountInfo.LoadResult(fields); std::string ipAddress = GetRemoteIpAddress().to_string(); uint16 port = GetRemotePort(); - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_IP_BANNED); - stmt->setString(0, ipAddress); - PreparedQueryResult result = LoginDatabase.Query(stmt); - if (result) + // If the IP is 'locked', check that the player comes indeed from the correct IP address + if (_accountInfo.IsLockedToIP) { - pkt << uint8(WOW_FAIL_BANNED); - TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] Banned ip tries to login!", ipAddress.c_str(), port); + TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is locked to IP - '%s' is logging in from '%s'", _accountInfo.Login.c_str(), _accountInfo.LastIP.c_str(), ipAddress.c_str()); + if (_accountInfo.LastIP != ipAddress) + { + pkt << uint8(WOW_FAIL_LOCKED_ENFORCED); + SendPacket(pkt); + return; + } } else { - // Get the account details from the account table - // No SQL injection (prepared statement) - stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_LOGONCHALLENGE); - stmt->setString(0, _login); - - PreparedQueryResult res2 = LoginDatabase.Query(stmt); - if (res2) + TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is not locked to ip", _accountInfo.Login.c_str()); + if (_accountInfo.LockCountry.empty() || _accountInfo.LockCountry == "00") + TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is not locked to country", _accountInfo.Login.c_str()); + else if (!_accountInfo.LockCountry.empty() && !_ipCountry.empty()) { - Field* fields = res2->Fetch(); - - // If the IP is 'locked', check that the player comes indeed from the correct IP address - bool locked = false; - if (fields[2].GetUInt8() == 1) // if ip is locked - { - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is locked to IP - '%s'", _login.c_str(), fields[4].GetCString()); - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Player address is '%s'", ipAddress.c_str()); - - if (strcmp(fields[4].GetCString(), ipAddress.c_str()) != 0) - { - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account IP differs"); - pkt << uint8(WOW_FAIL_LOCKED_ENFORCED); - locked = true; - } - else - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account IP matches"); - } - else + TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is locked to country: '%s' Player country is '%s'", _accountInfo.Login.c_str(), _accountInfo.LockCountry.c_str(), _ipCountry.c_str()); + if (_ipCountry != _accountInfo.LockCountry) { - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is not locked to ip", _login.c_str()); - std::string accountCountry = fields[3].GetString(); - if (accountCountry.empty() || accountCountry == "00") - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is not locked to country", _login.c_str()); - else if (!accountCountry.empty()) - { - uint32 ip = inet_addr(ipAddress.c_str()); - EndianConvertReverse(ip); - - stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_LOGON_COUNTRY); - stmt->setUInt32(0, ip); - if (PreparedQueryResult sessionCountryQuery = LoginDatabase.Query(stmt)) - { - std::string loginCountry = (*sessionCountryQuery)[0].GetString(); - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is locked to country: '%s' Player country is '%s'", _login.c_str(), - accountCountry.c_str(), loginCountry.c_str()); - - if (loginCountry != accountCountry) - { - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account country differs."); - pkt << uint8(WOW_FAIL_UNLOCKABLE_LOCK); - locked = true; - } - else - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account country matches"); - } - else - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] IP2NATION Table empty"); - } + pkt << uint8(WOW_FAIL_UNLOCKABLE_LOCK); + SendPacket(pkt); + return; } + } + } - if (!locked) - { - //set expired bans to inactive - LoginDatabase.DirectExecute(LoginDatabase.GetPreparedStatement(LOGIN_UPD_EXPIRED_ACCOUNT_BANS)); - - // If the account is banned, reject the logon attempt - stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_BANNED); - stmt->setUInt32(0, fields[1].GetUInt32()); - PreparedQueryResult banresult = LoginDatabase.Query(stmt); - if (banresult) - { - if ((*banresult)[0].GetUInt32() == (*banresult)[1].GetUInt32()) - { - pkt << uint8(WOW_FAIL_BANNED); - TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] Banned account %s tried to login!", ipAddress.c_str(), - port, _login.c_str()); - } - else - { - pkt << uint8(WOW_FAIL_SUSPENDED); - TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] Temporarily banned account %s tried to login!", - ipAddress.c_str(), port, _login.c_str()); - } - } - else - { - // Get the password from the account table, upper it, and make the SRP6 calculation - std::string rI = fields[0].GetString(); - - // Don't calculate (v, s) if there are already some in the database - std::string databaseV = fields[6].GetString(); - std::string databaseS = fields[7].GetString(); - - TC_LOG_DEBUG("network", "database authentication values: v='%s' s='%s'", databaseV.c_str(), databaseS.c_str()); - - // multiply with 2 since bytes are stored as hexstring - if (databaseV.size() != size_t(BufferSizes::SRP_6_V) * 2 || databaseS.size() != size_t(BufferSizes::SRP_6_S) * 2) - SetVSFields(rI); - else - { - s.SetHexStr(databaseS.c_str()); - v.SetHexStr(databaseV.c_str()); - } - - b.SetRand(19 * 8); - BigNumber gmod = g.ModExp(b, N); - B = ((v * 3) + gmod) % N; - - ASSERT(gmod.GetNumBytes() <= 32); - - BigNumber unk3; - unk3.SetRand(16 * 8); - - // Fill the response packet with the result - if (AuthHelper::IsAcceptedClientBuild(_build)) - pkt << uint8(WOW_SUCCESS); - else - pkt << uint8(WOW_FAIL_VERSION_INVALID); - - // B may be calculated < 32B so we force minimal length to 32B - pkt.append(B.AsByteArray(32).get(), 32); // 32 bytes - pkt << uint8(1); - pkt.append(g.AsByteArray(1).get(), 1); - pkt << uint8(32); - pkt.append(N.AsByteArray(32).get(), 32); - pkt.append(s.AsByteArray(int32(BufferSizes::SRP_6_S)).get(), size_t(BufferSizes::SRP_6_S)); // 32 bytes - pkt.append(unk3.AsByteArray(16).get(), 16); - uint8 securityFlags = 0; - - // Check if token is used - _tokenKey = fields[8].GetString(); - if (!_tokenKey.empty()) - securityFlags = 4; - - pkt << uint8(securityFlags); // security flags (0x0...0x04) - - if (securityFlags & 0x01) // PIN input - { - pkt << uint32(0); - pkt << uint64(0) << uint64(0); // 16 bytes hash? - } - - if (securityFlags & 0x02) // Matrix input - { - pkt << uint8(0); - pkt << uint8(0); - pkt << uint8(0); - pkt << uint8(0); - pkt << uint64(0); - } - - if (securityFlags & 0x04) // Security token input - pkt << uint8(1); - - uint8 secLevel = fields[5].GetUInt8(); - _accountSecurityLevel = secLevel <= SEC_ADMINISTRATOR ? AccountTypes(secLevel) : SEC_ADMINISTRATOR; - - _localizationName.resize(4); - for (int i = 0; i < 4; ++i) - _localizationName[i] = challenge->country[4 - i - 1]; - - TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] account %s is using '%c%c%c%c' locale (%u)", - ipAddress.c_str(), port, _login.c_str(), - challenge->country[3], challenge->country[2], challenge->country[1], challenge->country[0], - GetLocaleByName(_localizationName) - ); - } - } + // If the account is banned, reject the logon attempt + if (_accountInfo.IsBanned) + { + if (_accountInfo.IsPermanenetlyBanned) + { + pkt << uint8(WOW_FAIL_BANNED); + SendPacket(pkt); + TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] Banned account %s tried to login!", ipAddress.c_str(), port, _accountInfo.Login.c_str()); + return; + } + else + { + pkt << uint8(WOW_FAIL_SUSPENDED); + SendPacket(pkt); + TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] Temporarily banned account %s tried to login!", ipAddress.c_str(), port, _accountInfo.Login.c_str()); + return; } - else //no account - pkt << uint8(WOW_FAIL_UNKNOWN_ACCOUNT); } + // Get the password from the account table, upper it, and make the SRP6 calculation + std::string rI = fields[10].GetString(); + + // Don't calculate (v, s) if there are already some in the database + std::string databaseV = fields[11].GetString(); + std::string databaseS = fields[12].GetString(); + + TC_LOG_DEBUG("network", "database authentication values: v='%s' s='%s'", databaseV.c_str(), databaseS.c_str()); + + // multiply with 2 since bytes are stored as hexstring + if (databaseV.size() != size_t(BufferSizes::SRP_6_V) * 2 || databaseS.size() != size_t(BufferSizes::SRP_6_S) * 2) + SetVSFields(rI); + else + { + s.SetHexStr(databaseS.c_str()); + v.SetHexStr(databaseV.c_str()); + } + + b.SetRand(19 * 8); + BigNumber gmod = g.ModExp(b, N); + B = ((v * 3) + gmod) % N; + + ASSERT(gmod.GetNumBytes() <= 32); + + BigNumber unk3; + unk3.SetRand(16 * 8); + + // Fill the response packet with the result + if (AuthHelper::IsAcceptedClientBuild(_build)) + pkt << uint8(WOW_SUCCESS); + else + pkt << uint8(WOW_FAIL_VERSION_INVALID); + + // B may be calculated < 32B so we force minimal length to 32B + pkt.append(B.AsByteArray(32).get(), 32); // 32 bytes + pkt << uint8(1); + pkt.append(g.AsByteArray(1).get(), 1); + pkt << uint8(32); + pkt.append(N.AsByteArray(32).get(), 32); + pkt.append(s.AsByteArray(int32(BufferSizes::SRP_6_S)).get(), size_t(BufferSizes::SRP_6_S)); // 32 bytes + pkt.append(unk3.AsByteArray(16).get(), 16); + uint8 securityFlags = 0; + + // Check if token is used + _tokenKey = fields[9].GetString(); + if (!_tokenKey.empty()) + securityFlags = 4; + + pkt << uint8(securityFlags); // security flags (0x0...0x04) + + if (securityFlags & 0x01) // PIN input + { + pkt << uint32(0); + pkt << uint64(0) << uint64(0); // 16 bytes hash? + } + + if (securityFlags & 0x02) // Matrix input + { + pkt << uint8(0); + pkt << uint8(0); + pkt << uint8(0); + pkt << uint8(0); + pkt << uint64(0); + } + + if (securityFlags & 0x04) // Security token input + pkt << uint8(1); + + TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] account %s is using '%s' locale (%u)", + ipAddress.c_str(), port, _accountInfo.Login.c_str(), _localizationName.c_str(), GetLocaleByName(_localizationName)); + SendPacket(pkt); - return true; } // Logon Proof command handler bool AuthSession::HandleLogonProof() { - TC_LOG_DEBUG("server.authserver", "Entering _HandleLogonProof"); + if (_sentProof) + return false; + + _sentProof = true; + // Read the packet sAuthLogonProof_C *logonProof = reinterpret_cast<sAuthLogonProof_C*>(GetReadBuffer().GetReadPointer()); @@ -487,7 +553,7 @@ bool AuthSession::HandleLogonProof() t3.SetBinary(hash, 20); sha.Initialize(); - sha.UpdateData(_login); + sha.UpdateData(_accountInfo.Login); sha.Finalize(); uint8 t4[SHA_DIGEST_LENGTH]; memcpy(t4, sha.GetDigest(), SHA_DIGEST_LENGTH); @@ -503,7 +569,7 @@ bool AuthSession::HandleLogonProof() // Check if SRP6 results match (password is correct), else send an error if (!memcmp(M.AsByteArray(sha.GetLength()).get(), logonProof->M1, 20)) { - TC_LOG_DEBUG("server.authserver", "'%s:%d' User '%s' successfully authenticated", GetRemoteIpAddress().to_string().c_str(), GetRemotePort(), _login.c_str()); + TC_LOG_DEBUG("server.authserver", "'%s:%d' User '%s' successfully authenticated", GetRemoteIpAddress().to_string().c_str(), GetRemotePort(), _accountInfo.Login.c_str()); // Update the sessionkey, last_ip, last login time and reset number of failed logins in the account table for this account // No SQL injection (escaped user name) and IP address as received by socket @@ -514,7 +580,7 @@ bool AuthSession::HandleLogonProof() stmt->setString(1, GetRemoteIpAddress().to_string().c_str()); stmt->setUInt32(2, GetLocaleByName(_localizationName)); stmt->setString(3, _os); - stmt->setString(4, _login); + stmt->setString(4, _accountInfo.Login); LoginDatabase.DirectExecute(stmt); OPENSSL_free((void*)K_hex); @@ -531,6 +597,7 @@ bool AuthSession::HandleLogonProof() std::string token(reinterpret_cast<char*>(GetReadBuffer().GetReadPointer() + sizeof(sAuthLogonProof_C) + sizeof(size)), size); GetReadBuffer().ReadCompleted(sizeof(size) + size); uint32 validToken = TOTP::GenerateToken(_tokenKey.c_str()); + _tokenKey.clear(); uint32 incomingToken = atoi(token.c_str()); if (validToken != incomingToken) { @@ -571,7 +638,7 @@ bool AuthSession::HandleLogonProof() } SendPacket(packet); - _isAuthenticated = true; + _status = STATUS_AUTHED; } else { @@ -583,7 +650,7 @@ bool AuthSession::HandleLogonProof() SendPacket(packet); TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] account %s tried to login with invalid password!", - GetRemoteIpAddress().to_string().c_str(), GetRemotePort(), _login.c_str()); + GetRemoteIpAddress().to_string().c_str(), GetRemotePort(), _accountInfo.Login.c_str()); uint32 MaxWrongPassCount = sConfigMgr->GetIntDefault("WrongPass.MaxCount", 0); @@ -591,7 +658,7 @@ bool AuthSession::HandleLogonProof() if (sConfigMgr->GetBoolDefault("WrongPass.Logging", false)) { PreparedStatement* logstmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_FALP_IP_LOGGING); - logstmt->setString(0, _login); + logstmt->setString(0, _accountInfo.Login); logstmt->setString(1, GetRemoteIpAddress().to_string()); logstmt->setString(2, "Logged on failed AccountLogin due wrong password"); @@ -602,42 +669,33 @@ bool AuthSession::HandleLogonProof() { //Increment number of failed logins by one and if it reaches the limit temporarily ban that account or IP PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_FAILEDLOGINS); - stmt->setString(0, _login); + stmt->setString(0, _accountInfo.Login); LoginDatabase.Execute(stmt); - stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_FAILEDLOGINS); - stmt->setString(0, _login); - - if (PreparedQueryResult loginfail = LoginDatabase.Query(stmt)) + if (_accountInfo.FailedLogins >= MaxWrongPassCount) { - uint32 failed_logins = (*loginfail)[1].GetUInt32(); + uint32 WrongPassBanTime = sConfigMgr->GetIntDefault("WrongPass.BanTime", 600); + bool WrongPassBanType = sConfigMgr->GetBoolDefault("WrongPass.BanType", false); - if (failed_logins >= MaxWrongPassCount) + if (WrongPassBanType) + { + stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_ACCOUNT_AUTO_BANNED); + stmt->setUInt32(0, _accountInfo.Id); + stmt->setUInt32(1, WrongPassBanTime); + LoginDatabase.Execute(stmt); + + TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] account %s got banned for '%u' seconds because it failed to authenticate '%u' times", + GetRemoteIpAddress().to_string().c_str(), GetRemotePort(), _accountInfo.Login.c_str(), WrongPassBanTime, _accountInfo.FailedLogins); + } + else { - uint32 WrongPassBanTime = sConfigMgr->GetIntDefault("WrongPass.BanTime", 600); - bool WrongPassBanType = sConfigMgr->GetBoolDefault("WrongPass.BanType", false); - - if (WrongPassBanType) - { - uint32 acc_id = (*loginfail)[0].GetUInt32(); - stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_ACCOUNT_AUTO_BANNED); - stmt->setUInt32(0, acc_id); - stmt->setUInt32(1, WrongPassBanTime); - LoginDatabase.Execute(stmt); - - TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] account %s got banned for '%u' seconds because it failed to authenticate '%u' times", - GetRemoteIpAddress().to_string().c_str(), GetRemotePort(), _login.c_str(), WrongPassBanTime, failed_logins); - } - else - { - stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_IP_AUTO_BANNED); - stmt->setString(0, GetRemoteIpAddress().to_string()); - stmt->setUInt32(1, WrongPassBanTime); - LoginDatabase.Execute(stmt); - - TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] IP got banned for '%u' seconds because account %s failed to authenticate '%u' times", - GetRemoteIpAddress().to_string().c_str(), GetRemotePort(), WrongPassBanTime, _login.c_str(), failed_logins); - } + stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_IP_AUTO_BANNED); + stmt->setString(0, GetRemoteIpAddress().to_string()); + stmt->setUInt32(1, WrongPassBanTime); + LoginDatabase.Execute(stmt); + + TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] IP got banned for '%u' seconds because account %s failed to authenticate '%u' times", + GetRemoteIpAddress().to_string().c_str(), GetRemotePort(), WrongPassBanTime, _accountInfo.Login.c_str(), _accountInfo.FailedLogins); } } } @@ -648,61 +706,88 @@ bool AuthSession::HandleLogonProof() bool AuthSession::HandleReconnectChallenge() { - TC_LOG_DEBUG("server.authserver", "Entering _HandleReconnectChallenge"); - sAuthLogonChallenge_C* challenge = reinterpret_cast<sAuthLogonChallenge_C*>(GetReadBuffer().GetReadPointer()); + if (_sentChallenge) + return false; - //TC_LOG_DEBUG("server.authserver", "[AuthChallenge] got full packet, %#04x bytes", challenge->size); - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] name(%d): '%s'", challenge->I_len, challenge->I); + _sentChallenge = true; - _login.assign((const char*)challenge->I, challenge->I_len); + sAuthLogonChallenge_C* challenge = reinterpret_cast<sAuthLogonChallenge_C*>(GetReadBuffer().GetReadPointer()); + if (challenge->size - (sizeof(sAuthLogonChallenge_C) - AUTH_LOGON_CHALLENGE_INITIAL_SIZE - 1) != challenge->I_len) + return false; - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_SESSIONKEY); - stmt->setString(0, _login); - PreparedQueryResult result = LoginDatabase.Query(stmt); + std::string login((const char*)challenge->I, challenge->I_len); + TC_LOG_DEBUG("server.authserver", "[ReconnectChallenge] '%s'", login.c_str()); - // Stop if the account is not found - if (!result) + if (_queryCallback) { - TC_LOG_ERROR("server.authserver", "'%s:%d' [ERROR] user %s tried to login and we cannot find his session key in the database.", - GetRemoteIpAddress().to_string().c_str(), GetRemotePort(), _login.c_str()); - return false; + ByteBuffer pkt; + pkt << uint8(AUTH_RECONNECT_CHALLENGE); + pkt << uint8(WOW_FAIL_DB_BUSY); + SendPacket(pkt); + + TC_LOG_DEBUG("server.authserver", "[ReconnectChallenge] %s attempted to log too quick after previous attempt!", login.c_str()); + return true; } - // Reinitialize build, expansion and the account securitylevel _build = challenge->build; _expversion = uint8(AuthHelper::IsPostBCAcceptedClientBuild(_build) ? POST_BC_EXP_FLAG : (AuthHelper::IsPreBCAcceptedClientBuild(_build) ? PRE_BC_EXP_FLAG : NO_VALID_EXP_FLAG)); - _os = (const char*)challenge->os; - - if (_os.size() > 4) - return false; + std::array<char, 5> os; + os.fill('\0'); + memcpy(os.data(), challenge->os, sizeof(challenge->os)); + _os = os.data(); // Restore string order as its byte order is reversed std::reverse(_os.begin(), _os.end()); - Field* fields = result->Fetch(); - uint8 secLevel = fields[2].GetUInt8(); - _accountSecurityLevel = secLevel <= SEC_ADMINISTRATOR ? AccountTypes(secLevel) : SEC_ADMINISTRATOR; + _localizationName.resize(4); + for (int i = 0; i < 4; ++i) + _localizationName[i] = challenge->country[4 - i - 1]; - K.SetHexStr((*result)[0].GetCString()); + // Get the account details from the account table + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_RECONNECTCHALLENGE); + stmt->setString(0, login); + + _queryCallback = std::bind(&AuthSession::ReconnectChallengeCallback, this, std::placeholders::_1); + _queryFuture = LoginDatabase.AsyncQuery(stmt); + return true; +} - // Sending response +void AuthSession::ReconnectChallengeCallback(PreparedQueryResult result) +{ ByteBuffer pkt; pkt << uint8(AUTH_RECONNECT_CHALLENGE); - pkt << uint8(0x00); + + if (!result) + { + pkt << uint8(WOW_FAIL_UNKNOWN_ACCOUNT); + SendPacket(pkt); + return; + } + + Field* fields = result->Fetch(); + + _accountInfo.LoadResult(fields); + K.SetHexStr(fields[9].GetCString()); _reconnectProof.SetRand(16 * 8); - pkt.append(_reconnectProof.AsByteArray(16).get(), 16); // 16 bytes random + + pkt << uint8(WOW_SUCCESS); + pkt.append(_reconnectProof.AsByteArray(16).get(), 16); // 16 bytes random pkt << uint64(0x00) << uint64(0x00); // 16 bytes zeros SendPacket(pkt); - - return true; } + bool AuthSession::HandleReconnectProof() { TC_LOG_DEBUG("server.authserver", "Entering _HandleReconnectProof"); + if (_sentProof) + return false; + + _sentProof = true; + sAuthReconnectProof_C *reconnectProof = reinterpret_cast<sAuthReconnectProof_C*>(GetReadBuffer().GetReadPointer()); - if (_login.empty() || !_reconnectProof.GetNumBytes() || !K.GetNumBytes()) + if (_accountInfo.Login.empty() || !_reconnectProof.GetNumBytes() || !K.GetNumBytes()) return false; BigNumber t1; @@ -710,7 +795,7 @@ bool AuthSession::HandleReconnectProof() SHA1Hash sha; sha.Initialize(); - sha.UpdateData(_login); + sha.UpdateData(_accountInfo.Login); sha.UpdateBigNumbers(&t1, &_reconnectProof, &K, NULL); sha.Finalize(); @@ -722,13 +807,13 @@ bool AuthSession::HandleReconnectProof() pkt << uint8(0x00); pkt << uint16(0x00); // 2 bytes zeros SendPacket(pkt); - _isAuthenticated = true; + _status = STATUS_AUTHED; return true; } else { TC_LOG_ERROR("server.authserver", "'%s:%d' [ERROR] user %s tried to login, but session is invalid.", GetRemoteIpAddress().to_string().c_str(), - GetRemotePort(), _login.c_str()); + GetRemotePort(), _accountInfo.Login.c_str()); return false; } } @@ -772,20 +857,31 @@ bool AuthSession::HandleRealmList() { TC_LOG_DEBUG("server.authserver", "Entering _HandleRealmList"); - // Get the user id (else close the connection) - // No SQL injection (prepared statement) - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_ID_BY_NAME); - stmt->setString(0, _login); - PreparedQueryResult result = LoginDatabase.Query(stmt); - if (!result) + if (_queryCallback) { - TC_LOG_ERROR("server.authserver", "'%s:%d' [ERROR] user %s tried to login but we cannot find him in the database.", GetRemoteIpAddress().to_string().c_str(), - GetRemotePort(), _login.c_str()); + TC_LOG_DEBUG("server.authserver", "[RealmList] %s attempted to get realmlist too quick after previous attempt!", _accountInfo.Login.c_str()); return false; } - Field* fields = result->Fetch(); - uint32 id = fields[0].GetUInt32(); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_REALM_CHARACTER_COUNTS); + stmt->setUInt32(0, _accountInfo.Id); + + _queryCallback = std::bind(&AuthSession::RealmListCallback, this, std::placeholders::_1); + _queryFuture = LoginDatabase.AsyncQuery(stmt); + return true; +} + +void AuthSession::RealmListCallback(PreparedQueryResult result) +{ + std::map<uint32, uint8> characterCounts; + if (result) + { + do + { + Field* fields = result->Fetch(); + characterCounts[fields[0].GetUInt32()] = fields[1].GetUInt8(); + } while (result->NextRow()); + } // Update realm list if need sRealmList->UpdateIfNeed(); @@ -822,25 +918,17 @@ bool AuthSession::HandleRealmList() name = ss.str(); } - uint8 lock = (realm.allowedSecurityLevel > _accountSecurityLevel) ? 1 : 0; - - uint8 AmountOfCharacters = 0; - stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_NUM_CHARS_ON_REALM); - stmt->setUInt32(0, realm.m_ID); - stmt->setUInt32(1, id); - result = LoginDatabase.Query(stmt); - if (result) - AmountOfCharacters = (*result)[0].GetUInt8(); + uint8 lock = (realm.allowedSecurityLevel > _accountInfo.SecurityLevel) ? 1 : 0; - pkt << realm.icon; // realm type + pkt << uint8(realm.icon); // realm type if (_expversion & POST_BC_EXP_FLAG) // only 2.x and 3.x clients - pkt << lock; // if 1, then realm locked + pkt << uint8(lock); // if 1, then realm locked pkt << uint8(flag); // RealmFlags pkt << name; pkt << boost::lexical_cast<std::string>(GetAddressForClient(realm, GetRemoteIpAddress())); - pkt << realm.populationLevel; - pkt << AmountOfCharacters; - pkt << realm.timezone; // realm category + pkt << float(realm.populationLevel); + pkt << uint8(characterCounts[realm.m_ID]); + pkt << uint8(realm.timezone); // realm category if (_expversion & POST_BC_EXP_FLAG) // 2.x and 3.x clients pkt << uint8(realm.m_ID); else @@ -882,32 +970,6 @@ bool AuthSession::HandleRealmList() hdr.append(RealmListSizeBuffer); // append RealmList's size buffer hdr.append(pkt); // append realms in the realmlist SendPacket(hdr); - return true; -} - -// Resume patch transfer -bool AuthSession::HandleXferResume() -{ - TC_LOG_DEBUG("server.authserver", "Entering _HandleXferResume"); - //uint8 - //uint64 - return true; -} - -// Cancel patch transfer -bool AuthSession::HandleXferCancel() -{ - TC_LOG_DEBUG("server.authserver", "Entering _HandleXferCancel"); - //uint8 - return false; -} - -// Accept patch transfer -bool AuthSession::HandleXferAccept() -{ - TC_LOG_DEBUG("server.authserver", "Entering _HandleXferAccept"); - //uint8 - return true; } // Make the SRP6 calculation from hash in dB @@ -940,7 +1002,7 @@ void AuthSession::SetVSFields(const std::string& rI) PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_VS); stmt->setString(0, v_hex); stmt->setString(1, s_hex); - stmt->setString(2, _login); + stmt->setString(2, _accountInfo.Login); LoginDatabase.Execute(stmt); OPENSSL_free(v_hex); diff --git a/src/server/authserver/Server/AuthSession.h b/src/server/authserver/Server/AuthSession.h index d40e0852b57..1babb7407a9 100644 --- a/src/server/authserver/Server/AuthSession.h +++ b/src/server/authserver/Server/AuthSession.h @@ -23,29 +23,48 @@ #include "ByteBuffer.h" #include "Socket.h" #include "BigNumber.h" +#include "Callback.h" #include <memory> #include <boost/asio/ip/tcp.hpp> using boost::asio::ip::tcp; +class Field; struct AuthHandler; +enum AuthStatus +{ + STATUS_CONNECTED = 0, + STATUS_AUTHED +}; + +struct AccountInfo +{ + void LoadResult(Field* fields); + + uint32 Id = 0; + std::string Login; + bool IsLockedToIP = false; + std::string LockCountry; + std::string LastIP; + uint32 FailedLogins = 0; + bool IsBanned = false; + bool IsPermanenetlyBanned = false; + AccountTypes SecurityLevel = SEC_PLAYER; + std::string TokenKey; +}; + class AuthSession : public Socket<AuthSession> { + typedef Socket<AuthSession> AuthSocket; + public: static std::unordered_map<uint8, AuthHandler> InitHandlers(); - AuthSession(tcp::socket&& socket) : Socket(std::move(socket)), - _isAuthenticated(false), _build(0), _expversion(0), _accountSecurityLevel(SEC_PLAYER) - { - N.SetHexStr("894B645E89E1535BBDAD5B8B290650530801B18EBFBF5E8FAB3C82872A3E9BB7"); - g.SetDword(7); - } + AuthSession(tcp::socket&& socket); - void Start() override - { - AsyncRead(); - } + void Start() override; + bool Update() override; void SendPacket(ByteBuffer& packet); @@ -59,10 +78,10 @@ private: bool HandleReconnectProof(); bool HandleRealmList(); - //data transfer handle for patch - bool HandleXferResume(); - bool HandleXferCancel(); - bool HandleXferAccept(); + void CheckIpCallback(PreparedQueryResult result); + void LogonChallengeCallback(PreparedQueryResult result); + void ReconnectChallengeCallback(PreparedQueryResult result); + void RealmListCallback(PreparedQueryResult result); void SetVSFields(const std::string& rI); @@ -71,22 +90,27 @@ private: BigNumber K; BigNumber _reconnectProof; - bool _isAuthenticated; + bool _sentChallenge; + bool _sentProof; + + AuthStatus _status; + AccountInfo _accountInfo; std::string _tokenKey; - std::string _login; std::string _localizationName; std::string _os; + std::string _ipCountry; uint16 _build; uint8 _expversion; - AccountTypes _accountSecurityLevel; + PreparedQueryResultFuture _queryFuture; + std::function<void(PreparedQueryResult)> _queryCallback; }; #pragma pack(push, 1) struct AuthHandler { - uint32 status; + AuthStatus status; size_t packetSize; bool (AuthSession::*handler)(); }; diff --git a/src/server/authserver/authserver.conf.dist b/src/server/authserver/authserver.conf.dist index 604988d62e5..82c3cd47148 100644 --- a/src/server/authserver/authserver.conf.dist +++ b/src/server/authserver/authserver.conf.dist @@ -131,6 +131,13 @@ WrongPass.BanType = 0 WrongPass.Logging = 0 # +# BanExpiryCheckInterval +# Description: Time (in seconds) between checks for expired bans +# Default: 60 + +BanExpiryCheckInterval = 60 + +# ################################################################################################### ################################################################################################### diff --git a/src/server/database/Database/Implementation/CharacterDatabase.cpp b/src/server/database/Database/Implementation/CharacterDatabase.cpp index 140f3bf31c9..ab68aca2a8c 100644 --- a/src/server/database/Database/Implementation/CharacterDatabase.cpp +++ b/src/server/database/Database/Implementation/CharacterDatabase.cpp @@ -72,7 +72,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() "FROM characters WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_GROUP_MEMBER, "SELECT guid FROM group_member WHERE memberGuid = ?", CONNECTION_BOTH); - PrepareStatement(CHAR_SEL_CHARACTER_INSTANCE, "SELECT id, permanent, map, difficulty, resettime FROM character_instance LEFT JOIN instance ON instance = id WHERE guid = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_SEL_CHARACTER_INSTANCE, "SELECT id, permanent, map, difficulty, extendState, resettime FROM character_instance LEFT JOIN instance ON instance = id WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_AURAS, "SELECT casterGuid, spell, effectMask, recalculateMask, stackCount, amount0, amount1, amount2, " "base_amount0, base_amount1, base_amount2, maxDuration, remainTime, remainCharges FROM character_aura WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_SPELL, "SELECT spell, active, disabled FROM character_spell WHERE guid = ?", CONNECTION_ASYNC); @@ -405,8 +405,8 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_UPD_WORLDSTATE, "UPDATE worldstates SET value = ? WHERE entry = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_WORLDSTATE, "INSERT INTO worldstates (entry, value) VALUES (?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_INSTANCE_BY_INSTANCE_GUID, "DELETE FROM character_instance WHERE guid = ? AND instance = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_UPD_CHAR_INSTANCE, "UPDATE character_instance SET instance = ?, permanent = ? WHERE guid = ? AND instance = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_INS_CHAR_INSTANCE, "INSERT INTO character_instance (guid, instance, permanent) VALUES (?, ?, ?)", CONNECTION_ASYNC); + PrepareStatement(CHAR_UPD_CHAR_INSTANCE, "UPDATE character_instance SET instance = ?, permanent = ?, extendState = ? WHERE guid = ? AND instance = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_INS_CHAR_INSTANCE, "INSERT INTO character_instance (guid, instance, permanent, extendState) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_GENDER_PLAYERBYTES, "UPDATE characters SET gender = ?, playerBytes = ?, playerBytes2 = ? WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHARACTER_SKILL, "DELETE FROM character_skills WHERE guid = ? AND skill = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_ADD_CHARACTER_SOCIAL_FLAGS, "UPDATE character_social SET flags = flags | ? WHERE guid = ? AND friend = ?", CONNECTION_ASYNC); @@ -434,6 +434,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_SEL_CHAR_CLASS_LVL_AT_LOGIN, "SELECT class, level, at_login, knownTitles FROM characters WHERE guid = ?", CONNECTION_SYNCH); PrepareStatement(CHAR_SEL_CHAR_AT_LOGIN_TITLES, "SELECT at_login, knownTitles FROM characters WHERE guid = ?", CONNECTION_SYNCH); PrepareStatement(CHAR_SEL_INSTANCE, "SELECT data, completedEncounters FROM instance WHERE map = ? AND id = ?", CONNECTION_SYNCH); + PrepareStatement(CHAR_SEL_PERM_BIND_BY_INSTANCE, "SELECT guid FROM character_instance WHERE instance = ? and permanent = 1", CONNECTION_SYNCH); PrepareStatement(CHAR_SEL_CHAR_COD_ITEM_MAIL, "SELECT id, messageType, mailTemplateId, sender, subject, body, money, has_items FROM mail WHERE receiver = ? AND has_items <> 0 AND cod <> 0", CONNECTION_SYNCH); PrepareStatement(CHAR_SEL_CHAR_SOCIAL, "SELECT DISTINCT guid FROM character_social WHERE friend = ?", CONNECTION_SYNCH); PrepareStatement(CHAR_SEL_CHAR_OLD_CHARS, "SELECT guid, deleteInfos_Account FROM characters WHERE deleteDate IS NOT NULL AND deleteDate < ?", CONNECTION_SYNCH); @@ -470,9 +471,10 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_INS_CHAR_GIFT, "INSERT INTO character_gifts (guid, item_guid, entry, flags) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_INSTANCE_BY_INSTANCE, "DELETE FROM instance WHERE id = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_INSTANCE_BY_INSTANCE, "DELETE FROM character_instance WHERE instance = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_DEL_CHAR_INSTANCE_BY_MAP_DIFF, "DELETE FROM character_instance USING character_instance LEFT JOIN instance ON character_instance.instance = id WHERE map = ? and difficulty = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_DEL_EXPIRED_CHAR_INSTANCE_BY_MAP_DIFF, "DELETE FROM character_instance USING character_instance LEFT JOIN instance ON character_instance.instance = id WHERE (extendState = 0 or permanent = 0) and map = ? and difficulty = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_GROUP_INSTANCE_BY_MAP_DIFF, "DELETE FROM group_instance USING group_instance LEFT JOIN instance ON group_instance.instance = id WHERE map = ? and difficulty = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_DEL_INSTANCE_BY_MAP_DIFF, "DELETE FROM instance WHERE map = ? and difficulty = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_DEL_EXPIRED_INSTANCE_BY_MAP_DIFF, "DELETE FROM instance WHERE map = ? and difficulty = ? and (SELECT guid FROM character_instance WHERE extendState != 0 AND instance = id LIMIT 1) IS NULL", CONNECTION_ASYNC); + PrepareStatement(CHAR_UPD_EXPIRE_CHAR_INSTANCE_BY_MAP_DIFF, "UPDATE character_instance LEFT JOIN instance ON character_instance.instance = id SET extendState = extendState-1 WHERE map = ? and difficulty = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_MAIL_ITEM_BY_ID, "DELETE FROM mail_items WHERE mail_id = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_PETITION, "INSERT INTO petition (ownerguid, petitionguid, name, type) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_PETITION_BY_GUID, "DELETE FROM petition WHERE petitionguid = ?", CONNECTION_ASYNC); diff --git a/src/server/database/Database/Implementation/CharacterDatabase.h b/src/server/database/Database/Implementation/CharacterDatabase.h index c0ff9cbbfbe..19d4a609e77 100644 --- a/src/server/database/Database/Implementation/CharacterDatabase.h +++ b/src/server/database/Database/Implementation/CharacterDatabase.h @@ -365,6 +365,7 @@ enum CharacterDatabaseStatements CHAR_SEL_CHAR_CLASS_LVL_AT_LOGIN, CHAR_SEL_CHAR_AT_LOGIN_TITLES, CHAR_SEL_INSTANCE, + CHAR_SEL_PERM_BIND_BY_INSTANCE, CHAR_SEL_CHAR_COD_ITEM_MAIL, CHAR_SEL_CHAR_SOCIAL, CHAR_SEL_CHAR_OLD_CHARS, @@ -396,9 +397,10 @@ enum CharacterDatabaseStatements CHAR_INS_CHAR_GIFT, CHAR_DEL_INSTANCE_BY_INSTANCE, CHAR_DEL_CHAR_INSTANCE_BY_INSTANCE, - CHAR_DEL_CHAR_INSTANCE_BY_MAP_DIFF, + CHAR_DEL_EXPIRED_CHAR_INSTANCE_BY_MAP_DIFF, CHAR_DEL_GROUP_INSTANCE_BY_MAP_DIFF, - CHAR_DEL_INSTANCE_BY_MAP_DIFF, + CHAR_DEL_EXPIRED_INSTANCE_BY_MAP_DIFF, + CHAR_UPD_EXPIRE_CHAR_INSTANCE_BY_MAP_DIFF, CHAR_DEL_MAIL_ITEM_BY_ID, CHAR_INS_PETITION, CHAR_DEL_PETITION_BY_GUID, diff --git a/src/server/database/Database/Implementation/LoginDatabase.cpp b/src/server/database/Database/Implementation/LoginDatabase.cpp index 66847f0a6a0..2749c08594f 100644 --- a/src/server/database/Database/Implementation/LoginDatabase.cpp +++ b/src/server/database/Database/Implementation/LoginDatabase.cpp @@ -24,33 +24,34 @@ void LoginDatabaseConnection::DoPrepareStatements() PrepareStatement(LOGIN_SEL_REALMLIST, "SELECT id, name, address, localAddress, localSubnetMask, port, icon, flag, timezone, allowedSecurityLevel, population, gamebuild FROM realmlist WHERE flag <> 3 ORDER BY name", CONNECTION_SYNCH); PrepareStatement(LOGIN_DEL_EXPIRED_IP_BANS, "DELETE FROM ip_banned WHERE unbandate<>bandate AND unbandate<=UNIX_TIMESTAMP()", CONNECTION_ASYNC); - PrepareStatement(LOGIN_UPD_EXPIRED_ACCOUNT_BANS, "UPDATE account_banned SET active = 0 WHERE active = 1 AND unbandate<>bandate AND unbandate<=UNIX_TIMESTAMP()", CONNECTION_SYNCH); + PrepareStatement(LOGIN_UPD_EXPIRED_ACCOUNT_BANS, "UPDATE account_banned SET active = 0 WHERE active = 1 AND unbandate<>bandate AND unbandate<=UNIX_TIMESTAMP()", CONNECTION_ASYNC); PrepareStatement(LOGIN_SEL_IP_INFO, "(SELECT unbandate > UNIX_TIMESTAMP() OR unbandate = bandate AS banned, NULL as country FROM ip_banned WHERE ip = ?) " "UNION " "(SELECT NULL AS banned, country FROM ip2nation WHERE INET_NTOA(ip) = ?)", CONNECTION_ASYNC); - PrepareStatement(LOGIN_SEL_IP_BANNED, "SELECT * FROM ip_banned WHERE ip = ?", CONNECTION_SYNCH); PrepareStatement(LOGIN_INS_IP_AUTO_BANNED, "INSERT INTO ip_banned (ip, bandate, unbandate, bannedby, banreason) VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, 'Trinity Auth', 'Failed login autoban')", CONNECTION_ASYNC); PrepareStatement(LOGIN_SEL_IP_BANNED_ALL, "SELECT ip, bandate, unbandate, bannedby, banreason FROM ip_banned WHERE (bandate = unbandate OR unbandate > UNIX_TIMESTAMP()) ORDER BY unbandate", CONNECTION_SYNCH); PrepareStatement(LOGIN_SEL_IP_BANNED_BY_IP, "SELECT ip, bandate, unbandate, bannedby, banreason FROM ip_banned WHERE (bandate = unbandate OR unbandate > UNIX_TIMESTAMP()) AND ip LIKE CONCAT('%%', ?, '%%') ORDER BY unbandate", CONNECTION_SYNCH); - PrepareStatement(LOGIN_SEL_ACCOUNT_BANNED, "SELECT bandate, unbandate FROM account_banned WHERE id = ? AND active = 1", CONNECTION_SYNCH); PrepareStatement(LOGIN_SEL_ACCOUNT_BANNED_ALL, "SELECT account.id, username FROM account, account_banned WHERE account.id = account_banned.id AND active = 1 GROUP BY account.id", CONNECTION_SYNCH); PrepareStatement(LOGIN_SEL_ACCOUNT_BANNED_BY_USERNAME, "SELECT account.id, username FROM account, account_banned WHERE account.id = account_banned.id AND active = 1 AND username LIKE CONCAT('%%', ?, '%%') GROUP BY account.id", CONNECTION_SYNCH); PrepareStatement(LOGIN_INS_ACCOUNT_AUTO_BANNED, "INSERT INTO account_banned VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, 'Trinity Auth', 'Failed login autoban', 1)", CONNECTION_ASYNC); PrepareStatement(LOGIN_DEL_ACCOUNT_BANNED, "DELETE FROM account_banned WHERE id = ?", CONNECTION_ASYNC); - PrepareStatement(LOGIN_SEL_SESSIONKEY, "SELECT a.sessionkey, a.id, aa.gmlevel FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE username = ?", CONNECTION_SYNCH); PrepareStatement(LOGIN_UPD_VS, "UPDATE account SET v = ?, s = ? WHERE username = ?", CONNECTION_ASYNC); PrepareStatement(LOGIN_UPD_LOGONPROOF, "UPDATE account SET sessionkey = ?, last_ip = ?, last_login = NOW(), locale = ?, failed_logins = 0, os = ? WHERE username = ?", CONNECTION_SYNCH); - PrepareStatement(LOGIN_SEL_LOGONCHALLENGE, "SELECT a.sha_pass_hash, a.id, a.locked, a.lock_country, a.last_ip, aa.gmlevel, a.v, a.s, a.token_key FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE a.username = ?", CONNECTION_SYNCH); + PrepareStatement(LOGIN_SEL_LOGONCHALLENGE, "SELECT a.id, UPPER(a.username), a.locked, a.lock_country, a.last_ip, a.failed_logins, ab.unbandate > UNIX_TIMESTAMP() OR ab.unbandate = ab.bandate, " + "ab.unbandate = ab.bandate, aa.gmlevel, a.token_key, a.sha_pass_hash, a.v, a.s " + "FROM account a LEFT JOIN account_access aa ON a.id = aa.id LEFT JOIN account_banned ab ON ab.id = a.id AND ab.active = 1 WHERE a.username = ?", CONNECTION_ASYNC); + PrepareStatement(LOGIN_SEL_RECONNECTCHALLENGE, "SELECT a.id, UPPER(a.username), a.locked, a.lock_country, a.last_ip, a.failed_logins, ab.unbandate > UNIX_TIMESTAMP() OR ab.unbandate = ab.bandate, " + "ab.unbandate = ab.bandate, aa.gmlevel, a.sessionKey " + "FROM account a LEFT JOIN account_access aa ON a.id = aa.id LEFT JOIN account_banned ab ON ab.id = a.id AND ab.active = 1 WHERE a.username = ?", CONNECTION_ASYNC); PrepareStatement(LOGIN_SEL_LOGON_COUNTRY, "SELECT country FROM ip2nation WHERE ip < ? ORDER BY ip DESC LIMIT 0,1", CONNECTION_SYNCH); PrepareStatement(LOGIN_UPD_FAILEDLOGINS, "UPDATE account SET failed_logins = failed_logins + 1 WHERE username = ?", CONNECTION_ASYNC); - PrepareStatement(LOGIN_SEL_FAILEDLOGINS, "SELECT id, failed_logins FROM account WHERE username = ?", CONNECTION_SYNCH); PrepareStatement(LOGIN_SEL_ACCOUNT_ID_BY_NAME, "SELECT id FROM account WHERE username = ?", CONNECTION_SYNCH); PrepareStatement(LOGIN_SEL_ACCOUNT_LIST_BY_NAME, "SELECT id, username FROM account WHERE username = ?", CONNECTION_SYNCH); PrepareStatement(LOGIN_SEL_ACCOUNT_INFO_BY_NAME, "SELECT a.id, a.sessionkey, a.last_ip, a.locked, a.lock_country, a.expansion, a.mutetime, a.locale, a.recruiter, a.os, aa.gmLevel, " "ab.unbandate > UNIX_TIMESTAMP() OR ab.unbandate = ab.bandate, r.id FROM account a LEFT JOIN account_access aa ON a.id = aa.id AND aa.RealmID IN (-1, ?) " "LEFT JOIN account_banned ab ON a.id = ab.id AND ab.active = 1 LEFT JOIN account r ON a.id = r.recruiter WHERE a.username = ? ORDER BY aa.RealmID DESC LIMIT 1", CONNECTION_ASYNC); PrepareStatement(LOGIN_SEL_ACCOUNT_LIST_BY_EMAIL, "SELECT id, username FROM account WHERE email = ?", CONNECTION_SYNCH); - PrepareStatement(LOGIN_SEL_NUM_CHARS_ON_REALM, "SELECT numchars FROM realmcharacters WHERE realmid = ? AND acctid= ?", CONNECTION_SYNCH); + PrepareStatement(LOGIN_SEL_REALM_CHARACTER_COUNTS, "SELECT realmid, numchars FROM realmcharacters WHERE acctid = ?", CONNECTION_ASYNC); PrepareStatement(LOGIN_SEL_ACCOUNT_BY_IP, "SELECT id, username FROM account WHERE last_ip = ?", CONNECTION_SYNCH); PrepareStatement(LOGIN_SEL_ACCOUNT_BY_ID, "SELECT 1 FROM account WHERE id = ?", CONNECTION_SYNCH); PrepareStatement(LOGIN_INS_IP_BANNED, "INSERT INTO ip_banned (ip, bandate, unbandate, bannedby, banreason) VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, ?, ?)", CONNECTION_ASYNC); diff --git a/src/server/database/Database/Implementation/LoginDatabase.h b/src/server/database/Database/Implementation/LoginDatabase.h index 69c2e758551..a3789fa2557 100644 --- a/src/server/database/Database/Implementation/LoginDatabase.h +++ b/src/server/database/Database/Implementation/LoginDatabase.h @@ -33,25 +33,22 @@ enum LoginDatabaseStatements LOGIN_DEL_EXPIRED_IP_BANS, LOGIN_UPD_EXPIRED_ACCOUNT_BANS, LOGIN_SEL_IP_INFO, - LOGIN_SEL_IP_BANNED, LOGIN_INS_IP_AUTO_BANNED, - LOGIN_SEL_ACCOUNT_BANNED, LOGIN_SEL_ACCOUNT_BANNED_ALL, LOGIN_SEL_ACCOUNT_BANNED_BY_USERNAME, LOGIN_INS_ACCOUNT_AUTO_BANNED, LOGIN_DEL_ACCOUNT_BANNED, - LOGIN_SEL_SESSIONKEY, LOGIN_UPD_VS, LOGIN_UPD_LOGONPROOF, LOGIN_SEL_LOGONCHALLENGE, + LOGIN_SEL_RECONNECTCHALLENGE, LOGIN_SEL_LOGON_COUNTRY, LOGIN_UPD_FAILEDLOGINS, - LOGIN_SEL_FAILEDLOGINS, LOGIN_SEL_ACCOUNT_ID_BY_NAME, LOGIN_SEL_ACCOUNT_LIST_BY_NAME, LOGIN_SEL_ACCOUNT_INFO_BY_NAME, LOGIN_SEL_ACCOUNT_LIST_BY_EMAIL, - LOGIN_SEL_NUM_CHARS_ON_REALM, + LOGIN_SEL_REALM_CHARACTER_COUNTS, LOGIN_SEL_ACCOUNT_BY_IP, LOGIN_INS_IP_BANNED, LOGIN_DEL_IP_NOT_BANNED, diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index c254a9124c1..352ae635878 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -133,7 +133,7 @@ void CreatureAI::MoveInLineOfSight(Unit* who) if (me->GetCreatureType() == CREATURE_TYPE_NON_COMBAT_PET) // non-combat pets should just stand there and look good;) return; - if (me->CanStartAttack(who, false)) + if (me->HasReactState(REACT_AGGRESSIVE) && me->CanStartAttack(who, false)) AttackStart(who); //else if (who->GetVictim() && me->IsFriendlyTo(who) // && me->IsWithinDistInMap(who, sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS)) @@ -350,7 +350,7 @@ int32 CreatureAI::VisualizeBoundary(uint32 duration, Unit* owner, bool fill) con return boundsWarning ? LANG_CREATURE_MOVEMENT_MAYBE_UNBOUNDED : 0; } -bool CreatureAI::CheckBoundary(Position* who) const +bool CreatureAI::CheckBoundary(Position const* who) const { if (!who) who = me; diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h index 3b7c489e018..239fda577a7 100644 --- a/src/server/game/AI/CreatureAI.h +++ b/src/server/game/AI/CreatureAI.h @@ -79,8 +79,8 @@ class CreatureAI : public UnitAI Creature* DoSummon(uint32 entry, WorldObject* obj, float radius = 5.0f, uint32 despawnTime = 30000, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN); Creature* DoSummonFlyer(uint32 entry, WorldObject* obj, float flightZ, float radius = 5.0f, uint32 despawnTime = 30000, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN); - bool CheckBoundary(Position* who = nullptr) const; - void SetBoundary(CreatureBoundary const* boundary) { _boundary = boundary; CheckInRoom(); } + bool CheckBoundary(Position const* who = nullptr) const; + void SetBoundary(CreatureBoundary const* boundary) { _boundary = boundary; me->DoImmediateBoundaryCheck(); } public: enum EvadeReason { diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index 8a1be33cc2b..2fc87347364 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -547,6 +547,29 @@ void BossAI::UpdateAI(uint32 diff) DoMeleeAttackIfReady(); } +void BossAI::_DespawnAtEvade(uint32 delayToRespawn) +{ + if (delayToRespawn < 2) + { + TC_LOG_ERROR("scripts", "_DespawnAtEvade called with delay of %u seconds, defaulting to 2.", delayToRespawn); + delayToRespawn = 2; + } + + uint32 corpseDelay = me->GetCorpseDelay(); + uint32 respawnDelay = me->GetRespawnDelay(); + + me->SetCorpseDelay(1); + me->SetRespawnDelay(delayToRespawn - 1); + + me->DespawnOrUnsummon(); + + me->SetCorpseDelay(corpseDelay); + me->SetRespawnDelay(respawnDelay); + + if(instance) + instance->SetBossState(_bossId, FAIL); +} + // WorldBossAI - for non-instanced bosses WorldBossAI::WorldBossAI(Creature* creature) : diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h index 448ddc7dc73..5452a033a17 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h @@ -360,11 +360,14 @@ class BossAI : public ScriptedAI void JustDied(Unit* /*killer*/) override { _JustDied(); } void JustReachedHome() override { _JustReachedHome(); } + bool CanAIAttack(Unit const* target) const override { return CheckBoundary(target); } + protected: void _Reset(); void _EnterCombat(); void _JustDied(); void _JustReachedHome() { me->setActive(false); } + void _DespawnAtEvade(uint32 delayToRespawn = 30); void TeleportCheaters(); diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 69a0f684a84..c08d1508774 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1998,7 +1998,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (Creature* creature = (*itr)->ToCreature()) { creature->GetMotionMaster()->Clear(); - creature->GetMotionMaster()->MoveJump(e.target.x, e.target.y, e.target.z, (float)e.action.jump.speedxy, (float)e.action.jump.speedz); + creature->GetMotionMaster()->MoveJump(e.target.x, e.target.y, e.target.z, 0.0f, (float)e.action.jump.speedxy, (float)e.action.jump.speedz); // @todo add optional jump orientation support? } } /// @todo Resume path when reached jump location @@ -2305,6 +2305,31 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u } break; } + case SMART_ACTION_RANDOM_SOUND: + { + std::vector<uint32> sounds; + std::copy_if(e.action.randomSound.sounds.begin(), e.action.randomSound.sounds.end(), + std::back_inserter(sounds), [](uint32 sound) { return sound != 0; }); + + bool onlySelf = e.action.randomSound.onlySelf != 0; + + if (ObjectList* targets = GetTargets(e, unit)) + { + for (WorldObject* const obj : *targets) + { + if (IsUnit(obj)) + { + uint32 sound = Trinity::Containers::SelectRandomContainerElement(sounds); + obj->PlayDirectSound(sound, onlySelf ? obj->ToPlayer() : nullptr); + TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_RANDOM_SOUND: target: %s (%s), sound: %u, onlyself: %s", + obj->GetName().c_str(), obj->GetGUID().ToString().c_str(), sound, onlySelf ? "true" : "false"); + } + } + + delete targets; + break; + } + } default: TC_LOG_ERROR("sql.sql", "SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Unhandled Action type %u", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); break; diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index d56983924b4..ef3357fa6ed 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -468,7 +468,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Map entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.map); return false; } - if (e.event.respawn.type == SMART_SCRIPT_RESPAWN_CONDITION_AREA && !GetAreaEntryByAreaID(e.event.respawn.area)) + if (e.event.respawn.type == SMART_SCRIPT_RESPAWN_CONDITION_AREA && !sAreaTableStore.LookupEntry(e.event.respawn.area)) { TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Area entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.area); return false; @@ -827,6 +827,21 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) if (e.action.randomEmote.emote6 && !IsEmoteValid(e, e.action.randomEmote.emote6)) return false; break; + case SMART_ACTION_RANDOM_SOUND: + { + if (std::all_of(e.action.randomSound.sounds.begin(), e.action.randomSound.sounds.end(), [](uint32 sound) { return sound == 0; })) + { + TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u does not have any non-zero sound", + e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); + return false; + } + + for (uint32 sound : e.action.randomSound.sounds) + if (sound && !IsSoundValid(e, sound)) + return false; + + break; + } case SMART_ACTION_CAST: { if (!IsSpellValid(e, e.action.cast.spell)) diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 91ee0a1d1e0..c0ea648462d 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -43,6 +43,16 @@ struct WayPoint float z; }; +enum eSmartAI +{ + SMART_EVENT_PARAM_COUNT = 4, + SMART_ACTION_PARAM_COUNT = 6, + SMART_SUMMON_COUNTER = 0xFFFFFF, + SMART_ESCORT_LAST_OOC_POINT = 0xFFFFFF, + SMART_RANDOM_POINT = 0xFFFFFE, + SMART_ESCORT_TARGETS = 0xFFFFFF +}; + enum SMART_EVENT_PHASE { SMART_EVENT_PHASE_ALWAYS = 0, @@ -540,8 +550,9 @@ enum SMART_ACTION SMART_ACTION_GAME_EVENT_START = 112, // GameEventId SMART_ACTION_START_CLOSEST_WAYPOINT = 113, // wp1, wp2, wp3, wp4, wp5, wp6, wp7 SMART_ACTION_RISE_UP = 114, // distance + SMART_ACTION_RANDOM_SOUND = 115, // soundId1, soundId2, soundId3, soundId4, soundId5, onlySelf - SMART_ACTION_END = 115 + SMART_ACTION_END = 116 }; struct SmartAction @@ -1017,6 +1028,12 @@ struct SmartAction uint32 wp6; } closestWaypointFromList; + struct + { + std::array<uint32, SMART_ACTION_PARAM_COUNT - 1> sounds; + uint32 onlySelf; + } randomSound; + //! Note for any new future actions //! All parameters must have type uint32 @@ -1180,16 +1197,6 @@ struct SmartTarget }; }; -enum eSmartAI -{ - SMART_EVENT_PARAM_COUNT = 4, - SMART_ACTION_PARAM_COUNT = 6, - SMART_SUMMON_COUNTER = 0xFFFFFF, - SMART_ESCORT_LAST_OOC_POINT = 0xFFFFFF, - SMART_RANDOM_POINT = 0xFFFFFE, - SMART_ESCORT_TARGETS = 0xFFFFFF -}; - enum SmartScriptType { SMART_SCRIPT_TYPE_CREATURE = 0, //done diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index 90e61826e35..ac8e0298a44 100644 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -156,7 +156,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) return true; } case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AREA: - if (!GetAreaEntryByAreaID(area.id)) + if (!sAreaTableStore.LookupEntry(area.id)) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AREA (%u) has wrong area id in value1 (%u), ignored.", criteria->ID, criteria->requiredType, dataType, area.id); @@ -1905,17 +1905,15 @@ bool AchievementMgr::RequirementsSatisfied(AchievementCriteriaEntry const* achie bool matchFound = false; for (int j = 0; j < MAX_WORLD_MAP_OVERLAY_AREA_IDX; ++j) { - uint32 area_id = worldOverlayEntry->areatableID[j]; - if (!area_id) // array have 0 only in empty tail + AreaTableEntry const* area = sAreaTableStore.LookupEntry(worldOverlayEntry->areatableID[j]); + if (!area) break; - int32 exploreFlag = GetAreaFlagByAreaID(area_id); - if (exploreFlag < 0) + uint32 playerIndexOffset = uint32(area->exploreFlag) / 32; + if (playerIndexOffset >= PLAYER_EXPLORED_ZONES_SIZE) continue; - uint32 playerIndexOffset = uint32(exploreFlag) / 32; - uint32 mask = 1 << (uint32(exploreFlag) % 32); - + uint32 mask = 1 << (uint32(area->exploreFlag) % 32); if (GetPlayer()->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + playerIndexOffset) & mask) { matchFound = true; diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index f3c20750069..035d9af4369 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -573,6 +573,14 @@ void AuctionHouseObject::Update() if (AuctionsMap.empty()) return; + // Clear expired throttled players + for (PlayerGetAllThrottleMap::const_iterator itr = GetAllThrottleMap.begin(); itr != GetAllThrottleMap.end();) + { + if (itr->second <= curTime) + itr = GetAllThrottleMap.erase(itr); + else + ++itr; + } SQLTransaction trans = CharacterDatabase.BeginTransaction(); @@ -648,13 +656,40 @@ void AuctionHouseObject::BuildListOwnerItems(WorldPacket& data, Player* player, void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player, std::wstring const& wsearchedname, uint32 listfrom, uint8 levelmin, uint8 levelmax, uint8 usable, uint32 inventoryType, uint32 itemClass, uint32 itemSubClass, uint32 quality, - uint32& count, uint32& totalcount) + uint32& count, uint32& totalcount, bool getall) { int loc_idx = player->GetSession()->GetSessionDbLocaleIndex(); int locdbc_idx = player->GetSession()->GetSessionDbcLocale(); time_t curTime = sWorld->GetGameTime(); + PlayerGetAllThrottleMap::const_iterator itr = GetAllThrottleMap.find(player->GetGUID()); + time_t throttleTime = itr != GetAllThrottleMap.end() ? itr->second : curTime; + + if (getall && throttleTime <= curTime) + { + for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr) + { + AuctionEntry* Aentry = itr->second; + // Skip expired auctions + if (Aentry->expire_time < curTime) + continue; + + Item* item = sAuctionMgr->GetAItem(Aentry->itemGUIDLow); + if (!item) + continue; + + ++count; + ++totalcount; + Aentry->BuildAuctionInfo(data, item); + + if (count >= MAX_GETALL_RETURN) + break; + } + GetAllThrottleMap[player->GetGUID()] = curTime + sWorld->getIntConfig(CONFIG_AUCTION_GETALL_DELAY); + return; + } + for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr) { AuctionEntry* Aentry = itr->second; @@ -744,16 +779,16 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player if (count < 50 && totalcount >= listfrom) { ++count; - Aentry->BuildAuctionInfo(data); + Aentry->BuildAuctionInfo(data, item); } ++totalcount; } } //this function inserts to WorldPacket auction's data -bool AuctionEntry::BuildAuctionInfo(WorldPacket& data) const +bool AuctionEntry::BuildAuctionInfo(WorldPacket& data, Item* sourceItem) const { - Item* item = sAuctionMgr->GetAItem(itemGUIDLow); + Item* item = (sourceItem) ? sourceItem : sAuctionMgr->GetAItem(itemGUIDLow); if (!item) { TC_LOG_ERROR("misc", "AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %u", Id, itemGUIDLow); diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.h b/src/server/game/AuctionHouse/AuctionHouseMgr.h index 4a2b79ab170..fe4b9ed07de 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.h +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.h @@ -30,6 +30,7 @@ class WorldPacket; #define MIN_AUCTION_TIME (12*HOUR) #define MAX_AUCTION_ITEMS 160 +#define MAX_GETALL_RETURN 55000 enum AuctionError { @@ -90,7 +91,7 @@ struct AuctionEntry uint8 GetHouseId() const { return houseId; } uint32 GetAuctionCut() const; uint32 GetAuctionOutBid() const; - bool BuildAuctionInfo(WorldPacket & data) const; + bool BuildAuctionInfo(WorldPacket & data, Item* sourceItem = nullptr) const; void DeleteFromDB(SQLTransaction& trans) const; void SaveToDB(SQLTransaction& trans) const; bool LoadFromDB(Field* fields); @@ -110,6 +111,7 @@ class AuctionHouseObject } typedef std::map<uint32, AuctionEntry*> AuctionEntryMap; + typedef std::unordered_map<ObjectGuid, time_t> PlayerGetAllThrottleMap; uint32 Getcount() const { return AuctionsMap.size(); } @@ -133,10 +135,15 @@ class AuctionHouseObject void BuildListAuctionItems(WorldPacket& data, Player* player, std::wstring const& searchedname, uint32 listfrom, uint8 levelmin, uint8 levelmax, uint8 usable, uint32 inventoryType, uint32 itemClass, uint32 itemSubClass, uint32 quality, - uint32& count, uint32& totalcount); + uint32& count, uint32& totalcount, bool getall = false); private: AuctionEntryMap AuctionsMap; + + // Map of throttled players for GetAll, and throttle expiry time + // Stored here, rather than player object to maintain persistence after logout + PlayerGetAllThrottleMap GetAllThrottleMap; + }; class AuctionHouseMgr diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index cff02234ab6..52e0deaf86f 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -365,7 +365,7 @@ bool BattlegroundIC::SetupBattleground() // setting correct factions for Keep Cannons for (uint8 i = BG_IC_NPC_KEEP_CANNON_1; i <= BG_IC_NPC_KEEP_CANNON_12; ++i) GetBGCreature(i)->setFaction(BG_IC_Factions[0]); - for (uint8 i = BG_IC_NPC_KEEP_CANNON_13; i <= BG_IC_NPC_KEEP_CANNON_25; ++i) + for (uint8 i = BG_IC_NPC_KEEP_CANNON_13; i <= BG_IC_NPC_KEEP_CANNON_24; ++i) GetBGCreature(i)->setFaction(BG_IC_Factions[1]); // correcting spawn time for keeps bombs diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h index 72e9990b7c1..44666819feb 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h @@ -390,7 +390,6 @@ enum BG_IC_NPCs BG_IC_NPC_KEEP_CANNON_22, BG_IC_NPC_KEEP_CANNON_23, BG_IC_NPC_KEEP_CANNON_24, - BG_IC_NPC_KEEP_CANNON_25, BG_IC_NPC_SIEGE_ENGINE_A, BG_IC_NPC_SIEGE_ENGINE_H, @@ -444,7 +443,7 @@ enum BannersTypes enum BG_IC_MaxSpawns { MAX_NORMAL_GAMEOBJECTS_SPAWNS = BG_IC_GO_DOODAD_ND_WINTERORC_WALL_GATEFX_DOOR03+1, - MAX_NORMAL_NPCS_SPAWNS = BG_IC_NPC_KEEP_CANNON_25+1, + MAX_NORMAL_NPCS_SPAWNS = BG_IC_NPC_KEEP_CANNON_24+1, MAX_WORKSHOP_SPAWNS = 10, MAX_DOCKS_SPAWNS = 12, MAX_SPIRIT_GUIDES_SPAWNS = 7, @@ -506,9 +505,8 @@ const ICNpc BG_IC_NpcSpawnlocs[MAX_NORMAL_NPCS_SPAWNS] = {BG_IC_NPC_KEEP_CANNON_20, NPC_KEEP_CANNON, TEAM_HORDE, 1137.72f, -688.517f, 88.4023f, 3.9619f}, // 30 {BG_IC_NPC_KEEP_CANNON_21, NPC_KEEP_CANNON, TEAM_HORDE, 1135.29f, -840.878f, 88.0252f, 2.30383f}, // 31 {BG_IC_NPC_KEEP_CANNON_22, NPC_KEEP_CANNON, TEAM_HORDE, 1144.33f, -833.309f, 87.9268f, 2.14675f}, // 32 - {BG_IC_NPC_KEEP_CANNON_23, NPC_KEEP_CANNON, TEAM_HORDE, 1135.29f, -840.878f, 88.0252f, 2.30383f}, // 33 - {BG_IC_NPC_KEEP_CANNON_24, NPC_KEEP_CANNON, TEAM_HORDE, 1142.59f, -691.946f, 87.9756f, 3.9619f}, // 34 - {BG_IC_NPC_KEEP_CANNON_25, NPC_KEEP_CANNON, TEAM_HORDE, 1166.13f, -858.391f, 87.9653f, 5.63741f} // 35 + {BG_IC_NPC_KEEP_CANNON_23, NPC_KEEP_CANNON, TEAM_HORDE, 1142.59f, -691.946f, 87.9756f, 3.9619f}, // 33 + {BG_IC_NPC_KEEP_CANNON_24, NPC_KEEP_CANNON, TEAM_HORDE, 1166.13f, -858.391f, 87.9653f, 5.63741f} // 34 }; const Position BG_IC_WorkshopVehicles[5] = diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp index 9ab96383ed1..1942ac9d648 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -389,6 +389,8 @@ void BattlegroundSA::PostUpdateImpl(uint32 diff) { if (TotalTime >= BG_SA_ROUNDLENGTH) { + CastSpellOnTeam(SPELL_END_OF_ROUND, ALLIANCE); + CastSpellOnTeam(SPELL_END_OF_ROUND, HORDE); RoundScores[0].winner = Attackers; RoundScores[0].time = BG_SA_ROUNDLENGTH; TotalTime = 0; @@ -401,8 +403,6 @@ void BattlegroundSA::PostUpdateImpl(uint32 diff) ToggleTimer(); ResetObjs(); GetBgMap()->UpdateAreaDependentAuras(); - CastSpellOnTeam(SPELL_END_OF_ROUND, ALLIANCE); - CastSpellOnTeam(SPELL_END_OF_ROUND, HORDE); return; } } @@ -410,6 +410,8 @@ void BattlegroundSA::PostUpdateImpl(uint32 diff) { if (TotalTime >= EndRoundTimer) { + CastSpellOnTeam(SPELL_END_OF_ROUND, ALLIANCE); + CastSpellOnTeam(SPELL_END_OF_ROUND, HORDE); RoundScores[1].time = BG_SA_ROUNDLENGTH; RoundScores[1].winner = (Attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE; if (RoundScores[0].time == RoundScores[1].time) diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index 011b68a2bb3..8fe0810f3b9 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -296,11 +296,11 @@ bool ChatHandler::ExecuteCommandInTable(std::vector<ChatCommand> const& table, c uint32 areaId = player->GetAreaId(); std::string areaName = "Unknown"; std::string zoneName = "Unknown"; - if (AreaTableEntry const* area = GetAreaEntryByAreaID(areaId)) + if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(areaId)) { int locale = GetSessionDbcLocale(); areaName = area->area_name[locale]; - if (AreaTableEntry const* zone = GetAreaEntryByAreaID(area->zone)) + if (AreaTableEntry const* zone = sAreaTableStore.LookupEntry(area->zone)) zoneName = zone->area_name[locale]; } diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index d5367e919a3..4215a3a5d02 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -1708,7 +1708,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) const } case CONDITION_ZONEID: { - AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(cond->ConditionValue1); + AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(cond->ConditionValue1); if (!areaEntry) { TC_LOG_ERROR("sql.sql", "%s Area (%u) does not exist, skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 5f1de673294..6c51c71fe7b 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -51,11 +51,9 @@ struct WMOAreaTableTripple typedef std::map<WMOAreaTableTripple, WMOAreaTableEntry const*> WMOAreaInfoByTripple; typedef std::multimap<uint32, CharSectionsEntry const*> CharSectionsMap; -DBCStorage <AreaTableEntry> sAreaStore(AreaTableEntryfmt); +DBCStorage <AreaTableEntry> sAreaTableStore(AreaTableEntryfmt); DBCStorage <AreaGroupEntry> sAreaGroupStore(AreaGroupEntryfmt); DBCStorage <AreaPOIEntry> sAreaPOIStore(AreaPOIEntryfmt); -static AreaFlagByAreaID sAreaFlagByAreaID; -static AreaFlagByMapID sAreaFlagByMapID; // for instances without generated *.map files static WMOAreaInfoByTripple sWMOAreaInfoByTripple; @@ -91,6 +89,9 @@ DBCStorage <DurabilityCostsEntry> sDurabilityCostsStore(DurabilityCostsfmt); DBCStorage <EmotesEntry> sEmotesStore(EmotesEntryfmt); DBCStorage <EmotesTextEntry> sEmotesTextStore(EmotesTextEntryfmt); +typedef std::tuple<uint32, uint32, uint32> EmotesTextSoundKey; +static std::map<EmotesTextSoundKey, EmotesTextSoundEntry const*> sEmotesTextSoundMap; +DBCStorage <EmotesTextSoundEntry> sEmotesTextSoundStore(EmotesTextSoundEntryfmt); typedef std::map<uint32, SimpleFactionsList> FactionTeamMap; static FactionTeamMap sFactionTeamMap; @@ -283,21 +284,7 @@ void LoadDBCStores(const std::string& dataPath) StoreProblemList bad_dbc_files; uint32 availableDbcLocales = 0xFFFFFFFF; - LoadDBC(availableDbcLocales, bad_dbc_files, sAreaStore, dbcPath, "AreaTable.dbc"); - - // must be after sAreaStore loading - for (uint32 i = 0; i < sAreaStore.GetNumRows(); ++i) // areaflag numbered from 0 - { - if (AreaTableEntry const* area = sAreaStore.LookupEntry(i)) - { - // fill AreaId->DBC records - sAreaFlagByAreaID.insert(AreaFlagByAreaID::value_type(uint16(area->ID), area->exploreFlag)); - - // fill MapId->DBC records (skip sub zones and continents) - if (area->zone == 0 && area->mapid != 0 && area->mapid != 1 && area->mapid != 530 && area->mapid != 571) - sAreaFlagByMapID.insert(AreaFlagByMapID::value_type(area->mapid, area->exploreFlag)); - } - } + LoadDBC(availableDbcLocales, bad_dbc_files, sAreaTableStore, dbcPath, "AreaTable.dbc"); LoadDBC(availableDbcLocales, bad_dbc_files, sAchievementStore, dbcPath, "Achievement.dbc", &CustomAchievementfmt, &CustomAchievementIndex); LoadDBC(availableDbcLocales, bad_dbc_files, sAchievementCriteriaStore, dbcPath, "Achievement_Criteria.dbc"); @@ -338,6 +325,10 @@ void LoadDBCStores(const std::string& dataPath) LoadDBC(availableDbcLocales, bad_dbc_files, sDurabilityQualityStore, dbcPath, "DurabilityQuality.dbc"); LoadDBC(availableDbcLocales, bad_dbc_files, sEmotesStore, dbcPath, "Emotes.dbc"); LoadDBC(availableDbcLocales, bad_dbc_files, sEmotesTextStore, dbcPath, "EmotesText.dbc"); + LoadDBC(availableDbcLocales, bad_dbc_files, sEmotesTextSoundStore, dbcPath, "EmotesTextSound.dbc"); + for (uint32 i = 0; i < sEmotesTextSoundStore.GetNumRows(); ++i) + if (EmotesTextSoundEntry const* entry = sEmotesTextSoundStore.LookupEntry(i)) + sEmotesTextSoundMap[EmotesTextSoundKey(entry->EmotesTextId, entry->RaceId, entry->SexId)] = entry; LoadDBC(availableDbcLocales, bad_dbc_files, sFactionStore, dbcPath, "Faction.dbc"); for (uint32 i=0; i<sFactionStore.GetNumRows(); ++i) { @@ -714,7 +705,7 @@ void LoadDBCStores(const std::string& dataPath) } // Check loaded DBC files proper version - if (!sAreaStore.LookupEntry(3617) || // last area (areaflag) added in 3.3.5a + if (!sAreaTableStore.LookupEntry(4987) || // last area added in 3.3.5a !sCharTitlesStore.LookupEntry(177) || // last char title added in 3.3.5a !sGemPropertiesStore.LookupEntry(1629) || // last added spell in 3.3.5a !sItemStore.LookupEntry(56806) || // last gem property added in 3.3.5a @@ -766,41 +757,13 @@ uint32 GetTalentSpellCost(uint32 spellId) return 0; } -int32 GetAreaFlagByAreaID(uint32 area_id) -{ - AreaFlagByAreaID::iterator i = sAreaFlagByAreaID.find(area_id); - if (i == sAreaFlagByAreaID.end()) - return -1; - - return i->second; -} WMOAreaTableEntry const* GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid, int32 groupid) { WMOAreaInfoByTripple::iterator i = sWMOAreaInfoByTripple.find(WMOAreaTableTripple(rootid, adtid, groupid)); - if (i == sWMOAreaInfoByTripple.end()) - return NULL; - return i->second; -} - -AreaTableEntry const* GetAreaEntryByAreaID(uint32 area_id) -{ - int32 areaflag = GetAreaFlagByAreaID(area_id); - if (areaflag < 0) + if (i == sWMOAreaInfoByTripple.end()) return NULL; - - return sAreaStore.LookupEntry(areaflag); -} - -AreaTableEntry const* GetAreaEntryByAreaFlagAndMap(uint32 area_flag, uint32 map_id) -{ - if (area_flag) - return sAreaStore.LookupEntry(area_flag); - - if (MapEntry const* mapEntry = sMapStore.LookupEntry(map_id)) - return GetAreaEntryByAreaID(mapEntry->linked_zone); - - return NULL; + return i->second; } char const* GetRaceName(uint8 race, uint8 locale) @@ -815,15 +778,6 @@ char const* GetClassName(uint8 class_, uint8 locale) return classEntry ? classEntry->name[locale] : NULL; } -uint32 GetAreaFlagByMapId(uint32 mapid) -{ - AreaFlagByMapID::iterator i = sAreaFlagByMapID.find(mapid); - if (i == sAreaFlagByMapID.end()) - return 0; - else - return i->second; -} - uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId) { if (mapid != 530 && mapid != 571) // speed for most cases @@ -1060,3 +1014,8 @@ ResponseCodes ValidateName(std::string const& name, LocaleConstant locale) return CHAR_NAME_SUCCESS; } + +EmotesTextSoundEntry const* FindTextSoundEmoteFor(uint32 emote, uint32 race, uint32 gender) +{ + return sEmotesTextSoundMap[EmotesTextSoundKey(emote, race, gender)]; +} diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index 41a97382b0b..56ee1f618dd 100644 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -33,11 +33,6 @@ char* GetPetName(uint32 petfamily, uint32 dbclang); uint32 GetTalentSpellCost(uint32 spellId); TalentSpellPos const* GetTalentSpellPos(uint32 spellId); -int32 GetAreaFlagByAreaID(uint32 area_id); // -1 if not found -AreaTableEntry const* GetAreaEntryByAreaID(uint32 area_id); -AreaTableEntry const* GetAreaEntryByAreaFlagAndMap(uint32 area_flag, uint32 map_id); -uint32 GetAreaFlagByMapId(uint32 mapid); - char const* GetRaceName(uint8 race, uint8 locale); char const* GetClassName(uint8 class_, uint8 locale); @@ -82,9 +77,11 @@ SkillRaceClassInfoEntry const* GetSkillRaceClassInfo(uint32 skill, uint8 race, u ResponseCodes ValidateName(std::string const& name, LocaleConstant locale); +EmotesTextSoundEntry const* FindTextSoundEmoteFor(uint32 emote, uint32 race, uint32 gender); + extern DBCStorage <AchievementEntry> sAchievementStore; extern DBCStorage <AchievementCriteriaEntry> sAchievementCriteriaStore; -extern DBCStorage <AreaTableEntry> sAreaStore;// recommend access using functions +extern DBCStorage <AreaTableEntry> sAreaTableStore; extern DBCStorage <AreaGroupEntry> sAreaGroupStore; extern DBCStorage <AreaPOIEntry> sAreaPOIStore; extern DBCStorage <AreaTriggerEntry> sAreaTriggerStore; @@ -113,6 +110,7 @@ extern DBCStorage <DurabilityCostsEntry> sDurabilityCostsStore; extern DBCStorage <DurabilityQualityEntry> sDurabilityQualityStore; extern DBCStorage <EmotesEntry> sEmotesStore; extern DBCStorage <EmotesTextEntry> sEmotesTextStore; +extern DBCStorage <EmotesTextSoundEntry> sEmotesTextSoundStore; extern DBCStorage <FactionEntry> sFactionStore; extern DBCStorage <FactionTemplateEntry> sFactionTemplateStore; extern DBCStorage <GameObjectDisplayInfoEntry> sGameObjectDisplayInfoStore; diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index d1794a0ea90..b5dc4489148 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -509,7 +509,7 @@ struct AreaTableEntry uint32 ID; // 0 uint32 mapid; // 1 uint32 zone; // 2 if 0 then it's zone, else it's zone id of this area - uint32 exploreFlag; // 3, main index + uint32 exploreFlag; // 3 uint32 flags; // 4, unknown value but 312 for all cities // 5-9 unused int32 area_level; // 10 @@ -926,6 +926,15 @@ struct EmotesTextEntry uint32 textid; }; +struct EmotesTextSoundEntry +{ + uint32 Id; // 0 + uint32 EmotesTextId; // 1 + uint32 RaceId; // 2 + uint32 SexId; // 3, 0 male / 1 female + uint32 SoundId; // 4 +}; + struct FactionEntry { uint32 ID; // 0 m_ID diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index aade6d91d61..c61ec997bc2 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -23,7 +23,7 @@ char const Achievementfmt[] = "niixssssssssssssssssxxxxxxxxxxxxxxxxxxiixixxxxxxx const std::string CustomAchievementfmt = "pppaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaapapaaaaaaaaaaaaaaaaaapp"; const std::string CustomAchievementIndex = "ID"; char const AchievementCriteriafmt[] = "niiiiiiiixxxxxxxxxxxxxxxxxiiiix"; -char const AreaTableEntryfmt[] = "iiinixxxxxissssssssssssssssxiiiiixxx"; +char const AreaTableEntryfmt[] = "niiiixxxxxissssssssssssssssxiiiiixxx"; char const AreaGroupEntryfmt[] = "niiiiiii"; char const AreaPOIEntryfmt[] = "niiiiiiiiiiifffixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxix"; char const AreaTriggerEntryfmt[] = "niffffffff"; @@ -52,6 +52,7 @@ char const DurabilityCostsfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiii"; char const DurabilityQualityfmt[] = "nf"; char const EmotesEntryfmt[] = "nxxiiix"; char const EmotesTextEntryfmt[] = "nxixxxxxxxxxxxxxxxx"; +char const EmotesTextSoundEntryfmt[] = "niiii"; char const FactionEntryfmt[] = "niiiiiiiiiiiiiiiiiiffixssssssssssssssssxxxxxxxxxxxxxxxxxx"; char const FactionTemplateEntryfmt[] = "niiiiiiiiiiiii"; char const GameObjectDisplayInfofmt[] = "nsxxxxxxxxxxffffffx"; diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 3e67f709816..5d62b740947 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -369,13 +369,13 @@ bool Creature::InitEntry(uint32 entry, CreatureData const* data /*= nullptr*/) SetByteValue(UNIT_FIELD_BYTES_0, 2, minfo->gender); // Load creature equipment - if (!data || data->equipmentId == 0) - LoadEquipment(); // use default equipment (if available) - else if (data && data->equipmentId != 0) // override, 0 means no equipment + if (data && data->equipmentId != 0) { m_originalEquipmentId = data->equipmentId; LoadEquipment(data->equipmentId); } + else + LoadEquipment(0, true); SetName(normalInfo->Name); // at normal entry always @@ -905,6 +905,12 @@ bool Creature::Create(ObjectGuid::LowType guidlow, Map* map, uint32 phaseMask, u if (GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING) AddUnitState(UNIT_STATE_IGNORE_PATHFINDING); + if (GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK) + { + ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true); + ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK_DEST, true); + } + return true; } @@ -1292,8 +1298,38 @@ bool Creature::CreateFromProto(ObjectGuid::LowType guidlow, uint32 entry, Creatu return true; } -bool Creature::LoadCreatureFromDB(ObjectGuid::LowType spawnId, Map* map, bool addToMap) +bool Creature::LoadCreatureFromDB(ObjectGuid::LowType spawnId, Map* map, bool addToMap, bool allowDuplicate) { + if (!allowDuplicate) + { + // If an alive instance of this spawnId is already found, skip creation + // If only dead instance(s) exist, despawn them and spawn a new (maybe also dead) version + const auto creatureBounds = map->GetCreatureBySpawnIdStore().equal_range(spawnId); + std::vector <Creature*> despawnList; + + if (creatureBounds.first != creatureBounds.second) + { + for (auto itr = creatureBounds.first; itr != creatureBounds.second; ++itr) + { + if (itr->second->IsAlive()) + { + TC_LOG_DEBUG("maps", "Would have spawned %u but %s already exists", spawnId, creatureBounds.first->second->GetGUID().ToString().c_str()); + return false; + } + else + { + despawnList.push_back(itr->second); + TC_LOG_DEBUG("maps", "Despawned dead instance of spawn %u (%s)", spawnId, itr->second->GetGUID().ToString().c_str()); + } + } + + for (Creature* despawnCreature : despawnList) + { + despawnCreature->AddObjectToRemoveList(); + } + } + } + CreatureData const* data = sObjectMgr->GetCreatureData(spawnId); if (!data) @@ -1373,6 +1409,7 @@ void Creature::LoadEquipment(int8 id, bool force /*= true*/) SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + i, 0); m_equipmentId = 0; } + return; } @@ -1381,7 +1418,7 @@ void Creature::LoadEquipment(int8 id, bool force /*= true*/) return; m_equipmentId = id; - for (uint8 i = 0; i < 3; ++i) + for (uint8 i = 0; i < MAX_EQUIPMENT_ITEMS; ++i) SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + i, einfo->ItemEntry[i]); } @@ -1604,13 +1641,29 @@ void Creature::setDeathState(DeathState s) UpdateMovementFlags(); - CreatureTemplate const* cinfo = GetCreatureTemplate(); - SetUInt32Value(UNIT_NPC_FLAGS, cinfo->npcflag); ClearUnitState(uint32(UNIT_STATE_ALL_STATE & ~UNIT_STATE_IGNORE_PATHFINDING)); - SetMeleeDamageSchool(SpellSchools(cinfo->dmgschool)); + + if (!IsPet()) + { + CreatureData const* creatureData = GetCreatureData(); + CreatureTemplate const* cinfo = GetCreatureTemplate(); + + uint32 npcflag, unit_flags, dynamicflags; + ObjectMgr::ChooseCreatureFlags(cinfo, npcflag, unit_flags, dynamicflags, creatureData); + + SetUInt32Value(UNIT_NPC_FLAGS, npcflag); + SetUInt32Value(UNIT_FIELD_FLAGS, unit_flags); + SetUInt32Value(UNIT_DYNAMIC_FLAGS, dynamicflags); + + RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); + + SetMeleeDamageSchool(SpellSchools(cinfo->dmgschool)); + + if (creatureData && GetPhaseMask() != creatureData->phaseMask) + SetPhaseMask(creatureData->phaseMask, false); + } + Motion_Initialize(); - if (GetCreatureData() && GetPhaseMask() != GetCreatureData()->phaseMask) - SetPhaseMask(GetCreatureData()->phaseMask, false); Unit::setDeathState(ALIVE); LoadCreaturesAddon(); } @@ -2096,6 +2149,11 @@ bool Creature::CanCreatureAttack(Unit const* victim, bool /*force*/) const if (GetMap()->IsDungeon()) return true; + // if the mob is actively being damaged, do not reset due to distance unless it's a world boss + if (!isWorldBoss()) + if (time(NULL) - GetLastDamagedTime() <= MAX_AGGRO_RESET_TIME) + return true; + //Use AttackDistance in distance check if threat radius is lower. This prevents creature bounce in and out of combat every update tick. float dist = std::max(GetAttackDistance(victim), sWorld->getFloatConfig(CONFIG_THREAT_RADIUS)) + m_CombatDistance; @@ -2739,7 +2797,7 @@ bool Creature::FocusTarget(Spell const* focusSpell, WorldObject const* target) } } if (shouldDelay) - shouldDelay = (!focusSpell->IsTriggered() && !focusSpell->GetCastTime()); + shouldDelay = !(focusSpell->IsTriggered() || focusSpell->GetCastTime() || focusSpell->GetSpellInfo()->IsChanneled()); } } diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index b0318ed33e2..49bd854ef2f 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -39,23 +39,25 @@ class WorldSession; enum CreatureFlagsExtra { - CREATURE_FLAG_EXTRA_INSTANCE_BIND = 0x00000001, // creature kill bind instance with killer and killer's group - CREATURE_FLAG_EXTRA_CIVILIAN = 0x00000002, // not aggro (ignore faction/reputation hostility) - CREATURE_FLAG_EXTRA_NO_PARRY = 0x00000004, // creature can't parry - CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN = 0x00000008, // creature can't counter-attack at parry - CREATURE_FLAG_EXTRA_NO_BLOCK = 0x00000010, // creature can't block - CREATURE_FLAG_EXTRA_NO_CRUSH = 0x00000020, // creature can't do crush attacks - CREATURE_FLAG_EXTRA_NO_XP_AT_KILL = 0x00000040, // creature kill not provide XP - CREATURE_FLAG_EXTRA_TRIGGER = 0x00000080, // trigger creature - CREATURE_FLAG_EXTRA_NO_TAUNT = 0x00000100, // creature is immune to taunt auras and effect attack me - CREATURE_FLAG_EXTRA_WORLDEVENT = 0x00004000, // custom flag for world event creatures (left room for merging) - CREATURE_FLAG_EXTRA_GUARD = 0x00008000, // Creature is guard - CREATURE_FLAG_EXTRA_NO_CRIT = 0x00020000, // creature can't do critical strikes - CREATURE_FLAG_EXTRA_NO_SKILLGAIN = 0x00040000, // creature won't increase weapon skills - CREATURE_FLAG_EXTRA_TAUNT_DIMINISH = 0x00080000, // Taunt is a subject to diminishing returns on this creautre - CREATURE_FLAG_EXTRA_ALL_DIMINISH = 0x00100000, // Creature is subject to all diminishing returns as player are - CREATURE_FLAG_EXTRA_DUNGEON_BOSS = 0x10000000, // creature is a dungeon boss (SET DYNAMICALLY, DO NOT ADD IN DB) - CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING = 0x20000000 // creature ignore pathfinding + CREATURE_FLAG_EXTRA_INSTANCE_BIND = 0x00000001, // creature kill bind instance with killer and killer's group + CREATURE_FLAG_EXTRA_CIVILIAN = 0x00000002, // not aggro (ignore faction/reputation hostility) + CREATURE_FLAG_EXTRA_NO_PARRY = 0x00000004, // creature can't parry + CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN = 0x00000008, // creature can't counter-attack at parry + CREATURE_FLAG_EXTRA_NO_BLOCK = 0x00000010, // creature can't block + CREATURE_FLAG_EXTRA_NO_CRUSH = 0x00000020, // creature can't do crush attacks + CREATURE_FLAG_EXTRA_NO_XP_AT_KILL = 0x00000040, // creature kill not provide XP + CREATURE_FLAG_EXTRA_TRIGGER = 0x00000080, // trigger creature + CREATURE_FLAG_EXTRA_NO_TAUNT = 0x00000100, // creature is immune to taunt auras and effect attack me + CREATURE_FLAG_EXTRA_WORLDEVENT = 0x00004000, // custom flag for world event creatures (left room for merging) + CREATURE_FLAG_EXTRA_GUARD = 0x00008000, // Creature is guard + CREATURE_FLAG_EXTRA_NO_CRIT = 0x00020000, // creature can't do critical strikes + CREATURE_FLAG_EXTRA_NO_SKILLGAIN = 0x00040000, // creature won't increase weapon skills + CREATURE_FLAG_EXTRA_TAUNT_DIMINISH = 0x00080000, // Taunt is a subject to diminishing returns on this creautre + CREATURE_FLAG_EXTRA_ALL_DIMINISH = 0x00100000, // creature is subject to all diminishing returns as player are + CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ = 0x00200000, // creature does not need to take player damage for kill credit + CREATURE_FLAG_EXTRA_DUNGEON_BOSS = 0x10000000, // creature is a dungeon boss (SET DYNAMICALLY, DO NOT ADD IN DB) + CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING = 0x20000000, // creature ignore pathfinding + CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK = 0x40000000 // creature is immune to knockback effects }; #define CREATURE_FLAG_EXTRA_DB_ALLOWED (CREATURE_FLAG_EXTRA_INSTANCE_BIND | CREATURE_FLAG_EXTRA_CIVILIAN | \ @@ -63,7 +65,7 @@ enum CreatureFlagsExtra CREATURE_FLAG_EXTRA_NO_CRUSH | CREATURE_FLAG_EXTRA_NO_XP_AT_KILL | CREATURE_FLAG_EXTRA_TRIGGER | \ CREATURE_FLAG_EXTRA_NO_TAUNT | CREATURE_FLAG_EXTRA_WORLDEVENT | CREATURE_FLAG_EXTRA_NO_CRIT | \ CREATURE_FLAG_EXTRA_NO_SKILLGAIN | CREATURE_FLAG_EXTRA_TAUNT_DIMINISH | CREATURE_FLAG_EXTRA_ALL_DIMINISH | \ - CREATURE_FLAG_EXTRA_GUARD | CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING) + CREATURE_FLAG_EXTRA_GUARD | CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING | CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ | CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK) #define CREATURE_REGEN_INTERVAL 2 * IN_MILLISECONDS @@ -534,7 +536,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject void setDeathState(DeathState s) override; // override virtual Unit::setDeathState bool LoadFromDB(ObjectGuid::LowType spawnId, Map* map) { return LoadCreatureFromDB(spawnId, map, false); } - bool LoadCreatureFromDB(ObjectGuid::LowType spawnId, Map* map, bool addToMap = true); + bool LoadCreatureFromDB(ObjectGuid::LowType spawnId, Map* map, bool addToMap = true, bool allowDuplicate = false); void SaveToDB(); // overriden in Pet virtual void SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask); @@ -605,6 +607,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject float GetRespawnRadius() const { return m_respawnradius; } void SetRespawnRadius(float dist) { m_respawnradius = dist; } + void DoImmediateBoundaryCheck() { m_boundaryCheckTime = 0; } uint32 GetCombatPulseDelay() const { return m_combatPulseDelay; } void SetCombatPulseDelay(uint32 delay) // (secs) interval at which the creature pulses the entire zone into combat (only works in dungeons) { @@ -655,7 +658,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject void SetDisableReputationGain(bool disable) { DisableReputationGain = disable; } bool IsReputationGainDisabled() const { return DisableReputationGain; } - bool IsDamageEnoughForLootingAndReward() const { return m_PlayerDamageReq == 0; } + bool IsDamageEnoughForLootingAndReward() const { return (m_creatureInfo->flags_extra & CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ) || (m_PlayerDamageReq == 0); } void LowerPlayerDamageReq(uint32 unDamage); void ResetPlayerDamageReq() { m_PlayerDamageReq = GetHealth() / 2; } uint32 m_PlayerDamageReq; diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 6f0b9f89e44..1acfeacbf83 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -1353,7 +1353,15 @@ void GameObject::Use(Unit* user) break; } - player->KillCreditGO(info->entry, GetGUID()); + if (Group* group = player->GetGroup()) + { + for (GroupReference const* itr = group->GetFirstMember(); itr != nullptr; itr = itr->next()) + if (Player* member = itr->GetSource()) + if (member->IsAtGroupRewardDistance(this)) + member->KillCreditGO(info->entry, GetGUID()); + } + else + player->KillCreditGO(info->entry, GetGUID()); } if (uint32 trapEntry = info->goober.linkedTrapId) @@ -1391,7 +1399,10 @@ void GameObject::Use(Unit* user) player->SendCinematicStart(info->camera.cinematicId); if (info->camera.eventID) + { GetMap()->ScriptsStart(sEventScripts, info->camera.eventID, player, this); + EventInform(info->camera.eventID, user); + } return; } diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 95e76a25763..464c3125ce4 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -2406,7 +2406,7 @@ bool Player::CanInteractWithQuestGiver(Object* questGiver) return false; } -Creature* Player::GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask) +Creature* Player::GetNPCIfCanInteractWith(ObjectGuid const& guid, uint32 npcflagmask) { // unit checks if (!guid) @@ -2450,7 +2450,21 @@ Creature* Player::GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask) return creature; } -GameObject* Player::GetGameObjectIfCanInteractWith(ObjectGuid guid, GameobjectTypes type) const +GameObject* Player::GetGameObjectIfCanInteractWith(ObjectGuid const& guid) const +{ + if (GameObject* go = GetMap()->GetGameObject(guid)) + { + if (go->IsWithinDistInMap(this, go->GetInteractionDistance())) + return go; + + TC_LOG_DEBUG("maps", "GetGameObjectIfCanInteractWith: GameObject '%s' [GUID: %u] is too far away from player %s [GUID: %u] to be used by him (distance=%f, maximal %f is allowed)", go->GetGOInfo()->name.c_str(), + go->GetGUID().GetCounter(), GetName().c_str(), GetGUID().GetCounter(), go->GetDistance(this), go->GetInteractionDistance()); + } + + return nullptr; +} + +GameObject* Player::GetGameObjectIfCanInteractWith(ObjectGuid const& guid, GameobjectTypes type) const { if (GameObject* go = GetMap()->GetGameObject(guid)) { @@ -2459,12 +2473,12 @@ GameObject* Player::GetGameObjectIfCanInteractWith(ObjectGuid guid, GameobjectTy if (go->IsWithinDistInMap(this, go->GetInteractionDistance())) return go; - TC_LOG_DEBUG("maps", "GetGameObjectIfCanInteractWith: GameObject '%s' [GUID: %u] is too far away from player %s [GUID: %u] to be used by him (distance=%f, maximal 10 is allowed)", go->GetGOInfo()->name.c_str(), - go->GetGUID().GetCounter(), GetName().c_str(), GetGUID().GetCounter(), go->GetDistance(this)); + TC_LOG_DEBUG("maps", "GetGameObjectIfCanInteractWith: GameObject '%s' [GUID: %u] is too far away from player %s [GUID: %u] to be used by him (distance=%f, maximal %f is allowed)", go->GetGOInfo()->name.c_str(), + go->GetGUID().GetCounter(), GetName().c_str(), GetGUID().GetCounter(), go->GetDistance(this), go->GetInteractionDistance()); } } - return NULL; + return nullptr; } bool Player::IsUnderWater() const @@ -4668,6 +4682,7 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness) // remove death flag + set aura SetByteValue(UNIT_FIELD_BYTES_1, 3, 0x00); + RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_IS_OUT_OF_BOUNDS); // This must be called always even on Players with race != RACE_NIGHTELF in case of faction change RemoveAurasDueToSpell(20584); // RACE_NIGHTELF speed bonuses @@ -5088,10 +5103,10 @@ void Player::RepopAtGraveyard() // note: this can be called also when the player is alive // for example from WorldSession::HandleMovementOpcodes - AreaTableEntry const* zone = GetAreaEntryByAreaID(GetAreaId()); + AreaTableEntry const* zone = sAreaTableStore.LookupEntry(GetAreaId()); // Such zones are considered unreachable as a ghost and the player must be automatically revived - if ((!IsAlive() && zone && zone->flags & AREA_FLAG_NEED_FLY) || GetTransport() || GetPositionZ() < -500.0f) + if ((!IsAlive() && zone && zone->flags & AREA_FLAG_NEED_FLY) || GetTransport() || GetPositionZ() < GetMap()->GetMinHeight(GetPositionX(), GetPositionY())) { ResurrectPlayer(0.5f); SpawnCorpseBones(); @@ -5128,8 +5143,10 @@ void Player::RepopAtGraveyard() GetSession()->SendPacket(&data); } } - else if (GetPositionZ() < -500.0f) + else if (GetPositionZ() < GetMap()->GetMinHeight(GetPositionX(), GetPositionY())) TeleportTo(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ, GetOrientation()); + + RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_IS_OUT_OF_BOUNDS); } bool Player::CanJoinConstantChannelInZone(ChatChannelsEntry const* channel, AreaTableEntry const* zone) @@ -5174,7 +5191,7 @@ void Player::UpdateLocalChannels(uint32 newZone) if (GetSession()->PlayerLoading() && !IsBeingTeleportedFar()) return; // The client handles it automatically after loading, but not after teleporting - AreaTableEntry const* current_zone = GetAreaEntryByAreaID(newZone); + AreaTableEntry const* current_zone = sAreaTableStore.LookupEntry(newZone); if (!current_zone) return; @@ -6415,22 +6432,32 @@ void Player::CheckAreaExploreAndOutdoor() return; bool isOutdoor; - uint16 areaFlag = GetBaseMap()->GetAreaFlag(GetPositionX(), GetPositionY(), GetPositionZ(), &isOutdoor); + uint32 areaId = GetBaseMap()->GetAreaId(GetPositionX(), GetPositionY(), GetPositionZ(), &isOutdoor); + AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(areaId); if (sWorld->getBoolConfig(CONFIG_VMAP_INDOOR_CHECK) && !isOutdoor) RemoveAurasWithAttribute(SPELL_ATTR0_OUTDOORS_ONLY); - if (areaFlag == 0xffff) + if (!areaId) + return; + + if (!areaEntry) + { + TC_LOG_ERROR("entities.player", "Player '%s' (%s) discovered unknown area (x: %f y: %f z: %f map: %u)", + GetName().c_str(), GetGUID().ToString().c_str(), GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId()); return; - int offset = areaFlag / 32; + } + + uint32 offset = areaEntry->exploreFlag / 32; if (offset >= PLAYER_EXPLORED_ZONES_SIZE) { - TC_LOG_ERROR("entities.player", "Wrong area flag %u in map data for (X: %f Y: %f) point to field PLAYER_EXPLORED_ZONES_1 + %u ( %u must be < %u ).", areaFlag, GetPositionX(), GetPositionY(), offset, offset, PLAYER_EXPLORED_ZONES_SIZE); + TC_LOG_ERROR("entities.player", "Player::CheckAreaExploreAndOutdoor: Wrong area flag %u in map data for (X: %f Y: %f) point to field PLAYER_EXPLORED_ZONES_1 + %u ( %u must be < %u ).", + areaEntry->exploreFlag, GetPositionX(), GetPositionY(), offset, offset, PLAYER_EXPLORED_ZONES_SIZE); return; } - uint32 val = (uint32)(1 << (areaFlag % 32)); + uint32 val = (uint32)(1 << (areaEntry->exploreFlag % 32)); uint32 currFields = GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset); if (!(currFields & val)) @@ -6439,19 +6466,11 @@ void Player::CheckAreaExploreAndOutdoor() UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EXPLORE_AREA); - AreaTableEntry const* areaEntry = GetAreaEntryByAreaFlagAndMap(areaFlag, GetMapId()); - if (!areaEntry) - { - TC_LOG_ERROR("entities.player", "Player %u discovered unknown area (x: %f y: %f z: %f map: %u", GetGUID().GetCounter(), GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId()); - return; - } - if (areaEntry->area_level > 0) { - uint32 area = areaEntry->ID; if (getLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) { - SendExplorationExperience(area, 0); + SendExplorationExperience(areaId, 0); } else { @@ -6475,9 +6494,9 @@ void Player::CheckAreaExploreAndOutdoor() } GiveXP(XP, NULL); - SendExplorationExperience(area, XP); + SendExplorationExperience(areaId, XP); } - TC_LOG_DEBUG("entities.player", "Player %u discovered a new area: %u", GetGUID().GetCounter(), area); + TC_LOG_DEBUG("entities.player", "Player '%s' (%s) discovered a new area: %u", GetName().c_str(),GetGUID().ToString().c_str(), areaId); } } } @@ -7047,7 +7066,7 @@ void Player::UpdateArea(uint32 newArea) // so apply them accordingly m_areaUpdateId = newArea; - AreaTableEntry const* area = GetAreaEntryByAreaID(newArea); + AreaTableEntry const* area = sAreaTableStore.LookupEntry(newArea); pvpInfo.IsInFFAPvPArea = area && (area->flags & AREA_FLAG_ARENA); UpdatePvPState(true); @@ -7095,7 +7114,7 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea) // zone changed, so area changed as well, update it UpdateArea(newArea); - AreaTableEntry const* zone = GetAreaEntryByAreaID(newZone); + AreaTableEntry const* zone = sAreaTableStore.LookupEntry(newZone); if (!zone) return; @@ -15456,7 +15475,7 @@ bool Player::SatisfyQuestDay(Quest const* qInfo, bool msg) if (qInfo->IsDFQuest()) { - if (!m_DFQuests.empty()) + if (m_DFQuests.find(qInfo->GetQuestId()) != m_DFQuests.end()) return false; return true; @@ -18356,8 +18375,9 @@ void Player::_LoadBoundInstances(PreparedQueryResult result) uint32 mapId = fields[2].GetUInt16(); uint32 instanceId = fields[0].GetUInt32(); uint8 difficulty = fields[3].GetUInt8(); + BindExtensionState extendState = BindExtensionState(fields[4].GetUInt8()); - time_t resetTime = time_t(fields[4].GetUInt32()); + time_t resetTime = time_t(fields[5].GetUInt32()); // the resettime for normal instances is only saved when the InstanceSave is unloaded // so the value read from the DB may be wrong here but only if the InstanceSave is loaded // and in that case it is not used @@ -18406,13 +18426,13 @@ void Player::_LoadBoundInstances(PreparedQueryResult result) // since non permanent binds are always solo bind, they can always be reset if (InstanceSave* save = sInstanceSaveMgr->AddInstanceSave(mapId, instanceId, Difficulty(difficulty), resetTime, !perm, true)) - BindToInstance(save, perm, true); + BindToInstance(save, perm, extendState, true); } while (result->NextRow()); } } -InstancePlayerBind* Player::GetBoundInstance(uint32 mapid, Difficulty difficulty) +InstancePlayerBind* Player::GetBoundInstance(uint32 mapid, Difficulty difficulty, bool withExpired) { // some instances only have one difficulty MapDifficulty const* mapDiff = GetDownscaledMapDifficultyData(mapid, difficulty); @@ -18421,9 +18441,9 @@ InstancePlayerBind* Player::GetBoundInstance(uint32 mapid, Difficulty difficulty BoundInstancesMap::iterator itr = m_boundInstances[difficulty].find(mapid); if (itr != m_boundInstances[difficulty].end()) - return &itr->second; - else - return NULL; + if (itr->second.extendState || withExpired) + return &itr->second; + return nullptr; } InstanceSave* Player::GetInstanceSave(uint32 mapid, bool raid) @@ -18466,24 +18486,32 @@ void Player::UnbindInstance(BoundInstancesMap::iterator &itr, Difficulty difficu } } -InstancePlayerBind* Player::BindToInstance(InstanceSave* save, bool permanent, bool load) +InstancePlayerBind* Player::BindToInstance(InstanceSave* save, bool permanent, BindExtensionState extendState, bool load) { if (save) { InstancePlayerBind& bind = m_boundInstances[save->GetDifficulty()][save->GetMapId()]; + if (extendState == EXTEND_STATE_KEEP) // special flag, keep the player's current extend state when updating for new boss down + { + if (save == bind.save) + extendState = bind.extendState; + else + extendState = EXTEND_STATE_NORMAL; + } if (!load) { if (bind.save) { // update the save when the group kills a boss - if (permanent != bind.perm || save != bind.save) + if (permanent != bind.perm || save != bind.save || extendState != bind.extendState) { PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_INSTANCE); stmt->setUInt32(0, save->GetInstanceId()); stmt->setBool(1, permanent); - stmt->setUInt32(2, GetGUID().GetCounter()); - stmt->setUInt32(3, bind.save->GetInstanceId()); + stmt->setUInt8(2, extendState); + stmt->setUInt32(3, GetGUID().GetCounter()); + stmt->setUInt32(4, bind.save->GetInstanceId()); CharacterDatabase.Execute(stmt); } @@ -18495,6 +18523,7 @@ InstancePlayerBind* Player::BindToInstance(InstanceSave* save, bool permanent, b stmt->setUInt32(0, GetGUID().GetCounter()); stmt->setUInt32(1, save->GetInstanceId()); stmt->setBool(2, permanent); + stmt->setUInt8(3, extendState); CharacterDatabase.Execute(stmt); } @@ -18512,9 +18541,10 @@ InstancePlayerBind* Player::BindToInstance(InstanceSave* save, bool permanent, b bind.save = save; bind.perm = permanent; + bind.extendState = extendState; if (!load) TC_LOG_DEBUG("maps", "Player::BindToInstance: %s(%d) is now bound to map %d, instance %d, difficulty %d", GetName().c_str(), GetGUID().GetCounter(), save->GetMapId(), save->GetInstanceId(), save->GetDifficulty()); - sScriptMgr->OnPlayerBindToInstance(this, save->GetDifficulty(), save->GetMapId(), permanent); + sScriptMgr->OnPlayerBindToInstance(this, save->GetDifficulty(), save->GetMapId(), permanent, uint8(extendState)); return &bind; } @@ -18532,7 +18562,7 @@ void Player::BindToInstance() GetSession()->SendPacket(&data); if (!IsGameMaster()) { - BindToInstance(mapSave, true); + BindToInstance(mapSave, true, EXTEND_STATE_KEEP); GetSession()->SendCalendarRaidLockout(mapSave, true); } } @@ -18558,15 +18588,19 @@ void Player::SendRaidInfo() { for (BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end(); ++itr) { - if (itr->second.perm) - { - InstanceSave* save = itr->second.save; - data << uint32(save->GetMapId()); // map id - data << uint32(save->GetDifficulty()); // difficulty - data << uint64(save->GetInstanceId()); // instance id - data << uint8(1); // expired = 0 - data << uint8(0); // extended = 1 - data << uint32(save->GetResetTime() - now); // reset time + InstancePlayerBind const& bind = itr->second; + if (bind.perm) + { + InstanceSave* save = bind.save; + data << uint32(save->GetMapId()); // map id + data << uint32(save->GetDifficulty()); // difficulty + data << uint64(save->GetInstanceId()); // instance id + data << uint8(bind.extendState != EXTEND_STATE_EXPIRED); // expired = 0 + data << uint8(bind.extendState == EXTEND_STATE_EXTENDED); // extended = 1 + time_t nextReset = save->GetResetTime(); + if (bind.extendState == EXTEND_STATE_EXTENDED) + nextReset = sInstanceSaveMgr->GetSubsequentResetTime(save->GetMapId(), save->GetDifficulty(), save->GetResetTime()); + data << uint32(nextReset - now); // reset time ++counter; } } @@ -26140,11 +26174,11 @@ std::string Player::GetMapAreaAndZoneString() uint32 areaId = GetAreaId(); std::string areaName = "Unknown"; std::string zoneName = "Unknown"; - if (AreaTableEntry const* area = GetAreaEntryByAreaID(areaId)) + if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(areaId)) { int locale = GetSession()->GetSessionDbcLocale(); areaName = area->area_name[locale]; - if (AreaTableEntry const* zone = GetAreaEntryByAreaID(area->zone)) + if (AreaTableEntry const* zone = sAreaTableStore.LookupEntry(area->zone)) zoneName = zone->area_name[locale]; } diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index e7af827e9c7..2388cf9d0c7 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -834,14 +834,27 @@ enum PlayerDelayedOperations // Maximum money amount : 2^31 - 1 extern uint32 const MAX_MONEY_AMOUNT; +enum BindExtensionState +{ + EXTEND_STATE_EXPIRED = 0, + EXTEND_STATE_NORMAL = 1, + EXTEND_STATE_EXTENDED = 2, + EXTEND_STATE_KEEP = 255 // special state: keep current save type +}; struct InstancePlayerBind { InstanceSave* save; - bool perm; /* permanent PlayerInstanceBinds are created in Raid/Heroic instances for players - that aren't already permanently bound when they are inside when a boss is killed - or when they enter an instance that the group leader is permanently bound to. */ - InstancePlayerBind() : save(NULL), perm(false) { } + that aren't already permanently bound when they are inside when a boss is killed + or when they enter an instance that the group leader is permanently bound to. */ + bool perm; + /* extend state listing: + EXPIRED - doesn't affect anything unless manually re-extended by player + NORMAL - standard state + EXTENDED - won't be promoted to EXPIRED at next reset period, will instead be promoted to NORMAL */ + BindExtensionState extendState; + + InstancePlayerBind() : save(NULL), perm(false), extendState(EXTEND_STATE_NORMAL) { } }; struct AccessRequirement @@ -1050,8 +1063,9 @@ class Player : public Unit, public GridObject<Player> void SendInstanceResetWarning(uint32 mapid, Difficulty difficulty, uint32 time, bool welcome); bool CanInteractWithQuestGiver(Object* questGiver); - Creature* GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask); - GameObject* GetGameObjectIfCanInteractWith(ObjectGuid guid, GameobjectTypes type) const; + Creature* GetNPCIfCanInteractWith(ObjectGuid const& guid, uint32 npcflagmask); + GameObject* GetGameObjectIfCanInteractWith(ObjectGuid const& guid) const; + GameObject* GetGameObjectIfCanInteractWith(ObjectGuid const& guid, GameobjectTypes type) const; void ToggleAFK(); void ToggleDND(); @@ -2114,12 +2128,12 @@ class Player : public Unit, public GridObject<Player> bool m_InstanceValid; // permanent binds and solo binds by difficulty BoundInstancesMap m_boundInstances[MAX_DIFFICULTY]; - InstancePlayerBind* GetBoundInstance(uint32 mapid, Difficulty difficulty); + InstancePlayerBind* GetBoundInstance(uint32 mapid, Difficulty difficulty, bool withExpired = false); BoundInstancesMap& GetBoundInstances(Difficulty difficulty) { return m_boundInstances[difficulty]; } InstanceSave* GetInstanceSave(uint32 mapid, bool raid); void UnbindInstance(uint32 mapid, Difficulty difficulty, bool unload = false); void UnbindInstance(BoundInstancesMap::iterator &itr, Difficulty difficulty, bool unload = false); - InstancePlayerBind* BindToInstance(InstanceSave* save, bool permanent, bool load = false); + InstancePlayerBind* BindToInstance(InstanceSave* save, bool permanent, BindExtensionState extendState = EXTEND_STATE_NORMAL, bool load = false); void BindToInstance(); void SetPendingBind(uint32 instanceId, uint32 bindTimer); bool HasPendingBind() const { return _pendingBindId > 0; } diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 24ddcd358ea..c21301c27b2 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -157,6 +157,28 @@ ProcEventInfo::ProcEventInfo(Unit* actor, Unit* actionTarget, Unit* procTarget, _damageInfo(damageInfo), _healInfo(healInfo) { } +SpellInfo const* ProcEventInfo::GetSpellInfo() const +{ + if (_spell) + return _spell->GetSpellInfo(); + if (_damageInfo) + return _damageInfo->GetSpellInfo(); + if (_healInfo) + return _healInfo->GetSpellInfo(); + return nullptr; +} + +SpellSchoolMask ProcEventInfo::GetSchoolMask() const +{ + if (_spell) + return _spell->GetSpellInfo()->GetSchoolMask(); + if (_damageInfo) + return _damageInfo->GetSchoolMask(); + if (_healInfo) + return _healInfo->GetSchoolMask(); + return SPELL_SCHOOL_MASK_NONE; +} + Unit::Unit(bool isWorldObject) : WorldObject(isWorldObject), m_movedPlayer(NULL), m_lastSanctuaryTime(0), IsAIEnabled(false), NeedChangeAI(false), LastCharmerGUID(), @@ -1670,6 +1692,9 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe RoundToInterval(auraAbsorbMod, 0.0f, 100.0f); + int32 absorbIgnoringDamage = CalculatePct(dmgInfo.GetDamage(), auraAbsorbMod); + dmgInfo.ModifyDamage(-absorbIgnoringDamage); + // We're going to call functions which can modify content of the list during iteration over it's elements // Let's copy the list so we can prevent iterator invalidation AuraEffectList vSchoolAbsorbCopy(victim->GetAuraEffectsByType(SPELL_AURA_SCHOOL_ABSORB)); @@ -1702,9 +1727,6 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe if (defaultPrevented) continue; - // Apply absorb mod auras - AddPct(currentAbsorb, -auraAbsorbMod); - // absorb must be smaller than the damage itself currentAbsorb = RoundToInterval(currentAbsorb, 0, int32(dmgInfo.GetDamage())); @@ -1753,8 +1775,6 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe if (defaultPrevented) continue; - AddPct(currentAbsorb, -auraAbsorbMod); - // absorb must be smaller than the damage itself currentAbsorb = RoundToInterval(currentAbsorb, 0, int32(dmgInfo.GetDamage())); @@ -1783,6 +1803,8 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe } } + dmgInfo.ModifyDamage(absorbIgnoringDamage); + // split damage auras - only when not damaging self if (victim != this) { @@ -4333,13 +4355,10 @@ void Unit::GetDispellableAuraList(Unit* caster, uint32 dispelMask, DispelCharges if (aura->GetSpellInfo()->GetDispelMask() & dispelMask) { - if (aura->GetSpellInfo()->Dispel == DISPEL_MAGIC) - { - // do not remove positive auras if friendly target - // negative auras if non-friendly target - if (aurApp->IsPositive() == IsFriendlyTo(caster)) - continue; - } + // do not remove positive auras if friendly target + // negative auras if non-friendly target + if (aurApp->IsPositive() == IsFriendlyTo(caster)) + continue; // The charges / stack amounts don't count towards the total number of auras that can be dispelled. // Ie: A dispel on a target with 5 stacks of Winters Chill and a Polymorph has 1 / (1 + 1) -> 50% chance to dispell @@ -6365,54 +6384,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere } case SPELLFAMILY_PALADIN: { - // Light's Beacon - Beacon of Light - if (dummySpell->Id == 53651) - { - if (!victim || !procSpell) - return false; - triggered_spell_id = 0; - Unit* beaconTarget = NULL; - if (GetTypeId() != TYPEID_PLAYER) - { - beaconTarget = triggeredByAura->GetBase()->GetCaster(); - if (!beaconTarget || beaconTarget == this || !(beaconTarget->GetAura(53563, victim->GetGUID()))) - return false; - basepoints0 = int32(damage); - triggered_spell_id = procSpell->IsRankOf(sSpellMgr->GetSpellInfo(635)) ? 53652 : 53654; - } - else - { // Check Party/Raid Group - if (Group* group = ToPlayer()->GetGroup()) - { - for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) - { - if (Player* member = itr->GetSource()) - { - // check if it was heal by paladin which cast this beacon of light - if (member->GetAura(53563, victim->GetGUID())) - { - // do not proc when target of beacon of light is healed - if (member == this) - return false; - - beaconTarget = member; - basepoints0 = int32(damage); - triggered_spell_id = procSpell->IsRankOf(sSpellMgr->GetSpellInfo(635)) ? 53652 : 53654; - break; - } - } - } - } - } - - if (triggered_spell_id && beaconTarget) - { - victim->CastCustomSpell(beaconTarget, triggered_spell_id, &basepoints0, NULL, NULL, true); - return true; - } - - return false; - } // Judgements of the Wise if (dummySpell->SpellIconID == 3017) { @@ -7125,9 +7096,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere float chance = 100.0f / procSpell->Effects[effIndex].ChainTarget; if (!roll_chance_f(chance)) return false; - - // Remove cooldown (Chain Lightning - has Category Recovery time) - GetSpellHistory()->ResetCooldown(spellId); } CastSpell(victim, spellId, true, castItem, triggeredByAura); @@ -8357,8 +8325,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg case 52914: case 52915: case 52910: - // Honor Among Thieves - case 52916: { target = triggeredByAura->GetBase()->GetCaster(); if (!target) @@ -12779,7 +12745,7 @@ Unit* Creature::SelectVictim() } } else - return NULL; + return nullptr; if (target && _IsTargetAcceptable(target) && CanCreatureAttack(target)) { @@ -12788,14 +12754,6 @@ Unit* Creature::SelectVictim() return target; } - // Case where mob is being kited. - // Mob may not be in range to attack or may have dropped target. In any case, - // don't evade if damage received within the last 10 seconds - // Does not apply to world bosses to prevent kiting to cities - if (!isWorldBoss() && !GetInstanceId()) - if (time(NULL) - GetLastDamagedTime() <= MAX_AGGRO_RESET_TIME) - return target; - // last case when creature must not go to evade mode: // it in combat but attacker not make any damage and not enter to aggro radius to have record in threat list // for example at owner command to pet attack some far away creature @@ -12804,12 +12762,12 @@ Unit* Creature::SelectVictim() { if ((*itr) && !CanCreatureAttack(*itr) && (*itr)->GetTypeId() != TYPEID_PLAYER && !(*itr)->ToCreature()->HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN)) - return NULL; + return nullptr; } /// @todo a vehicle may eat some mob, so mob should not evade if (GetVehicle()) - return NULL; + return nullptr; // search nearby enemy before enter evade mode if (HasReactState(REACT_AGGRESSIVE)) @@ -12827,17 +12785,17 @@ Unit* Creature::SelectVictim() { if ((*itr)->GetBase()->IsPermanent()) { - AI()->EnterEvadeMode(); + AI()->EnterEvadeMode(CreatureAI::EVADE_REASON_OTHER); break; } } - return NULL; + return nullptr; } // enter in evade mode in other case AI()->EnterEvadeMode(CreatureAI::EVADE_REASON_NO_HOSTILES); - return NULL; + return nullptr; } //====================================================================== @@ -14187,8 +14145,8 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u Unit* actionTarget = !isVictim ? target : this; DamageInfo damageInfo = DamageInfo(actor, actionTarget, damage, procSpell, procSpell ? SpellSchoolMask(procSpell->SchoolMask) : SPELL_SCHOOL_MASK_NORMAL, SPELL_DIRECT_DAMAGE); - HealInfo healInfo = HealInfo(damage); - ProcEventInfo eventInfo = ProcEventInfo(actor, actionTarget, target, procFlag, 0, 0, procExtra, NULL, &damageInfo, &healInfo); + HealInfo healInfo = HealInfo(actor, actionTarget, damage, procSpell, procSpell ? SpellSchoolMask(procSpell->SchoolMask) : SPELL_SCHOOL_MASK_NORMAL); + ProcEventInfo eventInfo = ProcEventInfo(actor, actionTarget, target, procFlag, 0, 0, procExtra, nullptr, &damageInfo, &healInfo); ProcTriggeredList procTriggered; // Fill procTriggered list @@ -16898,12 +16856,12 @@ void Unit::JumpTo(float speedXY, float speedZ, bool forward) } } -void Unit::JumpTo(WorldObject* obj, float speedZ) +void Unit::JumpTo(WorldObject* obj, float speedZ, bool withOrientation) { float x, y, z; obj->GetContactPoint(this, x, y, z); float speedXY = GetExactDist2d(x, y) * 10.0f / speedZ; - GetMotionMaster()->MoveJump(x, y, z, speedXY, speedZ); + GetMotionMaster()->MoveJump(x, y, z, GetAngle(obj), speedXY, speedZ, EVENT_JUMP, withOrientation); } bool Unit::HandleSpellClick(Unit* clicker, int8 seatId) diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index c64667feeca..4565160dc93 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -863,22 +863,30 @@ public: class HealInfo { private: - uint32 m_heal; - uint32 m_absorb; + Unit* const _healer; + Unit* const _target; + uint32 _heal; + uint32 _absorb; + SpellInfo const* const _spellInfo; + SpellSchoolMask const _schoolMask; + public: - explicit HealInfo(uint32 heal) - : m_heal(heal) - { - m_absorb = 0; - } + explicit HealInfo(Unit* healer, Unit* target, uint32 heal, SpellInfo const* spellInfo, SpellSchoolMask schoolMask) + : _healer(healer), _target(target), _heal(heal), _absorb(0), _spellInfo(spellInfo), _schoolMask(schoolMask) { } + void AbsorbHeal(uint32 amount) { amount = std::min(amount, GetHeal()); - m_absorb += amount; - m_heal -= amount; + _absorb += amount; + _heal -= amount; } - uint32 GetHeal() const { return m_heal; } + Unit* GetHealer() const { return _healer; } + Unit* GetTarget() const { return _target; } + uint32 GetHeal() const { return _heal; } + uint32 GetAbsorb() const { return _absorb; } + SpellInfo const* GetSpellInfo() const { return _spellInfo; }; + SpellSchoolMask GetSchoolMask() const { return _schoolMask; }; }; class ProcEventInfo @@ -897,14 +905,8 @@ public: uint32 GetSpellPhaseMask() const { return _spellPhaseMask; } uint32 GetHitMask() const { return _hitMask; } - SpellInfo const* GetSpellInfo() const { return NULL; } - SpellInfo const* EnsureSpellInfo() const - { - SpellInfo const* spellInfo = GetSpellInfo(); - ASSERT(spellInfo); - return spellInfo; - } - SpellSchoolMask GetSchoolMask() const { return SPELL_SCHOOL_MASK_NONE; } + SpellInfo const* GetSpellInfo() const; + SpellSchoolMask GetSchoolMask() const; DamageInfo* GetDamageInfo() const { return _damageInfo; } HealInfo* GetHealInfo() const { return _healInfo; } @@ -1565,7 +1567,7 @@ class Unit : public WorldObject void KnockbackFrom(float x, float y, float speedXY, float speedZ); void JumpTo(float speedXY, float speedZ, bool forward = true); - void JumpTo(WorldObject* obj, float speedZ); + void JumpTo(WorldObject* obj, float speedZ, bool withOrientation = false); void MonsterMoveWithSpeed(float x, float y, float z, float speed, bool generatePath = false, bool forceDestination = false); //void SetFacing(float ori, WorldObject* obj = NULL); diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index d2064092a65..f45634e9684 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -1756,7 +1756,7 @@ void ObjectMgr::LoadCreatures() if (!ok) continue; - // -1 random, 0 no equipment, + // -1 random, 0 no equipment if (data.equipmentId != 0) { if (!GetEquipmentInfo(data.id, data.equipmentId)) @@ -2773,7 +2773,7 @@ void ObjectMgr::LoadItemTemplates() itemTemplate.ItemSet = 0; } - if (itemTemplate.Area && !GetAreaEntryByAreaID(itemTemplate.Area)) + if (itemTemplate.Area && !sAreaTableStore.LookupEntry(itemTemplate.Area)) TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong Area (%u)", entry, itemTemplate.Area); if (itemTemplate.Map && !sMapStore.LookupEntry(itemTemplate.Map)) @@ -4143,7 +4143,7 @@ void ObjectMgr::LoadQuests() // client quest log visual (area case) if (qinfo->ZoneOrSort > 0) { - if (!GetAreaEntryByAreaID(qinfo->ZoneOrSort)) + if (!sAreaTableStore.LookupEntry(qinfo->ZoneOrSort)) { TC_LOG_ERROR("sql.sql", "Quest %u has `ZoneOrSort` = %u (zone case) but zone with this id does not exist.", qinfo->GetQuestId(), qinfo->ZoneOrSort); @@ -5956,7 +5956,7 @@ void ObjectMgr::LoadGraveyardZones() continue; } - AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(zoneId); + AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(zoneId); if (!areaEntry) { TC_LOG_ERROR("sql.sql", "Table `game_graveyard_zone` has a record for not existing zone id (%u), skipped.", zoneId); @@ -7796,7 +7796,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel() uint32 entry = fields[0].GetUInt32(); int32 skill = fields[1].GetInt16(); - AreaTableEntry const* fArea = GetAreaEntryByAreaID(entry); + AreaTableEntry const* fArea = sAreaTableStore.LookupEntry(entry); if (!fArea) { TC_LOG_ERROR("sql.sql", "AreaId %u defined in `skill_fishing_base_level` does not exist", entry); diff --git a/src/server/game/Grids/GridDefines.h b/src/server/game/Grids/GridDefines.h index 162c39b951b..24c9100b222 100644 --- a/src/server/game/Grids/GridDefines.h +++ b/src/server/game/Grids/GridDefines.h @@ -226,7 +226,7 @@ namespace Trinity inline bool IsValidMapCoord(float x, float y, float z) { - return IsValidMapCoord(x, y) && std::isfinite(z); + return IsValidMapCoord(x, y) && IsValidMapCoord(z); } inline bool IsValidMapCoord(float x, float y, float z, float o) diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.cpp b/src/server/game/Grids/Notifiers/GridNotifiers.cpp index c48d1947eec..2cdbdca4e4f 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.cpp +++ b/src/server/game/Grids/Notifiers/GridNotifiers.cpp @@ -131,7 +131,7 @@ inline void CreatureUnitRelocationWorker(Creature* c, Unit* u) if (!u->IsAlive() || !c->IsAlive() || c == u || u->IsInFlight()) return; - if (c->HasReactState(REACT_AGGRESSIVE) && !c->HasUnitState(UNIT_STATE_SIGHTLESS)) + if (!c->HasUnitState(UNIT_STATE_SIGHTLESS)) { if (c->IsAIEnabled && c->CanSeeOrDetect(u, false, true)) c->AI()->MoveInLineOfSight_Safe(u); diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index 8ebc71b0146..99c5d610e64 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -687,7 +687,8 @@ void Group::ConvertLeaderInstancesToGroup(Player* player, Group* group, bool swi for (Player::BoundInstancesMap::iterator itr = player->m_boundInstances[i].begin(); itr != player->m_boundInstances[i].end();) { if (!switchLeader || !group->GetBoundInstance(itr->second.save->GetDifficulty(), itr->first)) - group->BindToInstance(itr->second.save, itr->second.perm, false); + if (itr->second.extendState) // not expired + group->BindToInstance(itr->second.save, itr->second.perm, false); // permanent binds are not removed if (switchLeader && !itr->second.perm) @@ -2274,6 +2275,8 @@ LootMethod Group::GetLootMethod() const ObjectGuid Group::GetLooterGuid() const { + if (GetLootMethod() == FREE_FOR_ALL) + return ObjectGuid::Empty; return m_looterGuid; } diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp index f23888cab03..efe0526baae 100644 --- a/src/server/game/Handlers/AuctionHouseHandler.cpp +++ b/src/server/game/Handlers/AuctionHouseHandler.cpp @@ -706,7 +706,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket& recvData) TC_LOG_DEBUG("network", "WORLD: Received CMSG_AUCTION_LIST_ITEMS"); std::string searchedname; - uint8 levelmin, levelmax, usable; + uint8 levelmin, levelmax, usable, getAll; uint32 listfrom, auctionSlotID, auctionMainCategory, auctionSubCategory, quality; ObjectGuid guid; @@ -718,7 +718,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket& recvData) recvData >> auctionSlotID >> auctionMainCategory >> auctionSubCategory; recvData >> quality >> usable; - recvData.read_skip<uint8>(); // unk + recvData >> getAll; // this block looks like it uses some lame byte packing or similar... uint8 unkCnt; @@ -760,11 +760,11 @@ void WorldSession::HandleAuctionListItems(WorldPacket& recvData) auctionHouse->BuildListAuctionItems(data, _player, wsearchedname, listfrom, levelmin, levelmax, usable, auctionSlotID, auctionMainCategory, auctionSubCategory, quality, - count, totalcount); + count, totalcount, (getAll != 0 && sWorld->getIntConfig(CONFIG_AUCTION_GETALL_DELAY) != 0)); data.put<uint32>(0, count); data << (uint32) totalcount; - data << (uint32) 300; // unk 2.3.0 const? + data << (uint32) sWorld->getIntConfig(CONFIG_AUCTION_SEARCH_DELAY); SendPacket(&data); } diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp index 8bd7086fc1b..540eeba0752 100644 --- a/src/server/game/Handlers/CalendarHandler.cpp +++ b/src/server/game/Handlers/CalendarHandler.cpp @@ -695,6 +695,21 @@ void WorldSession::HandleSetSavedInstanceExtend(WorldPacket& recvData) recvData >> mapId >> difficulty>> toggleExtend; TC_LOG_DEBUG("network", "CMSG_SET_SAVED_INSTANCE_EXTEND - MapId: %u, Difficulty: %u, ToggleExtend: %s", mapId, difficulty, toggleExtend ? "On" : "Off"); + if (Player* player = GetPlayer()) + { + InstancePlayerBind* instanceBind = player->GetBoundInstance(mapId, Difficulty(difficulty), toggleExtend == 1); // include expired instances if we are toggling extend on + if (!instanceBind || !instanceBind->save || !instanceBind->perm) + return; + + BindExtensionState newState; + if (!toggleExtend || instanceBind->extendState == EXTEND_STATE_EXPIRED) + newState = EXTEND_STATE_NORMAL; + else + newState = EXTEND_STATE_EXTENDED; + + player->BindToInstance(instanceBind->save, true, newState, false); + } + /* InstancePlayerBind* instanceBind = _player->GetBoundInstance(mapId, Difficulty(difficulty)); if (!instanceBind || !instanceBind->save) diff --git a/src/server/game/Handlers/ChannelHandler.cpp b/src/server/game/Handlers/ChannelHandler.cpp index 976860e8cc0..9285f4247b2 100644 --- a/src/server/game/Handlers/ChannelHandler.cpp +++ b/src/server/game/Handlers/ChannelHandler.cpp @@ -39,7 +39,7 @@ void WorldSession::HandleJoinChannel(WorldPacket& recvPacket) if (!channel) return; - AreaTableEntry const* zone = GetAreaEntryByAreaID(GetPlayer()->GetZoneId()); + AreaTableEntry const* zone = sAreaTableStore.LookupEntry(GetPlayer()->GetZoneId()); if (!zone || !GetPlayer()->CanJoinConstantChannelInZone(channel, zone)) return; } diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index 758d5af83f7..5f5a66e7b20 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -105,7 +105,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData) GameObject* go = NULL; if (guid.IsCreatureOrVehicle()) { - unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE); + unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_GOSSIP); if (!unit) { TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - %s not found or you can't interact with him.", guid.ToString().c_str()); @@ -114,10 +114,10 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData) } else if (guid.IsGameObject()) { - go = _player->GetMap()->GetGameObject(guid); + go = _player->GetGameObjectIfCanInteractWith(guid); if (!go) { - TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - %s not found.", guid.ToString().c_str()); + TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - %s not found or you can't interact with it.", guid.ToString().c_str()); return; } } @@ -319,7 +319,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket& recvData) continue; std::string aname; - if (AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(pzoneid)) + if (AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(pzoneid)) aname = areaEntry->area_name[GetSessionDbcLocale()]; bool s_show = true; @@ -1753,7 +1753,7 @@ void WorldSession::HandleHearthAndResurrect(WorldPacket& /*recvData*/) return; } - AreaTableEntry const* atEntry = GetAreaEntryByAreaID(_player->GetAreaId()); + AreaTableEntry const* atEntry = sAreaTableStore.LookupEntry(_player->GetAreaId()); if (!atEntry || !(atEntry->flags & AREA_FLAG_WINTERGRASP_2)) return; diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp index eea5c62fbd1..02702fc5622 100644 --- a/src/server/game/Handlers/MovementHandler.cpp +++ b/src/server/game/Handlers/MovementHandler.cpp @@ -386,7 +386,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData) plrMover->UpdateFallInformationIfNeed(movementInfo, opcode); - if (movementInfo.pos.GetPositionZ() < -500.0f) + if (movementInfo.pos.GetPositionZ() < plrMover->GetMap()->GetMinHeight(movementInfo.pos.GetPositionX(), movementInfo.pos.GetPositionY())) { if (!(plrMover->GetBattleground() && plrMover->GetBattleground()->HandlePlayerUnderMap(_player))) { @@ -395,6 +395,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData) /// @todo discard movement packets after the player is rooted if (plrMover->IsAlive()) { + plrMover->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_IS_OUT_OF_BOUNDS); plrMover->EnvironmentalDamage(DAMAGE_FALL_TO_VOID, GetPlayer()->GetMaxHealth()); // player can be alive if GM/etc // change the death state to CORPSE to prevent the death timer from diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp index f272cd4a034..1e00c25a0c3 100644 --- a/src/server/game/Handlers/NPCHandler.cpp +++ b/src/server/game/Handlers/NPCHandler.cpp @@ -292,7 +292,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData) ObjectGuid guid; recvData >> guid; - Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE); + Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_GOSSIP); if (!unit) { TC_LOG_DEBUG("network", "WORLD: HandleGossipHelloOpcode - %s not found or you can not interact with him.", guid.ToString().c_str()); @@ -334,47 +334,6 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData) unit->AI()->sGossipHello(_player); } -/*void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData) -{ - TC_LOG_DEBUG("network", "WORLD: CMSG_GOSSIP_SELECT_OPTION"); - - uint32 option; - uint32 unk; - uint64 guid; - std::string code = ""; - - recvData >> guid >> unk >> option; - - if (_player->PlayerTalkClass->GossipOptionCoded(option)) - { - TC_LOG_DEBUG("network", "reading string"); - recvData >> code; - TC_LOG_DEBUG("network", "string read: %s", code.c_str()); - } - - Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE); - if (!unit) - { - TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); - return; - } - - // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) - GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); - - if (!code.empty()) - { - if (!Script->GossipSelectWithCode(_player, unit, _player->PlayerTalkClass->GossipOptionSender (option), _player->PlayerTalkClass->GossipOptionAction(option), code.c_str())) - unit->OnGossipSelect (_player, option); - } - else - { - if (!Script->OnGossipSelect (_player, unit, _player->PlayerTalkClass->GossipOptionSender (option), _player->PlayerTalkClass->GossipOptionAction (option))) - unit->OnGossipSelect (_player, option); - } -}*/ - void WorldSession::HandleSpiritHealerActivateOpcode(WorldPacket& recvData) { TC_LOG_DEBUG("network", "WORLD: CMSG_SPIRIT_HEALER_ACTIVATE"); diff --git a/src/server/game/Handlers/QuestHandler.cpp b/src/server/game/Handlers/QuestHandler.cpp index 002adc19a86..a7db18deddb 100644 --- a/src/server/game/Handlers/QuestHandler.cpp +++ b/src/server/game/Handlers/QuestHandler.cpp @@ -75,7 +75,7 @@ void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket& recvData) TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_HELLO %s", guid.ToString().c_str()); - Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE); + Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_QUESTGIVER); if (!creature) { TC_LOG_DEBUG("network", "WORLD: HandleQuestgiverHelloOpcode - %s not found or you can't interact with him.", diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 0943d9db26a..6be1fd30ae3 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -268,11 +268,8 @@ void WorldSession::HandleGameObjectUseOpcode(WorldPacket& recvData) TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_GAMEOBJ_USE Message [%s]", guid.ToString().c_str()); - if (GameObject* obj = GetPlayer()->GetMap()->GetGameObject(guid)) + if (GameObject* obj = GetPlayer()->GetGameObjectIfCanInteractWith(guid)) { - if (!obj->IsWithinDistInMap(GetPlayer(), obj->GetInteractionDistance())) - return; - // ignore for remote control state if (GetPlayer()->m_mover != GetPlayer()) if (!(GetPlayer()->IsOnVehicle(GetPlayer()->m_mover) || GetPlayer()->IsMounted()) && !obj->GetGOInfo()->IsUsableMounted()) @@ -293,17 +290,13 @@ void WorldSession::HandleGameobjectReportUse(WorldPacket& recvPacket) if (_player->m_mover != _player) return; - GameObject* go = GetPlayer()->GetMap()->GetGameObject(guid); - if (!go) - return; - - if (!go->IsWithinDistInMap(_player, INTERACTION_DISTANCE)) - return; - - if (go->AI()->GossipHello(_player)) - return; + if (GameObject* go = GetPlayer()->GetGameObjectIfCanInteractWith(guid)) + { + if (go->AI()->GossipHello(_player)) + return; - _player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT, go->GetEntry()); + _player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT, go->GetEntry()); + } } void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket) diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index 9a64335e6f0..3538262ed35 100644 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -439,6 +439,23 @@ void InstanceSaveManager::LoadResetTimes() } } +time_t InstanceSaveManager::GetSubsequentResetTime(uint32 mapid, Difficulty difficulty, time_t resetTime) const +{ + MapDifficulty const* mapDiff = GetMapDifficultyData(mapid, difficulty); + if (!mapDiff || !mapDiff->resetTime) + { + TC_LOG_ERROR("misc", "InstanceSaveManager::GetSubsequentResetTime: not valid difficulty or no reset delay for map %u", mapid); + return 0; + } + + time_t diff = sWorld->getIntConfig(CONFIG_INSTANCE_RESET_TIME_HOUR) * HOUR; + time_t period = uint32(((mapDiff->resetTime * sWorld->getRate(RATE_INSTANCE_RESET_TIME)) / DAY) * DAY); + if (period < DAY) + period = DAY; + + return ((resetTime + MINUTE) / DAY * DAY) + period + diff; +} + void InstanceSaveManager::ScheduleReset(bool add, time_t time, InstResetEvent event) { if (!add) @@ -476,6 +493,17 @@ void InstanceSaveManager::ScheduleReset(bool add, time_t time, InstResetEvent ev m_resetTimeQueue.insert(std::pair<time_t, InstResetEvent>(time, event)); } +void InstanceSaveManager::ForceGlobalReset(uint32 mapId, Difficulty difficulty) +{ + if (!GetDownscaledMapDifficultyData(mapId, difficulty)) + return; + // remove currently scheduled reset times + ScheduleReset(false, 0, InstResetEvent(1, mapId, difficulty, 0)); + ScheduleReset(false, 0, InstResetEvent(4, mapId, difficulty, 0)); + // force global reset on the instance + _ResetOrWarnAll(mapId, difficulty, false, time(nullptr)); +} + void InstanceSaveManager::Update() { time_t now = time(NULL); @@ -516,10 +544,26 @@ void InstanceSaveManager::_ResetSave(InstanceSaveHashMap::iterator &itr) // do not allow UnbindInstance to automatically unload the InstanceSaves lock_instLists = true; + bool shouldDelete = true; InstanceSave::PlayerListType &pList = itr->second->m_playerList; - while (!pList.empty()) + std::vector<Player*> temp; // list of expired binds that should be unbound + for (Player* player : pList) + { + if (InstancePlayerBind* bind = player->GetBoundInstance(itr->second->GetMapId(), itr->second->GetDifficulty())) + { + ASSERT(bind->save == itr->second); + if (bind->perm && bind->extendState) // permanent and not already expired + { + // actual promotion in DB already happened in caller + bind->extendState = bind->extendState == EXTEND_STATE_EXTENDED ? EXTEND_STATE_NORMAL : EXTEND_STATE_EXPIRED; + shouldDelete = false; + continue; + } + } + temp.push_back(player); + } + for (Player* player : temp) { - Player* player = *(pList.begin()); player->UnbindInstance(itr->second->GetMapId(), itr->second->GetDifficulty(), true); } @@ -530,8 +574,13 @@ void InstanceSaveManager::_ResetSave(InstanceSaveHashMap::iterator &itr) group->UnbindInstance(itr->second->GetMapId(), itr->second->GetDifficulty(), true); } - delete itr->second; - m_instanceSaveById.erase(itr++); + if (shouldDelete) + { + delete itr->second; + itr = m_instanceSaveById.erase(itr); + } + else + ++itr; lock_instLists = false; } @@ -572,31 +621,21 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b MapEntry const* mapEntry = sMapStore.LookupEntry(mapid); if (!mapEntry->Instanceable()) return; + TC_LOG_DEBUG("misc", "InstanceSaveManager::ResetOrWarnAll: Processing map %s (%u) on difficulty %u (warn? %u)", mapEntry->name[0], mapid, uint8(difficulty), warn); time_t now = time(NULL); if (!warn) { - MapDifficulty const* mapDiff = GetMapDifficultyData(mapid, difficulty); - if (!mapDiff || !mapDiff->resetTime) - { - TC_LOG_ERROR("misc", "InstanceSaveManager::ResetOrWarnAll: not valid difficulty or no reset delay for map %d", mapid); + // calculate the next reset time + time_t next_reset = GetSubsequentResetTime(mapid, difficulty, resetTime); + if (!next_reset) return; - } - // remove all binds to instances of the given map - for (InstanceSaveHashMap::iterator itr = m_instanceSaveById.begin(); itr != m_instanceSaveById.end();) - { - if (itr->second->GetMapId() == mapid && itr->second->GetDifficulty() == difficulty) - _ResetSave(itr); - else - ++itr; - } - - // delete them from the DB, even if not loaded + // delete/promote instance binds from the DB, even if not loaded SQLTransaction trans = CharacterDatabase.BeginTransaction(); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_INSTANCE_BY_MAP_DIFF); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_EXPIRED_CHAR_INSTANCE_BY_MAP_DIFF); stmt->setUInt16(0, uint16(mapid)); stmt->setUInt8(1, uint8(difficulty)); trans->Append(stmt); @@ -606,21 +645,26 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b stmt->setUInt8(1, uint8(difficulty)); trans->Append(stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INSTANCE_BY_MAP_DIFF); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_EXPIRED_INSTANCE_BY_MAP_DIFF); stmt->setUInt16(0, uint16(mapid)); stmt->setUInt8(1, uint8(difficulty)); trans->Append(stmt); - CharacterDatabase.CommitTransaction(trans); - - // calculate the next reset time - uint32 diff = sWorld->getIntConfig(CONFIG_INSTANCE_RESET_TIME_HOUR) * HOUR; + stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_EXPIRE_CHAR_INSTANCE_BY_MAP_DIFF); + stmt->setUInt16(0, uint16(mapid)); + stmt->setUInt8(1, uint8(difficulty)); + trans->Append(stmt); - uint32 period = uint32(((mapDiff->resetTime * sWorld->getRate(RATE_INSTANCE_RESET_TIME))/DAY) * DAY); - if (period < DAY) - period = DAY; + CharacterDatabase.CommitTransaction(trans); - uint32 next_reset = uint32(((resetTime + MINUTE) / DAY * DAY) + period + diff); + // promote loaded binds to instances of the given map + for (InstanceSaveHashMap::iterator itr = m_instanceSaveById.begin(); itr != m_instanceSaveById.end();) + { + if (itr->second->GetMapId() == mapid && itr->second->GetDifficulty() == difficulty) + _ResetSave(itr); + else + ++itr; + } SetResetTimeFor(mapid, difficulty, next_reset); ScheduleReset(true, time_t(next_reset-3600), InstResetEvent(1, mapid, difficulty, 0)); diff --git a/src/server/game/Instances/InstanceSaveMgr.h b/src/server/game/Instances/InstanceSaveMgr.h index e3d8175cbc4..d2b3237b3cf 100644 --- a/src/server/game/Instances/InstanceSaveMgr.h +++ b/src/server/game/Instances/InstanceSaveMgr.h @@ -190,6 +190,7 @@ class InstanceSaveManager ResetTimeByMapDifficultyMap::const_iterator itr = m_resetTimeByMapDifficulty.find(MAKE_PAIR32(mapid, d)); return itr != m_resetTimeByMapDifficulty.end() ? itr->second : 0; } + time_t GetSubsequentResetTime(uint32 mapid, Difficulty difficulty, time_t resetTime) const; // Use this on startup when initializing reset times void InitializeResetTimeFor(uint32 mapid, Difficulty d, time_t t) @@ -210,6 +211,7 @@ class InstanceSaveManager return m_resetTimeByMapDifficulty; } void ScheduleReset(bool add, time_t time, InstResetEvent event); + void ForceGlobalReset(uint32 mapId, Difficulty difficulty); void Update(); diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index 20f513323c1..1575b50098f 100644 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -30,6 +30,12 @@ #include "WorldSession.h" #include "Opcodes.h" +BossBoundaryData::~BossBoundaryData() +{ + for (const_iterator it = begin(); it != end(); ++it) + delete it->Boundary; +} + void InstanceScript::SaveToDB() { std::string data = GetSaveData(); @@ -98,9 +104,9 @@ void InstanceScript::SetHeaders(std::string const& dataHeaders) void InstanceScript::LoadBossBoundaries(const BossBoundaryData& data) { - for (BossBoundaryEntry entry : data) - if (entry.bossId < bosses.size()) - bosses[entry.bossId].boundary.insert(entry.boundary); + for (BossBoundaryEntry const& entry : data) + if (entry.BossId < bosses.size()) + bosses[entry.BossId].boundary.insert(entry.Boundary); } void InstanceScript::LoadMinionData(const MinionData* data) diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h index 8285eaa7346..ce83061e162 100644 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -75,10 +75,23 @@ struct DoorData struct BossBoundaryEntry { - uint32 const bossId; - AreaBoundary const* const boundary; + uint32 BossId; + AreaBoundary const* Boundary; +}; + +struct BossBoundaryData +{ + typedef std::vector<BossBoundaryEntry> StorageType; + typedef StorageType::const_iterator const_iterator; + + BossBoundaryData(std::initializer_list<BossBoundaryEntry> data) : _data(data) { } + ~BossBoundaryData(); + const_iterator begin() const { return _data.begin(); } + const_iterator end() const { return _data.end(); } + + private: + StorageType _data; }; -typedef std::list<BossBoundaryEntry> BossBoundaryData; struct MinionData { diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index 530bcd2902c..19dc210ea5b 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -1580,8 +1580,8 @@ void LoadLootTemplates_Fishing() uint32 count = LootTemplates_Fishing.LoadAndCollectLootIds(lootIdSet); // remove real entries and check existence loot - for (uint32 i = 1; i < sAreaStore.GetNumRows(); ++i) - if (AreaTableEntry const* areaEntry = sAreaStore.LookupEntry(i)) + for (uint32 i = 1; i < sAreaTableStore.GetNumRows(); ++i) + if (AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(i)) if (lootIdSet.find(areaEntry->ID) != lootIdSet.end()) lootIdSet.erase(areaEntry->ID); diff --git a/src/server/game/Maps/AreaBoundary.cpp b/src/server/game/Maps/AreaBoundary.cpp index 837a9959041..e09b252179e 100644 --- a/src/server/game/Maps/AreaBoundary.cpp +++ b/src/server/game/Maps/AreaBoundary.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2016 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Maps/AreaBoundary.h b/src/server/game/Maps/AreaBoundary.h index 24a00962359..a134b783ca6 100644 --- a/src/server/game/Maps/AreaBoundary.h +++ b/src/server/game/Maps/AreaBoundary.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2016 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -32,15 +32,16 @@ class AreaBoundary BOUNDARY_PARALLELOGRAM, BOUNDARY_Z_RANGE, }; + virtual ~AreaBoundary() { } BoundaryType GetBoundaryType() const { return m_boundaryType; } bool IsWithinBoundary(const Position* pos) const { return (IsWithinBoundaryArea(pos) != m_isInvertedBoundary); } struct DoublePosition : Position { double d_positionX, d_positionY, d_positionZ; - DoublePosition(double x = 0, double y = 0, double z = 0, float o = 0) - : Position((float)x, (float)y, (float)z, o), d_positionX(x), d_positionY(y), d_positionZ(z) { } - DoublePosition(float x = 0, float y = 0, float z = 0, float o = 0) + DoublePosition(double x = 0.0, double y = 0.0, double z = 0.0, float o = 0.0f) + : Position(x, y, z, o), d_positionX(x), d_positionY(y), d_positionZ(z) { } + DoublePosition(float x, float y = 0.0f, float z = 0.0f, float o = 0.0f) : Position(x, y, z, o), d_positionX(x), d_positionY(y), d_positionZ(z) { } DoublePosition(const Position& pos) : DoublePosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation()) { } diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index a2cb84359f2..ccc599b6de8 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -37,7 +37,7 @@ #include "VMapFactory.h" u_map_magic MapMagic = { {'M','A','P','S'} }; -u_map_magic MapVersionMagic = { {'v','1','.','3'} }; +u_map_magic MapVersionMagic = { {'v','1','.','8'} }; u_map_magic MapAreaMagic = { {'A','R','E','A'} }; u_map_magic MapHeightMagic = { {'M','H','G','T'} }; u_map_magic MapLiquidMagic = { {'M','L','I','Q'} }; @@ -1644,13 +1644,15 @@ GridMap::GridMap() _flags = 0; // Area data _gridArea = 0; - _areaMap = NULL; + _areaMap = nullptr; // Height level data _gridHeight = INVALID_HEIGHT; _gridGetHeight = &GridMap::getHeightFromFlat; _gridIntHeightMultiplier = 0; - m_V9 = NULL; - m_V8 = NULL; + m_V9 = nullptr; + m_V8 = nullptr; + _maxHeight = nullptr; + _minHeight = nullptr; // Liquid data _liquidType = 0; _liquidOffX = 0; @@ -1658,9 +1660,9 @@ GridMap::GridMap() _liquidWidth = 0; _liquidHeight = 0; _liquidLevel = INVALID_HEIGHT; - _liquidEntry = NULL; - _liquidFlags = NULL; - _liquidMap = NULL; + _liquidEntry = nullptr; + _liquidFlags = nullptr; + _liquidMap = nullptr; } GridMap::~GridMap() @@ -1723,15 +1725,19 @@ void GridMap::unloadData() delete[] _areaMap; delete[] m_V9; delete[] m_V8; + delete[] _maxHeight; + delete[] _minHeight; delete[] _liquidEntry; delete[] _liquidFlags; delete[] _liquidMap; - _areaMap = NULL; - m_V9 = NULL; - m_V8 = NULL; - _liquidEntry = NULL; - _liquidFlags = NULL; - _liquidMap = NULL; + _areaMap = nullptr; + m_V9 = nullptr; + m_V8 = nullptr; + _maxHeight = nullptr; + _minHeight = nullptr; + _liquidEntry = nullptr; + _liquidFlags = nullptr; + _liquidMap = nullptr; _gridGetHeight = &GridMap::getHeightFromFlat; } @@ -1746,7 +1752,7 @@ bool GridMap::loadAreaData(FILE* in, uint32 offset, uint32 /*size*/) _gridArea = header.gridArea; if (!(header.flags & MAP_AREA_NO_AREA)) { - _areaMap = new uint16 [16*16]; + _areaMap = new uint16[16 * 16]; if (fread(_areaMap, sizeof(uint16), 16*16, in) != 16*16) return false; } @@ -1796,6 +1802,16 @@ bool GridMap::loadHeightData(FILE* in, uint32 offset, uint32 /*size*/) } else _gridGetHeight = &GridMap::getHeightFromFlat; + + if (header.flags & MAP_HEIGHT_HAS_FLIGHT_BOUNDS) + { + _maxHeight = new int16[3 * 3]; + _minHeight = new int16[3 * 3]; + if (fread(_maxHeight, sizeof(int16), 3 * 3, in) != 3 * 3 || + fread(_minHeight, sizeof(int16), 3 * 3, in) != 3 * 3) + return false; + } + return true; } @@ -2066,6 +2082,66 @@ float GridMap::getHeightFromUint16(float x, float y) const return (float)((a * x) + (b * y) + c)*_gridIntHeightMultiplier + _gridHeight; } +float GridMap::getMinHeight(float x, float y) const +{ + if (!_minHeight) + return -500.0f; + + static uint32 const indices[] = + { + 3, 0, 4, + 0, 1, 4, + 1, 2, 4, + 2, 5, 4, + 5, 8, 4, + 8, 7, 4, + 7, 6, 4, + 6, 3, 4 + }; + + static float const boundGridCoords[] = + { + 0.0f, 0.0f, + 0.0f, -266.66666f, + 0.0f, -533.33331f, + -266.66666f, 0.0f, + -266.66666f, -266.66666f, + -266.66666f, -533.33331f, + -533.33331f, 0.0f, + -533.33331f, -266.66666f, + -533.33331f, -533.33331f + }; + + Cell cell(x, y); + float gx = x - (int32(cell.GridX()) - CENTER_GRID_ID + 1) * SIZE_OF_GRIDS; + float gy = y - (int32(cell.GridY()) - CENTER_GRID_ID + 1) * SIZE_OF_GRIDS; + + uint32 quarterIndex = 0; + if (cell.CellY() < MAX_NUMBER_OF_CELLS / 2) + { + if (cell.CellX() < MAX_NUMBER_OF_CELLS / 2) + { + quarterIndex = 4 + (gy > gx); + } + else + quarterIndex = 2 + ((-SIZE_OF_GRIDS - gx) > gy); + } + else if (cell.CellX() < MAX_NUMBER_OF_CELLS / 2) + { + quarterIndex = 6 + ((-SIZE_OF_GRIDS - gx) <= gy); + } + else + quarterIndex = gx > gy; + + quarterIndex *= 3; + + return G3D::Plane( + G3D::Vector3(boundGridCoords[indices[quarterIndex + 0] * 2 + 0], boundGridCoords[indices[quarterIndex + 0] * 2 + 1], _minHeight[indices[quarterIndex + 0]]), + G3D::Vector3(boundGridCoords[indices[quarterIndex + 1] * 2 + 0], boundGridCoords[indices[quarterIndex + 1] * 2 + 1], _minHeight[indices[quarterIndex + 1]]), + G3D::Vector3(boundGridCoords[indices[quarterIndex + 2] * 2 + 0], boundGridCoords[indices[quarterIndex + 2] * 2 + 1], _minHeight[indices[quarterIndex + 2]]) + ).distance(G3D::Vector3(gx, gy, 0.0f)); +} + float GridMap::getLiquidLevel(float x, float y) const { if (!_liquidMap) @@ -2125,12 +2201,12 @@ inline ZLiquidStatus GridMap::getLiquidStatus(float x, float y, float z, uint8 R uint32 liqTypeIdx = liquidEntry->Type; if (entry < 21) { - if (AreaTableEntry const* area = GetAreaEntryByAreaFlagAndMap(getArea(x, y), MAPID_INVALID)) + if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(getArea(x, y))) { uint32 overrideLiquid = area->LiquidTypeOverride[liquidEntry->Type]; if (!overrideLiquid && area->zone) { - area = GetAreaEntryByAreaID(area->zone); + area = sAreaTableStore.LookupEntry(area->zone); if (area) overrideLiquid = area->LiquidTypeOverride[liquidEntry->Type]; } @@ -2266,6 +2342,14 @@ float Map::GetHeight(float x, float y, float z, bool checkVMap /*= true*/, float return mapHeight; // explicitly use map data } +float Map::GetMinHeight(float x, float y) const +{ + if (GridMap const* grid = const_cast<Map*>(this)->GetGrid(x, y)) + return grid->getMinHeight(x, y); + + return -500.0f; +} + inline bool IsOutdoorWMO(uint32 mogpFlags, int32 /*adtId*/, int32 /*rootId*/, int32 /*groupId*/, WMOAreaTableEntry const* wmoEntry, AreaTableEntry const* atEntry) { bool outdoor = true; @@ -2304,7 +2388,7 @@ bool Map::IsOutdoors(float x, float y, float z) const if (wmoEntry) { TC_LOG_DEBUG("maps", "Got WMOAreaTableEntry! flag %u, areaid %u", wmoEntry->Flags, wmoEntry->areaId); - atEntry = GetAreaEntryByAreaID(wmoEntry->areaId); + atEntry = sAreaTableStore.LookupEntry(wmoEntry->areaId); } return IsOutdoorWMO(mogpFlags, adtId, rootId, groupId, wmoEntry, atEntry); } @@ -2328,7 +2412,7 @@ bool Map::GetAreaInfo(float x, float y, float z, uint32 &flags, int32 &adtId, in return false; } -uint16 Map::GetAreaFlag(float x, float y, float z, bool *isOutdoors) const +uint32 Map::GetAreaId(float x, float y, float z, bool *isOutdoors) const { uint32 mogpFlags; int32 adtId, rootId, groupId; @@ -2341,20 +2425,21 @@ uint16 Map::GetAreaFlag(float x, float y, float z, bool *isOutdoors) const haveAreaInfo = true; wmoEntry = GetWMOAreaTableEntryByTripple(rootId, adtId, groupId); if (wmoEntry) - atEntry = GetAreaEntryByAreaID(wmoEntry->areaId); + atEntry = sAreaTableStore.LookupEntry(wmoEntry->areaId); } - uint16 areaflag; + uint32 areaId = 0; if (atEntry) - areaflag = atEntry->exploreFlag; + areaId = atEntry->ID; else { if (GridMap* gmap = const_cast<Map*>(this)->GetGrid(x, y)) - areaflag = gmap->getArea(x, y); + areaId = gmap->getArea(x, y); + // this used while not all *.map files generated (instances) - else - areaflag = GetAreaFlagByMapId(i_mapEntry->MapID); + if (!areaId) + areaId = i_mapEntry->linked_zone; } if (isOutdoors) @@ -2364,8 +2449,31 @@ uint16 Map::GetAreaFlag(float x, float y, float z, bool *isOutdoors) const else *isOutdoors = true; } - return areaflag; - } + return areaId; +} + +uint32 Map::GetAreaId(float x, float y, float z) const +{ + return GetAreaId(x, y, z, nullptr); +} + +uint32 Map::GetZoneId(float x, float y, float z) const +{ + uint32 areaId = GetAreaId(x, y, z); + if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(areaId)) + if (area->zone) + return area->zone; + + return areaId; +} + +void Map::GetZoneAndAreaId(uint32& zoneid, uint32& areaid, float x, float y, float z) const +{ + areaid = zoneid = GetAreaId(x, y, z); + if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(areaid)) + if (area->zone) + zoneid = area->zone; +} uint8 Map::GetTerrainType(float x, float y) const { @@ -2401,12 +2509,12 @@ ZLiquidStatus Map::getLiquidStatus(float x, float y, float z, uint8 ReqLiquidTyp if (liquid_type && liquid_type < 21) { - if (AreaTableEntry const* area = GetAreaEntryByAreaFlagAndMap(GetAreaFlag(x, y, z), GetId())) + if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(GetAreaId(x, y, z))) { uint32 overrideLiquid = area->LiquidTypeOverride[liquidFlagType]; if (!overrideLiquid && area->zone) { - area = GetAreaEntryByAreaID(area->zone); + area = sAreaTableStore.LookupEntry(area->zone); if (area) overrideLiquid = area->LiquidTypeOverride[liquidFlagType]; } @@ -2468,34 +2576,6 @@ float Map::GetWaterLevel(float x, float y) const return 0; } -uint32 Map::GetAreaIdByAreaFlag(uint16 areaflag, uint32 map_id) -{ - AreaTableEntry const* entry = GetAreaEntryByAreaFlagAndMap(areaflag, map_id); - - if (entry) - return entry->ID; - else - return 0; -} - -uint32 Map::GetZoneIdByAreaFlag(uint16 areaflag, uint32 map_id) -{ - AreaTableEntry const* entry = GetAreaEntryByAreaFlagAndMap(areaflag, map_id); - - if (entry) - return (entry->zone != 0) ? entry->zone : entry->ID; - else - return 0; -} - -void Map::GetZoneAndAreaIdByAreaFlag(uint32& zoneid, uint32& areaid, uint16 areaflag, uint32 map_id) -{ - AreaTableEntry const* entry = GetAreaEntryByAreaFlagAndMap(areaflag, map_id); - - areaid = entry ? entry->ID : 0; - zoneid = entry ? ((entry->zone != 0) ? entry->zone : entry->ID) : 0; -} - bool Map::isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask) const { return VMAP::VMapFactory::createOrGetVMapManager()->isInLineOfSight(GetId(), x1, y1, z1, x2, y2, z2) @@ -3178,22 +3258,37 @@ bool InstanceMap::Reset(uint8 method) } else { + bool doUnload = true; if (method == INSTANCE_RESET_GLOBAL) + { // set the homebind timer for players inside (1 minute) for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr) - itr->GetSource()->m_InstanceValid = false; + { + InstancePlayerBind* bind = itr->GetSource()->GetBoundInstance(GetId(), GetDifficulty()); + if (bind && bind->extendState && bind->save->GetInstanceId() == GetInstanceId()) + doUnload = false; + else + itr->GetSource()->m_InstanceValid = false; + } + + if (doUnload && HasPermBoundPlayers()) // check if any unloaded players have a nonexpired save to this + doUnload = false; + } - // the unload timer is not started - // instead the map will unload immediately after the players have left - m_unloadWhenEmpty = true; - m_resetAfterUnload = true; + if (doUnload) + { + // the unload timer is not started + // instead the map will unload immediately after the players have left + m_unloadWhenEmpty = true; + m_resetAfterUnload = true; + } } } else { // unloaded at next update m_unloadTimer = MIN_UNLOAD_DELAY; - m_resetAfterUnload = true; + m_resetAfterUnload = !(method == INSTANCE_RESET_GLOBAL && HasPermBoundPlayers()); } return m_mapRefManager.isEmpty(); @@ -3274,6 +3369,13 @@ MapDifficulty const* Map::GetMapDifficulty() const return GetMapDifficultyData(GetId(), GetDifficulty()); } +bool InstanceMap::HasPermBoundPlayers() const +{ + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PERM_BIND_BY_INSTANCE); + stmt->setUInt16(0,GetInstanceId()); + return !!CharacterDatabase.Query(stmt); +} + uint32 InstanceMap::GetMaxPlayers() const { MapDifficulty const* mapDiff = GetMapDifficulty(); diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 01db38d9c30..bc2bf72f271 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -98,9 +98,10 @@ struct map_areaHeader uint16 gridArea; }; -#define MAP_HEIGHT_NO_HEIGHT 0x0001 -#define MAP_HEIGHT_AS_INT16 0x0002 -#define MAP_HEIGHT_AS_INT8 0x0004 +#define MAP_HEIGHT_NO_HEIGHT 0x0001 +#define MAP_HEIGHT_AS_INT16 0x0002 +#define MAP_HEIGHT_AS_INT8 0x0004 +#define MAP_HEIGHT_HAS_FLIGHT_BOUNDS 0x0008 struct map_heightHeader { @@ -166,6 +167,8 @@ class GridMap uint16* m_uint16_V8; uint8* m_uint8_V8; }; + int16* _maxHeight; + int16* _minHeight; // Height level data float _gridHeight; float _gridIntHeightMultiplier; @@ -206,6 +209,7 @@ public: uint16 getArea(float x, float y) const; inline float getHeight(float x, float y) const {return (this->*_gridGetHeight)(x, y);} + float getMinHeight(float x, float y) const; float getLiquidLevel(float x, float y) const; uint8 getTerrainType(float x, float y) const; ZLiquidStatus getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData* data = 0); @@ -326,11 +330,15 @@ class Map : public GridRefManager<NGridType> // some calls like isInWater should not use vmaps due to processor power // can return INVALID_HEIGHT if under z+2 z coord not found height float GetHeight(float x, float y, float z, bool checkVMap = true, float maxSearchDist = DEFAULT_HEIGHT_SEARCH) const; + float GetMinHeight(float x, float y) const; ZLiquidStatus getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData* data = nullptr) const; - uint16 GetAreaFlag(float x, float y, float z, bool *isOutdoors=nullptr) const; - bool GetAreaInfo(float x, float y, float z, uint32 &mogpflags, int32 &adtId, int32 &rootId, int32 &groupId) const; + uint32 GetAreaId(float x, float y, float z, bool *isOutdoors) const; + bool GetAreaInfo(float x, float y, float z, uint32& mogpflags, int32& adtId, int32& rootId, int32& groupId) const; + uint32 GetAreaId(float x, float y, float z) const; + uint32 GetZoneId(float x, float y, float z) const; + void GetZoneAndAreaId(uint32& zoneid, uint32& areaid, float x, float y, float z) const; bool IsOutdoors(float x, float y, float z) const; @@ -339,25 +347,6 @@ class Map : public GridRefManager<NGridType> bool IsInWater(float x, float y, float z, LiquidData* data = nullptr) const; bool IsUnderWater(float x, float y, float z) const; - static uint32 GetAreaIdByAreaFlag(uint16 areaflag, uint32 map_id); - static uint32 GetZoneIdByAreaFlag(uint16 areaflag, uint32 map_id); - static void GetZoneAndAreaIdByAreaFlag(uint32& zoneid, uint32& areaid, uint16 areaflag, uint32 map_id); - - uint32 GetAreaId(float x, float y, float z) const - { - return GetAreaIdByAreaFlag(GetAreaFlag(x, y, z), GetId()); - } - - uint32 GetZoneId(float x, float y, float z) const - { - return GetZoneIdByAreaFlag(GetAreaFlag(x, y, z), GetId()); - } - - void GetZoneAndAreaId(uint32& zoneid, uint32& areaid, float x, float y, float z) const - { - GetZoneAndAreaIdByAreaFlag(zoneid, areaid, GetAreaFlag(x, y, z), GetId()); - } - void MoveAllCreaturesInMoveList(); void MoveAllGameObjectsInMoveList(); void MoveAllDynamicObjectsInMoveList(); @@ -782,6 +771,9 @@ class InstanceMap : public Map void SendResetWarnings(uint32 timeLeft) const; void SetResetSchedule(bool on); + /* this checks if any players have a permanent bind (included reactivatable expired binds) to the instance ID + it needs a DB query, so use sparingly */ + bool HasPermBoundPlayers() const; uint32 GetMaxPlayers() const; uint32 GetMaxResetDelay() const; diff --git a/src/server/game/Maps/MapManager.h b/src/server/game/Maps/MapManager.h index 51bb418bdf5..7f9621593d4 100644 --- a/src/server/game/Maps/MapManager.h +++ b/src/server/game/Maps/MapManager.h @@ -42,22 +42,20 @@ class MapManager Map* CreateMap(uint32 mapId, Player* player, uint32 loginInstanceId=0); Map* FindMap(uint32 mapId, uint32 instanceId) const; - uint16 GetAreaFlag(uint32 mapid, float x, float y, float z) const - { - Map const* m = const_cast<MapManager*>(this)->CreateBaseMap(mapid); - return m->GetAreaFlag(x, y, z); - } uint32 GetAreaId(uint32 mapid, float x, float y, float z) const { - return Map::GetAreaIdByAreaFlag(GetAreaFlag(mapid, x, y, z), mapid); + Map const* m = const_cast<MapManager*>(this)->CreateBaseMap(mapid); + return m->GetAreaId(x, y, z); } uint32 GetZoneId(uint32 mapid, float x, float y, float z) const { - return Map::GetZoneIdByAreaFlag(GetAreaFlag(mapid, x, y, z), mapid); + Map const* m = const_cast<MapManager*>(this)->CreateBaseMap(mapid); + return m->GetZoneId(x, y, z); } void GetZoneAndAreaId(uint32& zoneid, uint32& areaid, uint32 mapid, float x, float y, float z) { - Map::GetZoneAndAreaIdByAreaFlag(zoneid, areaid, GetAreaFlag(mapid, x, y, z), mapid); + Map const* m = const_cast<MapManager*>(this)->CreateBaseMap(mapid); + m->GetZoneAndAreaId(zoneid, areaid, x, y, z); } void Initialize(void); diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h index 52b80ce92ab..b5c6f37b14e 100644 --- a/src/server/game/Miscellaneous/Formulas.h +++ b/src/server/game/Miscellaneous/Formulas.h @@ -185,6 +185,9 @@ namespace Trinity } xpMod *= isBattleGround ? sWorld->getRate(RATE_XP_BG_KILL) : sWorld->getRate(RATE_XP_KILL); + if (creature && creature->m_PlayerDamageReq) // if players dealt less than 50% of the damage and were credited anyway (due to CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ), scale XP gained appropriately (linear scaling) + xpMod *= 1.0f - 2.0f*creature->m_PlayerDamageReq / creature->GetMaxHealth(); + gain = uint32(gain * xpMod); } diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp index 3fcae1398f9..05948b987ad 100644 --- a/src/server/game/Movement/MotionMaster.cpp +++ b/src/server/game/Movement/MotionMaster.cpp @@ -366,10 +366,10 @@ void MotionMaster::MoveJumpTo(float angle, float speedXY, float speedZ) float moveTimeHalf = speedZ / Movement::gravity; float dist = 2 * moveTimeHalf * speedXY; _owner->GetClosePoint(x, y, z, _owner->GetObjectSize(), dist, angle); - MoveJump(x, y, z, speedXY, speedZ); + MoveJump(x, y, z, 0.0f, speedXY, speedZ); } -void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float speedZ, uint32 id) +void MotionMaster::MoveJump(float x, float y, float z, float o, float speedXY, float speedZ, uint32 id, bool hasOrientation /* = false*/) { TC_LOG_DEBUG("misc", "Unit (GUID: %u) jump to point (X: %f Y: %f Z: %f)", _owner->GetGUID().GetCounter(), x, y, z); if (speedXY <= 0.1f) @@ -382,6 +382,8 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee init.MoveTo(x, y, z, false); init.SetParabolic(max_height, 0); init.SetVelocity(speedXY); + if (hasOrientation) + init.SetFacing(o); init.Launch(); Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED); } diff --git a/src/server/game/Movement/MotionMaster.h b/src/server/game/Movement/MotionMaster.h index ce0f1f7836e..76ae12986d5 100644 --- a/src/server/game/Movement/MotionMaster.h +++ b/src/server/game/Movement/MotionMaster.h @@ -181,9 +181,11 @@ class MotionMaster //: private std::stack<MovementGenerator *> void MoveCharge(PathGenerator const& path, float speed = SPEED_CHARGE); void MoveKnockbackFrom(float srcX, float srcY, float speedXY, float speedZ); void MoveJumpTo(float angle, float speedXY, float speedZ); - void MoveJump(Position const& pos, float speedXY, float speedZ, uint32 id = EVENT_JUMP) - { MoveJump(pos.m_positionX, pos.m_positionY, pos.m_positionZ, speedXY, speedZ, id); } - void MoveJump(float x, float y, float z, float speedXY, float speedZ, uint32 id = EVENT_JUMP); + void MoveJump(Position const& pos, float speedXY, float speedZ, uint32 id = EVENT_JUMP, bool hasOrientation = false) + { + MoveJump(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), speedXY, speedZ, id, hasOrientation); + } + void MoveJump(float x, float y, float z, float o, float speedXY, float speedZ, uint32 id = EVENT_JUMP, bool hasOrientation = false); void MoveCirclePath(float x, float y, float z, float radius, bool clockwise, uint8 stepCount); void MoveSmoothPath(uint32 pointId, G3D::Vector3 const* pathPoints, size_t pathSize, bool walk); void MoveFall(uint32 id = 0); diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp index 868cba9a5b9..d329ab27de9 100644 --- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp @@ -687,7 +687,7 @@ void OutdoorPvP::BroadcastWorker(Worker& _worker, uint32 zoneId) void OutdoorPvP::SetMapFromZone(uint32 zone) { - AreaTableEntry const* areaTable = GetAreaEntryByAreaID(zone); + AreaTableEntry const* areaTable = sAreaTableStore.LookupEntry(zone); ASSERT(areaTable); Map* map = sMapMgr->CreateBaseMap(areaTable->mapid); ASSERT(!map->Instanceable()); diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 3fa16cf4517..4b26ba96c9b 100644 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -37,7 +37,6 @@ // namespace // { - UnusedScriptContainer UnusedScripts; UnusedScriptNamesContainer UnusedScriptNames; // } @@ -107,8 +106,9 @@ class ScriptRegistry // The actual list of scripts. This will be accessed concurrently, so it must not be modified // after server startup. static ScriptMap ScriptPointerList; + static std::vector<TScript*> Scripts; - static void AddScript(TScript* const script) + static void AddScript(TScript* const script, bool addToDeleteContainer = true) { ASSERT(script); @@ -126,6 +126,8 @@ class ScriptRegistry } AddScript(is_script_database_bound<TScript>{}, script); + if (addToDeleteContainer) + Scripts.push_back(script); } // Gets a script by its ID (assigned by ObjectMgr). @@ -186,11 +188,6 @@ class ScriptRegistry { // The script uses a script name from database, but isn't assigned to anything. TC_LOG_ERROR("sql.sql", "Script named '%s' does not have a script name assigned in database.", script->GetName().c_str()); - - // Avoid calling "delete script;" because we are currently in the script constructor - // In a valid scenario this will not happen because every script has a name assigned in the database - UnusedScripts.push_back(script); - return; } } @@ -210,6 +207,7 @@ class ScriptRegistry #define SCR_REG_MAP(T) ScriptRegistry<T>::ScriptMap #define SCR_REG_ITR(T) ScriptRegistry<T>::ScriptMapIterator #define SCR_REG_LST(T) ScriptRegistry<T>::ScriptPointerList +#define SCR_REG_VEC(T) ScriptRegistry<T>::Scripts // Utility macros for looping over scripts. #define FOR_SCRIPTS(T, C, E) \ @@ -266,17 +264,15 @@ void ScriptMgr::Initialize() } #endif - UnloadUnusedScripts(); - TC_LOG_INFO("server.loading", ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime)); } void ScriptMgr::Unload() { #define SCR_CLEAR(T) \ - for (SCR_REG_ITR(T) itr = SCR_REG_LST(T).begin(); itr != SCR_REG_LST(T).end(); ++itr) \ - delete itr->second; \ - SCR_REG_LST(T).clear(); + for (T* scr : SCR_REG_VEC(T)) \ + delete scr; \ + SCR_REG_VEC(T).clear(); // Clear scripts for every script type. SCR_CLEAR(SpellScriptLoader); @@ -308,19 +304,10 @@ void ScriptMgr::Unload() #undef SCR_CLEAR - UnloadUnusedScripts(); - delete[] SpellSummary; delete[] UnitAI::AISpellInfo; } -void ScriptMgr::UnloadUnusedScripts() -{ - for (size_t i = 0; i < UnusedScripts.size(); ++i) - delete UnusedScripts[i]; - UnusedScripts.clear(); -} - void ScriptMgr::LoadDatabase() { sScriptSystemMgr->LoadScriptWaypoints(); @@ -1368,9 +1355,9 @@ void ScriptMgr::OnPlayerSave(Player* player) FOREACH_SCRIPT(PlayerScript)->OnSave(player); } -void ScriptMgr::OnPlayerBindToInstance(Player* player, Difficulty difficulty, uint32 mapid, bool permanent) +void ScriptMgr::OnPlayerBindToInstance(Player* player, Difficulty difficulty, uint32 mapid, bool permanent, uint8 extendState) { - FOREACH_SCRIPT(PlayerScript)->OnBindToInstance(player, difficulty, mapid, permanent); + FOREACH_SCRIPT(PlayerScript)->OnBindToInstance(player, difficulty, mapid, permanent, extendState); } void ScriptMgr::OnPlayerUpdateZone(Player* player, uint32 newZone, uint32 newArea) @@ -1555,8 +1542,7 @@ FormulaScript::FormulaScript(const char* name) UnitScript::UnitScript(const char* name, bool addToScripts) : ScriptObject(name) { - if (addToScripts) - ScriptRegistry<UnitScript>::AddScript(this); + ScriptRegistry<UnitScript>::AddScript(this, addToScripts); } WorldMapScript::WorldMapScript(const char* name, uint32 mapId) @@ -1696,6 +1682,7 @@ GroupScript::GroupScript(const char* name) // Instantiate static members of ScriptRegistry. template<class TScript> std::map<uint32, TScript*> ScriptRegistry<TScript>::ScriptPointerList; +template<class TScript> std::vector<TScript*> ScriptRegistry<TScript>::Scripts; template<class TScript> uint32 ScriptRegistry<TScript>::_scriptIdCounter = 0; // Specialize for each script type class like so: diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 5dfc0be688a..8a00305b4da 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -734,7 +734,7 @@ class PlayerScript : public UnitScript virtual void OnSave(Player* /*player*/) { } // Called when a player is bound to an instance - virtual void OnBindToInstance(Player* /*player*/, Difficulty /*difficulty*/, uint32 /*mapId*/, bool /*permanent*/) { } + virtual void OnBindToInstance(Player* /*player*/, Difficulty /*difficulty*/, uint32 /*mapId*/, bool /*permanent*/, uint8 /*extendState*/) { } // Called when a player switches to a new zone virtual void OnUpdateZone(Player* /*player*/, uint32 /*newZone*/, uint32 /*newArea*/) { } @@ -843,10 +843,7 @@ class GroupScript : public ScriptObject // namespace // { - typedef std::vector<ScriptObject*> UnusedScriptContainer; typedef std::list<std::string> UnusedScriptNamesContainer; - - extern UnusedScriptContainer UnusedScripts; extern UnusedScriptNamesContainer UnusedScriptNames; // } @@ -878,7 +875,6 @@ class ScriptMgr public: /* Unloading */ void Unload(); - void UnloadUnusedScripts(); public: /* SpellScriptLoader */ @@ -1054,7 +1050,7 @@ class ScriptMgr void OnPlayerDelete(ObjectGuid guid, uint32 accountId); void OnPlayerFailedDelete(ObjectGuid guid, uint32 accountId); void OnPlayerSave(Player* player); - void OnPlayerBindToInstance(Player* player, Difficulty difficulty, uint32 mapid, bool permanent); + void OnPlayerBindToInstance(Player* player, Difficulty difficulty, uint32 mapid, bool permanent, uint8 extendState); void OnPlayerUpdateZone(Player* player, uint32 newZone, uint32 newArea); void OnQuestStatusChange(Player* player, uint32 questId, QuestStatus status); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index a4e7f61d83c..207908c6d51 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1103,18 +1103,11 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const if (apply) { - // Remove cooldown of spells triggered on stance change - they may share cooldown with stance spell if (spellId) - { - target->GetSpellHistory()->ResetCooldown(spellId); target->CastSpell(target, spellId, true, NULL, this); - } if (spellId2) - { - target->GetSpellHistory()->ResetCooldown(spellId2); target->CastSpell(target, spellId2, true, NULL, this); - } if (target->GetTypeId() == TYPEID_PLAYER) { @@ -4690,11 +4683,6 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool if (target->GetTypeId() == TYPEID_PLAYER) target->ToPlayer()->RemoveAmmo(); // not use ammo and not allow use break; - case 52916: // Honor Among Thieves - if (target->GetTypeId() == TYPEID_PLAYER) - if (Unit* spellTarget = ObjectAccessor::GetUnit(*target, target->ToPlayer()->GetComboTarget())) - target->CastSpell(spellTarget, 51699, true); - break; case 71563: if (Aura* newAura = target->AddAura(71564, target)) newAura->SetStackAmount(newAura->GetSpellInfo()->StackAmount); @@ -5626,25 +5614,6 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster) target->RemoveAurasDueToSpell(28820); return; } - // Totemic Mastery (Skyshatter Regalia (Shaman Tier 6) - bonus) - case 38443: - { - bool all = true; - for (int i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i) - { - if (!target->m_SummonSlot[i]) - { - all = false; - break; - } - } - - if (all) - target->CastSpell(target, 38437, true, NULL, this); - else - target->RemoveAurasDueToSpell(38437); - return; - } } break; } diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 1b7e0f1ea0d..1ca5df6b327 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1487,7 +1487,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b { // This additional check is needed to add a minimal delay before cooldown in in effect // to allow all bubbles broken by a single damage source proc mana return - if (caster->GetSpellHistory()->GetRemainingCooldown(aura->GetSpellInfo()) <= 11) + if (caster->GetSpellHistory()->GetRemainingCooldown(aura->GetSpellInfo()) <= 11 * IN_MILLISECONDS) break; } else // and add if needed diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 84bff4a69d6..23e2f144ff2 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2429,7 +2429,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target) if (missInfo != SPELL_MISS_EVADE && !m_caster->IsFriendlyTo(unit) && (!m_spellInfo->IsPositive() || m_spellInfo->HasEffect(SPELL_EFFECT_DISPEL))) { - m_caster->CombatStart(unit, !m_spellInfo->HasAttribute(SPELL_ATTR3_NO_INITIAL_AGGRO)); + m_caster->CombatStart(unit, m_spellInfo->HasInitialAggro()); if (!unit->IsStandState()) unit->SetStandState(UNIT_STAND_STATE_STAND); @@ -2535,7 +2535,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA if (m_caster->GetTypeId() == TYPEID_PLAYER) m_caster->ToPlayer()->UpdatePvP(true); } - if (unit->IsInCombat() && !m_spellInfo->HasAttribute(SPELL_ATTR3_NO_INITIAL_AGGRO)) + if (unit->IsInCombat() && m_spellInfo->HasInitialAggro()) { m_caster->SetInCombatState(unit->GetCombatTimer() > 0, unit); unit->getHostileRefManager().threatAssist(m_caster, 0.0f); @@ -4611,8 +4611,7 @@ void Spell::HandleThreatSpells() if (m_UniqueTargetInfo.empty()) return; - if (m_spellInfo->HasAttribute(SPELL_ATTR1_NO_THREAT) || - m_spellInfo->HasAttribute(SPELL_ATTR3_NO_INITIAL_AGGRO)) + if (!m_spellInfo->HasInitialAggro()) return; float threat = 0.0f; @@ -4623,7 +4622,7 @@ void Spell::HandleThreatSpells() threat += threatEntry->flatMod; } - else if (m_spellInfo->HasAttribute(SPELL_ATTR0_CU_NO_INITIAL_THREAT) == 0) + else if (!m_spellInfo->HasAttribute(SPELL_ATTR0_CU_NO_INITIAL_THREAT)) threat += m_spellInfo->SpellLevel; // past this point only multiplicative effects occur @@ -4701,7 +4700,7 @@ SpellCastResult Spell::CheckCast(bool strict) return SPELL_FAILED_NOT_READY; } - if (!m_caster->GetSpellHistory()->IsReady(m_spellInfo, m_castItemEntry)) + if (!m_caster->GetSpellHistory()->IsReady(m_spellInfo, m_castItemEntry, IsIgnoringCooldowns())) { if (m_triggeredByAuraSpell) return SPELL_FAILED_DONT_REPORT; @@ -5477,7 +5476,7 @@ SpellCastResult Spell::CheckCast(bool strict) if (m_originalCaster && m_originalCaster->GetTypeId() == TYPEID_PLAYER && m_originalCaster->IsAlive()) { Battlefield* Bf = sBattlefieldMgr->GetBattlefieldToZoneId(m_originalCaster->GetZoneId()); - if (AreaTableEntry const* area = GetAreaEntryByAreaID(m_originalCaster->GetAreaId())) + if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(m_originalCaster->GetAreaId())) if (area->flags & AREA_FLAG_NO_FLY_ZONE || (Bf && !Bf->CanFlyIn())) return (_triggeredCastFlags & TRIGGERED_DONT_REPORT_CAST_ERROR) ? SPELL_FAILED_DONT_REPORT : SPELL_FAILED_NOT_HERE; } diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 40bd4e3c263..9535ca291eb 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -877,11 +877,6 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex) values.AddSpellMod(SPELLVALUE_BASE_POINT2, damage); } - // Remove spell cooldown (not category) if spell triggering spell with cooldown and same category - if (m_caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->CategoryRecoveryTime && spellInfo->CategoryRecoveryTime - && m_spellInfo->GetCategory() == spellInfo->GetCategory()) - m_caster->GetSpellHistory()->ResetCooldown(spellInfo->Id); - // original caster guid only for GO cast m_caster->CastSpell(targets, spellInfo, &values, TRIGGERED_FULL_MASK, NULL, NULL, m_originalCasterGUID); } @@ -930,11 +925,6 @@ void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex) values.AddSpellMod(SPELLVALUE_BASE_POINT2, damage); } - // Remove spell cooldown (not category) if spell triggering spell with cooldown and same category - if (m_caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->CategoryRecoveryTime && spellInfo->CategoryRecoveryTime - && m_spellInfo->GetCategory() == spellInfo->GetCategory()) - m_caster->GetSpellHistory()->ResetCooldown(spellInfo->Id); - // original caster guid only for GO cast m_caster->CastSpell(targets, spellInfo, &values, TRIGGERED_FULL_MASK, NULL, NULL, m_originalCasterGUID); } @@ -1031,7 +1021,7 @@ void Spell::EffectJump(SpellEffIndex effIndex) float speedXY, speedZ; CalculateJumpSpeeds(effIndex, m_caster->GetExactDist2d(x, y), speedXY, speedZ); - m_caster->GetMotionMaster()->MoveJump(x, y, z, speedXY, speedZ); + m_caster->GetMotionMaster()->MoveJump(x, y, z, 0.0f, speedXY, speedZ, EVENT_JUMP, false); } void Spell::EffectJumpDest(SpellEffIndex effIndex) @@ -1045,13 +1035,9 @@ void Spell::EffectJumpDest(SpellEffIndex effIndex) if (!m_targets.HasDst()) return; - // Init dest coordinates - float x, y, z; - destTarget->GetPosition(x, y, z); - float speedXY, speedZ; - CalculateJumpSpeeds(effIndex, m_caster->GetExactDist2d(x, y), speedXY, speedZ); - m_caster->GetMotionMaster()->MoveJump(x, y, z, speedXY, speedZ); + CalculateJumpSpeeds(effIndex, m_caster->GetExactDist2d(destTarget), speedXY, speedZ); + m_caster->GetMotionMaster()->MoveJump(*destTarget, speedXY, speedZ, EVENT_JUMP, true); } void Spell::CalculateJumpSpeeds(uint8 i, float dist, float & speedXY, float & speedZ) @@ -4147,14 +4133,14 @@ void Spell::EffectDuel(SpellEffIndex effIndex) return; // Players can only fight a duel in zones with this flag - AreaTableEntry const* casterAreaEntry = GetAreaEntryByAreaID(caster->GetAreaId()); + AreaTableEntry const* casterAreaEntry = sAreaTableStore.LookupEntry(caster->GetAreaId()); if (casterAreaEntry && !(casterAreaEntry->flags & AREA_FLAG_ALLOW_DUELS)) { SendCastResult(SPELL_FAILED_NO_DUELING); // Dueling isn't allowed here return; } - AreaTableEntry const* targetAreaEntry = GetAreaEntryByAreaID(target->GetAreaId()); + AreaTableEntry const* targetAreaEntry = sAreaTableStore.LookupEntry(target->GetAreaId()); if (targetAreaEntry && !(targetAreaEntry->flags & AREA_FLAG_ALLOW_DUELS)) { SendCastResult(SPELL_FAILED_NO_DUELING); // Dueling isn't allowed here @@ -4913,7 +4899,7 @@ void Spell::EffectPullTowards(SpellEffIndex effIndex) float speedXY = float(m_spellInfo->Effects[effIndex].MiscValue) * 0.1f; float speedZ = unitTarget->GetDistance(pos) / speedXY * 0.5f * Movement::gravity; - unitTarget->GetMotionMaster()->MoveJump(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), speedXY, speedZ); + unitTarget->GetMotionMaster()->MoveJump(pos, speedXY, speedZ); } void Spell::EffectDispelMechanic(SpellEffIndex effIndex) diff --git a/src/server/game/Spells/SpellHistory.cpp b/src/server/game/Spells/SpellHistory.cpp index ac08f681933..adf5fc47c77 100644 --- a/src/server/game/Spells/SpellHistory.cpp +++ b/src/server/game/Spells/SpellHistory.cpp @@ -182,13 +182,13 @@ void SpellHistory::HandleCooldowns(SpellInfo const* spellInfo, uint32 itemID, Sp StartCooldown(spellInfo, itemID, spell); } -bool SpellHistory::IsReady(SpellInfo const* spellInfo, uint32 itemId /*= 0*/) const +bool SpellHistory::IsReady(SpellInfo const* spellInfo, uint32 itemId /*= 0*/, bool ignoreCategoryCooldown /*= false*/) const { if (spellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE) if (IsSchoolLocked(spellInfo->GetSchoolMask())) return false; - if (HasCooldown(spellInfo->Id, itemId)) + if (HasCooldown(spellInfo->Id, itemId, ignoreCategoryCooldown)) return false; return true; @@ -465,11 +465,14 @@ void SpellHistory::ResetAllCooldowns() _spellCooldowns.clear(); } -bool SpellHistory::HasCooldown(SpellInfo const* spellInfo, uint32 itemId /*= 0*/) const +bool SpellHistory::HasCooldown(SpellInfo const* spellInfo, uint32 itemId /*= 0*/, bool ignoreCategoryCooldown /*= false*/) const { if (_spellCooldowns.count(spellInfo->Id) != 0) return true; + if (ignoreCategoryCooldown) + return false; + uint32 category = 0; GetCooldownDurations(spellInfo, itemId, nullptr, &category, nullptr); if (!category) @@ -478,9 +481,9 @@ bool SpellHistory::HasCooldown(SpellInfo const* spellInfo, uint32 itemId /*= 0*/ return _categoryCooldowns.count(category) != 0; } -bool SpellHistory::HasCooldown(uint32 spellId, uint32 itemId /*= 0*/) const +bool SpellHistory::HasCooldown(uint32 spellId, uint32 itemId /*= 0*/, bool ignoreCategoryCooldown /*= false*/) const { - return HasCooldown(sSpellMgr->EnsureSpellInfo(spellId), itemId); + return HasCooldown(sSpellMgr->EnsureSpellInfo(spellId), itemId, ignoreCategoryCooldown); } uint32 SpellHistory::GetRemainingCooldown(SpellInfo const* spellInfo) const diff --git a/src/server/game/Spells/SpellHistory.h b/src/server/game/Spells/SpellHistory.h index 00c790a670d..f0a53fe130d 100644 --- a/src/server/game/Spells/SpellHistory.h +++ b/src/server/game/Spells/SpellHistory.h @@ -62,7 +62,7 @@ public: void HandleCooldowns(SpellInfo const* spellInfo, Item const* item, Spell* spell = nullptr); void HandleCooldowns(SpellInfo const* spellInfo, uint32 itemID, Spell* spell = nullptr); - bool IsReady(SpellInfo const* spellInfo, uint32 itemId = 0) const; + bool IsReady(SpellInfo const* spellInfo, uint32 itemId = 0, bool ignoreCategoryCooldown = false) const; template<class OwnerType> void WritePacket(WorldPacket& packet) const; @@ -105,8 +105,8 @@ public: } void ResetAllCooldowns(); - bool HasCooldown(SpellInfo const* spellInfo, uint32 itemId = 0) const; - bool HasCooldown(uint32 spellId, uint32 itemId = 0) const; + bool HasCooldown(SpellInfo const* spellInfo, uint32 itemId = 0, bool ignoreCategoryCooldown = false) const; + bool HasCooldown(uint32 spellId, uint32 itemId = 0, bool ignoreCategoryCooldown = false) const; uint32 GetRemainingCooldown(SpellInfo const* spellInfo) const; // School lockouts diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 699e4857ee0..069c794ca8b 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1180,6 +1180,11 @@ bool SpellInfo::IsAutoRepeatRangedSpell() const return HasAttribute(SPELL_ATTR2_AUTOREPEAT_FLAG); } +bool SpellInfo::HasInitialAggro() const +{ + return !(HasAttribute(SPELL_ATTR1_NO_THREAT) || HasAttribute(SPELL_ATTR3_NO_INITIAL_AGGRO)); +} + bool SpellInfo::IsAffectedBySpellMods() const { return !HasAttribute(SPELL_ATTR3_NO_DONE_BONUS); diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h index dbbab5fb30b..ba658c885fa 100644 --- a/src/server/game/Spells/SpellInfo.h +++ b/src/server/game/Spells/SpellInfo.h @@ -420,6 +420,7 @@ public: bool IsBreakingStealth() const; bool IsRangedWeaponSpell() const; bool IsAutoRepeatRangedSpell() const; + bool HasInitialAggro() const; bool IsAffectedBySpellMods() const; bool IsAffectedBySpellMod(SpellModifier const* mod) const; diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index e96ed8c6799..f5bb1c920fe 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -969,10 +969,12 @@ bool SpellMgr::CanSpellTriggerProcOnEvent(SpellProcEntry const& procEntry, ProcE // check spell family name/flags (if set) for spells if (eventInfo.GetTypeMask() & (PERIODIC_PROC_FLAG_MASK | SPELL_PROC_FLAG_MASK | PROC_FLAG_DONE_TRAP_ACTIVATION)) { - if (procEntry.spellFamilyName && eventInfo.GetSpellInfo() && (procEntry.spellFamilyName != eventInfo.EnsureSpellInfo()->SpellFamilyName)) + SpellInfo const* eventSpellInfo = eventInfo.GetSpellInfo(); + + if (procEntry.spellFamilyName && eventSpellInfo && (procEntry.spellFamilyName != eventSpellInfo->SpellFamilyName)) return false; - if (procEntry.spellFamilyMask && eventInfo.GetSpellInfo() && !(procEntry.spellFamilyMask & eventInfo.EnsureSpellInfo()->SpellFamilyFlags)) + if (procEntry.spellFamilyMask && eventSpellInfo && !(procEntry.spellFamilyMask & eventSpellInfo->SpellFamilyFlags)) return false; } @@ -1157,7 +1159,7 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32 if (!player) return false; - AreaTableEntry const* pArea = GetAreaEntryByAreaID(player->GetAreaId()); + AreaTableEntry const* pArea = sAreaTableStore.LookupEntry(player->GetAreaId()); if (!(pArea && pArea->flags & AREA_FLAG_NO_FLY_ZONE)) return false; if (!player->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) && !player->HasAuraType(SPELL_AURA_FLY)) @@ -2616,7 +2618,7 @@ void SpellMgr::LoadSpellAreas() } } - if (spellArea.areaId && !GetAreaEntryByAreaID(spellArea.areaId)) + if (spellArea.areaId && !sAreaTableStore.LookupEntry(spellArea.areaId)) { TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` have wrong area (%u) requirement", spell, spellArea.areaId); continue; @@ -2942,6 +2944,7 @@ void SpellMgr::LoadSpellInfoCorrections() case 53096: // Quetz'lun's Judgment case 70743: // AoD Special case 70614: // AoD Special - Vegard + case 4020: // Safirdrang's Chill spellInfo->MaxAffectedTargets = 1; break; case 42436: // Drink! (Brewfest) @@ -2984,13 +2987,6 @@ void SpellMgr::LoadSpellInfoCorrections() case 36350: // They Must Burn Bomb Aura (self) spellInfo->Effects[EFFECT_0].TriggerSpell = 36325; // They Must Burn Bomb Drop (DND) break; - case 49838: // Stop Time - case 69438: // Sample Satisfaction - case 69445: // Perfume Spritz - case 69489: // Chocolate Sample - case 69563: // Cologne Spritz - spellInfo->AttributesEx3 |= SPELL_ATTR3_NO_INITIAL_AGGRO; - break; case 61407: // Energize Cores case 62136: // Energize Cores case 54069: // Energize Cores @@ -3332,6 +3328,8 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->Attributes |= SPELL_ATTR0_PASSIVE; break; case 17364: // Stormstrike + case 48278: // Paralyze + case 53651: // Light's Beacon spellInfo->AttributesEx3 |= SPELL_ATTR3_STACK_FOR_DIFF_CASTERS; break; case 51798: // Brewfest - Relay Race - Intro - Quest Complete @@ -3565,7 +3563,6 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->AreaGroupId = 0; // originally, these require area 4522, which is... outside of Icecrown Citadel break; case 70602: // Corruption - case 48278: // Paralyze spellInfo->AttributesEx3 |= SPELL_ATTR3_STACK_FOR_DIFF_CASTERS; break; case 70715: // Column of Frost (visual marker) diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index 8d3ee939e2c..499f0c9cbf0 100644 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -191,7 +191,6 @@ void CreatureTextMgr::LoadCreatureTextLocales() } while (result->NextRow()); TC_LOG_INFO("server.loading", ">> Loaded %u creature localized texts in %u ms", textCount, GetMSTimeDiffToNow(oldMSTime)); - } uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject const* whisperTarget /*= nullptr*/, ChatMsg msgType /*= CHAT_MSG_ADDON*/, Language language /*= LANG_ADDON*/, CreatureTextRange range /*= TEXT_RANGE_NORMAL*/, uint32 sound /*= 0*/, Team team /*= TEAM_OTHER*/, bool gmOnly /*= false*/, Player* srcPlr /*= nullptr*/) @@ -228,42 +227,10 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject tempGroup = textGroupContainer; } - uint8 count = 0; - float lastChance = -1; - bool isEqualChanced = true; - - float totalChance = 0; - - for (CreatureTextGroup::const_iterator iter = tempGroup.begin(); iter != tempGroup.end(); ++iter) + auto iter = Trinity::Containers::SelectRandomWeightedContainerElement(tempGroup, [](CreatureTextEntry const& t) -> double { - if (lastChance >= 0 && lastChance != iter->probability) - isEqualChanced = false; - - lastChance = iter->probability; - totalChance += iter->probability; - ++count; - } - - int32 offset = -1; - if (!isEqualChanced) - { - for (CreatureTextGroup::const_iterator iter = tempGroup.begin(); iter != tempGroup.end(); ++iter) - { - uint32 chance = uint32(iter->probability); - uint32 r = urand(0, 100); - ++offset; - if (r <= chance) - break; - } - } - - uint32 pos = 0; - if (isEqualChanced || offset < 0) - pos = urand(0, count - 1); - else if (offset >= 0) - pos = offset; - - CreatureTextGroup::const_iterator iter = tempGroup.begin() + pos; + return t.probability; + }); ChatMsg finalType = (msgType == CHAT_MSG_ADDON) ? iter->type : msgType; Language finalLang = (language == LANG_ADDON) ? iter->lang : language; @@ -293,9 +260,7 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject SendChatPacket(finalSource, builder, finalType, whisperTarget, range, team, gmOnly); } - if (isEqualChanced || totalChance == 100.0f) - SetRepeatId(source, textGroup, iter->id); - + SetRepeatId(source, textGroup, iter->id); return iter->duration; } diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 09cc9180a57..289a4d47666 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -575,6 +575,13 @@ void World::LoadConfigSettings(bool reload) m_bool_configs[CONFIG_ADDON_CHANNEL] = sConfigMgr->GetBoolDefault("AddonChannel", true); m_bool_configs[CONFIG_CLEAN_CHARACTER_DB] = sConfigMgr->GetBoolDefault("CleanCharacterDB", false); m_int_configs[CONFIG_PERSISTENT_CHARACTER_CLEAN_FLAGS] = sConfigMgr->GetIntDefault("PersistentCharacterCleanFlags", 0); + m_int_configs[CONFIG_AUCTION_GETALL_DELAY] = sConfigMgr->GetIntDefault("Auction.GetAllScanDelay", 900); + m_int_configs[CONFIG_AUCTION_SEARCH_DELAY] = sConfigMgr->GetIntDefault("Auction.SearchDelay", 300); + if (m_int_configs[CONFIG_AUCTION_SEARCH_DELAY] < 100 || m_int_configs[CONFIG_AUCTION_SEARCH_DELAY] > 10000) + { + TC_LOG_ERROR("server.loading", "Auction.SearchDelay (%i) must be between 100 and 10000. Using default of 300ms", m_int_configs[CONFIG_AUCTION_SEARCH_DELAY]); + m_int_configs[CONFIG_AUCTION_SEARCH_DELAY] = 300; + } m_int_configs[CONFIG_CHAT_CHANNEL_LEVEL_REQ] = sConfigMgr->GetIntDefault("ChatLevelReq.Channel", 1); m_int_configs[CONFIG_CHAT_WHISPER_LEVEL_REQ] = sConfigMgr->GetIntDefault("ChatLevelReq.Whisper", 1); m_int_configs[CONFIG_CHAT_SAY_LEVEL_REQ] = sConfigMgr->GetIntDefault("ChatLevelReq.Say", 1); diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index a624fd6e6a7..00b244c9efb 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -356,6 +356,8 @@ enum WorldIntConfigs CONFIG_CHARTER_COST_ARENA_5v5, CONFIG_NO_GRAY_AGGRO_ABOVE, CONFIG_NO_GRAY_AGGRO_BELOW, + CONFIG_AUCTION_GETALL_DELAY, + CONFIG_AUCTION_SEARCH_DELAY, INT_CONFIG_VALUE_COUNT }; diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 9902b83ff63..b937fc4e0a4 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -93,7 +93,8 @@ public: { "moveflags", rbac::RBAC_PERM_COMMAND_DEBUG_MOVEFLAGS, false, &HandleDebugMoveflagsCommand, "" }, { "transport", rbac::RBAC_PERM_COMMAND_DEBUG_TRANSPORT, false, &HandleDebugTransportCommand, "" }, { "loadcells", rbac::RBAC_PERM_COMMAND_DEBUG_LOADCELLS, false, &HandleDebugLoadCellsCommand, "" }, - { "boundary", rbac::RBAC_PERM_COMMAND_DEBUG_BOUNDARY, false, &HandleDebugBoundaryCommand, "" } + { "boundary", rbac::RBAC_PERM_COMMAND_DEBUG_BOUNDARY, false, &HandleDebugBoundaryCommand, "" }, + { "raidreset", rbac::RBAC_PERM_COMMAND_INSTANCE_UNBIND, false, &HandleDebugRaidResetCommand, "" } }; static std::vector<ChatCommand> commandTable = { @@ -1442,6 +1443,32 @@ public: return true; } + + static bool HandleDebugRaidResetCommand(ChatHandler* /*handler*/, char const* args) + { + char* map_str = args ? strtok((char*)args, " ") : nullptr; + char* difficulty_str = args ? strtok(nullptr, " ") : nullptr; + + int32 map = map_str ? atoi(map_str) : -1; + if (map <= 0) + return false; + MapEntry const* mEntry = sMapStore.LookupEntry(map); + if (!mEntry || !mEntry->IsRaid()) + return false; + int32 difficulty = difficulty_str ? atoi(difficulty_str) : -1; + if (difficulty >= MAX_RAID_DIFFICULTY || difficulty < -1) + return false; + + if (difficulty == -1) + for (uint8 diff = 0; diff < MAX_RAID_DIFFICULTY; ++diff) + { + if (GetMapDifficultyData(mEntry->MapID, Difficulty(diff))) + sInstanceSaveMgr->ForceGlobalReset(mEntry->MapID, Difficulty(diff)); + } + else + sInstanceSaveMgr->ForceGlobalReset(mEntry->MapID, Difficulty(difficulty)); + return true; + } }; void AddSC_debug_commandscript() diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp index b7acfb85f50..039af61c010 100644 --- a/src/server/scripts/Commands/cs_go.cpp +++ b/src/server/scripts/Commands/cs_go.cpp @@ -424,7 +424,7 @@ public: uint32 areaId = id ? (uint32)atoi(id) : player->GetZoneId(); - AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(areaId); + AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(areaId); if (x < 0 || x > 100 || y < 0 || y > 100 || !areaEntry) { @@ -434,7 +434,7 @@ public: } // update to parent zone if exist (client map show only zones without parents) - AreaTableEntry const* zoneEntry = areaEntry->zone ? GetAreaEntryByAreaID(areaEntry->zone) : areaEntry; + AreaTableEntry const* zoneEntry = areaEntry->zone ? sAreaTableStore.LookupEntry(areaEntry->zone) : areaEntry; ASSERT(zoneEntry); Map const* map = sMapMgr->CreateBaseMap(zoneEntry->mapid); diff --git a/src/server/scripts/Commands/cs_group.cpp b/src/server/scripts/Commands/cs_group.cpp index 5e8952ce881..9f2bc86f9c0 100644 --- a/src/server/scripts/Commands/cs_group.cpp +++ b/src/server/scripts/Commands/cs_group.cpp @@ -348,10 +348,10 @@ public: phase = (!p->IsGameMaster() ? p->GetPhaseMask() : -1); uint32 locale = handler->GetSessionDbcLocale(); - AreaTableEntry const* area = GetAreaEntryByAreaID(p->GetAreaId()); + AreaTableEntry const* area = sAreaTableStore.LookupEntry(p->GetAreaId()); if (area) { - AreaTableEntry const* zone = GetAreaEntryByAreaID(area->zone); + AreaTableEntry const* zone = sAreaTableStore.LookupEntry(area->zone); if (zone) zoneName = zone->area_name[locale]; } diff --git a/src/server/scripts/Commands/cs_instance.cpp b/src/server/scripts/Commands/cs_instance.cpp index a53d1f00b54..d0325a317db 100644 --- a/src/server/scripts/Commands/cs_instance.cpp +++ b/src/server/scripts/Commands/cs_instance.cpp @@ -82,7 +82,7 @@ public: { InstanceSave* save = itr->second.save; std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL)); - handler->PSendSysMessage(LANG_COMMAND_LIST_BIND_INFO, itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str()); + handler->PSendSysMessage(LANG_COMMAND_LIST_BIND_INFO, itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", itr->second.extendState == EXTEND_STATE_EXPIRED ? "expired" : itr->second.extendState == EXTEND_STATE_EXTENDED ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str()); counter++; } } @@ -98,7 +98,7 @@ public: { InstanceSave* save = itr->second.save; std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL)); - handler->PSendSysMessage(LANG_COMMAND_LIST_BIND_INFO, itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str()); + handler->PSendSysMessage(LANG_COMMAND_LIST_BIND_INFO, itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", "-", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str()); counter++; } } diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 4e749d33fcf..61e6acfb4d8 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -97,9 +97,9 @@ public: wstrToLower(wNamePart); // Search in AreaTable.dbc - for (uint32 areaflag = 0; areaflag < sAreaStore.GetNumRows(); ++areaflag) + for (uint32 i = 0; i < sAreaTableStore.GetNumRows(); ++i) { - AreaTableEntry const* areaEntry = sAreaStore.LookupEntry(areaflag); + AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(i); if (areaEntry) { int locale = handler->GetSessionDbcLocale(); diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 6ae509af443..c70246f7fb5 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -198,8 +198,8 @@ public: uint32 mapId = object->GetMapId(); MapEntry const* mapEntry = sMapStore.LookupEntry(mapId); - AreaTableEntry const* zoneEntry = GetAreaEntryByAreaID(zoneId); - AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(areaId); + AreaTableEntry const* zoneEntry = sAreaTableStore.LookupEntry(zoneId); + AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(areaId); float zoneX = object->GetPositionX(); float zoneY = object->GetPositionY(); @@ -961,7 +961,7 @@ public: uint32 zoneId = player->GetZoneId(); - AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(zoneId); + AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(zoneId); if (!areaEntry || areaEntry->zone !=0) { handler->PSendSysMessage(LANG_COMMAND_GRAVEYARDWRONGZONE, graveyardId, zoneId); @@ -1052,17 +1052,23 @@ public: return false; } - int32 area = GetAreaFlagByAreaID(atoi((char*)args)); - int32 offset = area / 32; + AreaTableEntry const* area = sAreaTableStore.LookupEntry(atoi(args)); + if (!area) + { + handler->SendSysMessage(LANG_BAD_VALUE); + handler->SetSentErrorMessage(true); + return false; + } - if (area<0 || offset >= PLAYER_EXPLORED_ZONES_SIZE) + int32 offset = area->exploreFlag / 32; + if (offset >= PLAYER_EXPLORED_ZONES_SIZE) { handler->SendSysMessage(LANG_BAD_VALUE); handler->SetSentErrorMessage(true); return false; } - uint32 val = uint32((1 << (area % 32))); + uint32 val = uint32((1 << (area->exploreFlag % 32))); uint32 currFields = playerTarget->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset); playerTarget->SetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset, uint32((currFields | val))); @@ -1083,17 +1089,23 @@ public: return false; } - int32 area = GetAreaFlagByAreaID(atoi((char*)args)); - int32 offset = area / 32; + AreaTableEntry const* area = sAreaTableStore.LookupEntry(atoi(args)); + if (!area) + { + handler->SendSysMessage(LANG_BAD_VALUE); + handler->SetSentErrorMessage(true); + return false; + } - if (area < 0 || offset >= PLAYER_EXPLORED_ZONES_SIZE) + int32 offset = area->exploreFlag / 32; + if (offset >= PLAYER_EXPLORED_ZONES_SIZE) { handler->SendSysMessage(LANG_BAD_VALUE); handler->SetSentErrorMessage(true); return false; } - uint32 val = uint32((1 << (area % 32))); + uint32 val = uint32((1 << (area->exploreFlag % 32))); uint32 currFields = playerTarget->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset); playerTarget->SetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset, uint32((currFields ^ val))); @@ -1737,12 +1749,12 @@ public: // Position data MapEntry const* map = sMapStore.LookupEntry(mapId); - AreaTableEntry const* area = GetAreaEntryByAreaID(areaId); + AreaTableEntry const* area = sAreaTableStore.LookupEntry(areaId); if (area) { areaName = area->area_name[locale]; - AreaTableEntry const* zone = GetAreaEntryByAreaID(area->zone); + AreaTableEntry const* zone = sAreaTableStore.LookupEntry(area->zone); if (zone) zoneName = zone->area_name[locale]; } diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index daf4fe5866a..fbd199b99db 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -43,7 +43,7 @@ struct EnumName #define CREATE_NAMED_ENUM(VALUE) { VALUE, STRINGIZE(VALUE) } #define NPCFLAG_COUNT 24 -#define FLAGS_EXTRA_COUNT 16 +#define FLAGS_EXTRA_COUNT 19 EnumName<NPCFlags, int32> const npcFlagTexts[NPCFLAG_COUNT] = { @@ -162,7 +162,10 @@ EnumName<CreatureFlagsExtra> const flagsExtra[FLAGS_EXTRA_COUNT] = CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_NO_SKILLGAIN), CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_TAUNT_DIMINISH), CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_ALL_DIMINISH), - CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_DUNGEON_BOSS) + CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ), + CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_DUNGEON_BOSS), + CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING), + CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK) }; class npc_commandscript : public CommandScript diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp index 269e115189a..d5ed2421efc 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp @@ -77,7 +77,7 @@ public: Talk(SAY_RESPAWN); } - bool CheckInRoom() + bool CheckInRoom() override { if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50) { diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp index 93583364ef6..238942c15f6 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp @@ -78,7 +78,7 @@ public: Talk(SAY_BUFF); } - bool CheckInRoom() + bool CheckInRoom() override { if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50) { diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h index 39c9d9a79a7..9fce132ea7e 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h @@ -59,7 +59,7 @@ enum CreatureIds enum GameObjectIds { GO_BLACK_DRAGON_EGG = 177807, - GO_BOSSGATE01 = 175946, + GO_PORTCULLIS = 176965, GO_DRAKE_RIDER_PORTCULLIS = 175185, GO_ALTERAC_VALLEY_GATE = 180424, GO_GATE = 185483, diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp index 83b2b45851c..a4241b16f8d 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp @@ -22,7 +22,7 @@ DoorData const doorData[] = { - { GO_BOSSGATE01, DATA_RAZORGORE_THE_UNTAMED, DOOR_TYPE_PASSAGE }, + { GO_PORTCULLIS, DATA_RAZORGORE_THE_UNTAMED, DOOR_TYPE_PASSAGE }, { GO_DRAKE_RIDER_PORTCULLIS, DATA_VAELASTRAZ_THE_CORRUPT, DOOR_TYPE_PASSAGE }, { GO_ALTERAC_VALLEY_GATE, DATA_BROODLORD_LASHLAYER, DOOR_TYPE_PASSAGE }, { GO_GATE, DATA_FIREMAW, DOOR_TYPE_PASSAGE }, diff --git a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp index 541ddc0e1c8..8f246ab9bf0 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp @@ -25,17 +25,25 @@ EndScriptData */ #include "ScriptedCreature.h" #include "deadmines.h" -enum Spels +enum Spells { SPELL_TRASH = 3391, SPELL_SMITE_STOMP = 6432, SPELL_SMITE_SLAM = 6435, - SPELL_NIMBLE_REFLEXES = 6264, + SPELL_NIMBLE_REFLEXES = 6264 +}; +enum Equips +{ EQUIP_SWORD = 5191, - EQUIP_MACE = 7230, + EQUIP_AXE = 5196, + EQUIP_MACE = 7230 +}; - SAY_AGGRO = 0, +enum Texts +{ + SAY_PHASE_1 = 2, + SAY_PHASE_2 = 3 }; class boss_mr_smite : public CreatureScript @@ -66,6 +74,8 @@ public: uiPhase = 0; uiTimer = 0; + + uiIsMoving = false; } InstanceScript* instance; @@ -79,16 +89,19 @@ public: uint32 uiPhase; uint32 uiTimer; + bool uiIsMoving; + void Reset() override { Initialize(); SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); + me->SetStandState(UNIT_STAND_STATE_STAND); + me->SetReactState(REACT_AGGRESSIVE); } void EnterCombat(Unit* /*who*/) override { - Talk(SAY_AGGRO); } bool bCheckChances() @@ -105,38 +118,52 @@ public: if (!UpdateVictim()) return; - /*START ACID-AI*/ - if (uiTrashTimer <= uiDiff) + if (!uiIsMoving) // halt abilities in between phases { - if (bCheckChances()) - DoCast(me, SPELL_TRASH); - uiTrashTimer = urand(6000, 15500); - } else uiTrashTimer -= uiDiff; + if (uiTrashTimer <= uiDiff) + { + if (bCheckChances()) + DoCast(me, SPELL_TRASH); + uiTrashTimer = urand(6000, 15500); + } + else uiTrashTimer -= uiDiff; - if (uiSlamTimer <= uiDiff) - { - if (bCheckChances()) - DoCastVictim(SPELL_SMITE_SLAM); - uiSlamTimer = 11000; - } else uiSlamTimer -= uiDiff; + if (uiSlamTimer <= uiDiff) + { + if (bCheckChances()) + DoCastVictim(SPELL_SMITE_SLAM); + uiSlamTimer = 11000; + } + else uiSlamTimer -= uiDiff; - if (uiNimbleReflexesTimer <= uiDiff) - { - if (bCheckChances()) - DoCast(me, SPELL_NIMBLE_REFLEXES); - uiNimbleReflexesTimer = urand(27300, 60100); - } else uiNimbleReflexesTimer -= uiDiff; - /*END ACID-AI*/ + if (uiNimbleReflexesTimer <= uiDiff) + { + if (bCheckChances()) + DoCast(me, SPELL_NIMBLE_REFLEXES); + uiNimbleReflexesTimer = urand(27300, 60100); + } + else uiNimbleReflexesTimer -= uiDiff; + } if ((uiHealth == 0 && !HealthAbovePct(66)) || (uiHealth == 1 && !HealthAbovePct(33))) { ++uiHealth; DoCastAOE(SPELL_SMITE_STOMP, false); SetCombatMovement(false); - if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_SMITE_CHEST))) + me->AttackStop(); + me->InterruptNonMeleeSpells(false); + me->SetReactState(REACT_PASSIVE); + uiTimer = 2500; + uiPhase = 1; + + switch (uiHealth) { - me->GetMotionMaster()->Clear(); - me->GetMotionMaster()->MovePoint(1, go->GetPositionX() - 3.0f, go->GetPositionY(), go->GetPositionZ()); + case 1: + Talk(SAY_PHASE_1); + break; + case 2: + Talk(SAY_PHASE_2); + break; } } @@ -147,21 +174,36 @@ public: switch (uiPhase) { case 1: - me->HandleEmoteCommand(EMOTE_STATE_KNEEL); //dosen't work? - uiTimer = 1000; - uiPhase = 2; + { + if (uiIsMoving) + break; + + if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_SMITE_CHEST))) + { + me->GetMotionMaster()->Clear(); + me->GetMotionMaster()->MovePoint(1, go->GetPositionX() - 1.5f, go->GetPositionY() + 1.4f, go->GetPositionZ()); + uiIsMoving = true; + } break; + } case 2: if (uiHealth == 1) - SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_SWORD, EQUIP_NO_CHANGE); + SetEquipmentSlots(false, EQUIP_AXE, EQUIP_AXE, EQUIP_NO_CHANGE); else SetEquipmentSlots(false, EQUIP_MACE, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); uiTimer = 500; uiPhase = 3; break; case 3: + me->SetStandState(UNIT_STAND_STATE_STAND); + uiTimer = 750; + uiPhase = 4; + break; + case 4: + me->SetReactState(REACT_AGGRESSIVE); SetCombatMovement(true); me->GetMotionMaster()->MoveChase(me->GetVictim(), me->m_CombatDistance); + uiIsMoving = false; uiPhase = 0; break; } @@ -176,8 +218,11 @@ public: if (uiType != POINT_MOTION_TYPE) return; - uiTimer = 1500; - uiPhase = 1; + me->SetFacingTo(5.47f); + me->SetStandState(UNIT_STAND_STATE_KNEEL); + + uiTimer = 2000; + uiPhase = 2; } }; }; diff --git a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h index dff4243617e..01ebabb160e 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h +++ b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h @@ -26,6 +26,7 @@ enum CannonState CANNON_GUNPOWDER_USED, CANNON_BLAST_INITIATED, PIRATES_ATTACK, + SMITE_ALARMED, EVENT_DONE }; @@ -48,4 +49,16 @@ enum GameObjects GO_DOOR_LEVER = 101833, GO_MR_SMITE_CHEST = 144111 }; + +enum CreaturesIds +{ + NPC_MR_SMITE = 646 +}; + +enum InstanceTexts +{ + SAY_ALARM1 = 0, + SAY_ALARM2 = 1 +}; + #endif diff --git a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp index 80391ab2873..b827fdf7e8b 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp @@ -32,18 +32,14 @@ EndScriptData */ enum Sounds { SOUND_CANNONFIRE = 1400, - SOUND_DESTROYDOOR = 3079, - SOUND_MR_SMITE_ALARM1 = 5775, - SOUND_MR_SMITE_ALARM2 = 5777 + SOUND_DESTROYDOOR = 3079 }; -#define SAY_MR_SMITE_ALARM1 "You there, check out that noise!" -#define SAY_MR_SMITE_ALARM2 "We're under attack! A vast, ye swabs! Repel the invaders!" - enum Misc { DATA_CANNON_BLAST_TIMER = 3000, - DATA_PIRATES_DELAY_TIMER = 1000 + DATA_PIRATES_DELAY_TIMER = 1000, + DATA_SMITE_ALARM_DELAY_TIMER = 5000 }; class instance_deadmines : public InstanceMapScript @@ -61,6 +57,8 @@ class instance_deadmines : public InstanceMapScript SetHeaders(DataHeader); State = CANNON_NOT_USED; + CannonBlast_Timer = 0; + PiratesDelay_Timer = 0; } ObjectGuid FactoryDoorGUID; @@ -70,10 +68,12 @@ class instance_deadmines : public InstanceMapScript ObjectGuid DefiasPirate1GUID; ObjectGuid DefiasPirate2GUID; ObjectGuid DefiasCompanionGUID; + ObjectGuid MrSmiteGUID; uint32 State; uint32 CannonBlast_Timer; uint32 PiratesDelay_Timer; + uint32 SmiteAlarmDelay_Timer; ObjectGuid uiSmiteChestGUID; virtual void Update(uint32 diff) override @@ -89,22 +89,20 @@ class instance_deadmines : public InstanceMapScript { case CANNON_GUNPOWDER_USED: CannonBlast_Timer = DATA_CANNON_BLAST_TIMER; - // it's a hack - Mr. Smite should do that but his too far away - //pIronCladDoor->SetName("Mr. Smite"); - //pIronCladDoor->MonsterYell(SAY_MR_SMITE_ALARM1, LANG_UNIVERSAL, NULL); - pIronCladDoor->PlayDirectSound(SOUND_MR_SMITE_ALARM1); State = CANNON_BLAST_INITIATED; break; case CANNON_BLAST_INITIATED: PiratesDelay_Timer = DATA_PIRATES_DELAY_TIMER; + SmiteAlarmDelay_Timer = DATA_SMITE_ALARM_DELAY_TIMER; if (CannonBlast_Timer <= diff) { SummonCreatures(); ShootCannon(); BlastOutDoor(); LeverStucked(); - //pIronCladDoor->MonsterYell(SAY_MR_SMITE_ALARM2, LANG_UNIVERSAL, NULL); - pIronCladDoor->PlayDirectSound(SOUND_MR_SMITE_ALARM2); + instance->LoadGrid(-22.8f, -797.24f); // Loads Mr. Smite's grid. + if (Creature* smite = instance->GetCreature(MrSmiteGUID)) // goes off when door blows up + smite->AI()->Talk(SAY_ALARM1); State = PIRATES_ATTACK; } else CannonBlast_Timer -= diff; break; @@ -112,9 +110,17 @@ class instance_deadmines : public InstanceMapScript if (PiratesDelay_Timer <= diff) { MoveCreaturesInside(); - State = EVENT_DONE; + State = SMITE_ALARMED; } else PiratesDelay_Timer -= diff; break; + case SMITE_ALARMED: + if (SmiteAlarmDelay_Timer <= diff) + { + if (Creature* smite = instance->GetCreature(MrSmiteGUID)) + smite->AI()->Talk(SAY_ALARM2); + State = EVENT_DONE; + } else SmiteAlarmDelay_Timer -= diff; + break; } } @@ -178,6 +184,18 @@ class instance_deadmines : public InstanceMapScript pDoorLever->SetUInt32Value(GAMEOBJECT_FLAGS, 4); } + void OnCreatureCreate(Creature* creature) override + { + switch (creature->GetEntry()) + { + case NPC_MR_SMITE: + MrSmiteGUID = creature->GetGUID(); + break; + default: + break; + } + } + void OnGameObjectCreate(GameObject* go) override { switch (go->GetEntry()) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index b23b9e645d0..b725f421c8f 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -44,6 +44,13 @@ EndScriptData */ 11 - Nightbane */ +const Position OptionalSpawn[] = +{ + { -10960.981445f, -1940.138428f, 46.178097f, 4.12f }, // Hyakiss the Lurker + { -10899.903320f, -2085.573730f, 49.474449f, 1.38f }, // Rokad the Ravager + { -10945.769531f, -2040.153320f, 49.474438f, 0.077f } // Shadikith the Glider +}; + class instance_karazhan : public InstanceMapScript { public: @@ -64,6 +71,7 @@ public: // 1 - OZ, 2 - HOOD, 3 - RAJ, this never gets altered. m_uiOperaEvent = urand(1, 3); m_uiOzDeathCount = 0; + OptionalBossCount = 0; } uint32 m_auiEncounter[MAX_ENCOUNTER]; @@ -71,6 +79,7 @@ public: uint32 m_uiOperaEvent; uint32 m_uiOzDeathCount; + uint32 OptionalBossCount; ObjectGuid m_uiCurtainGUID; ObjectGuid m_uiStageDoorLeftGUID; @@ -107,6 +116,29 @@ public: } } + void OnUnitDeath(Unit* unit) override + { + Creature* creature = unit->ToCreature(); + if (!creature) + return; + + switch (creature->GetEntry()) + { + case NPC_COLDMIST_WIDOW: + case NPC_COLDMIST_STALKER: + case NPC_SHADOWBAT: + case NPC_VAMPIRIC_SHADOWBAT: + case NPC_GREATER_SHADOWBAT: + case NPC_PHASE_HOUND: + case NPC_DREADBEAST: + case NPC_SHADOWBEAST: + SetData(TYPE_OPTIONAL_BOSS, NOT_STARTED); + break; + default: + break; + } + } + void SetData(uint32 type, uint32 uiData) override { switch (type) @@ -118,7 +150,28 @@ public: m_auiEncounter[1] = uiData; break; case TYPE_MAIDEN: m_auiEncounter[2] = uiData; break; - case TYPE_OPTIONAL_BOSS: m_auiEncounter[3] = uiData; break; + case TYPE_OPTIONAL_BOSS: + m_auiEncounter[3] = uiData; + if (uiData == NOT_STARTED) + { + ++OptionalBossCount; + if (OptionalBossCount == 50) + { + switch (urand(0, 2)) + { + case 0: + instance->SummonCreature(NPC_HYAKISS_THE_LURKER, OptionalSpawn[0]); + break; + case 1: + instance->SummonCreature(NPC_ROKAD_THE_RAVAGER, OptionalSpawn[1]); + break; + case 2: + instance->SummonCreature(NPC_SHADIKITH_THE_GLIDER, OptionalSpawn[2]); + break; + } + } + } + break; case TYPE_OPERA: m_auiEncounter[4] = uiData; if (uiData == DONE) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h index db68484c4a8..4d86492257c 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h @@ -64,4 +64,20 @@ enum OperaEvents EVENT_RAJ = 3 }; +enum MiscCreatures +{ + NPC_HYAKISS_THE_LURKER = 16179, + NPC_ROKAD_THE_RAVAGER = 16181, + NPC_SHADIKITH_THE_GLIDER = 16180, + + // Trash + NPC_COLDMIST_WIDOW = 16171, + NPC_COLDMIST_STALKER = 16170, + NPC_SHADOWBAT = 16173, + NPC_VAMPIRIC_SHADOWBAT = 16175, + NPC_GREATER_SHADOWBAT = 16174, + NPC_PHASE_HOUND = 16178, + NPC_DREADBEAST = 16177, + NPC_SHADOWBEAST = 16176 +}; #endif diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp index b48f0edec25..6386bb50e1a 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp @@ -16,8 +16,10 @@ */ #include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "InstanceScript.h" #include "magisters_terrace.h" +#include "EventMap.h" /* 0 - Selin Fireheart @@ -36,6 +38,8 @@ DoorData const doorData[] = { 0, 0, DOOR_TYPE_ROOM } // END }; +Position const KalecgosSpawnPos = { 164.3747f, -397.1197f, 2.151798f, 1.66219f }; + class instance_magisters_terrace : public InstanceMapScript { public: @@ -93,6 +97,10 @@ class instance_magisters_terrace : public InstanceMapScript case NPC_DELRISSA: DelrissaGUID = creature->GetGUID(); break; + case NPC_KALECGOS: + case NPC_HUMAN_KALECGOS: + KalecgosGUID = creature->GetGUID(); + break; default: break; } @@ -139,6 +147,25 @@ class instance_magisters_terrace : public InstanceMapScript } } + void ProcessEvent(WorldObject* obj, uint32 eventId) override + { + if (eventId == EVENT_SPAWN_KALECGOS) + if (!ObjectAccessor::GetCreature(*obj, KalecgosGUID) && Events.Empty()) + Events.ScheduleEvent(EVENT_SPAWN_KALECGOS, Minutes(1)); + } + + void Update(uint32 diff) override + { + Events.Update(diff); + + if (Events.ExecuteEvent() == EVENT_SPAWN_KALECGOS) + if (Creature* kalecgos = instance->SummonCreature(NPC_KALECGOS, KalecgosSpawnPos)) + { + kalecgos->GetMotionMaster()->MovePath(PATH_KALECGOS_FLIGHT, false); + kalecgos->AI()->Talk(SAY_KALECGOS_SPAWN); + } + } + bool SetBossState(uint32 type, EncounterState state) override { if (!InstanceScript::SetBossState(type, state)) @@ -177,10 +204,12 @@ class instance_magisters_terrace : public InstanceMapScript } protected: + EventMap Events; ObjectGuid SelinGUID; ObjectGuid DelrissaGUID; ObjectGuid KaelStatue[2]; ObjectGuid EscapeOrbGUID; + ObjectGuid KalecgosGUID; uint32 DelrissaDeathCount; }; diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp index e216a024468..5b90ac8ccf4 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp @@ -31,7 +31,8 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "Player.h" -#include "SpellInfo.h" +#include "magisters_terrace.h" +#include "EventMap.h" /*###### ## npc_kalecgos @@ -39,30 +40,29 @@ EndContentData */ enum Spells { - SPELL_TRANSFORM_TO_KAEL = 44670, + SPELL_KALECGOS_TRANSFORM = 44670, + SPELL_TRANSFORM_VISUAL = 24085, + SPELL_CAMERA_SHAKE = 44762, SPELL_ORB_KILL_CREDIT = 46307 }; -enum Creatures +enum MovementPoints { - NPC_KAEL = 24848 //human form entry + POINT_ID_PREPARE_LANDING = 6 }; -enum Misc +enum EventIds { - POINT_ID_LAND = 1 + EVENT_KALECGOS_TRANSFORM = 1, + EVENT_KALECGOS_LANDING = 2 }; -const float afKaelLandPoint[] = {225.045f, -276.236f, -5.434f}; - #define GOSSIP_ITEM_KAEL_1 "Who are you?" #define GOSSIP_ITEM_KAEL_2 "What can we do to assist you?" #define GOSSIP_ITEM_KAEL_3 "What brings you to the Sunwell?" #define GOSSIP_ITEM_KAEL_4 "You're not alone here?" #define GOSSIP_ITEM_KAEL_5 "What would Kil'jaeden want with a mortal woman?" -// This is friendly keal that appear after used Orb. -// If we assume DB handle summon, summon appear somewhere outside the platform where Orb is class npc_kalecgos : public CreatureScript { public: @@ -115,52 +115,46 @@ public: struct npc_kalecgosAI : public ScriptedAI { - npc_kalecgosAI(Creature* creature) : ScriptedAI(creature) - { - Initialize(); - } + npc_kalecgosAI(Creature* creature) : ScriptedAI(creature) { } - void Initialize() + void MovementInform(uint32 type, uint32 pointId) override { - m_uiTransformTimer = 0; - } - - uint32 m_uiTransformTimer; - - void Reset() override - { - Initialize(); - - // we must assume he appear as dragon somewhere outside the platform of orb, and then move directly to here - if (me->GetEntry() != NPC_KAEL) - me->GetMotionMaster()->MovePoint(POINT_ID_LAND, afKaelLandPoint[0], afKaelLandPoint[1], afKaelLandPoint[2]); - } - - void MovementInform(uint32 uiType, uint32 uiPointId) override - { - if (uiType != POINT_MOTION_TYPE) + if (type != WAYPOINT_MOTION_TYPE) return; - if (uiPointId == POINT_ID_LAND) - m_uiTransformTimer = MINUTE*IN_MILLISECONDS; + if (pointId == POINT_ID_PREPARE_LANDING) + { + me->HandleEmoteCommand(EMOTE_ONESHOT_LAND); + me->SetDisableGravity(false); + me->SetHover(false); + events.ScheduleEvent(EVENT_KALECGOS_LANDING, Seconds(2)); + } } - void UpdateAI(uint32 uiDiff) override + void UpdateAI(uint32 diff) override { - if (m_uiTransformTimer) + events.Update(diff); + + switch (events.ExecuteEvent()) { - if (m_uiTransformTimer <= uiDiff) - { + case EVENT_KALECGOS_LANDING: + DoCastAOE(SPELL_CAMERA_SHAKE); + me->SetObjectScale(0.6f); + events.ScheduleEvent(EVENT_KALECGOS_TRANSFORM, Seconds(1)); + break; + case EVENT_KALECGOS_TRANSFORM: DoCast(me, SPELL_ORB_KILL_CREDIT, true); - - // Transform and update entry, now ready for quest/read gossip - DoCast(me, SPELL_TRANSFORM_TO_KAEL, false); - me->UpdateEntry(NPC_KAEL); - - m_uiTransformTimer = 0; - } else m_uiTransformTimer -= uiDiff; + DoCast(me, SPELL_TRANSFORM_VISUAL, false); + DoCast(me, SPELL_KALECGOS_TRANSFORM, false); + me->UpdateEntry(NPC_HUMAN_KALECGOS); + break; + default: + break; } } + + private: + EventMap events; }; }; diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h index 917ad0eb50b..05718dfc1dd 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h @@ -42,7 +42,9 @@ enum CreatureIds { NPC_SELIN = 24723, NPC_DELRISSA = 24560, - NPC_FEL_CRYSTAL = 24722 + NPC_FEL_CRYSTAL = 24722, + NPC_KALECGOS = 24844, + NPC_HUMAN_KALECGOS = 24848 }; enum GameObjectIds @@ -57,4 +59,19 @@ enum GameObjectIds GO_ESCAPE_ORB = 188173 }; +enum InstanceEventIds +{ + EVENT_SPAWN_KALECGOS = 16547 +}; + +enum InstanceText +{ + SAY_KALECGOS_SPAWN = 0 +}; + +enum MovementData +{ + PATH_KALECGOS_FLIGHT = 248440 +}; + #endif diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp index 622c8f0de01..447dbcd67f9 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp @@ -132,7 +132,10 @@ public: ## at_map_chamber ######*/ -#define QUEST_HIDDEN_CHAMBER 2240 +enum MapChamber +{ + QUEST_HIDDEN_CHAMBER = 2240 +}; class AreaTrigger_at_map_chamber : public AreaTriggerScript { diff --git a/src/server/scripts/EasternKingdoms/zone_undercity.cpp b/src/server/scripts/EasternKingdoms/zone_undercity.cpp index 43143748661..99556587e65 100644 --- a/src/server/scripts/EasternKingdoms/zone_undercity.cpp +++ b/src/server/scripts/EasternKingdoms/zone_undercity.cpp @@ -157,7 +157,7 @@ public: { if (Creature* target = ObjectAccessor::GetCreature(*summoned, targetGUID)) { - target->GetMotionMaster()->MoveJump(target->GetPositionX(), target->GetPositionY(), me->GetPositionZ() + 15.0f, 0); + target->GetMotionMaster()->MoveJump(target->GetPositionX(), target->GetPositionY(), me->GetPositionZ() + 15.0f, me->GetOrientation(), 0); target->SetPosition(target->GetPositionX(), target->GetPositionY(), me->GetPositionZ()+15.0f, 0.0f); summoned->CastSpell(target, SPELL_RIBBON_OF_SOULS, false); } @@ -317,59 +317,6 @@ public: }; /*###### -## npc_parqual_fintallas -######*/ - -enum ParqualFintallas -{ - SPELL_MARK_OF_SHAME = 6767 -}; - -#define GOSSIP_HPF1 "Gul'dan" -#define GOSSIP_HPF2 "Kel'Thuzad" -#define GOSSIP_HPF3 "Ner'zhul" - -class npc_parqual_fintallas : public CreatureScript -{ -public: - npc_parqual_fintallas() : CreatureScript("npc_parqual_fintallas") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF+1) - { - player->CLOSE_GOSSIP_MENU(); - creature->CastSpell(player, SPELL_MARK_OF_SHAME, false); - } - if (action == GOSSIP_ACTION_INFO_DEF+2) - { - player->CLOSE_GOSSIP_MENU(); - player->AreaExploredOrEventHappens(6628); - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (player->GetQuestStatus(6628) == QUEST_STATUS_INCOMPLETE && !player->HasAura(SPELL_MARK_OF_SHAME)) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HPF1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HPF2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HPF3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - player->SEND_GOSSIP_MENU(5822, creature->GetGUID()); - } - else - player->SEND_GOSSIP_MENU(5821, creature->GetGUID()); - - return true; - } -}; - -/*###### ## AddSC ######*/ @@ -377,5 +324,4 @@ void AddSC_undercity() { new npc_lady_sylvanas_windrunner(); new npc_highborne_lamenter(); - new npc_parqual_fintallas(); } diff --git a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp index 6cf86c3069f..a01b93a140b 100644 --- a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp @@ -25,7 +25,6 @@ EndScriptData */ /* ContentData npcs_dithers_and_arbington -npc_myranda_the_hag npc_the_scourge_cauldron npc_andorhal_tower EndContentData */ @@ -33,7 +32,6 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" -#include "ScriptedEscortAI.h" #include "Player.h" #include "WorldSession.h" @@ -41,12 +39,23 @@ EndContentData */ ## npcs_dithers_and_arbington ######*/ -#define GOSSIP_HDA1 "What does the Felstone Field Cauldron need?" -#define GOSSIP_HDA2 "What does the Dalson's Tears Cauldron need?" -#define GOSSIP_HDA3 "What does the Writhing Haunt Cauldron need?" -#define GOSSIP_HDA4 "What does the Gahrron's Withering Cauldron need?" - -#define GOSSIP_SDA1 "Thanks, i need a Vitreous Focuser" +enum DithersAndArbington +{ + GOSSIP_ITEM_ID_FELSTONE_FIELD = 0, + GOSSIP_ITEM_ID_DALSON_S_TEARS = 1, + GOSSIP_ITEM_ID_WRITHING_HAUNT = 2, + GOSSIP_ITEM_ID_GAHRRON_S_WITH = 3, + GOSSIP_MENU_ID_LETS_GET_TO_WORK = 3223, + GOSSIP_MENU_ID_VITREOUS_FOCUSER = 3229, + NPC_TEXT_OSSEOUS_AGITATORS = 3980, + NPC_TEXT_SOMATIC_INTENSIFIERS_1 = 3981, + NPC_TEXT_SOMATIC_INTENSIFIERS_2 = 3982, + NPC_TEXT_ECTOPLASMIC_RESONATORS = 3983, + NPC_TEXT_LET_S_GET_TO_WORK = 3985, + QUEST_MISSION_ACCOMPLISHED_H = 5237, + QUEST_MISSION_ACCOMPLISHED_A = 5238, + CREATE_ITEM_VITREOUS_FOCUSER = 17529 +}; class npcs_dithers_and_arbington : public CreatureScript { @@ -62,24 +71,24 @@ public: player->GetSession()->SendListInventory(creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+1: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SDA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - player->SEND_GOSSIP_MENU(3980, creature->GetGUID()); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_ID_VITREOUS_FOCUSER, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + player->SEND_GOSSIP_MENU(NPC_TEXT_OSSEOUS_AGITATORS, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+2: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SDA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - player->SEND_GOSSIP_MENU(3981, creature->GetGUID()); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_ID_VITREOUS_FOCUSER, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + player->SEND_GOSSIP_MENU(NPC_TEXT_SOMATIC_INTENSIFIERS_1, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+3: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SDA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - player->SEND_GOSSIP_MENU(3982, creature->GetGUID()); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_ID_VITREOUS_FOCUSER, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + player->SEND_GOSSIP_MENU(NPC_TEXT_SOMATIC_INTENSIFIERS_2, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+4: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SDA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - player->SEND_GOSSIP_MENU(3983, creature->GetGUID()); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_ID_VITREOUS_FOCUSER, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + player->SEND_GOSSIP_MENU(NPC_TEXT_ECTOPLASMIC_RESONATORS, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+5: player->CLOSE_GOSSIP_MENU(); - creature->CastSpell(player, 17529, false); + creature->CastSpell(player, CREATE_ITEM_VITREOUS_FOCUSER, false); break; } return true; @@ -93,61 +102,13 @@ public: if (creature->IsVendor()) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - if (player->GetQuestRewardStatus(5237) || player->GetQuestRewardStatus(5238)) + if (player->GetQuestRewardStatus(QUEST_MISSION_ACCOMPLISHED_H) || player->GetQuestRewardStatus(QUEST_MISSION_ACCOMPLISHED_A)) { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HDA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HDA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HDA3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HDA4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - player->SEND_GOSSIP_MENU(3985, creature->GetGUID()); - } - else - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - - return true; - } -}; - -/*###### -## npc_myranda_the_hag -######*/ - -enum Myranda -{ - ILLUSION_GOSSIP = 4773, - QUEST_SUBTERFUGE = 5862, - QUEST_IN_DREAMS = 5944, - SPELL_SCARLET_ILLUSION = 17961 -}; - -class npc_myranda_the_hag : public CreatureScript -{ -public: - npc_myranda_the_hag() : CreatureScript("npc_myranda_the_hag") { } - - bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF + 1) - { - player->CLOSE_GOSSIP_MENU(); - player->CastSpell(player, SPELL_SCARLET_ILLUSION, false); - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (player->GetQuestStatus(QUEST_SUBTERFUGE) == QUEST_STATUS_COMPLETE && - player->GetQuestStatus(QUEST_IN_DREAMS) != QUEST_STATUS_COMPLETE && - !player->HasAura(SPELL_SCARLET_ILLUSION)) - { - player->ADD_GOSSIP_ITEM_DB(Player::GetDefaultGossipMenuForSource(creature), 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - player->SEND_GOSSIP_MENU(ILLUSION_GOSSIP, creature->GetGUID()); - return true; + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_ID_LETS_GET_TO_WORK, GOSSIP_ITEM_ID_FELSTONE_FIELD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_ID_LETS_GET_TO_WORK, GOSSIP_ITEM_ID_DALSON_S_TEARS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_ID_LETS_GET_TO_WORK, GOSSIP_ITEM_ID_WRITHING_HAUNT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_ID_LETS_GET_TO_WORK, GOSSIP_ITEM_ID_GAHRRON_S_WITH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + player->SEND_GOSSIP_MENU(NPC_TEXT_LET_S_GET_TO_WORK, creature->GetGUID()); } else player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); @@ -184,7 +145,7 @@ public: me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); //override any database `spawntimesecs` to prevent duplicated summons uint32 rTime = me->GetRespawnDelay(); - if (rTime<600) + if (rTime < 600) me->SetRespawnDelay(600); } @@ -263,7 +224,6 @@ public: } void MoveInLineOfSight(Unit* who) override - { if (!who || who->GetTypeId() != TYPEID_PLAYER) return; @@ -275,14 +235,9 @@ public: }; }; -/*###### -## -######*/ - void AddSC_western_plaguelands() { new npcs_dithers_and_arbington(); - new npc_myranda_the_hag(); new npc_the_scourge_cauldron(); new npc_andorhal_tower(); } diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp index 63c56e29414..29a754d5895 100644 --- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp +++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp @@ -58,6 +58,10 @@ enum Enums SAY_FAREWELL = 5, SAY_ATTACKED = 11, + GOSSIP_OPTION_LET_EVENT_BEGIN = 201, + NPC_TEXT_NARALEX_SLEEPS_AGAIN = 698, + NPC_TEXT_FANGLORDS_ARE_DEAD = 699, + SPELL_MARK_OF_THE_WILD_RANK_2 = 5232, SPELL_SERPENTINE_CLEANSING = 6270, SPELL_NARALEXS_AWAKENING = 6271, @@ -70,10 +74,6 @@ enum Enums NPC_MUTANUS_THE_DEVOURER = 3654, }; -#define GOSSIP_ID_START_1 698 //Naralex sleeps again! -#define GOSSIP_ID_START_2 699 //The fanglords are dead! -#define GOSSIP_ITEM_NARALEX "Let the event begin!" - class npc_disciple_of_naralex : public CreatureScript { public: @@ -116,8 +116,8 @@ public: if ((instance->GetData(TYPE_LORD_COBRAHN) == DONE) && (instance->GetData(TYPE_LORD_PYTHAS) == DONE) && (instance->GetData(TYPE_LADY_ANACONDRA) == DONE) && (instance->GetData(TYPE_LORD_SERPENTIS) == DONE)) { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NARALEX, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - player->SEND_GOSSIP_MENU(GOSSIP_ID_START_2, creature->GetGUID()); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_OPTION_LET_EVENT_BEGIN, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + player->SEND_GOSSIP_MENU(NPC_TEXT_FANGLORDS_ARE_DEAD, creature->GetGUID()); if (!instance->GetData(TYPE_NARALEX_YELLED)) { @@ -127,7 +127,7 @@ public: } else { - player->SEND_GOSSIP_MENU(GOSSIP_ID_START_1, creature->GetGUID()); + player->SEND_GOSSIP_MENU(NPC_TEXT_NARALEX_SLEEPS_AGAIN, creature->GetGUID()); } } return true; diff --git a/src/server/scripts/Kalimdor/zone_ashenvale.cpp b/src/server/scripts/Kalimdor/zone_ashenvale.cpp index 52a83c02a8a..50730507b8f 100644 --- a/src/server/scripts/Kalimdor/zone_ashenvale.cpp +++ b/src/server/scripts/Kalimdor/zone_ashenvale.cpp @@ -31,6 +31,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "Player.h" +#include "SpellScript.h" /*#### # npc_ruul_snowhoof @@ -344,9 +345,42 @@ class go_naga_brazier : public GameObjectScript } }; +enum KingoftheFoulwealdMisc +{ + GO_BANNER = 178205 +}; + +class spell_destroy_karangs_banner : public SpellScriptLoader +{ + public: + spell_destroy_karangs_banner() : SpellScriptLoader("spell_destroy_karangs_banner") { } + + class spell_destroy_karangs_banner_SpellScript : public SpellScript + { + PrepareSpellScript(spell_destroy_karangs_banner_SpellScript); + + void HandleAfterCast() + { + if (GameObject* banner = GetCaster()->FindNearestGameObject(GO_BANNER, GetSpellInfo()->GetMaxRange(true))) + banner->Delete(); + } + + void Register() override + { + AfterCast += SpellCastFn(spell_destroy_karangs_banner_SpellScript::HandleAfterCast); + } + }; + + SpellScript* GetSpellScript() const override + { + return new spell_destroy_karangs_banner_SpellScript(); + } +}; + void AddSC_ashenvale() { new npc_ruul_snowhoof(); new npc_muglash(); new go_naga_brazier(); + new spell_destroy_karangs_banner(); } diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp index fb5642c6f3b..84d7d92acfe 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp @@ -135,9 +135,9 @@ class boss_general_zarithrian : public CreatureScript Talk(SAY_KILL); } - bool CanAIAttack(Unit const* /*target*/) const override + bool CanAIAttack(Unit const* target) const override { - return (instance->GetBossState(DATA_SAVIANA_RAGEFIRE) == DONE && instance->GetBossState(DATA_BALTHARUS_THE_WARBORN) == DONE); + return (instance->GetBossState(DATA_SAVIANA_RAGEFIRE) == DONE && instance->GetBossState(DATA_BALTHARUS_THE_WARBORN) == DONE && BossAI::CanAIAttack(target)); } void UpdateAI(uint32 diff) override diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp index 1e860fb6ec5..6c1b516c7de 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp @@ -461,13 +461,13 @@ class boss_toc_champion_controller : public CreatureScript if (playerTeam == ALLIANCE) { temp->SetHomePosition(vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 0); - temp->GetMotionMaster()->MoveJump(vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 20.0f, 20.0f); + temp->GetMotionMaster()->MoveJump(vChampionJumpTarget[pos], 20.0f, 20.0f); temp->SetOrientation(0); } else { temp->SetHomePosition((ToCCommonLoc[1].GetPositionX()*2)-vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 3); - temp->GetMotionMaster()->MoveJump((ToCCommonLoc[1].GetPositionX()*2)-vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 20.0f, 20.0f); + temp->GetMotionMaster()->MoveJump((ToCCommonLoc[1].GetPositionX() * 2) - vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), vChampionJumpTarget[pos].GetOrientation(), 20.0f, 20.0f); temp->SetOrientation(3); } } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp index 83daa6e35a2..e3720503d0a 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp @@ -390,7 +390,7 @@ class npc_snobold_vassal : public CreatureScript else if (Unit* target2 = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true)) { _targetGUID = target2->GetGUID(); - me->GetMotionMaster()->MoveJump(target2->GetPositionX(), target2->GetPositionY(), target2->GetPositionZ(), 15.0f, 15.0f); + me->GetMotionMaster()->MoveJump(*target2, 15.0f, 15.0f); } } } @@ -981,7 +981,7 @@ class boss_icehowl : public CreatureScript events.ScheduleEvent(EVENT_WHIRL, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS)); return; case EVENT_MASSIVE_CRASH: - me->GetMotionMaster()->MoveJump(ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 20.0f, 20.0f, 0); // 1: Middle of the room + me->GetMotionMaster()->MoveJump(ToCCommonLoc[1], 20.0f, 20.0f, 0); // 1: Middle of the room SetCombatMovement(false); me->AttackStop(); _stage = 7; //Invalid (Do nothing more than move) @@ -1034,7 +1034,7 @@ class boss_icehowl : public CreatureScript _trampleTargetY = target->GetPositionY(); _trampleTargetZ = target->GetPositionZ(); // 2: Hop Backwards - me->GetMotionMaster()->MoveJump(2*me->GetPositionX() - _trampleTargetX, 2*me->GetPositionY() - _trampleTargetY, me->GetPositionZ(), 30.0f, 20.0f, 0); + me->GetMotionMaster()->MoveJump(2*me->GetPositionX() - _trampleTargetX, 2*me->GetPositionY() - _trampleTargetY, me->GetPositionZ(), me->GetOrientation(), 30.0f, 20.0f, 0); _stage = 7; //Invalid (Do nothing more than move) } else diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp index e5ac2676ad0..b1a0f0217c4 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp @@ -22,12 +22,11 @@ #include "Player.h" #include "TemporarySummon.h" -AreaBoundary const* const mainBoundary = new CircleBoundary(Position(563.26f, 139.6f), 75.0); BossBoundaryData const boundaries = { - { BOSS_BEASTS, mainBoundary }, - { BOSS_JARAXXUS, mainBoundary }, - { BOSS_CRUSADERS, mainBoundary }, - { BOSS_VALKIRIES, mainBoundary }, + { BOSS_BEASTS, new CircleBoundary(Position(563.26f, 139.6f), 75.0) }, + { BOSS_JARAXXUS, new CircleBoundary(Position(563.26f, 139.6f), 75.0) }, + { BOSS_CRUSADERS, new CircleBoundary(Position(563.26f, 139.6f), 75.0) }, + { BOSS_VALKIRIES, new CircleBoundary(Position(563.26f, 139.6f), 75.0) }, { BOSS_ANUBARAK, new EllipseBoundary(Position(746.0f, 135.0f), 100.0, 75.0) } }; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp index 7e9083115b8..3ea0de31764 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp @@ -598,7 +598,7 @@ class boss_deathbringer_saurfang : public CreatureScript if (target->GetTransport()) return false; - return true; + return BossAI::CanAIAttack(target); } static uint32 const FightWonValue; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp index 0f721148b72..2db9d206a00 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp @@ -317,14 +317,12 @@ class boss_professor_putricide : public CreatureScript // no possible aura seen in sniff adding the aurastate summon->ModifyAuraState(AURA_STATE_UNKNOWN22, true); summon->CastSpell(summon, SPELL_GASEOUS_BLOAT_PROC, true); - summon->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true); summon->SetReactState(REACT_PASSIVE); break; case NPC_VOLATILE_OOZE: // no possible aura seen in sniff adding the aurastate summon->ModifyAuraState(AURA_STATE_UNKNOWN19, true); summon->CastSpell(summon, SPELL_OOZE_ERUPTION_SEARCH_PERIODIC, true); - summon->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true); summon->SetReactState(REACT_PASSIVE); break; case NPC_CHOKING_GAS_BOMB: diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index 9bdbce81dbf..ac094588d35 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -265,7 +265,7 @@ class boss_sindragosa : public CreatureScript { if (!instance->CheckRequiredBosses(DATA_SINDRAGOSA, victim->ToPlayer())) { - EnterEvadeMode(); + EnterEvadeMode(EVADE_REASON_SEQUENCE_BREAK); instance->DoCastSpellOnPlayers(LIGHT_S_HAMMER_TELEPORT); return; } @@ -276,6 +276,13 @@ class boss_sindragosa : public CreatureScript Talk(SAY_AGGRO); } + void EnterEvadeMode(EvadeReason why) override + { + if (_isInAirPhase && why == EVADE_REASON_BOUNDARY) + return; + BossAI::EnterEvadeMode(why); + } + void JustReachedHome() override { BossAI::JustReachedHome(); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index 755bbd759e7..9fa624aaad3 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -285,6 +285,7 @@ enum Phases #define PHASE_TWO_THREE (events.IsInPhase(PHASE_TWO) ? PHASE_TWO : PHASE_THREE) Position const CenterPosition = {503.6282f, -2124.655f, 840.8569f, 0.0f}; +Position const TirionSpawn = {505.2118f, -2124.353f, 840.9403f, 3.141593f}; Position const TirionIntro = {489.2970f, -2124.840f, 840.8569f, 0.0f}; Position const TirionCharge = {482.9019f, -2124.479f, 840.8570f, 0.0f}; Position const LichKingIntro[3] = @@ -514,13 +515,33 @@ class boss_the_lich_king : public CreatureScript _vileSpiritExplosions = 0; } - void Reset() override + void InitializeAI() override + { + SetupEncounter(); + } + + void JustRespawned() override + { + SetupEncounter(); + } + + void SetupEncounter() { _Reset(); me->SetReactState(REACT_PASSIVE); events.SetPhase(PHASE_INTRO); Initialize(); SetEquipmentSlots(true); + + // Reset The Frozen Throne gameobjects + FrozenThroneResetWorker reset; + Trinity::GameObjectWorker<FrozenThroneResetWorker> worker(me, reset); + me->VisitNearbyGridObject(333.0f, worker); + + // Reset any light override + me->GetMap()->SetZoneOverrideLight(AREA_THE_FROZEN_THRONE, 0, 5000); + + me->SummonCreature(NPC_HIGHLORD_TIRION_FORDRING_LK, TirionSpawn, TEMPSUMMON_MANUAL_DESPAWN); } void JustDied(Unit* /*killer*/) override @@ -556,40 +577,21 @@ class boss_the_lich_king : public CreatureScript events.ScheduleEvent(EVENT_SHADOW_TRAP, 15500, 0, PHASE_ONE); } - void JustReachedHome() override - { - _JustReachedHome(); - instance->SetBossState(DATA_THE_LICH_KING, NOT_STARTED); - - // Reset The Frozen Throne gameobjects - FrozenThroneResetWorker reset; - Trinity::GameObjectWorker<FrozenThroneResetWorker> worker(me, reset); - me->VisitNearbyGridObject(333.0f, worker); - - // Restore Tirion's gossip only after The Lich King fully resets to prevent - // restarting the encounter while LK still runs back to spawn point - if (Creature* tirion = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_HIGHLORD_TIRION_FORDRING))) - tirion->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - - // Reset any light override - me->GetMap()->SetZoneOverrideLight(AREA_THE_FROZEN_THRONE, 0, 5000); - } - bool CanAIAttack(Unit const* target) const override { // The Lich King must not select targets in frostmourne room if he killed everyone outside - return !target->HasAura(SPELL_IN_FROSTMOURNE_ROOM); + return !target->HasAura(SPELL_IN_FROSTMOURNE_ROOM) && BossAI::CanAIAttack(target); } - void EnterEvadeMode(EvadeReason why) override + void EnterEvadeMode(EvadeReason /*why*/) override { - instance->SetBossState(DATA_THE_LICH_KING, FAIL); - BossAI::EnterEvadeMode(why); if (Creature* tirion = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_HIGHLORD_TIRION_FORDRING))) - tirion->AI()->EnterEvadeMode(); + tirion->DespawnOrUnsummon(); DoCastAOE(SPELL_KILL_FROSTMOURNE_PLAYERS); EntryCheckPredicate pred(NPC_STRANGULATE_VEHICLE); summons.DoAction(ACTION_TELEPORT_BACK, pred); + summons.DespawnAll(); + _DespawnAtEvade(); } void KilledUnit(Unit* victim) override @@ -770,6 +772,8 @@ class boss_the_lich_king : public CreatureScript case NPC_STRANGULATE_VEHICLE: summons.Summon(summon); return; + case NPC_HIGHLORD_TIRION_FORDRING_LK: + return; default: break; } @@ -1153,6 +1157,7 @@ class npc_tirion_fordring_tft : public CreatureScript _events.Reset(); if (_instance->GetBossState(DATA_THE_LICH_KING) == DONE) me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + me->LoadEquipment(1); } void MovementInform(uint32 type, uint32 id) override diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h index 2af8e7f3643..5a5b7aefc02 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h @@ -115,7 +115,7 @@ enum DataTypes DATA_ARTHAS_PLATFORM = 38, DATA_TERENAS_MENETHIL = 39, DATA_ENEMY_GUNSHIP = 40, - DATA_UPPERSPIRE_TELE_ACT = 41, + DATA_UPPERSPIRE_TELE_ACT = 41, /// also used by conditions DATA_BLOOD_QUEEN_LANA_THEL_COUNCIL = 42 }; @@ -569,14 +569,10 @@ class spell_trigger_spell_from_caster : public SpellScriptLoader TriggerCastFlags _triggerFlags; }; -template<class AI> -CreatureAI* GetIcecrownCitadelAI(Creature* creature) +template<class AI, class T> +inline AI* GetIcecrownCitadelAI(T* obj) { - if (InstanceMap* instance = creature->GetMap()->ToInstanceMap()) - if (instance->GetInstanceScript()) - if (instance->GetScriptId() == sObjectMgr->GetScriptId(ICCScriptName)) - return new AI(creature); - return NULL; + return GetInstanceAI<AI>(obj, ICCScriptName); } #endif // ICECROWN_CITADEL_H_ diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp index 7723a37094c..8b5e03203e1 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp @@ -15,6 +15,7 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "GameObjectAI.h" #include "InstanceScript.h" #include "Player.h" #include "ScriptedGossip.h" @@ -22,57 +23,55 @@ #include "Spell.h" #include "icecrown_citadel.h" -#define GOSSIP_SENDER_ICC_PORT 631 +static std::vector<uint32> const TeleportSpells = +{ + LIGHT_S_HAMMER_TELEPORT, // 0 + ORATORY_OF_THE_DAMNED_TELEPORT, // 1 + 0, // 2 + RAMPART_OF_SKULLS_TELEPORT, // 3 + DEATHBRINGER_S_RISE_TELEPORT, // 4 + UPPER_SPIRE_TELEPORT, // 5 + SINDRAGOSA_S_LAIR_TELEPORT // 6 +}; class icecrown_citadel_teleport : public GameObjectScript { + static_assert(DATA_UPPERSPIRE_TELE_ACT == 41, "icecrown_citadel.h DATA_UPPERSPIRE_TELE_ACT set to value != 41, gossip condition of the teleporters won't work as intended."); + public: icecrown_citadel_teleport() : GameObjectScript("icecrown_citadel_teleport") { } - bool OnGossipHello(Player* player, GameObject* go) override + struct icecrown_citadel_teleportAI : public GameObjectAI { - if (InstanceScript* instance = go->GetInstanceScript()) + icecrown_citadel_teleportAI(GameObject* go) : GameObjectAI(go) { - if (instance->GetBossState(DATA_LORD_MARROWGAR) == DONE) - { - if (go->GetEntry() != GO_SCOURGE_TRANSPORTER_LIGHTSHAMMER) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to Light's Hammer.", GOSSIP_SENDER_ICC_PORT, LIGHT_S_HAMMER_TELEPORT); - if (go->GetEntry() != GO_SCOURGE_TRANSPORTER_ORATORY) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Oratory of the Damned.", GOSSIP_SENDER_ICC_PORT, ORATORY_OF_THE_DAMNED_TELEPORT); - } - if (instance->GetBossState(DATA_LADY_DEATHWHISPER) == DONE && go->GetEntry() != GO_SCOURGE_TRANSPORTER_RAMPART) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Rampart of Skulls.", GOSSIP_SENDER_ICC_PORT, RAMPART_OF_SKULLS_TELEPORT); - if (instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == DONE && go->GetEntry() != GO_SCOURGE_TRANSPORTER_DEATHBRINGER) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Deathbringer's Rise.", GOSSIP_SENDER_ICC_PORT, DEATHBRINGER_S_RISE_TELEPORT); - if (instance->GetData(DATA_UPPERSPIRE_TELE_ACT) == DONE && go->GetEntry() != GO_SCOURGE_TRANSPORTER_UPPERSPIRE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Upper Spire.", GOSSIP_SENDER_ICC_PORT, UPPER_SPIRE_TELEPORT); - /// @todo Gauntlet event before Sindragosa - if (instance->GetBossState(DATA_VALITHRIA_DREAMWALKER) == DONE && go->GetEntry() != GO_SCOURGE_TRANSPORTER_SINDRAGOSA) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to Sindragosa's Lair", GOSSIP_SENDER_ICC_PORT, SINDRAGOSA_S_LAIR_TELEPORT); } - player->SEND_GOSSIP_MENU(player->GetGossipTextId(go), go->GetGUID()); - return true; - } + bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override + { + if (gossipListId >= TeleportSpells.size()) + return false; - bool OnGossipSelect(Player* player, GameObject* /*go*/, uint32 sender, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - player->CLOSE_GOSSIP_MENU(); - SpellInfo const* spell = sSpellMgr->GetSpellInfo(action); - if (!spell) - return false; + player->PlayerTalkClass->ClearMenus(); + player->CLOSE_GOSSIP_MENU(); + SpellInfo const* spell = sSpellMgr->GetSpellInfo(TeleportSpells[gossipListId]); + if (!spell) + return false; - if (player->IsInCombat()) - { - Spell::SendCastResult(player, spell, 0, SPELL_FAILED_AFFECTING_COMBAT); - return true; - } + if (player->IsInCombat()) + { + Spell::SendCastResult(player, spell, 0, SPELL_FAILED_AFFECTING_COMBAT); + return true; + } - if (sender == GOSSIP_SENDER_ICC_PORT) player->CastSpell(player, spell, true); + return true; + } + }; - return true; + GameObjectAI* GetAI(GameObject* go) const override + { + return GetIcecrownCitadelAI<icecrown_citadel_teleportAI>(go); } }; diff --git a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp index 3e7de89edd9..a7a89f44d81 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp @@ -15,382 +15,681 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "Player.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" #include "SpellAuraEffects.h" #include "naxxramas.h" -enum Horsemen +enum Horseman { - HORSEMEN_THANE, - HORSEMEN_LADY, - HORSEMEN_BARON, - HORSEMEN_SIR, + THANE = DATA_THANE, + LADY = DATA_LADY, + BARON = DATA_BARON, + SIR = DATA_SIR, }; +static const std::vector<Horseman> horsemen = { THANE, LADY, BARON, SIR }; // for iterating enum Spells { - SPELL_MARK_DAMAGE = 28836 + /* all */ + SPELL_MARK_DAMAGE = 28836, + SPELL_BERSERK = 26662, + SPELL_ENCOUNTER_CREDIT = 59450, + + /* baron */ + SPELL_BARON_MARK = 28834, + SPELL_UNHOLY_SHADOW = 28882, + + /* thane */ + SPELL_THANE_MARK = 28832, + SPELL_METEOR = 28884, + + /* lady */ + SPELL_SHADOW_BOLT = 57374, + SPELL_LADY_MARK = 28833, + SPELL_VOID_ZONE = 28863, + SPELL_UNYIELDING_PAIN = 57381, + + /* sir */ + SPELL_HOLY_BOLT = 57376, + SPELL_SIR_MARK = 28835, + SPELL_HOLY_WRATH = 28883, + SPELL_CONDEMNATION = 57377 }; -enum Events +enum Actions { - EVENT_NONE, - EVENT_MARK, - EVENT_CAST, - EVENT_BERSERK, + ACTION_BEGIN_MOVEMENT = 1, + ACTION_BEGIN_FIGHTING +}; + +enum HorsemenData +{ + DATA_HORSEMEN_IS_TIMED_KILL = Data::DATA_HORSEMEN_CHECK_ACHIEVEMENT_CREDIT, // inherit from naxxramas.h - this needs to be the first entry to ensure that there are no conflicts + DATA_MOVEMENT_FINISHED, + DATA_DEATH_TIME }; -const Position WaypointPositions[12] = +enum Events { - // Thane waypoints - {2542.3f, -2984.1f, 241.49f, 5.362f}, - {2547.6f, -2999.4f, 241.34f, 5.049f}, - {2542.9f, -3015.0f, 241.35f, 4.654f}, - // Lady waypoints - {2498.3f, -2961.8f, 241.28f, 3.267f}, - {2487.7f, -2959.2f, 241.28f, 2.890f}, - {2469.4f, -2947.6f, 241.28f, 2.576f}, - // Baron waypoints - {2553.8f, -2968.4f, 241.33f, 5.757f}, - {2564.3f, -2972.5f, 241.33f, 5.890f}, - {2583.9f, -2971.67f, 241.35f, 0.008f}, - // Sir waypoints - {2534.5f, -2921.7f, 241.53f, 1.363f}, - {2523.5f, -2902.8f, 241.28f, 2.095f}, - {2517.8f, -2896.6f, 241.28f, 2.315f}, + /* all */ + EVENT_BERSERK = 1, + EVENT_MARK, + + /* rivendare */ + EVENT_UNHOLYSHADOW, + + /* thane */ + EVENT_METEOR, + + /* lady */ + EVENT_VOIDZONE, + + /* sir */ + EVENT_HOLYWRATH }; -const uint32 NPC_HORSEMEN[] = {16064, 16065, 30549, 16063}; -const uint32 SPELL_MARK[] = {28832, 28833, 28834, 28835}; -#define SPELL_PRIMARY(i) RAID_MODE(SPELL_PRIMARY_N[i], SPELL_PRIMARY_H[i]) -const uint32 SPELL_PRIMARY_N[] = {28884, 28863, 28882, 28883}; -const uint32 SPELL_PRIMARY_H[] = {57467, 57463, 57369, 57466}; -#define SPELL_SECONDARY(i) RAID_MODE(SPELL_SECONDARY_N[i], SPELL_SECONDARY_H[i]) -const uint32 SPELL_SECONDARY_N[]= {0, 57374, 0, 57376}; -const uint32 SPELL_SECONDARY_H[]= {0, 57464, 0, 57465}; -const uint32 SPELL_PUNISH[] = {0, 57381, 0, 57377}; -#define SPELL_BERSERK 26662 - -enum FourHorsemen +enum Yells { SAY_AGGRO = 0, - SAY_TAUNT = 1, SAY_SPECIAL = 2, SAY_SLAY = 3, - SAY_DEATH = 4 -}; + SAY_DEATH = 4, -class boss_four_horsemen : public CreatureScript -{ -public: - boss_four_horsemen() : CreatureScript("boss_four_horsemen") { } + EMOTE_RAGECAST = 7 +}; - CreatureAI* GetAI(Creature* creature) const override - { - return GetInstanceAI<boss_four_horsemenAI>(creature); - } +static const Position baronPath[3] = { { 2552.427f, -2969.737f, 241.3021f },{ 2566.759f, -2972.535f, 241.3217f },{ 2584.32f, -2971.96f, 241.3489f } }; +static const Position thanePath[3] = { { 2540.095f, -2983.192f, 241.3344f },{ 2546.005f, -2999.826f, 241.3665f },{ 2542.697f, -3014.055f, 241.3371f } }; +static const Position ladyPath[3] = { { 2507.94f, -2961.444f, 242.4557f },{ 2488.763f, -2960.007f, 241.2757f },{ 2468.26f, -2947.499f, 241.2753f } }; +static const Position sirPath[3] = { { 2533.141f, -2922.14f, 241.2764f },{ 2525.254f, -2905.907f, 241.2761f },{ 2517.636f, -2897.253f, 241.2758f } }; - struct boss_four_horsemenAI : public BossAI - { - boss_four_horsemenAI(Creature* creature) : BossAI(creature, BOSS_HORSEMEN) +struct boss_four_horsemen_baseAI : public BossAI +{ + public: + Creature* getHorsemanHandle(Horseman who) const { - Initialize(); - id = Horsemen(0); - for (uint8 i = 0; i < 4; ++i) - if (me->GetEntry() == NPC_HORSEMEN[i]) - id = Horsemen(i); - caster = (id == HORSEMEN_LADY || id == HORSEMEN_SIR); + if (_which == who) + return me; + else + return ObjectAccessor::GetCreature(*me, instance->GetGuidData(who)); } - - void Initialize() + boss_four_horsemen_baseAI(Creature* creature, Horseman which, Position const* initialPath) : + BossAI(creature, BOSS_HORSEMEN), _which(which), _initialPath(initialPath), _myMovementFinished(false), _nextMovement(0), _timeDied(0), _ourMovementFinished(false) { - uiEventStarterGUID.Clear(); - nextWP = 0; - punishTimer = 2000; - nextMovementStarted = false; - movementCompleted = false; - movementStarted = false; - encounterActionAttack = false; - encounterActionReset = false; - doDelayPunish = false; + if (!me->IsAlive() && instance->GetBossState(BOSS_HORSEMEN) != DONE) + me->SetRespawnTime(10); } - Horsemen id; - ObjectGuid uiEventStarterGUID; - uint8 nextWP; - uint32 punishTimer; - bool caster; - bool nextMovementStarted; - bool movementCompleted; - bool movementStarted; - bool encounterActionAttack; - bool encounterActionReset; - bool doDelayPunish; - - void Reset() override + uint32 GetData(uint32 type) const override { - if (!encounterActionReset) - DoEncounteraction(NULL, false, true, false); - - instance->SetData(DATA_HORSEMEN0 + id, NOT_STARTED); - - me->SetReactState(REACT_AGGRESSIVE); - Initialize(); - _Reset(); + switch (type) + { + case DATA_MOVEMENT_FINISHED: + return _myMovementFinished ? 1 : 0; + case DATA_DEATH_TIME: + return _timeDied; + case DATA_HORSEMEN_IS_TIMED_KILL: + { + uint32 minTime = 0, maxTime = 0; + for (Horseman boss : horsemen) + if (Creature* cBoss = getHorsemanHandle(boss)) + { + uint32 deathTime = cBoss->AI()->GetData(DATA_DEATH_TIME); + if (!deathTime) + { + TC_LOG_WARN("scripts", "FourHorsemenAI: Checking for achievement credit but horseman %s is reporting not dead", cBoss->GetName().c_str()); + return 0; + } + if (!minTime || deathTime < minTime) + minTime = deathTime; + if (!maxTime || deathTime > maxTime) + maxTime = deathTime; + } + else + { + TC_LOG_WARN("scripts", "FourHorsemenAI: Checking for achievement credit but horseman with id %u is not present", uint32(boss)); + return 0; + } + return (getMSTimeDiff(minTime, maxTime) <= 15 * IN_MILLISECONDS) ? 1 : 0; + } + default: + return 0; + } } - bool DoEncounteraction(Unit* who, bool attack, bool reset, bool checkAllDead) + void DoAction(int32 action) override { - Creature* Thane = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_THANE)); - Creature* Lady = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_LADY)); - Creature* Baron = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_BARON)); - Creature* Sir = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SIR)); + switch (action) + { + case ACTION_BEGIN_MOVEMENT: + me->GetMotionMaster()->MovePoint(1, _initialPath[0], true); + break; + case ACTION_BEGIN_FIGHTING: + if (_ourMovementFinished) + break; + me->SetCombatPulseDelay(5); + BeginFighting(); + _ourMovementFinished = true; + break; + } + } - if (Thane && Lady && Baron && Sir) + void CheckIsMovementFinished() + { + for (Horseman boss : horsemen) { - if (attack && who) + if (Creature* cBoss = getHorsemanHandle(boss)) { - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Thane->AI())->encounterActionAttack = true; - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Lady->AI())->encounterActionAttack = true; - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Baron->AI())->encounterActionAttack = true; - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Sir->AI())->encounterActionAttack = true; - - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Thane->AI())->AttackStart(who); - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Lady->AI())->AttackStart(who); - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Baron->AI())->AttackStart(who); - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Sir->AI())->AttackStart(who); + if (cBoss->IsAlive() && !cBoss->AI()->GetData(DATA_MOVEMENT_FINISHED)) + return; } - - if (reset) + else { - if (instance->GetBossState(BOSS_HORSEMEN) != NOT_STARTED) - { - if (!Thane->IsAlive()) - Thane->Respawn(); - - if (!Lady->IsAlive()) - Lady->Respawn(); + TC_LOG_WARN("scripts", "FourHorsemenAI: Checking if movement is finished but horseman with id %u is not present", uint32(boss)); + ResetEncounter(); + return; + } + } - if (!Baron->IsAlive()) - Baron->Respawn(); + for (Horseman boss : horsemen) + if (Creature* cBoss = getHorsemanHandle(boss)) + cBoss->AI()->DoAction(ACTION_BEGIN_FIGHTING); + } - if (!Sir->IsAlive()) - Sir->Respawn(); + void BeginEncounter() + { + if (instance->GetBossState(BOSS_HORSEMEN) == IN_PROGRESS) + return; + if (!instance->CheckRequiredBosses(BOSS_HORSEMEN)) + { + ResetEncounter(); + return; + } + instance->SetBossState(BOSS_HORSEMEN, IN_PROGRESS); + Map::PlayerList const &players = me->GetMap()->GetPlayers(); + if (players.isEmpty()) // sanity check + ResetEncounter(); - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Thane->AI())->encounterActionReset = true; - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Lady->AI())->encounterActionReset = true; - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Baron->AI())->encounterActionReset = true; - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Sir->AI())->encounterActionReset = true; + for (Horseman boss : horsemen) + { + if (Creature* cBoss = getHorsemanHandle(boss)) + { + if (!cBoss->IsAlive()) + { + ResetEncounter(); + return; + } + cBoss->SetReactState(REACT_PASSIVE); + cBoss->AttackStop(); // clear initial target that was set on enter combat + cBoss->setActive(true); - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Thane->AI())->EnterEvadeMode(); - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Lady->AI())->EnterEvadeMode(); - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Baron->AI())->EnterEvadeMode(); - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Sir->AI())->EnterEvadeMode(); + for (Map::PlayerList::const_iterator it = players.begin(); it != players.end(); ++it) + { + if (Player* player = it->GetSource()) + { + if (player->IsGameMaster()) + continue; + + if (player->IsAlive()) + { + cBoss->AddThreat(player, 0.0f); + cBoss->SetInCombatWith(player); + player->SetInCombatWith(cBoss); + } + } } - } - if (checkAllDead) - return !Thane->IsAlive() && !Lady->IsAlive() && !Baron->IsAlive() && !Sir->IsAlive(); + /* Why do the Four Horsemen run to opposite corners of the room when engaged? * + * They saw all the mobs leading up to them being AoE'd down and made a judgment call. */ + cBoss->AI()->DoAction(ACTION_BEGIN_MOVEMENT); + } + else + { + TC_LOG_WARN("scripts", "FourHorsemenAI: Encounter starting but horseman with id %u is not present", uint32(boss)); + ResetEncounter(); + return; + } } - return false; } - void BeginFourHorsemenMovement() + void ResetEncounter() { - movementStarted = true; - me->SetReactState(REACT_PASSIVE); - me->SetWalk(false); - me->SetSpeed(MOVE_RUN, me->GetSpeedRate(MOVE_RUN), true); - - switch (id) + if (instance->GetBossState(BOSS_HORSEMEN) == NOT_STARTED || instance->GetBossState(BOSS_HORSEMEN) == DONE) + return; + instance->SetBossState(BOSS_HORSEMEN, NOT_STARTED); + for (Horseman boss : horsemen) { - case HORSEMEN_THANE: - me->GetMotionMaster()->MovePoint(0, WaypointPositions[0]); - break; - case HORSEMEN_LADY: - me->GetMotionMaster()->MovePoint(3, WaypointPositions[3]); - break; - case HORSEMEN_BARON: - me->GetMotionMaster()->MovePoint(6, WaypointPositions[6]); - break; - case HORSEMEN_SIR: - me->GetMotionMaster()->MovePoint(9, WaypointPositions[9]); - break; + if (Creature* cBoss = getHorsemanHandle(boss)) + { + cBoss->DespawnOrUnsummon(0); + cBoss->SetRespawnTime(15); + } + else + { + TC_LOG_WARN("scripts", "FourHorsemenAI: Encounter resetting but horseman with id %u is not present", uint32(boss)); + } } } - void MovementInform(uint32 type, uint32 point) override + void EncounterCleared() { - if (type != POINT_MOTION_TYPE) + if (instance->GetBossState(BOSS_HORSEMEN) == DONE) return; + instance->SetBossState(BOSS_HORSEMEN, DONE); + //instance->DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_ENCOUNTER_CREDIT); + DoCastAOE(SPELL_ENCOUNTER_CREDIT, true); + } - if (point == 2 || point == 5 || point == 8 || point == 11) - { - movementCompleted = true; - me->SetReactState(REACT_AGGRESSIVE); + void EnterCombat(Unit* /*who*/) override + { + if (instance->GetBossState(BOSS_HORSEMEN) != NOT_STARTED) // another horseman already did it + return; + Talk(SAY_AGGRO); + BeginEncounter(); + } + + void EnterEvadeMode(EvadeReason /*why*/) override + { + ResetEncounter(); + } + + void Reset() override + { + if (!me->IsAlive()) + return; + _myMovementFinished = false; + _nextMovement = 0; + _timeDied = 0; + _ourMovementFinished = false; + me->SetReactState(REACT_AGGRESSIVE); + SetCombatMovement(false); + me->SetCombatPulseDelay(0); + me->ResetLootMode(); + events.Reset(); + summons.DespawnAll(); + } + + void KilledUnit(Unit* victim) override + { + if (victim->GetTypeId() == TYPEID_PLAYER) + Talk(SAY_SLAY, victim); + } - Unit* eventStarter = ObjectAccessor::GetUnit(*me, uiEventStarterGUID); + void JustDied(Unit* /*killer*/) override + { + if (instance->GetBossState(BOSS_HORSEMEN) != IN_PROGRESS) // necessary in case a horseman gets one-shot + { + BeginEncounter(); + return; + } - if (eventStarter && me->IsValidAttackTarget(eventStarter)) - AttackStart(eventStarter); - else if (!UpdateVictim()) + Talk(SAY_DEATH); + _timeDied = getMSTime(); + for (Horseman boss : horsemen) + { + if (Creature* cBoss = getHorsemanHandle(boss)) { - EnterEvadeMode(); - return; + if (cBoss->IsAlive()) + { + // in case a horseman dies while moving (unlikely but possible especially in non-335 branch) + CheckIsMovementFinished(); + return; + } } - - if (caster) + else { - me->GetMotionMaster()->Clear(); - me->GetMotionMaster()->MoveIdle(); + TC_LOG_WARN("scripts", "FourHorsemenAI: %s died but horseman with id %u is not present", me->GetName().c_str(), uint32(boss)); + ResetEncounter(); } - - return; } - nextMovementStarted = false; - nextWP = point + 1; + EncounterCleared(); } - // switch to "who" if nearer than current target. - void SelectNearestTarget(Unit* who) + void MovementInform(uint32 type, uint32 i) override { - if (me->GetVictim() && me->GetDistanceOrder(who, me->GetVictim()) && me->IsValidAttackTarget(who)) + if (type != POINT_MOTION_TYPE) + return; + if (i < 3) + _nextMovement = i; // delay to next updateai to prevent it from instantly expiring + else { - me->getThreatManager().modifyThreatPercent(me->GetVictim(), -100); - me->AddThreat(who, 1000000.0f); + _myMovementFinished = true; + CheckIsMovementFinished(); } } - void MoveInLineOfSight(Unit* who) override - + void UpdateAI(uint32 diff) override { - BossAI::MoveInLineOfSight(who); - if (caster) - SelectNearestTarget(who); + if (_nextMovement) + { + me->GetMotionMaster()->MovePoint(_nextMovement + 1, _initialPath[_nextMovement], true); + _nextMovement = 0; + } + _UpdateAI(diff); } - void AttackStart(Unit* who) override + virtual void BeginFighting() = 0; + virtual void _UpdateAI(uint32 /*diff*/) = 0; + + private: + const Horseman _which; + const Position* _initialPath; + bool _myMovementFinished; + uint8 _nextMovement; + uint32 _timeDied; + protected: + bool _ourMovementFinished; +}; + +class boss_four_horsemen_baron : public CreatureScript +{ + public: + boss_four_horsemen_baron() : CreatureScript("boss_four_horsemen_baron") { } + + struct boss_four_horsemen_baronAI : public boss_four_horsemen_baseAI { - if (!movementCompleted && !movementStarted) + boss_four_horsemen_baronAI(Creature* creature) : boss_four_horsemen_baseAI(creature, BARON, baronPath) { } + void BeginFighting() override { - uiEventStarterGUID = who->GetGUID(); - BeginFourHorsemenMovement(); + SetCombatMovement(true); + me->SetReactState(REACT_AGGRESSIVE); + ThreatManager& threat = me->getThreatManager(); + if (threat.isThreatListEmpty()) + { + if (Unit* nearest = me->SelectNearestPlayer(5000.0f)) + { + me->AddThreat(nearest, 1.0f); + AttackStart(nearest); + } + else + ResetEncounter(); + } + else + AttackStart(threat.getHostilTarget()); - if (!encounterActionAttack) - DoEncounteraction(who, true, false, false); + events.ScheduleEvent(EVENT_BERSERK, 10 * MINUTE * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_MARK, 24 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_UNHOLYSHADOW, urandms(3,7)); } - else if (movementCompleted && movementStarted) + + void _UpdateAI(uint32 diff) override { - if (caster) - me->Attack(who, false); - else - BossAI::AttackStart(who); + if (!_ourMovementFinished || !UpdateVictim()) + return; + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_BERSERK: + DoCastAOE(SPELL_BERSERK, true); + break; + case EVENT_MARK: + DoCastAOE(SPELL_BARON_MARK, true); + events.ScheduleEvent(EVENT_MARK, 12 * IN_MILLISECONDS); + break; + case EVENT_UNHOLYSHADOW: + DoCastVictim(SPELL_UNHOLY_SHADOW); + events.ScheduleEvent(EVENT_UNHOLYSHADOW, urandms(10,30)); + break; + } + } + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + DoMeleeAttackIfReady(); } - } - void KilledUnit(Unit* /*victim*/) override + void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell) override + { + if (spell->Id == SPELL_UNHOLY_SHADOW) + Talk(SAY_SPECIAL); + } + }; + + CreatureAI* GetAI(Creature* creature) const override { - if (!(rand32() % 5)) - Talk(SAY_SLAY); + return GetInstanceAI<boss_four_horsemen_baronAI>(creature); } +}; - void JustDied(Unit* /*killer*/) override - { - events.Reset(); - summons.DespawnAll(); +class boss_four_horsemen_thane : public CreatureScript +{ + public: + boss_four_horsemen_thane() : CreatureScript("boss_four_horsemen_thane") { } - instance->SetData(DATA_HORSEMEN0 + id, DONE); + struct boss_four_horsemen_thaneAI : public boss_four_horsemen_baseAI + { + boss_four_horsemen_thaneAI(Creature* creature) : boss_four_horsemen_baseAI(creature, THANE, thanePath), _shouldSay(true) { } + void BeginFighting() override + { + SetCombatMovement(true); + me->SetReactState(REACT_AGGRESSIVE); + ThreatManager& threat = me->getThreatManager(); + if (threat.isThreatListEmpty()) + { + if (Unit* nearest = me->SelectNearestPlayer(5000.0f)) + { + me->AddThreat(nearest, 1.0f); + AttackStart(nearest); + } + else + ResetEncounter(); + } + else + AttackStart(threat.getHostilTarget()); - if (DoEncounteraction(NULL, false, false, true)) + events.ScheduleEvent(EVENT_BERSERK, 10 * MINUTE * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_MARK, 24 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_METEOR, urandms(10,15)); + } + void _UpdateAI(uint32 diff) override { - instance->SetBossState(BOSS_HORSEMEN, DONE); - instance->SaveToDB(); + if (!_ourMovementFinished || !UpdateVictim()) + return; + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_BERSERK: + DoCastAOE(SPELL_BERSERK, true); + break; + case EVENT_MARK: + DoCastAOE(SPELL_THANE_MARK, true); + events.ScheduleEvent(EVENT_MARK, 12 * IN_MILLISECONDS); + break; + case EVENT_METEOR: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 20.0f, true)) + { + DoCast(target, SPELL_METEOR); + _shouldSay = true; + } + events.ScheduleEvent(EVENT_METEOR, urandms(13,17)); + break; + } + } - // Achievements related to the 4-horsemen are given through spell 59450 which does not exist. - // There is thus no way it can be given by casting the spell on the players. - instance->DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 59450); + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + DoMeleeAttackIfReady(); } - Talk(SAY_DEATH); - } + void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell) override + { + if (_shouldSay && spell->Id == SPELL_METEOR) + { + Talk(SAY_SPECIAL); + _shouldSay = false; + } + } - void EnterCombat(Unit* /*who*/) override - { - _EnterCombat(); - Talk(SAY_AGGRO); + private: + bool _shouldSay; // throttle to make sure we only talk on first target hit by meteor + }; - events.ScheduleEvent(EVENT_MARK, 15000); - events.ScheduleEvent(EVENT_CAST, 20000 + rand32() % 5000); - events.ScheduleEvent(EVENT_BERSERK, 15*100*1000); + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<boss_four_horsemen_thaneAI>(creature); } +}; - void UpdateAI(uint32 diff) override +class boss_four_horsemen_lady : public CreatureScript +{ + public: + boss_four_horsemen_lady() : CreatureScript("boss_four_horsemen_lady") { } + + struct boss_four_horsemen_ladyAI : public boss_four_horsemen_baseAI { - if (nextWP && movementStarted && !movementCompleted && !nextMovementStarted) + boss_four_horsemen_ladyAI(Creature* creature) : boss_four_horsemen_baseAI(creature, LADY, ladyPath) { } + void BeginFighting() override { - nextMovementStarted = true; - me->GetMotionMaster()->MovePoint(nextWP, WaypointPositions[nextWP]); + events.ScheduleEvent(EVENT_BERSERK, 10 * MINUTE * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_MARK, 24 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_VOIDZONE, urandms(5,10)); } - if (!UpdateVictim() || !CheckInRoom() || !movementCompleted) - return; + void _UpdateAI(uint32 diff) override + { + if (!me->IsInCombat()) + return; + if (!_ourMovementFinished) + return; + if (me->getThreatManager().isThreatListEmpty()) + { + EnterEvadeMode(EVADE_REASON_NO_HOSTILES); + return; + } - events.Update(diff); + events.Update(diff); - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_BERSERK: + DoCastAOE(SPELL_BERSERK, true); + break; + case EVENT_MARK: + DoCastAOE(SPELL_LADY_MARK, true); + events.ScheduleEvent(EVENT_MARK, 15 * IN_MILLISECONDS); + break; + case EVENT_VOIDZONE: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 45.0f, true)) + { + DoCast(target, SPELL_VOID_ZONE, true); + Talk(SAY_SPECIAL); + } + events.ScheduleEvent(EVENT_VOIDZONE, urandms(12, 18)); + break; + } + } + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + if (Unit* target = SelectTarget(SELECT_TARGET_NEAREST, 0, 45.0f, true)) + DoCast(target, SPELL_SHADOW_BOLT); + else + { + DoCastAOE(SPELL_UNYIELDING_PAIN); + Talk(EMOTE_RAGECAST); + } + } + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<boss_four_horsemen_ladyAI>(creature); + } +}; + +class boss_four_horsemen_sir : public CreatureScript +{ + public: + boss_four_horsemen_sir() : CreatureScript("boss_four_horsemen_sir") { } - while (uint32 eventId = events.ExecuteEvent()) + struct boss_four_horsemen_sirAI : public boss_four_horsemen_baseAI + { + boss_four_horsemen_sirAI(Creature* creature) : boss_four_horsemen_baseAI(creature, SIR, sirPath), _shouldSay(true) { } + void BeginFighting() override { - switch (eventId) + events.ScheduleEvent(EVENT_BERSERK, 10 * MINUTE * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_MARK, 24 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_HOLYWRATH, urandms(13,18)); + } + + void _UpdateAI(uint32 diff) override + { + if (!me->IsInCombat()) + return; + if (!_ourMovementFinished) + return; + if (me->getThreatManager().isThreatListEmpty()) { - case EVENT_MARK: - if (!(rand32() % 5)) - Talk(SAY_SPECIAL); - DoCastAOE(SPELL_MARK[id]); - events.ScheduleEvent(EVENT_MARK, 15000); - break; - case EVENT_CAST: - if (!(rand32() % 5)) - Talk(SAY_TAUNT); + EnterEvadeMode(EVADE_REASON_NO_HOSTILES); + return; + } - if (caster) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 45.0f, true)) - DoCast(target, SPELL_PRIMARY(id)); - } - else - DoCastVictim(SPELL_PRIMARY(id)); + events.Update(diff); - events.ScheduleEvent(EVENT_CAST, 15000); - break; - case EVENT_BERSERK: - Talk(SAY_SPECIAL); - DoCast(me, EVENT_BERSERK); - break; + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_BERSERK: + DoCastAOE(SPELL_BERSERK, true); + break; + case EVENT_MARK: + DoCastAOE(SPELL_SIR_MARK, true); + events.ScheduleEvent(EVENT_MARK, 15 * IN_MILLISECONDS); + break; + case EVENT_HOLYWRATH: + if (Unit* target = SelectTarget(SELECT_TARGET_NEAREST, 0, 45.0f, true)) + { + DoCast(target, SPELL_HOLY_WRATH, true); + _shouldSay = true; + } + events.ScheduleEvent(EVENT_HOLYWRATH, urandms(10,18)); + break; + } + } + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + if (Unit* target = SelectTarget(SELECT_TARGET_NEAREST, 0, 45.0f, true)) + DoCast(target, SPELL_HOLY_BOLT); + else + { + DoCastAOE(SPELL_CONDEMNATION); + Talk(EMOTE_RAGECAST); } } - if (punishTimer <= diff) + void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell) override { - if (doDelayPunish) + if (_shouldSay && spell->Id == SPELL_HOLY_WRATH) { - DoCastAOE(SPELL_PUNISH[id], true); - doDelayPunish = false; + Talk(SAY_SPECIAL); + _shouldSay = false; } - punishTimer = 2000; - } else punishTimer -= diff; + } - if (!caster) - DoMeleeAttackIfReady(); - else if ((!DoSpellAttackIfReady(SPELL_SECONDARY(id)) || !me->IsWithinLOSInMap(me->GetVictim())) && movementCompleted && !doDelayPunish) - doDelayPunish = true; - } - }; + private: + bool _shouldSay; // throttle to make sure we only talk on first target hit by holy wrath + }; + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<boss_four_horsemen_sirAI>(creature); + } }; class spell_four_horsemen_mark : public SpellScriptLoader @@ -450,6 +749,9 @@ class spell_four_horsemen_mark : public SpellScriptLoader void AddSC_boss_four_horsemen() { - new boss_four_horsemen(); + new boss_four_horsemen_baron(); + new boss_four_horsemen_thane(); + new boss_four_horsemen_lady(); + new boss_four_horsemen_sir(); new spell_four_horsemen_mark(); } diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp index c9684cf10cf..be12894ebea 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp @@ -20,30 +20,70 @@ #include "SpellScript.h" #include "GridNotifiers.h" #include "CombatAI.h" +#include "AreaBoundary.h" #include "naxxramas.h" +/* Constants */ enum Yells { - SAY_SPEECH = 0, - SAY_KILL = 1, - SAY_DEATH = 2, - SAY_TELEPORT = 3 + SAY_INTRO_1 = 0, + SAY_INTRO_2 = 1, + SAY_INTRO_3 = 2, + SAY_INTRO_4 = 3, + SAY_PHASE_TWO = 4, + SAY_DEATH = 5, + SAY_KILL = 6, + + EMOTE_PHASE_TWO = 7, + EMOTE_GATE_OPENED = 8 }; -//Gothik enum Spells { + /* living trainee spells */ + SPELL_DEATH_PLAGUE = 55604, + + /* living knight spells */ + SPELL_SHADOW_MARK = 27825, + + /* living rider spells */ + SPELL_SHADOW_BOLT_VOLLEY = 27831, + + /* spectral trainee spells */ + SPELL_ARCANE_EXPLOSION = 27989, + + /* spectral knight spells */ + SPELL_WHIRLWIND = 56408, + + /* spectral rider spells */ + SPELL_DRAIN_LIFE = 27994, + SPELL_UNHOLY_FRENZY = 55648, + + /* spectral horse spells */ + SPELL_STOMP = 27993, + + /* gothik phase two spells */ SPELL_HARVEST_SOUL = 28679, SPELL_SHADOW_BOLT = 29317, - SPELL_INFORM_LIVE_TRAINEE = 27892, - SPELL_INFORM_LIVE_KNIGHT = 27928, - SPELL_INFORM_LIVE_RIDER = 27935, - SPELL_INFORM_DEAD_TRAINEE = 27915, - SPELL_INFORM_DEAD_KNIGHT = 27931, - SPELL_INFORM_DEAD_RIDER = 27937, - - SPELL_SHADOW_MARK = 27825 + + /* visual spells */ + SPELL_ANCHOR_1_TRAINEE = 27892, + SPELL_ANCHOR_1_DK = 27928, + SPELL_ANCHOR_1_RIDER = 27935, + + SPELL_ANCHOR_2_TRAINEE = 27893, + SPELL_ANCHOR_2_DK = 27929, + SPELL_ANCHOR_2_RIDER = 27936, + + SPELL_SKULLS_TRAINEE = 27915, + SPELL_SKULLS_DK = 27931, + SPELL_SKULLS_RIDER = 27937, + + /* teleport spells */ + SPELL_TELEPORT_DEAD = 28025, + SPELL_TELEPORT_LIVE = 28026 }; +#define SPELLHELPER_UNHOLY_FRENZY RAID_MODE<uint32>(SPELL_UNHOLY_FRENZY,27995) enum Creatures { @@ -53,108 +93,205 @@ enum Creatures NPC_DEAD_TRAINEE = 16127, NPC_DEAD_KNIGHT = 16148, NPC_DEAD_RIDER = 16150, - NPC_DEAD_HORSE = 16149 + NPC_DEAD_HORSE = 16149, + + NPC_TRIGGER = 16137 }; -struct Waves { uint32 entry, time, mode; }; -// wave setups are not the same in heroic and normal difficulty, -// mode is 0 only normal, 1 both and 2 only heroic -// but this is handled in DoGothikSummon function -const Waves waves[] = +enum Phases { - {NPC_LIVE_TRAINEE, 20000, 1}, - {NPC_LIVE_TRAINEE, 20000, 1}, - {NPC_LIVE_TRAINEE, 10000, 1}, - {NPC_LIVE_KNIGHT, 10000, 1}, - {NPC_LIVE_TRAINEE, 15000, 1}, - {NPC_LIVE_KNIGHT, 5000, 1}, - {NPC_LIVE_TRAINEE, 20000, 1}, - {NPC_LIVE_TRAINEE, 0, 1}, - {NPC_LIVE_KNIGHT, 10000, 1}, - {NPC_LIVE_TRAINEE, 10000, 2}, - {NPC_LIVE_RIDER, 10000, 0}, - {NPC_LIVE_RIDER, 5000, 2}, - {NPC_LIVE_TRAINEE, 5000, 0}, - {NPC_LIVE_TRAINEE, 15000, 2}, - {NPC_LIVE_KNIGHT, 15000, 0}, - {NPC_LIVE_TRAINEE, 0, 0}, - {NPC_LIVE_RIDER, 10000, 1}, - {NPC_LIVE_KNIGHT, 10000, 1}, - {NPC_LIVE_TRAINEE, 10000, 0}, - {NPC_LIVE_RIDER, 10000, 2}, - {NPC_LIVE_TRAINEE, 0, 2}, - {NPC_LIVE_RIDER, 5000, 1}, - {NPC_LIVE_TRAINEE, 0, 2}, - {NPC_LIVE_KNIGHT, 5000, 1}, - {NPC_LIVE_RIDER, 0, 2}, - {NPC_LIVE_TRAINEE, 20000, 1}, - {NPC_LIVE_RIDER, 0, 1}, - {NPC_LIVE_KNIGHT, 0, 1}, - {NPC_LIVE_TRAINEE, 25000, 2}, - {NPC_LIVE_TRAINEE, 15000, 0}, - {NPC_LIVE_TRAINEE, 25000, 0}, - {0, 0, 1}, + PHASE_ONE = 1, + PHASE_TWO = 2 }; -#define POS_Y_GATE -3360.78f -#define POS_Y_WEST -3285.0f -#define POS_Y_EAST -3434.0f -#define POS_X_NORTH 2750.49f -#define POS_X_SOUTH 2633.84f - -#define IN_LIVE_SIDE(who) (who->GetPositionY() < POS_Y_GATE) - enum Events { - EVENT_NONE, + EVENT_INTRO_2 = 1, + EVENT_INTRO_3, + EVENT_INTRO_4, + EVENT_PHASE_TWO, EVENT_SUMMON, + EVENT_DOORS_UNLOCK, + EVENT_TELEPORT, EVENT_HARVEST, EVENT_BOLT, - EVENT_TELEPORT -}; -enum Pos -{ - POS_LIVE = 6, - POS_DEAD = 5 + EVENT_RESUME_ATTACK }; -const Position PosSummonLive[POS_LIVE] = +enum Actions { - {2669.7f, -3428.76f, 268.56f, 1.6f}, - {2692.1f, -3428.76f, 268.56f, 1.6f}, - {2714.4f, -3428.76f, 268.56f, 1.6f}, - {2669.7f, -3431.67f, 268.56f, 1.6f}, - {2692.1f, -3431.67f, 268.56f, 1.6f}, - {2714.4f, -3431.67f, 268.56f, 1.6f}, + ACTION_GATE_OPENED = 1, + ACTION_MINION_EVADE, + ACTION_ACQUIRE_TARGET }; -const Position PosSummonDead[POS_DEAD] = + +/* Room side checking logic */ +static AreaBoundary* const livingSide = new RectangleBoundary(2633.84f, 2750.49f, -3434.0f, -3360.78f); +static AreaBoundary* const deadSide = new RectangleBoundary(2633.84f, 2750.49f, -3360.78f, -3285.0f); +enum Side { - {2725.1f, -3310.0f, 268.85f, 3.4f}, - {2699.3f, -3322.8f, 268.60f, 3.3f}, - {2733.1f, -3348.5f, 268.84f, 3.1f}, - {2682.8f, -3304.2f, 268.85f, 3.9f}, - {2664.8f, -3340.7f, 268.23f, 3.7f}, + SIDE_NONE = 0, + SIDE_LIVING, + SIDE_DEAD }; +inline static Side GetSide(Position const* who) +{ + if (livingSide->IsWithinBoundary(who)) + return SIDE_LIVING; + if (deadSide->IsWithinBoundary(who)) + return SIDE_DEAD; + return SIDE_NONE; +} +inline static bool IsOnSameSide(Position const* who, Position const* other) +{ + return (GetSide(who) == GetSide(other)); +} +static Player* FindEligibleTarget(Creature const* me, bool isGateOpen) +{ + Map::PlayerList const& players = me->GetMap()->GetPlayers(); + for (Map::PlayerList::const_iterator it = players.begin(); it != players.end(); ++it) + { + Player* player = it->GetSource(); + if (player && (isGateOpen || IsOnSameSide(me, player)) && me->CanSeeOrDetect(player) && me->IsValidAttackTarget(player) && player->isInAccessiblePlaceFor(me)) + { + return player; + } + } -float const PosGroundLiveSide[4] = {2691.2f, -3387.0f, 267.68f, 1.52f}; -float const PosGroundDeadSide[4] = {2693.5f, -3334.6f, 267.68f, 4.67f}; -float const PosPlatform[4] = {2640.5f, -3360.6f, 285.26f, 0.0f}; + return nullptr; +} -// Predicate function to check that the r efzr unit is NOT on the same side as the source. -struct NotOnSameSide : public std::unary_function<Unit*, bool> -{ - NotOnSameSide(Unit* source) : _onLiveSide(IN_LIVE_SIDE(source)) { } - bool operator() (Unit const* target) +/* Wave data */ +typedef std::pair<uint32, uint8> GothikWaveEntry; // (npcEntry, npcCount) +typedef std::set<GothikWaveEntry> GothikWave; +typedef std::pair<GothikWave, uint8> GothikWaveInfo; // (wave, secondsToNext) +typedef std::vector<GothikWaveInfo> GothikWaveData; +const GothikWaveData waves10 = +{ { - return (_onLiveSide != IN_LIVE_SIDE(target)); - } + {{NPC_LIVE_TRAINEE, 2}}, + 20}, + { + {{NPC_LIVE_TRAINEE, 2}}, + 20}, + { + {{NPC_LIVE_TRAINEE, 2}}, + 10}, + { + {{NPC_LIVE_KNIGHT, 1}}, + 10}, + { + {{NPC_LIVE_TRAINEE, 2}}, + 15}, + { + {{NPC_LIVE_KNIGHT, 1}}, + 5}, + { + {{NPC_LIVE_TRAINEE, 2}}, + 20}, + { + {{NPC_LIVE_TRAINEE, 2}, {NPC_LIVE_KNIGHT, 1}}, + 10}, + { + {{NPC_LIVE_RIDER, 1}}, + 10}, + { + {{NPC_LIVE_TRAINEE, 2}}, + 5}, + { + {{NPC_LIVE_KNIGHT, 1}}, + 15}, + { + {{NPC_LIVE_TRAINEE, 2}, {NPC_LIVE_RIDER, 1}}, + 10}, + { + {{NPC_LIVE_KNIGHT, 2}}, + 10}, + { + {{NPC_LIVE_TRAINEE, 2}}, + 10}, + { + {{NPC_LIVE_RIDER, 1}}, + 5}, + { + {{NPC_LIVE_KNIGHT, 1}}, + 5}, + { + {{NPC_LIVE_TRAINEE, 2}}, + 20}, + { + {{NPC_LIVE_RIDER, 1}, {NPC_LIVE_KNIGHT, 1}, {NPC_LIVE_TRAINEE, 2}}, + 15}, + { + {{NPC_LIVE_TRAINEE, 2}}, + 0} +}; - private: - bool _onLiveSide; +const GothikWaveData waves25 = +{ + { + {{NPC_LIVE_TRAINEE, 3}}, + 20}, + { + {{NPC_LIVE_TRAINEE, 3}}, + 20}, + { + {{NPC_LIVE_TRAINEE, 3}}, + 10}, + { + {{NPC_LIVE_KNIGHT, 2}}, + 10}, + { + {{NPC_LIVE_TRAINEE, 3}}, + 15}, + { + {{NPC_LIVE_KNIGHT, 2}}, + 5}, + { + {{NPC_LIVE_TRAINEE, 3}}, + 20}, + { + {{NPC_LIVE_TRAINEE, 3}, {NPC_LIVE_KNIGHT, 2}}, + 10}, + { + {{NPC_LIVE_TRAINEE, 3}}, + 10}, + { + {{NPC_LIVE_RIDER, 1}}, + 5}, + { + {{NPC_LIVE_TRAINEE, 3}}, + 15}, + { + {{NPC_LIVE_RIDER, 1}}, + 10}, + { + {{NPC_LIVE_KNIGHT, 2}}, + 10}, + { + {{NPC_LIVE_RIDER, 1}}, + 10}, + { + {{NPC_LIVE_RIDER, 1}, {NPC_LIVE_TRAINEE, 3}}, + 5}, + { + {{NPC_LIVE_KNIGHT, 1}, {NPC_LIVE_TRAINEE, 3}}, + 5}, + { + {{NPC_LIVE_RIDER, 1}, {NPC_LIVE_TRAINEE, 3}}, + 20}, + { + {{NPC_LIVE_RIDER, 1}, {NPC_LIVE_KNIGHT, 2}, {NPC_LIVE_TRAINEE, 3}}, + 0} }; + +// GUID of first trigger NPC (used as offset for guid checks) +// 0-1 are living side soul triggers, 2-3 are spectral side soul triggers, 4 is living rider spawn trigger, 5-7 are living other spawn trigger, 8-12 are skull pile triggers +const uint32 CGUID_TRIGGER = 127618; +/* Creature AI */ class boss_gothik : public CreatureScript { public: @@ -165,29 +302,18 @@ class boss_gothik : public CreatureScript boss_gothikAI(Creature* creature) : BossAI(creature, BOSS_GOTHIK) { Initialize(); - waveCount = 0; } void Initialize() { - mergedSides = false; - phaseTwo = false; - thirtyPercentReached = false; + _waveCount = 0; + _gateCanOpen = false; + _gateIsOpen = true; + _lastTeleportDead = false; } - uint32 waveCount; - bool mergedSides; - bool phaseTwo; - bool thirtyPercentReached; - - GuidVector LiveTriggerGUID; - GuidVector DeadTriggerGUID; - void Reset() override { - LiveTriggerGUID.clear(); - DeadTriggerGUID.clear(); - me->SetReactState(REACT_PASSIVE); instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE); _Reset(); @@ -196,43 +322,29 @@ class boss_gothik : public CreatureScript void EnterCombat(Unit* /*who*/) override { - for (uint32 i = 0; i < POS_LIVE; ++i) - if (Creature* trigger = DoSummon(WORLD_TRIGGER, PosSummonLive[i])) - LiveTriggerGUID.push_back(trigger->GetGUID()); - for (uint32 i = 0; i < POS_DEAD; ++i) - if (Creature* trigger = DoSummon(WORLD_TRIGGER, PosSummonDead[i])) - DeadTriggerGUID.push_back(trigger->GetGUID()); - - if (LiveTriggerGUID.size() < POS_LIVE || DeadTriggerGUID.size() < POS_DEAD) - { - TC_LOG_ERROR("scripts", "Script Gothik: cannot summon triggers!"); - EnterEvadeMode(); - return; - } - _EnterCombat(); - waveCount = 0; - events.ScheduleEvent(EVENT_SUMMON, 30000); - DoTeleportTo(PosPlatform); - Talk(SAY_SPEECH); + events.SetPhase(PHASE_ONE); + events.ScheduleEvent(EVENT_SUMMON, 25 * IN_MILLISECONDS, 0, PHASE_ONE); + events.ScheduleEvent(EVENT_DOORS_UNLOCK, 205 * IN_MILLISECONDS, 0, PHASE_ONE); + events.ScheduleEvent(EVENT_PHASE_TWO, 270 * IN_MILLISECONDS, 0, PHASE_ONE); + Talk(SAY_INTRO_1); + events.ScheduleEvent(EVENT_INTRO_2, 4 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_INTRO_3, 9 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_INTRO_4, 14 * IN_MILLISECONDS); instance->SetData(DATA_GOTHIK_GATE, GO_STATE_READY); + _gateIsOpen = false; } void JustSummoned(Creature* summon) override { - if (summon->GetEntry() == WORLD_TRIGGER) - summon->setActive(true); - else if (!mergedSides) + summons.Summon(summon); + if (me->IsInCombat()) { - summon->AI()->DoAction(me->HasReactState(REACT_PASSIVE) ? 1 : 0); - summon->AI()->EnterEvadeMode(); + summon->AI()->DoAction(_gateIsOpen ? ACTION_GATE_OPENED : ACTION_ACQUIRE_TARGET); + summon->SetCombatPulseDelay(5); } else - { - summon->AI()->DoAction(0); - summon->AI()->DoZoneInCombat(); - } - summons.Summon(summon); + summon->DespawnOrUnsummon(); } void SummonedCreatureDespawn(Creature* summon) override @@ -240,256 +352,208 @@ class boss_gothik : public CreatureScript summons.Despawn(summon); } - void KilledUnit(Unit* /*victim*/) override + void KilledUnit(Unit* victim) override { - if (!(rand32() % 5)) + if (victim && victim->GetTypeId() == TYPEID_PLAYER) Talk(SAY_KILL); } void JustDied(Unit* /*killer*/) override { - LiveTriggerGUID.clear(); - DeadTriggerGUID.clear(); _JustDied(); Talk(SAY_DEATH); instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE); + _gateIsOpen = false; } - void DoGothikSummon(uint32 entry) - { - if (GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL) - { - switch (entry) - { - case NPC_LIVE_TRAINEE: - { - if (Creature* liveTrigger = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[0])) - DoSummon(NPC_LIVE_TRAINEE, liveTrigger, 1); - if (Creature* liveTrigger1 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[1])) - DoSummon(NPC_LIVE_TRAINEE, liveTrigger1, 1); - if (Creature* liveTrigger2 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[2])) - DoSummon(NPC_LIVE_TRAINEE, liveTrigger2, 1); - break; - } - case NPC_LIVE_KNIGHT: - { - if (Creature* liveTrigger3 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[3])) - DoSummon(NPC_LIVE_KNIGHT, liveTrigger3, 1); - if (Creature* liveTrigger5 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[5])) - DoSummon(NPC_LIVE_KNIGHT, liveTrigger5, 1); - break; - } - case NPC_LIVE_RIDER: - { - if (Creature* liveTrigger4 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[4])) - DoSummon(NPC_LIVE_RIDER, liveTrigger4, 1); - break; - } - } - } - else - { - switch (entry) - { - case NPC_LIVE_TRAINEE: - { - if (Creature* liveTrigger = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[4])) - DoSummon(NPC_LIVE_TRAINEE, liveTrigger, 1); - if (Creature* liveTrigger2 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[4])) - DoSummon(NPC_LIVE_TRAINEE, liveTrigger2, 1); - break; - } - case NPC_LIVE_KNIGHT: - { - if (Creature* liveTrigger5 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[4])) - DoSummon(NPC_LIVE_KNIGHT, liveTrigger5, 1); - break; - } - case NPC_LIVE_RIDER: - { - if (Creature* liveTrigger4 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[4])) - DoSummon(NPC_LIVE_RIDER, liveTrigger4, 1); - break; - } - } - } - } - - bool CheckGroupSplitted() - { - bool checklife = false; - bool checkdead = false; - Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers(); - for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) - { - if (i->GetSource() && i->GetSource()->IsAlive() && - i->GetSource()->GetPositionX() <= POS_X_NORTH && - i->GetSource()->GetPositionX() >= POS_X_SOUTH && - i->GetSource()->GetPositionY() <= POS_Y_GATE && - i->GetSource()->GetPositionY() >= POS_Y_EAST) - { - checklife = true; - } - else if (i->GetSource() && i->GetSource()->IsAlive() && - i->GetSource()->GetPositionX() <= POS_X_NORTH && - i->GetSource()->GetPositionX() >= POS_X_SOUTH && - i->GetSource()->GetPositionY() >= POS_Y_GATE && - i->GetSource()->GetPositionY() <= POS_Y_WEST) - { - checkdead = true; - } - - if (checklife && checkdead) - return true; - } - - return false; - } - - void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override + void OpenGate() { - uint32 spellId = 0; - switch (spell->Id) - { - case SPELL_INFORM_LIVE_TRAINEE: spellId = SPELL_INFORM_DEAD_TRAINEE; break; - case SPELL_INFORM_LIVE_KNIGHT: spellId = SPELL_INFORM_DEAD_KNIGHT; break; - case SPELL_INFORM_LIVE_RIDER: spellId = SPELL_INFORM_DEAD_RIDER; break; - } - if (spellId && me->IsInCombat()) + if (_gateIsOpen) + return; + instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE); + Talk(EMOTE_GATE_OPENED); + _gateIsOpen = true; + + for (ObjectGuid summonGuid : summons) { - me->HandleEmoteCommand(EMOTE_ONESHOT_SPELL_CAST); - if (Creature* pRandomDeadTrigger = ObjectAccessor::GetCreature(*me, DeadTriggerGUID[rand32() % POS_DEAD])) - me->CastSpell(pRandomDeadTrigger, spellId, true); + if (Creature* summon = ObjectAccessor::GetCreature(*me, summonGuid)) + summon->AI()->DoAction(ACTION_GATE_OPENED); + if (summons.empty()) // ACTION_GATE_OPENED may cause an evade, despawning summons and invalidating our iterator + break; } } void DamageTaken(Unit* /*who*/, uint32& damage) override { - if (!phaseTwo) + if (!events.IsInPhase(PHASE_TWO)) damage = 0; } - void SpellHitTarget(Unit* target, SpellInfo const* spell) override + void DoAction(int32 action) override { - if (!me->IsInCombat()) - return; - - switch (spell->Id) + switch (action) { - case SPELL_INFORM_DEAD_TRAINEE: - DoSummon(NPC_DEAD_TRAINEE, target, 0); - break; - case SPELL_INFORM_DEAD_KNIGHT: - DoSummon(NPC_DEAD_KNIGHT, target, 0); - break; - case SPELL_INFORM_DEAD_RIDER: - DoSummon(NPC_DEAD_RIDER, target, 1.0f); - DoSummon(NPC_DEAD_HORSE, target, 1.0f); + case ACTION_MINION_EVADE: + if (_gateIsOpen || me->getThreatManager().isThreatListEmpty()) + return EnterEvadeMode(EVADE_REASON_NO_HOSTILES); + if (_gateCanOpen) + OpenGate(); break; } } + void EnterEvadeMode(EvadeReason why) override + { + BossAI::EnterEvadeMode(why); + Position const& home = me->GetHomePosition(); + me->NearTeleportTo(home.GetPositionX(), home.GetPositionY(), home.GetPositionZ(), home.GetOrientation()); + } + void UpdateAI(uint32 diff) override { if (!UpdateVictim()) return; - events.Update(diff); - - if (!thirtyPercentReached && HealthBelowPct(30) && phaseTwo) + if (me->HasReactState(REACT_AGGRESSIVE) && !_gateIsOpen && !IsOnSameSide(me, me->GetVictim())) { - thirtyPercentReached = true; - instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE); + // NBD: this should only happen in practice if there is nobody left alive on our side (we should open gate) + // thus we only do a cursory check to make sure (edge cases?) + if (Player* newTarget = FindEligibleTarget(me, _gateIsOpen)) + { + me->getThreatManager().resetAllAggro(); + me->AddThreat(newTarget, 1.0f); + AttackStart(newTarget); + } + else + OpenGate(); } - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; + events.Update(diff); + + if (!_gateIsOpen && HealthBelowPct(30) && events.IsInPhase(PHASE_TWO)) + OpenGate(); while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case EVENT_SUMMON: - if (waves[waveCount].entry) + { + if (RAID_MODE(waves10,waves25).size() <= _waveCount) // bounds check { - if ((waves[waveCount].mode == 2) && (GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL)) - DoGothikSummon(waves[waveCount].entry); - else if ((waves[waveCount].mode == 0) && (GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)) - DoGothikSummon(waves[waveCount].entry); - else if (waves[waveCount].mode == 1) - DoGothikSummon(waves[waveCount].entry); - - // if group is not splitted, open gate and merge both sides at ~ 2 minutes (wave 11) - if (waveCount == 11) + TC_LOG_INFO("scripts", "GothikAI: Wave count %d is out of range for difficulty %d.", _waveCount, GetDifficulty()); + break; + } + + std::list<Creature*> triggers; + me->GetCreatureListWithEntryInGrid(triggers, NPC_TRIGGER, 150.0f); + for (GothikWaveEntry entry : RAID_MODE(waves10, waves25)[_waveCount].first) + for (uint8 i = 0; i < entry.second; ++i) { - if (!CheckGroupSplitted()) + // GUID layout is as follows: + // CGUID+4: center (back of platform) - primary rider spawn + // CGUID+5: north (back of platform) - primary knight spawn + // CGUID+6: center (front of platform) - second spawn + // CGUID+7: south (front of platform) - primary trainee spawn + uint32 targetDBGuid; + switch (entry.first) { - instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE); - DummyEntryCheckPredicate pred; - summons.DoAction(0, pred); //! Magic numbers fail - summons.DoZoneInCombat(); - mergedSides = true; + case NPC_LIVE_RIDER: // only spawns from center (back) > north + targetDBGuid = (CGUID_TRIGGER + 4) + (i % 2); + break; + case NPC_LIVE_KNIGHT: // spawns north > center (front) > south + targetDBGuid = (CGUID_TRIGGER + 5) + (i % 3); + break; + case NPC_LIVE_TRAINEE: // spawns south > center (front) > north + targetDBGuid = (CGUID_TRIGGER + 7) - (i % 3); + break; + default: + targetDBGuid = 0; } + + for (Creature* trigger : triggers) + if (trigger && trigger->GetSpawnId() == targetDBGuid) + { + DoSummon(entry.first, trigger, 1.0f, 15 * IN_MILLISECONDS, TEMPSUMMON_CORPSE_TIMED_DESPAWN); + break; + } } - if (waves[waveCount].mode == 1) - events.ScheduleEvent(EVENT_SUMMON, waves[waveCount].time); - else if ((waves[waveCount].mode == 2) && (GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL)) - events.ScheduleEvent(EVENT_SUMMON, waves[waveCount].time); - else if ((waves[waveCount].mode == 0) && (GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)) - events.ScheduleEvent(EVENT_SUMMON, waves[waveCount].time); - else - events.ScheduleEvent(EVENT_SUMMON, 0); + if (uint8 timeToNext = RAID_MODE(waves10, waves25)[_waveCount].second) + events.ScheduleEvent(EVENT_SUMMON, timeToNext * IN_MILLISECONDS, 0, PHASE_ONE); - ++waveCount; - } - else - { - phaseTwo = true; - Talk(SAY_TELEPORT); - DoTeleportTo(PosGroundLiveSide); - me->SetReactState(REACT_AGGRESSIVE); - DummyEntryCheckPredicate pred; - summons.DoAction(0, pred); //! Magic numbers fail - summons.DoZoneInCombat(); - events.ScheduleEvent(EVENT_BOLT, 1000); - events.ScheduleEvent(EVENT_HARVEST, urand(3000, 15000)); - events.ScheduleEvent(EVENT_TELEPORT, 20000); - } + ++_waveCount; break; - case EVENT_BOLT: - DoCastVictim(SPELL_SHADOW_BOLT); - events.ScheduleEvent(EVENT_BOLT, 1000); + } + case EVENT_DOORS_UNLOCK: + _gateCanOpen = true; + for (ObjectGuid summonGuid : summons) + if (Creature* summon = ObjectAccessor::GetCreature(*me, summonGuid)) + if (summon->IsAlive() && (!summon->IsInCombat() || summon->IsInEvadeMode())) + { + OpenGate(); + break; + } break; - case EVENT_HARVEST: - DoCastVictim(SPELL_HARVEST_SOUL, true); - events.ScheduleEvent(EVENT_HARVEST, urand(20000, 25000)); + case EVENT_PHASE_TWO: + events.SetPhase(PHASE_TWO); + events.ScheduleEvent(EVENT_TELEPORT, 20 * IN_MILLISECONDS, 0, PHASE_TWO); + events.ScheduleEvent(EVENT_HARVEST, 15 * IN_MILLISECONDS, 0, PHASE_TWO); + events.ScheduleEvent(EVENT_RESUME_ATTACK, 2 * IN_MILLISECONDS, 0, PHASE_TWO); + Talk(SAY_PHASE_TWO); + Talk(EMOTE_PHASE_TWO); + me->SetReactState(REACT_PASSIVE); + me->getThreatManager().resetAllAggro(); + DoCastAOE(SPELL_TELEPORT_LIVE); break; case EVENT_TELEPORT: - if (!thirtyPercentReached) + if (!HealthBelowPct(30)) { + me->CastStop(); me->AttackStop(); - if (IN_LIVE_SIDE(me)) - DoTeleportTo(PosGroundDeadSide); - else - DoTeleportTo(PosGroundLiveSide); - - me->getThreatManager().resetAggro(NotOnSameSide(me)); - if (Unit* target = SelectTarget(SELECT_TARGET_NEAREST, 0)) - { - me->getThreatManager().addThreat(target, 100.0f); - AttackStart(target); - } - - events.ScheduleEvent(EVENT_TELEPORT, 20000); + me->StopMoving(); + me->SetReactState(REACT_PASSIVE); + me->getThreatManager().resetAllAggro(); + DoCastAOE(_lastTeleportDead ? SPELL_TELEPORT_LIVE : SPELL_TELEPORT_DEAD); + _lastTeleportDead = !_lastTeleportDead; + + events.CancelEvent(EVENT_BOLT); + events.ScheduleEvent(EVENT_TELEPORT, 20 * IN_MILLISECONDS, 0, PHASE_TWO); + events.ScheduleEvent(EVENT_RESUME_ATTACK, 2 * IN_MILLISECONDS, 0, PHASE_TWO); } break; + + case EVENT_HARVEST: + DoCastAOE(SPELL_HARVEST_SOUL, true); // triggered allows this to go "through" shadow bolt + events.ScheduleEvent(EVENT_HARVEST, 15 * IN_MILLISECONDS, 0, PHASE_TWO); + break; + case EVENT_RESUME_ATTACK: + me->SetReactState(REACT_AGGRESSIVE); + events.ScheduleEvent(EVENT_BOLT, 0, 0, PHASE_TWO); + // return to the start of this method so victim side etc is re-evaluated + return UpdateAI(0u); // tail recursion for efficiency + case EVENT_BOLT: + DoCastVictim(SPELL_SHADOW_BOLT); + events.ScheduleEvent(EVENT_BOLT, 1 * IN_MILLISECONDS, 0, PHASE_TWO); + break; + case EVENT_INTRO_2: + Talk(SAY_INTRO_2); + break; + case EVENT_INTRO_3: + Talk(SAY_INTRO_3); + break; + case EVENT_INTRO_4: + Talk(SAY_INTRO_4); + break; } } - - if (!phaseTwo) - DoMeleeAttackIfReady(); } + + private: + uint32 _waveCount; + bool _gateCanOpen; + bool _gateIsOpen; + bool _lastTeleportDead; }; CreatureAI* GetAI(Creature* creature) const override @@ -498,86 +562,407 @@ class boss_gothik : public CreatureScript } }; -class npc_gothik_minion : public CreatureScript +struct npc_gothik_minion_baseAI : public ScriptedAI { public: - npc_gothik_minion() : CreatureScript("npc_gothik_minion") { } + npc_gothik_minion_baseAI(Creature* creature, uint32 deathNotify=0) : ScriptedAI(creature), _deathNotify(deathNotify), _gateIsOpen(false) { } + + void JustDied(Unit* /*killer*/) override + { + if (_deathNotify) + DoCastAOE(_deathNotify, true); + } + + inline bool isOnSameSide(Unit const* who) const + { + return IsOnSameSide(me, who); + } - struct npc_gothik_minionAI : public CombatAI + void DamageTaken(Unit* attacker, uint32 &damage) override + { // do not allow minions to take damage before the gate is opened + if (!_gateIsOpen && !isOnSameSide(attacker)) + damage = 0; + } + + void DoAction(int32 action) override { - npc_gothik_minionAI(Creature* creature) : CombatAI(creature) + switch (action) { - liveSide = IN_LIVE_SIDE(me); - gateClose = false; + case ACTION_GATE_OPENED: + _gateIsOpen = true; + // intentional missing break + case ACTION_ACQUIRE_TARGET: + if (Player* target = FindEligibleTarget(me, _gateIsOpen)) + { + me->AddThreat(target, 1.0f); + AttackStart(target); + } + else + EnterEvadeMode(EVADE_REASON_NO_HOSTILES); + break; + } + } + + void EnterEvadeMode(EvadeReason why) override + { + ScriptedAI::EnterEvadeMode(why); + + if (InstanceScript* instance = me->GetInstanceScript()) + if (Creature* gothik = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_GOTHIK))) + gothik->AI()->DoAction(ACTION_MINION_EVADE); + } + + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + return; + + if (!_gateIsOpen && !isOnSameSide(me->GetVictim())) + { // reset threat, then try to find someone on same side as us to attack + if (Player* newTarget = FindEligibleTarget(me, _gateIsOpen)) + { + me->RemoveAurasByType(SPELL_AURA_MOD_TAUNT); + me->getThreatManager().resetAllAggro(); + me->AddThreat(newTarget, 1.0f); + AttackStart(newTarget); + } + else + EnterEvadeMode(EVADE_REASON_NO_HOSTILES); } - bool liveSide; - bool gateClose; + _UpdateAI(diff); + } + + virtual void _UpdateAI(uint32 diff) { ScriptedAI::UpdateAI(diff); }; - bool isOnSameSide(Unit const* who) const + private: + uint32 _deathNotify; + bool _gateIsOpen; +}; + +class npc_gothik_minion_livingtrainee : public CreatureScript +{ + public: + npc_gothik_minion_livingtrainee() : CreatureScript("npc_gothik_minion_livingtrainee") { } + + struct npc_gothik_minion_livingtraineeAI : public npc_gothik_minion_baseAI + { + npc_gothik_minion_livingtraineeAI(Creature* creature) : npc_gothik_minion_baseAI(creature, SPELL_ANCHOR_1_TRAINEE), _deathPlagueTimer(urandms(5,20)) { } + + void _UpdateAI(uint32 diff) { - return (liveSide == IN_LIVE_SIDE(who)); + if (diff < _deathPlagueTimer) + _deathPlagueTimer -= diff; + else + { + DoCastAOE(SPELL_DEATH_PLAGUE); + _deathPlagueTimer = urandms(5, 20); + } + DoMeleeAttackIfReady(); } + uint32 _deathPlagueTimer; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<npc_gothik_minion_livingtraineeAI>(creature); + } +}; + +class npc_gothik_minion_livingknight : public CreatureScript +{ + public: + npc_gothik_minion_livingknight() : CreatureScript("npc_gothik_minion_livingknight") { } - void DoAction(int32 param) override + struct npc_gothik_minion_livingknightAI : public npc_gothik_minion_baseAI + { + npc_gothik_minion_livingknightAI(Creature* creature) : npc_gothik_minion_baseAI(creature, SPELL_ANCHOR_1_DK), _whirlwindTimer(urandms(5,10)) { } + + void _UpdateAI(uint32 diff) { - gateClose = param != 0; + if (diff < _whirlwindTimer) + _whirlwindTimer -= diff; + else + { + DoCastAOE(SPELL_SHADOW_MARK); + _whirlwindTimer = urandms(15, 20); + } + DoMeleeAttackIfReady(); } + uint32 _whirlwindTimer; + }; - void DamageTaken(Unit* attacker, uint32 &damage) override + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<npc_gothik_minion_livingknightAI>(creature); + } +}; + +class npc_gothik_minion_livingrider : public CreatureScript +{ + public: + npc_gothik_minion_livingrider() : CreatureScript("npc_gothik_minion_livingrider") { } + + struct npc_gothik_minion_livingriderAI : public npc_gothik_minion_baseAI + { + npc_gothik_minion_livingriderAI(Creature* creature) : npc_gothik_minion_baseAI(creature, SPELL_ANCHOR_1_RIDER), _boltVolleyTimer(urandms(5,10)) { } + + void _UpdateAI(uint32 diff) { - if (gateClose && !isOnSameSide(attacker)) - damage = 0; + if (diff < _boltVolleyTimer) + _boltVolleyTimer -= diff; + else + { + DoCastAOE(SPELL_SHADOW_BOLT_VOLLEY); + _boltVolleyTimer = urandms(10, 15); + } + if (!me->HasUnitState(UNIT_STATE_CASTING)) + DoMeleeAttackIfReady(); } + uint32 _boltVolleyTimer; + }; - void JustDied(Unit* /*killer*/) override + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<npc_gothik_minion_livingriderAI>(creature); + } +}; + +class npc_gothik_minion_spectraltrainee : public CreatureScript +{ + public: + npc_gothik_minion_spectraltrainee() : CreatureScript("npc_gothik_minion_spectraltrainee") { } + + struct npc_gothik_minion_spectraltraineeAI : public npc_gothik_minion_baseAI + { + npc_gothik_minion_spectraltraineeAI(Creature* creature) : npc_gothik_minion_baseAI(creature), _explosionTimer(2 * IN_MILLISECONDS) { } + + void _UpdateAI(uint32 diff) + { + if (diff < _explosionTimer) + _explosionTimer -= diff; + else { - if (me->IsSummon()) - if (Unit* owner = me->ToTempSummon()->GetSummoner()) - CombatAI::JustDied(owner); + DoCastAOE(SPELL_ARCANE_EXPLOSION); + _explosionTimer = 2 * IN_MILLISECONDS; } + DoMeleeAttackIfReady(); + } + uint32 _explosionTimer; + }; - void EnterEvadeMode(EvadeReason why) override + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<npc_gothik_minion_spectraltraineeAI>(creature); + } +}; + +class npc_gothik_minion_spectralknight : public CreatureScript +{ + public: + npc_gothik_minion_spectralknight() : CreatureScript("npc_gothik_minion_spectralknight") { } + + struct npc_gothik_minion_spectralknightAI : public npc_gothik_minion_baseAI + { + npc_gothik_minion_spectralknightAI(Creature* creature) : npc_gothik_minion_baseAI(creature), _whirlwindTimer(urandms(15,25)) { } + + void _UpdateAI(uint32 diff) + { + if (diff < _whirlwindTimer) + _whirlwindTimer -= diff; + else { - if (!gateClose) - { - CombatAI::EnterEvadeMode(why); - return; - } + DoCastAOE(SPELL_WHIRLWIND); + _whirlwindTimer = urandms(20, 25); + } + DoMeleeAttackIfReady(); + } + uint32 _whirlwindTimer; + }; - if (!_EnterEvadeMode()) - return; + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<npc_gothik_minion_spectralknightAI>(creature); + } +}; + +class npc_gothik_minion_spectralrider : public CreatureScript +{ + public: + npc_gothik_minion_spectralrider() : CreatureScript("npc_gothik_minion_spectralrider") { } + + struct npc_gothik_minion_spectralriderAI : public npc_gothik_minion_baseAI + { + npc_gothik_minion_spectralriderAI(Creature* creature) : npc_gothik_minion_baseAI(creature), _frenzyTimer(urandms(2,5)), _drainTimer(urandms(8,12)) { } - Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers(); - for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + void _UpdateAI(uint32 diff) + { + if (diff < _frenzyTimer) + _frenzyTimer -= diff; + else if (me->HasUnitState(UNIT_STATE_CASTING)) + _frenzyTimer = 0; + else + { // target priority: knight > other rider > horse > gothik + std::list<Creature*> potentialTargets = DoFindFriendlyMissingBuff(30.0, SPELLHELPER_UNHOLY_FRENZY); + Creature *knightTarget = nullptr, *riderTarget = nullptr, *horseTarget = nullptr, *gothikTarget = nullptr; + for (Creature* pTarget : potentialTargets) { - if (i->GetSource() && i->GetSource()->IsAlive() && isOnSameSide(i->GetSource())) + switch (pTarget->GetEntry()) { - AttackStart(i->GetSource()); - return; + case NPC_DEAD_KNIGHT: + knightTarget = pTarget; + break; + case NPC_DEAD_RIDER: + riderTarget = pTarget; + break; + case NPC_DEAD_HORSE: + horseTarget = pTarget; + break; + case NPC_GOTHIK: + gothikTarget = pTarget; + break; } + if (knightTarget) + break; } + Creature* target = knightTarget ? knightTarget : riderTarget ? riderTarget : horseTarget ? horseTarget : gothikTarget ? gothikTarget : nullptr; + if (target) + DoCast(target, SPELL_UNHOLY_FRENZY); + _frenzyTimer = 20 * IN_MILLISECONDS; + } - me->GetMotionMaster()->MoveIdle(); - Reset(); + if (diff < _drainTimer) + _drainTimer -= diff; + else + { + DoCastVictim(SPELL_DRAIN_LIFE); + _drainTimer = urandms(10,15); } - void UpdateAI(uint32 diff) override + if (!me->HasUnitState(UNIT_STATE_CASTING)) + DoMeleeAttackIfReady(); + } + uint32 _frenzyTimer, _drainTimer; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<npc_gothik_minion_spectralriderAI>(creature); + } +}; + +class npc_gothik_minion_spectralhorse : public CreatureScript +{ + public: + npc_gothik_minion_spectralhorse() : CreatureScript("npc_gothik_minion_spectralhorse") { } + + struct npc_gothik_minion_spectralhorseAI : public npc_gothik_minion_baseAI + { + npc_gothik_minion_spectralhorseAI(Creature* creature) : npc_gothik_minion_baseAI(creature), _stompTimer(urandms(10,15)) { } + + void _UpdateAI(uint32 diff) + { + if (diff < _stompTimer) + _stompTimer -= diff; + else { - if (gateClose && (!isOnSameSide(me) || (me->GetVictim() && !isOnSameSide(me->GetVictim())))) - { - EnterEvadeMode(EVADE_REASON_OTHER); - return; - } + DoCastAOE(SPELL_STOMP); + _stompTimer = urandms(14, 18); + } + DoMeleeAttackIfReady(); + } + uint32 _stompTimer; + }; - CombatAI::UpdateAI(diff); + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<npc_gothik_minion_spectralhorseAI>(creature); + } +}; + +class npc_gothik_trigger : public CreatureScript +{ +public: + npc_gothik_trigger() : CreatureScript("npc_gothik_trigger") { } + + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<npc_gothik_triggerAI>(creature); + } + + struct npc_gothik_triggerAI : public ScriptedAI + { + npc_gothik_triggerAI(Creature* creature) : ScriptedAI(creature) { creature->SetDisableGravity(true); } + + void EnterEvadeMode(EvadeReason /*why*/) override { } + void UpdateAI(uint32 /*diff*/) override { } + void EnterCombat(Unit* /*who*/) override { } + void DamageTaken(Unit* /*who*/, uint32& damage) override { damage = 0; } + + Creature* SelectRandomSkullPile() + { + std::list<Creature*> triggers; + me->GetCreatureListWithEntryInGrid(triggers, NPC_TRIGGER, 150.0f); + uint32 targetDBGuid = CGUID_TRIGGER + urand(8, 12); // CGUID+8 to CGUID+12 are the triggers for the skull piles on dead side + for (Creature* trigger : triggers) + if (trigger && trigger->GetSpawnId() == targetDBGuid) + return trigger; + + return nullptr; + } + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override + { + if (!spell) + return; + + switch (spell->Id) + { + case SPELL_ANCHOR_1_TRAINEE: + DoCastAOE(SPELL_ANCHOR_2_TRAINEE, true); + break; + case SPELL_ANCHOR_1_DK: + DoCastAOE(SPELL_ANCHOR_2_DK, true); + break; + case SPELL_ANCHOR_1_RIDER: + DoCastAOE(SPELL_ANCHOR_2_RIDER, true); + break; + case SPELL_ANCHOR_2_TRAINEE: + if (Creature* target = SelectRandomSkullPile()) + DoCast(target, SPELL_SKULLS_TRAINEE, true); + break; + case SPELL_ANCHOR_2_DK: + if (Creature* target = SelectRandomSkullPile()) + DoCast(target, SPELL_SKULLS_DK, true); + break; + case SPELL_ANCHOR_2_RIDER: + if (Creature* target = SelectRandomSkullPile()) + DoCast(target, SPELL_SKULLS_RIDER, true); + break; + case SPELL_SKULLS_TRAINEE: + DoSummon(NPC_DEAD_TRAINEE, me, 0.0f, 15 * IN_MILLISECONDS, TEMPSUMMON_CORPSE_TIMED_DESPAWN); + break; + case SPELL_SKULLS_DK: + DoSummon(NPC_DEAD_KNIGHT, me, 0.0f, 15 * IN_MILLISECONDS, TEMPSUMMON_CORPSE_TIMED_DESPAWN); + break; + case SPELL_SKULLS_RIDER: + DoSummon(NPC_DEAD_RIDER, me, 0.0f, 15 * IN_MILLISECONDS, TEMPSUMMON_CORPSE_TIMED_DESPAWN); + DoSummon(NPC_DEAD_HORSE, me, 0.0f, 15 * IN_MILLISECONDS, TEMPSUMMON_CORPSE_TIMED_DESPAWN); + break; } - }; + } - CreatureAI* GetAI(Creature* creature) const override + // dead side summons are "owned" by gothik + void JustSummoned(Creature* summon) override + { + if (Creature* gothik = ObjectAccessor::GetCreature(*me, me->GetInstanceScript()->GetGuidData(DATA_GOTHIK))) + gothik->AI()->JustSummoned(summon); + } + void SummonedCreatureDespawn(Creature* summon) override { - return new npc_gothik_minionAI(creature); + if (Creature* gothik = ObjectAccessor::GetCreature(*me, me->GetInstanceScript()->GetGuidData(DATA_GOTHIK))) + gothik->AI()->SummonedCreatureDespawn(summon); } + }; }; class spell_gothik_shadow_bolt_volley : public SpellScriptLoader @@ -609,6 +994,13 @@ class spell_gothik_shadow_bolt_volley : public SpellScriptLoader void AddSC_boss_gothik() { new boss_gothik(); - new npc_gothik_minion(); + new npc_gothik_minion_livingtrainee(); + new npc_gothik_minion_livingknight(); + new npc_gothik_minion_livingrider(); + new npc_gothik_minion_spectraltrainee(); + new npc_gothik_minion_spectralknight(); + new npc_gothik_minion_spectralrider(); + new npc_gothik_minion_spectralhorse(); + new npc_gothik_trigger(); new spell_gothik_shadow_bolt_volley(); } diff --git a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp index 916bc3d0438..c8a4eb7fbc8 100644 --- a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp +++ b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp @@ -91,15 +91,6 @@ DoorData const doorData[] = { 0, 0, DOOR_TYPE_ROOM } }; -MinionData const minionData[] = -{ - { NPC_SIR, BOSS_HORSEMEN }, - { NPC_THANE, BOSS_HORSEMEN }, - { NPC_LADY, BOSS_HORSEMEN }, - { NPC_BARON, BOSS_HORSEMEN }, - { 0, 0, } -}; - ObjectData const objectData[] = { { GO_NAXX_PORTAL_ARACHNID, DATA_NAXX_PORTAL_ARACHNID }, @@ -152,11 +143,8 @@ class instance_naxxramas : public InstanceMapScript SetBossNumber(EncounterCount); LoadBossBoundaries(boundaries); LoadDoorData(doorData); - LoadMinionData(minionData); LoadObjectData(nullptr, objectData); - minHorsemenDiedTime = 0; - maxHorsemenDiedTime = 0; AbominationCount = 0; hadAnubRekhanGreet = false; hadFaerlinaGreet = false; @@ -179,6 +167,9 @@ class instance_naxxramas : public InstanceMapScript case NPC_RAZUVIOUS: RazuviousGUID = creature->GetGUID(); break; + case NPC_GOTHIK: + GothikGUID = creature->GetGUID(); + break; case NPC_THANE: ThaneGUID = creature->GetGUID(); break; @@ -215,13 +206,6 @@ class instance_naxxramas : public InstanceMapScript default: break; } - - AddMinion(creature, true); - } - - void OnCreatureRemove(Creature* creature) override - { - AddMinion(creature, false); } void ProcessEvent(WorldObject* /*source*/, uint32 eventId) override @@ -351,25 +335,6 @@ class instance_naxxramas : public InstanceMapScript if (GameObject* gate = instance->GetGameObject(GothikGateGUID)) gate->SetGoState(GOState(value)); break; - case DATA_HORSEMEN0: - case DATA_HORSEMEN1: - case DATA_HORSEMEN2: - case DATA_HORSEMEN3: - if (value == NOT_STARTED) - { - minHorsemenDiedTime = 0; - maxHorsemenDiedTime = 0; - } - else if (value == DONE) - { - time_t now = time(NULL); - - if (minHorsemenDiedTime == 0) - minHorsemenDiedTime = now; - - maxHorsemenDiedTime = now; - } - break; case DATA_ABOMINATION_KILLED: AbominationCount = value; break; @@ -416,6 +381,8 @@ class instance_naxxramas : public InstanceMapScript return FaerlinaGUID; case DATA_RAZUVIOUS: return RazuviousGUID; + case DATA_GOTHIK: + return GothikGUID; case DATA_THANE: return ThaneGUID; case DATA_LADY: @@ -648,13 +615,13 @@ class instance_naxxramas : public InstanceMapScript { switch (criteria_id) { - case 7600: // Criteria for achievement 2176: And They Would All Go Down Together 15sec of each other 10-man - if (Difficulty(instance->GetSpawnMode()) == RAID_DIFFICULTY_10MAN_NORMAL && (maxHorsemenDiedTime - minHorsemenDiedTime) < 15) - return true; - return false; - case 7601: // Criteria for achievement 2177: And They Would All Go Down Together 15sec of each other 25-man - if (Difficulty(instance->GetSpawnMode()) == RAID_DIFFICULTY_25MAN_NORMAL && (maxHorsemenDiedTime - minHorsemenDiedTime) < 15) - return true; + // And They Would All Go Down Together (kill 4HM within 15sec of each other) + case 7600: // 25-man + case 7601: // 10-man + if (criteria_id + instance->GetSpawnMode() == 7601) + return false; + if (Creature* baron = instance->GetCreature(BaronGUID)) // it doesn't matter which one we use, really + return (baron->AI()->GetData(DATA_HORSEMEN_CHECK_ACHIEVEMENT_CREDIT) == 1u); return false; // Difficulty checks are done on DB. // Criteria for achievement 2186: The Immortal (25-man) @@ -693,6 +660,7 @@ class instance_naxxramas : public InstanceMapScript // Instructor Razuvious ObjectGuid RazuviousGUID; // Gothik the Harvester + ObjectGuid GothikGUID; ObjectGuid GothikGateGUID; // The Four Horsemen ObjectGuid ThaneGUID; @@ -700,8 +668,6 @@ class instance_naxxramas : public InstanceMapScript ObjectGuid BaronGUID; ObjectGuid SirGUID; ObjectGuid HorsemenChestGUID; - time_t minHorsemenDiedTime; - time_t maxHorsemenDiedTime; /* The Construct Quarter */ // Thaddius diff --git a/src/server/scripts/Northrend/Naxxramas/naxxramas.h b/src/server/scripts/Northrend/Naxxramas/naxxramas.h index c14ff31bb94..c0caa86e93f 100644 --- a/src/server/scripts/Northrend/Naxxramas/naxxramas.h +++ b/src/server/scripts/Northrend/Naxxramas/naxxramas.h @@ -50,10 +50,7 @@ enum Data DATA_HAD_FAERLINA_GREET, DATA_HAD_THADDIUS_GREET, - DATA_HORSEMEN0, - DATA_HORSEMEN1, - DATA_HORSEMEN2, - DATA_HORSEMEN3, + DATA_HORSEMEN_CHECK_ACHIEVEMENT_CREDIT, DATA_ABOMINATION_KILLED, DATA_NAXX_PORTAL_ARACHNID, @@ -67,6 +64,7 @@ enum Data64 DATA_ANUBREKHAN, DATA_FAERLINA, DATA_RAZUVIOUS, + DATA_GOTHIK, DATA_THANE, DATA_LADY, DATA_BARON, @@ -89,6 +87,7 @@ enum CreaturesIds NPC_ANUBREKHAN = 15956, NPC_FAERLINA = 15953, NPC_RAZUVIOUS = 16061, + NPC_GOTHIK = 16060, NPC_THANE = 16064, NPC_LADY = 16065, NPC_BARON = 30549, diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp index dbb00fa252e..89868fc7bf2 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp @@ -979,6 +979,9 @@ class go_celestial_planetarium_access : public GameObjectScript bool GossipHello(Player* player) override { + if (go->HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE)) + return true; + bool hasKey = true; if (LockEntry const* lock = sLockStore.LookupEntry(go->GetGOInfo()->goober.lockId)) { diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp index c77f5b2bce3..6dfc3bf01e7 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp @@ -1186,6 +1186,7 @@ class npc_brann_bronzebeard_ulduar_intro : public CreatureScript { if (menuId == GOSSIP_MENU_BRANN_BRONZEBEARD && gossipListId == GOSSIP_OPTION_BRANN_BRONZEBEARD) { + me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); player->PlayerTalkClass->SendCloseGossip(); if (Creature* loreKeeper = _instance->GetCreature(DATA_LORE_KEEPER_OF_NORGANNON)) loreKeeper->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); @@ -1238,6 +1239,7 @@ class npc_lorekeeper : public CreatureScript { if (menuId == GOSSIP_MENU_LORE_KEEPER && gossipListId == GOSSIP_OPTION_LORE_KEEPER) { + me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); player->PlayerTalkClass->SendCloseGossip(); _instance->instance->LoadGrid(364, -16); // make sure leviathan is loaded @@ -1250,6 +1252,7 @@ class npc_lorekeeper : public CreatureScript { if (Creature* brann = _instance->GetCreature(DATA_BRANN_BRONZEBEARD_INTRO)) { + brann->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); delorah->GetMotionMaster()->MovePoint(0, brann->GetPositionX() - 4, brann->GetPositionY(), brann->GetPositionZ()); /// @todo delorah->AI()->Talk(xxxx, brann->GetGUID()); when reached at branz } @@ -1765,9 +1768,7 @@ class spell_vehicle_throw_passenger : public SpellScriptLoader else { passenger->ExitVehicle(); - float x, y, z; - targets.GetDstPos()->GetPosition(x, y, z); - passenger->GetMotionMaster()->MoveJump(x, y, z, targets.GetSpeedXY(), targets.GetSpeedZ()); + passenger->GetMotionMaster()->MoveJump(*targets.GetDstPos(), targets.GetSpeedXY(), targets.GetSpeedZ()); } } } diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp index df5877d9220..05beacca638 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp @@ -222,7 +222,6 @@ class npc_iron_roots : public CreatureScript { SetCombatMovement(false); - me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true); me->ApplySpellImmune(0, IMMUNITY_ID, 49560, true); // Death Grip me->setFaction(14); me->SetReactState(REACT_PASSIVE); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp index 385f7d6a69d..09d95b34521 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp @@ -380,7 +380,6 @@ class npc_saronite_vapors : public CreatureScript { Talk(EMOTE_VAPORS); instance = me->GetInstanceScript(); - me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true); me->ApplySpellImmune(0, IMMUNITY_ID, 49560, true); // Death Grip jump effect me->SetReactState(REACT_PASSIVE); } diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp index 820332791c8..e694433c614 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp @@ -444,7 +444,7 @@ class boss_mimiron : public CreatureScript DoCastAOE(SPELL_DESPAWN_ASSAULT_BOTS); me->ExitVehicle(); // ExitVehicle() offset position is not implemented, so we make up for that with MoveJump()... - me->GetMotionMaster()->MoveJump(me->GetPositionX() + (10.f * std::cos(me->GetOrientation())), me->GetPositionY() + (10.f * std::sin(me->GetOrientation())), me->GetPositionZ(), 10.f, 5.f); + me->GetMotionMaster()->MoveJump(me->GetPositionX() + (10.f * std::cos(me->GetOrientation())), me->GetPositionY() + (10.f * std::sin(me->GetOrientation())), me->GetPositionZ(), me->GetOrientation(), 10.f, 5.f); events.ScheduleEvent(EVENT_OUTTRO_1, 7000); } @@ -1634,8 +1634,11 @@ class go_mimiron_hardmode_button : public GameObjectScript public: go_mimiron_hardmode_button() : GameObjectScript("go_mimiron_hardmode_button") { } - bool OnGossipHello(Player* /*player*/, GameObject* go) + bool OnGossipHello(Player* /*player*/, GameObject* go) override { + if (go->HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE)) + return true; + InstanceScript* instance = go->GetInstanceScript(); if (!instance) return false; diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp index b72bcbecdac..86a4a9caf3a 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp @@ -110,30 +110,24 @@ class boss_ingvar_the_plunderer : public CreatureScript { if (me->GetEntry() != NPC_INGVAR) me->UpdateEntry(NPC_INGVAR); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); _Reset(); - events.SetPhase(PHASE_HUMAN); - - events.ScheduleEvent(EVENT_CLEAVE, urand(6, 12)*IN_MILLISECONDS, 0, PHASE_HUMAN); - events.ScheduleEvent(EVENT_STAGGERING_ROAR, urand(18, 21)*IN_MILLISECONDS, 0, PHASE_HUMAN); - events.ScheduleEvent(EVENT_ENRAGE, urand(7, 14)*IN_MILLISECONDS, 0, PHASE_HUMAN); - events.ScheduleEvent(EVENT_SMASH, urand(12, 17)*IN_MILLISECONDS, 0, PHASE_HUMAN); } void DamageTaken(Unit* /*doneBy*/, uint32& damage) override { if (damage >= me->GetHealth() && events.IsInPhase(PHASE_HUMAN)) { + events.SetPhase(PHASE_EVENT); + events.ScheduleEvent(EVENT_SUMMON_BANSHEE, 3 * IN_MILLISECONDS, 0, PHASE_EVENT); + me->RemoveAllAuras(); + me->StopMoving(); DoCast(me, SPELL_INGVAR_FEIGN_DEATH, true); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); - events.SetPhase(PHASE_EVENT); - events.ScheduleEvent(EVENT_SUMMON_BANSHEE, 3 * IN_MILLISECONDS, 0, PHASE_EVENT); - Talk(SAY_DEATH); } @@ -152,13 +146,28 @@ class boss_ingvar_the_plunderer : public CreatureScript me->RemoveAura(SPELL_INGVAR_FEIGN_DEATH); DoCast(me, SPELL_INGVAR_TRANSFORM, true); me->UpdateEntry(NPC_INGVAR_UNDEAD); - events.ScheduleEvent(EVENT_JUST_TRANSFORMED, 2 * IN_MILLISECONDS, 0, PHASE_EVENT); + events.ScheduleEvent(EVENT_JUST_TRANSFORMED, IN_MILLISECONDS / 2, 0, PHASE_EVENT); } void EnterCombat(Unit* /*who*/) override { + if (events.IsInPhase(PHASE_EVENT) || events.IsInPhase(PHASE_UNDEAD)) // ingvar gets multiple EnterCombat calls + return; _EnterCombat(); + Talk(SAY_AGGRO); + events.SetPhase(PHASE_HUMAN); + events.ScheduleEvent(EVENT_CLEAVE, urand(6, 12)*IN_MILLISECONDS, 0, PHASE_HUMAN); + events.ScheduleEvent(EVENT_STAGGERING_ROAR, urand(18, 21)*IN_MILLISECONDS, 0, PHASE_HUMAN); + events.ScheduleEvent(EVENT_ENRAGE, urand(7, 14)*IN_MILLISECONDS, 0, PHASE_HUMAN); + events.ScheduleEvent(EVENT_SMASH, urand(12, 17)*IN_MILLISECONDS, 0, PHASE_HUMAN); + } + + void AttackStart(Unit* who) override + { + if (events.IsInPhase(PHASE_EVENT)) // prevent ingvar from beginning to attack/chase during transition + return; + BossAI::AttackStart(who); } void JustDied(Unit* /*killer*/) override @@ -171,7 +180,7 @@ class boss_ingvar_the_plunderer : public CreatureScript { events.SetPhase(PHASE_UNDEAD); events.ScheduleEvent(EVENT_DARK_SMASH, urand(14, 18)*IN_MILLISECONDS, 0, PHASE_UNDEAD); - events.ScheduleEvent(EVENT_DREADFUL_ROAR, urand(18, 22)*IN_MILLISECONDS, 0, PHASE_UNDEAD); + events.ScheduleEvent(EVENT_DREADFUL_ROAR, 0, 0, PHASE_UNDEAD); events.ScheduleEvent(EVENT_WOE_STRIKE, urand(10, 14)*IN_MILLISECONDS, 0, PHASE_UNDEAD); events.ScheduleEvent(EVENT_SHADOW_AXE, 30*IN_MILLISECONDS, 0, PHASE_UNDEAD); } @@ -214,9 +223,17 @@ class boss_ingvar_the_plunderer : public CreatureScript events.ScheduleEvent(EVENT_SMASH, urand(12, 16)*IN_MILLISECONDS, 0, PHASE_HUMAN); break; case EVENT_JUST_TRANSFORMED: + ScheduleSecondPhase(); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); + if (Unit* target = me->getThreatManager().getHostilTarget()) + AttackStart(target); + else + { + EnterEvadeMode(EVADE_REASON_NO_HOSTILES); + return; + } + Talk(SAY_AGGRO); DoZoneInCombat(); - ScheduleSecondPhase(); return; case EVENT_SUMMON_BANSHEE: DoCast(me, SPELL_SUMMON_BANSHEE); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp index 77b376bf7d5..d7b65093898 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp @@ -238,7 +238,7 @@ public: me->SetInCombatWithZone(); instance->SetBossState(DATA_SKADI_THE_RUTHLESS, IN_PROGRESS); instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); - me->GetMotionMaster()->MoveJump(Location[0].GetPositionX(), Location[0].GetPositionY(), Location[0].GetPositionZ(), 5.0f, 10.0f); + me->GetMotionMaster()->MoveJump(Location[0], 5.0f, 10.0f); me->SetWalk(false); m_uiMountTimer = 1000; Summons.DespawnEntry(NPC_GRAUF); @@ -289,7 +289,7 @@ public: pGrauf->GetMotionMaster()->MoveFall(); pGrauf->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH); } - me->GetMotionMaster()->MoveJump(Location[4].GetPositionX(), Location[4].GetPositionY(), Location[4].GetPositionZ(), 5.0f, 10.0f); + me->GetMotionMaster()->MoveJump(Location[4], 5.0f, 10.0f); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); Talk(SAY_DRAKE_DEATH); m_uiCrushTimer = 8000; diff --git a/src/server/scripts/Northrend/isle_of_conquest.cpp b/src/server/scripts/Northrend/isle_of_conquest.cpp index 14d862eca39..68121e940c9 100644 --- a/src/server/scripts/Northrend/isle_of_conquest.cpp +++ b/src/server/scripts/Northrend/isle_of_conquest.cpp @@ -206,7 +206,7 @@ class spell_ioc_parachute_ic : public SpellScriptLoader class StartLaunchEvent : public BasicEvent { public: - StartLaunchEvent(float x, float y, float z, ObjectGuid::LowType lowGuid) : _x(x), _y(y), _z(z), _lowGuid(lowGuid) + StartLaunchEvent(Position const& pos, ObjectGuid::LowType lowGuid) : _pos(pos), _lowGuid(lowGuid) { } @@ -218,15 +218,15 @@ class StartLaunchEvent : public BasicEvent player->AddAura(SPELL_LAUNCH_NO_FALLING_DAMAGE, player); // prevents falling damage float speedZ = 10.0f; - float dist = player->GetExactDist2d(_x, _y); + float dist = player->GetExactDist2d(&_pos); player->ExitVehicle(); - player->GetMotionMaster()->MoveJump(_x, _y, _z, dist, speedZ); + player->GetMotionMaster()->MoveJump(_pos, dist, speedZ, EVENT_JUMP, true); return true; } private: - float _x, _y, _z; + Position _pos; ObjectGuid::LowType _lowGuid; }; @@ -244,11 +244,7 @@ class spell_ioc_launch : public SpellScriptLoader if (!GetCaster()->ToCreature() || !GetExplTargetDest()) return; - float x, y, z; - x = GetExplTargetDest()->GetPositionX(); - y = GetExplTargetDest()->GetPositionY(); - z = GetExplTargetDest()->GetPositionZ(); - GetCaster()->ToCreature()->m_Events.AddEvent(new StartLaunchEvent(x, y, z, GetHitPlayer()->GetGUID().GetCounter()), GetCaster()->ToCreature()->m_Events.CalculateTime(2500)); + GetCaster()->ToCreature()->m_Events.AddEvent(new StartLaunchEvent(*GetExplTargetDest(), GetHitPlayer()->GetGUID().GetCounter()), GetCaster()->ToCreature()->m_Events.CalculateTime(2500)); } void Register() override diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp index 88217cb384e..1e020edd10a 100644 --- a/src/server/scripts/Northrend/zone_icecrown.cpp +++ b/src/server/scripts/Northrend/zone_icecrown.cpp @@ -213,7 +213,6 @@ class npc_tournament_training_dummy : public CreatureScript void Reset() override { me->SetControlled(true, UNIT_STATE_STUNNED); - me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true); Initialize(); // Cast Defend spells to max stack size diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp index e5812390bd2..be27932e6b4 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp @@ -144,6 +144,7 @@ enum Spells // Thaladred the Darkener spells SPELL_PSYCHIC_BLOW = 10689, SPELL_SILENCE = 30225, + SPELL_REND = 36965, // Lord Sanguinar spells SPELL_BELLOWING_ROAR = 40636, // Grand Astromancer Capernian spells @@ -881,11 +882,13 @@ class boss_thaladred_the_darkener : public CreatureScript { Gaze_Timer = 100; Silence_Timer = 20000; + Rend_Timer = 4000; PsychicBlow_Timer = 10000; } uint32 Gaze_Timer; uint32 Silence_Timer; + uint32 Rend_Timer; uint32 PsychicBlow_Timer; void Reset() override @@ -939,6 +942,15 @@ class boss_thaladred_the_darkener : public CreatureScript else Silence_Timer -= diff; + //Rend_Timer + if (Rend_Timer <= diff) + { + DoCastVictim(SPELL_REND); + Rend_Timer = 4000; + } + else + Rend_Timer -= diff; + //PsychicBlow_Timer if (PsychicBlow_Timer <= diff) { diff --git a/src/server/scripts/Outland/zone_zangarmarsh.cpp b/src/server/scripts/Outland/zone_zangarmarsh.cpp index 48bbb7bad4a..6f38cce0e5b 100644 --- a/src/server/scripts/Outland/zone_zangarmarsh.cpp +++ b/src/server/scripts/Outland/zone_zangarmarsh.cpp @@ -48,8 +48,6 @@ EndContentData */ enum AshyenAndKeleth { - GOSSIP_REWARD_BLESS = 0, - NPC_ASHYEN = 17900, NPC_KELETH = 17901, @@ -117,7 +115,6 @@ public: if (spell) { creature->CastSpell(player, spell, true); - creature->AI()->Talk(GOSSIP_REWARD_BLESS); } } @@ -145,7 +142,6 @@ public: if (spell) { creature->CastSpell(player, spell, true); - creature->AI()->Talk(GOSSIP_REWARD_BLESS); } } player->CLOSE_GOSSIP_MENU(); diff --git a/src/server/scripts/Pet/pet_mage.cpp b/src/server/scripts/Pet/pet_mage.cpp index fee47aa1fa2..37584bda2ae 100644 --- a/src/server/scripts/Pet/pet_mage.cpp +++ b/src/server/scripts/Pet/pet_mage.cpp @@ -178,6 +178,9 @@ class npc_pet_mage_mirror_image : public CreatureScript void UpdateAI(uint32 diff) override { Unit* owner = me->GetCharmerOrOwner(); + if (!owner) + return; + Unit* target = owner->getAttackerForHelper(); events.Update(diff); @@ -192,9 +195,6 @@ class npc_pet_mage_mirror_image : public CreatureScript if (me->HasUnitState(UNIT_STATE_CASTING)) return; - if (!owner) - return; - // assign target if image doesnt have any or the target is not actual if (!target || me->GetVictim() != target) { diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 7b853c36075..c088ae07e66 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -991,6 +991,37 @@ class spell_dru_swift_flight_passive : public SpellScriptLoader } }; +// -33943 - Flight Form +class spell_dru_flight_form : public SpellScriptLoader +{ + public: + spell_dru_flight_form() : SpellScriptLoader("spell_dru_flight_form") { } + + class spell_dru_flight_form_SpellScript : public SpellScript + { + PrepareSpellScript(spell_dru_flight_form_SpellScript); + + SpellCastResult CheckCast() + { + Unit* caster = GetCaster(); + if (caster->IsInDisallowedMountForm()) + return SPELL_FAILED_NOT_SHAPESHIFT; + + return SPELL_CAST_OK; + } + + void Register() override + { + OnCheckCast += SpellCheckCastFn(spell_dru_flight_form_SpellScript::CheckCast); + } + }; + + SpellScript* GetSpellScript() const override + { + return new spell_dru_flight_form_SpellScript(); + } +}; + // -5217 - Tiger's Fury class spell_dru_tiger_s_fury : public SpellScriptLoader { @@ -1196,6 +1227,7 @@ void AddSC_druid_spell_scripts() new spell_dru_starfall_dummy(); new spell_dru_survival_instincts(); new spell_dru_swift_flight_passive(); + new spell_dru_flight_form(); new spell_dru_tiger_s_fury(); new spell_dru_typhoon(); new spell_dru_t10_restoration_4p_bonus(); diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 5c3ee1d7f4a..abde43ef952 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -1930,10 +1930,7 @@ class spell_gen_mount : public SpellScriptLoader if (map == 530 || (map == 571 && target->HasSpell(SPELL_COLD_WEATHER_FLYING))) canFly = true; - float x, y, z; - target->GetPosition(x, y, z); - uint32 areaFlag = target->GetBaseMap()->GetAreaFlag(x, y, z); - AreaTableEntry const* area = sAreaStore.LookupEntry(areaFlag); + AreaTableEntry const* area = sAreaTableStore.LookupEntry(target->GetAreaId()); if (!area || (canFly && (area->flags & AREA_FLAG_NO_FLY_ZONE))) canFly = false; diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 9475da91a77..0abff255e4b 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -29,6 +29,7 @@ #include "SpellAuraEffects.h" #include "SkillDiscovery.h" #include "Battleground.h" +#include "DBCStores.h" // Generic script for handling item dummy effects which trigger another spell. class spell_item_trigger_spell : public SpellScriptLoader @@ -2630,6 +2631,43 @@ public: } }; +class spell_item_toy_train_set_pulse : public SpellScriptLoader +{ +public: + spell_item_toy_train_set_pulse() : SpellScriptLoader("spell_item_toy_train_set_pulse") { } + + class spell_item_toy_train_set_pulse_SpellScript : public SpellScript + { + PrepareSpellScript(spell_item_toy_train_set_pulse_SpellScript); + + void HandleDummy(SpellEffIndex /*index*/) + { + if (Player* target = GetHitUnit()->ToPlayer()) + { + target->HandleEmoteCommand(EMOTE_ONESHOT_TRAIN); + if (EmotesTextSoundEntry const* soundEntry = FindTextSoundEmoteFor(TEXT_EMOTE_TRAIN, target->getRace(), target->getGender())) + target->PlayDistanceSound(soundEntry->SoundId); + } + } + + void HandleTargets(std::list<WorldObject*>& targetList) + { + targetList.remove_if([](WorldObject const* obj) { return obj->GetTypeId() != TYPEID_PLAYER; }); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_item_toy_train_set_pulse_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_item_toy_train_set_pulse_SpellScript::HandleTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ALLY); + } + }; + + SpellScript* GetSpellScript() const override + { + return new spell_item_toy_train_set_pulse_SpellScript(); + } +}; + void AddSC_item_spell_scripts() { // 23074 Arcanite Dragonling @@ -2698,4 +2736,5 @@ void AddSC_item_spell_scripts() new spell_item_chicken_cover(); new spell_item_muisek_vessel(); new spell_item_greatmothers_soulcatcher(); + new spell_item_toy_train_set_pulse(); } diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 9f6b4947328..8bd4b3eb070 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -43,6 +43,12 @@ enum PaladinSpells SPELL_PALADIN_BLESSING_OF_LOWER_CITY_PRIEST = 37880, SPELL_PALADIN_BLESSING_OF_LOWER_CITY_SHAMAN = 37881, + SPELL_PALADIN_BEACON_OF_LIGHT = 53563, + SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_1 = 53652, + SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_2 = 53653, + SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_3 = 53654, + SPELL_PALADIN_HOLY_LIGHT = 635, + SPELL_PALADIN_DIVINE_STORM = 53385, SPELL_PALADIN_DIVINE_STORM_DUMMY = 54171, SPELL_PALADIN_DIVINE_STORM_HEAL = 54172, @@ -1153,6 +1159,68 @@ class spell_pal_lay_on_hands : public SpellScriptLoader } }; +// 53651 - Light's Beacon - Beacon of Light +class spell_pal_light_s_beacon : public SpellScriptLoader +{ + public: + spell_pal_light_s_beacon() : SpellScriptLoader("spell_pal_light_s_beacon") { } + + class spell_pal_light_s_beacon_AuraScript : public AuraScript + { + PrepareAuraScript(spell_pal_light_s_beacon_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_BEACON_OF_LIGHT) + || !sSpellMgr->GetSpellInfo(SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_1) + || !sSpellMgr->GetSpellInfo(SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_2) + || !sSpellMgr->GetSpellInfo(SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_3) + || !sSpellMgr->GetSpellInfo(SPELL_PALADIN_HOLY_LIGHT)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + if (GetTarget()->HasAura(SPELL_PALADIN_BEACON_OF_LIGHT, eventInfo.GetActor()->GetGUID())) + return false; + return true; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + + SpellInfo const* procSpell = eventInfo.GetSpellInfo(); + if (!procSpell) + return; + + uint32 healSpellId = procSpell->IsRankOf(sSpellMgr->EnsureSpellInfo(SPELL_PALADIN_HOLY_LIGHT)) ? SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_1 : SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_3; + uint32 heal = CalculatePct(eventInfo.GetHealInfo()->GetHeal(), aurEff->GetAmount()); + + Unit* beaconTarget = GetCaster(); + if (!beaconTarget || !beaconTarget->HasAura(SPELL_PALADIN_BEACON_OF_LIGHT, eventInfo.GetActor()->GetGUID())) + return; + + /// @todo: caster must be the healed unit to perform distance checks correctly + /// but that will break animation on clientside + /// caster in spell packets must be the healing unit + eventInfo.GetActor()->CastCustomSpell(healSpellId, SPELLVALUE_BASE_POINT0, heal, beaconTarget, true); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_pal_light_s_beacon_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_pal_light_s_beacon_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_pal_light_s_beacon_AuraScript(); + } +}; + // 31789 - Righteous Defense class spell_pal_righteous_defense : public SpellScriptLoader { @@ -1338,6 +1406,7 @@ void AddSC_paladin_spell_scripts() new spell_pal_judgement("spell_pal_judgement_of_wisdom", SPELL_PALADIN_JUDGEMENT_OF_WISDOM); new spell_pal_judgement_of_command(); new spell_pal_lay_on_hands(); + new spell_pal_light_s_beacon(); new spell_pal_righteous_defense(); new spell_pal_sacred_shield(); new spell_pal_seal_of_righteousness(); diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index 3ca2db40d65..9b577d4e140 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -41,6 +41,9 @@ enum RogueSpells SPELL_ROGUE_SHIV_TRIGGERED = 5940, SPELL_ROGUE_TRICKS_OF_THE_TRADE_DMG_BOOST = 57933, SPELL_ROGUE_TRICKS_OF_THE_TRADE_PROC = 59628, + SPELL_ROGUE_HONOR_AMONG_THIEVES = 51698, + SPELL_ROGUE_HONOR_AMONG_THIEVES_PROC = 52916, + SPELL_ROGUE_HONOR_AMONG_THIEVES_2 = 51699 }; // 13877, 33735, (check 51211, 65956) - Blade Flurry @@ -703,6 +706,143 @@ class spell_rog_tricks_of_the_trade_proc : public SpellScriptLoader } }; +// 51698,51700,51701 - Honor Among Thieves +class spell_rog_honor_among_thieves : public SpellScriptLoader +{ +public: + spell_rog_honor_among_thieves() : SpellScriptLoader("spell_rog_honor_among_thieves") { } + + class spell_rog_honor_among_thieves_AuraScript : public AuraScript + { + PrepareAuraScript(spell_rog_honor_among_thieves_AuraScript); + + bool CheckProc(ProcEventInfo& /*eventInfo*/) + { + Unit* caster = GetCaster(); + if (!caster) + return false; + + if (!caster->GetSpellHistory()->HasCooldown(GetSpellInfo()->Effects[EFFECT_0].TriggerSpell)) + return true; + + return false; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/) + { + PreventDefaultAction(); + + Unit* caster = GetCaster(); + if (!caster) + return; + + Unit* target = GetTarget(); + target->CastSpell(target, GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD), nullptr, aurEff, caster->GetGUID()); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_rog_honor_among_thieves_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_rog_honor_among_thieves_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_rog_honor_among_thieves_AuraScript(); + } +}; + +// 52916 - Honor Among Thieves (Proc) +class spell_rog_honor_among_thieves_proc : public SpellScriptLoader +{ +public: + spell_rog_honor_among_thieves_proc() : SpellScriptLoader("spell_rog_honor_among_thieves_proc") { } + + class spell_rog_honor_among_thieves_proc_SpellScript : public SpellScript + { + PrepareSpellScript(spell_rog_honor_among_thieves_proc_SpellScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_HONOR_AMONG_THIEVES_PROC)) + return false; + + return true; + } + + void FilterTargets(std::list<WorldObject*>& targets) + { + targets.clear(); + + Unit* target = GetOriginalCaster(); + if (!target) + return; + + targets.push_back(target); + } + + void HandleBeforeHit() + { + Unit* target = GetHitUnit(); + if (!target) + return; + + /* + * The applied aura has a duration of 8 seconds + * This prevents new applications while its active + * Removing it on each new proc enables the application from different sources (different grouped players) + * and on new procs after the source cooldown is finished (1 second) + */ + if (target->HasAura(GetSpellInfo()->Id)) + target->RemoveAura(GetSpellInfo()->Id); + } + + void TriggerCooldown() + { + Unit* target = GetHitUnit(); + if (!target) + return; + + target->GetSpellHistory()->AddCooldown(GetSpellInfo()->Id, 0, std::chrono::seconds(1)); + } + + void Register() override + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_rog_honor_among_thieves_proc_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_PARTY); + BeforeHit += SpellHitFn(spell_rog_honor_among_thieves_proc_SpellScript::HandleBeforeHit); + AfterHit += SpellHitFn(spell_rog_honor_among_thieves_proc_SpellScript::TriggerCooldown); + } + }; + + SpellScript* GetSpellScript() const override + { + return new spell_rog_honor_among_thieves_proc_SpellScript(); + } + + class spell_rog_honor_among_thieves_proc_AuraScript : public AuraScript + { + PrepareAuraScript(spell_rog_honor_among_thieves_proc_AuraScript); + + void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (Player* player = GetTarget()->ToPlayer()) + if (Unit* spellTarget = ObjectAccessor::GetUnit(*player, player->GetTarget())) + player->CastSpell(spellTarget, SPELL_ROGUE_HONOR_AMONG_THIEVES_2, true); + } + + void Register() override + { + AfterEffectApply += AuraEffectApplyFn(spell_rog_honor_among_thieves_proc_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_rog_honor_among_thieves_proc_AuraScript(); + } +}; + void AddSC_rogue_spell_scripts() { new spell_rog_blade_flurry(); @@ -716,4 +856,6 @@ void AddSC_rogue_spell_scripts() new spell_rog_shiv(); new spell_rog_tricks_of_the_trade(); new spell_rog_tricks_of_the_trade_proc(); + new spell_rog_honor_among_thieves(); + new spell_rog_honor_among_thieves_proc(); } diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index c8b0264995b..41e72b1388b 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -55,7 +55,8 @@ enum ShamanSpells SPELL_SHAMAN_TOTEM_EARTHBIND_EARTHGRAB = 64695, SPELL_SHAMAN_TOTEM_EARTHBIND_TOTEM = 6474, SPELL_SHAMAN_TOTEM_EARTHEN_POWER = 59566, - SPELL_SHAMAN_TOTEM_HEALING_STREAM_HEAL = 52042 + SPELL_SHAMAN_TOTEM_HEALING_STREAM_HEAL = 52042, + SPELL_SHAMAN_TOTEMIC_MASTERY = 38437 }; enum ShamanSpellIcons @@ -1025,6 +1026,46 @@ class spell_sha_thunderstorm : public SpellScriptLoader } }; +// 38443 - Totemic Mastery (Tier 6 - 2P) +class spell_sha_totemic_mastery : public SpellScriptLoader +{ +public: + spell_sha_totemic_mastery() : SpellScriptLoader("spell_sha_totemic_mastery") { } + + class spell_sha_totemic_mastery_AuraScript : public AuraScript + { + PrepareAuraScript(spell_sha_totemic_mastery_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_TOTEMIC_MASTERY)) + return false; + return true; + } + + void HandleDummy(AuraEffect const* /*aurEff*/) + { + Unit* target = GetTarget(); + for (uint8 i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i) + if (!target->m_SummonSlot[i]) + return; + + target->CastSpell(target, SPELL_SHAMAN_TOTEMIC_MASTERY, true); + PreventDefaultAction(); + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_sha_totemic_mastery_AuraScript::HandleDummy, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_sha_totemic_mastery_AuraScript(); + } +}; + void AddSC_shaman_spell_scripts() { new spell_sha_ancestral_awakening_proc(); @@ -1048,4 +1089,5 @@ void AddSC_shaman_spell_scripts() new spell_sha_mana_tide_totem(); new spell_sha_sentry_totem(); new spell_sha_thunderstorm(); + new spell_sha_totemic_mastery(); } diff --git a/src/server/scripts/World/duel_reset.cpp b/src/server/scripts/World/duel_reset.cpp index c5b53368bc8..3c46255a1bf 100644 --- a/src/server/scripts/World/duel_reset.cpp +++ b/src/server/scripts/World/duel_reset.cpp @@ -34,9 +34,8 @@ class DuelResetScript : public PlayerScript player1->GetSpellHistory()->SaveCooldownStateBeforeDuel(); player2->GetSpellHistory()->SaveCooldownStateBeforeDuel(); - - ResetSpellCooldowns(player1); - ResetSpellCooldowns(player2); + ResetSpellCooldowns(player1, true); + ResetSpellCooldowns(player2, true); } // Health and mana reset @@ -73,9 +72,8 @@ class DuelResetScript : public PlayerScript // Cooldown restore if (sWorld->getBoolConfig(CONFIG_RESET_DUEL_COOLDOWNS)) { - - ResetSpellCooldowns(winner); - ResetSpellCooldowns(loser); + ResetSpellCooldowns(winner, false); + ResetSpellCooldowns(loser, false); winner->GetSpellHistory()->RestoreCooldownStateAfterDuel(); loser->GetSpellHistory()->RestoreCooldownStateAfterDuel(); @@ -98,14 +96,35 @@ class DuelResetScript : public PlayerScript } } - static void ResetSpellCooldowns(Player* player) + static void ResetSpellCooldowns(Player* player, bool onStartDuel) { - // remove cooldowns on spells that have < 10 min CD and has no onHold - player->GetSpellHistory()->ResetCooldowns([](SpellHistory::CooldownStorageType::iterator itr) -> bool + if (onStartDuel) { - SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first); - return spellInfo->RecoveryTime < 10 * MINUTE * IN_MILLISECONDS && spellInfo->CategoryRecoveryTime < 10 * MINUTE * IN_MILLISECONDS && !itr->second.OnHold; - }, true); + // remove cooldowns on spells that have < 10 min CD > 30 sec and has no onHold + player->GetSpellHistory()->ResetCooldowns([](SpellHistory::CooldownStorageType::iterator itr) -> bool + { + SpellHistory::Clock::time_point now = SpellHistory::Clock::now(); + uint32 cooldownDuration = itr->second.CooldownEnd > now ? std::chrono::duration_cast<std::chrono::milliseconds>(itr->second.CooldownEnd - now).count() : 0; + SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first); + return spellInfo->RecoveryTime < 10 * MINUTE * IN_MILLISECONDS + && spellInfo->CategoryRecoveryTime < 10 * MINUTE * IN_MILLISECONDS + && !itr->second.OnHold + && cooldownDuration > 0 + && ( spellInfo->RecoveryTime - cooldownDuration ) > (MINUTE / 2) * IN_MILLISECONDS + && ( spellInfo->CategoryRecoveryTime - cooldownDuration ) > (MINUTE / 2) * IN_MILLISECONDS; + }, true); + } + else + { + // remove cooldowns on spells that have < 10 min CD and has no onHold + player->GetSpellHistory()->ResetCooldowns([](SpellHistory::CooldownStorageType::iterator itr) -> bool + { + SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first); + return spellInfo->RecoveryTime < 10 * MINUTE * IN_MILLISECONDS + && spellInfo->CategoryRecoveryTime < 10 * MINUTE * IN_MILLISECONDS + && !itr->second.OnHold; + }, true); + } // pet cooldowns if (Pet* pet = player->GetPet()) diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index ef4a2b0e32f..b90839f50c5 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -41,6 +41,7 @@ go_tadpole_cage go_amberpine_outhouse go_hive_pod go_veil_skith_cage +go_toy_train_set EndContentData */ #include "ScriptMgr.h" @@ -1196,6 +1197,48 @@ public: } }; + +enum ToyTrainSpells +{ + SPELL_TOY_TRAIN_PULSE = 61551, +}; + +class go_toy_train_set : public GameObjectScript +{ + public: + go_toy_train_set() : GameObjectScript("go_toy_train_set") { } + + struct go_toy_train_setAI : public GameObjectAI + { + go_toy_train_setAI(GameObject* go) : GameObjectAI(go), _pulseTimer(3 * IN_MILLISECONDS) { } + + void UpdateAI(uint32 diff) override + { + if (diff < _pulseTimer) + _pulseTimer -= diff; + else + { + go->CastSpell(nullptr, SPELL_TOY_TRAIN_PULSE, true); + _pulseTimer = 6 * IN_MILLISECONDS; + } + } + + // triggered on wrecker'd + void DoAction(int32 /*action*/) override + { + go->Delete(); + } + + private: + uint32 _pulseTimer; + }; + + GameObjectAI* GetAI(GameObject* go) const override + { + return new go_toy_train_setAI(go); + } +}; + void AddSC_go_scripts() { new go_cat_figurine(); @@ -1231,4 +1274,5 @@ void AddSC_go_scripts() new go_veil_skith_cage(); new go_frostblade_shrine(); new go_midsummer_bonfire(); + new go_toy_train_set(); } diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp index 4dca55d562d..867ebafe32b 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -18,27 +18,26 @@ /* ScriptData SDName: Npc_Professions -SD%Complete: 80 -SDComment: Provides learn/unlearn/relearn-options for professions. Not supported: Unlearn engineering, re-learn engineering, re-learn leatherworking. -SDCategory: NPCs +SD%Complete: 100 +SDComment: Provides learn/unlearn/relearn-options for professions. +SDCategory: NPCs/GOBs EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "GameObjectAI.h" #include "Player.h" #include "SpellInfo.h" #include "WorldSession.h" /* A few notes for future developement: -- A full implementation of gossip for GO's is required. They must have the same scripting capabilities as creatures. Basically, -there is no difference here (except that default text is chosen with `gameobject_template`.`data3` (for GO type2, different dataN for a few others) - It's possible blacksmithing still require some tweaks and adjustments due to the way we _have_ to use reputation. */ /*### -# to be removed from here (->ncp_text). This is data for database projects. +# to be removed from here (->npc_text). This is data for database projects. ###*/ #define TALK_MUST_UNLEARN_WEAPON "You must forget your weapon type specialty before I can help you. Go to Everlook in Winterspring and seek help there." @@ -153,6 +152,9 @@ enum ProfessionSpells S_LEARN_GOBLIN = 20221, S_LEARN_GNOMISH = 20220, + S_UNLEARN_GOBLIN = 68334, + S_UNLEARN_GNOMISH = 68333, + S_SPELLFIRE = 26797, S_MOONCLOTH = 26798, S_SHADOWEAVE = 26801, @@ -376,6 +378,27 @@ void ProfessionUnlearnSpells(Player* player, uint32 type) player->RemoveSpell(36075); // Wildfeather Leggings player->RemoveSpell(36078); // Living Crystal Breastplate break; + case S_UNLEARN_GOBLIN: // S_UNLEARN_GOBLIN + player->RemoveSpell(30565); // Foreman's Enchanted Helmet + player->RemoveSpell(30566); // Foreman's Reinforced Helmet + player->RemoveSpell(30563); // Goblin Rocket Launcher + player->RemoveSpell(56514); // Global Thermal Sapper Charge + player->RemoveSpell(36954); // Dimensional Ripper - Area 52 + player->RemoveSpell(23486); // Dimensional Ripper - Everlook + player->RemoveSpell(23078); // Goblin Jumper Cables XL + player->RemoveSpell(72952); // Shatter Rounds + break; + case S_UNLEARN_GNOMISH: // S_UNLEARN_GNOMISH + player->RemoveSpell(30575); // Gnomish Battle Goggles + player->RemoveSpell(30574); // Gnomish Power Goggles + player->RemoveSpell(56473); // Gnomish X-Ray Specs + player->RemoveSpell(30569); // Gnomish Poultryizer + player->RemoveSpell(30563); // Ultrasafe Transporter - Toshley's Station + player->RemoveSpell(23489); // Ultrasafe Transporter - Gadgetzan + player->RemoveSpell(23129); // World Enlarger + player->RemoveSpell(23096); // Gnomish Alarm-o-Bot + player->RemoveSpell(72953); // Iceblade Arrow + break; case S_UNLEARN_SPELLFIRE: // S_UNLEARN_SPELLFIRE player->RemoveSpell(26752); // Spellfire Belt player->RemoveSpell(26753); // Spellfire Gloves @@ -923,6 +946,76 @@ public: } }; +// Object ID - 177226 +// Book "Soothsaying for dummies" +enum SoothsayingForDummies +{ + GOSSIP_ID = 7058, + + // Engineering + OPTION_UNLEARN_GNOMISH = 0, + OPTION_UNLEARN_GOBLIN = 1, + OPTION_LEARN_GNOMISH = 2, + OPTION_LEARN_GOBLIN = 3, + + // Leatherworking + OPTION_LEARN_DRAGONSCALE = 4, + OPTION_LEARN_ELEMENTAL = 5, + OPTION_LEARN_TRIBAL = 6 +}; + +class go_soothsaying_for_dummies : public GameObjectScript +{ + public: + go_soothsaying_for_dummies() : GameObjectScript("go_soothsaying_for_dummies") { } + + struct go_soothsaying_for_dummiesAI : public GameObjectAI + { + go_soothsaying_for_dummiesAI(GameObject* go) : GameObjectAI(go) { } + + bool GossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override + { + if (menuId != GOSSIP_ID) + return false; + + switch (gossipListId) + { + case OPTION_UNLEARN_GNOMISH: + ProcessUnlearnAction(player, nullptr, S_UNLEARN_GNOMISH, 0, 0); // cost is handled by gossip code + break; + case OPTION_UNLEARN_GOBLIN: + ProcessUnlearnAction(player, nullptr, S_UNLEARN_GOBLIN, 0, 0); + break; + case OPTION_LEARN_GNOMISH: + player->CastSpell(player, S_LEARN_GNOMISH, true); + break; + case OPTION_LEARN_GOBLIN: + player->CastSpell(player, S_LEARN_GOBLIN, true); + break; + case OPTION_LEARN_DRAGONSCALE: + player->CastSpell(player, S_LEARN_DRAGON, true); + break; + case OPTION_LEARN_ELEMENTAL: + player->CastSpell(player, S_LEARN_ELEMENTAL, true); + break; + case OPTION_LEARN_TRIBAL: + player->CastSpell(player, S_LEARN_TRIBAL, true); + break; + default: + return false; + } + + player->CLOSE_GOSSIP_MENU(); + return true; // prevent further processing + } + }; + + GameObjectAI* GetAI(GameObject* go) const override + { + return new go_soothsaying_for_dummiesAI(go); + } +}; + /*### # start menues leatherworking ###*/ @@ -1212,6 +1305,7 @@ void AddSC_npc_professions() new npc_prof_alchemy(); new npc_prof_blacksmith(); new npc_engineering_tele_trinket(); + new go_soothsaying_for_dummies(); new npc_prof_leather(); new npc_prof_tailor(); } diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 16b95e555bb..80b4fac4333 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -38,6 +38,8 @@ npc_snake_trap_serpents 80% AI for snakes that summoned by Snake Trap npc_shadowfiend 100% restore 5% of owner's mana when shadowfiend die from damage npc_locksmith 75% list of keys needs to be confirmed npc_firework 100% NPC's summoned by rockets and rocket clusters, for making them cast visual +npc_train_wrecker 100% Wind-Up Train Wrecker that kills train set +npc_egbert 100% Egbert run's around EndContentData */ #include "ScriptMgr.h" @@ -56,6 +58,7 @@ EndContentData */ #include "SpellHistory.h" #include "SpellAuras.h" #include "Pet.h" +#include "PetAI.h" #include "CreatureTextMgr.h" #include "SmartAI.h" @@ -519,6 +522,67 @@ public: }; /*###### +## npc_torch_tossing_target_bunny_controller +######*/ + +enum TorchTossingTarget +{ + NPC_TORCH_TOSSING_TARGET_BUNNY = 25535, + SPELL_TARGET_INDICATOR = 45723 +}; + +class npc_torch_tossing_target_bunny_controller : public CreatureScript +{ +public: + npc_torch_tossing_target_bunny_controller() : CreatureScript("npc_torch_tossing_target_bunny_controller") { } + + struct npc_torch_tossing_target_bunny_controllerAI : public ScriptedAI + { + npc_torch_tossing_target_bunny_controllerAI(Creature* creature) : ScriptedAI(creature) + { + _targetTimer = 3000; + } + + ObjectGuid DoSearchForTargets(ObjectGuid lastTargetGUID) + { + std::list<Creature*> targets; + me->GetCreatureListWithEntryInGrid(targets, NPC_TORCH_TOSSING_TARGET_BUNNY, 60.0f); + targets.remove_if([lastTargetGUID](Creature* creature) { return creature->GetGUID() == lastTargetGUID; }); + + if (!targets.empty()) + { + _lastTargetGUID = Trinity::Containers::SelectRandomContainerElement(targets)->GetGUID(); + + return _lastTargetGUID; + } + return ObjectGuid::Empty; + } + + void UpdateAI(uint32 diff) override + { + if (_targetTimer < diff) + { + if (Unit* target = ObjectAccessor::GetUnit(*me, DoSearchForTargets(_lastTargetGUID))) + target->CastSpell(target, SPELL_TARGET_INDICATOR, true); + + _targetTimer = 3000; + } + else + _targetTimer -= diff; + } + + private: + uint32 _targetTimer; + ObjectGuid _lastTargetGUID; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return new npc_torch_tossing_target_bunny_controllerAI(creature); + } +}; + +/*###### ## Triage quest ######*/ @@ -1422,7 +1486,6 @@ public: void Reset() override { me->SetControlled(true, UNIT_STATE_STUNNED);//disable rotate - me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);//imune to knock aways like blast wave _events.Reset(); _damageTimes.clear(); @@ -2130,7 +2193,7 @@ public: // Check if we are near Elune'ara lake south, if so try to summon Omen or a minion if (me->GetZoneId() == ZONE_MOONGLADE) { - if (!me->FindNearestCreature(NPC_OMEN, 100.0f, false) && me->GetDistance2d(omenSummonPos.GetPositionX(), omenSummonPos.GetPositionY()) <= 100.0f) + if (!me->FindNearestCreature(NPC_OMEN, 100.0f) && me->GetDistance2d(omenSummonPos.GetPositionX(), omenSummonPos.GetPositionY()) <= 100.0f) { switch (urand(0, 9)) { @@ -2387,12 +2450,300 @@ class npc_stable_master : public CreatureScript } }; +enum TrainWrecker +{ + GO_TOY_TRAIN = 193963, + SPELL_TOY_TRAIN_PULSE = 61551, + SPELL_WRECK_TRAIN = 62943, + ACTION_WRECKED = 1, + EVENT_DO_JUMP = 1, + EVENT_DO_FACING = 2, + EVENT_DO_WRECK = 3, + EVENT_DO_DANCE = 4, + MOVEID_CHASE = 1, + MOVEID_JUMP = 2 +}; +class npc_train_wrecker : public CreatureScript +{ + public: + npc_train_wrecker() : CreatureScript("npc_train_wrecker") { } + + struct npc_train_wreckerAI : public NullCreatureAI + { + npc_train_wreckerAI(Creature* creature) : NullCreatureAI(creature), _isSearching(true), _nextAction(0), _timer(1 * IN_MILLISECONDS) { } + + GameObject* VerifyTarget() const + { + if (GameObject* target = ObjectAccessor::GetGameObject(*me, _target)) + return target; + me->HandleEmoteCommand(EMOTE_ONESHOT_RUDE); + me->DespawnOrUnsummon(3 * IN_MILLISECONDS); + return nullptr; + } + + void UpdateAI(uint32 diff) override + { + if (_isSearching) + { + if (diff < _timer) + _timer -= diff; + else + { + if (GameObject* target = me->FindNearestGameObject(GO_TOY_TRAIN, 15.0f)) + { + _isSearching = false; + _target = target->GetGUID(); + me->SetWalk(true); + me->GetMotionMaster()->MovePoint(MOVEID_CHASE, target->GetNearPosition(3.0f, target->GetAngle(me))); + } + else + _timer = 3 * IN_MILLISECONDS; + } + } + else + { + switch (_nextAction) + { + case EVENT_DO_JUMP: + if (GameObject* target = VerifyTarget()) + me->GetMotionMaster()->MoveJump(*target, 5.0, 10.0, MOVEID_JUMP); + _nextAction = 0; + break; + case EVENT_DO_FACING: + if (GameObject* target = VerifyTarget()) + { + me->SetFacingTo(target->GetOrientation()); + me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK1H); + _timer = 1.5 * IN_MILLISECONDS; + _nextAction = EVENT_DO_WRECK; + } + else + _nextAction = 0; + break; + case EVENT_DO_WRECK: + if (diff < _timer) + { + _timer -= diff; + break; + } + if (GameObject* target = VerifyTarget()) + { + me->CastSpell(target, SPELL_WRECK_TRAIN, false); + target->AI()->DoAction(ACTION_WRECKED); + _timer = 2 * IN_MILLISECONDS; + _nextAction = EVENT_DO_DANCE; + } + else + _nextAction = 0; + break; + case EVENT_DO_DANCE: + if (diff < _timer) + { + _timer -= diff; + break; + } + me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_DANCE); + me->DespawnOrUnsummon(5 * IN_MILLISECONDS); + _nextAction = 0; + break; + default: + break; + } + } + } + + void MovementInform(uint32 /*type*/, uint32 id) override + { + if (id == MOVEID_CHASE) + _nextAction = EVENT_DO_JUMP; + else if (id == MOVEID_JUMP) + _nextAction = EVENT_DO_FACING; + } + + private: + bool _isSearching; + uint8 _nextAction; + uint32 _timer; + ObjectGuid _target; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return new npc_train_wreckerAI(creature); + } +}; + +enum EgbertMisc +{ + SPELL_EGBERT = 40669, + EVENT_RETURN = 3 +}; + +class npc_egbert : public CreatureScript +{ +public: + npc_egbert() : CreatureScript("npc_egbert") {} + + struct npc_egbertAI : public NullCreatureAI + { + npc_egbertAI(Creature* creature) : NullCreatureAI(creature) + { + if (Unit* owner = me->GetCharmerOrOwner()) + if (owner->GetMap()->GetEntry()->addon > 1) + me->SetCanFly(true); + } + + void Reset() override + { + _events.Reset(); + if (Unit* owner = me->GetCharmerOrOwner()) + me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle()); + } + + void EnterEvadeMode(EvadeReason why) override + { + if (!_EnterEvadeMode(why)) + return; + + Reset(); + } + + void UpdateAI(uint32 diff) override + { + _events.Update(diff); + + if (Unit* owner = me->GetCharmerOrOwner()) + { + if (!me->IsWithinDist(owner, 40.f)) + { + me->RemoveAura(SPELL_EGBERT); + me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle()); + } + } + + if (me->HasAura(SPELL_EGBERT)) + _events.ScheduleEvent(EVENT_RETURN, urandms(5, 20)); + + while (uint32 eventId = _events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_RETURN: + me->RemoveAura(SPELL_EGBERT); + break; + default: + break; + } + } + } + private: + EventMap _events; + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_egbertAI(creature); + } +}; + +enum PandarenMonkMisc +{ + SPELL_PANDAREN_MONK = 69800, + EVENT_FOCUS = 1, + EVENT_EMOTE = 2, + EVENT_FOLLOW = 3, + EVENT_DRINK = 4 +}; + +class npc_pandaren_monk : public CreatureScript +{ +public: + npc_pandaren_monk() : CreatureScript("npc_pandaren_monk") {} + + struct npc_pandaren_monkAI : public NullCreatureAI + { + npc_pandaren_monkAI(Creature* creature) : NullCreatureAI(creature) { } + + void Reset() override + { + _events.Reset(); + _events.ScheduleEvent(EVENT_FOCUS, 1000); + } + + void EnterEvadeMode(EvadeReason why) override + { + if (!_EnterEvadeMode(why)) + return; + + Reset(); + } + + void ReceiveEmote(Player* /*player*/, uint32 emote) override + { + me->InterruptSpell(CURRENT_CHANNELED_SPELL); + me->StopMoving(); + + switch (emote) + { + case TEXT_EMOTE_BOW: + _events.ScheduleEvent(EVENT_FOCUS, 1000); + break; + case TEXT_EMOTE_DRINK: + _events.ScheduleEvent(EVENT_DRINK, 1000); + break; + } + } + + void UpdateAI(uint32 diff) override + { + _events.Update(diff); + + if (Unit* owner = me->GetCharmerOrOwner()) + if (!me->IsWithinDist(owner, 30.f)) + me->InterruptSpell(CURRENT_CHANNELED_SPELL); + + while (uint32 eventId = _events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_FOCUS: + if (Unit* owner = me->GetCharmerOrOwner()) + me->SetFacingToObject(owner); + _events.ScheduleEvent(EVENT_EMOTE, 1000); + break; + case EVENT_EMOTE: + me->HandleEmoteCommand(EMOTE_ONESHOT_BOW); + _events.ScheduleEvent(EVENT_FOLLOW, 1000); + break; + case EVENT_FOLLOW: + if (Unit* owner = me->GetCharmerOrOwner()) + me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); + break; + case EVENT_DRINK: + me->CastSpell(me, SPELL_PANDAREN_MONK, false); + break; + default: + break; + } + } + } + private: + EventMap _events; + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_pandaren_monkAI(creature); + } +}; + void AddSC_npcs_special() { new npc_air_force_bots(); new npc_lunaclaw_spirit(); new npc_chicken_cluck(); new npc_dancing_flames(); + new npc_torch_tossing_target_bunny_controller(); new npc_doctor(); new npc_injured_patient(); new npc_garments_of_quests(); @@ -2410,4 +2761,7 @@ void AddSC_npcs_special() new npc_spring_rabbit(); new npc_imp_in_a_ball(); new npc_stable_master(); + new npc_train_wrecker(); + new npc_egbert(); + new npc_pandaren_monk(); } diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index 5b07dde22bb..217995cb88a 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -406,6 +406,24 @@ CleanCharacterDB = 0 PersistentCharacterCleanFlags = 0 # +# Auction.GetAllScanDelay +# Description: Sets the minimum time in seconds, a single player character can perform a getall scan. +# The value is only held in memory so a server restart will clear it. +# Setting this to zero, will disable GetAll functions completely. +# Default: 900 - (GetAll scan limited to once every 15mins per player character) + +Auction.GetAllScanDelay = 900 + +# +# Auction.SearchDelay +# Description: Sets the minimum time in milliseconds (seconds x 1000), that the client must wait between +# auction search operations. This can be increased if somehow Auction House activity is causing +# too much load. +# Default: 300 - (Time delay between auction searches set to 0.3secs) + +Auction.SearchDelay = 300 + +# ################################################################################################### ################################################################################################### diff --git a/src/tools/map_extractor/CMakeLists.txt b/src/tools/map_extractor/CMakeLists.txt index e86ef6aedcb..d0f3e42cef8 100644 --- a/src/tools/map_extractor/CMakeLists.txt +++ b/src/tools/map_extractor/CMakeLists.txt @@ -14,6 +14,7 @@ file(GLOB_RECURSE mapextractor_SRCS *.cpp *.h) set(include_Dirs ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/dep/cppformat + ${CMAKE_SOURCE_DIR}/dep/g3dlite/include ${CMAKE_SOURCE_DIR}/dep/libmpq ${CMAKE_SOURCE_DIR}/src/common ${CMAKE_SOURCE_DIR}/src/common/Utilities @@ -37,6 +38,7 @@ add_executable(mapextractor target_link_libraries(mapextractor common format + g3dlib mpq ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp index 5d1c31ba2dc..f3a761fd437 100644 --- a/src/tools/map_extractor/System.cpp +++ b/src/tools/map_extractor/System.cpp @@ -31,6 +31,7 @@ #include "adt.h" #include "wdt.h" +#include <G3D/Plane.h> #include <boost/filesystem.hpp> extern ArchiveSet gOpenArchives; @@ -42,12 +43,10 @@ typedef struct } map_id; map_id *map_ids; -uint16 *areas; uint16 *LiqType; #define MAX_PATH_LENGTH 128 char output_path[MAX_PATH_LENGTH] = "."; char input_path[MAX_PATH_LENGTH] = "."; -uint32 maxAreaId = 0; // ************************************************** // Extractor options @@ -231,30 +230,6 @@ uint32 ReadMapDBC() return map_count; } -void ReadAreaTableDBC() -{ - printf("Read AreaTable.dbc file..."); - DBCFile dbc("DBFilesClient\\AreaTable.dbc"); - - if(!dbc.open()) - { - printf("Fatal error: Invalid AreaTable.dbc file format!\n"); - exit(1); - } - - size_t area_count = dbc.getRecordCount(); - size_t maxid = dbc.getMaxId(); - areas = new uint16[maxid + 1]; - memset(areas, 0xff, (maxid + 1) * sizeof(uint16)); - - for(uint32 x = 0; x < area_count; ++x) - areas[dbc.getRecord(x).getUInt(0)] = dbc.getRecord(x).getUInt(3); - - maxAreaId = dbc.getMaxId(); - - printf("Done! (" SZFMTD " areas loaded)\n", area_count); -} - void ReadLiquidTypeTableDBC() { printf("Read LiquidType.dbc file..."); @@ -282,7 +257,7 @@ void ReadLiquidTypeTableDBC() // Map file format data static char const* MAP_MAGIC = "MAPS"; -static char const* MAP_VERSION_MAGIC = "v1.3"; +static char const* MAP_VERSION_MAGIC = "v1.8"; static char const* MAP_AREA_MAGIC = "AREA"; static char const* MAP_HEIGHT_MAGIC = "MHGT"; static char const* MAP_LIQUID_MAGIC = "MLIQ"; @@ -311,9 +286,10 @@ struct map_areaHeader uint16 gridArea; }; -#define MAP_HEIGHT_NO_HEIGHT 0x0001 -#define MAP_HEIGHT_AS_INT16 0x0002 -#define MAP_HEIGHT_AS_INT8 0x0004 +#define MAP_HEIGHT_NO_HEIGHT 0x0001 +#define MAP_HEIGHT_AS_INT16 0x0002 +#define MAP_HEIGHT_AS_INT8 0x0004 +#define MAP_HEIGHT_HAS_FLIGHT_BOUNDS 0x0008 struct map_heightHeader { @@ -358,7 +334,7 @@ float selectUInt16StepStore(float maxDiff) return 65535 / maxDiff; } // Temporary grid data store -uint16 area_flags[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID]; +uint16 area_ids[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID]; float V8[ADT_GRID_SIZE][ADT_GRID_SIZE]; float V9[ADT_GRID_SIZE+1][ADT_GRID_SIZE+1]; @@ -372,6 +348,9 @@ uint8 liquid_flags[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID]; bool liquid_show[ADT_GRID_SIZE][ADT_GRID_SIZE]; float liquid_height[ADT_GRID_SIZE+1][ADT_GRID_SIZE+1]; +int16 flight_box_max[3][3]; +int16 flight_box_min[3][3]; + bool ConvertADT(std::string const& inputPath, std::string const& outputPath, int /*cell_y*/, int /*cell_x*/, uint32 build) { ADT_file adt; @@ -397,34 +376,20 @@ bool ConvertADT(std::string const& inputPath, std::string const& outputPath, int map.buildMagic = build; // Get area flags data - for (int i=0;i<ADT_CELLS_PER_GRID;i++) - { - for(int j=0;j<ADT_CELLS_PER_GRID;j++) - { - adt_MCNK * cell = cells->getMCNK(i,j); - uint32 areaid = cell->areaid; - if(areaid && areaid <= maxAreaId) - { - if(areas[areaid] != 0xffff) - { - area_flags[i][j] = areas[areaid]; - continue; - } - printf("File: %s\nCan't find area flag for areaid %u [%d, %d].\n", inputPath.c_str(), areaid, cell->ix, cell->iy); - } - area_flags[i][j] = 0xffff; - } - } + for (int i = 0; i < ADT_CELLS_PER_GRID; i++) + for (int j = 0; j < ADT_CELLS_PER_GRID; j++) + area_ids[i][j] = cells->getMCNK(i, j)->areaid; + //============================================ // Try pack area data //============================================ bool fullAreaData = false; - uint32 areaflag = area_flags[0][0]; - for (int y=0;y<ADT_CELLS_PER_GRID;y++) + uint32 areaId = area_ids[0][0]; + for (int y = 0; y < ADT_CELLS_PER_GRID; ++y) { - for(int x=0;x<ADT_CELLS_PER_GRID;x++) + for (int x = 0; x < ADT_CELLS_PER_GRID; ++x) { - if(area_flags[y][x]!=areaflag) + if (area_ids[y][x] != areaId) { fullAreaData = true; break; @@ -441,12 +406,12 @@ bool ConvertADT(std::string const& inputPath, std::string const& outputPath, int if (fullAreaData) { areaHeader.gridArea = 0; - map.areaMapSize+=sizeof(area_flags); + map.areaMapSize += sizeof(area_ids); } else { areaHeader.flags |= MAP_AREA_NO_AREA; - areaHeader.gridArea = static_cast<uint16>(areaflag); + areaHeader.gridArea = static_cast<uint16>(areaId); } // @@ -561,6 +526,14 @@ bool ConvertADT(std::string const& inputPath, std::string const& outputPath, int maxHeight = CONF_use_minHeight; } + bool hasFlightBox = false; + if (adt_MFBO* mfbo = adt.a_grid->getMFBO()) + { + memcpy(flight_box_max, &mfbo->max, sizeof(flight_box_max)); + memcpy(flight_box_min, &mfbo->min, sizeof(flight_box_min)); + hasFlightBox = true; + } + map.heightMapOffset = map.areaMapOffset + map.areaMapSize; map.heightMapSize = sizeof(map_heightHeader); @@ -577,6 +550,12 @@ bool ConvertADT(std::string const& inputPath, std::string const& outputPath, int if (CONF_allow_float_to_int && (maxHeight - minHeight) < CONF_flat_height_delta_limit) heightHeader.flags |= MAP_HEIGHT_NO_HEIGHT; + if (hasFlightBox) + { + heightHeader.flags |= MAP_HEIGHT_HAS_FLIGHT_BOUNDS; + map.heightMapSize += sizeof(flight_box_max) + sizeof(flight_box_min); + } + // Try store as packed in uint16 or uint8 values if (!(heightHeader.flags & MAP_HEIGHT_NO_HEIGHT)) { @@ -875,8 +854,8 @@ bool ConvertADT(std::string const& inputPath, std::string const& outputPath, int outFile.write(reinterpret_cast<const char*>(&map), sizeof(map)); // Store area data outFile.write(reinterpret_cast<const char*>(&areaHeader), sizeof(areaHeader)); - if (!(areaHeader.flags&MAP_AREA_NO_AREA)) - outFile.write(reinterpret_cast<const char*>(area_flags), sizeof(area_flags)); + if (!(areaHeader.flags & MAP_AREA_NO_AREA)) + outFile.write(reinterpret_cast<const char*>(area_ids), sizeof(area_ids)); // Store height data outFile.write(reinterpret_cast<const char*>(&heightHeader), sizeof(heightHeader)); @@ -899,6 +878,12 @@ bool ConvertADT(std::string const& inputPath, std::string const& outputPath, int } } + if (heightHeader.flags & MAP_HEIGHT_HAS_FLIGHT_BOUNDS) + { + outFile.write(reinterpret_cast<char*>(flight_box_max), sizeof(flight_box_max)); + outFile.write(reinterpret_cast<char*>(flight_box_min), sizeof(flight_box_min)); + } + // Store liquid data if need if (map.liquidMapOffset) { @@ -935,7 +920,6 @@ void ExtractMapsFromMpq(uint32 build) uint32 map_count = ReadMapDBC(); - ReadAreaTableDBC(); ReadLiquidTypeTableDBC(); std::string path = output_path; @@ -972,8 +956,7 @@ void ExtractMapsFromMpq(uint32 build) } } printf("\n"); - delete [] areas; - delete [] map_ids; + delete[] map_ids; } bool ExtractFile( char const* mpq_name, std::string const& filename ) diff --git a/src/tools/map_extractor/adt.cpp b/src/tools/map_extractor/adt.cpp index f8e6e469ff0..e97b40475d0 100644 --- a/src/tools/map_extractor/adt.cpp +++ b/src/tools/map_extractor/adt.cpp @@ -21,15 +21,16 @@ #include "adt.h" // Helper -int holetab_h[4] = {0x1111, 0x2222, 0x4444, 0x8888}; -int holetab_v[4] = {0x000F, 0x00F0, 0x0F00, 0xF000}; +int holetab_h[4] = { 0x1111, 0x2222, 0x4444, 0x8888 }; +int holetab_v[4] = { 0x000F, 0x00F0, 0x0F00, 0xF000 }; -u_map_fcc MHDRMagic = { {'R','D','H','M'} }; -u_map_fcc MCINMagic = { {'N','I','C','M'} }; -u_map_fcc MH2OMagic = { {'O','2','H','M'} }; -u_map_fcc MCNKMagic = { {'K','N','C','M'} }; -u_map_fcc MCVTMagic = { {'T','V','C','M'} }; -u_map_fcc MCLQMagic = { {'Q','L','C','M'} }; +u_map_fcc MHDRMagic = { { 'R','D','H','M' } }; +u_map_fcc MCINMagic = { { 'N','I','C','M' } }; +u_map_fcc MH2OMagic = { { 'O','2','H','M' } }; +u_map_fcc MCNKMagic = { { 'K','N','C','M' } }; +u_map_fcc MCVTMagic = { { 'T','V','C','M' } }; +u_map_fcc MCLQMagic = { { 'Q','L','C','M' } }; +u_map_fcc MFBOMagic = { { 'O','B','F','M' } }; bool isHole(int holes, int i, int j) { @@ -81,7 +82,7 @@ bool adt_MHDR::prepareLoadedData() if (fcc != MHDRMagic.fcc) return false; - if (size!=sizeof(adt_MHDR)-8) + if (size != sizeof(adt_MHDR) - 8) return false; // Check and prepare MCIN @@ -92,6 +93,9 @@ bool adt_MHDR::prepareLoadedData() if (offsMH2O && !getMH2O()->prepareLoadedData()) return false; + if (offsMFBO && flags & 1 && !getMFBO()->prepareLoadedData()) + return false; + return true; } @@ -154,3 +158,8 @@ bool adt_MCLQ::prepareLoadedData() return true; } + +bool adt_MFBO::prepareLoadedData() +{ + return fcc == MFBOMagic.fcc; +} diff --git a/src/tools/map_extractor/adt.h b/src/tools/map_extractor/adt.h index 7b3dc07ae84..30389939f38 100644 --- a/src/tools/map_extractor/adt.h +++ b/src/tools/map_extractor/adt.h @@ -263,6 +263,28 @@ public: }; // +// Adt file min/max height chunk +// +class adt_MFBO +{ + union + { + uint32 fcc; + char fcc_txt[4]; + }; +public: + uint32 size; + struct plane + { + int16 coords[9]; + }; + plane max; + plane min; + + bool prepareLoadedData(); +}; + +// // Adt file header chunk // class adt_MHDR @@ -274,12 +296,12 @@ class adt_MHDR public: uint32 size; - uint32 pad; + uint32 flags; uint32 offsMCIN; // MCIN - uint32 offsTex; // MTEX - uint32 offsModels; // MMDX - uint32 offsModelsIds; // MMID - uint32 offsMapObejcts; // MWMO + uint32 offsTex; // MTEX + uint32 offsModels; // MMDX + uint32 offsModelsIds; // MMID + uint32 offsMapObejcts; // MWMO uint32 offsMapObejctsIds; // MWID uint32 offsDoodsDef; // MDDF uint32 offsObjectsDef; // MODF @@ -291,9 +313,22 @@ public: uint32 data4; uint32 data5; bool prepareLoadedData(); - adt_MCIN *getMCIN(){ return (adt_MCIN *)((uint8 *)&pad+offsMCIN);} - adt_MH2O *getMH2O(){ return offsMH2O ? (adt_MH2O *)((uint8 *)&pad+offsMH2O) : 0;} - + adt_MCIN* getMCIN() + { + return reinterpret_cast<adt_MCIN*>(reinterpret_cast<uint8*>(&flags) + offsMCIN); + } + adt_MH2O* getMH2O() + { + if (offsMH2O) + return reinterpret_cast<adt_MH2O*>(reinterpret_cast<uint8*>(&flags) + offsMH2O); + return nullptr; + } + adt_MFBO* getMFBO() + { + if (flags & 1 && offsMFBO) + return reinterpret_cast<adt_MFBO*>(reinterpret_cast<uint8*>(&flags) + offsMFBO); + return nullptr; + } }; class ADT_file : public FileLoader{ diff --git a/src/tools/mmaps_generator/TerrainBuilder.cpp b/src/tools/mmaps_generator/TerrainBuilder.cpp index 02f3fb1cf4d..69b1ffcb062 100644 --- a/src/tools/mmaps_generator/TerrainBuilder.cpp +++ b/src/tools/mmaps_generator/TerrainBuilder.cpp @@ -80,7 +80,7 @@ struct map_liquidHeader namespace MMAP { - char const* MAP_VERSION_MAGIC = "v1.3"; + char const* MAP_VERSION_MAGIC = "v1.8"; TerrainBuilder::TerrainBuilder(bool skipLiquid) : m_skipLiquid (skipLiquid){ } TerrainBuilder::~TerrainBuilder() { } |