mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/Entities/Object/Object.cpp src/server/game/Entities/Object/Object.h src/server/game/Server/WorldSession.cpp
This commit is contained in:
13
dep/g3dlite/G3D-v8.0_hotfix8.diff
Normal file
13
dep/g3dlite/G3D-v8.0_hotfix8.diff
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/dep/g3dlite/include/G3D/Vector3int32.h b/dep/g3dlite/include/G3D/Vector3int32.h
|
||||
index 2f256ea..c1a6b21 100644
|
||||
--- a/dep/g3dlite/include/G3D/Vector3int32.h
|
||||
+++ b/dep/g3dlite/include/G3D/Vector3int32.h
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
inline Vector3int32& operator+=(const Vector3int32& other) {
|
||||
x += other.x;
|
||||
y += other.y;
|
||||
- z += other.y;
|
||||
+ z += other.z;
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -6,3 +6,6 @@ G3D-v8.0_hotfix2.diff - 2012-01-14 - fix typo in isNaN(float x)
|
||||
G3D-v8.0_hotfix3.diff - 2012-08-26 - fix compilation on Fedora Linux
|
||||
G3D-v8.0_hotfix4.diff - 2012-11-09 - fix compilation on OSX
|
||||
G3D-v8.0_hotfix5.diff - 2013-02-27 - fix compilation in cygwin environments
|
||||
G3D-v8.0_hotfix6.diff - 2013-03-08 - fix compilation in mingw
|
||||
G3D-v8.0_hotfix7.diff - 2013-08-31 - fix typo in Matrix4 == operator
|
||||
G3D-v8.0_hotfix8.diff - 2013-09-01 - fix typo in Vector3int32 += operator
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
inline Vector3int32& operator+=(const Vector3int32& other) {
|
||||
x += other.x;
|
||||
y += other.y;
|
||||
z += other.y;
|
||||
z += other.z;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` IN (63276,63278);
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(63276,'spell_general_vezax_mark_of_the_faceless'),
|
||||
(63278,'spell_general_vezax_mark_of_the_faceless_leech');
|
||||
23
sql/updates/world/2013_09_01_01_world_trinity_string.sql
Normal file
23
sql/updates/world/2013_09_01_01_world_trinity_string.sql
Normal file
@@ -0,0 +1,23 @@
|
||||
DELETE FROM `trinity_string` WHERE `entry` IN (453, 548, 549, 550, 714, 716, 749, 752, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 871);
|
||||
INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES
|
||||
(453,'│Player %s %s (guid: %u)'),
|
||||
(548,'│ GM Mode active, Phase: -1'),
|
||||
(549,'├─ Banned: (Type: %s, Reason: %s, Time: %s, By: %s)'),
|
||||
(550,'├─ Muted: (Reason: %s, Time: %s, By: %s)'),
|
||||
(714,'│ Account: %s (ID: %u), GMLevel: %u'),
|
||||
(716,'│ Last Login: %s (Failed Logins: %u)'),
|
||||
(749,'│ OS: %s - Latency: %u ms - Mail: %s'),
|
||||
(752,'│ Last IP: %s (Locked: %s)'),
|
||||
(843,'│ Level: %u (%u/%u XP (%u XP left))'),
|
||||
(844,'│ Race: %s %s, %s'),
|
||||
(845,'│ Alive ?: %s'),
|
||||
(846,'│ Phase: %u'),
|
||||
(847,'│ Money: %ug%us%uc'),
|
||||
(848,'│ Map: %s, Area: %s, Zone: %s'),
|
||||
(849,'│ Guild: %s (ID: %u)'),
|
||||
(850,'├─ Rank: %s'),
|
||||
(851,'├─ Note: %s'),
|
||||
(852,'├─ O. Note: %s'),
|
||||
(853,'│ Played time: %s'),
|
||||
(854,'└ Mails: %d Read/%u Total'),
|
||||
(871,'│ Level: %u');
|
||||
8
sql/updates/world/2013_09_01_02_world_smart_scripts.sql
Normal file
8
sql/updates/world/2013_09_01_02_world_smart_scripts.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (25510,25511,25512,25513);
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (25510,25511,25512,25513) 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
|
||||
(25510, 0, 0, 0, 8, 0, 100, 1, 45692, 0, 0, 0, 33, 25510, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, '1st Kvaldir Vessel (The Serpent''s Maw) - On Spellhit "Use Tuskarr Torch" - Give Quest Credit'),
|
||||
(25511, 0, 0, 0, 8, 0, 100, 1, 45692, 0, 0, 0, 33, 25511, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, '2nd Kvaldir Vessel (The Kur Drakkar) - On Spellhit "Use Tuskarr Torch" - Give Quest Credit'),
|
||||
(25512, 0, 0, 0, 8, 0, 100, 1, 45692, 0, 0, 0, 33, 25512, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, '3rd Kvaldir Vessel (Bor''s Hammer) - On Spellhit "Use Tuskarr Torch" - Give Quest Credit'),
|
||||
(25513, 0, 0, 0, 8, 0, 100, 1, 45692, 0, 0, 0, 33, 25513, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, '4th Kvaldir Vessel (Bor''s Anvil) - On Spellhit "Use Tuskarr Torch" - Give Quest Credit');
|
||||
7
sql/updates/world/2013_09_01_03_world_smart_scripts.sql
Normal file
7
sql/updates/world/2013_09_01_03_world_smart_scripts.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (19866,19867,19868);
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (19866,19867,19868) 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
|
||||
(19866, 0, 0, 0, 8, 0, 100, 1, 34646, 0, 0, 0, 33, 19866, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Invis East KV Rune - On Spellhit "Activate Kirin''Var Rune" - Give Quest Credit'),
|
||||
(19867, 0, 0, 0, 8, 0, 100, 1, 34646, 0, 0, 0, 33, 19867, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Invis NE KV Rune - On Spellhit "Activate Kirin''Var Rune" - Give Quest Credit'),
|
||||
(19868, 0, 0, 0, 8, 0, 100, 1, 34646, 0, 0, 0, 33, 19868, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Invis West KV Rune - On Spellhit "Activate Kirin''Var Rune" - Give Quest Credit');
|
||||
6
sql/updates/world/2013_09_01_04_world_smart_scripts.sql
Normal file
6
sql/updates/world/2013_09_01_04_world_smart_scripts.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (19723,19724) 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
|
||||
(19723, 0, 0, 1, 8, 0, 100, 1, 34526, 0, 0, 0, 80, 1972300, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Invis BE Ballista - On Spellhit - Run Script'),
|
||||
(19723, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 33, 19723, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Invis BE Ballista - On Spellhit (Link) - Quest Credit'),
|
||||
(19724, 0, 0, 1, 8, 0, 100, 1, 34526, 0, 0, 0, 80, 1972400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Invis BE Tent - On Spellhit - Run Script'),
|
||||
(19724, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 33, 19724, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Invis BE Tent - On Spellhit (Link) - Quest Credit');
|
||||
201
sql/updates/world/2013_09_01_05_world_skinning_loot_template.sql
Normal file
201
sql/updates/world/2013_09_01_05_world_skinning_loot_template.sql
Normal file
@@ -0,0 +1,201 @@
|
||||
-- --------------------------------------------------------------------------------------
|
||||
-- -- Skinning Loot Revamp by ZxBiohazardZx
|
||||
-- --------------------------------------------------------------------------------------
|
||||
SET @var := 100000; -- Set this to the reference value, gap is 10 minimum, more ofc later (10<00X>)?
|
||||
-- Delete old junk that isnt needed & assign new template to those creatures:
|
||||
UPDATE `creature_template` SET `skinloot`=0 WHERE `entry`=534;
|
||||
DELETE FROM `skinning_loot_template` WHERE `entry`=534;
|
||||
UPDATE `creature_template` SET `skinloot`=@var WHERE `skinloot` IN (721,883,890,2098,2442,2620,4166,5951,17467,10780,12296,12297,12298);
|
||||
DELETE FROM `skinning_loot_template` WHERE `entry` IN(721,883,890,2098,2442,2620,4166,5951,17467,10780,12296,12297,12298);
|
||||
-- Var+1
|
||||
UPDATE `creature_template` SET `skinloot`=@var+1 WHERE `skinloot`=100007;
|
||||
DELETE FROM `skinning_loot_template` WHERE `entry`=100007;
|
||||
-- Var+2
|
||||
-- --------------------------------------------------------------------------------------
|
||||
UPDATE `creature_template` SET `skinloot`=@var+2 WHERE `skinloot` IN (
|
||||
113, 118, 119, 330, 390, 524, 525, 822, 834,1125,1126,1127,1128,1131,1132,1133,1134,1135,
|
||||
1137,1138,1190,1196,1199,1201,1547,1548,1549,1553,1554,1689,1765,1922,2033,2034,2042,2043,
|
||||
2070,2175,2956,2957,2958,2959,2960,2972,2973,3035,3068,3099,3100,3110,3121,3122,3123,3125,
|
||||
3126,3127,3130,3131,3225,3226,3227,3566,5807,6789,10105,10356,14430,15650,15651,15652,
|
||||
16347,16353,17199,17200,17202,17203,17345,17372,17373);
|
||||
DELETE FROM `skinning_loot_template` WHERE `entry` IN (
|
||||
113, 118, 119, 330, 390, 524, 525, 822, 834,1125,1126,1127,1128,1131,1132,1133,1134,1135,
|
||||
1137,1138,1190,1196,1199,1201,1547,1548,1549,1553,1554,1689,1765,1922,2033,2034,2042,2043,
|
||||
2070,2175,2956,2957,2958,2959,2960,2972,2973,3035,3068,3099,3100,3110,3121,3122,3123,3125,
|
||||
3126,3127,3130,3131,3225,3226,3227,3566,5807,6789,10105,10356,14430,15650,15651,15652,
|
||||
16347,16353,17199,17200,17202,17203,17345,17372,17373);
|
||||
-- Var+3
|
||||
-- --------------------------------------------------------------------------------------
|
||||
UPDATE `creature_template` SET `skinloot`=@var+3 WHERE `skinloot` IN (
|
||||
157, 454, 833,1130,1186,1188,1191,1271,1388,1693,1766,1769,1770,1778,1779,1782,1797,1892,
|
||||
1893,1896,1924,1961,1972,2069,2163,2164,2185,2321,2322,2974,3056,3058,3231,3234,3241,3242,
|
||||
3243,3244,3246,3248,3254,3255,3415,3425,3461,3531,4127,4316,5829,5865,12431,12432,16348,
|
||||
16354,17347,17525,17556);
|
||||
DELETE FROM `skinning_loot_template` WHERE `entry` IN (
|
||||
157, 454, 833,1130,1186,1188,1191,1271,1388,1693,1766,1769,1770,1778,1779,1782,1797,1892,
|
||||
1893,1896,1924,1961,1972,2069,2163,2164,2185,2321,2322,2974,3056,3058,3231,3234,3241,3242,
|
||||
3243,3244,3246,3248,3254,3255,3415,3425,3461,3531,4127,4316,5829,5865,12431,12432,16348,
|
||||
16354,17347,17525,17556);
|
||||
-- Var+4
|
||||
-- --------------------------------------------------------------------------------------
|
||||
UPDATE `creature_template` SET `skinloot`=@var+4 WHERE `skinloot` IN (
|
||||
213, 547, 565,1189,1192,1224,2071,2165,2172,2187,2237,2323,3236,3240,3245,3247,3256,3257,
|
||||
3398,3416,3424,3426,3463,3466,3475,3721,3816,3823,4008,4009,4011,4129,5053,6788,10644,16349,
|
||||
16355,17348,17527,17588,17589);
|
||||
DELETE FROM `skinning_loot_template` WHERE `entry` IN (
|
||||
213, 547, 565,1189,1192,1224,2071,2165,2172,2187,2237,2323,3236,3240,3245,3247,3256,3257,
|
||||
3398,3416,3424,3426,3463,3466,3475,3721,3816,3823,4008,4009,4011,4129,5053,6788,10644,16349,
|
||||
16355,17348,17527,17588,17589);
|
||||
-- Var+5
|
||||
-- --------------------------------------------------------------------------------------
|
||||
UPDATE `creature_template` SET `skinloot`=@var+5 WHERE `skinloot` IN (
|
||||
335, 345, 521, 628, 819, 923,1015,1016,1017,1020,1021,1022,1258,1400,1417,1923,2089,2275,
|
||||
2351,2354,2356,2384,2476,2529,3235,3237,3238,3239,3249,3250,3252,3472,3473,3474,3774,3809,
|
||||
3810,3817,3824,4012,4013,4014,4015,4016,4018,4019,4031,4032,4042,4044,4067,4117,4126,4126,
|
||||
4128,4250,5835,12678,12723,12940);
|
||||
DELETE FROM `skinning_loot_template` WHERE `entry` IN (
|
||||
335, 345, 521, 628, 819, 923,1015,1016,1017,1020,1021,1022,1258,1400,1417,1923,2089,2275,
|
||||
2351,2354,2356,2384,2476,2529,3235,3237,3238,3239,3249,3250,3252,3472,3473,3474,3774,3809,
|
||||
3810,3817,3824,4012,4013,4014,4015,4016,4018,4019,4031,4032,4042,4044,4067,4117,4126,4126,
|
||||
4128,4250,5835,12678,12723,12940);
|
||||
-- Var+6
|
||||
-- --------------------------------------------------------------------------------------
|
||||
UPDATE `creature_template` SET `skinloot`=@var+6 WHERE `skinloot` IN (1225,3653,3851,3853,3854,3855,3861,3862,3864,3865,3914,5058);
|
||||
DELETE FROM `skinning_loot_template` WHERE `entry` IN (1225,3653,3851,3853,3854,3855,3861,3862,3864,3865,3914,5058);
|
||||
-- Var+7
|
||||
-- --------------------------------------------------------------------------------------
|
||||
UPDATE `creature_template` SET `skinloot`=@var+7 WHERE `skinloot` IN (3857,3859,3866,3868,3886,4279,4511,4514,4824,4827,4887,14357);
|
||||
DELETE FROM `skinning_loot_template` WHERE `entry` IN (3857,3859,3866,3868,3886,4279,4511,4514,4824,4827,4887,14357);
|
||||
-- Var+8
|
||||
-- --------------------------------------------------------------------------------------
|
||||
UPDATE `creature_template` SET `skinloot`=@var+8 WHERE `skinloot` IN (1042,1043,1069);
|
||||
DELETE FROM `skinning_loot_template` WHERE `entry` IN (1042,1043,1069);
|
||||
-- Var+9
|
||||
-- --------------------------------------------------------------------------------------
|
||||
UPDATE `creature_template` SET `skinloot`=@var+9 WHERE `skinloot` IN (3630,3631,3632,3633,3634,3636,3637,3641,5048,5056,5755,5756,5762,8886,20797);
|
||||
DELETE FROM `skinning_loot_template` WHERE `entry` IN (3630,3631,3632,3633,3634,3636,3637,3641,5048,5056,5755,5756,5762,8886,20797);
|
||||
-- Var+10
|
||||
-- --------------------------------------------------------------------------------------
|
||||
UPDATE `creature_template` SET `skinloot`=@var+10 WHERE `skinloot` IN (
|
||||
205, 206, 533, 681, 683, 855, 898, 920,1018,1019,1023,1150,1353,2248,2385,2408,2559,3476,
|
||||
3789,3791,3811,3815,3818,3825,4017,4041,4107,4109,4110,4118,4119,4124,4142,4147,4248,4249,4548,
|
||||
4688,5827,6071,6167,10116,10882,12677);
|
||||
DELETE FROM `skinning_loot_template` WHERE `entry` IN (
|
||||
205, 206, 533, 681, 683, 855, 898, 920,1018,1019,1023,1150,1353,2248,2385,2408,2559,3476,
|
||||
3789,3791,3811,3815,3818,3825,4017,4041,4107,4109,4110,4118,4119,4124,4142,4147,4248,4249,4548,
|
||||
4688,5827,6071,6167,10116,10882,12677);
|
||||
-- Var+11
|
||||
-- --------------------------------------------------------------------------------------
|
||||
UPDATE `creature_template` SET `skinloot`=@var+11 WHERE `skinloot` IN (
|
||||
507, 682, 685, 686, 688, 689, 736, 856,1084,1085,1108,1151,1152,2249,2250,2251,2406,
|
||||
2407,2560,2727,4139,4140,4143,4144,4150,4151,4304,4341,4351,4689,4696,4697,4700,4726,
|
||||
4728,10131,10992,12676);
|
||||
DELETE FROM `skinning_loot_template` WHERE `entry` IN (
|
||||
507, 682, 685, 686, 688, 689, 736, 856,1084,1085,1108,1151,1152,2249,2250,2251,2406,
|
||||
2407,2560,2727,4139,4140,4143,4144,4150,4151,4304,4341,4351,4689,4696,4697,4700,4726,
|
||||
4728,10131,10992,12676);
|
||||
-- Var+12
|
||||
-- --------------------------------------------------------------------------------------
|
||||
UPDATE `creature_template` SET `skinloot`=@var+12 WHERE `skinloot` IN (
|
||||
3927,4274,4515,4538,4825,4829);
|
||||
DELETE FROM `skinning_loot_template` WHERE `entry` IN (
|
||||
3927,4274,4515,4538,4825,4829);
|
||||
-- Var+13
|
||||
UPDATE `creature_template` SET `skinloot`=@var+13 WHERE `skinloot` IN
|
||||
(687, 690, 728, 767, 772, 854, 874,1082,1114,1557,2473,2561,2728,2729,2731,2732,4342,4343,
|
||||
4344,4345,4347,4348,4352,4355,4356,4357,4388,4662,4678,4681,4685,4690,4699,4701,4702,4727,
|
||||
4729,10136,11785,13602,14227,14232,14233);
|
||||
DELETE FROM `skinning_loot_template` WHERE `entry` IN
|
||||
(687, 690, 728, 767, 772, 854, 874,1082,1114,1557,2473,2561,2728,2729,2731,2732,4342,4343,
|
||||
4344,4345,4347,4348,4352,4355,4356,4357,4388,4662,4678,4681,4685,4690,4699,4701,4702,4727,
|
||||
4729,10136,11785,13602,14227,14232,14233);
|
||||
|
||||
-- Var+14
|
||||
UPDATE `creature_template` SET `skinloot`=@var+14 WHERE `skinloot` IN
|
||||
( 730,1087,1511,1514,1516,1550,1551,1558,2657,2658,2734,4389,4841,5224,5260,5268,5272,5300,
|
||||
5304,5305,5307,5308,5419,5420,5425,5426,7268,11786,12741);
|
||||
DELETE FROM `skinning_loot_template` WHERE `entry` IN
|
||||
( 730,1087,1511,1514,1516,1550,1551,1558,2657,2658,2734,4389,4841,5224,5260,5268,5272,5300,
|
||||
5304,5305,5307,5308,5419,5420,5425,5426,7268,11786,12741);
|
||||
|
||||
-- --------------------------------------------------------------------------------------
|
||||
-- -- Add the new profiles
|
||||
-- --------------------------------------------------------------------------------------
|
||||
DELETE FROM `skinning_loot_template` WHERE `entry` BETWEEN @var AND @var+15;
|
||||
INSERT INTO `skinning_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
|
||||
-- Var (Light Leather)
|
||||
(@var,2318,90,1,1,1,1), -- Ruined Leather Scraps
|
||||
(@var,2934,10,1,1,1,1), -- Light Leather
|
||||
-- Var+1 (Light Leather) --
|
||||
(@var+1,2934,80,1,1,1,1), -- Light Leather
|
||||
(@var+1, 783,20,1,1,1,1), -- Light Hide
|
||||
-- Var+2 (Light Leather
|
||||
(@var+2,2934,60,1,1,1,1), -- Ruined Leather Scraps
|
||||
(@var+2,2318,40,1,1,1,1), -- Light Leather
|
||||
-- Var+3 (Light Leather)
|
||||
(@var+3,2318,60,1,1,1,1), -- Light Leather
|
||||
(@var+3,2934,35,1,1,1,1), -- Ruined Leather Scraps
|
||||
(@var+3, 783, 5,1,1,1,1), -- Light Hide
|
||||
-- Var+4 (Light/Medium Leather
|
||||
(@var+4,2318,72,1,1,1,2), -- Light Leather
|
||||
(@var+4,2319,20,1,1,1,1), -- Medium Leather
|
||||
(@var+4, 783, 5,1,1,1,1), -- Light Hide
|
||||
(@var+4,4232, 3,1,1,1,1), -- Medium Hide
|
||||
-- Var+5 (Light/Medium Leather
|
||||
(@var+5,2319,50,1,1,1,1), -- Medium Leather
|
||||
(@var+5,2318,42,1,1,1,2), -- Light Leather
|
||||
(@var+5, 783, 5,1,1,1,1), -- Light Hide
|
||||
(@var+5,4232, 3,1,1,1,1), -- Medium Hide
|
||||
-- Var+6 (Light/Medium Leather2)
|
||||
(@var+6,2318,65,1,1,1,2), -- Light Leather
|
||||
(@var+6,2319,25,1,1,1,2), -- Medium Leather
|
||||
(@var+6, 783, 7,1,1,1,1), -- Light Hide
|
||||
(@var+6,4232, 3,1,1,1,1), -- Medium Hide
|
||||
-- Var+7 (Light/Medium Leather2)
|
||||
(@var+7,2318,55,1,1,1,2), -- Light Leather
|
||||
(@var+7,2319,35,1,1,1,2), -- Medium Leather
|
||||
(@var+7, 783, 7,1,1,1,1), -- Light Hide
|
||||
(@var+7,4232, 3,1,1,1,1), -- Medium Hide
|
||||
-- Var+8 (Red Whelp Scale Dragons)
|
||||
(@var+8,2318,37,1,1,1,2), -- Light Leather
|
||||
(@var+8,2319,45,1,1,1,1), -- Medium Leather
|
||||
(@var+8, 783, 3,1,1,1,1), -- Light Hide
|
||||
(@var+8,4232, 5,1,1,1,1), -- Medium Hide
|
||||
(@var+8,7287,10,1,1,1,1), -- Red Whelp Scale
|
||||
-- Var+9 (Deviate Scales)
|
||||
(@var+9,2318,50,1,1,1,2), -- Light Leather
|
||||
(@var+9,2319,25,1,1,1,2), -- Medium Leather
|
||||
(@var+9,6470,10,1,1,1,1), -- Deviate Scale
|
||||
(@var+9, 783, 7,1,1,1,1), -- Light Hide
|
||||
(@var+9,6471, 5,1,1,1,1), -- Perfect Deviate Scale
|
||||
(@var+9,4232, 3,1,1,1,1), -- Medium Hide
|
||||
-- Var+10 (Medium Leather)
|
||||
(@var+10,2319,73,1,1,1,1), -- Medium Leather
|
||||
(@var+10,4234,20,1,1,1,1), -- Heavy Leather
|
||||
(@var+10,4232, 5,1,1,1,1), -- Medium Hide
|
||||
(@var+10,4235, 2,1,1,1,1), -- Heavy Hide
|
||||
-- Var+11 (Medium Leather)
|
||||
(@var+11,4234,51,1,1,1,1), -- Heavy Leather
|
||||
(@var+11,2319,42,1,1,1,1), -- Medium Leather
|
||||
(@var+11,4232, 4,1,1,1,1), -- Medium Hide
|
||||
(@var+11,4235, 3,1,1,1,1), -- Heavy Hide
|
||||
-- Var+12 (Medium Leather)
|
||||
(@var+12,2319,64,1,1,1,2), -- Medium Leather
|
||||
(@var+12,4234,27,1,1,1,2), -- Heavy Leather
|
||||
(@var+12,4232, 6,1,1,1,1), -- Medium Hide
|
||||
(@var+12,4235, 3,1,1,1,1), -- Heavy Hide
|
||||
-- Var+13 (Heavy Leather)
|
||||
(@var+13,4234,77,1,1,1,1), -- Heavy Leather
|
||||
(@var+13,4304,20,1,1,1,1), -- Thick Leather
|
||||
(@var+13,4235, 3,1,1,1,1), -- Heavy Hide
|
||||
-- Var+14 (Heavy Leather)
|
||||
(@var+14,4304,50,1,1,1,1), -- Thick Leather
|
||||
(@var+14,4234,45,1,1,1,1), -- Heavy Leather
|
||||
(@var+14,8169, 3,1,1,1,1), -- Thick Hide
|
||||
(@var+14,4235, 2,1,1,1,1), -- Heavy Hide
|
||||
-- Var+15 (Green Whelp Scale)
|
||||
(@var+15,4234,40,1,1,1,1), -- Heavy Leather
|
||||
(@var+15,2319,33,1,1,1,1), -- Medium Leather
|
||||
(@var+15,7392,20,1,1,1,1), -- Green Whelp Scale
|
||||
(@var+15,4232, 4,1,1,1,1), -- Medium Hide
|
||||
(@var+15,4235, 3,1,1,1,1); -- Heavy Hide
|
||||
6
sql/updates/world/2013_09_01_06_world_misc.sql
Normal file
6
sql/updates/world/2013_09_01_06_world_misc.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
DELETE FROM `creature_addon` WHERE `auras` LIKE '%46598%'; -- no need to specify GUID, these are unique
|
||||
DELETE FROM `creature_addon` WHERE `auras` LIKE '%43671%'; -- no need to specify GUID, these are unique
|
||||
DELETE FROM `creature_addon` WHERE `guid`=85236;
|
||||
INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
|
||||
(85236,0,22471,0,1,0,'63500 64718');
|
||||
DELETE FROM `creature_addon` WHERE `guid` IN (132681,128620);
|
||||
1
sql/updates/world/2013_09_02_00_world_smart_scripts.sql
Normal file
1
sql/updates/world/2013_09_02_00_world_smart_scripts.sql
Normal file
@@ -0,0 +1 @@
|
||||
UPDATE `smart_scripts` SET `target_type`=7 WHERE `entryorguid` IN (18818,21237,19009,21236) AND `source_type`=0 AND `id`=1;
|
||||
@@ -731,7 +731,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
|
||||
me->AI()->EnterEvadeMode();
|
||||
TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_EVADE: Creature %u EnterEvadeMode", me->GetGUIDLow());
|
||||
return;
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_FLEE_FOR_ASSIST:
|
||||
{
|
||||
@@ -854,7 +854,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
}
|
||||
case SMART_ACTION_CALL_KILLEDMONSTER:
|
||||
{
|
||||
if (e.target.type == SMART_TARGET_NONE) // Loot recipient and his group members
|
||||
if (e.target.type == SMART_TARGET_NONE || e.target.type == SMART_TARGET_SELF) // Loot recipient and his group members
|
||||
{
|
||||
if (!me)
|
||||
break;
|
||||
@@ -1340,15 +1340,18 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (!me)
|
||||
break;
|
||||
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
if (e.GetTargetType() == SMART_TARGET_SELF)
|
||||
me->SetFacingTo(me->GetHomePosition().GetOrientation());
|
||||
else if (e.GetTargetType() == SMART_TARGET_POSITION)
|
||||
me->SetFacingTo(e.target.o);
|
||||
else if (targets && !targets->empty())
|
||||
me->SetFacingToObject(*targets->begin());
|
||||
else if (ObjectList* targets = GetTargets(e, unit))
|
||||
{
|
||||
if (!targets->empty())
|
||||
me->SetFacingToObject(*targets->begin());
|
||||
|
||||
delete targets;
|
||||
}
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_PLAYMOVIE:
|
||||
@@ -1445,7 +1448,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info id %u for creature %u", equipId, npc->GetEntry());
|
||||
delete targets;
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
npc->SetCurrentEquipmentId(equipId);
|
||||
@@ -1879,11 +1882,13 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
break;
|
||||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
/// @todo Resume path when reached jump location
|
||||
|
||||
delete targets;
|
||||
@@ -1913,7 +1918,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (!storedTargets)
|
||||
{
|
||||
delete targets;
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
@@ -1950,6 +1955,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
break;
|
||||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
{
|
||||
if (Player* player = (*itr)->ToPlayer())
|
||||
{
|
||||
if (e.action.sendGossipMenu.gossipMenuId)
|
||||
@@ -1959,6 +1965,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
|
||||
player->SEND_GOSSIP_MENU(e.action.sendGossipMenu.gossipNpcTextId, GetBaseObject()->GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
@@ -1970,15 +1977,32 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
break;
|
||||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
{
|
||||
if (IsCreature(*itr))
|
||||
{
|
||||
if (e.GetTargetType() == SMART_TARGET_SELF)
|
||||
(*itr)->ToCreature()->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
else if (e.GetTargetType() == SMART_TARGET_POSITION)
|
||||
(*itr)->ToCreature()->SetHomePosition(e.target.x, e.target.y, e.target.z, e.target.o);
|
||||
else if (e.GetTargetType() == SMART_TARGET_CREATURE_RANGE || e.GetTargetType() == SMART_TARGET_CREATURE_GUID ||
|
||||
e.GetTargetType() == SMART_TARGET_CREATURE_DISTANCE || e.GetTargetType() == SMART_TARGET_GAMEOBJECT_RANGE ||
|
||||
e.GetTargetType() == SMART_TARGET_GAMEOBJECT_GUID || e.GetTargetType() == SMART_TARGET_GAMEOBJECT_DISTANCE ||
|
||||
e.GetTargetType() == SMART_TARGET_CLOSEST_CREATURE || e.GetTargetType() == SMART_TARGET_CLOSEST_GAMEOBJECT ||
|
||||
e.GetTargetType() == SMART_TARGET_OWNER_OR_SUMMONER || e.GetTargetType() == SMART_TARGET_ACTION_INVOKER ||
|
||||
e.GetTargetType() == SMART_TARGET_CLOSEST_ENEMY || e.GetTargetType() == SMART_TARGET_CLOSEST_FRIENDLY)
|
||||
{
|
||||
if (ObjectList* targets = GetTargets(e, unit))
|
||||
{
|
||||
if (WorldObject* target = targets->front())
|
||||
(*itr)->ToCreature()->SetHomePosition(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation());
|
||||
|
||||
delete targets;
|
||||
}
|
||||
}
|
||||
else
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: Action target for SMART_ACTION_SET_HOME_POS is not using SMART_TARGET_SELF or SMART_TARGET_POSITION, skipping");
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: Action target for SMART_ACTION_SET_HOME_POS is invalid, skipping");
|
||||
}
|
||||
}
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
@@ -2101,7 +2125,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (!sGameEventMgr->IsActiveEvent(eventId))
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript::ProcessAction: At case SMART_ACTION_GAME_EVENT_STOP, inactive event (id: %u)", eventId);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
sGameEventMgr->StopEvent(eventId, true);
|
||||
break;
|
||||
@@ -2112,7 +2136,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (sGameEventMgr->IsActiveEvent(eventId))
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript::ProcessAction: At case SMART_ACTION_GAME_EVENT_START, already activated event (id: %u)", eventId);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
sGameEventMgr->StartEvent(eventId, true);
|
||||
break;
|
||||
@@ -2621,10 +2645,20 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
|
||||
}
|
||||
case SMART_EVENT_TARGET_CASTING:
|
||||
{
|
||||
if (!me || !me->IsInCombat() || !me->GetVictim() || !me->GetVictim()->IsNonMeleeSpellCasted(false, false, true))
|
||||
if (!me || !me->IsInCombat())
|
||||
return;
|
||||
|
||||
ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax, me->GetVictim());
|
||||
Unit* victim = me->GetVictim();
|
||||
|
||||
if (!victim || !victim->IsNonMeleeSpellCasted(false, false, true))
|
||||
return;
|
||||
|
||||
if (e.event.targetCasting.spellId > 0)
|
||||
if (Spell* currSpell = victim->GetCurrentSpell(CURRENT_GENERIC_SPELL))
|
||||
if (currSpell->m_spellInfo->Id != e.event.targetCasting.spellId)
|
||||
return;
|
||||
|
||||
ProcessTimedAction(e, e.event.targetCasting.repeatMin, e.event.targetCasting.repeatMax, me->GetVictim());
|
||||
break;
|
||||
}
|
||||
case SMART_EVENT_FRIENDLY_HEALTH:
|
||||
@@ -2632,10 +2666,10 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
|
||||
if (!me || !me->IsInCombat())
|
||||
return;
|
||||
|
||||
Unit* target = DoSelectLowestHpFriendly((float)e.event.friendlyHealt.radius, e.event.friendlyHealt.hpDeficit);
|
||||
Unit* target = DoSelectLowestHpFriendly((float)e.event.friendlyHealth.radius, e.event.friendlyHealth.hpDeficit);
|
||||
if (!target || !target->IsInCombat())
|
||||
return;
|
||||
ProcessTimedAction(e, e.event.friendlyHealt.repeatMin, e.event.friendlyHealt.repeatMax, target);
|
||||
ProcessTimedAction(e, e.event.friendlyHealth.repeatMin, e.event.friendlyHealth.repeatMax, target);
|
||||
break;
|
||||
}
|
||||
case SMART_EVENT_FRIENDLY_IS_CC:
|
||||
@@ -2983,7 +3017,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
|
||||
{
|
||||
uint32 healthPct = uint32((*itr)->ToUnit()->GetHealthPct());
|
||||
|
||||
if (healthPct > e.event.friendlyHealtPct.maxHpPct || healthPct < e.event.friendlyHealtPct.minHpPct)
|
||||
if (healthPct > e.event.friendlyHealthPct.maxHpPct || healthPct < e.event.friendlyHealthPct.minHpPct)
|
||||
continue;
|
||||
|
||||
target = (*itr)->ToUnit();
|
||||
@@ -2996,7 +3030,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
ProcessTimedAction(e, e.event.friendlyHealtPct.repeatMin, e.event.friendlyHealtPct.repeatMax, target);
|
||||
ProcessTimedAction(e, e.event.friendlyHealthPct.repeatMin, e.event.friendlyHealthPct.repeatMax, target);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@@ -407,10 +407,10 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
}
|
||||
break;
|
||||
case SMART_EVENT_FRIENDLY_HEALTH:
|
||||
if (!NotNULL(e, e.event.friendlyHealt.radius))
|
||||
if (!NotNULL(e, e.event.friendlyHealth.radius))
|
||||
return false;
|
||||
|
||||
if (!IsMinMaxValid(e, e.event.friendlyHealt.repeatMin, e.event.friendlyHealt.repeatMax))
|
||||
if (!IsMinMaxValid(e, e.event.friendlyHealth.repeatMin, e.event.friendlyHealth.repeatMax))
|
||||
return false;
|
||||
break;
|
||||
case SMART_EVENT_FRIENDLY_IS_CC:
|
||||
@@ -437,6 +437,15 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
return false;
|
||||
break;
|
||||
case SMART_EVENT_TARGET_CASTING:
|
||||
if (e.event.targetCasting.spellId > 0 && !sSpellMgr->GetSpellInfo(e.event.targetCasting.spellId))
|
||||
{
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.spellHit.spell);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!IsMinMaxValid(e, e.event.targetCasting.repeatMin, e.event.targetCasting.repeatMax))
|
||||
return false;
|
||||
break;
|
||||
case SMART_EVENT_PASSENGER_BOARDED:
|
||||
case SMART_EVENT_PASSENGER_REMOVED:
|
||||
if (!IsMinMaxValid(e, e.event.minMax.repeatMin, e.event.minMax.repeatMax))
|
||||
@@ -546,10 +555,10 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
break;
|
||||
}
|
||||
case SMART_EVENT_FRIENDLY_HEALTH_PCT:
|
||||
if (!IsMinMaxValid(e, e.event.friendlyHealtPct.repeatMin, e.event.friendlyHealtPct.repeatMax))
|
||||
if (!IsMinMaxValid(e, e.event.friendlyHealthPct.repeatMin, e.event.friendlyHealthPct.repeatMax))
|
||||
return false;
|
||||
|
||||
if (e.event.friendlyHealtPct.maxHpPct > 100 || e.event.friendlyHealtPct.minHpPct > 100)
|
||||
if (e.event.friendlyHealthPct.maxHpPct > 100 || e.event.friendlyHealthPct.minHpPct > 100)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has pct value above 100, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
return false;
|
||||
|
||||
@@ -95,7 +95,7 @@ enum SMART_EVENT
|
||||
SMART_EVENT_OOC_LOS = 10, // NoHostile, MaxRnage, CooldownMin, CooldownMax
|
||||
SMART_EVENT_RESPAWN = 11, // type, MapId, ZoneId
|
||||
SMART_EVENT_TARGET_HEALTH_PCT = 12, // HPMin%, HPMax%, RepeatMin, RepeatMax
|
||||
SMART_EVENT_TARGET_CASTING = 13, // RepeatMin, RepeatMax
|
||||
SMART_EVENT_TARGET_CASTING = 13, // RepeatMin, RepeatMax, spellid
|
||||
SMART_EVENT_FRIENDLY_HEALTH = 14, // HPDeficit, Radius, RepeatMin, RepeatMax
|
||||
SMART_EVENT_FRIENDLY_IS_CC = 15, // Radius, RepeatMin, RepeatMax
|
||||
SMART_EVENT_FRIENDLY_MISSING_BUFF = 16, // SpellId, Radius, RepeatMin, RepeatMax
|
||||
@@ -214,13 +214,20 @@ struct SmartEvent
|
||||
uint32 repeatMax;
|
||||
} minMax;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 repeatMin;
|
||||
uint32 repeatMax;
|
||||
uint32 spellId;
|
||||
} targetCasting;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 hpDeficit;
|
||||
uint32 radius;
|
||||
uint32 repeatMin;
|
||||
uint32 repeatMax;
|
||||
} friendlyHealt;
|
||||
} friendlyHealth;
|
||||
|
||||
struct
|
||||
{
|
||||
@@ -369,7 +376,7 @@ struct SmartEvent
|
||||
uint32 maxHpPct;
|
||||
uint32 repeatMin;
|
||||
uint32 repeatMax;
|
||||
} friendlyHealtPct;
|
||||
} friendlyHealthPct;
|
||||
|
||||
struct
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@ enum TypeMask
|
||||
TYPEMASK_DYNAMICOBJECT = 0x0040,
|
||||
TYPEMASK_CORPSE = 0x0080,
|
||||
TYPEMASK_AREATRIGGER = 0x0100,
|
||||
TYPEMASK_SEER = TYPEMASK_UNIT | TYPEMASK_DYNAMICOBJECT
|
||||
TYPEMASK_SEER = TYPEMASK_PLAYER | TYPEMASK_UNIT | TYPEMASK_DYNAMICOBJECT
|
||||
};
|
||||
|
||||
enum TypeID
|
||||
|
||||
@@ -586,6 +586,10 @@ void ObjectMgr::LoadCreatureTemplateAddons()
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has wrong spell %u defined in `auras` field in `creature_template_addon`.", entry, uint32(atol(*itr)));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (AdditionalSpellInfo->HasAura(SPELL_AURA_CONTROL_VEHICLE))
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has SPELL_AURA_CONTROL_VEHICLE aura %u defined in `auras` field in `creature_template_addon`.", entry, uint32(atol(*itr)));
|
||||
|
||||
creatureAddon.auras[i++] = uint32(atol(*itr));
|
||||
}
|
||||
|
||||
@@ -600,7 +604,7 @@ void ObjectMgr::LoadCreatureTemplateAddons()
|
||||
|
||||
if (!sEmotesStore.LookupEntry(creatureAddon.emote))
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has invalid emote (%u) defined in `creature_addon`.", entry, creatureAddon.emote);
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has invalid emote (%u) defined in `creature_template_addon`.", entry, creatureAddon.emote);
|
||||
creatureAddon.emote = 0;
|
||||
}
|
||||
|
||||
@@ -959,6 +963,10 @@ void ObjectMgr::LoadCreatureAddons()
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (GUID: %u) has wrong spell %u defined in `auras` field in `creature_addon`.", guid, uint32(atol(*itr)));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (AdditionalSpellInfo->HasAura(SPELL_AURA_CONTROL_VEHICLE))
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (GUID: %u) has SPELL_AURA_CONTROL_VEHICLE aura %u defined in `auras` field in `creature_addon`.", guid, uint32(atol(*itr)));
|
||||
|
||||
creatureAddon.auras[i++] = uint32(atol(*itr));
|
||||
}
|
||||
|
||||
|
||||
@@ -317,107 +317,102 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
|
||||
_recvQueue.next(packet, updater))
|
||||
{
|
||||
if (!AntiDOS.EvaluateOpcode(*packet))
|
||||
{
|
||||
delete packet;
|
||||
packet = NULL;
|
||||
KickPlayer();
|
||||
}
|
||||
|
||||
if (packet)
|
||||
OpcodeHandler const* opHandle = opcodeTable[packet->GetOpcode()];
|
||||
try
|
||||
{
|
||||
OpcodeHandler const* opHandle = opcodeTable[packet->GetOpcode()];
|
||||
try
|
||||
switch (opHandle->Status)
|
||||
{
|
||||
switch (opHandle->Status)
|
||||
{
|
||||
case STATUS_LOGGEDIN:
|
||||
if (!_player)
|
||||
case STATUS_LOGGEDIN:
|
||||
if (!_player)
|
||||
{
|
||||
// skip STATUS_LOGGEDIN opcode unexpected errors if player logout sometime ago - this can be network lag delayed packets
|
||||
//! If player didn't log out a while ago, it means packets are being sent while the server does not recognize
|
||||
//! the client to be in world yet. We will re-add the packets to the bottom of the queue and process them later.
|
||||
if (!m_playerRecentlyLogout)
|
||||
{
|
||||
// skip STATUS_LOGGEDIN opcode unexpected errors if player logout sometime ago - this can be network lag delayed packets
|
||||
//! If player didn't log out a while ago, it means packets are being sent while the server does not recognize
|
||||
//! the client to be in world yet. We will re-add the packets to the bottom of the queue and process them later.
|
||||
if (!m_playerRecentlyLogout)
|
||||
{
|
||||
//! Prevent infinite loop
|
||||
if (!firstDelayedPacket)
|
||||
firstDelayedPacket = packet;
|
||||
//! Because checking a bool is faster than reallocating memory
|
||||
deletePacket = false;
|
||||
QueuePacket(packet);
|
||||
//! Log
|
||||
TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Re-enqueueing packet with opcode %s with with status STATUS_LOGGEDIN. "
|
||||
"Player is currently not in world yet.", GetOpcodeNameForLogging(packet->GetOpcode()).c_str());
|
||||
}
|
||||
//! Prevent infinite loop
|
||||
if (!firstDelayedPacket)
|
||||
firstDelayedPacket = packet;
|
||||
//! Because checking a bool is faster than reallocating memory
|
||||
deletePacket = false;
|
||||
QueuePacket(packet);
|
||||
//! Log
|
||||
TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Re-enqueueing packet with opcode %s with with status STATUS_LOGGEDIN. "
|
||||
"Player is currently not in world yet.", GetOpcodeNameForLogging(packet->GetOpcode()).c_str());
|
||||
}
|
||||
else if (_player->IsInWorld())
|
||||
{
|
||||
sScriptMgr->OnPacketReceive(m_Socket, WorldPacket(*packet));
|
||||
(this->*opHandle->Handler)(*packet);
|
||||
LogUnprocessedTail(packet);
|
||||
}
|
||||
// lag can cause STATUS_LOGGEDIN opcodes to arrive after the player started a transfer
|
||||
break;
|
||||
case STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT:
|
||||
if (!_player && !m_playerRecentlyLogout && !m_playerLogout) // There's a short delay between _player = null and m_playerRecentlyLogout = true during logout
|
||||
LogUnexpectedOpcode(packet, "STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT",
|
||||
"the player has not logged in yet and not recently logout");
|
||||
else
|
||||
{
|
||||
// not expected _player or must checked in packet hanlder
|
||||
sScriptMgr->OnPacketReceive(m_Socket, WorldPacket(*packet));
|
||||
(this->*opHandle->Handler)(*packet);
|
||||
LogUnprocessedTail(packet);
|
||||
}
|
||||
break;
|
||||
case STATUS_TRANSFER:
|
||||
if (!_player)
|
||||
LogUnexpectedOpcode(packet, "STATUS_TRANSFER", "the player has not logged in yet");
|
||||
else if (_player->IsInWorld())
|
||||
LogUnexpectedOpcode(packet, "STATUS_TRANSFER", "the player is still in world");
|
||||
else
|
||||
{
|
||||
sScriptMgr->OnPacketReceive(m_Socket, WorldPacket(*packet));
|
||||
(this->*opHandle->Handler)(*packet);
|
||||
LogUnprocessedTail(packet);
|
||||
}
|
||||
break;
|
||||
case STATUS_AUTHED:
|
||||
// prevent cheating with skip queue wait
|
||||
if (m_inQueue)
|
||||
{
|
||||
LogUnexpectedOpcode(packet, "STATUS_AUTHED", "the player not pass queue yet");
|
||||
break;
|
||||
}
|
||||
|
||||
// some auth opcodes can be recieved before STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT opcodes
|
||||
// however when we recieve CMSG_CHAR_ENUM we are surely no longer during the logout process.
|
||||
if (packet->GetOpcode() == CMSG_CHAR_ENUM)
|
||||
m_playerRecentlyLogout = false;
|
||||
|
||||
}
|
||||
else if (_player->IsInWorld())
|
||||
{
|
||||
sScriptMgr->OnPacketReceive(m_Socket, WorldPacket(*packet));
|
||||
(this->*opHandle->Handler)(*packet);
|
||||
LogUnprocessedTail(packet);
|
||||
}
|
||||
// lag can cause STATUS_LOGGEDIN opcodes to arrive after the player started a transfer
|
||||
break;
|
||||
case STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT:
|
||||
if (!_player && !m_playerRecentlyLogout && !m_playerLogout) // There's a short delay between _player = null and m_playerRecentlyLogout = true during logout
|
||||
LogUnexpectedOpcode(packet, "STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT",
|
||||
"the player has not logged in yet and not recently logout");
|
||||
else
|
||||
{
|
||||
// not expected _player or must checked in packet hanlder
|
||||
sScriptMgr->OnPacketReceive(m_Socket, WorldPacket(*packet));
|
||||
(this->*opHandle->Handler)(*packet);
|
||||
LogUnprocessedTail(packet);
|
||||
}
|
||||
break;
|
||||
case STATUS_TRANSFER:
|
||||
if (!_player)
|
||||
LogUnexpectedOpcode(packet, "STATUS_TRANSFER", "the player has not logged in yet");
|
||||
else if (_player->IsInWorld())
|
||||
LogUnexpectedOpcode(packet, "STATUS_TRANSFER", "the player is still in world");
|
||||
else
|
||||
{
|
||||
sScriptMgr->OnPacketReceive(m_Socket, WorldPacket(*packet));
|
||||
(this->*opHandle->Handler)(*packet);
|
||||
LogUnprocessedTail(packet);
|
||||
}
|
||||
break;
|
||||
case STATUS_AUTHED:
|
||||
// prevent cheating with skip queue wait
|
||||
if (m_inQueue)
|
||||
{
|
||||
LogUnexpectedOpcode(packet, "STATUS_AUTHED", "the player not pass queue yet");
|
||||
break;
|
||||
case STATUS_NEVER:
|
||||
TC_LOG_ERROR(LOG_FILTER_OPCODES, "Received not allowed opcode %s from %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str()
|
||||
, GetPlayerInfo().c_str());
|
||||
break;
|
||||
case STATUS_UNHANDLED:
|
||||
TC_LOG_ERROR(LOG_FILTER_OPCODES, "Received not handled opcode %s from %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str()
|
||||
, GetPlayerInfo().c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch(ByteBufferException &)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSession::Update ByteBufferException occured while parsing a packet (opcode: %u) from client %s, accountid=%i. Skipped packet.",
|
||||
packet->GetOpcode(), GetRemoteAddress().c_str(), GetAccountId());
|
||||
packet->hexlike();
|
||||
}
|
||||
}
|
||||
|
||||
if (deletePacket)
|
||||
delete packet;
|
||||
// some auth opcodes can be recieved before STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT opcodes
|
||||
// however when we recieve CMSG_CHAR_ENUM we are surely no longer during the logout process.
|
||||
if (packet->GetOpcode() == CMSG_CHAR_ENUM)
|
||||
m_playerRecentlyLogout = false;
|
||||
|
||||
sScriptMgr->OnPacketReceive(m_Socket, WorldPacket(*packet));
|
||||
(this->*opHandle->Handler)(*packet);
|
||||
LogUnprocessedTail(packet);
|
||||
break;
|
||||
case STATUS_NEVER:
|
||||
TC_LOG_ERROR(LOG_FILTER_OPCODES, "Received not allowed opcode %s from %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str()
|
||||
, GetPlayerInfo().c_str());
|
||||
break;
|
||||
case STATUS_UNHANDLED:
|
||||
TC_LOG_ERROR(LOG_FILTER_OPCODES, "Received not handled opcode %s from %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str()
|
||||
, GetPlayerInfo().c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (ByteBufferException const&)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSession::Update ByteBufferException occured while parsing a packet (opcode: %u) from client %s, accountid=%i. Skipped packet.",
|
||||
packet->GetOpcode(), GetRemoteAddress().c_str(), GetAccountId());
|
||||
packet->hexlike();
|
||||
}
|
||||
|
||||
if (deletePacket)
|
||||
delete packet;
|
||||
|
||||
deletePacket = true;
|
||||
}
|
||||
|
||||
if (m_Socket && !m_Socket->IsClosed() && _warden)
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, bool> World::m_stopEvent = false;
|
||||
uint8 World::m_ExitCode = SHUTDOWN_EXIT_CODE;
|
||||
volatile uint32 World::m_worldLoopCounter = 0;
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, uint32> World::m_worldLoopCounter = 0;
|
||||
|
||||
float World::m_MaxVisibleDistanceOnContinents = DEFAULT_VISIBILITY_DISTANCE;
|
||||
float World::m_MaxVisibleDistanceInInstances = DEFAULT_VISIBILITY_INSTANCE;
|
||||
|
||||
@@ -534,7 +534,7 @@ struct CharacterNameData
|
||||
class World
|
||||
{
|
||||
public:
|
||||
static volatile uint32 m_worldLoopCounter;
|
||||
static ACE_Atomic_Op<ACE_Thread_Mutex, uint32> m_worldLoopCounter;
|
||||
|
||||
World();
|
||||
~World();
|
||||
|
||||
@@ -403,21 +403,19 @@ class spell_devourer_of_souls_mirrored_soul_proc : public SpellScriptLoader
|
||||
|
||||
bool Load() OVERRIDE
|
||||
{
|
||||
_procTarget = NULL;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
_procTarget = GetCaster();
|
||||
return _procTarget && _procTarget->IsAlive();
|
||||
return GetCaster() && GetCaster()->IsAlive();
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
int32 damage = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), 45));
|
||||
GetTarget()->CastCustomSpell(SPELL_MIRRORED_SOUL_DAMAGE, SPELLVALUE_BASE_POINT0, damage, _procTarget, true);
|
||||
GetTarget()->CastCustomSpell(SPELL_MIRRORED_SOUL_DAMAGE, SPELLVALUE_BASE_POINT0, damage, GetCaster(), true);
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
@@ -425,9 +423,6 @@ class spell_devourer_of_souls_mirrored_soul_proc : public SpellScriptLoader
|
||||
DoCheckProc += AuraCheckProcFn(spell_devourer_of_souls_mirrored_soul_proc_AuraScript::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_devourer_of_souls_mirrored_soul_proc_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
|
||||
private:
|
||||
Unit* _procTarget;
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
|
||||
@@ -256,8 +256,6 @@ public:
|
||||
}
|
||||
} else uiGripOfSladRanTimer -= diff;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
};
|
||||
|
||||
};
|
||||
@@ -278,8 +276,6 @@ public:
|
||||
|
||||
uint32 uiVenomousBiteTimer;
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
uiVenomousBiteTimer = 2*IN_MILLISECONDS;
|
||||
|
||||
@@ -39,7 +39,7 @@ enum VezaxEmotes
|
||||
EMOTE_SURGE_OF_DARKNESS = 8,
|
||||
|
||||
// Saronite Vapor
|
||||
EMOTE_VAPORS = 9
|
||||
EMOTE_VAPORS = 0
|
||||
};
|
||||
|
||||
enum VezaxSpells
|
||||
@@ -443,14 +443,21 @@ class npc_saronite_vapors : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
class spell_mark_of_the_faceless : public SpellScriptLoader
|
||||
class spell_general_vezax_mark_of_the_faceless : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_mark_of_the_faceless() : SpellScriptLoader("spell_mark_of_the_faceless") { }
|
||||
spell_general_vezax_mark_of_the_faceless() : SpellScriptLoader("spell_general_vezax_mark_of_the_faceless") { }
|
||||
|
||||
class spell_mark_of_the_faceless_AuraScript : public AuraScript
|
||||
class spell_general_vezax_mark_of_the_faceless_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mark_of_the_faceless_AuraScript);
|
||||
PrepareAuraScript(spell_general_vezax_mark_of_the_faceless_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_MARK_OF_THE_FACELESS_DAMAGE))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleEffectPeriodic(AuraEffect const* aurEff)
|
||||
{
|
||||
@@ -460,13 +467,42 @@ class spell_mark_of_the_faceless : public SpellScriptLoader
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_mark_of_the_faceless_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_general_vezax_mark_of_the_faceless_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
{
|
||||
return new spell_mark_of_the_faceless_AuraScript();
|
||||
return new spell_general_vezax_mark_of_the_faceless_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_general_vezax_mark_of_the_faceless_leech : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_general_vezax_mark_of_the_faceless_leech() : SpellScriptLoader("spell_general_vezax_mark_of_the_faceless_leech") { }
|
||||
|
||||
class spell_general_vezax_mark_of_the_faceless_leech_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_general_vezax_mark_of_the_faceless_leech_SpellScript);
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove(GetExplTargetWorldObject());
|
||||
|
||||
if (targets.empty())
|
||||
FinishCast(SPELL_FAILED_NO_VALID_TARGETS);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_general_vezax_mark_of_the_faceless_leech_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_DEST_AREA_ENEMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_general_vezax_mark_of_the_faceless_leech_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -554,7 +590,8 @@ void AddSC_boss_general_vezax()
|
||||
new boss_general_vezax();
|
||||
new boss_saronite_animus();
|
||||
new npc_saronite_vapors();
|
||||
new spell_mark_of_the_faceless();
|
||||
new spell_general_vezax_mark_of_the_faceless();
|
||||
new spell_general_vezax_mark_of_the_faceless_leech();
|
||||
new spell_general_vezax_saronite_vapors();
|
||||
new achievement_shadowdodger();
|
||||
new achievement_smell_saronite();
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
#include "ulduar.h"
|
||||
|
||||
|
||||
@@ -24,15 +24,21 @@
|
||||
|
||||
static DoorData const doorData[] =
|
||||
{
|
||||
{GO_LEVIATHAN_DOOR, BOSS_LEVIATHAN, DOOR_TYPE_ROOM, BOUNDARY_S },
|
||||
{GO_XT_002_DOOR, BOSS_XT002, DOOR_TYPE_ROOM, BOUNDARY_S },
|
||||
{GO_YOGG_SARON_DOOR, BOSS_YOGG_SARON, DOOR_TYPE_ROOM, BOUNDARY_S },
|
||||
{GO_DOODAD_UL_SIGILDOOR_03, BOSS_ALGALON, DOOR_TYPE_ROOM, BOUNDARY_W },
|
||||
{GO_DOODAD_UL_UNIVERSEFLOOR_01, BOSS_ALGALON, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
||||
{GO_DOODAD_UL_UNIVERSEFLOOR_02, BOSS_ALGALON, DOOR_TYPE_SPAWN_HOLE, BOUNDARY_NONE },
|
||||
{GO_DOODAD_UL_UNIVERSEGLOBE01, BOSS_ALGALON, DOOR_TYPE_SPAWN_HOLE, BOUNDARY_NONE },
|
||||
{GO_DOODAD_UL_ULDUAR_TRAPDOOR_03, BOSS_ALGALON, DOOR_TYPE_SPAWN_HOLE, BOUNDARY_NONE },
|
||||
{0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
||||
{ GO_LEVIATHAN_DOOR, BOSS_LEVIATHAN, DOOR_TYPE_ROOM, BOUNDARY_S },
|
||||
{ GO_XT_002_DOOR, BOSS_XT002, DOOR_TYPE_ROOM, BOUNDARY_S },
|
||||
{ GO_IRON_COUNCIL_DOOR, BOSS_ASSEMBLY_OF_IRON, DOOR_TYPE_ROOM, BOUNDARY_N },
|
||||
{ GO_ARCHIVUM_DOOR, BOSS_ASSEMBLY_OF_IRON, DOOR_TYPE_PASSAGE, BOUNDARY_S },
|
||||
{ GO_HODIR_ENTRANCE, BOSS_HODIR, DOOR_TYPE_ROOM, BOUNDARY_E },
|
||||
{ GO_HODIR_DOOR, BOSS_HODIR, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
|
||||
{ GO_HODIR_ICE_DOOR, BOSS_HODIR, DOOR_TYPE_PASSAGE, BOUNDARY_W },
|
||||
{ GO_VEZAX_DOOR, BOSS_VEZAX, DOOR_TYPE_PASSAGE, BOUNDARY_E },
|
||||
{ GO_YOGG_SARON_DOOR, BOSS_YOGG_SARON, DOOR_TYPE_ROOM, BOUNDARY_S },
|
||||
{ GO_DOODAD_UL_SIGILDOOR_03, BOSS_ALGALON, DOOR_TYPE_ROOM, BOUNDARY_W },
|
||||
{ GO_DOODAD_UL_UNIVERSEFLOOR_01, BOSS_ALGALON, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
||||
{ GO_DOODAD_UL_UNIVERSEFLOOR_02, BOSS_ALGALON, DOOR_TYPE_SPAWN_HOLE, BOUNDARY_NONE },
|
||||
{ GO_DOODAD_UL_UNIVERSEGLOBE01, BOSS_ALGALON, DOOR_TYPE_SPAWN_HOLE, BOUNDARY_NONE },
|
||||
{ GO_DOODAD_UL_ULDUAR_TRAPDOOR_03, BOSS_ALGALON, DOOR_TYPE_SPAWN_HOLE, BOUNDARY_NONE },
|
||||
{ 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
||||
};
|
||||
|
||||
MinionData const minionData[] =
|
||||
@@ -46,7 +52,7 @@ MinionData const minionData[] =
|
||||
class instance_ulduar : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_ulduar() : InstanceMapScript("instance_ulduar", 603) { }
|
||||
instance_ulduar() : InstanceMapScript(UlduarScriptName, 603) { }
|
||||
|
||||
struct instance_ulduar_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
@@ -73,6 +79,7 @@ class instance_ulduar : public InstanceMapScript
|
||||
uint64 VoiceOfYoggSaronGUID;
|
||||
uint64 SaraGUID;
|
||||
uint64 BrainOfYoggSaronGUID;
|
||||
uint64 KeeperGUIDs[4];
|
||||
uint64 AlgalonGUID;
|
||||
uint64 BrannBronzebeardAlgGUID;
|
||||
|
||||
@@ -81,16 +88,10 @@ class instance_ulduar : public InstanceMapScript
|
||||
uint64 RazorHarpoonGUIDs[4];
|
||||
uint64 KologarnChestGUID;
|
||||
uint64 KologarnBridgeGUID;
|
||||
uint64 KologarnDoorGUID;
|
||||
uint64 ThorimChestGUID;
|
||||
uint64 HodirRareCacheGUID;
|
||||
uint64 HodirChestGUID;
|
||||
uint64 HodirDoorGUID;
|
||||
uint64 HodirIceDoorGUID;
|
||||
uint64 ArchivumDoorGUID;
|
||||
uint64 VezaxDoorGUID;
|
||||
uint64 BrainRoomDoorGUIDs[3];
|
||||
uint64 KeeperGUIDs[4];
|
||||
uint64 AlgalonSigilDoorGUID[3];
|
||||
uint64 AlgalonFloorGUID[2];
|
||||
uint64 AlgalonUniverseGUID;
|
||||
@@ -138,10 +139,6 @@ class instance_ulduar : public InstanceMapScript
|
||||
HodirRareCacheGUID = 0;
|
||||
HodirChestGUID = 0;
|
||||
LeviathanGateGUID = 0;
|
||||
VezaxDoorGUID = 0;
|
||||
HodirDoorGUID = 0;
|
||||
HodirIceDoorGUID = 0;
|
||||
ArchivumDoorGUID = 0;
|
||||
AlgalonUniverseGUID = 0;
|
||||
AlgalonTrapdoorGUID = 0;
|
||||
BrannBronzebeardAlgGUID = 0;
|
||||
@@ -458,9 +455,6 @@ class instance_ulduar : public InstanceMapScript
|
||||
if (GetBossState(BOSS_KOLOGARN) == DONE)
|
||||
HandleGameObject(0, false, gameObject);
|
||||
break;
|
||||
case GO_KOLOGARN_DOOR:
|
||||
KologarnDoorGUID = gameObject->GetGUID();
|
||||
break;
|
||||
case GO_THORIM_CHEST_HERO:
|
||||
case GO_THORIM_CHEST:
|
||||
ThorimChestGUID = gameObject->GetGUID();
|
||||
@@ -473,20 +467,21 @@ class instance_ulduar : public InstanceMapScript
|
||||
case GO_HODIR_CHEST:
|
||||
HodirChestGUID = gameObject->GetGUID();
|
||||
break;
|
||||
case GO_LEVIATHAN_DOOR:
|
||||
AddDoor(gameObject, true);
|
||||
break;
|
||||
case GO_LEVIATHAN_GATE:
|
||||
LeviathanGateGUID = gameObject->GetGUID();
|
||||
if (GetBossState(BOSS_LEVIATHAN) == DONE)
|
||||
gameObject->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
break;
|
||||
case GO_LEVIATHAN_DOOR:
|
||||
case GO_XT_002_DOOR:
|
||||
AddDoor(gameObject, true);
|
||||
break;
|
||||
case GO_IRON_COUNCIL_DOOR:
|
||||
case GO_ARCHIVUM_DOOR:
|
||||
case GO_HODIR_ENTRANCE:
|
||||
case GO_HODIR_DOOR:
|
||||
case GO_HODIR_ICE_DOOR:
|
||||
case GO_VEZAX_DOOR:
|
||||
VezaxDoorGUID = gameObject->GetGUID();
|
||||
HandleGameObject(0, false, gameObject);
|
||||
case GO_YOGG_SARON_DOOR:
|
||||
AddDoor(gameObject, true);
|
||||
break;
|
||||
case GO_RAZOR_HARPOON_1:
|
||||
RazorHarpoonGUIDs[0] = gameObject->GetGUID();
|
||||
@@ -504,20 +499,6 @@ class instance_ulduar : public InstanceMapScript
|
||||
if (GetBossState(BOSS_RAZORSCALE) == IN_PROGRESS)
|
||||
gameObject->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
case GO_HODIR_DOOR:
|
||||
HodirDoorGUID = gameObject->GetGUID();
|
||||
break;
|
||||
case GO_HODIR_ICE_DOOR:
|
||||
HodirIceDoorGUID = gameObject->GetGUID();
|
||||
break;
|
||||
case GO_ARCHIVUM_DOOR:
|
||||
ArchivumDoorGUID = gameObject->GetGUID();
|
||||
if (GetBossState(BOSS_ASSEMBLY_OF_IRON) != DONE)
|
||||
HandleGameObject(ArchivumDoorGUID, false);
|
||||
break;
|
||||
case GO_YOGG_SARON_DOOR:
|
||||
AddDoor(gameObject, true);
|
||||
break;
|
||||
case GO_BRAIN_ROOM_DOOR_1:
|
||||
BrainRoomDoorGUIDs[0] = gameObject->GetGUID();
|
||||
break;
|
||||
@@ -566,6 +547,8 @@ class instance_ulduar : public InstanceMapScript
|
||||
case GO_GIFT_OF_THE_OBSERVER_25:
|
||||
GiftOfTheObserverGUID = gameObject->GetGUID();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -575,6 +558,13 @@ class instance_ulduar : public InstanceMapScript
|
||||
{
|
||||
case GO_LEVIATHAN_DOOR:
|
||||
case GO_XT_002_DOOR:
|
||||
case GO_IRON_COUNCIL_DOOR:
|
||||
case GO_ARCHIVUM_DOOR:
|
||||
case GO_HODIR_ENTRANCE:
|
||||
case GO_HODIR_DOOR:
|
||||
case GO_HODIR_ICE_DOOR:
|
||||
case GO_VEZAX_DOOR:
|
||||
case GO_YOGG_SARON_DOOR:
|
||||
case GO_DOODAD_UL_SIGILDOOR_03:
|
||||
case GO_DOODAD_UL_UNIVERSEFLOOR_01:
|
||||
case GO_DOODAD_UL_UNIVERSEFLOOR_02:
|
||||
@@ -659,7 +649,10 @@ class instance_ulduar : public InstanceMapScript
|
||||
case BOSS_IGNIS:
|
||||
case BOSS_RAZORSCALE:
|
||||
case BOSS_XT002:
|
||||
case BOSS_ASSEMBLY_OF_IRON:
|
||||
case BOSS_AURIAYA:
|
||||
case BOSS_VEZAX:
|
||||
case BOSS_YOGG_SARON:
|
||||
break;
|
||||
case BOSS_MIMIRON:
|
||||
if (state == DONE)
|
||||
@@ -669,16 +662,6 @@ class instance_ulduar : public InstanceMapScript
|
||||
if (state == DONE)
|
||||
instance->SummonCreature(NPC_FREYA_OBSERVATION_RING, ObservationRingKeepersPos[0]);
|
||||
break;
|
||||
case BOSS_ASSEMBLY_OF_IRON:
|
||||
if (state == DONE)
|
||||
HandleGameObject(ArchivumDoorGUID, true);
|
||||
break;
|
||||
case BOSS_VEZAX:
|
||||
if (state == DONE)
|
||||
HandleGameObject(VezaxDoorGUID, true);
|
||||
break;
|
||||
case BOSS_YOGG_SARON:
|
||||
break;
|
||||
case BOSS_KOLOGARN:
|
||||
if (state == DONE)
|
||||
{
|
||||
@@ -698,8 +681,6 @@ class instance_ulduar : public InstanceMapScript
|
||||
HodirRareCache->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
if (GameObject* HodirChest = instance->GetGameObject(HodirChestGUID))
|
||||
HodirChest->SetRespawnTime(HodirChest->GetRespawnDelay());
|
||||
HandleGameObject(HodirDoorGUID, true);
|
||||
HandleGameObject(HodirIceDoorGUID, true);
|
||||
|
||||
instance->SummonCreature(NPC_HODIR_OBSERVATION_RING, ObservationRingKeepersPos[1]);
|
||||
}
|
||||
|
||||
@@ -166,29 +166,46 @@ enum UlduarNPCs
|
||||
|
||||
enum UlduarGameObjects
|
||||
{
|
||||
GO_KOLOGARN_CHEST_HERO = 195047,
|
||||
GO_KOLOGARN_CHEST = 195046,
|
||||
GO_KOLOGARN_BRIDGE = 194232,
|
||||
GO_KOLOGARN_DOOR = 194553,
|
||||
GO_THORIM_CHEST_HERO = 194315,
|
||||
GO_THORIM_CHEST = 194314,
|
||||
GO_HODIR_RARE_CACHE_OF_WINTER = 194200,
|
||||
GO_HODIR_RARE_CACHE_OF_WINTER_HERO = 194201,
|
||||
GO_HODIR_CHEST_HERO = 194308,
|
||||
GO_HODIR_CHEST = 194307,
|
||||
// Leviathan
|
||||
GO_LEVIATHAN_DOOR = 194905,
|
||||
GO_LEVIATHAN_GATE = 194630,
|
||||
GO_XT_002_DOOR = 194631,
|
||||
GO_VEZAX_DOOR = 194750,
|
||||
|
||||
// Razorscale
|
||||
GO_MOLE_MACHINE = 194316,
|
||||
GO_RAZOR_HARPOON_1 = 194542,
|
||||
GO_RAZOR_HARPOON_2 = 194541,
|
||||
GO_RAZOR_HARPOON_3 = 194543,
|
||||
GO_RAZOR_HARPOON_4 = 194519,
|
||||
GO_RAZOR_BROKEN_HARPOON = 194565,
|
||||
|
||||
// XT-002
|
||||
GO_XT_002_DOOR = 194631,
|
||||
|
||||
// Assembly of Iron
|
||||
GO_IRON_COUNCIL_DOOR = 194554,
|
||||
GO_ARCHIVUM_DOOR = 194556,
|
||||
|
||||
// Kologarn
|
||||
GO_KOLOGARN_CHEST_HERO = 195047,
|
||||
GO_KOLOGARN_CHEST = 195046,
|
||||
GO_KOLOGARN_BRIDGE = 194232,
|
||||
GO_KOLOGARN_DOOR = 194553,
|
||||
|
||||
// Hodir
|
||||
GO_HODIR_ENTRANCE = 194442,
|
||||
GO_HODIR_DOOR = 194634,
|
||||
GO_HODIR_ICE_DOOR = 194441,
|
||||
GO_ARCHIVUM_DOOR = 194556,
|
||||
GO_HODIR_RARE_CACHE_OF_WINTER = 194200,
|
||||
GO_HODIR_RARE_CACHE_OF_WINTER_HERO = 194201,
|
||||
GO_HODIR_CHEST_HERO = 194308,
|
||||
GO_HODIR_CHEST = 194307,
|
||||
|
||||
// Thorim
|
||||
GO_THORIM_CHEST_HERO = 194315,
|
||||
GO_THORIM_CHEST = 194314,
|
||||
|
||||
// Vezax
|
||||
GO_VEZAX_DOOR = 194750,
|
||||
|
||||
// Yogg-Saron
|
||||
GO_YOGG_SARON_DOOR = 194773,
|
||||
@@ -327,26 +344,10 @@ enum YoggSaronIllusions
|
||||
STORMWIND_ILLUSION = 2,
|
||||
};
|
||||
|
||||
template<class AI>
|
||||
CreatureAI* GetUlduarAI(Creature* creature)
|
||||
template<class AI, class T>
|
||||
AI* GetUlduarAI(T* obj)
|
||||
{
|
||||
if (InstanceMap* instance = creature->GetMap()->ToInstanceMap())
|
||||
if (instance->GetInstanceScript())
|
||||
if (instance->GetScriptId() == sObjectMgr->GetScriptId(UlduarScriptName))
|
||||
return new AI(creature);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
template<class AI>
|
||||
GameObjectAI* GetUlduarAI(GameObject* go)
|
||||
{
|
||||
if (InstanceMap* instance = go->GetMap()->ToInstanceMap())
|
||||
if (instance->GetInstanceScript())
|
||||
if (instance->GetScriptId() == sObjectMgr->GetScriptId(UlduarScriptName))
|
||||
return new AI(go);
|
||||
|
||||
return NULL;
|
||||
return GetInstanceAI<AI, T>(obj, UlduarScriptName);
|
||||
}
|
||||
|
||||
class PlayerOrPetCheck
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "ulduar.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Player.h"
|
||||
#include "ulduar.h"
|
||||
|
||||
/*
|
||||
The teleporter appears to be active and stable.
|
||||
|
||||
@@ -753,7 +753,6 @@ public:
|
||||
bool Drained;
|
||||
uint8 WeakPercent;
|
||||
|
||||
Player* player;
|
||||
uint64 PlayerGUID;
|
||||
|
||||
uint32 ManaBurnTimer;
|
||||
|
||||
@@ -103,10 +103,11 @@ public:
|
||||
ACE_Based::Thread::Sleep(1000);
|
||||
uint32 curtime = getMSTime();
|
||||
// normal work
|
||||
if (_loops != World::m_worldLoopCounter)
|
||||
uint32 worldLoopCounter = World::m_worldLoopCounter.value();
|
||||
if (_loops != worldLoopCounter)
|
||||
{
|
||||
_lastChange = curtime;
|
||||
_loops = World::m_worldLoopCounter;
|
||||
_loops = worldLoopCounter;
|
||||
}
|
||||
// possible freeze
|
||||
else if (getMSTimeDiff(_lastChange, curtime) > _delaytime)
|
||||
|
||||
Reference in New Issue
Block a user