aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/characters/2012_12_18_00_character_worldstates.sql4
-rw-r--r--sql/updates/world/2012_12_07_00_world_script_texts.sql2
-rw-r--r--sql/updates/world/2012_12_15_00_world_waypoint_data.sql344
-rw-r--r--sql/updates/world/2012_12_15_01_world_sai.sql95
-rw-r--r--sql/updates/world/2012_12_15_02_world_sai.sql40
-rw-r--r--sql/updates/world/2012_12_15_03_world_quest_end_scripts.sql8
-rw-r--r--sql/updates/world/2012_12_16_00_world_creature_addon.sql5
-rw-r--r--sql/updates/world/2012_12_16_01_world_npc_vendor.sql10
-rw-r--r--sql/updates/world/2012_12_16_02_world_creature_text.sql186
-rw-r--r--sql/updates/world/2012_12_16_03_world_sai.sql34
-rw-r--r--sql/updates/world/2012_12_17_00_world_creature_template.sql2
-rw-r--r--sql/updates/world/2012_12_17_00_world_song_of_wind_and_water.sql38
-rw-r--r--sql/updates/world/2012_12_17_00_world_spell_linked_spell.sql4
-rw-r--r--sql/updates/world/2012_12_18_00_world_creature_text.sql5
-rw-r--r--sql/updates/world/2012_12_18_00_world_waking_the_sleeper.sql47
-rw-r--r--sql/updates/world/2012_12_18_01_world_creature_text.sql75
-rw-r--r--sql/updates/world/2012_12_18_02_world_misc.sql14
-rw-r--r--sql/updates/world/2012_12_18_02_world_sai.sql47
-rw-r--r--sql/updates/world/2012_12_19_00_world_sai.sql106
-rw-r--r--sql/updates/world/2012_12_19_01_world_viscidus.sql11
-rw-r--r--sql/updates/world/2012_12_19_02_world_sai.sql19
-rw-r--r--sql/updates/world/2012_12_20_00_world_conditions.sql3
-rw-r--r--sql/updates/world/2012_12_20_01_world_conditions.sql3
-rw-r--r--src/server/game/AI/CoreAI/PetAI.cpp16
-rw-r--r--src/server/game/AI/CoreAI/UnitAI.h11
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.cpp4
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp10
-rw-r--r--src/server/game/Entities/Player/Player.cpp134
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp89
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp5
-rw-r--r--src/server/game/Movement/MotionMaster.cpp4
-rw-r--r--src/server/game/Scripting/ScriptLoader.cpp2
-rw-r--r--src/server/game/Scripting/ScriptMgr.cpp107
-rw-r--r--src/server/game/Scripting/ScriptMgr.h29
-rw-r--r--src/server/game/Scripting/ScriptSystem.cpp122
-rw-r--r--src/server/game/Scripting/ScriptSystem.h24
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp3
-rw-r--r--src/server/game/Tools/CharacterDatabaseCleaner.cpp5
-rw-r--r--src/server/game/World/World.h3
-rw-r--r--src/server/scripts/Commands/cs_account.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp9
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp10
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp2
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp4
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp32
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp20
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp296
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp141
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h52
-rw-r--r--src/server/scripts/Kalimdor/moonglade.cpp52
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp30
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp6
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp12
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h8
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp6
-rw-r--r--src/server/scripts/Northrend/sholazar_basin.cpp52
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp14
-rw-r--r--src/server/scripts/Spells/spell_holiday.cpp65
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp2
-rw-r--r--src/server/scripts/World/npc_professions.cpp4
-rw-r--r--src/server/scripts/World/npcs_special.cpp44
61 files changed, 1982 insertions, 555 deletions
diff --git a/sql/updates/characters/2012_12_18_00_character_worldstates.sql b/sql/updates/characters/2012_12_18_00_character_worldstates.sql
new file mode 100644
index 00000000000..98fabde6776
--- /dev/null
+++ b/sql/updates/characters/2012_12_18_00_character_worldstates.sql
@@ -0,0 +1,4 @@
+DELETE FROM `worldstates` WHERE `entry` IN (20004,20007);
+INSERT INTO `worldstates` (`entry`, `value`, `comment`) VALUES
+(20004,0,'CleaningFlags'),
+(20007,0,'NextMonthlyQuestResetTime');
diff --git a/sql/updates/world/2012_12_07_00_world_script_texts.sql b/sql/updates/world/2012_12_07_00_world_script_texts.sql
new file mode 100644
index 00000000000..b1362aac796
--- /dev/null
+++ b/sql/updates/world/2012_12_07_00_world_script_texts.sql
@@ -0,0 +1,2 @@
+DROP TABLE IF EXISTS `script_texts`;
+DROP TABLE IF EXISTS `custom_texts`;
diff --git a/sql/updates/world/2012_12_15_00_world_waypoint_data.sql b/sql/updates/world/2012_12_15_00_world_waypoint_data.sql
new file mode 100644
index 00000000000..c63180ebe5e
--- /dev/null
+++ b/sql/updates/world/2012_12_15_00_world_waypoint_data.sql
@@ -0,0 +1,344 @@
+-- Issue 8629: Formation for alliance elites pathing in Barrens
+-- place 4 alliance elites in formation (guids 15145, 15246, 15169, 17433)
+-- they were not in a formation, but had the same path. This would
+-- cause them to be on top of each other rather than in a proper formation
+DELETE FROM `creature_formations` WHERE `memberGUID` IN (15145,15169,15246,17433);
+INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`) VALUES
+(15145,15145,0, 0,2),
+(15145,15169,4, 30,2),
+(15145,15246,4,330,2),
+(15145,17433,7, 0,2);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8630: Lady Vespia in Ashenvale - pathing
+-- this is a rare lacking its path, and instead there is a duplicate
+-- spawn in another location along the path
+-- Path for Lady Vespia #32384, remove duplicate #51887
+DELETE FROM `creature` WHERE `guid` = 51887;
+UPDATE `creature` SET `MovementType`=2,`position_x`=3722.429932,`position_y`=913.771790,`position_z`=1.002714,`currentwaypoint`=1 WHERE `guid` = 32384;
+UPDATE `creature_addon` SET `path_id` = 323840 WHERE `guid` = 32384;
+DELETE FROM `waypoint_data` WHERE `id`=323840;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(323840,1,3722.429932,913.771790,1.002714,0,0,0,0,100,0),
+(323840,2,3732.029053,904.330933,0.968114,0,0,0,0,100,0),
+(323840,3,3739.736328,895.524353,0.758106,0,0,0,0,100,0),
+(323840,4,3750.789551,880.084534,0.366120,0,0,0,0,100,0),
+(323840,5,3758.787354,867.507263,0.679295,0,0,0,0,100,0),
+(323840,6,3767.161865,856.288452,0.976484,0,0,0,0,100,0),
+(323840,7,3782.519043,843.848511,0.968118,0,0,0,0,100,0),
+(323840,8,3795.712402,840.702026,1.675440,0,0,0,0,100,0),
+(323840,9,3808.054688,838.972107,0.956729,0,0,0,0,100,0),
+(323840,10,3829.029541,839.984436,0.967158,0,0,0,0,100,0),
+(323840,11,3843.008545,840.750061,1.186359,0,0,0,0,100,0),
+(323840,12,3868.521484,844.503845,1.141360,0,0,0,0,100,0),
+(323840,13,3876.150635,850.337830,1.755279,0,0,0,0,100,0),
+(323840,14,3881.138672,864.115845,1.310831,0,0,0,0,100,0),
+(323840,15,3888.653076,865.323853,1.378022,0,0,0,0,100,0),
+(323840,16,3906.875488,866.120544,1.134151,0,0,0,0,100,0),
+(323840,17,3953.089355,864.282104,0.148911,0,0,0,0,100,0),
+(323840,18,3983.302734,857.571228,1.046788,0,0,0,0,100,0),
+(323840,19,4000.202637,860.725830,1.170438,0,0,0,0,100,0),
+(323840,20,4014.436035,868.470032,0.720758,0,0,0,0,100,0),
+(323840,21,4027.739258,883.203796,0.801679,0,0,0,0,100,0),
+(323840,22,4040.634277,896.320435,0.261184,0,0,0,0,100,0),
+(323840,23,4053.570068,909.003784,1.512342,0,0,0,0,100,0),
+(323840,24,4065.364258,911.439880,3.647654,0,0,0,0,100,0),
+(323840,25,4077.339111,909.210083,5.332397,0,0,0,0,100,0),
+(323840,26,4089.094971,903.189575,5.971728,0,0,0,0,100,0),
+(323840,27,4097.356934,901.196777,7.080781,0,0,0,0,100,0),
+(323840,28,4113.481934,897.701721,9.812309,0,0,0,0,100,0),
+(323840,29,4117.061035,886.646057,9.757087,0,0,0,0,100,0),
+(323840,30,4117.483887,870.737488,9.815219,0,0,0,0,100,0),
+(323840,31,4126.461426,866.358765,9.707480,0,0,0,0,100,0),
+(323840,32,4133.693359,864.304565,6.785762,0,0,0,0,100,0),
+(323840,33,4146.947754,861.233643,4.078417,0,0,0,0,100,0),
+(323840,34,4150.838867,864.035461,4.078417,0,0,0,0,100,0),
+(323840,35,4155.389160,871.403625,4.082621,0,0,0,0,100,0),
+(323840,36,4157.450684,877.767944,1.504079,0,0,0,0,100,0),
+(323840,37,4159.562012,886.388184,-1.458823,0,0,0,0,100,0),
+(323840,38,4157.624023,893.779236,-1.453992,0,0,0,0,100,0),
+(323840,39,4152.749512,898.931580,-1.453427,0,0,0,0,100,0),
+(323840,40,4147.643066,900.963562,-2.476280,0,0,0,0,100,0),
+(323840,41,4141.217773,902.808472,-5.821361,0,0,0,0,100,0),
+(323840,42,4135.142578,904.172913,-7.009238,0,0,0,0,100,0),
+(323840,43,4126.201660,900.406006,-7.008872,0,0,0,0,100,0),
+(323840,44,4123.505371,895.362976,-7.064267,0,0,0,0,100,0),
+(323840,45,4121.024902,888.352173,-10.009289,0,0,0,0,100,0),
+(323840,46,4118.931641,881.739380,-12.623049,0,0,0,0,100,0),
+(323840,47,4118.696777,874.418152,-12.563630,0,0,0,0,100,0),
+(323840,48,4124.143555,869.048279,-12.563630,0,0,0,0,100,0),
+(323840,49,4131.265625,865.740540,-14.077361,0,0,0,0,100,0),
+(323840,50,4127.223633,866.879333,-12.562355,0,0,0,0,100,0),
+(323840,51,4122.481445,869.654541,-12.562355,0,0,0,0,100,0),
+(323840,52,4117.991699,876.805542,-12.562355,0,0,0,0,100,0),
+(323840,53,4119.471191,886.473083,-11.126961,0,0,0,0,100,0),
+(323840,54,4121.210449,893.253479,-7.626825,0,0,0,0,100,0),
+(323840,55,4124.160645,900.132507,-7.007569,0,0,0,0,100,0),
+(323840,56,4129.967773,902.294678,-7.007569,0,0,0,0,100,0),
+(323840,57,4137.781738,903.702820,-7.009012,0,0,0,0,100,0),
+(323840,58,4143.771973,902.754822,-4.585012,0,0,0,0,100,0),
+(323840,59,4148.363281,901.231506,-2.167897,0,0,0,0,100,0),
+(323840,60,4155.444336,896.501953,-1.451832,0,0,0,0,100,0),
+(323840,61,4159.376465,886.155151,-1.458028,0,0,0,0,100,0),
+(323840,62,4158.670410,882.022095,-0.702407,0,0,0,0,100,0),
+(323840,63,4156.946777,875.238770,2.786326,0,0,0,0,100,0),
+(323840,64,4153.635254,865.145325,4.079946,0,0,0,0,100,0),
+(323840,65,4149.276855,863.342407,4.079946,0,0,0,0,100,0),
+(323840,66,4142.281250,863.443237,4.083534,0,0,0,0,100,0),
+(323840,67,4135.520996,863.820129,5.832601,0,0,0,0,100,0),
+(323840,68,4128.327637,866.176208,9.616565,0,0,0,0,100,0),
+(323840,69,4124.060059,869.521179,9.798268,0,0,0,0,100,0),
+(323840,70,4117.504883,877.208740,9.773583,0,0,0,0,100,0),
+(323840,71,4113.075195,883.248596,9.811710,0,0,0,0,100,0),
+(323840,72,4108.947754,885.473511,9.811710,0,0,0,0,100,0),
+(323840,73,4101.364258,894.021057,9.506009,0,0,0,0,100,0),
+(323840,74,4099.205566,901.251709,7.480323,0,0,0,0,100,0),
+(323840,75,4094.037109,900.019409,6.555405,0,0,0,0,100,0),
+(323840,76,4080.265869,902.525269,4.844516,0,0,0,0,100,0),
+(323840,77,4066.643311,905.211365,2.676093,0,0,0,0,100,0),
+(323840,78,4052.042480,900.388977,-0.015366,0,0,0,0,100,0),
+(323840,79,4036.894531,889.341431,0.380059,0,0,0,0,100,0),
+(323840,80,4015.933838,874.014709,0.399262,0,0,0,0,100,0),
+(323840,81,3996.318604,866.858826,1.082657,0,0,0,0,100,0),
+(323840,82,3960.317871,860.775940,0.167445,0,0,0,0,100,0),
+(323840,83,3952.938965,863.003601,0.241122,0,0,0,0,100,0),
+(323840,84,3940.339355,865.996704,0.925124,0,0,0,0,100,0),
+(323840,85,3919.454590,868.036560,1.203346,0,0,0,0,100,0),
+(323840,86,3898.702881,867.625793,1.277368,0,0,0,0,100,0),
+(323840,87,3881.742432,862.045654,1.276057,0,0,0,0,100,0),
+(323840,88,3877.997314,857.874329,1.554000,0,0,0,0,100,0),
+(323840,89,3874.550537,851.784485,1.574687,0,0,0,0,100,0),
+(323840,90,3867.740479,841.904846,1.197731,0,0,0,0,100,0),
+(323840,91,3851.134277,838.354553,0.993947,0,0,0,0,100,0),
+(323840,92,3809.334961,842.445557,0.796721,0,0,0,0,100,0),
+(323840,93,3781.462158,845.068787,0.967946,0,0,0,0,100,0),
+(323840,94,3770.630859,851.672424,0.967075,0,0,0,0,100,0),
+(323840,95,3759.555664,863.323792,0.992520,0,0,0,0,100,0),
+(323840,96,3739.665527,892.069092,0.734760,0,0,0,0,100,0),
+(323840,97,3729.475098,910.430786,0.967810,0,0,0,0,100,0),
+(323840,98,3716.260742,916.782471,1.253238,0,0,0,0,100,0),
+(323840,99,3705.518555,923.451660,1.566365,0,0,0,0,100,0),
+(323840,100,3693.323730,935.196167,3.147308,0,0,0,0,100,0),
+(323840,101,3682.386230,953.076477,1.517186,0,0,0,0,100,0),
+(323840,102,3675.434082,967.510315,2.468625,0,0,0,0,100,0),
+(323840,103,3677.183594,984.396912,0.705175,0,0,0,0,100,0);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8631: Prince Raze in Ashenvale - pathing
+-- this is a rare lacking its path,and instead there is a duplicate
+-- spawn in another location along the path
+-- Path for Prince Raze #32914,remove duplicate #51863
+DELETE FROM `creature` WHERE `guid` = 51863;
+UPDATE `creature` SET `MovementType`=2,`position_x`=2808.241455,`position_y`=-3003.126709,`position_z`=157.067291,`currentwaypoint`=1 WHERE `guid` = 32914;
+UPDATE `creature_addon` SET `path_id` = 329140 WHERE `guid` = 32914;
+DELETE FROM `waypoint_data` WHERE `id`=329140;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(329140,1,2808.241455,-3003.126709,157.067291,0,0,0,0,100,0),
+(329140,2,2811.392090,-2991.734619,155.334320,0,0,0,0,100,0),
+(329140,3,2808.639160,-2972.097412,155.101013,0,0,0,0,100,0),
+(329140,4,2804.842773,-2959.183350,152.490417,0,0,0,0,100,0),
+(329140,5,2805.551270,-2938.301270,154.462799,0,0,0,0,100,0),
+(329140,6,2814.461182,-2921.440918,163.474411,0,0,0,0,100,0),
+(329140,7,2818.510498,-2918.647461,166.685257,0,0,0,0,100,0),
+(329140,8,2840.341797,-2914.930176,183.502121,0,0,0,0,100,0),
+(329140,9,2854.309326,-2914.024170,192.161575,0,0,0,0,100,0),
+(329140,10,2871.512939,-2911.204834,198.770233,0,0,0,0,100,0),
+(329140,11,2882.424561,-2903.183594,201.184616,0,0,0,0,100,0),
+(329140,12,2888.192871,-2886.370850,203.285019,0,0,0,0,100,0),
+(329140,13,2892.449463,-2865.810547,203.822342,0,0,0,0,100,0),
+(329140,14,2898.969971,-2852.818848,207.158493,0,0,0,0,100,0),
+(329140,15,2908.747559,-2844.036377,209.318665,0,0,0,0,100,0),
+(329140,16,2926.231689,-2833.183350,211.338501,0,0,0,0,100,0),
+(329140,17,2943.589355,-2830.331543,212.665710,0,0,0,0,100,0),
+(329140,18,2953.075439,-2824.161621,212.613983,0,0,0,0,100,0),
+(329140,19,2964.846191,-2820.930420,211.645081,0,0,0,0,100,0),
+(329140,20,2978.736084,-2819.183350,209.463913,0,0,0,0,100,0),
+(329140,21,3001.006836,-2818.457031,206.082977,0,0,0,0,100,0),
+(329140,22,3022.530762,-2814.136230,203.552109,0,0,0,0,100,0),
+(329140,23,3035.244629,-2811.006836,198.437698,0,0,0,0,100,0),
+(329140,24,3040.000488,-2799.580811,195.965454,0,0,0,0,100,0),
+(329140,25,3035.478760,-2809.662354,198.041458,0,0,0,0,100,0),
+(329140,26,3024.454102,-2819.712158,202.394180,0,0,0,0,100,0),
+(329140,27,3006.513916,-2818.985107,205.280838,0,0,0,0,100,0),
+(329140,28,2984.259277,-2818.399902,209.399185,0,0,0,0,100,0),
+(329140,29,2970.594238,-2821.382324,210.345764,0,0,0,0,100,0),
+(329140,30,2952.682373,-2822.796875,212.661163,0,0,0,0,100,0),
+(329140,31,2942.465332,-2830.031982,212.665604,0,0,0,0,100,0),
+(329140,32,2930.226318,-2831.118164,211.663055,0,0,0,0,100,0),
+(329140,33,2915.546875,-2835.999512,209.535995,0,0,0,0,100,0),
+(329140,34,2904.552246,-2845.870850,208.518188,0,0,0,0,100,0),
+(329140,35,2889.942871,-2865.736084,203.493179,0,0,0,0,100,0),
+(329140,36,2887.777344,-2881.864746,203.374954,0,0,0,0,100,0),
+(329140,37,2884.007080,-2899.519775,202.008667,0,0,0,0,100,0),
+(329140,38,2875.229492,-2911.850098,199.338211,0,0,0,0,100,0),
+(329140,39,2862.768311,-2914.375977,196.399612,0,0,0,0,100,0),
+(329140,40,2850.098877,-2914.262207,189.543320,0,0,0,0,100,0),
+(329140,41,2843.341309,-2912.349365,185.238174,0,0,0,0,100,0),
+(329140,42,2829.395752,-2911.120605,175.736130,0,0,0,0,100,0),
+(329140,43,2818.509521,-2910.984131,166.842010,0,0,0,0,100,0),
+(329140,44,2808.092773,-2915.233643,159.118347,0,0,0,0,100,0),
+(329140,45,2804.951660,-2931.008545,155.843887,0,0,0,0,100,0),
+(329140,46,2806.345703,-2945.017822,154.086060,0,0,0,0,100,0),
+(329140,47,2807.287842,-2956.843994,153.169250,0,0,0,0,100,0),
+(329140,48,2807.587891,-2963.081055,153.936203,0,0,0,0,100,0),
+(329140,49,2808.624512,-2969.800537,155.047455,0,0,0,0,100,0),
+(329140,50,2813.630615,-2989.589600,155.539047,0,0,0,0,100,0),
+(329140,51,2810.635986,-2998.342529,156.787384,0,0,0,0,100,0);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8632: Rorgis Jowl in Ashenvale - pathing
+-- Path for Rorgis Jowl #32869
+UPDATE `creature` SET `MovementType`=2,`position_x`=3265.909912,`position_y`=-365.719818,`position_z`=153.103470,`currentwaypoint`=1 WHERE `guid` = 32869;
+UPDATE `creature_addon` SET `path_id` = 328690 WHERE `guid` = 32869;
+DELETE FROM `waypoint_data` WHERE `id`=328690;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(328690,1,3265.909912,-365.719818,153.103470,0,0,0,0,100,0),
+(328690,2,3273.110840,-371.723724,152.879028,0,0,0,0,100,0),
+(328690,3,3278.832275,-382.906128,152.523438,0,0,0,0,100,0),
+(328690,4,3290.602295,-408.267151,150.345276,0,0,0,0,100,0),
+(328690,5,3307.686523,-430.401825,149.835861,0,0,0,0,100,0),
+(328690,6,3320.117676,-447.278168,150.562851,0,0,0,0,100,0),
+(328690,7,3336.108154,-470.102722,153.994934,0,0,0,0,100,0),
+(328690,8,3347.987305,-480.422211,154.224228,0,0,0,0,100,0),
+(328690,9,3358.450439,-476.938568,154.218155,0,0,0,0,100,0),
+(328690,10,3365.435547,-464.821289,154.220810,0,0,0,0,100,0),
+(328690,11,3370.219482,-452.802338,153.902512,0,0,0,0,100,0),
+(328690,12,3384.146973,-428.400848,149.321747,0,0,0,0,100,0),
+(328690,13,3392.826660,-417.417175,146.746826,0,0,0,0,100,0),
+(328690,14,3405.046387,-403.259644,143.910614,0,0,0,0,100,0),
+(328690,15,3421.904541,-390.824982,139.321136,0,0,0,0,100,0),
+(328690,16,3434.331055,-384.391785,135.793793,0,0,0,0,100,0),
+(328690,17,3447.364990,-378.007141,135.662186,0,0,0,0,100,0),
+(328690,18,3434.159668,-382.636597,135.496231,0,0,0,0,100,0),
+(328690,19,3421.415283,-388.368469,138.450043,0,0,0,0,100,0),
+(328690,20,3404.063721,-400.144897,143.263397,0,0,0,0,100,0),
+(328690,21,3390.340332,-412.986176,145.812714,0,0,0,0,100,0),
+(328690,22,3377.259033,-421.769073,148.559967,0,0,0,0,100,0),
+(328690,23,3362.353027,-430.288391,151.450409,0,0,0,0,100,0),
+(328690,24,3349.057861,-433.942139,151.799011,0,0,0,0,100,0),
+(328690,25,3333.835205,-433.346802,150.422485,0,0,0,0,100,0),
+(328690,26,3318.930664,-428.625763,149.402405,0,0,0,0,100,0),
+(328690,27,3307.989014,-420.835663,149.473190,0,0,0,0,100,0),
+(328690,28,3293.188721,-405.975098,150.441910,0,0,0,0,100,0),
+(328690,29,3284.596191,-394.927856,151.113251,0,0,0,0,100,0),
+(328690,30,3275.517822,-378.112610,152.894287,0,0,0,0,100,0),
+(328690,31,3269.427979,-368.935364,153.063339,0,0,0,0,100,0);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8633: Branch Snapper in Ashenvale - pathing
+-- Path for Branch Snapper #51882
+UPDATE `creature` SET `MovementType`=2,`position_x`=2971.350098,`position_y`=-982.097900,`position_z`=198.683380,`currentwaypoint`=1 WHERE `guid` = 51882;
+DELETE FROM `creature_addon` WHERE `guid` = 51882;
+INSERT INTO `creature_addon` (`guid`,`path_id`) VALUES (51882,518820);
+DELETE FROM `waypoint_data` WHERE `id`=518820;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(518820,1,2971.350098,-982.097900,198.683380,0,0,0,0,100,0),
+(518820,2,2971.690918,-962.483948,198.426682,0,0,0,0,100,0),
+(518820,3,2968.384521,-941.765564,200.709015,0,0,0,0,100,0),
+(518820,4,2965.152344,-928.147766,198.484497,0,0,0,0,100,0),
+(518820,5,2952.836670,-910.756836,197.443298,0,0,0,0,100,0),
+(518820,6,2938.869141,-905.128601,197.099640,0,0,0,0,100,0),
+(518820,7,2919.632568,-903.527100,198.155716,0,0,0,0,100,0),
+(518820,8,2903.414307,-903.434143,197.123611,0,0,0,0,100,0),
+(518820,9,2885.066162,-906.786804,197.560242,0,0,0,0,100,0),
+(518820,10,2867.496582,-918.221313,198.913681,0,0,0,0,100,0),
+(518820,11,2856.638184,-927.044983,199.210022,0,0,0,0,100,0),
+(518820,12,2840.306152,-940.243774,198.580444,0,0,0,0,100,0),
+(518820,13,2819.923340,-952.546692,196.251236,0,0,0,0,100,0),
+(518820,14,2812.915527,-966.389648,195.477539,0,0,0,0,100,0),
+(518820,15,2813.452637,-983.662659,197.860260,0,0,0,0,100,0),
+(518820,16,2821.784180,-1002.938599,197.072479,0,0,0,0,100,0),
+(518820,17,2830.527100,-1018.294495,198.959946,0,0,0,0,100,0),
+(518820,18,2839.100586,-1026.947266,197.751938,0,0,0,0,100,0),
+(518820,19,2862.386719,-1035.757080,197.902298,0,0,0,0,100,0),
+(518820,20,2876.326660,-1037.055908,198.182755,0,0,0,0,100,0),
+(518820,21,2897.217041,-1039.198364,198.248016,0,0,0,0,100,0),
+(518820,22,2911.110352,-1040.886230,197.331467,0,0,0,0,100,0),
+(518820,23,2934.677002,-1045.407104,196.986130,0,0,0,0,100,0),
+(518820,24,2946.637451,-1040.841553,197.254547,0,0,0,0,100,0),
+(518820,25,2958.366455,-1029.786133,197.856155,0,0,0,0,100,0),
+(518820,26,2968.661621,-1011.250610,197.917145,0,0,0,0,100,0);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8634: Akkrilus in Ashenvale - pathing
+-- Path for Akkrilus #51883
+UPDATE `creature` SET `MovementType`=2,`position_x`=2230.626221,`position_y`=222.503265,`position_z`=134.671127,`currentwaypoint`=1 WHERE `guid` = 51883;
+DELETE FROM `creature_addon` WHERE `guid` = 51883;
+INSERT INTO `creature_addon` (`guid`,`path_id`) VALUES (51883,518830);
+DELETE FROM `waypoint_data` WHERE `id`=518830;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(518830,1,2230.626221,222.503265,134.671127,0,0,0,0,100,0),
+(518830,2,2224.842773,204.381668,131.745773,0,0,0,0,100,0),
+(518830,3,2224.397461,186.195084,128.542633,0,0,0,0,100,0),
+(518830,4,2224.783691,165.252151,121.905479,0,0,0,0,100,0),
+(518830,5,2228.541992,144.604492,115.583405,0,0,0,0,100,0),
+(518830,6,2234.316162,129.033264,110.983452,0,0,0,0,100,0),
+(518830,7,2246.995850,104.069115,105.569809,0,0,0,0,100,0),
+(518830,8,2259.200195,85.328667,102.283875,0,0,0,0,100,0),
+(518830,9,2272.217529,73.944885,99.108376,0,0,0,0,100,0),
+(518830,10,2289.473145,65.154480,96.752800,0,0,0,0,100,0),
+(518830,11,2303.842529,63.234364,95.158028,0,0,0,0,100,0),
+(518830,12,2324.819580,62.301811,92.302200,0,0,0,0,100,0),
+(518830,13,2315.044678,61.647449,94.050667,0,0,0,0,100,0),
+(518830,14,2294.266602,64.414993,96.811752,0,0,0,0,100,0),
+(518830,15,2274.864502,73.553665,98.970840,0,0,0,0,100,0),
+(518830,16,2262.320557,85.840591,101.911362,0,0,0,0,100,0),
+(518830,17,2251.133057,95.907051,104.024017,0,0,0,0,100,0),
+(518830,18,2236.551025,110.107979,108.169083,0,0,0,0,100,0),
+(518830,19,2227.548340,124.708336,110.385513,0,0,0,0,100,0),
+(518830,20,2222.801758,143.517090,116.077888,0,0,0,0,100,0),
+(518830,21,2219.976563,164.319946,122.124672,0,0,0,0,100,0),
+(518830,22,2218.412598,184.548325,128.981644,0,0,0,0,100,0),
+(518830,23,2219.249023,198.518890,131.665329,0,0,0,0,100,0),
+(518830,24,2220.353516,219.485901,133.995987,0,0,0,0,100,0),
+(518830,25,2222.075684,244.729797,134.205353,0,0,0,0,100,0),
+(518830,26,2224.536377,261.256378,134.331970,0,0,0,0,100,0),
+(518830,27,2229.941895,281.548462,133.522369,0,0,0,0,100,0),
+(518830,28,2236.282471,301.551971,133.194031,0,0,0,0,100,0),
+(518830,29,2240.797363,314.802246,133.413681,0,0,0,0,100,0),
+(518830,30,2246.947021,334.861572,130.498993,0,0,0,0,100,0),
+(518830,31,2252.275635,347.803162,129.387589,0,0,0,0,100,0),
+(518830,32,2261.552246,366.643127,129.971725,0,0,0,0,100,0),
+(518830,33,2270.846436,385.474365,129.803040,0,0,0,0,100,0),
+(518830,34,2280.354004,399.463409,130.359802,0,0,0,0,100,0),
+(518830,35,2293.543945,412.130554,130.348328,0,0,0,0,100,0),
+(518830,36,2304.319580,421.066528,129.609512,0,0,0,0,100,0),
+(518830,37,2321.469482,433.147339,128.849838,0,0,0,0,100,0),
+(518830,38,2336.443604,441.356476,123.324211,0,0,0,0,100,0),
+(518830,39,2355.435059,450.315521,116.676407,0,0,0,0,100,0),
+(518830,40,2365.592285,455.130249,114.194473,0,0,0,0,100,0),
+(518830,41,2353.159180,449.219360,117.543526,0,0,0,0,100,0),
+(518830,42,2340.275391,443.741028,122.071327,0,0,0,0,100,0),
+(518830,43,2327.483887,438.059875,126.869530,0,0,0,0,100,0),
+(518830,44,2310.080078,428.210297,128.501328,0,0,0,0,100,0),
+(518830,45,2299.125244,419.506104,129.949829,0,0,0,0,100,0),
+(518830,46,2288.756104,410.103882,130.291275,0,0,0,0,100,0),
+(518830,47,2274.876221,394.387665,129.901978,0,0,0,0,100,0),
+(518830,48,2267.130615,382.738708,129.731949,0,0,0,0,100,0),
+(518830,49,2257.433350,364.646637,129.959579,0,0,0,0,100,0),
+(518830,50,2251.866943,351.801178,129.571732,0,0,0,0,100,0),
+(518830,51,2244.710938,332.076782,131.140259,0,0,0,0,100,0),
+(518830,52,2240.668945,318.680450,133.109680,0,0,0,0,100,0),
+(518830,53,2236.625977,305.276886,133.475372,0,0,0,0,100,0),
+(518830,54,2231.740234,284.870972,133.536728,0,0,0,0,100,0),
+(518830,55,2230.472412,271.257019,134.439743,0,0,0,0,100,0),
+(518830,56,2229.767334,252.587219,134.871262,0,0,0,0,100,0),
+(518830,57,2228.250000,238.221497,135.416504,0,0,0,0,100,0);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8635: Terrowulf Pack Lord in Ashenvale - pathing
+-- Path for Terrowulf Pack Lord #51870
+UPDATE `creature` SET `MovementType`=2,`position_x`=3150.399902,`position_y`=-1170.138062,`position_z`=217.299103,`currentwaypoint`=1 WHERE `guid` = 51870;
+DELETE FROM `creature_addon` WHERE `guid` = 51870;
+INSERT INTO `creature_addon` (`guid`,`path_id`) VALUES (51870,518700);
+DELETE FROM `waypoint_data` WHERE `id`=518700;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(518700,1,3150.399902,-1170.138062,217.299103,0,0,0,0,100,0),
+(518700,2,3150.364258,-1176.916138,217.212677,0,0,0,0,100,0),
+(518700,3,3151.549072,-1184.704468,216.956177,0,0,0,0,100,0),
+(518700,4,3154.039307,-1195.630127,216.413452,0,0,0,0,100,0),
+(518700,5,3157.339600,-1200.890625,215.839249,0,0,0,0,100,0),
+(518700,6,3162.611328,-1203.641479,215.186890,0,0,0,0,100,0),
+(518700,7,3167.498779,-1202.496216,214.795517,0,0,0,0,100,0),
+(518700,8,3169.949463,-1199.822632,214.695114,0,0,0,0,100,0),
+(518700,9,3174.424316,-1191.442871,214.546326,0,0,0,0,100,0),
+(518700,10,3176.167969,-1184.175903,214.374252,0,0,0,0,100,0),
+(518700,11,3175.641846,-1176.006592,214.256958,0,0,0,0,100,0),
+(518700,12,3170.866699,-1170.889526,214.670517,0,0,0,0,100,0),
+(518700,13,3165.246826,-1166.603638,215.211517,0,0,0,0,100,0),
+(518700,14,3156.909180,-1163.954956,216.297623,0,0,0,0,100,0);
+
diff --git a/sql/updates/world/2012_12_15_01_world_sai.sql b/sql/updates/world/2012_12_15_01_world_sai.sql
new file mode 100644
index 00000000000..6d43bedc446
--- /dev/null
+++ b/sql/updates/world/2012_12_15_01_world_sai.sql
@@ -0,0 +1,95 @@
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8644: EAI->SAI - Urom adds
+-- Convert EAI -> SAI and not sure, if I even changed something, but I checked and stuff were working correct (as of mechanics).
+SET @P_Murloc := 27649;
+SET @P_Cloudscraper := 27645;
+SET @P_Mammoth := 27642;
+SET @P_Wolf := 27644;
+SET @P_Air := 27650;
+SET @P_Water := 27653;
+SET @P_Fire := 27651;
+SET @P_Ogre := 27647;
+SET @P_Naga := 27648;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@P_Murloc,@P_Cloudscraper,@P_Mammoth,@P_Wolf,@P_Air,@P_Water,@P_Fire,@P_Ogre,@P_Naga);
+DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (@P_Murloc,@P_Cloudscraper,@P_Mammoth,@P_Wolf,@P_Air,@P_Water,@P_Fire,@P_Ogre,@P_Naga);
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (@P_Murloc,@P_Cloudscraper,@P_Mammoth,@P_Wolf,@P_Air,@P_Water,@P_Fire,@P_Ogre,@P_Naga);
+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
+(@P_Murloc,0,0,0,0,0,100,0,1000,3000,13000,16000,11,54074,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Murloc - IC - Cast poison'),
+(@P_Naga,0,0,0,0,0,100,2,9000,12000,13000,16000,11,50732,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Naga - IC /Normal/ - Cast Water Tomb'),
+(@P_Naga,0,1,0,0,0,100,4,9000,12000,13000,16000,11,59261,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Naga - IC /Heroic/ - Cast Water Tomb'),
+(@P_Naga,0,2,0,0,0,100,2,1000,3000,9000,12000,11,49711,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Phantasmal Naga - IC /Normal/ - Cast Water Tomb'),
+(@P_Naga,0,3,0,0,0,100,4,1000,3000,9000,12000,11,59260,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Phantasmal Naga - IC /Heroic/ - Cast Water Tomb'),
+(@P_Ogre,0,0,0,2,0,100,0,30,30,20000,24000,11,50730,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Ogre - On 30% - Cast Bloodlust at 30% HP'),
+(@P_Ogre,0,1,0,0,0,100,0,3000,7000,9000,12000,11,50731,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Ogre - IC - Cast Mace Smash'),
+(@P_Cloudscraper,0,0,0,0,0,100,4,3000,5000,4000,6000,11,59223,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Cloudscraper - IC /Heroic/ - Cast Chain Lightning'),
+(@P_Cloudscraper,0,1,0,0,0,100,2,3000,7000,9000,12000,11,59220,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Cloudscraper - IC /Normal/ - Cast Chain Lightning'),
+(@P_Cloudscraper,0,2,0,0,0,100,2,7000,10000,12000,15000,11,15588,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Cloudscraper - IC /Normal/ - Cast Thunderclap'),
+(@P_Cloudscraper,0,3,0,0,0,100,4,7000,10000,12000,15000,11,59217,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Cloudscraper - IC /Heroic/ - Cast Thunderclap'),
+(@P_Mammoth,0,0,0,9,0,100,0,8,25,2000,2500,11,32323,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Mammoth - IC - Cast Charge'),
+(@P_Mammoth,0,1,0,0,0,100,0,4000,7000,12000,15000,11,59274,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Mammoth - IC - Cast Trample'),
+(@P_Wolf,0,0,0,0,0,100,2,10000,13000,18000,24000,11,50728,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Wolf - IC /Normal/ - Cast Furious Howl'),
+(@P_Wolf,0,1,0,0,0,100,4,10000,13000,18000,24000,11,59274,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Wolf - IC /Heroic/ - Cast Furious Howl'),
+(@P_Wolf,0,2,0,0,0,100,2,4000,9000,9000,12000,11,50729,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Wolf - IC /Normal/ - Cast Carnivorous Bite'),
+(@P_Wolf,0,3,0,0,0,100,4,4000,9000,9000,12000,11,59269,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Wolf - IC /Heroic/ - Cast Carnivorous Bite'),
+(@P_Air,0,0,0,4,0,100,5,0,0,0,0,11,20545,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Air - On aggro /Heroic/ - Cast Lightning Shield'),
+(@P_Air,0,1,0,4,0,100,3,0,0,0,0,11,25020,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Air - On aggro /Normal/ - Cast Lightning Shield'),
+(@P_Fire,0,0,0,0,0,100,2,3000,8000,5000,9000,11,50744,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Fire - IC /Normla/ - Cast Blaze'),
+(@P_Fire,0,1,0,0,0,100,4,3000,8000,5000,9000,11,59225,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Fire - IC /Heroic/ - Cast Blaze'),
+(@P_Water,0,0,1,54,0,100,1,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Water - On spawn - Disable combat movement'),
+(@P_Water,0,1,0,61,0,100,1,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Water - Linked with previous event - Set phase 0'),
+(@P_Water,0,2,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Water - On Evade - Set phase 0'),
+(@P_Water,0,3,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Water - On In Range /0-5/ - Allow combat movement'),
+(@P_Water,0,4,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Water - On In Range /5-15/ - Disable combat movement'),
+(@P_Water,0,5,0,9,1,100,0,30,80,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Water - On In Range /30-80/ - Allow combat movement'),
+(@P_Water,0,6,7,3,1,100,0,0,7,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Water - On mana pct below 7% - Allow combat movement'),
+(@P_Water,0,7,0,61,1,100,0,0,0,0,0,23,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Water - Linked with previous event - Increment phase by 1'),
+(@P_Water,0,8,0,3,2,100,0,15,100,100,100,23,0,1,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Water - On mana pct above 15% - Decrement phase by 1'),
+(@P_Water,0,9,10,4,0,100,3,0,0,0,0,11,37924,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Water - On aggro - Cast Water Bolt Volley'),
+(@P_Water,0,10,0,61,0,100,3,0,0,0,0,23,1,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Water - IC /Heroic/ - Increment phase by 1'),
+(@P_Water,0,11,12,4,0,100,5,0,0,0,0,11,59266,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Water - On aggro - Cast Water Bolt Volley'),
+(@P_Water,0,12,0,61,0,100,5,0,0,0,0,23,1,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Water - IC /Heroic/ - Increment phase by 1'),
+(@P_Water,0,13,0,9,1,100,2,0,35,3400,4800,11,37924,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Water - In range - Cast Water Bolt Volley'),
+(@P_Water,0,14,0,9,1,100,4,0,35,3400,4800,11,59266,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Water - In range - Cast Water Bolt Volley');
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Fix quest: Whelps of the Wyrmcult http://www.wowhead.com/quest=10747
+-- TO DO: Find why movement of the whelps is not prevented even, if unit flags are set from sniff values and contain disable move flag (not quest breaking by any means, most likely core handling bug somewhere).
+-- ID indexes
+SET @Blackwhelp := 21387;
+SET @CreateItem := 38178;
+SET @BlackwhelpNet := 38177;
+SET @Script := @Blackwhelp * 100;
+-- Add SAI support for Wyrmcult Blackwhelp
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Blackwhelp;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@Blackwhelp;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Blackwhelp AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Script 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
+(@Blackwhelp,0,0,1,54,0,100,1,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - On spawn - Disable combat movement'),
+(@Blackwhelp,0,1,0,61,0,100,1,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Linked with previous event - Set phase 0'),
+(@Blackwhelp,0,2,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - On Evade - Set phase 0'),
+(@Blackwhelp,0,3,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - On In Range /0-5/ - Allow combat movement'),
+(@Blackwhelp,0,4,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - On In Range /5-15/ - Disable combat movement'),
+(@Blackwhelp,0,5,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - On In Range /35-80/ - Allow combat movement'),
+(@Blackwhelp,0,6,7,3,1,100,1,0,7,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - On mana pct below 7% - Allow combat movement'),
+(@Blackwhelp,0,7,0,61,1,100,0,0,0,0,0,23,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Linked with previous event - Increment phase by 1'),
+(@Blackwhelp,0,8,0,3,2,100,1,7,100,100,100,23,0,1,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - On mana pct above 7% - Decrement phase by 1'),
+(@Blackwhelp,0,9,10,4,0,100,1,0,0,0,0,11,19816,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - On aggro - Cast Fireball'),
+(@Blackwhelp,0,10,0,61,0,100,0,0,0,0,0,23,1,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Linked with previous event - Increment phase by 1'),
+(@Blackwhelp,0,11,0,5,1,100,0,0,40,3500,5200,11,19816,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - In range - Cast Fire Ball'),
+(@Blackwhelp,0,12,0,8,0,100,1,@BlackwhelpNet,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - On spellhit by net - Start actionlist'),
+(@Script,9,0,0,0,0,100,0,0,0,0,0,90,7,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Action 1 - SET UNIT FIELD BYTES 1'),
+(@Script,9,1,0,0,0,100,0,0,0,0,0,18,663552,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Action 2 - Set unit flags'),
+(@Script,9,2,0,0,0,100,0,5000,5000,0,0,11,38178,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Action 3 - Cast credit spell to invoker'),
+(@Script,9,3,0,0,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Action 4 - Set unseen'),
+(@Script,9,4,0,0,0,100,0,0,0,0,0,19,663552,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Action 5 - Remove unit flags'),
+(@Script,9,5,0,0,0,100,0,0,0,0,0,91,7,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Action 6 - Remove unit field bytes 1'),
+(@Script,9,6,0,0,0,100,0,0,0,0,0,41,100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Action 7 - Despawn after 100 ms');
+-- This is not directly related to the quest, but was on my way and it improves the experience of the quest
+-- Insert missing go that is spawned by another go with a spell and can't be sniffed in order to cast spell that summon whelp (the difference in models is correct, also this double trap makes a lot of sense based on the video for the quest, on top of that there is delay set)
+DELETE FROM `gameobject_template` WHERE `entry`=184839;
+INSERT INTO `gameobject_template` (`entry`,`type`,`displayId`,`name`,`IconName`,`castBarCaption`,`unk1`,`faction`,`flags`,`size`,`questItem1`,`questItem2`,`questItem3`,`questItem4`,`questItem5`,`questItem6`,`data0`,`data1`,`data2`,`data3`,`data4`,`data5`,`data6`,`data7`,`data8`,`data9`,`data10`,`data11`,`data12`,`data13`,`data14`,`data15`,`data16`,`data17`,`data18`,`data19`,`data20`,`data21`,`data22`,`data23`,`AIName`,`ScriptName`,`WDBVerified`) VALUES
+(184839,6,477, 'Wyrmcult Egg Spawner','','','',1827,0,1,0,0,0,0,0,0,0,0,5,36903,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',-1);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 4942: Galen's Escape
+-- Remove Galen Goodward's immunity to NPC
+UPDATE `creature_template` SET `unit_flags`=256 WHERE `entry`=5391;
diff --git a/sql/updates/world/2012_12_15_02_world_sai.sql b/sql/updates/world/2012_12_15_02_world_sai.sql
new file mode 100644
index 00000000000..bf092bfb88d
--- /dev/null
+++ b/sql/updates/world/2012_12_15_02_world_sai.sql
@@ -0,0 +1,40 @@
+--
+-- Convert quest_end_scripts to SAI
+DELETE FROM `creature_text` WHERE `entry`=836;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(836,0,1, 'There''s nothing like some scalding mornbrew on a chilly Dun Morogh day to get things started right!',12,7,100, 1,0,0,'Durnan Furcutter after quest'),
+(836,1,1, 'Oooooo hot hot hot! If that won''t put spring in your step, I don''t know what will!' ,12,7,100,400,0,0,'Durnan Furcutter after quest');
+UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=836;
+UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry` IN (51708,2289,2688,2933,142343,175926,175925);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (51708,2289,2688,2933,142343,175926,175925) AND `source_type`=1;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (293300,14234300,83600,17592600,17592500) AND `source_type`=9;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=836 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
+-- Eliza's Grave Dirt for Digging Through the Dirt (1s delay is needed?)
+(51708,1,0,0,20,1,100,0,254,0,0,0,12, 314,1,300000,0,1,0,8,0,0,0,-10267 , 52.52,42.54,2.5,'Eliza Grave Dirt - On Quest Complete - Spawn Eliza'),
+-- Ruined Lifeboat for Enticing Negolash Spawndata is from sniff! ( 3s delay is required?)
+(2289 ,1,0,0,20,1,100,0,619,0,0,0,12,1494,1,300000,0,1,0,8,0,0,0,-14621.93,148.1328,0.7201138,0.9944053,'Ruined Lifeboat - On Quest Complete - Spawn Negolash'),
+-- Keystone for Breaking the Keystone, spawndata is from sniff! (1s delay is needed?)
+(2688 ,1,0,0,20,1,100,0,652,0,0,0,12,2763,1, 60000,0,1,0,8,0,0,0,-1517.452,-2181.302,17.31267,2.722714,'Keystone - On Quest Complete - Spawn Thenan'),
+-- Seal of the Earth for Seal of the Earth (2x)
+(2933,1,0,0,20,0,100,0, 779,0,0,0,80,293300,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Seal of the Earth - On quest "Seal of the Earth" Rewarded - call script'),
+(2933,1,1,0,20,0,100,0, 795,0,0,0,80,293300,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Seal of the Earth - On quest "Seal of the Earth" Rewarded - call script'),
+(293300,9,0,0,1,0,100,0,2000,2000,0,0,12,2759,1,300000,0,1,0,8,0,0,0,-6703,-4094,264.235,2.830, 'Seal of the Earth - After 2 seconds - Summon Hematus'),
+(293300,9,1,0,1,0,100,0,2000,2000,0,0,12,2757,1,300000,0,1,0,8,0,0,0,-6718,-4125,264.235,2.683, 'Seal of the Earth - After 2 seconds - Summon Blacklash'),
+-- Uldum Pedestal for Seeing What Happens (2x)
+(142343,1,0,0,20,0,100,0,2946,0,0,0,80,14234300,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Uldum Pedestal - On quest "Seeing What Happens" Rewarded - call script'),
+(142343,1,1,0,20,0,100,0,2966,0,0,0,80,14234300,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Uldum Pedestal - On quest "Seeing What Happens" Rewarded - call script'),
+(14234300,9,0,0,1,0,100,0,2000,2000,0,0,12,7918,1,300000,0,0,0,8,0,0,0,-9619,-2815,11.21,0.43, 'Uldum Pedestal - After 2 seconds - Stone Watcher of Norgannon'),
+-- Durnan Furcuttor for Scalding Mornbrew Delivery
+(836,0,0,0,20,0,100,0,2946,0,0,0,80,83600,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Durnan Furcutter - On quest "Scalding Mornbrew Delivery" Rewarded - call script'),
+-- Script for Dance/talk part
+(83600,9,0,1,1,0,100,0,2000,2000,0,0,1,0, 2000,0,0,0,0,7,0,0,0,0,0,0,0,'Durnan Furcutter - After 2s - Say line1'),
+(83600,9,1,2,1,0,100,0, 0, 0,0,0,5,7, 0,0,0,0,0,7,0,0,0,0,0,0,0,'Durnan Furcutter - After 4s - EmoteEat'),
+(83600,9,2,3,1,0,100,0,4000,4000,0,0,1,0,12000,0,0,0,0,7,0,0,0,0,0,0,0,'Durnan Furcutter - After 8s - Say line2'),
+(83600,9,3,0,1,0,100,0, 0, 0,0,0,5,0, 0,0,0,0,0,7,0,0,0,0,0,0,0,'Durnan Furcutter - After 20s - StopDance'),
+-- Mrs. Dalson's Diary for Mrs.Dalson's Diary
+(175926,1,1,0,20,0,100,0,5058,0,0,0,80,17592600,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Mrs. Dalson''s Diary - On quest "Mrs. Dalson''s Diary" Rewarded - call script'),
+(17592600,9,0,0, 1,0,100,0,2000,2000,0,0,12,10816,1,300000,0,1,0,8,0,0,0,1926.55,-1627.94,60.42,2.24, 'Mrs. Dalson''s Diary - After 2 seconds - Summon Wandering Skeleton'),
+-- Outhouse for Locked Away
+(175925,1,1,0,20,0,100,0,5059,0,0,0,80,17592500,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Outhouse - On quest "Locked Away" Rewarded - call script'),
+(17592500,9,0,0, 1,0,100,0,2000,2000,0,0,12,10836,1,300000,0,1,0,8,0,0,0,1943.38,-1654.68,59.69,6.19, 'Outhouse - After 2 seconds - Summon Farmer Dalson');
diff --git a/sql/updates/world/2012_12_15_03_world_quest_end_scripts.sql b/sql/updates/world/2012_12_15_03_world_quest_end_scripts.sql
new file mode 100644
index 00000000000..91838bda93d
--- /dev/null
+++ b/sql/updates/world/2012_12_15_03_world_quest_end_scripts.sql
@@ -0,0 +1,8 @@
+DELETE FROM `quest_end_scripts` WHERE `id` IN (254,619,652,779,795,2946,2966,3364,5058,5059);
+UPDATE `quest_template` SET `CompleteScript`=0 WHERE `Id`IN (254,619,652,779,795,2946,2966,3364,5058,5059);
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000045,2000000046);
+DELETE FROM `smart_scripts` WHERE `entryorguid`=836 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
+-- Durnan Furcuttor for Scalding Mornbrew Delivery
+(836,0,0,0,20,0,100,0,3364,0,0,0,80,83600,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Durnan Furcutter - On quest "Scalding Mornbrew Delivery" Rewarded - call script');
+-- corrected quest
diff --git a/sql/updates/world/2012_12_16_00_world_creature_addon.sql b/sql/updates/world/2012_12_16_00_world_creature_addon.sql
new file mode 100644
index 00000000000..a79bb407321
--- /dev/null
+++ b/sql/updates/world/2012_12_16_00_world_creature_addon.sql
@@ -0,0 +1,5 @@
+-- Vyragosa
+UPDATE `creature_addon` SET `bytes1`=0x3000000 WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id`=32630);
+-- Chillmaw
+UPDATE `creature_addon` SET `bytes1`=0x3000000,`bytes2`=0x1 WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id`=33687);
+DELETE FROM `creature_template_addon` WHERE `entry`=33687;
diff --git a/sql/updates/world/2012_12_16_01_world_npc_vendor.sql b/sql/updates/world/2012_12_16_01_world_npc_vendor.sql
new file mode 100644
index 00000000000..0e5ed38c88d
--- /dev/null
+++ b/sql/updates/world/2012_12_16_01_world_npc_vendor.sql
@@ -0,0 +1,10 @@
+-- Red Rider Air Rifle
+DELETE FROM `npc_vendor` WHERE `entry` IN (29478,29716) AND `item`=46725;
+INSERT INTO `npc_vendor` (`entry`, `slot`, `item`, `maxcount`, `incrtime`, `ExtendedCost`) VALUES
+(29478,0,46725,0,0,0), -- Jepetto Joybuzz <Toymaker>
+(29716,0,46725,0,0,0); -- Clockwork Assistant <Jepetto's Companion>
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=23 AND `SourceEntry`=46725;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(23,29478,46725,0,0,12,0,2,0,0,0,0,0,'','Rotes Erbsengewehr / Jepetto Joybuzz <Toymaker> - only for Winter Veil'),
+(23,29716,46725,0,0,12,0,2,0,0,0,0,0,'','Rotes Erbsengewehr / Clockwork Assistant <Jepetto''s Companion> - only for Winter Veil');
diff --git a/sql/updates/world/2012_12_16_02_world_creature_text.sql b/sql/updates/world/2012_12_16_02_world_creature_text.sql
new file mode 100644
index 00000000000..f2d605469f8
--- /dev/null
+++ b/sql/updates/world/2012_12_16_02_world_creature_text.sql
@@ -0,0 +1,186 @@
+DELETE FROM `creature_text` WHERE `entry`=35005;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Arelas Brightstar
+(35005, 0, 0, 'Entering the arena, a paladin who is no stranger to the battlefield or tournament ground, the Grand Champion of the Argent Crusade, Eadric the Pure!', 14, 0, 100, 0, 0, 8574, 'Arelas Brightstar - SAY_EADRIC_INTRO'),
+(35005, 1, 0, 'The next combatant is second to none in her passion for upholding the Light. I give you Argent Confessor Paletress!', 14, 0, 100, 0, 0, 8574, 'Arelas Brightstar - SAY_ARELAS_PALETRESS_INTRO'),
+(35005, 2, 0, 'The Silver Covenant is pleased to present their contenders for this event, Highlord.', 14, 0, 100, 396, 0, 8574, 'Arelas Brightstar - SAY_ARELAS_GRAND_CHAMPIONS_INTRO_1'),
+(35005, 3, 0, 'Coming out of the gate is Eressea Dawnsinger, skilled mage and Grand Champion of Silvermoon!', 12, 0, 100, 0, 0, 8573, 'Arelas Brightstar - SAY_ARELAS_GRAND_CHAMPIONS_INTRO_2'),
+(35005, 4, 0, 'Entering the arena is the lean and dangerous Zul''tore, Grand Champion of Sen''jin!', 12, 0, 100, 0, 0, 8573, 'Arelas Brightstar - SAY_ARELAS_GRAND_CHAMPIONS_INTRO_2'),
+(35005, 5, 0, 'Presenting the fierce Grand Champion of Orgrimmar, Mokra the Skullcrusher!', 12, 0, 100, 0, 0, 8573, 'Arelas Brightstar - SAY_ARELAS_GRAND_CHAMPIONS_INTRO_2'),
+(35005, 6, 0, 'Representing the tenacity of the Forsaken, here is the Grand Champion of the Undercity, Deathstalker Visceri!', 12, 0, 100, 0, 0, 8573, 'Arelas Brightstar - SAY_ARELAS_GRAND_CHAMPIONS_INTRO_2'),
+(35005, 7, 0, 'Tall in the saddle of his kodo, here is the venerable Runok Wildmane, Grand Champion of Thunder Bluff!', 12, 0, 100, 0, 0, 8573, 'Arelas Brightstar - SAY_ARELAS_GRAND_CHAMPIONS_INTRO_2'),
+(35005, 8, 0, 'What''s that, up near the rafters?', 12, 0, 100, 25, 0, 0, 'Arelas Brightstar - SAY_ARELAS_KNIGHT_INTRO');
+
+DELETE FROM `creature_text` WHERE `entry`=35004;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Jaeren Sunsworn
+(35004, 0, 0, 'Entering the arena, a paladin who is no stranger to the battlefield or tournament ground, the Grand Champion of the Argent Crusade, Eadric the Pure!', 12, 0, 100, 0, 0, 8574, 'Jaeren Sunsworn - SAY_JAEREN_EADRIC_INTRO'),
+(35004, 1, 0, 'The next combatant is second to none in her passion for upholding the Light. I give you Argent Confessor Paletress!', 14, 0, 100, 0, 0, 8574, 'Jaeren Sunsworn - SAY_JAEREN_PALETRESS_INTRO'),
+(35004, 2, 0, 'The Sunreavers are proud to present their representatives in this trial by combat.', 14, 0, 100, 396, 0, 8574, 'Jaeren Sunsworn - SAY_JAEREN_GRAND_CHAMPIONS_INTRO_1'),
+(35004, 3, 0, 'Coming out of the gate is Colosos, the towering Grand Champion of the Exodar!', 12, 0, 100, 0, 0, 8573, 'Jaeren Sunsworn - SAY_JAEREN_GRAND_CHAMPIONS_INTRO_2'),
+(35004, 4, 0, 'Entering the arena is the Grand Champion of Darnassus, the skilled sentinel Jaelyne Evensong!', 12, 0, 100, 0, 0, 8573, 'Jaeren Sunsworn - SAY_JAEREN_GRAND_CHAMPIONS_INTRO_2'),
+(35004, 5, 0, 'Here comes the small but deadly Ambrose Boltspark, Grand Champion of Gnomeregan!', 12, 0, 100, 0, 0, 8573, 'Jaeren Sunsworn - SAY_JAEREN_GRAND_CHAMPIONS_INTRO_2'),
+(35004, 6, 0, 'Proud and strong, give a cheer for Marshal Jacob Alerius, the Grand Champion of Stormwind!', 12, 0, 100, 0, 0, 8573, 'Jaeren Sunsworn - SAY_JAEREN_GRAND_CHAMPIONS_INTRO_2'),
+(35004, 7, 0, 'The might of the dwarves is represented today by the Grand Champion of Ironforge, Lana Stouthammer!', 12, 0, 100, 0, 0, 8573, 'Jaeren Sunsworn - SAY_JAEREN_GRAND_CHAMPIONS_INTRO_2'),
+(35004, 8, 0, 'What''s that, up near the rafters?', 12, 0, 100, 25, 0, 0, 'Jaeren Sunsworn - SAY_JAEREN_KNIGHT_INTRO');
+
+DELETE FROM `creature_text` WHERE `entry`=34996 AND `groupid` BETWEEN 50 AND 58;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Highlord Tirion Fordring
+/* Grand Champions */
+(34996, 50, 0, 'Welcome, champions. Today, before the eyes of your leaders and peers, you will prove yourselves worthy combatants.', 14, 0, 100, 1, 0, 0, 'Highlord Tirion Fordring - SAY_TIRION_GRAND_CHAMPION_INTRO_1'),
+(34996, 51, 0, 'You will first be facing three of the Grand Champions of the Tournament! These fierce contenders have beaten out all others to reach the pinnacle of skill in the joust.', 14, 0, 100, 0, 0, 0, 'Highlord Tirion Fordring - SAY_TIRION_GRAND_CHAMPION_INTRO_2'),
+(34996, 52, 0, 'Begin!', 14, 0, 100, 0, 0, 8574, 'Highlord Tirion Fordring - SAY_TIRION_GRAND_CHAMPION_INTRO_3'),
+/* Argent Confessor Paletress */
+(34996, 53, 0, 'Well fought! Your next challenge comes from the Crusade''s own ranks. You will be tested against their considerable prowess.', 14, 0, 100, 0, 0, 15882, 'Highlord Tirion Fordring - SAY_TIRION_PALETRESS_INTRO_1'),
+(34996, 54, 0, 'You may begin!', 14, 0, 100, 22, 0, 8574, 'Highlord Tirion Fordring - SAY_TIRION_PALETRESS_INTRO_2'),
+/* The Black Knight */
+(34996, 55, 0, 'Well done. You have proven yourself today-', 14, 0, 100, 0, 0, 0, 'Highlord Tirion Fordring - SAY_TIRION_KNIGHT_INTRO_2'),
+(34996, 56, 0, 'What is the meaning of this?', 14, 0, 100, 0, 0, 0, 'Highlord Tirion Fordring - SAY_TIRION_KNIGHT_INTRO_2'),
+(34996, 57, 0, 'My congratulations, champions. Through trials both planned and unexpected, you have triumphed.', 14, 0, 100, 0, 0, 15882, 'Highlord Tirion Fordring - SAY_TIRION_KNIGHT_OUTRO_1'),
+(34996, 58, 0, 'Go now and rest; you''ve earned it.', 14, 0, 100, 0, 0, 0, 'Highlord Tirion Fordring - SAY_TIRION_KNIGHT_OUTRO_2');
+
+DELETE FROM `creature_text` WHERE `entry`=34994;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Thrall
+(34994, 0, 0, 'Fight well, Horde! Lok''tar Ogar!', 14, 0, 100, 22, 0, 0, 'Thrall - SAY_THRALL_GRAND_CHAMPIONS_INTRO'),
+(34994, 1, 0, 'Well done, Horde!', 14, 0, 100, 66, 0, 0, 'Thrall - SAY_THRALL_KNIGHT_OUTRO'),
+(34994, 2, 0, 'Garrosh, enough.', 12, 0, 100, 396, 0, 0, 'Thrall');
+
+DELETE FROM `creature_text` WHERE `entry`=34990 AND `groupid` BETWEEN 50 AND 53;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- King Varian Wrynn
+(34990, 50, 0, 'I have no taste for these games, Tirion. Still... I trust they will perform admirably.', 12, 0, 100, 1, 0, 0, 'King Varian Wrynn'),
+(34990, 51, 0, 'Don''t just stand there; kill him!', 14, 0, 100, 22, 0, 0, 'King Varian Wrynn'),
+(34990, 52, 0, 'I did not come here to watch animals tear at each other senselessly, Tirion.', 12, 0, 100, 1, 0, 0, 'King Varian Wrynn'),
+(34990, 53, 0, 'You fought well.', 14, 0, 100, 66, 0, 0, 'King Varian Wrynn - SAY_KNIGHT_OUTRO');
+
+DELETE FROM `creature_text` WHERE `entry`=34995 AND `groupid` BETWEEN 50 AND 52;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Garrosh Hellscream
+(34995, 50, 0, 'Finally, a fight worth watching.', 12, 0, 100, 396, 0, 0, 'Garrosh Hellscream - SAY_GARROSH_GRAND_CHAMPIONS_INTRO'),
+(34995, 51, 0, 'Tear him apart!', 14, 0, 100, 22, 0, 0, 'Garrosh Hellscream'),
+(34995, 52, 0, 'Admirably? Hah! I will enjoy watching your weak little champions fail, human.', 14, 0, 100, 22, 0, 0, 'Garrosh Hellscream');
+
+DELETE FROM `creature_text` WHERE `entry` IN (35572,35569,35571,35570,35617,34705,34701,34703,34702,34657);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Grand Champions
+/* Horde */
+(35572, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Mokra the Skullcrusher - SAY_TRAMPLED'),
+(35569, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Eressea Dawnsinger - SAY_TRAMPLED'),
+(35571, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Runok Wildmane - SAY_TRAMPLED'),
+(35570, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Zul''tore - SAY_TRAMPLED'),
+(35617, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Deathstalker Visceri - SAY_TRAMPLED'),
+/* Alliance */
+(34705, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Marshal Jacob Alerius - SAY_TRAMPLED'),
+(34701, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Colosos - SAY_TRAMPLED'),
+(34703, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Lana Stouthammer - SAY_TRAMPLED'),
+(34702, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Ambrose Boltspark - SAY_TRAMPLED'),
+(34657, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Jaelyne Evensong - SAY_TRAMPLED');
+
+DELETE FROM `creature_text` WHERE `entry` IN (34883,34887,34904,34903,34902,34901,34905,34906,34910,34900,34909,34908);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- [ph] Argent Raid Spectator - FX - Horde
+(34883, 0, 0, 'The Horde spectators cheer for $n.', 16, 0, 100, 71, 0, 8574, '[ph] Argent Raid Spectator - FX - Horde - SAY_SPECTATOR_PALETRESS_INTRO'),
+-- [ph] Argent Raid Spectator - FX - Alliance
+(34887, 0, 0, 'The Alliance spectators cheer for $n.', 16, 0, 100, 71, 0, 8574, '[ph] Argent Raid Spectator - FX - Alliance - SAY_SPECTATOR_PALETRESS_INTRO'),
+-- [ph] Argent Raid Spectator - FX - Blood Elf
+(34904, 0, 0, 'The blood elves of Silvermoon cheer for $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Blood Elf SAY_PALETRESS_INTRO_1 - SAY_CHEER'),
+-- [ph] Argent Raid Spectator - FX - Tauren
+(34903, 0, 0, 'The tauren of Thunder Bluff cheer for $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Tauren - SAY_CHEER'),
+-- [ph] Argent Raid Spectator - FX - Troll
+(34902, 0, 0, 'The trolls of the Sen''jin Village begin a chant to celebrate $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Troll - SAY_CHEER'),
+-- [ph] Argent Raid Spectator - FX - Orc
+(34901, 0, 0, 'The orcs of Orgrimmar cheer for $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Orc - SAY_CHEER'),
+-- [ph] Argent Raid Spectator - FX - Undead
+(34905, 0, 0, 'The forsaken of the Undercity cheer for $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Undead - SAY_CHEER'),
+-- [ph] Argent Raid Spectator - FX - Dwarf
+(34906, 0, 0, 'The dwarves of Ironforge begin a cheer for $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Dwarf - SAY_CHEER'),
+-- [ph] Argent Raid Spectator - FX - Gnome
+(34910, 0, 0, 'The gnomes of Gnomeregan cheer for $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Gnome - SAY_CHEER'),
+-- [ph] Argent Raid Spectator - FX - Human
+(34900, 0, 0, 'The humans of Stormwind cheer for $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Human - SAY_CHEER'),
+-- [ph] Argent Raid Spectator - FX - Night Elf
+(34909, 0, 0, 'The night elves of Darnassus cheer for $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Night Elf - SAY_CHEER'),
+-- [ph] Argent Raid Spectator - FX - Draenei
+(34908, 0, 0, 'The draenei of the Exodar cheer for $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Draenei - SAY_CHEER');
+
+DELETE FROM `creature_text` WHERE `entry` IN (35052,35041,35033,35046,35043,35047,35044,35039,35034,35049,35030,34942,35050,35042,35045,35037,35031,35038,35048,35029,35032,35028,35040,35036,35051);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Memory of X
+(35052, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Algalon - EMOTE_WAKING_NIGHTMARE'),
+(35041, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Archimonde - EMOTE_WAKING_NIGHTMARE'),
+(35033, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Chromaggus - EMOTE_WAKING_NIGHTMARE'),
+(35046, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Cyanigosa - EMOTE_WAKING_NIGHTMARE'),
+(35043, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Delrissa - EMOTE_WAKING_NIGHTMARE'),
+(35047, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Eck - EMOTE_WAKING_NIGHTMARE'),
+(35044, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Entropius - EMOTE_WAKING_NIGHTMARE'),
+(35039, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Gruul - EMOTE_WAKING_NIGHTMARE'),
+(35034, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Hakkar - EMOTE_WAKING_NIGHTMARE'),
+(35049, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Heigan - EMOTE_WAKING_NIGHTMARE'),
+(35030, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Herod - EMOTE_WAKING_NIGHTMARE'),
+(34942, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Hogger - EMOTE_WAKING_NIGHTMARE'),
+(35050, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Ignis - EMOTE_WAKING_NIGHTMARE'),
+(35042, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Illidan - EMOTE_WAKING_NIGHTMARE'),
+(35045, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Ingvar - EMOTE_WAKING_NIGHTMARE'),
+(35037, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Kalithresh - EMOTE_WAKING_NIGHTMARE'),
+(35031, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Lucifron - EMOTE_WAKING_NIGHTMARE'),
+(35038, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Malchezaar - EMOTE_WAKING_NIGHTMARE'),
+(35048, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Onyxia - EMOTE_WAKING_NIGHTMARE'),
+(35029, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Mutanus - EMOTE_WAKING_NIGHTMARE'),
+(35032, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Thunderaan - EMOTE_WAKING_NIGHTMARE'),
+(35028, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of VanCleef - EMOTE_WAKING_NIGHTMARE'),
+(35040, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Vashj - EMOTE_WAKING_NIGHTMARE'),
+(35036, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Vek''nilash - EMOTE_WAKING_NIGHTMARE'),
+(35051, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Vezax - EMOTE_WAKING_NIGHTMARE');
+
+DELETE FROM `creature_text` WHERE `entry`=35564;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Risen Arelas Brightstar
+(35564, 0, 0, 'What a Brains shot!', 12, 36, 100, 0, 0, 0, 'Risen Arelas Brightstar'),
+(35564, 1, 0, 'Somone stop that ghoul!', 12, 36, 100, 0, 0, 0, 'Risen Arelas Brightstar'),
+(35564, 2, 0, 'That had to hurt! Brains!', 12, 36, 100, 0, 0, 0, 'Risen Arelas Brightstar');
+
+DELETE FROM `creature_text` WHERE `entry`=35545;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Risen Jaeren Sunsworn
+(35545, 0, 0, 'What a Brains shot!', 12, 36, 100, 0, 0, 0, 'Risen Jaeren Sunsworn'),
+(35545, 1, 0, 'Somone stop that ghoul!', 12, 36, 100, 0, 0, 0, 'Risen Jaeren Sunsworn'),
+(35545, 2, 0, 'That had to hurt! Brains!', 12, 36, 100, 0, 0, 0, 'Risen Jaeren Sunsworn');
+
+DELETE FROM `creature_text` WHERE `entry`=34928;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Argent Confessor Paletress
+(34928, 0, 0, 'Thank you, good herald. Your words are too kind.', 12, 0, 100, 2, 0, 16245, 'Argent Confessor Paletress - SAY_INTRO_1'),
+(34928, 1, 0, 'May the Light give me strength to provide a worthy challenge.', 12, 0, 100, 16, 0, 16246, 'Argent Confessor Paletress - SAY_INTRO_2'),
+(34928, 2, 0, 'Well, then. Let us begin.', 14, 0, 100, 0, 0, 16247, 'Argent Confessor Paletress - SAY_AGGRO'),
+(34928, 3, 0, 'Take this time to consider your past deeds.', 14, 0, 100, 0, 0, 16248, 'Argent Confessor Paletress - SAY_MEMORY_SUMMON'),
+(34928, 4, 0, 'Even the darkest memory fades when confronted!', 14, 0, 100, 0, 0, 16249, 'Argent Confessor Paletress - SAY_MEMORY_DEATH'),
+(34928, 5, 0, 'Take your rest.', 14, 0, 100, 0, 0, 16250, 'Argent Confessor Paletress - SAY_KILL_PLAYER'),
+(34928, 5, 1, 'Be at ease.', 14, 0, 100, 0, 0, 16251, 'Argent Confessor Paletress - SAY_KILL_PLAYER'),
+(34928, 6, 0, 'Excellent work!', 14, 0, 100, 0, 0, 16252, 'Argent Confessor Paletress - SAY_DEFEATED');
+
+DELETE FROM `creature_text` WHERE `entry`=35119;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Eadric the Pure
+(35119, 0, 0, 'Are you up to the challenge? I will not hold back.', 12, 0, 100, 397, 0, 16134, 'Eadric the Pure - SAY_INTRO'),
+(35119, 1, 0, 'Prepare yourselves!', 14, 0, 100, 0, 0, 16135, 'Eadric the Pure - SAY_AGGRO'),
+(35119, 2, 0, '%s begins to radiate light. Shield your eyes!', 41, 0, 100, 0, 0, 0, 'Eadric the Pure - EMOTE_RADIANCE'),
+(35119, 3, 0, '%s targets $n with the Hammer of the Righteous!', 41, 0, 100, 0, 0, 16136, 'Eadric the Pure - EMOTE_HAMMER_RIGHTEOUS'),
+(35119, 4, 0, 'Hammer of the Righteous!', 14, 0, 100, 0, 0, 16136, 'Eadric the Pure - SAY_HAMMER_RIGHTEOUS'),
+(35119, 5, 0, 'You... You need more practice.', 14, 0, 100, 0, 0, 16137, 'Eadric the Pure - SAY_KILL_PLAYER'),
+(35119, 5, 1, 'Nay! Nay! And I say yet again nay! Not good enough!', 14, 0, 100, 0, 0, 16138, 'Eadric the Pure - SAY_KILL_PLAYER'),
+(35119, 6, 0, 'I yield! I submit. Excellent work. May I run away now?', 14, 0, 100, 0, 0, 16139, 'Eadric the Pure - SAY_DEFEATED');
+
+DELETE FROM `creature_text` WHERE `entry`=35451;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- The Black Knight
+(35451, 0, 0, 'You spoiled my grand entrance, rat.', 12, 0, 100, 0, 0, 16256, 'The Black Knight - SAY_INTRO_1'),
+(35451, 1, 0, 'Did you honestly think an agent of the Lich King would be bested on the field of your pathetic little tournament?', 12, 0, 100, 396, 0, 16257, 'The Black Knight - SAY_INTRO_2'),
+(35451, 2, 0, 'I''ve come to finish my task.', 12, 0, 100, 396, 0, 16258, 'The Black Knight - SAY_INTRO_3'),
+(35451, 3, 0, 'This farce ends here!', 14, 0, 100, 0, 0, 16259, 'The Black Knight - SAY_AGGRO'),
+(35451, 4, 0, 'My rotting flesh was just getting in the way!', 14, 0, 100, 0, 0, 16262, 'The Black Knight - SAY_PHASE_2'),
+(35451, 5, 0, 'I have no need for bones to best you!', 14, 0, 100, 0, 0, 16263, 'The Black Knight - SAY_PHASE_3'),
+(35451, 6, 0, 'Pathetic.', 14, 0, 100, 0, 0, 16260, 'The Black Knight - SAY_KILL_PLAYER'),
+(35451, 6, 1, 'A waste of flesh.', 14, 0, 100, 0, 0, 16261, 'The Black Knight - SAY_KILL_PLAYER'),
+(35451, 7, 0, 'No! I must not fail... again...', 14, 0, 100, 0, 0, 16264, 'The Black Knight - SAY_DEATH');
diff --git a/sql/updates/world/2012_12_16_03_world_sai.sql b/sql/updates/world/2012_12_16_03_world_sai.sql
new file mode 100644
index 00000000000..40b1e32dbeb
--- /dev/null
+++ b/sql/updates/world/2012_12_16_03_world_sai.sql
@@ -0,0 +1,34 @@
+SET @NPC_KC := 28713;
+SET @NPC_SOUL_FONT_BUNNY := 28724;
+SET @NPC_QUTEZLUN_WORSHIPPER := 28747;
+SET @NPC_SERPENTTOUCHED_BERSERKER := 28748;
+SET @SPELL_SOUL_FONT_VOID := 52222;
+SET @SPELL_SOUL_FONT_VOID_CHANNEL := 52242;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_QUTEZLUN_WORSHIPPER AND `source_type`=0 AND `id` IN (2,3,4,5,6);
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_SERPENTTOUCHED_BERSERKER AND `source_type`=0 AND `id` IN (1,2,3,4,5);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_QUTEZLUN_WORSHIPPER*100,@NPC_SERPENTTOUCHED_BERSERKER*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
+(@NPC_QUTEZLUN_WORSHIPPER,0,2,3,4,0,100,0,0,0,0,0,42,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Quetz''lun Worshipper - On aggro - Set invincibility 1 HP'),
+(@NPC_QUTEZLUN_WORSHIPPER,0,3,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Quetz''lun Worshipper - On aggro - Set event phase 1'),
+(@NPC_QUTEZLUN_WORSHIPPER,0,4,5,2,1,100,1,0,0.1,0,0,11,@SPELL_SOUL_FONT_VOID_CHANNEL,0,0,0,0,0,19,@NPC_SOUL_FONT_BUNNY,15,0,0,0,0,0,'Quetz''lun Worshipper - On health below 0.1% (phase 1) - Spellcast Soul Font Void Channel'),
+(@NPC_QUTEZLUN_WORSHIPPER,0,5,0,61,0,100,0,0,0,0,0,80,@NPC_QUTEZLUN_WORSHIPPER*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Quetz''lun Worshipper - On health below 0.1% (phase 1) - Run script'),
+(@NPC_QUTEZLUN_WORSHIPPER,0,6,0,6,0,100,0,0,0,0,0,33,@NPC_KC,0,0,0,0,0,16,0,0,0,0,0,0,0,'Quetz''lun Worshipper - On death - Quest credit'),
+(@NPC_SERPENTTOUCHED_BERSERKER,0,1,2,4,0,100,0,0,0,0,0,42,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Serpent-Touched Berserker - On aggro - Set invincibility 1 HP'),
+(@NPC_SERPENTTOUCHED_BERSERKER,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,'Serpent-Touched Berserker - On aggro - Set event phase 1'),
+(@NPC_SERPENTTOUCHED_BERSERKER,0,3,4,2,1,100,1,0,0.1,0,0,11,@SPELL_SOUL_FONT_VOID_CHANNEL,0,0,0,0,0,19,@NPC_SOUL_FONT_BUNNY,15,0,0,0,0,0,'Serpent-Touched Berserker - On health below 0.1% (phase 1) - Spellcast Soul Font Void Channel'),
+(@NPC_SERPENTTOUCHED_BERSERKER,0,4,0,61,0,100,0,0,0,0,0,80,@NPC_SERPENTTOUCHED_BERSERKER*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Serpent-Touched Berserker - On health below 0.1% (phase 1) - Run script'),
+(@NPC_SERPENTTOUCHED_BERSERKER,0,5,0,6,0,100,0,0,0,0,0,33,@NPC_KC,0,0,0,0,0,16,0,0,0,0,0,0,0,'Serpent-Touched Berserker - On death - Quest credit'),
+
+(@NPC_QUTEZLUN_WORSHIPPER*100,9,0,0,0,0,100,0,100,100,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Quetz''lun Worshipper script - Die'),
+(@NPC_SERPENTTOUCHED_BERSERKER*100,9,0,0,0,0,100,0,100,100,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Serpent-Touched Berserker script - Die');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SPELL_SOUL_FONT_VOID_CHANNEL;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=@NPC_QUTEZLUN_WORSHIPPER;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=@NPC_SERPENTTOUCHED_BERSERKER;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,1,@SPELL_SOUL_FONT_VOID_CHANNEL,0,0,31,0,3,@NPC_SOUL_FONT_BUNNY,0,0,0,'','Spell Soul Font Void Channel targets Soul Font Bunny'),
+(22,3,@NPC_QUTEZLUN_WORSHIPPER,0,0,9,0,12668,0,0,0,0,'','SAI Quetz''lun Worshipper set invincibility if player has taken quest 12668'),
+(22,7,@NPC_QUTEZLUN_WORSHIPPER,0,0,1,1,@SPELL_SOUL_FONT_VOID,0,0,0,0,'','SAI Quetz''lun Worshipper quest credit if aura 52222 applied'),
+(22,2,@NPC_SERPENTTOUCHED_BERSERKER,0,0,9,0,12668,0,0,0,0,'','SAI Serpent-touched Berserker set invincibility if player has taken quest 12668'),
+(22,6,@NPC_SERPENTTOUCHED_BERSERKER,0,0,1,1,@SPELL_SOUL_FONT_VOID,0,0,0,0,'','SAI Serpent-touched Berserker triggers if aura 52222 applied');
diff --git a/sql/updates/world/2012_12_17_00_world_creature_template.sql b/sql/updates/world/2012_12_17_00_world_creature_template.sql
new file mode 100644
index 00000000000..dfe9132e7a6
--- /dev/null
+++ b/sql/updates/world/2012_12_17_00_world_creature_template.sql
@@ -0,0 +1,2 @@
+UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask` & ~(1|2|4|8|32|64|128|256|512|1024|2048|4096|8192|65536|131072|524288|4194304|67108864|536870912) WHERE `entry` = 36066;
+UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask` |1|2|4|8|32|64|128|256|512|1024|2048|4096|8192|65536|131072|524288|4194304|67108864|536870912 WHERE `entry` = 34496;
diff --git a/sql/updates/world/2012_12_17_00_world_song_of_wind_and_water.sql b/sql/updates/world/2012_12_17_00_world_song_of_wind_and_water.sql
new file mode 100644
index 00000000000..52c80334c0c
--- /dev/null
+++ b/sql/updates/world/2012_12_17_00_world_song_of_wind_and_water.sql
@@ -0,0 +1,38 @@
+-- Add DB suport for quest ID: 12726 "Song of Wind and Water"
+-- Indexes:
+SET @HAIPHOON_W := 28999; -- WATER
+SET @HAIPHOON_A := 28985; -- AIR
+SET @STORM := 28858; -- Storm Revenant
+SET @AQUEOUS := 28862; -- Aqueous Spirit
+-- WATER VERSION SPELLS
+SET @SPELL_W_1 := 61375; -- Water Bolt
+SET @SPELL_W_2 := 61376; -- Frost Nova
+SET @SPELL_W_3 := 52862; -- Devour Wind
+-- Both version spell
+SET @SPELL_AW := 52869; -- Evocation
+-- AIR VERSION SPELLS
+SET @SPELL_A_1 :=61374; -- Lightning Bolt
+SET @SPELL_A_2 :=52870; -- Windshear
+SET @SPELL_A_3 :=52864; -- Devour Water
+
+-- Update both quest vehicles templates
+-- Water version
+UPDATE `creature_template` SET `spell1`=@SPELL_W_1,`spell2`=@SPELL_W_2,`spell3`=@SPELL_W_3,`spell6`=@SPELL_AW,`unit_flags`=`unit_flags`|16777216,`VehicleId`=257,`AIName`='',`exp`=2,`minlevel`=80,`maxlevel`=80,`ScriptName`='npc_haiphoon' WHERE `entry`=@HAIPHOON_W;
+-- Wind version
+UPDATE `creature_template` SET `spell1`=@SPELL_A_1,`spell2`=@SPELL_A_2,`spell3`=@SPELL_A_3,`spell6`=@SPELL_AW,`unit_flags`=`unit_flags`|16777216,`VehicleId`=257,`unit_class`=2,`exp`=2,`minlevel`=80,`maxlevel`=80,`ScriptName`='npc_haiphoon' WHERE `entry`=@HAIPHOON_A;
+
+-- Insert conditions
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry` IN (@SPELL_W_3,@SPELL_A_3);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(17,0,@SPELL_W_3,0,0,31,1,3,@STORM,0,0,0,'', 'Spell Devour Wind can only target Storm Revenant'),
+(17,0,@SPELL_A_3,0,0,31,1,3,@AQUEOUS,0,0,0,'', 'Spell Devour Water can only target Aqueous Spirit');
+
+-- Add SAI and DB support for Storm Revenant and Aqueous Spirit
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@STORM,@AQUEOUS);
+UPDATE `creature_template` SET `resistance3`=545 WHERE `entry`=@STORM; -- should've resistance according to video (tried to be precise as possible)
+UPDATE `creature_template` SET `resistance4`=545 WHERE `entry`=@AQUEOUS; -- should've resistance according to video -//-
+DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (@STORM,@AQUEOUS);
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (@STORM,@AQUEOUS);
+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
+(@STORM,0,0,0,0,0,100,0,2000,4000,5000,7000,11,32018,0,0,0,0,0,2,0,0,0,0,0,0,0,'Storm Revenant - IC - Cast Call Lightning'),
+(@AQUEOUS,0,0,0,0,0,100,0,6000,9000,7000,10000,11,55087,0,0,0,0,0,2,0,0,0,0,0,0,0,'Aqueous Spirit - IC - Cast Typhoon');
diff --git a/sql/updates/world/2012_12_17_00_world_spell_linked_spell.sql b/sql/updates/world/2012_12_17_00_world_spell_linked_spell.sql
new file mode 100644
index 00000000000..a2cfc7073d0
--- /dev/null
+++ b/sql/updates/world/2012_12_17_00_world_spell_linked_spell.sql
@@ -0,0 +1,4 @@
+-- Fix Preserved Holly item triggered spell to apply reindeer transformation also so Fa-la-la-la Ogri'La can be doable with it also, based on sniffs.
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=62061;
+INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
+(62061,25860,0, 'Festive Holiday Mount');
diff --git a/sql/updates/world/2012_12_18_00_world_creature_text.sql b/sql/updates/world/2012_12_18_00_world_creature_text.sql
new file mode 100644
index 00000000000..1cf9211343f
--- /dev/null
+++ b/sql/updates/world/2012_12_18_00_world_creature_text.sql
@@ -0,0 +1,5 @@
+DELETE FROM `creature_text` WHERE `entry`=32273;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+(32273, 0, 0, 'How dare you interfere with our work!', 14, 0, 100, 0, 0, 0, 'Infinite Corruptor - SAY_AGGRO'),
+(32273, 1, 0, 'My time... has run out...', 14, 0, 100, 0, 0, 0, 'Infinite Corruptor - SAY_DEATH'),
+(32273, 2, 0, 'The process is finally complete! My work here is done.', 14, 0, 100, 0, 0, 0, 'Infinite Corruptor - SAY_FAIL');
diff --git a/sql/updates/world/2012_12_18_00_world_waking_the_sleeper.sql b/sql/updates/world/2012_12_18_00_world_waking_the_sleeper.sql
new file mode 100644
index 00000000000..4f8a203100d
--- /dev/null
+++ b/sql/updates/world/2012_12_18_00_world_waking_the_sleeper.sql
@@ -0,0 +1,47 @@
+-- Convert quest_end_script "10964" to SAI, alongside dropping creature c++ script
+-- Indexes:
+SET @CLINTAR_DREAMWALKER := 22834;
+SET @SCRIPT := @CLINTAR_DREAMWALKER * 100;
+SET @SPIRIT := 22916;
+
+-- Remove template addon emote (all is handled by that SAI, this breaks it)
+UPDATE `creature_template_addon` SET `emote`=0 WHERE `entry`=@CLINTAR_DREAMWALKER;
+
+-- Remove from quest_end_scripts
+DELETE FROM `quest_end_scripts` WHERE `id`=10964;
+
+-- Add SAI support and drop c++ script
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@CLINTAR_DREAMWALKER;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@CLINTAR_DREAMWALKER AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT 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
+(@CLINTAR_DREAMWALKER,0,0,0,20,0,100,0,10964,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - On quest 10964 rewarded - Start action list'),
+(@CLINTAR_DREAMWALKER,0,1,2,19,1,100,0,10965,0,0,0,12,@SPIRIT,2,100000,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - On quest 10965 accepted - Spawn creature (can happen only after actionlist stuff are complete)'),
+(@CLINTAR_DREAMWALKER,0,2,0,61,1,100,0,0,0,0,0,69,3,0,0,0,0,0,8,0,0,0,7459.47,-3122.79,439.485,5.84588, 'Clintar Dreamwalker - Linked - Move to pos'),
+(@CLINTAR_DREAMWALKER,0,3,4,34,1,100,0,8,3,0,0,90,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - On point 3 reached set - Set field byte 1 for sleeping'),
+(@CLINTAR_DREAMWALKER,0,4,0,61,1,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Linked - Set phase 0'),
+(@CLINTAR_DREAMWALKER,0,5,6,1,1,100,1,360000,360000,360000,360000,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - OOC (phase 1) - Set unseen'),
+(@CLINTAR_DREAMWALKER,0,6,0,61,1,100,1,0,0,0,0,41,100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Linked - Despawn'),
+(@SCRIPT,9,0,0,0,0,100,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 0 - Remove npc flag for quest giver'),
+(@SCRIPT,9,1,0,0,0,100,0,3000,3000,0,0,91,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 1 - Remove bytes for sleeping'),
+(@SCRIPT,9,2,0,0,0,100,0,0,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 2 - Set bytes 1 kneel'),
+(@SCRIPT,9,3,0,0,0,100,0,3000,3000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 3 - Say line 0'),
+(@SCRIPT,9,4,0,0,0,100,0,6000,6000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 4 - Say line 1 (with exclamation emote)'),
+(@SCRIPT,9,5,0,0,0,100,0,7000,7000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 5 - Say line 2'),
+(@SCRIPT,9,6,0,0,0,100,0,0,0,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 6 - Remove bytes 1 for kneel'),
+(@SCRIPT,9,7,0,0,0,100,0,5000,5000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 7 - Say line 3'),
+(@SCRIPT,9,8,0,0,0,100,0,5000,5000,0,0,69,0,0,0,0,0,0,8,0,0,0,7453.25,-3116.29,439.604,5.534, 'Clintar Dreamwalker - Action 8 - Move to pos'),
+(@SCRIPT,9,9,0,0,0,100,0,5000,5000,0,0,69,0,0,0,0,0,0,8,0,0,0,7453.79,-3116.83,439.604,5.534, 'Clintar Dreamwalker - Action 9 - Move to pos'),
+(@SCRIPT,9,10,0,0,0,100,0,8000,8000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 10 - Say line 4'),
+(@SCRIPT,9,11,0,0,0,100,0,1500,1500,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 11 - Add npc flag for quest giver'),
+(@SCRIPT,9,12,0,0,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 12 - Set phase 1');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000067,2000000068,2000000069);
+DELETE FROM `creature_text` WHERE `entry`=@CLINTAR_DREAMWALKER;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@CLINTAR_DREAMWALKER,0,0, 'Clintar Dreamwalker snaps up to a kneeling position, but seems as though he''s somewhere else.',16,0,100,0,0,0, 'Clintar Dreamwalker (line 0)'),
+(@CLINTAR_DREAMWALKER,1,0, 'What are you doing in Ysera''s realm, interloper? Leave us, I say! Your kind are not welcome here!',12,0,100,5,0,0, 'Clintar Dreamwalker (line 1)'),
+(@CLINTAR_DREAMWALKER,2,0, 'Clintar Dreamwalker gets to his feet, beginning to recognize his surroundings.',16,0,100,0,0,0, 'Clintar Dreamwalker (line 2)'),
+(@CLINTAR_DREAMWALKER,3,0, 'You - you''re not one of them! Let''s get out of sight before they find us! Hurry! ',12,0,100,1,0,0, 'Clintar Dreamwalker (line 3)'),
+(@CLINTAR_DREAMWALKER,4,0, 'They''re following me, $R! Quickly, tell me why you''re here before we''re discovered! If they catch up to me, it will mean my death and yours!',12,0,100,1,0,0, 'Clintar Dreamwalker (line 4)');
diff --git a/sql/updates/world/2012_12_18_01_world_creature_text.sql b/sql/updates/world/2012_12_18_01_world_creature_text.sql
new file mode 100644
index 00000000000..24779f67fc7
--- /dev/null
+++ b/sql/updates/world/2012_12_18_01_world_creature_text.sql
@@ -0,0 +1,75 @@
+-- Vazruden the herald
+DELETE FROM `creature_text` WHERE `entry`=17307;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`probability`,`sound`,`comment`,`text`) VALUES
+(17307,0,0,14,100,10292,"vazruden the herald SAY_INTRO","You have faced many challenges, pity they were all in vain. Soon your people will kneel to my lord!");
+
+-- Nazan
+DELETE FROM `creature_text` WHERE `entry`=17536;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`probability`,`comment`,`text`) VALUE
+(17536,0,0,41,100,"nazan EMOTE","%s descends from the sky");
+
+-- Vazruden
+DELETE FROM `creature_text` WHERE `entry`=17537;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`probability`,`sound`,`comment`,`text`) VALUES
+(17537,0,0,14,100,10293,"vazruden SAY_WIPE","Is there no one left to test me?"),
+(17537,1,0,14,100,10294,"vazruden SAY_AGGRO_1","Your time is running out!"),
+(17537,1,1,14,100,10295,"vazruden SAY_AGGRO_2","You are nothing, I answer a higher call!"),
+(17537,1,2,14,100,10296,"vazruden SAY_AGGRO_3","The Dark Lord laughs at you!"),
+(17537,2,0,14,100,10297,"vazruden SAY_KILL_1","It is over. Finished!"),
+(17537,2,1,14,100,10298,"vazruden SAY_KILL_2","Your days are done!"),
+(17537,3,0,14,100,10299,"vazruden SAY_DIE","My lord will be the end you all...");
+
+-- Talbot aka Prince Valanar (There's an UpdateEntry() call in the script which I did not see)
+UPDATE `creature_text` SET `entry`=28189 WHERE `entry`=25301;
+
+-- Darion Mograine
+UPDATE `creature_text` SET `entry`=29228 WHERE `entry`=29173 AND `groupid`=74;
+
+-- Core rager
+UPDATE `creature_text` SET `entry`=11672 WHERE `entry`=11988;
+
+DELETE FROM `creature_text` WHERE `entry` IN (15550,16151);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`probability`,`sound`,`comment`,`text`) VALUES
+-- Attumen
+(15550,0,0,14,100,9169,"attumen SAY_KILL1","It was... inevitable."),
+(15550,0,1,14,100,9300,"attumen SAY_KILL2","Another trophy to add to my collection!"),
+(15550,1,0,14,100,9166,"attumen SAY_DISARMED","Weapons are merely a convenience for a warrior of my skill!"),
+(15550,2,0,14,100,9165,"attumen SAY_DEATH","I always knew... someday I would become... the hunted."),
+(15550,3,0,14,100,9170,"attumen SAY_RANDOM1","Such easy sport."),
+(15550,3,1,14,100,9304,"attumen SAY_RANDOM2","Amateurs! Do not think you can best me! I kill for a living."),
+-- Midnight
+(16151,0,0,14,100,9173,"attumen SAY_MIDNIGHT_KILL","Well done Midnight!"),
+(16151,1,0,14,100,9167,"attumen SAY_APPEAR1","Cowards! Wretches!"),
+(16151,1,1,14,100,9298,"attumen SAY_APPEAR2","Who dares attack the steed of the Huntsman?"),
+(16151,1,2,14,100,9299,"attumen SAY_APPEAR3","Perhaps you would rather test yourselves against a more formidable opponent?!"),
+(16151,2,0,14,100,9168,"attumen SAY_MOUNT","Come, Midnight, let\'s disperse this petty rabble!");
+
+-- Creature text preparation for rajaxx
+DELETE FROM `creature_text` WHERE `entry` IN (15471,15341);
+INSERT INTO `creature_text`(`entry`,`groupid`,`sound`,`type`,`probability`,`comment`,`text`) VALUES
+(15471,0,0,14,100,"andorov SAY_ANDOROV_INTRO","They come now. Try not to get yourself killed, young blood."),
+(15471,1,0,14,100,"andorov SAY_ANDOROV_ATTACK","Remember, Rajaxx, when I said I\'d kill you last? I lied..."),
+(15341,0,8612,14,100,"rajaxx SAY_WAVE3","The time of our retribution is at hand! Let darkness reign in the hearts of our enemies!"),
+(15341,1,8610,14,100,"rajaxx SAY_WAVE4","No longer will we wait behind barred doors and walls of stone! No longer will our vengeance be denied! The dragons themselves will tremble before our wrath!"),
+(15341,2,8608,14,100,"rajaxx SAY_WAVE5","Fear is for the enemy! Fear and death!"),
+(15341,3,8611,14,100,"rajaxx SAY_WAVE6","Staghelm will whimper and beg for his life, just as his whelp of a son did! One thousand years of injustice will end this day!"),
+(15341,4,8607,14,100,"rajaxx SAY_WAVE7","Fandral! Your time has come! Go and hide in the Emerald Dream and pray we never find you!"),
+(15341,5,8609,14,100,"rajaxx SAY_INTRO","Impudent fool! I will kill you myself!"),
+(15341,6,8603,14,100,"rajaxx SAY_UNK1","Attack and make them pay dearly!"),
+(15341,7,8605,14,100,"rajaxx SAY_UNK2","Crush them! Drive them out!"),
+(15341,8,8606,14,100,"rajaxx SAY_UNK3","Do not hesitate! Destroy them!"),
+(15341,9,8613,14,100,"rajaxx SAY_UNK4","Warriors! Captains! Continue the fight!"),
+(15341,10,8614,14,100,"rajaxx SAY_DEAGGRO","You are not worth my time $N!"),
+(15341,11,8604,14,100,"rajaxx SAY_KILLS_ANDOROV","Breath your last!"),
+(15341,12,0,14,100,"rajaxx SAY_COMPLETE_QUEST","Soon you will know the price of your meddling, mortals... The master is nearly whole... And when he rises, your world will be cease!");
+
+-- moam
+DELETE FROM `creature_text` WHERE `entry`=15340;
+INSERT INTO `creature_text`(`entry`,`groupid`,`type`,`probability`,`comment`,`text`) VALUES
+(15340,0,16,100,"moam EMOTE_AGGRO","%s senses your fear."),
+(15340,1,16,100,"moan EMOTE_MANA_FULL","%s bristles with energy!");
+
+-- buru
+DELETE FROM `creature_text` WHERE `entry`=15370;
+INSERT INTO `creature_text`(`entry`,`groupid`,`type`,`probability`,`comment`,`text`) VALUES
+(15370,0,16,100,"buru EMOTE_TARGET","%s sets eyes on $N!");
diff --git a/sql/updates/world/2012_12_18_02_world_misc.sql b/sql/updates/world/2012_12_18_02_world_misc.sql
new file mode 100644
index 00000000000..5df6ef8eb95
--- /dev/null
+++ b/sql/updates/world/2012_12_18_02_world_misc.sql
@@ -0,0 +1,14 @@
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=15760;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=15760 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
+(15760, 0, 0, 0, 22, 0, 100, 0, 58, 0, 0, 0, 11, 26218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Winter Reveler - Cast Mistletoe on /kiss');
+
+DELETE FROM `spell_script_names` WHERE `spell_id`=26218;
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(26218,'spell_winter_veil_mistletoe');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=15760;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(22, 1, 15760, 0, 0, 1, 0, 26218, 1, 0, 1, 0, 0, '', 'execute sai only if player has not Mistletoe Debuff'),
+(22, 1, 15760, 0, 0, 12, 0, 2, 0, 0, 0, 0, 0, '', 'execute sai only if Winter Veil');
diff --git a/sql/updates/world/2012_12_18_02_world_sai.sql b/sql/updates/world/2012_12_18_02_world_sai.sql
new file mode 100644
index 00000000000..0843285550f
--- /dev/null
+++ b/sql/updates/world/2012_12_18_02_world_sai.sql
@@ -0,0 +1,47 @@
+SET @NPC_WARLORD_ZOLMAZ := 28902;
+SET @NPC_ENCHANTED_TIKI := 28927;
+SET @GO_ZOLMAZ_GATE := 190784;
+SET @GO_GATE_LEVER := 190834;
+
+DELETE FROM `event_scripts` WHERE `id`=18940;
+INSERT INTO `event_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES
+(18940,6,11,57571,180,0,0,0,0,0);
+
+DELETE FROM `creature_text` WHERE `entry`=@NPC_WARLORD_ZOLMAZ;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@NPC_WARLORD_ZOLMAZ,0,0,'%s becomes enraged.',16,0,100,0,0,0,'Warlord Zol''Maz'),
+(@NPC_WARLORD_ZOLMAZ,1,0,'You have an enchanted tiki? YOU KILLED MY FAMILY!',14,0,100,15,0,6200,'Warlord Zol''Maz'),
+(@NPC_WARLORD_ZOLMAZ,2,0,'I WILL KILL YOU, $N!',14,0,100,0,0,0,'Warlord Zol''Maz');
+
+UPDATE `creature_template` SET `dmg_multiplier`=2.75, `AIName`='SmartAI' WHERE `entry`=@NPC_WARLORD_ZOLMAZ;
+UPDATE `creature_template` SET `minlevel`=77, `maxlevel`=77, `exp`=2, `mindmg`=371, `maxdmg`=522, `attackpower`=478, `dmg_multiplier`=1.75, `unit_flags`=32776, `unit_class`=2, `minrangedmg`=314, `maxrangedmg`=466, `rangedattackpower`=81, `AIName`='SmartAI', `equipment_id`=838 WHERE `entry`=@NPC_ENCHANTED_TIKI;
+UPDATE `creature_model_info` SET `bounding_radius`=0.465, `combat_reach`=7.5 WHERE `modelid`=26286;
+
+DELETE FROM `creature_template_addon` WHERE `entry`=@NPC_ENCHANTED_TIKI;
+INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@NPC_ENCHANTED_TIKI,0,0,0,1,0,'52614 52670');
+
+UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@GO_GATE_LEVER;
+UPDATE `gameobject_template` SET `flags`=4 WHERE `entry` IN (190836,191766,194126);
+UPDATE `gameobject` SET `position_x`=6552.984, `position_y`=-3903.916, `position_z`=490.9412 WHERE `guid`=99744;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_WARLORD_ZOLMAZ,@NPC_ENCHANTED_TIKI) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@GO_GATE_LEVER 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
+(@NPC_WARLORD_ZOLMAZ,0,0,0,9,0,100,0,10,25,0,0,11,32323,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On target range 10-25y - Spellcast Charge'),
+(@NPC_WARLORD_ZOLMAZ,0,1,2,2,0,100,1,0,20,0,0,11,8599,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On health below 20% - Spellcast Enrage'),
+(@NPC_WARLORD_ZOLMAZ,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On health below 20% - Say line'),
+(@NPC_WARLORD_ZOLMAZ,0,3,0,0,0,100,0,12000,12000,20000,20000,11,54670,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On update IC - Spellcast Decapitate'),
+(@NPC_WARLORD_ZOLMAZ,0,4,0,2,0,100,1,0,35,0,0,11,40546,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On health below 35% - Spellcast Retaliation'),
+(@NPC_WARLORD_ZOLMAZ,0,5,0,38,0,100,0,0,1,0,0,1,1,7000,0,0,0,0,12,1,0,0,0,0,0,0, 'Warlord Zol''Maz - On data set 0 1 - Say line'),
+(@NPC_WARLORD_ZOLMAZ,0,6,7,52,0,100,0,1,@NPC_WARLORD_ZOLMAZ,0,0,1,2,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Warlord Zol''Maz - On text over - Say line'),
+(@NPC_WARLORD_ZOLMAZ,0,7,8,61,0,100,0,0,0,0,0,19,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On text over - Remove unit_flags IMMUNE_TO_PC'),
+(@NPC_WARLORD_ZOLMAZ,0,8,0,61,0,100,0,0,0,0,0,49,0,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Warlord Zol''Maz - On text over - Start attack'),
+(@NPC_WARLORD_ZOLMAZ,0,9,10,6,0,100,0,0,0,0,0,32,0,0,0,0,0,0,14,57571,@GO_ZOLMAZ_GATE,0,0,0,0,0, 'Warlord Zol''Maz - On death - Reset gate'),
+(@NPC_WARLORD_ZOLMAZ,0,10,0,61,0,100,0,0,0,0,0,18,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On death - Set unit_flags IMMUNE_TO_PC'),
+(@NPC_WARLORD_ZOLMAZ,0,11,10,21,0,100,0,0,0,0,0,32,0,0,0,0,0,0,14,57571,@GO_ZOLMAZ_GATE,0,0,0,0,0, 'Warlord Zol''Maz - On homeposition reached - Reset gate'),
+(@NPC_ENCHANTED_TIKI,0,0,1,54,0,100,0,0,0,0,0,45,0,1,0,0,0,0,19,@NPC_WARLORD_ZOLMAZ,50,0,0,0,0,0, 'Enchanted Tiki - Just summoned - Set data 0 1'),
+(@NPC_ENCHANTED_TIKI,0,1,2,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Enchanted Tiki - Just summoned - Store targetlist'),
+(@NPC_ENCHANTED_TIKI,0,2,3,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,19,@NPC_WARLORD_ZOLMAZ,50,0,0,0,0,0, 'Enchanted Tiki - Just summoned - Send target list'),
+(@NPC_ENCHANTED_TIKI,0,3,0,61,0,100,0,0,0,0,0,3,0,25749,0,0,0,0,1,0,0,0,0,0,0,0, 'Enchanted Tiki - Just summoned - Set modelid'),
+(@GO_GATE_LEVER,1,0,0,70,0,100,0,2,0,0,0,9,0,0,0,0,0,0,14,57571,@GO_ZOLMAZ_GATE,0,0,0,0,0, 'Gate lever - On activate - Activate gate');
diff --git a/sql/updates/world/2012_12_19_00_world_sai.sql b/sql/updates/world/2012_12_19_00_world_sai.sql
new file mode 100644
index 00000000000..170028e8a68
--- /dev/null
+++ b/sql/updates/world/2012_12_19_00_world_sai.sql
@@ -0,0 +1,106 @@
+-- Remove from quest_end_scripts
+DELETE FROM `quest_end_scripts` WHERE `id` IN (12657,12597,10988,10850,10447,9565);
+
+-- Convert quest_end_script "12657" to SAI
+-- Indexes:
+SET @DARION_MORGRAINE := 28444;
+SET @SCRIPT := @DARION_MORGRAINE * 100;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@DARION_MORGRAINE;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@DARION_MORGRAINE;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@DARION_MORGRAINE AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT 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
+(@DARION_MORGRAINE,0,0,0,20,0,100,0,12657,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - On quest 12657 rewarded - Start action list'),
+(@DARION_MORGRAINE,0,1,0,1,0,100,0,60000,90000,60000,90000,4,12893,1,0,0,0,0,0,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - OOC - Play sound'),
+(@SCRIPT,9,0,0,0,0,100,0,16000,16000,0,0,5,22,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - Action 0 - Play emote 22'),
+(@SCRIPT,9,1,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2465.47,-5567.3,372.16,1.64, 'Highlord Darion Morgraine - Action 1 - Summon'),
+(@SCRIPT,9,2,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2434.52,-5588.56,372.16,3.26, 'Highlord Darion Morgraine - Action 2 - Summon'),
+(@SCRIPT,9,3,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2455.59,-5618.32,372.16,4.59, 'Highlord Darion Morgraine - Action 3 - Summon'),
+(@SCRIPT,9,4,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2439.31,-5608.69,372.16,3.77, 'Highlord Darion Morgraine - Action 4 - Summon'),
+(@SCRIPT,9,5,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2486.72,-5598.66,372.16,6.02, 'Highlord Darion Morgraine - Action 5 - Summon'),
+(@SCRIPT,9,6,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - Action 6 - Say line 0'),
+(@SCRIPT,9,7,0,0,0,100,0,16000,16000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - Action 7 - Say line 1');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry` IN (2000005409,2000005410);
+DELETE FROM `creature_text` WHERE `entry`=@DARION_MORGRAINE;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@DARION_MORGRAINE,0,0, '%s calls upon the mighty armies of the Scourge!',42,0,100,1,0,0, 'Highlord Darion Morgraine'),
+(@DARION_MORGRAINE,1,0, 'Armies of the Scourge, hear my call! The scarlet apocalypse has begun! Tear this land asunder and leave only death in your wake!',12,0,100,1,0,0, 'Highlord Darion Morgraine');
+
+-- Convert quest_end_script "10988" to SAI
+-- Indexes:
+SET @Arthorn_Windsong := 22924;
+SET @SCRIPT := @Arthorn_Windsong * 100;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Arthorn_Windsong;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Arthorn_Windsong AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT 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
+(@Arthorn_Windsong,0,0,0,20,0,100,0,10988,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Captain Brandon - On quest 10988 rewarded - Start script'),
+(@SCRIPT,9,0,0,0,0,100,0,30000,30000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 0 - Say line 0'),
+(@SCRIPT,9,1,0,0,0,100,0,43000,43000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 1 - Say line 1'),
+(@SCRIPT,9,2,0,0,0,100,0,43000,43000,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 2 - Play emote 1'),
+(@SCRIPT,9,3,0,0,0,100,0,56000,56000,0,0,69,1,0,0,0,0,0,8,0,0,0,3024.32,5511.29,146.051,2.31064, 'Arthorn Windsong - Action 3 - Move to'),
+(@SCRIPT,9,4,0,0,0,100,0,17000,17000,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 4 - Play emote 1'),
+(@SCRIPT,9,5,0,0,0,100,0,17000,17000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 5 - Say line 2'),
+(@SCRIPT,9,6,0,0,0,100,0,11000,11000,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 6 - Play emote'),
+(@SCRIPT,9,7,0,0,0,100,0,11000,11000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 7- Say line 3'),
+(@SCRIPT,9,8,0,0,0,100,0,1000,1000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 8 - Say line 4'),
+(@SCRIPT,9,9,0,0,0,100,0,11000,11000,0,0,11,39679,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 9 - Cast spell'),
+(@SCRIPT,9,10,0,0,0,100,0,10000,10000,0,0,69,0,0,0,0,0,0,8,0,0,0,3044.22,5510.91,146.033,4.654, 'Windsong - Action 10 - Move to pos'),
+(@SCRIPT,9,11,0,0,0,100,0,56000,56000,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 11 - Say line 5');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000073,2000000074,2000000072,2000000071,2000000070,2000000075);
+DELETE FROM `creature_text` WHERE `entry`=@Arthorn_Windsong;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@Arthorn_Windsong,0,0, 'There''s something else here, too. After a discription of a bloody battle and the downfall of the raven, there''s a prophecy. Anzu will haunt the dreams of his enemies, twisting them to affect a return to this world...',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,1,0, 'The tablet has the confirmation we need, just as I thought. Now, we have to use this information to draw out and defeat this Anzu before he can do any more damage to the Emerald Dream!',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,2,0, 'It''s all here... how the raven''s followers captured and subdued the sprints of rivals, trapping them forever within stone statues! The tablet even mentions the raven god''s name -- Anzu. I''d thought it was lost to history!',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,3,0, 'This is it! This is really it -- the Book of the Raven!',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,4,0, 'It would''ve taken years to find the Book of the Raven without you, young sparrowhawk. Return to your home in Nagrand with our gratitude.',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,5,0, 'Since the sparrowhawks have proven such a success in hunting down the raven stones, Watcher Elaira has trained another one to relay my voice at a great distance. He can help us communicate as you investigate the bird spirits revealed in the tablet!',12,0,100,1,0,0, 'Arthorn Windsong');
+
+-- Convert quest_end_script "10850" to SAI
+-- Indexes:
+SET @Inactive_Fel_Reaver := 22293;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Inactive_Fel_Reaver;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Inactive_Fel_Reaver 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
+(@Inactive_Fel_Reaver,0,0,0,20,0,100,0,10850,0,0,0,15,10855,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Inactive Fel Reaver - On quest 10850 rewarded - Call Quest Explored for invoker');
+
+-- Convert quest_end_script "10447" to SAI
+-- Indexes:
+SET @Toki := 18447;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Toki;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Toki 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
+(@Toki,0,0,0,20,0,100,0,10447,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Toki - On quest 10447 rewarded - Say line 0');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry`=2000000062;
+DELETE FROM `creature_text` WHERE `entry`=@Toki;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@Toki,0,0, 'The threat be over! $N be savin'' us all!',12,0,100,1,0,0, 'Toki');
+
+-- Convert quest_end_script "9565" to SAI
+-- Indexes:
+SET @Blood_Crystal := 181748;
+SET @SCRIPT := @Blood_Crystal * 100;
+
+-- Add SAI support
+UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@Blood_Crystal;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Blood_Crystal AND `source_type`=1;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT 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
+(@Blood_Crystal,1,0,0,20,0,100,0,9565,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Blood Crystal - On quest 9565 rewarded - Start actionlist'),
+(@SCRIPT,9,0,0,0,0,100,0,2000,2000,0,0,12,17189,3,180000,0,0,0,8,0,0,0,-3105.36,-12549.2,-1.28,4.6, 'Blood Crystal - Action 0 - Summon'),
+(@SCRIPT,9,1,0,0,0,100,0,2000,2000,0,0,12,17189,3,180000,0,0,0,8,0,0,0,-3128.49,-12540.2,-2.54,1.5, 'Blood Crystal - Action 1 - Summon');
diff --git a/sql/updates/world/2012_12_19_01_world_viscidus.sql b/sql/updates/world/2012_12_19_01_world_viscidus.sql
new file mode 100644
index 00000000000..16d33b80b8f
--- /dev/null
+++ b/sql/updates/world/2012_12_19_01_world_viscidus.sql
@@ -0,0 +1,11 @@
+DELETE FROM `spell_dbc` WHERE `Id`=25893;
+INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`AttributesEx2`,`AttributesEx3`,`AttributesEx4`,`AttributesEx5`,`AttributesEx6`,`AttributesEx7`,`Stances`,`StancesNot`,`Targets`,`CastingTimeIndex`,`AuraInterruptFlags`,`ProcFlags`,`ProcChance`,`ProcCharges`,`MaxLevel`,`BaseLevel`,`SpellLevel`,`DurationIndex`,`RangeIndex`,`StackAmount`,`EquippedItemClass`,`EquippedItemSubClassMask`,`EquippedItemInventoryTypeMask`,`Effect1`,`Effect2`,`Effect3`,`EffectDieSides1`,`EffectDieSides2`,`EffectDieSides3`,`EffectRealPointsPerLevel1`,`EffectRealPointsPerLevel2`,`EffectRealPointsPerLevel3`,`EffectBasePoints1`,`EffectBasePoints2`,`EffectBasePoints3`,`EffectMechanic1`,`EffectMechanic2`,`EffectMechanic3`,`EffectImplicitTargetA1`,`EffectImplicitTargetA2`,`EffectImplicitTargetA3`,`EffectImplicitTargetB1`,`EffectImplicitTargetB2`,`EffectImplicitTargetB3`,`EffectRadiusIndex1`,`EffectRadiusIndex2`,`EffectRadiusIndex3`,`EffectApplyAuraName1`,`EffectApplyAuraName2`,`EffectApplyAuraName3`,`EffectAmplitude1`,`EffectAmplitude2`,`EffectAmplitude3`,`EffectMultipleValue1`,`EffectMultipleValue2`,`EffectMultipleValue3`,`EffectMiscValue1`,`EffectMiscValue2`,`EffectMiscValue3`,`EffectMiscValueB1`,`EffectMiscValueB2`,`EffectMiscValueB3`,`EffectTriggerSpell1`,`EffectTriggerSpell2`,`EffectTriggerSpell3`,`EffectSpellClassMaskA1`,`EffectSpellClassMaskA2`,`EffectSpellClassMaskA3`,`EffectSpellClassMaskB1`,`EffectSpellClassMaskB2`,`EffectSpellClassMaskB3`,`EffectSpellClassMaskC1`,`EffectSpellClassMaskC2`,`EffectSpellClassMaskC3`,`MaxTargetLevel`,`SpellFamilyName`,`SpellFamilyFlags1`,`SpellFamilyFlags2`,`SpellFamilyFlags3`,`MaxAffectedTargets`,`DmgClass`,`PreventionType`,`DmgMultiplier1`,`DmgMultiplier2`,`DmgMultiplier3`,`AreaGroupId`,`SchoolMask`,`Comment`) VALUES
+(25893,0,0,8388864,268435456,5,269484032,0,0,0,0,0,0,0,1,0,0,101,0,0,0,0,225,13,20,-1,0,0,6,0,0,1,0,0,0,0,0,-5,0,0,0,0,0,1,0,0,0,0,0,0,0,0,61,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,1,1,0,0,0,'Viscidus Shrinks');
+DELETE FROM `creature_text` WHERE `entry`=15299;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(15299, 0, 0, 'Viscidus begins to slow!', 41, 0, 100, 0, 0, 0, 'EMOTE_SLOW'),
+(15299, 1, 0, 'Viscidus is freezing up!', 41, 0, 100, 0, 0, 0, 'EMOTE_FREEZE'),
+(15299, 2, 0, 'Viscidus is frozen solid!', 41, 0, 100, 0, 0, 0, 'EMOTE_FROZEN'),
+(15299, 3, 0, 'Viscidus begins to crack!', 41, 0, 100, 0, 0, 0, 'EMOTE_CRACK'),
+(15299, 4, 0, 'Viscidus looks ready to shatter!', 41, 0, 100, 0, 0, 0, 'EMOTE_SHATTER'),
+(15299, 5, 0, 'Viscidus explodes!', 41, 0, 100, 0, 0, 0, 'EMOTE_EXPLODE');
diff --git a/sql/updates/world/2012_12_19_02_world_sai.sql b/sql/updates/world/2012_12_19_02_world_sai.sql
new file mode 100644
index 00000000000..c6367e1a8ca
--- /dev/null
+++ b/sql/updates/world/2012_12_19_02_world_sai.sql
@@ -0,0 +1,19 @@
+SET @SASHA := 26935;
+SET @HORSE := 27626;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SASHA 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
+(@SASHA,0,0,3,38,1,100,0,0,1,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sasha - On data set 0 1 (phase 1) - Say line'),
+(@SASHA,0,1,3,38,1,100,0,0,2,0,0,1,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sasha - On data set 0 2 (phase 1) - Say line'),
+(@SASHA,0,2,3,38,1,100,0,0,3,0,0,1,2,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sasha - On data set 0 3 (phase 1) - Say line'),
+(@SASHA,0,3,0,61,0,100,0,0,0,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - Linked with events 0,1,2 - Set data 0 0'),
+(@SASHA,0,4,5,38,0,100,0,0,4,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - On data set 0 4 - Set event phase 0'),
+(@SASHA,0,5,0,61,0,100,0,0,0,0,0,80,@SASHA*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - On data set 0 4 - Run script'),
+(@SASHA,0,6,0,25,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - On reset - Set event phase 1'),
+(@SASHA,0,7,0,54,0,100,0,0,0,0,0,53,1,@SASHA,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - Just summoned - Start WP movement'),
+(@SASHA,0,8,9,40,0,100,0,4,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - On WP 4 reached - Set unit_field_bytes1 (kneel)'),
+(@SASHA,0,9,0,61,0,100,0,0,0,0,0,80,@SASHA*100+1,2,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - On WP 4 reached - Run script');
+
+DELETE FROM `waypoints` WHERE `entry`=@HORSE AND `pointid`=19;
+INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
+(@HORSE,19,4056.67,-4143.688,211.3766,'');
diff --git a/sql/updates/world/2012_12_20_00_world_conditions.sql b/sql/updates/world/2012_12_20_00_world_conditions.sql
new file mode 100644
index 00000000000..53fc5733e53
--- /dev/null
+++ b/sql/updates/world/2012_12_20_00_world_conditions.sql
@@ -0,0 +1,3 @@
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=21885;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 21885, 0, 0, 31, 0, 5, 178905, 0, 0, 0, 0, '', 'Heal Vylestem Vine - Vylestem Vine');
diff --git a/sql/updates/world/2012_12_20_01_world_conditions.sql b/sql/updates/world/2012_12_20_01_world_conditions.sql
new file mode 100644
index 00000000000..9d1851305a3
--- /dev/null
+++ b/sql/updates/world/2012_12_20_01_world_conditions.sql
@@ -0,0 +1,3 @@
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=55647;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 55647, 0, 0, 31, 0, 5, 191840, 0, 0, 0, 0, '', 'Frost Oil - Plagued Proto-Drake Egg');
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index b7fa3940a20..78c22e74f44 100644
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -183,6 +183,9 @@ void PetAI::UpdateAI(const uint32 diff)
}
}
+ if (spellInfo->HasEffect(SPELL_EFFECT_JUMP_DEST))
+ continue; // Pets must only jump to target
+
// No enemy, check friendly
if (!spellUsed)
{
@@ -266,6 +269,7 @@ void PetAI::UpdateAllies()
//only pet and owner/not in group->ok
if (m_AllySet.size() == 2 && !group)
return;
+
//owner is in group; group members filled in already (no raid -> subgroupcount = whole count)
if (group && !group->isRaidGroup() && m_AllySet.size() == (group->GetMembersCount() + 2))
return;
@@ -578,11 +582,19 @@ void PetAI::ReceiveEmote(Player* player, uint32 emote)
{
case TEXT_EMOTE_COWER:
if (me->isPet() && me->ToPet()->IsPetGhoul())
- me->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
+ me->HandleEmoteCommand(/*EMOTE_ONESHOT_ROAR*/EMOTE_ONESHOT_OMNICAST_GHOUL);
break;
case TEXT_EMOTE_ANGRY:
if (me->isPet() && me->ToPet()->IsPetGhoul())
- me->HandleEmoteCommand(EMOTE_ONESHOT_COWER);
+ me->HandleEmoteCommand(/*EMOTE_ONESHOT_COWER*/EMOTE_STATE_STUN);
+ break;
+ case TEXT_EMOTE_GLARE:
+ if (me->isPet() && me->ToPet()->IsPetGhoul())
+ me->HandleEmoteCommand(EMOTE_STATE_STUN);
+ break;
+ case TEXT_EMOTE_SOOTHE:
+ if (me->isPet() && me->ToPet()->IsPetGhoul())
+ me->HandleEmoteCommand(EMOTE_ONESHOT_OMNICAST_GHOUL);
break;
}
}
diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h
index 2eab0e89fcd..8b31bb5c54d 100644
--- a/src/server/game/AI/CoreAI/UnitAI.h
+++ b/src/server/game/AI/CoreAI/UnitAI.h
@@ -29,17 +29,6 @@ class Quest;
class Unit;
struct AISpellInfoType;
-// Default script texts
-enum GeneralScriptTexts
-{
- DEFAULT_TEXT = -1000000,
- EMOTE_GENERIC_FRENZY_KILL = -1000001,
- EMOTE_GENERIC_FRENZY = -1000002,
- EMOTE_GENERIC_ENRAGED = -1000003,
- EMOTE_GENERIC_BERSERK = -1000004,
- EMOTE_GENERIC_BERSERK_RAID = -1000005 // RaidBossEmote version of the previous one
-};
-
//Selection method used by SelectTarget
enum SelectAggroTarget
{
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
index 4738d8f6f27..161c4a578ce 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
@@ -419,6 +419,8 @@ bool AuctionHouseObject::RemoveAuction(AuctionEntry* auction, uint32 /*itemEntry
// we need to delete the entry, it is not referenced any more
delete auction;
+ auction = NULL;
+
return wasInMap;
}
@@ -471,8 +473,8 @@ void AuctionHouseObject::Update()
auction->DeleteFromDB(trans);
CharacterDatabase.CommitTransaction(trans);
- RemoveAuction(auction, itemEntry);
sAuctionMgr->RemoveAItem(auction->itemGUIDLow);
+ RemoveAuction(auction, itemEntry);
}
while (result->NextRow());
}
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 4600caa63e3..8d39e459187 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -411,6 +411,16 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData* data)
SetPvP(false);
}
+ // updates spell bars for vehicles and set player's faction - should be called here, to overwrite faction that is set from the new template
+ if (IsVehicle())
+ {
+ if (Player* owner = Creature::GetCharmerOrOwnerPlayerOrPlayerItself()) // this check comes in case we don't have a player
+ {
+ setFaction(owner->getFaction()); // vehicles should have same as owner faction
+ owner->VehicleSpellInitialize();
+ }
+ }
+
// trigger creature is always not selectable and can not be attacked
if (isTrigger())
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 3c58e9cb467..1fa6cbd9308 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -12634,22 +12634,22 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
}
}
-void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequip_check)
+void Player::DestroyItemCount(uint32 itemEntry, uint32 count, bool update, bool unequip_check)
{
- sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: DestroyItemCount item = %u, count = %u", item, count);
+ sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: DestroyItemCount item = %u, count = %u", itemEntry, count);
uint32 remcount = 0;
// in inventory
for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; ++i)
{
- if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
+ if (Item* item = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
{
- if (pItem->GetEntry() == item && !pItem->IsInTrade())
+ if (item->GetEntry() == itemEntry && !item->IsInTrade())
{
- if (pItem->GetCount() + remcount <= count)
+ if (item->GetCount() + remcount <= count)
{
// all items in inventory can unequipped
- remcount += pItem->GetCount();
+ remcount += item->GetCount();
DestroyItem(INVENTORY_SLOT_BAG_0, i, update);
if (remcount >= count)
@@ -12657,11 +12657,11 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
}
else
{
- ItemRemovedQuestCheck(pItem->GetEntry(), count - remcount);
- pItem->SetCount(pItem->GetCount() - count + remcount);
+ ItemRemovedQuestCheck(item->GetEntry(), count - remcount);
+ item->SetCount(item->GetCount() - count + remcount);
if (IsInWorld() && update)
- pItem->SendUpdateToPlayer(this);
- pItem->SetState(ITEM_CHANGED, this);
+ item->SendUpdateToPlayer(this);
+ item->SetState(ITEM_CHANGED, this);
return;
}
}
@@ -12670,14 +12670,14 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
for (uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
{
- if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
+ if (Item* item = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
{
- if (pItem->GetEntry() == item && !pItem->IsInTrade())
+ if (item->GetEntry() == itemEntry && !item->IsInTrade())
{
- if (pItem->GetCount() + remcount <= count)
+ if (item->GetCount() + remcount <= count)
{
// all keys can be unequipped
- remcount += pItem->GetCount();
+ remcount += item->GetCount();
DestroyItem(INVENTORY_SLOT_BAG_0, i, update);
if (remcount >= count)
@@ -12685,11 +12685,11 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
}
else
{
- ItemRemovedQuestCheck(pItem->GetEntry(), count - remcount);
- pItem->SetCount(pItem->GetCount() - count + remcount);
+ ItemRemovedQuestCheck(item->GetEntry(), count - remcount);
+ item->SetCount(item->GetCount() - count + remcount);
if (IsInWorld() && update)
- pItem->SendUpdateToPlayer(this);
- pItem->SetState(ITEM_CHANGED, this);
+ item->SendUpdateToPlayer(this);
+ item->SetState(ITEM_CHANGED, this);
return;
}
}
@@ -12699,18 +12699,18 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
// in inventory bags
for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
{
- if (Bag* pBag = GetBagByPos(i))
+ if (Bag* bag = GetBagByPos(i))
{
- for (uint32 j = 0; j < pBag->GetBagSize(); j++)
+ for (uint32 j = 0; j < bag->GetBagSize(); j++)
{
- if (Item* pItem = pBag->GetItemByPos(j))
+ if (Item* item = bag->GetItemByPos(j))
{
- if (pItem->GetEntry() == item && !pItem->IsInTrade())
+ if (item->GetEntry() == itemEntry && !item->IsInTrade())
{
// all items in bags can be unequipped
- if (pItem->GetCount() + remcount <= count)
+ if (item->GetCount() + remcount <= count)
{
- remcount += pItem->GetCount();
+ remcount += item->GetCount();
DestroyItem(i, j, update);
if (remcount >= count)
@@ -12718,11 +12718,11 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
}
else
{
- ItemRemovedQuestCheck(pItem->GetEntry(), count - remcount);
- pItem->SetCount(pItem->GetCount() - count + remcount);
+ ItemRemovedQuestCheck(item->GetEntry(), count - remcount);
+ item->SetCount(item->GetCount() - count + remcount);
if (IsInWorld() && update)
- pItem->SendUpdateToPlayer(this);
- pItem->SetState(ITEM_CHANGED, this);
+ item->SendUpdateToPlayer(this);
+ item->SetState(ITEM_CHANGED, this);
return;
}
}
@@ -12734,15 +12734,15 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
// in equipment and bag list
for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_BAG_END; i++)
{
- if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
+ if (Item* item = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
{
- if (pItem && pItem->GetEntry() == item && !pItem->IsInTrade())
+ if (item && item->GetEntry() == itemEntry && !item->IsInTrade())
{
- if (pItem->GetCount() + remcount <= count)
+ if (item->GetCount() + remcount <= count)
{
if (!unequip_check || CanUnequipItem(INVENTORY_SLOT_BAG_0 << 8 | i, false) == EQUIP_ERR_OK)
{
- remcount += pItem->GetCount();
+ remcount += item->GetCount();
DestroyItem(INVENTORY_SLOT_BAG_0, i, update);
if (remcount >= count)
@@ -12751,16 +12751,78 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
}
else
{
- ItemRemovedQuestCheck(pItem->GetEntry(), count - remcount);
- pItem->SetCount(pItem->GetCount() - count + remcount);
+ ItemRemovedQuestCheck(item->GetEntry(), count - remcount);
+ item->SetCount(item->GetCount() - count + remcount);
+ if (IsInWorld() && update)
+ item->SendUpdateToPlayer(this);
+ item->SetState(ITEM_CHANGED, this);
+ return;
+ }
+ }
+ }
+ }
+
+ // in bank
+ for (uint8 i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; i++)
+ {
+ if (Item* item = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
+ {
+ if (item->GetEntry() == itemEntry && !item->IsInTrade())
+ {
+ if (item->GetCount() + remcount <= count)
+ {
+ remcount += item->GetCount();
+ DestroyItem(INVENTORY_SLOT_BAG_0, i, update);
+ if (remcount >= count)
+ return;
+ }
+ else
+ {
+ ItemRemovedQuestCheck(item->GetEntry(), count - remcount);
+ item->SetCount(item->GetCount() - count + remcount);
if (IsInWorld() && update)
- pItem->SendUpdateToPlayer(this);
- pItem->SetState(ITEM_CHANGED, this);
+ item->SendUpdateToPlayer(this);
+ item->SetState(ITEM_CHANGED, this);
return;
}
}
}
}
+
+ // in bank bags
+ for (uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
+ {
+ if (Bag* bag = GetBagByPos(i))
+ {
+ for (uint32 j = 0; j < bag->GetBagSize(); j++)
+ {
+ if (Item* item = bag->GetItemByPos(j))
+ {
+ if (item->GetEntry() == itemEntry && !item->IsInTrade())
+ {
+ // all items in bags can be unequipped
+ if (item->GetCount() + remcount <= count)
+ {
+ remcount += item->GetCount();
+ DestroyItem(i, j, update);
+
+ if (remcount >= count)
+ return;
+ }
+ else
+ {
+ ItemRemovedQuestCheck(item->GetEntry(), count - remcount);
+ item->SetCount(item->GetCount() - count + remcount);
+ if (IsInWorld() && update)
+ item->SendUpdateToPlayer(this);
+ item->SetState(ITEM_CHANGED, this);
+ return;
+ }
+ }
+ }
+ }
+ }
+ }
}
void Player::DestroyZoneLimitedItem(bool update, uint32 new_zone)
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index f1d421b916a..a5a36001855 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -1038,6 +1038,9 @@ void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 dama
break;
}
+ // Script Hook For CalculateSpellDamageTaken -- Allow scripts to change the Damage post class mitigation calculations
+ sScriptMgr->ModifySpellDamageTaken(damageInfo->target, damageInfo->attacker, damage);
+
// Calculate absorb resist
if (damage > 0)
{
@@ -1134,6 +1137,9 @@ void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* dam
damage = MeleeDamageBonusDone(damageInfo->target, damage, damageInfo->attackType);
damage = damageInfo->target->MeleeDamageBonusTaken(this, damage, damageInfo->attackType);
+ // Script Hook For CalculateMeleeDamage -- Allow scripts to change the Damage pre class mitigation calculations
+ sScriptMgr->ModifyMeleeDamage(damageInfo->target, damageInfo->attacker, damage);
+
// Calculate armor reduction
if (IsDamageReducedByArmor((SpellSchoolMask)(damageInfo->damageSchoolMask)))
{
@@ -5566,37 +5572,28 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Shadow's Fate (Shadowmourne questline)
case 71169:
{
- target = triggeredByAura->GetCaster();
- if (!target)
- return false;
- Player* player = target->ToPlayer();
- if (!player)
- return false;
- // not checking Infusion auras because its in targetAuraSpell of credit spell
- if (player->GetQuestStatus(24749) == QUEST_STATUS_INCOMPLETE) // Unholy Infusion
- {
- if (GetEntry() != 36678) // Professor Putricide
- return false;
- CastSpell(target, 71518, true); // Quest Credit
- return true;
- }
- else if (player->GetQuestStatus(24756) == QUEST_STATUS_INCOMPLETE) // Blood Infusion
- {
- if (GetEntry() != 37955) // Blood-Queen Lana'thel
- return false;
- CastSpell(target, 72934, true); // Quest Credit
- return true;
- }
- else if (player->GetQuestStatus(24757) == QUEST_STATUS_INCOMPLETE) // Frost Infusion
+ uint32 spellId = 0;
+
+ switch (GetEntry())
{
- if (GetEntry() != 36853) // Sindragosa
- return false;
- CastSpell(target, 72289, true); // Quest Credit
- return true;
+ case 36678: // NPC: Professor Putricide
+ spellId = 71518; // Spell: Unholy Infusion Credit
+ break;
+ case 37955: // NPC: Blood-Queen Lana'thel
+ spellId = 72934; // Spell: Quest Credit
+ break;
+ case 36853: // NPC: Sindragosa <Queen of the Frostbrood>
+ spellId = 72289; // Spell: Frost Infusion Quest Credit
+ break;
+ default:
+ break;
}
- else if (player->GetQuestStatus(24547) == QUEST_STATUS_INCOMPLETE) // A Feast of Souls
- triggered_spell_id = 71203;
- break;
+ if (spellId)
+ CastSpell((Unit*)NULL, spellId, true);
+
+ CastSpell((Unit*)NULL, 71203, true);
+
+ return true;
}
// Essence of the Blood Queen
case 70871:
@@ -9045,23 +9042,31 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
return false;
Player* player = ToPlayer();
- if (player->GetQuestStatus(24749) == QUEST_STATUS_INCOMPLETE) // Unholy Infusion
+ if (player->GetQuestStatus(24547) != QUEST_STATUS_INCOMPLETE)
{
- if (!player->HasAura(71516) || victim->GetEntry() != 36678) // Shadow Infusion && Professor Putricide
- return false;
- }
- else if (player->GetQuestStatus(24756) == QUEST_STATUS_INCOMPLETE) // Blood Infusion
- {
- if (!player->HasAura(72154) || victim->GetEntry() != 37955) // Thirst Quenched && Blood-Queen Lana'thel
+ uint32 spellId = 0;
+ uint32 questId = 0;
+ switch (victim->GetEntry())
+ {
+ case 36678: // NPC: Professor Putricide
+ questId = 24749; // Quest: Unholy Infusion
+ spellId = 71516; // Spell: Shadow Infusion
+ break;
+ case 37955: // NPC: Blood-Queen Lana'thel
+ questId = 24756; // Quest: Blood Infusion
+ spellId = 72154; // Spell: Thirst Quenched
+ break;
+ case 36853: // NPC: Sindragosa
+ questId = 24757; // Quest: Frost Infusion
+ spellId = 72290; // Spell: Frost-Imbued Blade
+ break;
+ default:
return false;
- }
- else if (player->GetQuestStatus(24757) == QUEST_STATUS_INCOMPLETE) // Frost Infusion
- {
- if (!player->HasAura(72290) || victim->GetEntry() != 36853) // Frost-Imbued Blade && Sindragosa
+ }
+
+ if (player->GetQuestStatus(questId) != QUEST_STATUS_INCOMPLETE || !player->HasAura(spellId))
return false;
}
- else if (player->GetQuestStatus(24547) != QUEST_STATUS_INCOMPLETE) // A Feast of Souls
- return false;
if (victim->GetTypeId() != TYPEID_UNIT)
return false;
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 74423e2b362..70ac4aec4aa 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -1658,7 +1658,7 @@ bool ObjectMgr::MoveCreData(uint32 guid, uint32 mapId, Position pos)
Creature* creature = new Creature;
if (!creature->LoadCreatureFromDB(guid, map))
{
- sLog->outError(LOG_FILTER_GENERAL, "AddCreature: cannot add creature entry %u to map", guid);
+ sLog->outError(LOG_FILTER_GENERAL, "MoveCreData: Cannot add creature guid %u to map", guid);
delete creature;
return false;
}
@@ -1710,7 +1710,7 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 /*team*/, uint32 mapId, float
Creature* creature = new Creature;
if (!creature->LoadCreatureFromDB(guid, map))
{
- sLog->outError(LOG_FILTER_GENERAL, "AddCreature: cannot add creature entry %u to map", entry);
+ sLog->outError(LOG_FILTER_GENERAL, "AddCreature: Cannot add creature entry %u to map", entry);
delete creature;
return 0;
}
@@ -1736,7 +1736,6 @@ void ObjectMgr::LoadGameobjects()
if (!result)
{
sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 gameobjects. DB table `gameobject` is empty.");
-
return;
}
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index 488dbfc9159..4f45044d5f7 100644
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -378,14 +378,14 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
}
-void MotionMaster::MoveFall(uint32 id/*=0*/)
+void MotionMaster::MoveFall(uint32 id /*=0*/)
{
// use larger distance for vmap height search than in most other cases
float tz = _owner->GetMap()->GetHeight(_owner->GetPhaseMask(), _owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ(), true, MAX_FALL_DISTANCE);
if (tz <= INVALID_HEIGHT)
{
sLog->outDebug(LOG_FILTER_GENERAL, "MotionMaster::MoveFall: unable retrive a proper height at map %u (x: %f, y: %f, z: %f).",
- _owner->GetMap()->GetId(), _owner->GetPositionX(), _owner->GetPositionX(), _owner->GetPositionZ());
+ _owner->GetMap()->GetId(), _owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ());
return;
}
diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp
index b794d45423b..08b1495eb33 100644
--- a/src/server/game/Scripting/ScriptLoader.cpp
+++ b/src/server/game/Scripting/ScriptLoader.cpp
@@ -320,6 +320,7 @@ void AddSC_boss_ayamiss();
void AddSC_boss_ossirian();
void AddSC_instance_ruins_of_ahnqiraj();
void AddSC_boss_cthun(); //Temple of ahn'qiraj
+void AddSC_boss_viscidus();
void AddSC_boss_fankriss();
void AddSC_boss_huhuran();
void AddSC_bug_trio();
@@ -954,6 +955,7 @@ void AddKalimdorScripts()
AddSC_boss_ossirian();
AddSC_instance_ruins_of_ahnqiraj();
AddSC_boss_cthun(); //Temple of ahn'qiraj
+ AddSC_boss_viscidus();
AddSC_boss_fankriss();
AddSC_boss_huhuran();
AddSC_bug_trio();
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index 6682d3c11e3..401b0e1728b 100644
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -160,83 +160,7 @@ class ScriptRegistry
if (!V) \
return R;
-void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* target)
-{
- if (!pSource)
- {
- sLog->outError(LOG_FILTER_TSCR, "DoScriptText entry %i, invalid Source pointer.", iTextEntry);
- return;
- }
-
- if (iTextEntry >= 0)
- {
- sLog->outError(LOG_FILTER_TSCR, "DoScriptText with source entry %u (TypeId=%u, guid=%u) attempts to process text entry %i, but text entry must be negative.", pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry);
- return;
- }
-
- const StringTextData* pData = sScriptSystemMgr->GetTextData(iTextEntry);
-
- if (!pData)
- {
- sLog->outError(LOG_FILTER_TSCR, "DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.", pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry);
- return;
- }
-
- sLog->outDebug(LOG_FILTER_TSCR, "DoScriptText: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", iTextEntry, pData->uiSoundId, pData->uiType, pData->uiLanguage, pData->uiEmote);
-
- if (pData->uiSoundId)
- {
- if (sSoundEntriesStore.LookupEntry(pData->uiSoundId))
- pSource->SendPlaySound(pData->uiSoundId, false);
- else
- sLog->outError(LOG_FILTER_TSCR, "DoScriptText entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId);
- }
-
- if (pData->uiEmote)
- {
- if (pSource->GetTypeId() == TYPEID_UNIT || pSource->GetTypeId() == TYPEID_PLAYER)
- ((Unit*)pSource)->HandleEmoteCommand(pData->uiEmote);
- else
- sLog->outError(LOG_FILTER_TSCR, "DoScriptText entry %i tried to process emote for invalid TypeId (%u).", iTextEntry, pSource->GetTypeId());
- }
-
- switch (pData->uiType)
- {
- case CHAT_TYPE_SAY:
- pSource->MonsterSay(iTextEntry, pData->uiLanguage, target ? target->GetGUID() : 0);
- break;
- case CHAT_TYPE_YELL:
- pSource->MonsterYell(iTextEntry, pData->uiLanguage, target ? target->GetGUID() : 0);
- break;
- case CHAT_TYPE_TEXT_EMOTE:
- pSource->MonsterTextEmote(iTextEntry, target ? target->GetGUID() : 0);
- break;
- case CHAT_TYPE_BOSS_EMOTE:
- pSource->MonsterTextEmote(iTextEntry, target ? target->GetGUID() : 0, true);
- break;
- case CHAT_TYPE_WHISPER:
- {
- if (target && target->GetTypeId() == TYPEID_PLAYER)
- pSource->MonsterWhisper(iTextEntry, target->GetGUID());
- else
- sLog->outError(LOG_FILTER_TSCR, "DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry);
-
- break;
- }
- case CHAT_TYPE_BOSS_WHISPER:
- {
- if (target && target->GetTypeId() == TYPEID_PLAYER)
- pSource->MonsterWhisper(iTextEntry, target->GetGUID(), true);
- else
- sLog->outError(LOG_FILTER_TSCR, "DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry);
- break;
- }
- case CHAT_TYPE_ZONE_YELL:
- pSource->MonsterYellToZone(iTextEntry, pData->uiLanguage, target ? target->GetGUID() : 0);
- break;
- }
-}
ScriptMgr::ScriptMgr()
: _scriptCount(0), _scheduledScripts(0)
@@ -293,14 +217,13 @@ void ScriptMgr::Unload()
SCR_CLEAR(PlayerScript);
SCR_CLEAR(GuildScript);
SCR_CLEAR(GroupScript);
+ SCR_CLEAR(UnitScript);
#undef SCR_CLEAR
}
void ScriptMgr::LoadDatabase()
{
- sScriptSystemMgr->LoadScriptTexts();
- sScriptSystemMgr->LoadScriptTextsCustom();
sScriptSystemMgr->LoadScriptWaypoints();
}
@@ -1416,6 +1339,22 @@ void ScriptMgr::OnGroupDisband(Group* group)
FOREACH_SCRIPT(GroupScript)->OnDisband(group);
}
+// Unit
+void ScriptMgr::ModifyPeriodicDamageAurasTick(Unit* target, Unit* attacker, uint32& damage)
+{
+ FOREACH_SCRIPT(UnitScript)->ModifyPeriodicDamageAurasTick(target, attacker, damage);
+}
+
+void ScriptMgr::ModifyMeleeDamage(Unit* target, Unit* attacker, uint32& damage)
+{
+ FOREACH_SCRIPT(UnitScript)->ModifyMeleeDamage(target, attacker, damage);
+}
+
+void ScriptMgr::ModifySpellDamageTaken(Unit* target, Unit* attacker, int32& damage)
+{
+ FOREACH_SCRIPT(UnitScript)->ModifySpellDamageTaken(target, attacker, damage);
+}
+
SpellScriptLoader::SpellScriptLoader(const char* name)
: ScriptObject(name)
{
@@ -1440,6 +1379,13 @@ FormulaScript::FormulaScript(const char* name)
ScriptRegistry<FormulaScript>::AddScript(this);
}
+UnitScript::UnitScript(const char* name, bool addToScripts)
+ : ScriptObject(name)
+{
+ if (addToScripts)
+ ScriptRegistry<UnitScript>::AddScript(this);
+}
+
WorldMapScript::WorldMapScript(const char* name, uint32 mapId)
: ScriptObject(name), MapScript<Map>(mapId)
{
@@ -1474,7 +1420,7 @@ ItemScript::ItemScript(const char* name)
}
CreatureScript::CreatureScript(const char* name)
- : ScriptObject(name)
+ : UnitScript(name, false)
{
ScriptRegistry<CreatureScript>::AddScript(this);
}
@@ -1552,7 +1498,7 @@ AchievementCriteriaScript::AchievementCriteriaScript(const char* name)
}
PlayerScript::PlayerScript(const char* name)
- : ScriptObject(name)
+ : UnitScript(name, false)
{
ScriptRegistry<PlayerScript>::AddScript(this);
}
@@ -1598,6 +1544,7 @@ template class ScriptRegistry<AchievementCriteriaScript>;
template class ScriptRegistry<PlayerScript>;
template class ScriptRegistry<GuildScript>;
template class ScriptRegistry<GroupScript>;
+template class ScriptRegistry<UnitScript>;
// Undefine utility macros.
#undef GET_SCRIPT_RET
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h
index 947be2b73fe..0f6fd5d018b 100644
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -69,8 +69,6 @@ struct OutdoorPvPData;
#define VISIBLE_RANGE 166.0f //MAX visible range (size of grid)
-// Generic scripting text function.
-void DoScriptText(int32 textEntry, WorldObject* pSource, Unit* target = NULL);
/*
TODO: Add more script type classes.
@@ -394,7 +392,24 @@ class ItemScript : public ScriptObject
virtual bool OnExpire(Player* /*player*/, ItemTemplate const* /*proto*/) { return false; }
};
-class CreatureScript : public ScriptObject, public UpdatableScript<Creature>
+class UnitScript : public ScriptObject
+{
+ protected:
+
+ UnitScript(const char* name, bool addToScripts = true);
+
+ public:
+ // Called when DoT's Tick Damage is being Dealt
+ virtual void ModifyPeriodicDamageAurasTick(Unit* /*target*/, Unit* /*attacker*/, uint32& /*damage*/) { }
+
+ // Called when Melee Damage is being Dealt
+ virtual void ModifyMeleeDamage(Unit* /*target*/, Unit* /*attacker*/, uint32& /*damage*/) { }
+
+ // Called when Spell Damage is being Dealt
+ virtual void ModifySpellDamageTaken(Unit* /*target*/, Unit* /*attacker*/, int32& /*damage*/) { }
+};
+
+class CreatureScript : public UnitScript, public UpdatableScript<Creature>
{
protected:
@@ -656,7 +671,7 @@ class AchievementCriteriaScript : public ScriptObject
virtual bool OnCheck(Player* source, Unit* target) = 0;
};
-class PlayerScript : public ScriptObject
+class PlayerScript : public UnitScript
{
protected:
@@ -1033,6 +1048,12 @@ class ScriptMgr
void OnGroupChangeLeader(Group* group, uint64 newLeaderGuid, uint64 oldLeaderGuid);
void OnGroupDisband(Group* group);
+ public: /* UnitScript */
+
+ void ModifyPeriodicDamageAurasTick(Unit* target, Unit* attacker, uint32& damage);
+ void ModifyMeleeDamage(Unit* target, Unit* attacker, uint32& damage);
+ void ModifySpellDamageTaken(Unit* target, Unit* attacker, int32& damage);
+
public: /* Scheduled scripts */
uint32 IncreaseScheduledScriptsCount() { return ++_scheduledScripts; }
diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp
index 41b41b91808..ea1cf6b1994 100644
--- a/src/server/game/Scripting/ScriptSystem.cpp
+++ b/src/server/game/Scripting/ScriptSystem.cpp
@@ -23,128 +23,6 @@
ScriptPointVector const SystemMgr::_empty;
-void SystemMgr::LoadScriptTexts()
-{
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Script Texts...");
- LoadTrinityStrings("script_texts", TEXT_SOURCE_RANGE, 1+(TEXT_SOURCE_RANGE*2));
-
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Script Texts additional data...");
- uint32 oldMSTime = getMSTime();
-
- // 0 1 2 3
- QueryResult result = WorldDatabase.Query("SELECT entry, sound, type, language, emote FROM script_texts");
-
- if (!result)
- {
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 additional Script Texts data. DB table `script_texts` is empty.");
- return;
- }
-
- uint32 uiCount = 0;
-
- do
- {
- Field* pFields = result->Fetch();
- StringTextData temp;
-
- int32 iId = pFields[0].GetInt32();
- temp.uiSoundId = pFields[1].GetUInt32();
- temp.uiType = pFields[2].GetUInt8();
- temp.uiLanguage = pFields[3].GetUInt8();
- temp.uiEmote = pFields[4].GetUInt16();
-
- if (iId >= 0)
- {
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `script_texts` is not a negative value.", iId);
- continue;
- }
-
- if (iId > TEXT_SOURCE_RANGE || iId <= TEXT_SOURCE_RANGE*2)
- {
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `script_texts` is out of accepted entry range for table.", iId);
- continue;
- }
-
- if (temp.uiSoundId)
- {
- if (!sSoundEntriesStore.LookupEntry(temp.uiSoundId))
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `script_texts` has soundId %u but sound does not exist.", iId, temp.uiSoundId);
- }
-
- if (!GetLanguageDescByID(temp.uiLanguage))
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `script_texts` using Language %u but Language does not exist.", iId, temp.uiLanguage);
-
- if (temp.uiType > CHAT_TYPE_ZONE_YELL)
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `script_texts` has Type %u but this Chat Type does not exist.", iId, temp.uiType);
-
- m_mTextDataMap[iId] = temp;
- ++uiCount;
- }
- while (result->NextRow());
-
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u additional Script Texts data in %u ms", uiCount, GetMSTimeDiffToNow(oldMSTime));
-}
-
-void SystemMgr::LoadScriptTextsCustom()
-{
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Custom Texts...");
- LoadTrinityStrings("custom_texts", TEXT_SOURCE_RANGE*2, 1+(TEXT_SOURCE_RANGE*3));
-
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Custom Texts additional data...");
-
- QueryResult result = WorldDatabase.Query("SELECT entry, sound, type, language, emote FROM custom_texts");
-
- if (!result)
- {
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 additional Custom Texts data. DB table `custom_texts` is empty.");
- return;
- }
-
- uint32 uiCount = 0;
-
- do
- {
- Field* pFields = result->Fetch();
- StringTextData temp;
-
- int32 iId = pFields[0].GetInt32();
- temp.uiSoundId = pFields[1].GetUInt32();
- temp.uiType = pFields[2].GetUInt8();
- temp.uiLanguage = pFields[3].GetUInt8();
- temp.uiEmote = pFields[4].GetUInt16();
-
- if (iId >= 0)
- {
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `custom_texts` is not a negative value.", iId);
- continue;
- }
-
- if (iId > TEXT_SOURCE_RANGE*2 || iId <= TEXT_SOURCE_RANGE*3)
- {
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `custom_texts` is out of accepted entry range for table.", iId);
- continue;
- }
-
- if (temp.uiSoundId)
- {
- if (!sSoundEntriesStore.LookupEntry(temp.uiSoundId))
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `custom_texts` has soundId %u but sound does not exist.", iId, temp.uiSoundId);
- }
-
- if (!GetLanguageDescByID(temp.uiLanguage))
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `custom_texts` using Language %u but Language does not exist.", iId, temp.uiLanguage);
-
- if (temp.uiType > CHAT_TYPE_ZONE_YELL)
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `custom_texts` has Type %u but this Chat Type does not exist.", iId, temp.uiType);
-
- m_mTextDataMap[iId] = temp;
- ++uiCount;
- }
- while (result->NextRow());
-
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u additional Custom Texts data.", uiCount);
-}
-
void SystemMgr::LoadScriptWaypoints()
{
uint32 oldMSTime = getMSTime();
diff --git a/src/server/game/Scripting/ScriptSystem.h b/src/server/game/Scripting/ScriptSystem.h
index 4211a63b043..cc65d493f3e 100644
--- a/src/server/game/Scripting/ScriptSystem.h
+++ b/src/server/game/Scripting/ScriptSystem.h
@@ -46,14 +46,6 @@ struct ScriptPointMove
typedef std::vector<ScriptPointMove> ScriptPointVector;
-struct StringTextData
-{
- uint32 uiSoundId;
- uint8 uiType;
- uint32 uiLanguage;
- uint32 uiEmote;
-};
-
class SystemMgr
{
friend class ACE_Singleton<SystemMgr, ACE_Null_Mutex>;
@@ -61,26 +53,11 @@ class SystemMgr
~SystemMgr() {}
public:
- //Maps and lists
- typedef UNORDERED_MAP<int32, StringTextData> TextDataMap;
typedef UNORDERED_MAP<uint32, ScriptPointVector> PointMoveMap;
//Database
- void LoadScriptTexts();
- void LoadScriptTextsCustom();
void LoadScriptWaypoints();
- //Retrive from storage
- StringTextData const* GetTextData(int32 textId) const
- {
- TextDataMap::const_iterator itr = m_mTextDataMap.find(textId);
-
- if (itr == m_mTextDataMap.end())
- return NULL;
-
- return &itr->second;
- }
-
ScriptPointVector const& GetPointMoveList(uint32 creatureEntry) const
{
PointMoveMap::const_iterator itr = m_mPointMoveMap.find(creatureEntry);
@@ -92,7 +69,6 @@ class SystemMgr
}
protected:
- TextDataMap m_mTextDataMap; //additional data for text strings
PointMoveMap m_mPointMoveMap; //coordinates for waypoints
private:
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index ae30cf72609..260091c9ed7 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -6169,6 +6169,9 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const
// ignore non positive values (can be result apply spellmods to aura damage
uint32 damage = std::max(GetAmount(), 0);
+ // Script Hook For HandlePeriodicDamageAurasTick -- Allow scripts to change the Damage pre class mitigation calculations
+ sScriptMgr->ModifyPeriodicDamageAurasTick(target, caster, damage);
+
if (GetAuraType() == SPELL_AURA_PERIODIC_DAMAGE)
{
damage = caster->SpellDamageBonusDone(target, GetSpellInfo(), damage, DOT, GetBase()->GetStackAmount());
diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.cpp b/src/server/game/Tools/CharacterDatabaseCleaner.cpp
index a342388f583..0ec56dd17fd 100644
--- a/src/server/game/Tools/CharacterDatabaseCleaner.cpp
+++ b/src/server/game/Tools/CharacterDatabaseCleaner.cpp
@@ -35,7 +35,7 @@ void CharacterDatabaseCleaner::CleanDatabase()
uint32 oldMSTime = getMSTime();
// check flags which clean ups are necessary
- QueryResult result = CharacterDatabase.Query("SELECT value FROM worldstates WHERE entry = 20004");
+ QueryResult result = CharacterDatabase.PQuery("SELECT value FROM worldstates WHERE entry = %d", WS_CLEANING_FLAGS);
if (!result)
return;
@@ -60,12 +60,11 @@ void CharacterDatabaseCleaner::CleanDatabase()
// NOTE: In order to have persistentFlags be set in worldstates for the next cleanup,
// you need to define them at least once in worldstates.
flags &= sWorld->getIntConfig(CONFIG_PERSISTENT_CHARACTER_CLEAN_FLAGS);
- CharacterDatabase.DirectPExecute("UPDATE worldstates SET value = %u WHERE entry = 20004", flags);
+ CharacterDatabase.DirectPExecute("UPDATE worldstates SET value = %u WHERE entry = %d", flags, WS_CLEANING_FLAGS);
sWorld->SetCleaningFlags(flags);
sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Cleaned character database in %u ms", GetMSTimeDiffToNow(oldMSTime));
-
}
void CharacterDatabaseCleaner::CheckUnique(const char* column, const char* table, bool (*check)(uint32))
diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h
index 1ac9b153dfd..c541945a1e4 100644
--- a/src/server/game/World/World.h
+++ b/src/server/game/World/World.h
@@ -471,8 +471,9 @@ enum WorldStates
{
WS_WEEKLY_QUEST_RESET_TIME = 20002, // Next weekly reset time
WS_BG_DAILY_RESET_TIME = 20003, // Next daily BG reset time
- WS_MONTHLY_QUEST_RESET_TIME = 20004, // Next monthly reset time
+ WS_CLEANING_FLAGS = 20004, // Cleaning Flags
WS_GUILD_DAILY_RESET_TIME = 20006, // Next guild cap reset time
+ WS_MONTHLY_QUEST_RESET_TIME = 20007, // Next monthly reset time
};
/// Storage class for commands issued for delayed execution
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp
index 9269bbb07ee..a57b06a8ab0 100644
--- a/src/server/scripts/Commands/cs_account.cpp
+++ b/src/server/scripts/Commands/cs_account.cpp
@@ -306,6 +306,9 @@ public:
{
handler->SendSysMessage(LANG_COMMAND_WRONGOLDPASSWORD);
handler->SetSentErrorMessage(true);
+ sLog->outInfo(LOG_FILTER_CHARACTER, "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change password.",
+ handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
+ handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow());
return false;
}
@@ -321,6 +324,9 @@ public:
{
case AOR_OK:
handler->SendSysMessage(LANG_COMMAND_PASSWORD);
+ sLog->outInfo(LOG_FILTER_CHARACTER, "Account: %u (IP: %s) Character:[%s] (GUID: %u) Changed Password.",
+ handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
+ handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow());
break;
case AOR_PASS_TOO_LONG:
handler->SendSysMessage(LANG_PASSWORD_TOO_LONG);
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
index 73fefe210df..4a08801c972 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
@@ -32,10 +32,11 @@ enum Midnight
SAY_MIDNIGHT_KILL = 0,
SAY_APPEAR = 1,
SAY_MOUNT = 2,
- SAY_KILL = 3,
- SAY_DISARMED = 4,
- SAY_DEATH = 5,
- SAY_RANDOM = 6,
+
+ SAY_KILL = 0,
+ SAY_DISARMED = 1,
+ SAY_DEATH = 2,
+ SAY_RANDOM = 3,
SPELL_SHADOWCLEAVE = 29832,
SPELL_INTANGIBLE_PRESENCE = 29833,
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp
index 56d07a49dc4..2e70081fe87 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp
@@ -27,9 +27,9 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1595045,
- SAY_FAIL = -1595046,
- SAY_DEATH = -1595047
+ SAY_AGGRO = 0,
+ SAY_DEATH = 1,
+ SAY_FAIL = 2
};
class boss_infinite_corruptor : public CreatureScript
@@ -59,11 +59,12 @@ public:
void EnterCombat(Unit* /*who*/)
{
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_INFINITE_EVENT, IN_PROGRESS);
}
- void UpdateAI(const uint32 /*diff*/)
+ void UpdateAI(uint32 const /*diff*/)
{
//Return since we have no target
if (!UpdateVictim())
@@ -74,6 +75,7 @@ public:
void JustDied(Unit* /*killer*/)
{
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_INFINITE_EVENT, DONE);
}
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
index 40d4d5d54b4..7dd395770db 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
@@ -29,7 +29,7 @@ EndScriptData */
enum Yells
{
- EMOTE_TARGET = -1509002
+ EMOTE_TARGET = 0
};
class boss_buru : public CreatureScript
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp
index 4abbf99d4ef..5f5b958fb9b 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp
@@ -21,8 +21,8 @@
enum Texts
{
- EMOTE_AGGRO = -1509000,
- EMOTE_MANA_FULL = -1509001
+ EMOTE_AGGRO = 0,
+ EMOTE_MANA_FULL = 1
};
enum Spells
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
index da67f93f968..1ffd74eddf3 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
@@ -23,22 +23,22 @@
enum Yells
{
// The time of our retribution is at hand! Let darkness reign in the hearts of our enemies! Sound: 8645 Emote: 35
- SAY_ANDOROV_INTRO = -1509003, // Before for the first wave
- SAY_ANDOROV_ATTACK = -1509004, // Beginning the event
- SAY_ANDOROV_WAVE_1 = -1509001, // When the first wave comes text: Kill first, ask questions later... Incoming! emote: 45 sound: 8653
- SAY_WAVE3 = -1509005,
- SAY_WAVE4 = -1509006,
- SAY_WAVE5 = -1509007,
- SAY_WAVE6 = -1509008,
- SAY_WAVE7 = -1509009,
- SAY_INTRO = -1509010,
- SAY_UNK1 = -1509011,
- SAY_UNK2 = -1509012,
- SAY_UNK3 = -1509013,
- SAY_DEATH = -1509014,
- SAY_CHANGEAGGRO = -1509015,
- SAY_KILLS_ANDOROV = -1509016,
- SAY_COMPLETE_QUEST = -1509017 // Yell when realm complete quest 8743 for world event
+ SAY_ANDOROV_INTRO = 0, // Before for the first wave
+ SAY_ANDOROV_ATTACK = 1, // Beginning the event
+
+ SAY_WAVE3 = 0,
+ SAY_WAVE4 = 1,
+ SAY_WAVE5 = 2,
+ SAY_WAVE6 = 3,
+ SAY_WAVE7 = 4,
+ SAY_INTRO = 5,
+ SAY_UNK1 = 6,
+ SAY_UNK2 = 7,
+ SAY_UNK3 = 8,
+ SAY_DEATH = 9,
+ SAY_CHANGEAGGRO = 10,
+ SAY_KILLS_ANDOROV = 11,
+ SAY_COMPLETE_QUEST = 12 // Yell when realm complete quest 8743 for world event
// Warriors, Captains, continue the fight! Sound: 8640
};
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
index 1cb69689b67..c97f8a0495f 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
@@ -58,8 +58,6 @@ EndScriptData */
* - the current phase is stored in the instance data to be easily shared between the eye and cthun.
*/
-#define PI 3.14
-
enum Phases
{
PHASE_NOT_STARTED = 0,
@@ -76,24 +74,6 @@ enum Phases
PHASE_CTHUN_DONE = 6,
};
-enum Creatures
-{
- MOB_CTHUN_PORTAL = 15896,
-
- // ***** Main Phase 1 ********
- BOSS_EYE_OF_CTHUN = 15589,
- MOB_CLAW_TENTACLE = 15725,
- MOB_EYE_TENTACLE = 15726,
- MOB_SMALL_PORTAL = 15904,
-
- // ***** Main Phase 2 ********
- MOB_BODY_OF_CTHUN = 15809,
- MOB_GIANT_CLAW_TENTACLE = 15728,
- MOB_GIANT_EYE_TENTACLE = 15334,
- MOB_FLESH_TENTACLE = 15802,
- MOB_GIANT_PORTAL = 15910,
-};
-
enum Spells
{
// ***** Main Phase 1 ********
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
index d0e97bc36c8..c97fd40929a 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* 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
@@ -16,18 +15,293 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_Viscidus
-SD%Complete: 0
-SDComment: place holder
-SDCategory: Temple of Ahn'Qiraj
-EndScriptData */
-
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "SpellInfo.h"
+#include "temple_of_ahnqiraj.h"
+
+enum Spells
+{
+ SPELL_POISON_SHOCK = 25993,
+ SPELL_POISONBOLT_VOLLEY = 25991,
+ SPELL_TOXIN = 26575,
+ SPELL_VISCIDUS_SLOWED = 26034,
+ SPELL_VISCIDUS_SLOWED_MORE = 26036,
+ SPELL_VISCIDUS_FREEZE = 25937,
+ SPELL_REJOIN_VISCIDUS = 25896,
+ SPELL_VISCIDUS_EXPLODE = 25938,
+ SPELL_VISCIDUS_SUICIDE = 26003,
+ SPELL_VISCIDUS_SHRINKS = 25893, // Removed from client, in world.spell_dbc
+
+ SPELL_MEMBRANE_VISCIDUS = 25994, // damage reduction spell - removed from DBC
+ SPELL_VISCIDUS_WEAKNESS = 25926, // aura which procs at damage - should trigger the slow spells - removed from DBC
+ SPELL_VISCIDUS_GROWS = 25897, // removed from DBC
+ SPELL_SUMMON_GLOBS = 25885, // summons npc 15667 using spells from 25865 to 25884; All spells have target coords - removed from DBC
+ SPELL_VISCIDUS_TELEPORT = 25904, // removed from DBC
+};
+
+enum Events
+{
+ EVENT_POISONBOLT_VOLLEY = 1,
+ EVENT_POISON_SHOCK = 2,
+ EVENT_RESET_PHASE = 3
+};
+
+enum Phases
+{
+ PHASE_FROST = 1,
+ PHASE_MELEE = 2,
+ PHASE_GLOB = 3
+};
+
+enum Emotes
+{
+ EMOTE_SLOW = 0,
+ EMOTE_FREEZE = 1,
+ EMOTE_FROZEN = 2,
+
+ EMOTE_CRACK = 3,
+ EMOTE_SHATTER = 4,
+ EMOTE_EXPLODE = 5
+};
+
+enum HitCounter
+{
+ HITCOUNTER_SLOW = 100,
+ HITCOUNTER_SLOW_MORE = 150,
+ HITCOUNTER_FREEZE = 200,
+
+ HITCOUNTER_CRACK = 50,
+ HITCOUNTER_SHATTER = 100,
+ HITCOUNTER_EXPLODE = 150,
+};
+
+enum MovePoints
+{
+ ROOM_CENTER = 1
+};
+
+Position const ViscidusCoord = { -7992.36f, 908.19f, -52.62f, 1.68f }; // TODO: Visci isn't in room middle
+float const RoomRadius = 40.0f; // TODO: Not sure if its correct
+
+class boss_viscidus : public CreatureScript
+{
+ public:
+ boss_viscidus() : CreatureScript("boss_viscidus") { }
+
+ struct boss_viscidusAI : public BossAI
+ {
+ boss_viscidusAI(Creature* creature) : BossAI(creature, DATA_VISCIDUS) { }
+
+ void Reset()
+ {
+ _Reset();
+ _hitcounter = 0;
+ _phase = PHASE_FROST;
+ }
+
+ void DamageTaken(Unit* attacker, uint32& /*damage*/)
+ {
+ if (_phase != PHASE_MELEE)
+ return;
+
+ ++_hitcounter;
+
+ if (attacker->HasUnitState(UNIT_STATE_MELEE_ATTACKING) && _hitcounter >= HITCOUNTER_EXPLODE)
+ {
+ Talk(EMOTE_EXPLODE);
+ events.Reset();
+ _phase = PHASE_GLOB;
+ DoCast(me, SPELL_VISCIDUS_EXPLODE);
+ me->SetVisible(false);
+ me->RemoveAura(SPELL_TOXIN);
+ me->RemoveAura(SPELL_VISCIDUS_FREEZE);
+
+ uint8 NumGlobes = me->GetHealthPct() / 5.0f;
+ for (uint8 i = 0; i < NumGlobes; ++i)
+ {
+ float Angle = i * 2 * M_PI / NumGlobes;
+ float X = ViscidusCoord.GetPositionX() + std::cos(Angle) * RoomRadius;
+ float Y = ViscidusCoord.GetPositionY() + std::sin(Angle) * RoomRadius;
+ float Z = -35.0f;
+
+ if (TempSummon* Glob = me->SummonCreature(NPC_GLOB_OF_VISCIDUS, X, Y, Z))
+ {
+ Glob->UpdateAllowedPositionZ(X, Y, Z);
+ Glob->NearTeleportTo(X, Y, Z, 0.0f);
+ Glob->GetMotionMaster()->MovePoint(ROOM_CENTER, ViscidusCoord);
+ }
+ }
+ }
+ else if (_hitcounter == HITCOUNTER_SHATTER)
+ Talk(EMOTE_SHATTER);
+ else if (_hitcounter == HITCOUNTER_CRACK)
+ Talk(EMOTE_CRACK);
+ }
+
+ void SpellHit(Unit* /*caster*/, SpellInfo const* spell)
+ {
+ if ((spell->GetSchoolMask() & SPELL_SCHOOL_MASK_FROST) && _phase == PHASE_FROST && me->GetHealthPct() > 5.0f)
+ {
+ ++_hitcounter;
+
+ if (_hitcounter >= HITCOUNTER_FREEZE)
+ {
+ _hitcounter = 0;
+ Talk(EMOTE_FROZEN);
+ _phase = PHASE_MELEE;
+ DoCast(me, SPELL_VISCIDUS_FREEZE);
+ me->RemoveAura(SPELL_VISCIDUS_SLOWED_MORE);
+ events.ScheduleEvent(EVENT_RESET_PHASE, 15000);
+ }
+ else if (_hitcounter >= HITCOUNTER_SLOW_MORE)
+ {
+ Talk(EMOTE_FREEZE);
+ me->RemoveAura(SPELL_VISCIDUS_SLOWED);
+ DoCast(me, SPELL_VISCIDUS_SLOWED_MORE);
+ }
+ else if (_hitcounter >= HITCOUNTER_SLOW)
+ {
+ Talk(EMOTE_SLOW);
+ DoCast(me, SPELL_VISCIDUS_SLOWED);
+ }
+ }
+ }
+
+ void EnterCombat(Unit* /*who*/)
+ {
+ _EnterCombat();
+ events.Reset();
+ InitSpells();
+ }
+
+ void InitSpells()
+ {
+ DoCast(me, SPELL_TOXIN);
+ events.ScheduleEvent(EVENT_POISONBOLT_VOLLEY, urand(10000, 15000));
+ events.ScheduleEvent(EVENT_POISON_SHOCK, urand(7000, 12000));
+ }
+
+ void EnterEvadeMode()
+ {
+ summons.DespawnAll();
+ ScriptedAI::EnterEvadeMode();
+ }
+
+ void JustDied(Unit* /*killer*/)
+ {
+ DoCast(me, SPELL_VISCIDUS_SUICIDE);
+ summons.DespawnAll();
+ }
+
+ void UpdateAI(uint32 const diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ if (_phase == PHASE_GLOB && summons.empty())
+ {
+ DoResetThreat();
+ me->NearTeleportTo(ViscidusCoord.GetPositionX(),
+ ViscidusCoord.GetPositionY(),
+ ViscidusCoord.GetPositionZ(),
+ ViscidusCoord.GetOrientation());
+
+ _hitcounter = 0;
+ _phase = PHASE_FROST;
+ InitSpells();
+ me->SetVisible(true);
+ }
+
+ events.Update(diff);
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_POISONBOLT_VOLLEY:
+ DoCast(me, SPELL_POISONBOLT_VOLLEY);
+ events.ScheduleEvent(EVENT_POISONBOLT_VOLLEY, urand(10000, 15000));
+ break;
+ case EVENT_POISON_SHOCK:
+ DoCast(me, SPELL_POISON_SHOCK);
+ events.ScheduleEvent(EVENT_POISON_SHOCK, urand(7000, 12000));
+ break;
+ case EVENT_RESET_PHASE:
+ _hitcounter = 0;
+ _phase = PHASE_FROST;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (_phase != PHASE_GLOB)
+ DoMeleeAttackIfReady();
+ }
+
+ private:
+ uint8 _hitcounter;
+ Phases _phase;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_viscidusAI(creature);
+ }
+};
+
+class npc_glob_of_viscidus : public CreatureScript
+{
+ public:
+ npc_glob_of_viscidus() : CreatureScript("boss_glob_of_viscidus") { }
+
+ struct npc_glob_of_viscidusAI : public ScriptedAI
+ {
+ npc_glob_of_viscidusAI(Creature* creature) : ScriptedAI(creature) { }
+
+ void JustDied(Unit* /*killer*/)
+ {
+ InstanceScript* Instance = me->GetInstanceScript();
+ if (!Instance)
+ return;
+
+ if (Creature* Viscidus = me->GetMap()->GetCreature(Instance->GetData64(DATA_VISCIDUS)))
+ {
+ if (BossAI* ViscidusAI = dynamic_cast<BossAI*>(Viscidus->GetAI()))
+ ViscidusAI->SummonedCreatureDespawn(me);
+
+ if (Viscidus->isAlive() && Viscidus->GetHealthPct() < 5.0f)
+ {
+ Viscidus->SetVisible(true);
+ Viscidus->getVictim()->Kill(Viscidus);
+ }
+ else
+ {
+ Viscidus->SetHealth(Viscidus->GetHealth() - Viscidus->GetMaxHealth() / 20);
+ Viscidus->GetAI()->DoCast(Viscidus, SPELL_VISCIDUS_SHRINKS);
+ }
+ }
+ }
-#define SPELL_POISON_SHOCK 25993
-#define SPELL_POISONBOLT_VOLLEY 25991
+ void MovementInform(uint32 /*type*/, uint32 id)
+ {
+ if (id == ROOM_CENTER)
+ {
+ DoCast(me, SPELL_REJOIN_VISCIDUS);
+ ((TempSummon*)me)->UnSummon();
+ }
+ }
+ };
-#define SPELL_TOXIN_CLOUD 25989
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_glob_of_viscidusAI(creature);
+ }
+};
+void AddSC_boss_viscidus()
+{
+ new boss_viscidus();
+ new npc_glob_of_viscidus();
+}
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp
index c8a1ff63925..3efdcd0dcf6 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp
@@ -29,71 +29,86 @@ EndScriptData */
class instance_temple_of_ahnqiraj : public InstanceMapScript
{
-public:
- instance_temple_of_ahnqiraj() : InstanceMapScript("instance_temple_of_ahnqiraj", 531) { }
+ public:
+ instance_temple_of_ahnqiraj() : InstanceMapScript("instance_temple_of_ahnqiraj", 531) { }
- InstanceScript* GetInstanceScript(InstanceMap* map) const
- {
- return new instance_temple_of_ahnqiraj_InstanceMapScript(map);
- }
+ InstanceScript* GetInstanceScript(InstanceMap* map) const
+ {
+ return new instance_temple_of_ahnqiraj_InstanceMapScript(map);
+ }
- struct instance_temple_of_ahnqiraj_InstanceMapScript : public InstanceScript
- {
- instance_temple_of_ahnqiraj_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ struct instance_temple_of_ahnqiraj_InstanceMapScript : public InstanceScript
+ {
+ instance_temple_of_ahnqiraj_InstanceMapScript(Map* map) : InstanceScript(map) {}
- //If Vem is dead...
- bool IsBossDied[3];
+ //If Vem is dead...
+ bool IsBossDied[3];
- //Storing Skeram, Vem and Kri.
- uint64 SkeramGUID;
- uint64 VemGUID;
- uint64 KriGUID;
- uint64 VeklorGUID;
- uint64 VeknilashGUID;
+ //Storing Skeram, Vem and Kri.
+ uint64 SkeramGUID;
+ uint64 VemGUID;
+ uint64 KriGUID;
+ uint64 VeklorGUID;
+ uint64 VeknilashGUID;
+ uint64 ViscidusGUID;
- uint32 BugTrioDeathCount;
+ uint32 BugTrioDeathCount;
- uint32 CthunPhase;
+ uint32 CthunPhase;
- void Initialize()
- {
- IsBossDied[0] = false;
- IsBossDied[1] = false;
- IsBossDied[2] = false;
+ void Initialize()
+ {
+ IsBossDied[0] = false;
+ IsBossDied[1] = false;
+ IsBossDied[2] = false;
- SkeramGUID = 0;
- VemGUID = 0;
- KriGUID = 0;
- VeklorGUID = 0;
- VeknilashGUID = 0;
+ SkeramGUID = 0;
+ VemGUID = 0;
+ KriGUID = 0;
+ VeklorGUID = 0;
+ VeknilashGUID = 0;
+ ViscidusGUID = 0;
- BugTrioDeathCount = 0;
+ BugTrioDeathCount = 0;
- CthunPhase = 0;
- }
+ CthunPhase = 0;
+ }
- void OnCreatureCreate(Creature* creature)
- {
- switch (creature->GetEntry())
+ void OnCreatureCreate(Creature* creature)
{
- case 15263: SkeramGUID = creature->GetGUID(); break;
- case 15544: VemGUID = creature->GetGUID(); break;
- case 15511: KriGUID = creature->GetGUID(); break;
- case 15276: VeklorGUID = creature->GetGUID(); break;
- case 15275: VeknilashGUID = creature->GetGUID(); break;
+ switch (creature->GetEntry())
+ {
+ case NPC_SKERAM:
+ SkeramGUID = creature->GetGUID();
+ break;
+ case NPC_VEM:
+ VemGUID = creature->GetGUID();
+ break;
+ case NPC_KRI:
+ KriGUID = creature->GetGUID();
+ break;
+ case NPC_VEKLOR:
+ VeklorGUID = creature->GetGUID();
+ break;
+ case NPC_VEKNILASH:
+ VeknilashGUID = creature->GetGUID();
+ break;
+ case NPC_VISCIDUS:
+ ViscidusGUID = creature->GetGUID();
+ break;
+ }
}
- }
- bool IsEncounterInProgress() const
- {
- //not active in AQ40
- return false;
- }
+ bool IsEncounterInProgress() const
+ {
+ //not active in AQ40
+ return false;
+ }
- uint32 GetData(uint32 type) const
- {
- switch (type)
+ uint32 GetData(uint32 type) const
{
+ switch (type)
+ {
case DATA_VEMISDEAD:
if (IsBossDied[0])
return 1;
@@ -114,14 +129,14 @@ public:
case DATA_CTHUN_PHASE:
return CthunPhase;
+ }
+ return 0;
}
- return 0;
- }
- uint64 GetData64(uint32 identifier) const
- {
- switch (identifier)
+ uint64 GetData64(uint32 identifier) const
{
+ switch (identifier)
+ {
case DATA_SKERAM:
return SkeramGUID;
case DATA_VEM:
@@ -132,14 +147,16 @@ public:
return VeklorGUID;
case DATA_VEKNILASH:
return VeknilashGUID;
- }
- return 0;
- } // end GetData64
+ case DATA_VISCIDUS:
+ return ViscidusGUID;
+ }
+ return 0;
+ } // end GetData64
- void SetData(uint32 type, uint32 data)
- {
- switch (type)
+ void SetData(uint32 type, uint32 data)
{
+ switch (type)
+ {
case DATA_VEM_DEATH:
IsBossDied[0] = true;
break;
@@ -159,9 +176,9 @@ public:
case DATA_CTHUN_PHASE:
CthunPhase = data;
break;
+ }
}
- }
- };
+ };
};
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h
index 13c3d56d14c..f154ccf2c5d 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h
@@ -19,19 +19,45 @@
#ifndef DEF_TEMPLE_OF_AHNQIRAJ_H
#define DEF_TEMPLE_OF_AHNQIRAJ_H
-#define DATA_SKERAM 1
-#define DATA_KRI 2
-#define DATA_VEM 3
-#define DATA_VEMISDEAD 4
-#define DATA_VEM_DEATH 5
-#define DATA_VEKLOR 6
-#define DATA_VEKLORISDEAD 7
-#define DATA_VEKLOR_DEATH 8
-#define DATA_VEKNILASH 9
-#define DATA_VEKNILASHISDEAD 10
-#define DATA_VEKNILASH_DEATH 11
-#define DATA_BUG_TRIO_DEATH 14
+enum DataTypes
+{
+ DATA_SKERAM = 1,
+ DATA_KRI = 2,
+ DATA_VEM = 3,
+ DATA_VEMISDEAD = 4,
+ DATA_VEM_DEATH = 5,
+ DATA_VEKLOR = 6,
+ DATA_VEKLORISDEAD = 7,
+ DATA_VEKLOR_DEATH = 8,
+ DATA_VEKNILASH = 9,
+ DATA_VEKNILASHISDEAD = 10,
+ DATA_VEKNILASH_DEATH = 11,
+ DATA_BUG_TRIO_DEATH = 14,
+ DATA_CTHUN_PHASE = 20,
+ DATA_VISCIDUS = 21
+};
-#define DATA_CTHUN_PHASE 20
+enum Creatures
+{
+ BOSS_EYE_OF_CTHUN = 15589,
+ MOB_CTHUN_PORTAL = 15896,
+ MOB_CLAW_TENTACLE = 15725,
+ MOB_EYE_TENTACLE = 15726,
+ MOB_SMALL_PORTAL = 15904,
+ MOB_BODY_OF_CTHUN = 15809,
+ MOB_GIANT_CLAW_TENTACLE = 15728,
+ MOB_GIANT_EYE_TENTACLE = 15334,
+ MOB_FLESH_TENTACLE = 15802,
+ MOB_GIANT_PORTAL = 15910,
+
+ NPC_VISCIDUS = 15299,
+ NPC_GLOB_OF_VISCIDUS = 15667,
+
+ NPC_SKERAM = 15263,
+ NPC_VEM = 15544,
+ NPC_KRI = 15511,
+ NPC_VEKLOR = 15276,
+ NPC_VEKNILASH = 15275
+};
#endif
diff --git a/src/server/scripts/Kalimdor/moonglade.cpp b/src/server/scripts/Kalimdor/moonglade.cpp
index 9485048da8c..f438275b82a 100644
--- a/src/server/scripts/Kalimdor/moonglade.cpp
+++ b/src/server/scripts/Kalimdor/moonglade.cpp
@@ -37,6 +37,9 @@ EndContentData */
#include "ScriptedGossip.h"
#include "Player.h"
#include "SpellInfo.h"
+#include "Cell.h"
+#include "CellImpl.h"
+#include "GridNotifiers.h"
/*######
## npc_bunthen_plainswind
@@ -319,6 +322,28 @@ public:
}
}
+ void IsSummonedBy(Unit* /*summoner*/)
+ {
+ std::list<Player*> playerOnQuestList;
+ Trinity::AnyPlayerInObjectRangeCheck checker(me, 5.0f);
+ Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(me, playerOnQuestList, checker);
+ me->VisitNearbyWorldObject(5.0f, searcher);
+ for (std::list<Player*>::const_iterator itr = playerOnQuestList.begin(); itr != playerOnQuestList.end(); ++itr)
+ {
+ // Check if found player target has active quest
+ if (Player* player = (*itr))
+ {
+ if (player->GetQuestStatus(10965) == QUEST_STATUS_INCOMPLETE)
+ {
+ StartEvent(player);
+ break;
+ }
+ }
+ else
+ break;
+ }
+ }
+
void JustDied(Unit* /*killer*/)
{
if (!PlayerGUID)
@@ -358,7 +383,7 @@ public:
return;
}
- void UpdateAI(const uint32 diff)
+ void UpdateAI(uint32 const diff)
{
npc_escortAI::UpdateAI(diff);
@@ -533,30 +558,6 @@ public:
};
/*####
-# npc_clintar_dreamwalker
-####*/
-
-enum Clintar
-{
- CLINTAR_SPIRIT = 22916
-};
-
-class npc_clintar_dreamwalker : public CreatureScript
-{
-public:
- npc_clintar_dreamwalker() : CreatureScript("npc_clintar_dreamwalker") { }
-
- bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
- {
- if (quest->GetQuestId() == 10965)
- if (Creature* clintar_spirit = creature->SummonCreature(CLINTAR_SPIRIT, ClintarSpiritSummon, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 100000))
- CAST_AI(npc_clintar_spirit::npc_clintar_spiritAI, clintar_spirit->AI())->StartEvent(player);
- return true;
- }
-
-};
-
-/*####
# npc_omen
####*/
@@ -707,7 +708,6 @@ void AddSC_moonglade()
new npc_bunthen_plainswind();
new npc_great_bear_spirit();
new npc_silva_filnaveth();
- new npc_clintar_dreamwalker();
new npc_clintar_spirit();
new npc_omen();
new npc_giant_spotlight();
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
index d77c84b2978..3c20acf34a6 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
@@ -27,10 +27,34 @@ EndScriptData */
#include "SpellScript.h"
#include "trial_of_the_champion.h"
#include "ScriptedEscortAI.h"
-
-enum eSpells
+/*
+enum Yells
+{
+ // Eadric the Pure
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ EMOTE_RADIANCE = 2,
+ EMOTE_HAMMER_RIGHTEOUS = 3,
+ SAY_HAMMER_RIGHTEOUS = 4,
+ SAY_KILL_PLAYER = 5,
+ SAY_DEFEATED = 6,
+
+ // Argent Confessor Paletress
+ SAY_INTRO_1 = 0,
+ SAY_INTRO_2 = 1,
+ SAY_AGGRO = 2,
+ SAY_MEMORY_SUMMON = 3,
+ SAY_MEMORY_DEATH = 4,
+ SAY_KILL_PLAYER = 5,
+ SAY_DEFEATED = 6,
+
+ // Memory of X
+ EMOTE_WAKING_NIGHTMARE = 0
+};
+*/
+enum Spells
{
- //Eadric
+ // Eadric the Pure
SPELL_EADRIC_ACHIEVEMENT = 68197,
SPELL_HAMMER_JUSTICE = 66863,
SPELL_HAMMER_RIGHTEOUS = 66867,
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
index c56d44ceb08..c1a2f9c07d2 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
@@ -27,7 +27,7 @@ EndScriptData */
#include "ScriptedEscortAI.h"
#include "trial_of_the_champion.h"
-enum eSpells
+enum Spells
{
//phase 1
SPELL_PLAGUE_STRIKE = 67884,
@@ -61,13 +61,13 @@ enum eSpells
SPELL_KILL_CREDIT = 68663
};
-enum eModels
+enum Models
{
MODEL_SKELETON = 29846,
MODEL_GHOST = 21300
};
-enum ePhases
+enum Phases
{
PHASE_UNDEAD = 1,
PHASE_SKELETON = 2,
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp
index ffda3d12e2f..9c0b894bfa7 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp
@@ -33,6 +33,18 @@ EndContentData */
#include "Vehicle.h"
#include "Player.h"
+enum Yells
+{
+ SAY_INTRO_1 = 0,
+ SAY_INTRO_2 = 1,
+ SAY_INTRO_3 = 2,
+ SAY_AGGRO = 3,
+ SAY_PHASE_2 = 4,
+ SAY_PHASE_3 = 5,
+ SAY_KILL_PLAYER = 6,
+ SAY_DEATH = 7
+};
+
#define GOSSIP_START_EVENT1 "I'm ready to start challenge."
#define GOSSIP_START_EVENT2 "I'm ready for the next challenge."
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h
index cb3a43acdd0..6116a150334 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h
@@ -19,7 +19,7 @@
#ifndef DEF_TOC_H
#define DEF_TOC_H
-enum eData
+enum Data
{
BOSS_GRAND_CHAMPIONS,
BOSS_ARGENT_CHALLENGE_E,
@@ -46,7 +46,7 @@ enum Data64
DATA_GRAND_CHAMPION_3
};
-enum eNpcs
+enum CreatureIds
{
// Horde Champions
NPC_MOKRA = 35572,
@@ -78,7 +78,7 @@ enum eNpcs
NPC_ARELAS = 35005
};
-enum eGameObjects
+enum GameObjects
{
GO_MAIN_GATE = 195647,
@@ -92,7 +92,7 @@ enum eGameObjects
GO_PALETRESS_LOOT_H = 195324
};
-enum eVehicles
+enum Vehicles
{
//Grand Champions Alliance Vehicles
VEHICLE_MARSHAL_JACOB_ALERIUS_MOUNT = 35637,
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
index 0018c58f4cb..8be4ac6b8b6 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
@@ -117,12 +117,16 @@ public:
events.ScheduleEvent(EVENT_FEVER, urand(15000, 20000));
events.ScheduleEvent(EVENT_PHASE, 90000);
events.ScheduleEvent(EVENT_ERUPT, 15000);
+ me->GetMotionMaster()->MoveChase(me->getVictim());
}
else
{
float x, y, z, o;
me->GetHomePosition(x, y, z, o);
- me->NearTeleportTo(x, y, z, o);
+ me->NearTeleportTo(x, y, z, o - G3D::halfPi());
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MoveIdle();
+ me->SetTarget(0);
DoCastAOE(SPELL_PLAGUE_CLOUD);
events.ScheduleEvent(EVENT_PHASE, 45000);
events.ScheduleEvent(EVENT_ERUPT, 8000);
diff --git a/src/server/scripts/Northrend/sholazar_basin.cpp b/src/server/scripts/Northrend/sholazar_basin.cpp
index c0635f897d9..5bf45452d34 100644
--- a/src/server/scripts/Northrend/sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/sholazar_basin.cpp
@@ -18,7 +18,7 @@
/* ScriptData
SDName: Sholazar_Basin
SD%Complete: 100
-SDComment: Quest support: 12570, 12573, 12621.
+SDComment: Quest support: 12570, 12573, 12621, 12726
SDCategory: Sholazar_Basin
EndScriptData */
@@ -26,6 +26,7 @@ EndScriptData */
npc_injured_rainspeaker_oracle
npc_vekjik
avatar_of_freya
+npc_haiphoon (Quest: "Song of Wind and Water")
EndContentData */
#include "ScriptMgr.h"
@@ -34,6 +35,8 @@ EndContentData */
#include "ScriptedEscortAI.h"
#include "SpellScript.h"
#include "SpellAuras.h"
+#include "Vehicle.h"
+#include "CombatAI.h"
#include "Player.h"
/*######
@@ -984,6 +987,52 @@ public:
}
};
+/*######
+## Quest: Song of Wind and Water ID: 12726
+######*/
+/*This quest precisly needs core script since battle vehicles are not well integrated with SAI,
+may be easily converted to SAI when they get.*/
+enum SongOfWindAndWater
+{
+ // Spells
+ SPELL_DEVOUR_WIND = 52862,
+ SPELL_DEVOUR_WATER = 52864,
+ // NPCs
+ NPC_HAIPHOON_WATER = 28999,
+ NPC_HAIPHOON_AIR = 28985
+};
+
+class npc_haiphoon : public CreatureScript
+{
+public:
+ npc_haiphoon() : CreatureScript("npc_haiphoon") { }
+
+ struct npc_haiphoonAI : public VehicleAI
+ {
+ npc_haiphoonAI(Creature* creature) : VehicleAI(creature) { }
+
+ void SpellHitTarget(Unit* target, SpellInfo const* spell)
+ {
+ if (target == me)
+ return;
+
+ if (spell->Id == SPELL_DEVOUR_WIND && me->GetCharmerOrOwnerPlayerOrPlayerItself())
+ {
+ me->UpdateEntry(NPC_HAIPHOON_AIR);
+ }
+ else if (spell->Id == SPELL_DEVOUR_WATER && me->GetCharmerOrOwnerPlayerOrPlayerItself())
+ {
+ me->UpdateEntry(NPC_HAIPHOON_WATER);
+ }
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_haiphoonAI(creature);
+ }
+};
+
void AddSC_sholazar_basin()
{
new npc_injured_rainspeaker_oracle();
@@ -995,4 +1044,5 @@ void AddSC_sholazar_basin()
new npc_jungle_punch_target();
new spell_q12620_the_lifewarden_wrath();
new spell_q12589_shoot_rjr();
+ new npc_haiphoon();
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
index 7fa476100d5..5617c69aea9 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
@@ -53,14 +53,16 @@ enum eUnits
ENTRY_REINFORCED_FEL_IRON_CHEST_H = 185169
};
-enum eSays
+enum Says
{
SAY_INTRO = 0,
- SAY_WIPE = 1,
- SAY_AGGRO = 2,
- SAY_KILL = 3,
- SAY_DIE = 4,
- EMOTE = 5
+
+ SAY_WIPE = 0,
+ SAY_AGGRO = 1,
+ SAY_KILL = 2,
+ SAY_DIE = 3,
+
+ EMOTE = 0
};
const float VazrudenMiddle[3] = {-1406.5f, 1746.5f, 81.2f};
diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp
index 4f48c311612..40cef99048f 100644
--- a/src/server/scripts/Spells/spell_holiday.cpp
+++ b/src/server/scripts/Spells/spell_holiday.cpp
@@ -274,6 +274,69 @@ class spell_hallow_end_tricky_treat : public SpellScriptLoader
}
};
+enum Mistletoe
+{
+ SPELL_CREATE_MISTLETOE = 26206,
+ SPELL_CREATE_HOLLY = 26207,
+ SPELL_CREATE_SNOWFLAKES = 45036
+};
+
+class spell_winter_veil_mistletoe : public SpellScriptLoader
+{
+ public:
+ spell_winter_veil_mistletoe() : SpellScriptLoader("spell_winter_veil_mistletoe") { }
+
+ class spell_winter_veil_mistletoe_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_winter_veil_mistletoe_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_CREATE_MISTLETOE) ||
+ !sSpellMgr->GetSpellInfo(SPELL_CREATE_HOLLY) ||
+ !sSpellMgr->GetSpellInfo(SPELL_CREATE_SNOWFLAKES))
+ return false;
+ return true;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+
+ if (Player* target = GetHitPlayer())
+ {
+ uint32 spellId = 0;
+ switch (urand(0, 2))
+ {
+ case 0:
+ spellId = SPELL_CREATE_MISTLETOE;
+ break;
+ case 1:
+ spellId = SPELL_CREATE_HOLLY;
+ break;
+ case 2:
+ spellId = SPELL_CREATE_SNOWFLAKES;
+ break;
+ default:
+ return;
+ }
+
+ caster->CastSpell(target, spellId, true);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_winter_veil_mistletoe_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_winter_veil_mistletoe_SpellScript();
+ }
+};
+
void AddSC_holiday_spell_scripts()
{
// Love is in the Air
@@ -282,4 +345,6 @@ void AddSC_holiday_spell_scripts()
new spell_hallow_end_trick();
new spell_hallow_end_trick_or_treat();
new spell_hallow_end_tricky_treat();
+ // Winter Veil
+ new spell_winter_veil_mistletoe();
}
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index da80ec8f1da..58b6fca8a81 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -1432,7 +1432,7 @@ class spell_q11010_q11102_q11023_choose_loc : public SpellScriptLoader
Unit* caster = GetCaster();
// Check for player that is in 65 y range
std::list<Player*> playerList;
- Trinity::AnyPlayerInObjectRangeCheck checker(caster, 765.0f);
+ Trinity::AnyPlayerInObjectRangeCheck checker(caster, 65.0f);
Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(caster, playerList, checker);
caster->VisitNearbyWorldObject(65.0f, searcher);
for (std::list<Player*>::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr)
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index 4e0818c7c82..4524a3a9374 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -785,7 +785,7 @@ enum eEngineeringTrinkets
SPELL_TO_TOSHLEY = 36955,
};
-#define GOSSIP_ITEM_ZAP "[PH] Unknown"
+#define GOSSIP_ITEM_ZAP "This Dimensional Imploder sounds dangerous! How can I make one?"
#define GOSSIP_ITEM_JHORDY "I must build a beacon for this marvelous device!"
#define GOSSIP_ITEM_KABLAM "[PH] Unknown"
@@ -819,7 +819,7 @@ public:
switch (creature->GetEntry())
{
case NPC_ZAP:
- canLearn = CanLearn(player, 7249, 0, 260, S_GOBLIN, SPELL_TO_EVERLOOK, npcTextId);
+ canLearn = CanLearn(player, 6092, 0, 260, S_GOBLIN, SPELL_TO_EVERLOOK, npcTextId);
if (canLearn)
gossipItem = GOSSIP_ITEM_ZAP;
break;
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 59ab9cd61e7..36657dc76c3 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -1586,49 +1586,6 @@ public:
}
};
-/*####
-## npc_winter_reveler
-####*/
-
-enum WinterReveler
-{
- SPELL_MISTLETOE_DEBUFF = 26218,
- SPELL_CREATE_MISTLETOE = 26206,
- SPELL_CREATE_HOLLY = 26207,
- SPELL_CREATE_SNOWFLAKES = 45036,
-};
-
-class npc_winter_reveler : public CreatureScript
-{
- public:
- npc_winter_reveler() : CreatureScript("npc_winter_reveler") { }
-
- struct npc_winter_revelerAI : public ScriptedAI
- {
- npc_winter_revelerAI(Creature* creature) : ScriptedAI(creature) {}
-
- void ReceiveEmote(Player* player, uint32 emote)
- {
- if (player->HasAura(SPELL_MISTLETOE_DEBUFF))
- return;
-
- if (!IsHolidayActive(HOLIDAY_FEAST_OF_WINTER_VEIL))
- return;
-
- if (emote == TEXT_EMOTE_KISS)
- {
- uint32 spellId = RAND<uint32>(SPELL_CREATE_MISTLETOE, SPELL_CREATE_HOLLY, SPELL_CREATE_SNOWFLAKES);
- me->CastSpell(player, spellId, false);
- me->CastSpell(player, SPELL_MISTLETOE_DEBUFF, false);
- }
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new npc_winter_revelerAI(creature);
- }
-};
/*####
## npc_snake_trap_serpents
@@ -3039,7 +2996,6 @@ void AddSC_npcs_special()
new npc_sayge();
new npc_steam_tonk();
new npc_tonk_mine();
- new npc_winter_reveler();
new npc_brewfest_reveler();
new npc_snake_trap();
new npc_mirror_image();