aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2012_11_24_03_world_various_fixes.sql2
-rw-r--r--sql/updates/world/2012_12_07_00_world_script_texts.sql2
-rw-r--r--sql/updates/world/2012_12_07_06_world_sai.sql4
-rw-r--r--sql/updates/world/2012_12_07_07_world_sai.sql36
-rw-r--r--sql/updates/world/2012_12_07_08_world_misc.sql7
-rw-r--r--sql/updates/world/2012_12_07_09_world_db_script_string.sql2
-rw-r--r--sql/updates/world/2012_12_08_01_world_sai.sql56
-rw-r--r--sql/updates/world/2012_12_09_00_world_conditions.sql1
-rw-r--r--sql/updates/world/2012_12_09_00_world_creature_text.sql40
-rw-r--r--sql/updates/world/2012_12_09_01_world_misc.sql2
-rw-r--r--sql/updates/world/2012_12_09_02_world_quest_template.sql1
-rw-r--r--sql/updates/world/2012_12_10_00_world_smart_scripts.sql3
-rw-r--r--sql/updates/world/2012_12_10_01_world_spell_script_names.sql4
-rw-r--r--sql/updates/world/2012_12_10_02_world_spawns_waypoints.sql605
-rw-r--r--sql/updates/world/2012_12_13_00_world.sql4
-rw-r--r--sql/updates/world/2012_12_14_00_world_conditions.sql4
-rw-r--r--sql/updates/world/2012_12_14_01_world_waypoint_data.sql188
-rw-r--r--sql/updates/world/2012_12_14_02_world_misc.sql15
-rw-r--r--sql/updates/world/2012_12_14_03_world_npc_spellclick_spells.sql1
-rw-r--r--sql/updates/world/2012_12_14_04_world_misc.sql7
-rw-r--r--sql/updates/world/2012_12_14_05_world_spell_script_names.sql10
-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--src/server/game/AI/CoreAI/PetAI.cpp237
-rw-r--r--src/server/game/AI/CoreAI/PetAI.h14
-rw-r--r--src/server/game/AI/CoreAI/UnitAI.h11
-rw-r--r--src/server/game/AI/CreatureAI.h4
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp76
-rw-r--r--src/server/game/Entities/Creature/Creature.h2
-rw-r--r--src/server/game/Entities/Pet/Pet.cpp1
-rw-r--r--src/server/game/Entities/Player/Player.cpp144
-rw-r--r--src/server/game/Entities/Player/Player.h2
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp108
-rw-r--r--src/server/game/Entities/Unit/Unit.h42
-rw-r--r--src/server/game/Grids/Notifiers/GridNotifiers.h29
-rw-r--r--src/server/game/Handlers/NPCHandler.cpp16
-rw-r--r--src/server/game/Handlers/PetHandler.cpp4
-rw-r--r--src/server/game/Handlers/QuestHandler.cpp6
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp4
-rw-r--r--src/server/game/Scripting/ScriptMgr.cpp108
-rw-r--r--src/server/game/Scripting/ScriptMgr.h31
-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.cpp19
-rw-r--r--src/server/game/Spells/Spell.cpp2
-rw-r--r--src/server/game/Spells/SpellEffects.cpp49
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp2
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp4
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp2
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp2
-rw-r--r--src/server/scripts/Kalimdor/azuremyst_isle.cpp28
-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/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp117
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp2
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp4
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp6
-rw-r--r--src/server/scripts/Northrend/borean_tundra.cpp2
-rw-r--r--src/server/scripts/Northrend/sholazar_basin.cpp52
-rw-r--r--src/server/scripts/Outland/BlackTemple/illidari_council.cpp2
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp2
-rw-r--r--src/server/scripts/Outland/netherstorm.cpp6
-rw-r--r--src/server/scripts/Outland/shadowmoon_valley.cpp4
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp177
-rw-r--r--src/server/scripts/Spells/spell_holiday.cpp169
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp16
-rw-r--r--src/server/scripts/World/npc_professions.cpp4
-rw-r--r--src/server/scripts/World/npcs_special.cpp2
-rw-r--r--src/tools/vmap4_extractor/vmapexport.cpp2
80 files changed, 2703 insertions, 771 deletions
diff --git a/sql/updates/world/2012_11_24_03_world_various_fixes.sql b/sql/updates/world/2012_11_24_03_world_various_fixes.sql
index 6a30c145165..dfa2d277564 100644
--- a/sql/updates/world/2012_11_24_03_world_various_fixes.sql
+++ b/sql/updates/world/2012_11_24_03_world_various_fixes.sql
@@ -358,7 +358,7 @@ INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`op
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9456;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(15,9456,0,0,0,9,0,12132,0,0,0,0,'','Koltira Deathweaver show gossip option if player has quest 12132'),
-(15,9456,0,0,0,1,47740,0,0,1,0,0,'','Koltira Deathweaver show gossip option if player has not aura World of Shadows');
+(15,9456,0,0,0,1,0,47740,0,0,1,0,'','Koltira Deathweaver show gossip option if player has not aura World of Shadows');
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (26581,27846) 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
(26581,0,1,0,62,0,100,0,9456,0,0,0,11,47740,0,0,0,0,0,7,0,0,0,0,0,0,0,'Koltira Deathweaver - On gossip option select - Spellcast World of Shadows'),
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_07_06_world_sai.sql b/sql/updates/world/2012_12_07_06_world_sai.sql
index 19044160dfb..d0d1be35766 100644
--- a/sql/updates/world/2012_12_07_06_world_sai.sql
+++ b/sql/updates/world/2012_12_07_06_world_sai.sql
@@ -3,8 +3,8 @@
DELETE FROM `quest_end_scripts` WHERE `id` IN (996,998,1514,2523,2878,3363,4113,4114,4115,4116,4117,4118,4119,4221,4222,4343,4401,4403,4443,4444,4445,4446,4447,4448,4461,4462,4464,4465,4466,4467);
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (164887,173327,174599,164886,171939,171942,174594,174595,174600,174596,164888,174597,164885,174601,174602,174603,174598,174604,173284,174605,174606,174607,174684,173324,174686,174608,174712,174713,174708,174709) 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
-(164887,1,0,1,20,0,100,0,996 ,0,0,0,70,5000,0,0,0,0,0,14,48878,0,0,0,0,0,0, 'On Quest "Corrupted Windblossom" Complete - After 5 seconds - Summon Cleansed Windblossom'),
-(173327,1,0,1,20,0,100,0,998 ,0,0,0,70,5000,0,0,0,0,0,14,48879,0,0,0,0,0,0, 'On Quest "Corrupted Windblossom" Complete - After 5 seconds - Summon Cleansed Windblossom'),
+(164887,1,0,1,20,0,100,0,996 ,0,0,0,70,5000,0,0,0,0,0,14,48878,0,0,0,0,0,0, 'On Quest "Corrupted Windblossom" Complete - After 5 seconds - Summon Cleansed Windblossom'),
+(173327,1,0,1,20,0,100,0,998 ,0,0,0,70,5000,0,0,0,0,0,14,48879,0,0,0,0,0,0, 'On Quest "Corrupted Windblossom" Complete - After 5 seconds - Summon Cleansed Windblossom'),
(174599,1,0,1,20,0,100,0,1514,0,0,0,70,5000,0,0,0,0,0,14,48880,0,0,0,0,0,0, 'On Quest "Corrupted Windblossom" Complete - After 5 seconds - Summon Cleansed Windblossom'),
(164886,1,0,1,20,0,100,0,2523,0,0,0,70,5000,0,0,0,0,0,14,48876,0,0,0,0,0,0, 'On Quest "Corrupted Songflower" Complete - After 5 seconds - Summon Cleansed Songflower'),
(171939,1,0,1,20,0,100,0,2878,0,0,0,70,5000,0,0,0,0,0,14,48877,0,0,0,0,0,0, 'On Quest "Corrupted Songflower" Complete - After 5 seconds - Summon Cleansed Songflower'),
diff --git a/sql/updates/world/2012_12_07_07_world_sai.sql b/sql/updates/world/2012_12_07_07_world_sai.sql
new file mode 100644
index 00000000000..d9acb9c310c
--- /dev/null
+++ b/sql/updates/world/2012_12_07_07_world_sai.sql
@@ -0,0 +1,36 @@
+-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+DELETE FROM `quest_end_scripts` WHERE `id`=13082;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=30562;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=30562 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
+(30562,0,0,0,20,1,100,0,13082,0,0,0,11,57786,0,0,0,0,0,7,0,0,0,0,0,0,0,'Crusader Bridenbrad - On Quest Complete - Cast Spell on action Invoker'),
+(30562,0,1,0,20,1,100,0,13082,0,0,0,11,57782,0,0,0,0,0,7,0,0,0,0,0,0,0,'Crusader Bridenbrad - On Quest Complete - Cast Spell on action Invoker'),
+(30562,0,2,0,20,1,100,0,13082,0,0,0,11,57746,0,0,0,0,0,7,0,0,0,0,0,0,0,'Crusader Bridenbrad - On Quest Complete - Cast Spell on action Invoker'),
+(30562,0,3,0,20,1,100,0,13082,0,0,0,11,57747,0,0,0,0,0,7,0,0,0,0,0,0,0,'Crusader Bridenbrad - On Quest Complete - Cast Spell on action Invoker'),
+(30562,0,4,0,20,1,100,0,13082,0,0,0,11,57773,0,0,0,0,0,7,0,0,0,0,0,0,0,'Crusader Bridenbrad - On Quest Complete - Cast Spell on action Invoker');
+-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+DELETE FROM `quest_end_scripts` WHERE `id`=10919;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=20206;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=20206 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
+(20206,0,0,0,20,1,100,0,13082,0,0,0,53,0,20206,0,0,0,0,1,0,0,0,0,0,0,0,'Fei Fei - On Quest Complete - Start Waypointing');
+DELETE FROM `waypoints` WHERE `entry`=20206;
+INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
+(20206,1,-697.934,2612.59,89.4752,'Fei Fei Treats Quest_End'),
+(20206,2,-688.665,2580.78,86.9841,'Fei Fei Treats Quest_End'),
+(20206,3,-689.199,2588.81,87.4460,'Fei Fei Treats Quest_End'),
+(20206,4,-667.044,2611.74,85.7029,'Fei Fei Treats Quest_End'),
+(20206,5,-649.407,2636.82,86.1539,'Fei Fei Treats Quest_End'),
+(20206,6,-659.047,2651.34,87.0480,'Fei Fei Treats Quest_End'),
+(20206,7,-656.048,2652.06,86.5892,'Fei Fei Treats Quest_End'),
+(20206,8,-656.055,2674.20,88.1354,'Fei Fei Treats Quest_End'),
+(20206,9,-691.042,2652.45,92.1508,'Fei Fei Treats Quest_End'),
+(20206,10,-688.807,2701.25,94.8354,'Fei Fei Treats Quest_End'),
+(20206,11,-667.514,2716.08,94.4471,'Fei Fei Treats Quest_End'),
+(20206,12,-688.593,2723.67,94.4145,'Fei Fei Treats Quest_End'),
+(20206,13,-687.635,2743.10,93.9095,'Fei Fei Treats Quest_End'),
+(20206,14,-697.062,2748.04,93.9380,'Fei Fei Treats Quest_End'),
+(20206,15,-687.635,2743.10,93.9095,'Fei Fei Treats Quest_End'),
+(20206,16,-685.121,2689.01,93.8042,'Fei Fei Treats Quest_End'),
+(20206,17,-688.862,2627.19,89.8591,'Fei Fei Treats Quest_End'),
+(20206,18,-685.494,2626.74,89.2711,'Fei Fei Treats Quest_End');
diff --git a/sql/updates/world/2012_12_07_08_world_misc.sql b/sql/updates/world/2012_12_07_08_world_misc.sql
new file mode 100644
index 00000000000..a696ba401cc
--- /dev/null
+++ b/sql/updates/world/2012_12_07_08_world_misc.sql
@@ -0,0 +1,7 @@
+-- from 2012_12_07_01_world_misc.sql
+UPDATE `quest_template` SET `CompleteScript`=0 WHERE `Id` IN (67,166,231,806,1521,3118,7786,10289,10813);
+DELETE FROM `quest_end_scripts` WHERE `id` IN (67,166,231,806,1521,3118,7786,10289,10813);
+-- from 2012_12_07_06_world_sai.sql
+UPDATE `quest_template` SET `CompleteScript`=0 WHERE `Id` IN (996,998,1514,2523,2878,3363,4113,4114,4115,4116,4117,4118,4119,4221,4222,4343,4401,4403,4443,4444,4445,4446,4447,4448,4461,4462,4464,4465,4466,4467);
+-- from 2012_12_07_07_world_sai.sql
+UPDATE `quest_template` SET `CompleteScript`=0 WHERE `Id` IN (13082,10919);
diff --git a/sql/updates/world/2012_12_07_09_world_db_script_string.sql b/sql/updates/world/2012_12_07_09_world_db_script_string.sql
new file mode 100644
index 00000000000..4880b84dff0
--- /dev/null
+++ b/sql/updates/world/2012_12_07_09_world_db_script_string.sql
@@ -0,0 +1,2 @@
+-- Remove texts that are no longer used
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000028,2000000055,2000000065,2000000066);
diff --git a/sql/updates/world/2012_12_08_01_world_sai.sql b/sql/updates/world/2012_12_08_01_world_sai.sql
new file mode 100644
index 00000000000..2880b01d07a
--- /dev/null
+++ b/sql/updates/world/2012_12_08_01_world_sai.sql
@@ -0,0 +1,56 @@
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Move Texts to correct table
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000090,2000000091,2000000092,2000000097,2000000098,2000000099,2000000100,2000000090,2000000091,2000000092,2000000095,2000000096);
+DELETE FROM `creature_text` WHERE `entry` IN (1443,3054,3616,3448,4049);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+-- 1443: Ferzerul Texts
+(1443,0,0, 'I hereby destroy these instruments of evil! For the Horde!',14,1,100,0,0,0, 'Felzerul on Quest 1445 finished'),
+-- 3054: Zarlman Two-Moons Texts
+(3054,0,0, 'Zarlman Two-Moons begins chanting as he mixes the well stones and ambercom before the Tribal Fire.',16,1,100,0,0,0, 'Zarlman Two-Moons on Quest 771 finished 1'),
+(3054,1,0, 'The Water of the Seers is ready for your consumption, $N.' ,12,1,100,0,0,0, 'Zarlman Two-Moons on Quest 771 finished 2'),
+-- 3448: Tonga Runetotem Texts
+(3448,0,0, 'Tonga Runetotem inspects the snapjaw shells...' ,16,1,100,0,0,0, 'Tonga Runetotem on Quest 880 finished'),
+(3448,1,0, 'Hm...' ,12,1,100,0,0,0, 'Tonga Runetotem on Quest 880 finished'),
+(3448,2,0, 'Strange. Very strange...' ,12,1,100,0,0,0, 'Tonga Runetotem on Quest 880 finished'),
+(3448,3,0, '$N. These shells tell me much, but I fear many more questions are now raised...',12,1,100,1,0,0, 'Tonga Runetotem on Quest 880 finished'),
+-- 3616: Onu Texts
+(3616,0,0, 'Onu studies the parchment from the Twilight Tome...',16,7,100,0,0,0, 'Onu on Quest 950 finished'),
+(3616,1,0, 'Onu is struck by unleashed magic!' ,16,7,100,0,0,0, 'Onu on Quest 950 finished'),
+(3616,2,0, 'Hmm...' ,12,7,100,0,0,0, 'Onu on Quest 950 finished'),
+-- 4049: Seereth Stonebreak Texts
+(4049,0,0, 'The spirits of Stonetalon still rage, $N.',16,7,100,0,0,0,'Seereth Stonebreak on Quest 1062 finished'),
+(4049,1,0, 'I fear we may never soothe them...' ,16,7,100,0,0,0,'Seereth Stonebreak on Quest 1062 finished');
+-- SAI
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (1443,3054,3448,3616,4049,21311);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (1443,3054,3448,3616,4049,21311) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=305400 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
+-- Ferzerul Converted Quest_end_scripts id 1445
+(1443,0,0,1,20,0,100,0,1062,0,0,0,1 , 0,3000,0,0,0,0,1,0,0,0,0,0,0,0,'Seereth Stonebreak - On quest " The Temple of AtalHakkar" rewarded - Say line 1'),
+(1443,0,1,0,20,0,100,0,1062,0,0,0,11,7437, 0,0,0,0,0,1,0,0,0,0,0,0,0,'Seereth Stonebreak - On quest " The Temple of AtalHakkar" rewarded - Cast Spell'),
+-- Tonga Runetotem Converted Quest_end_scripts id 880
+(3448,0,0,1,20,0,100,0,880,0,0,0,1,0,5000,0,0,0,0,1,0,0,0,0,0,0,0, 'Tonga Runetotem - On quest "Altered Beings" rewarded - Say line 1'),
+(3448,0,1,2,20,0,100,0,880,0,0,0,1,1,4000,0,0,0,0,1,0,0,0,0,0,0,0, 'Tonga Runetotem - On quest "Altered Beings" rewarded - Say line 2'),
+(3448,0,2,3,20,0,100,0,880,0,0,0,1,2,4000,0,0,0,0,1,0,0,0,0,0,0,0, 'Tonga Runetotem - On quest "Altered Beings" rewarded - Say line 3'),
+(3448,0,3,4,20,0,100,0,880,0,0,0,1,3,2000,0,0,0,0,1,0,0,0,0,0,0,0, 'Tonga Runetotem - On quest "Altered Beings" rewarded - Say line 4'),
+-- Onu Converted Quest_end_scripts id 950
+(3616,0,0,1,20,0,100,0,950,0,0,0,1,0,4000,0,0,0,0,1,0,0,0,0,0,0,0, 'Onu - On quest "Return to Onu" rewarded - Say line 1'),
+(3616,0,1,2,20,0,100,0,950,0,0,0,1,1,4000,0,0,0,0,1,0,0,0,0,0,0,0, 'Onu - On quest "Return to Onu" rewarded - Say line 2'),
+(3616,0,2,0,20,0,100,0,950,0,0,0,1,2, 0,0,0,0,0,1,0,0,0,0,0,0,0, 'Onu - On quest "Return to Onu" rewarded - Say line 3'),
+-- Seereth Stonebeak Converted Quest_end_scripts id 1062
+(4049,0,0,1,20,0,100,0,1062,0,0,0,1,0,4000,0,0,0,0,1,0,0,0,0,0,0,0,'Seereth Stonebreak - On quest "Goblin Invaders" rewarded - Say line 1'),
+(4049,0,1,0,20,0,100,0,1062,0,0,0,1,1, 0,0,0,0,0,1,0,0,0,0,0,0,0,'Seereth Stonebreak - On quest "Goblin Invaders" rewarded - Say line 2'),
+-- Rokgar Bloodgrip Converted Quest_end_scripts id 10526
+(21311,0,0,0,20,0,100,0,10526,0,0,0,12,21950,1,900000,0,0,0,8,0,0,0,2272.95,5984.40,142.79,6.23, 'Rokgah Bloodgrip - On Quest "The Thunderspike" Complete - Summon Garm Wolfbrother'),
+(21311,0,1,0,20,0,100,0,10526,0,0,0,12,21952,1,900000,0,0,0,8,0,0,0,2273.26,5986.73,142.75,5.14, 'Rokgah Bloodgrip - On Quest "The Thunderspike" Complete - Summon Lobo'),
+(21311,0,2,0,20,0,100,0,10526,0,0,0,12,21951,1,900000,0,0,0,8,0,0,0,2270.95,5982.93,142.83,0.31, 'Rokgah Bloodgrip - On Quest "The Thunderspike" Complete - Summon Thunderlord Clan Sub-Chief'),
+(21311,0,3,0,20,0,100,0,10526,0,0,0,12,21951,1,900000,0,0,0,8,0,0,0,2271.17,5986.07,142.81,5.86, 'Rokgah Bloodgrip - On Quest "The Thunderspike" Complete - Summon Thunderlord Clan Sub-Chief'),
+-- Zarlman Two-Moons Converted Quest_end_scripts id 771
+(3054 ,0,1,0,20,0,100,0, 771, 0,0,0,80,305400,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Zarlman Two-Moons: On quest "" Rewarded - call script'),
+(305400,9,0,1,1 ,0,100,0, 0, 0,0,0, 1, 0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Zarlman Two-Moons - TimedScript - Say line 1'),
+(305400,9,1,2,1 ,0,100,0,1000,1000,0,0,11, 5026,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Zarlman Two-Moons - TimedScript - Cast Spell'),
+(305400,9,2,0,1 ,0,100,0,7000,7000,0,0, 1, 1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Zarlman Two-Moons - TimedScript - Say line 2');
+-- Quest_end_script removal
+DELETE FROM `quest_end_scripts` WHERE `id` IN (10526,1445,1062,950,880);
+UPDATE `quest_template` SET `CompleteScript`=0 WHERE `Id`IN (10526,1445,1062,950,880);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/sql/updates/world/2012_12_09_00_world_conditions.sql b/sql/updates/world/2012_12_09_00_world_conditions.sql
new file mode 100644
index 00000000000..dbb3dac7fc3
--- /dev/null
+++ b/sql/updates/world/2012_12_09_00_world_conditions.sql
@@ -0,0 +1 @@
+UPDATE `conditions` SET `ErrorType`=172,`ErrorTextId`=77 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=54732; -- Defibrillate
diff --git a/sql/updates/world/2012_12_09_00_world_creature_text.sql b/sql/updates/world/2012_12_09_00_world_creature_text.sql
new file mode 100644
index 00000000000..6d850191938
--- /dev/null
+++ b/sql/updates/world/2012_12_09_00_world_creature_text.sql
@@ -0,0 +1,40 @@
+DELETE FROM `creature_text` WHERE `entry`=1756;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(1756,0,0,12,0,100,"lord gregor lescovar SAY_GUARD_2","Yes, sir!"),
+(1756,1,0,12,0,100,"tyrion spybot SAY_GUARD_1","Of course. He awaits you in the library.");
+
+DELETE FROM `creature_text` WHERE `entry`=1754;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(1754,0,0,12,0,100,"lord gregor lescovar SAY_LESCOVAR_2","It's time for my meditation, leave me."),
+(1754,1,0,12,0,100,"lord gregor lescovar SAY_LESCOVAR_3","There you are. What news from Westfall?"),
+(1754,2,0,12,0,100,"lord gregor lescovar SAY_LESCOVAR_4","Hmm, it could be that meddle Shaw. I will see what I can discover. Be off with you. I'll contact you again soon."),
+(1754,3,0,12,0,100,"tyrion spybot SAY_LESCOVAR_1","Ah, thank you kindly. I will leave you to the library while I tend to this small matter.");
+
+DELETE FROM `creature_text` WHERE `entry`=3849;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(3849,0,0,14,0,100,"prisoner adamant SAY_FREE_AD","Free from this wretched cell at last! Let me show you to the courtyard...."),
+(3849,1,0,14,0,100,"prisoner adamant SAY_OPEN_DOOR_AD","You are indeed courageous for wanting to brave the horrors that lie beyond this door."),
+(3849,2,0,14,0,100,"prisoner adamant SAY_POST1_DOOR_AD","There we go!"),
+(3849,3,0,14,0,100,"prisoner adamant SAY_POST2_DOOR_AD","Good luck with Arugal. I must hurry back to Hadrec now."),
+(3849,4,0,12,0,100,"prisoner adamant SAY_BOSS_DIE_AD","About time someone killed the wretch.");
+
+DELETE FROM `creature_text` WHERE `entry`=17243;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17243,0,0,12,0,100,"engineer spark SAY_TEXT","Yes Master, all goes along as planned."),
+(17243,1,0,16,0,100,"engineer spark EMOTE_SHELL","%s puts the shell to his ear."),
+(17243,2,0,14,0,100,"engineer spark SAY_ATTACK","Now I cut you!"),
+(17243,3,0,12,0,100,"geezle SPARK_SAY_2","What's the big idea? You nearly blew my cover, idiot! I told you to put the compass and navigation maps somewhere safe - not out in the open for any fool to discover."),
+(17243,4,0,12,0,100,"geezle SPARK_SAY_3","The Master has gone to great lengths to secure information about the whereabouts of the Exodar. You could have blown the entire operation, including the cover of our spy on the inside."),
+(17243,5,0,12,0,100,"geezle SPARK_SAY_5","Relax? Do you know what Kael'thas does to those that fail him, Geezle? Eternal suffering and pain... Do NOT screw this up, fool."),
+(17243,6,0,12,0,100,"geezle SPARK_SAY_6","Our Bloodmyst scouts have located our contact. The fool, Velen, will soon leave himself open and defenseless -- long enough for us to strike! Now get out of my sight before I vaporize you..."),
+(17243,7,0,16,0,100,"geezle EMOTE_SPARK","picks up the naga flag.");
+
+DELETE FROM `creature_text` WHERE `entry`=38113;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(38113,0,0,14,16734,100,"marwyn SAY_AGGRO","Death is all that you will find here!"),
+(38113,1,0,14,16735,100,"marwyn SAY_SLAY_1","I saw the same look in his eyes when he died. Terenas could hardly believe it. Hahahaha!"),
+(38113,1,1,14,16736,100,"marwyn SAY_SLAY_2","Choke on your suffering!"),
+(38113,2,0,14,16737,100,"marwyn SAY_DEATH","Yes... Run... Run to meet your destiny... Its bitter, cold embrace, awaits you."),
+(38113,3,0,14,16739,100,"marwyn SAY_CORRUPTED_FLESH_1","Your flesh has decayed before your very eyes!"),
+(38113,3,1,14,16740,100,"marwyn SAY_CORRUPTED_FLESH_2","Waste away into nothingness!"),
+(38113,4,0,14,16741,100,"marwyn SAY_MARWYN_INTRO_1","As you wish, my lord.");
diff --git a/sql/updates/world/2012_12_09_01_world_misc.sql b/sql/updates/world/2012_12_09_01_world_misc.sql
new file mode 100644
index 00000000000..7c8bdfbb1c5
--- /dev/null
+++ b/sql/updates/world/2012_12_09_01_world_misc.sql
@@ -0,0 +1,2 @@
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000105,2000000106,2000000138);
+DELETE FROM `quest_end_scripts` WHERE `id`=771;
diff --git a/sql/updates/world/2012_12_09_02_world_quest_template.sql b/sql/updates/world/2012_12_09_02_world_quest_template.sql
new file mode 100644
index 00000000000..52d0202d2a1
--- /dev/null
+++ b/sql/updates/world/2012_12_09_02_world_quest_template.sql
@@ -0,0 +1 @@
+UPDATE `quest_template` SET `CompleteScript`=0 WHERE `Id`=771;
diff --git a/sql/updates/world/2012_12_10_00_world_smart_scripts.sql b/sql/updates/world/2012_12_10_00_world_smart_scripts.sql
new file mode 100644
index 00000000000..ed0ee9bf764
--- /dev/null
+++ b/sql/updates/world/2012_12_10_00_world_smart_scripts.sql
@@ -0,0 +1,3 @@
+DELETE FROM `smart_scripts` WHERE `entryorguid`=28557 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
+(28557, 0, 0, 0, 2, 0, 100, 1, 0, 20, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'At 0-20% hp - rnd say text');
diff --git a/sql/updates/world/2012_12_10_01_world_spell_script_names.sql b/sql/updates/world/2012_12_10_01_world_spell_script_names.sql
new file mode 100644
index 00000000000..bc3684011e8
--- /dev/null
+++ b/sql/updates/world/2012_12_10_01_world_spell_script_names.sql
@@ -0,0 +1,4 @@
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (-24604,53434);
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(-24604,'spell_hun_target_only_pet_and_owner'),
+(53434,'spell_hun_target_only_pet_and_owner');
diff --git a/sql/updates/world/2012_12_10_02_world_spawns_waypoints.sql b/sql/updates/world/2012_12_10_02_world_spawns_waypoints.sql
new file mode 100644
index 00000000000..68613f3aaa9
--- /dev/null
+++ b/sql/updates/world/2012_12_10_02_world_spawns_waypoints.sql
@@ -0,0 +1,605 @@
+-- Issue 8514: Razormane Wolves - add and bind to Razormane Hunters
+-- Razormane Hunters in the Barrens (9 guids) are all missing the Wolves that path with them
+-- create a Razormane Wolf pet (#3939) for each of the 9 Razormane Hunters (#3265)
+SET @GUID := 45823; -- set by tdb team
+-- insert 9 razormane wolves into new guids (@GUID to @GUID+8) with invalid xyz coords (we don't know them yet)
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+8;
+INSERT INTO `creature` (`guid`,`id`,`map`,`position_x`,`position_y`, `position_z`,`spawntimesecs`,`curhealth`,`MovementType`) VALUES
+(@GUID ,3939,1,0,0,0,90,120,1),
+(@GUID+1,3939,1,0,0,0,90,120,1),
+(@GUID+2,3939,1,0,0,0,90,120,1),
+(@GUID+3,3939,1,0,0,0,90,120,1),
+(@GUID+4,3939,1,0,0,0,90,120,1),
+(@GUID+5,3939,1,0,0,0,90,120,1),
+(@GUID+6,3939,1,0,0,0,90,120,1),
+(@GUID+7,3939,1,0,0,0,90,120,1),
+(@GUID+8,3939,1,0,0,0,90,120,1);
+-- bind the wolves to the 9 razormane hunters (id 3265)
+DELETE FROM `creature_formations` WHERE `leaderGUID` BETWEEN 20301 AND 20309;
+INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`) VALUES
+(20301,20301,0,0,2),
+(20301,@GUID,4,60,2),
+(20302,20302,0,0,2),
+(20302,@GUID+1,4,60,2),
+(20303,20303,0,0,2),
+(20303,@GUID+2,4,60,2),
+(20304,20304,0,0,2),
+(20304,@GUID+3,4,60,2),
+(20305,20305,0,0,2),
+(20305,@GUID+4,4,60,2),
+(20306,20306,0,0,2),
+(20306,@GUID+5,4,60,2),
+(20307,20307,0,0,2),
+(20307,@GUID+6,4,60,2),
+(20308,20308,0,0,2),
+(20308,@GUID+7,4,60,2),
+(20309,20309,0,0,2),
+(20309,@GUID+8,4,60,2);
+-- now set the wolf pets to the same xyz as their leader
+UPDATE `creature` c1,`creature` c2,`creature_formations` cf SET c1.`position_x`=c2.`position_x`,c1.`position_y`=c2.`position_y`,c1.`position_z`=c2.`position_z` WHERE c1.`guid`=cf.`memberGUID` AND c2.`guid`=cf.`leaderGUID` AND c1. `guid` BETWEEN @GUID AND @GUID+8;
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8594: Missing Raptor egg nests
+-- Create spawn points for missing Raptor nests (Takk nest pool, Ravasaur nest pool, Razormaw nest)
+SET @GUID :=14990;
+-- existing nest for Ravasaur Matriarch will be re-added with others in pool
+DELETE FROM `gameobject` WHERE `guid` = 150392;
+-- New spawns
+DELETE FROM `gameobject` WHERE `guid` BETWEEN @GUID AND @GUID+9;
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`position_x`,`position_y`,`position_z`,`spawntimesecs`,`animprogress`,`state`) VALUES
+(@GUID ,202081,1, 1036.85,-3404.15, 91.67,3600,0,1),
+(@GUID+1,202081,1, 929.03,-3483.34, 91.67,3600,0,1),
+(@GUID+2,202081,1, 708.62,-3527.60, 91.76,3600,0,1),
+(@GUID+3,202081,1, 844.24,-3573.38, 91.74,3600,0,1),
+(@GUID+4,202082,1,-7522.43,-1797.43,-271.79,3600,0,1),
+(@GUID+5,202082,1,-7594.88,-1800.48,-265.33,3600,0,1),
+(@GUID+6,202082,1,-7426.77,-2018.86,-271.69,3600,0,1),
+(@GUID+7,202082,1,-7668.27,-1966.72,-271.96,3600,0,1),
+(@GUID+8,202082,1,-7824.72,-1590.05,-265.07,3600,0,1),
+(@GUID+9,202083,0,-2944.48,-3277.68, 62.27,18000,100, 1);
+DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @GUID AND @GUID+9;
+INSERT INTO `pool_gameobject` (`guid`,`pool_entry`,`description`) VALUES
+(@GUID ,7001, 'Takk''s Nest spawn point #1'),
+(@GUID+1,7001, 'Takk''s Nest spawn point #2'),
+(@GUID+2,7001, 'Takk''s Nest spawn point #3'),
+(@GUID+3,7001, 'Takk''s Nest spawn point #4'),
+(@GUID+4,7002, 'Ravasaur Matriarch''s Nest spawn point #1'),
+(@GUID+5,7002, 'Ravasaur Matriarch''s Nest spawn point #2'),
+(@GUID+6,7002, 'Ravasaur Matriarch''s Nest spawn point #3'),
+(@GUID+7,7002, 'Ravasaur Matriarch''s Nest spawn point #4'),
+(@GUID+8,7002, 'Ravasaur Matriarch''s Nest spawn point #5');
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8601: Twilight Prophet (2) - Pathing
+-- ====================================
+-- Paths for Twilight Prophet 1 (guid #43322)
+-- ====================================
+UPDATE `creature` SET `MovementType`=2,`position_x`=-7895.314941, `position_y`=1891.944092,`position_z`=8.447455 WHERE `guid`=43322;
+UPDATE `creature_addon` SET `path_id`=433220 WHERE `guid`=43322;
+DELETE FROM `waypoint_data` WHERE `id`=433220;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(433220,1,-7895.314941,1891.944092,8.447455,0,0,0,0,100,0),
+(433220,2,-7889.814453,1892.442139,6.512199,0,0,0,0,100,0),
+(433220,3,-7875.850586,1893.292969,5.065457,0,0,0,0,100,0),
+(433220,4,-7863.858398,1890.743408,3.855400,0,0,0,0,100,0),
+(433220,5,-7851.287109,1884.620361,3.379698,0,0,0,0,100,0),
+(433220,6,-7839.691406,1876.790527,3.826157,0,0,0,0,100,0),
+(433220,7,-7826.647461,1865.424316,4.368514,0,0,0,0,100,0),
+(433220,8,-7816.574219,1855.712524,3.208780,0,0,0,0,100,0),
+(433220,9,-7807.453613,1847.762085,2.136624,0,0,0,0,100,0),
+(433220,10,-7799.522461,1836.230225,2.907008,0,0,0,0,100,0),
+(433220,11,-7789.064453,1822.204468,1.495795,0,0,0,0,100,0),
+(433220,12,-7780.687500,1810.996704,-0.079978,0,0,0,0,100,0),
+(433220,13,-7773.758301,1795.407227,2.095025,0,0,0,0,100,0),
+(433220,14,-7770.189941,1781.901123,3.807251,0,0,0,0,100,0),
+(433220,15,-7768.526855,1768.004028,3.786433,0,0,0,0,100,0),
+(433220,16,-7767.317871,1754.062012,4.589085,0,0,0,0,100,0),
+(433220,17,-7766.593750,1740.086060,5.127120,0,0,0,0,100,0),
+(433220,18,-7766.543457,1722.587158,3.306771,0,0,0,0,100,0),
+(433220,19,-7765.512207,1710.202515,2.194530,0,0,0,0,100,0),
+(433220,20,-7756.119141,1696.762329,2.299271,0,0,0,0,100,0),
+(433220,21,-7745.099121,1688.132690,5.269642,0,0,0,0,100,0),
+(433220,22,-7734.173828,1679.384888,7.263340,0,0,0,0,100,0),
+(433220,23,-7724.966797,1669.663940,7.202020,0,0,0,0,100,0),
+(433220,24,-7715.616699,1659.246826,7.387191,0,0,0,0,100,0),
+(433220,25,-7703.356445,1646.774414,7.689360,0,0,0,0,100,0),
+(433220,26,-7693.303223,1637.030884,5.440024,0,0,0,0,100,0),
+(433220,27,-7685.538086,1624.118042,5.128979,0,0,0,0,100,0),
+(433220,28,-7677.588867,1612.681885,3.419049,0,0,0,0,100,0),
+(433220,29,-7667.428711,1601.642334,1.248345,0,0,0,0,100,0),
+(433220,30,-7656.230957,1593.253296,3.186309,0,0,0,0,100,0),
+(433220,31,-7643.143066,1587.457275,5.195174,0,0,0,0,100,0),
+(433220,32,-7628.659668,1587.804810,6.025109,0,0,0,0,100,0),
+(433220,33,-7619.128906,1595.998901,5.355808,0,0,0,0,100,0),
+(433220,34,-7613.072266,1608.582764,2.668371,0,0,0,0,100,0),
+(433220,35,-7605.075684,1620.776611,2.568130,0,0,0,0,100,0),
+(433220,36,-7599.562988,1634.706543,4.553499,0,0,0,0,100,0),
+(433220,37,-7605.732422,1639.759155,2.198371,0,0,0,0,100,0),
+(433220,38,-7610.278320,1628.909790,2.462519,0,0,0,0,100,0),
+(433220,39,-7613.120605,1611.651123,2.589123,0,0,0,0,100,0),
+(433220,40,-7617.356934,1598.347534,4.641613,0,0,0,0,100,0),
+(433220,41,-7628.784180,1587.950806,6.064836,0,0,0,0,100,0),
+(433220,42,-7639.729980,1589.783813,5.447087,0,0,0,0,100,0),
+(433220,43,-7654.615723,1597.761353,3.670609,0,0,0,0,100,0),
+(433220,44,-7663.443359,1606.836182,2.949980,0,0,0,0,100,0),
+(433220,45,-7672.763672,1617.280640,4.842738,0,0,0,0,100,0),
+(433220,46,-7684.707031,1630.059326,5.168031,0,0,0,0,100,0),
+(433220,47,-7694.602051,1639.962524,5.923426,0,0,0,0,100,0),
+(433220,48,-7707.055176,1652.256348,7.801556,0,0,0,0,100,0),
+(433220,49,-7717.229004,1661.873413,7.195765,0,0,0,0,100,0),
+(433220,50,-7727.743652,1671.116211,7.281052,0,0,0,0,100,0),
+(433220,51,-7738.428711,1680.162109,6.843456,0,0,0,0,100,0),
+(433220,52,-7751.823730,1691.423706,3.485293,0,0,0,0,100,0),
+(433220,53,-7762.860352,1702.140625,1.730373,0,0,0,0,100,0),
+(433220,54,-7768.805176,1716.334961,2.038195,0,0,0,0,100,0),
+(433220,55,-7772.072754,1729.328857,3.194579,0,0,0,0,100,0),
+(433220,56,-7773.440430,1746.756226,3.262704,0,0,0,0,100,0),
+(433220,57,-7774.675293,1760.701538,1.454978,0,0,0,0,100,0),
+(433220,58,-7775.765625,1778.149048,2.863208,0,0,0,0,100,0),
+(433220,59,-7778.452637,1790.994507,2.010733,0,0,0,0,100,0),
+(433220,60,-7783.087891,1807.865723,0.271067,0,0,0,0,100,0),
+(433220,61,-7786.545410,1821.431396,0.923371,0,0,0,0,100,0),
+(433220,62,-7790.598633,1838.451538,1.505119,0,0,0,0,100,0),
+(433220,63,-7795.272461,1852.971802,1.468031,0,0,0,0,100,0),
+(433220,64,-7804.368652,1867.914795,2.308474,0,0,0,0,100,0),
+(433220,65,-7811.636719,1877.915405,5.278152,0,0,0,0,100,0),
+(433220,66,-7824.912598,1887.686401,5.346197,0,0,0,0,100,0),
+(433220,67,-7839.624512,1892.284058,2.934072,0,0,0,0,100,0),
+(433220,68,-7856.468262,1895.142822,1.916823,0,0,0,0,100,0),
+(433220,69,-7868.257324,1894.790161,4.164560,0,0,0,0,100,0),
+(433220,70,-7885.666504,1893.007935,5.893253,0,0,0,0,100,0);
+-- ====================================
+-- Paths for Twilight Prophet 2 (guid #43323)
+-- ====================================
+UPDATE `creature` SET `MovementType`=2, `position_x`=-7007.199219, `position_y`=1155.165649, `position_z`=10.367001 WHERE `guid`=43323;
+UPDATE `creature_addon` SET `path_id`=433230 WHERE `guid`= 43323;
+DELETE FROM `waypoint_data` WHERE `id`=433230;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(433230,1,-7007.199219,1155.165649,10.367001,0,0,0,0,100,0),
+(433230,2,-7013.322754,1146.656982,7.765337,0,0,0,0,100,0),
+(433230,3,-7029.557129,1126.831177,0.441744,0,0,0,0,100,0),
+(433230,4,-7042.741211,1124.151367,2.458173,0,0,0,0,100,0),
+(433230,5,-7057.576172,1132.508423,1.796156,0,0,0,0,100,0),
+(433230,6,-7066.061523,1144.144409,1.819798,0,0,0,0,100,0),
+(433230,7,-7063.622559,1155.527222,0.355760,0,0,0,0,100,0),
+(433230,8,-7057.280273,1162.759033,0.884041,0,0,0,0,100,0),
+(433230,9,-7051.809082,1173.513184,0.766896,0,0,0,0,100,0),
+(433230,10,-7053.896973,1184.036377,0.545792,0,0,0,0,100,0),
+(433230,11,-7051.105469,1194.661133,0.349549,0,0,0,0,100,0),
+(433230,12,-7054.485840,1205.540894,0.349985,0,0,0,0,100,0),
+(433230,13,-7055.359375,1215.794434,0.349985,0,0,0,0,100,0),
+(433230,14,-7049.322266,1223.330322,0.349985,0,0,0,0,100,0),
+(433230,15,-7035.041992,1239.769531,0.358600,0,0,0,0,100,0),
+(433230,16,-7025.624023,1250.415405,0.526597,0,0,0,0,100,0),
+(433230,17,-7012.420410,1257.504395,0.411500,0,0,0,0,100,0),
+(433230,18,-6993.685059,1258.257690,-0.058926,0,0,0,0,100,0),
+(433230,19,-6976.384277,1260.632446,-0.220956,0,0,0,0,100,0),
+(433230,20,-6954.655273,1267.109131,2.393948,0,0,0,0,100,0),
+(433230,21,-6938.101074,1272.757690,3.474210,0,0,0,0,100,0),
+(433230,22,-6923.599609,1283.566650,2.920597,0,0,0,0,100,0),
+(433230,23,-6911.884277,1300.983032,5.251194,0,0,0,0,100,0),
+(433230,24,-6895.383301,1327.812012,3.925846,0,0,0,0,100,0),
+(433230,25,-6882.254395,1348.496704,2.143369,0,0,0,0,100,0),
+(433230,26,-6869.834473,1369.613037,3.275267,0,0,0,0,100,0),
+(433230,27,-6854.997559,1393.331299,3.114167,0,0,0,0,100,0),
+(433230,28,-6840.753418,1417.390625,-0.766261,0,0,0,0,100,0),
+(433230,29,-6827.396973,1441.993530,4.690745,0,0,0,0,100,0),
+(433230,30,-6815.702148,1459.405029,4.718923,0,0,0,0,100,0),
+(433230,31,-6802.099121,1479.763550,3.148716,0,0,0,0,100,0),
+(433230,32,-6786.228027,1498.344238,4.406202,0,0,0,0,100,0),
+(433230,33,-6756.861816,1533.071045,4.684423,0,0,0,0,100,0),
+(433230,34,-6739.011719,1557.908691,5.224258,0,0,0,0,100,0),
+(433230,35,-6719.190430,1577.632202,6.617586,0,0,0,0,100,0),
+(433230,36,-6700.756348,1593.744507,7.824927,0,0,0,0,100,0),
+(433230,37,-6688.981934,1615.776855,10.382424,0,0,0,0,100,0),
+(433230,38,-6688.395020,1633.384277,9.874694,0,0,0,0,100,0),
+(433230,39,-6695.491211,1645.041016,8.801991,0,0,0,0,100,0),
+(433230,40,-6709.729004,1660.468872,7.372326,0,0,0,0,100,0),
+(433230,41,-6717.024902,1672.027588,8.437102,0,0,0,0,100,0),
+(433230,42,-6725.587402,1666.742920,6.688062,0,0,0,0,100,0),
+(433230,43,-6749.216309,1660.499878,6.760650,0,0,0,0,100,0),
+(433230,44,-6756.531250,1655.720703,5.885690,0,0,0,0,100,0),
+(433230,45,-6751.630859,1649.907227,7.501710,0,0,0,0,100,0),
+(433230,46,-6757.303223,1654.306396,5.651666,0,0,0,0,100,0),
+(433230,47,-6760.314453,1646.274780,6.422415,0,0,0,0,100,0),
+(433230,48,-6760.897949,1620.609009,6.122479,0,0,0,0,100,0),
+(433230,49,-6754.945801,1604.433838,7.166245,0,0,0,0,100,0),
+(433230,50,-6743.704590,1586.736206,6.590928,0,0,0,0,100,0),
+(433230,51,-6734.563965,1566.877808,5.459243,0,0,0,0,100,0),
+(433230,52,-6737.753906,1555.786255,5.394959,0,0,0,0,100,0),
+(433230,53,-6751.723145,1512.513184,5.181065,0,0,0,0,100,0),
+(433230,54,-6759.635742,1478.423706,4.751054,0,0,0,0,100,0),
+(433230,55,-6770.013672,1446.814331,2.063652,0,0,0,0,100,0),
+(433230,56,-6788.232910,1425.676392,3.310894,0,0,0,0,100,0),
+(433230,57,-6800.025391,1396.515381,1.172720,0,0,0,0,100,0),
+(433230,58,-6819.817383,1360.497070,4.872425,0,0,0,0,100,0),
+(433230,59,-6843.601563,1330.235718,4.759835,0,0,0,0,100,0),
+(433230,60,-6865.066895,1302.607056,-0.134331,0,0,0,0,100,0),
+(433230,61,-6882.897949,1276.647705,-0.666526,0,0,0,0,100,0),
+(433230,62,-6899.618164,1249.951416,1.992437,0,0,0,0,100,0),
+(433230,63,-6911.325195,1233.318115,2.319501,0,0,0,0,100,0),
+(433230,64,-6921.393555,1211.509766,2.345217,0,0,0,0,100,0),
+(433230,65,-6924.643066,1190.791016,2.364320,0,0,0,0,100,0),
+(433230,66,-6928.015137,1159.474487,3.196892,0,0,0,0,100,0),
+(433230,67,-6936.601563,1143.801880,4.415056,0,0,0,0,100,0),
+(433230,68,-6943.562012,1128.777466,3.058245,0,0,0,0,100,0),
+(433230,69,-6949.626465,1108.707520,0.427855,0,0,0,0,100,0),
+(433230,70,-6964.038086,1089.657227,2.763069,0,0,0,0,100,0),
+(433230,71,-6987.258301,1082.670776,4.084322,0,0,0,0,100,0),
+(433230,72,-7012.456055,1093.988525,1.606724,0,0,0,0,100,0),
+(433230,73,-7026.307129,1108.785156,2.950602,0,0,0,0,100,0),
+(433230,74,-7021.941406,1133.171997,1.929922,0,0,0,0,100,0),
+(433230,75,-7013.507813,1146.713501,7.749496,0,0,0,0,100,0);
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8602: Setis - correction and pathing
+-- Before Cataclysm, this rare elite was a Fel Reaver type mob in Silithus
+-- but the 3.3.5 TDB has this mob inexplicably nerfed to his post-Cataclysm size and damage
+--
+-- This fixes his pre-Cat size, damage and restores his zone pathing
+
+-- ====================================
+-- Setis correction and path
+-- ====================================
+UPDATE `creature_template` SET `scale`=3, `mindmg`=700, `maxdmg`=900 WHERE `entry`=14471;
+UPDATE `creature` SET `MovementType`=2, `position_x`=-7970.898438, `position_y`=1507.219971, `position_z`=-1.551867 WHERE `guid`=51838;
+DELETE FROM `creature_addon` WHERE `guid`=51838;
+INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (51838, 518380);
+DELETE FROM `waypoint_data` WHERE `id`=518380;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(518380,1,-7970.898438,1507.219971,-1.551867,0,0,0,0,100,0),
+(518380,2,-7943.037598,1493.791138,-6.626160,0,0,0,0,100,0),
+(518380,3,-7918.484375,1468.855347,-5.768747,0,0,0,0,100,0),
+(518380,4,-7894.920898,1446.878418,-9.586535,0,0,0,0,100,0),
+(518380,5,-7887.063965,1414.645752,-4.758429,0,0,0,0,100,0),
+(518380,6,-7879.735840,1375.461914,-8.273664,0,0,0,0,100,0),
+(518380,7,-7863.913574,1348.840820,-6.652806,0,0,0,0,100,0),
+(518380,8,-7839.481934,1331.171509,-9.644982,0,0,0,0,100,0),
+(518380,9,-7799.420410,1305.002441,-5.837549,0,0,0,0,100,0),
+(518380,10,-7775.251953,1267.372559,-4.494194,0,0,0,0,100,0),
+(518380,11,-7796.921387,1231.137085,-4.357635,0,0,0,0,100,0),
+(518380,12,-7814.783203,1204.887451,-0.534356,0,0,0,0,100,0),
+(518380,13,-7823.562500,1158.288696,1.645526,0,0,0,0,100,0),
+(518380,14,-7818.532227,1123.668945,0.376355,0,0,0,0,100,0),
+(518380,15,-7803.921387,1086.932251,4.711929,0,0,0,0,100,0),
+(518380,16,-7769.979980,1061.283813,1.140280,0,0,0,0,100,0),
+(518380,17,-7748.981934,1029.688477,2.546784,0,0,0,0,100,0),
+(518380,18,-7725.582031,994.818115,1.862588,0,0,0,0,100,0),
+(518380,19,-7700.375977,961.477478,-1.844931,0,0,0,0,100,0),
+(518380,20,-7660.693848,939.870605,0.607142,0,0,0,0,100,0),
+(518380,21,-7628.968262,925.089294,0.414325,0,0,0,0,100,0),
+(518380,22,-7594.459473,932.484253,1.851091,0,0,0,0,100,0),
+(518380,23,-7550.452148,954.033569,0.911450,0,0,0,0,100,0),
+(518380,24,-7519.019531,969.427917,1.444063,0,0,0,0,100,0),
+(518380,25,-7476.106934,979.391663,2.042855,0,0,0,0,100,0),
+(518380,26,-7428.556641,978.902710,3.131437,0,0,0,0,100,0),
+(518380,27,-7390.671875,1013.550964,3.490367,0,0,0,0,100,0),
+(518380,28,-7373.875977,1046.144897,4.743690,0,0,0,0,100,0),
+(518380,29,-7364.927734,1093.089844,1.329022,0,0,0,0,100,0),
+(518380,30,-7347.156250,1145.419922,1.288395,0,0,0,0,100,0),
+(518380,31,-7364.325195,1159.787231,3.236028,0,0,0,0,100,0),
+(518380,32,-7399.254395,1182.984497,1.843866,0,0,0,0,100,0),
+(518380,33,-7429.508301,1202.897827,3.029610,0,0,0,0,100,0),
+(518380,34,-7468.980469,1233.918945,3.407038,0,0,0,0,100,0),
+(518380,35,-7511.831543,1250.466309,3.333737,0,0,0,0,100,0),
+(518380,36,-7540.864258,1269.111328,6.091939,0,0,0,0,100,0),
+(518380,37,-7555.662109,1299.827026,2.850513,0,0,0,0,100,0),
+(518380,38,-7569.881348,1333.556763,3.011905,0,0,0,0,100,0),
+(518380,39,-7598.235352,1373.451294,4.004597,0,0,0,0,100,0),
+(518380,40,-7626.755371,1409.476685,3.858852,0,0,0,0,100,0),
+(518380,41,-7655.338867,1460.769531,3.685694,0,0,0,0,100,0),
+(518380,42,-7697.577637,1485.361694,4.425735,0,0,0,0,100,0),
+(518380,43,-7728.651855,1513.852295,-0.668692,0,0,0,0,100,0),
+(518380,44,-7740.848633,1555.398560,1.300065,0,0,0,0,100,0),
+(518380,45,-7763.296875,1582.227173,-0.216693,0,0,0,0,100,0),
+(518380,46,-7787.744629,1593.927979,2.871248,0,0,0,0,100,0),
+(518380,47,-7832.063965,1601.147339,4.115499,0,0,0,0,100,0),
+(518380,48,-7870.669434,1592.223389,2.563943,0,0,0,0,100,0),
+(518380,49,-7908.875977,1561.901733,-2.734423,0,0,0,0,100,0),
+(518380,50,-7932.152832,1528.089844,-0.895027,0,0,0,0,100,0),
+(518380,51,-7946.883301,1508.120239,-6.629673,0,0,0,0,100,0);
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8604: Lapress - pathing
+-- Lapress is a rare elite in Silithus that paths around Hive'Regal
+-- TBD has two spawns for this type (error) and no path for either
+-- ====================================
+-- Path for Lapress (guid #43120)
+-- ====================================
+-- remove duplicate guid #51782
+DELETE FROM `creature` WHERE `guid`=51782;
+DELETE FROM `creature_addon` WHERE `guid`=51782;
+-- set pathing for guid #43120
+UPDATE `creature` SET `MovementType`=2,`position_x`=-7803.758789,`position_y`=515.706482,`position_z`=-38.351662 WHERE `guid`=43120;
+UPDATE `creature_addon` SET `path_id`=431200 WHERE `guid`=43120;
+DELETE FROM `waypoint_data` WHERE `id`=431200;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(431200,1,-7803.758789,515.706482,-38.351662,0,0,0,0,100,0),
+(431200,2,-7836.155762,493.625061,-35.266079,0,0,0,0,100,0),
+(431200,3,-7853.409180,473.479858,-33.659664,0,0,0,0,100,0),
+(431200,4,-7883.189941,436.889862,-32.837315,0,0,0,0,100,0),
+(431200,5,-7902.391113,426.345123,-32.146542,0,0,0,0,100,0),
+(431200,6,-7935.672852,417.698547,-30.542465,0,0,0,0,100,0),
+(431200,7,-7962.825684,424.285736,-31.605789,0,0,0,0,100,0),
+(431200,8,-7985.026367,438.749878,-30.173546,0,0,0,0,100,0),
+(431200,9,-7990.209961,447.782166,-30.206039,0,0,0,0,100,0),
+(431200,10,-7990.671387,458.651367,-30.272879,0,0,0,0,100,0),
+(431200,11,-7981.745117,472.982819,-28.886236,0,0,0,0,100,0),
+(431200,12,-7978.358398,486.361145,-27.435070,0,0,0,0,100,0),
+(431200,13,-7976.823730,500.482758,-29.771008,0,0,0,0,100,0),
+(431200,14,-7969.692383,514.711243,-29.564129,0,0,0,0,100,0),
+(431200,15,-7956.184570,519.753662,-29.493561,0,0,0,0,100,0),
+(431200,16,-7947.121094,518.579346,-28.268650,0,0,0,0,100,0),
+(431200,17,-7926.888184,512.964294,-30.582899,0,0,0,0,100,0),
+(431200,18,-7906.528809,511.238007,-31.442280,0,0,0,0,100,0),
+(431200,19,-7885.870117,513.818298,-32.604053,0,0,0,0,100,0),
+(431200,20,-7865.162598,522.834473,-35.134956,0,0,0,0,100,0),
+(431200,21,-7835.427246,536.469238,-35.256481,0,0,0,0,100,0),
+(431200,22,-7811.894531,531.935547,-37.693974,0,0,0,0,100,0),
+(431200,23,-7787.803223,517.669800,-39.175011,0,0,0,0,100,0),
+(431200,24,-7758.233887,498.946594,-43.895679,0,0,0,0,100,0),
+(431200,25,-7740.895020,487.130463,-44.247120,0,0,0,0,100,0),
+(431200,26,-7724.676270,473.797882,-43.348301,0,0,0,0,100,0),
+(431200,27,-7711.100098,466.066101,-42.162849,0,0,0,0,100,0),
+(431200,28,-7693.685547,462.775269,-41.935429,0,0,0,0,100,0),
+(431200,29,-7679.479980,465.434692,-42.725754,0,0,0,0,100,0),
+(431200,30,-7671.343750,477.136871,-43.937260,0,0,0,0,100,0),
+(431200,31,-7670.163086,492.271149,-43.557579,0,0,0,0,100,0),
+(431200,32,-7676.005371,503.306671,-42.504585,0,0,0,0,100,0),
+(431200,33,-7687.912598,517.063599,-42.958843,0,0,0,0,100,0),
+(431200,34,-7706.184570,525.815552,-43.932297,0,0,0,0,100,0),
+(431200,35,-7718.318848,525.054443,-43.541885,0,0,0,0,100,0),
+(431200,36,-7751.656738,514.520874,-43.412769,0,0,0,0,100,0),
+(431200,37,-7778.547363,507.991516,-41.380962,0,0,0,0,100,0);
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8605: Ghost Howl - pathing
+-- ====================================
+-- Ghost Howl path
+-- ====================================
+UPDATE `creature` SET `MovementType`=2,`position_x`=-758.331299,`position_y`=132.166534,`position_z`=2.778328 WHERE `guid`=51845;
+DELETE FROM `creature_addon` WHERE `guid`=51845;
+INSERT INTO `creature_addon` (`guid`,`path_id`) VALUES (51845,518450);
+DELETE FROM `waypoint_data` WHERE `id`=518450;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(518450,1,-758.331299,132.166534,2.778328,0,0,0,0,100,0),
+(518450,2,-779.039490,138.003098,-3.392812,0,0,0,0,100,0),
+(518450,3,-801.729553,140.723877,-8.184513,0,0,0,0,100,0),
+(518450,4,-817.906494,137.463898,-10.610684,0,0,0,0,100,0),
+(518450,5,-830.671692,150.509171,-10.048956,0,0,0,0,100,0),
+(518450,6,-824.121399,172.510635,-10.201122,0,0,0,0,100,0),
+(518450,7,-824.764526,186.873199,-9.988710,0,0,0,0,100,0),
+(518450,8,-831.982727,206.749084,-9.489987,0,0,0,0,100,0),
+(518450,9,-844.890625,227.419128,-3.092471,0,0,0,0,100,0),
+(518450,10,-857.643433,244.087906,8.022249,0,0,0,0,100,0),
+(518450,11,-872.992188,266.185333,19.168064,0,0,0,0,100,0),
+(518450,12,-882.134399,276.546539,22.082525,0,0,0,0,100,0),
+(518450,13,-889.800964,296.096069,23.395178,0,0,0,0,100,0),
+(518450,14,-902.934753,328.538361,23.222651,0,0,0,0,100,0),
+(518450,15,-911.667236,347.622101,22.762335,0,0,0,0,100,0),
+(518450,16,-920.617126,366.609924,17.728148,0,0,0,0,100,0),
+(518450,17,-929.675842,385.545471,15.672112,0,0,0,0,100,0),
+(518450,18,-939.391296,404.154327,17.809969,0,0,0,0,100,0),
+(518450,19,-952.277527,430.414551,22.445030,0,0,0,0,100,0),
+(518450,20,-962.798096,448.574280,27.889492,0,0,0,0,100,0),
+(518450,21,-974.157043,466.224060,33.387161,0,0,0,0,100,0),
+(518450,22,-986.256165,481.866150,36.911251,0,0,0,0,100,0),
+(518450,23,-1009.331055,498.010986,39.317425,0,0,0,0,100,0),
+(518450,24,-1028.780029,505.894989,38.973831,0,0,0,0,100,0),
+(518450,25,-1050.176880,512.740112,37.666676,0,0,0,0,100,0),
+(518450,26,-1067.730103,514.100281,36.464020,0,0,0,0,100,0),
+(518450,27,-1088.434937,510.596375,33.673737,0,0,0,0,100,0),
+(518450,28,-1109.123535,506.992828,31.172518,0,0,0,0,100,0),
+(518450,29,-1136.632324,501.823212,24.153307,0,0,0,0,100,0),
+(518450,30,-1156.810181,493.641083,17.238251,0,0,0,0,100,0),
+(518450,31,-1171.157104,480.669556,11.453438,0,0,0,0,100,0),
+(518450,32,-1185.964233,465.781128,6.865259,0,0,0,0,100,0),
+(518450,33,-1207.324707,447.692993,5.389233,0,0,0,0,100,0),
+(518450,34,-1218.004517,433.970886,4.800968,0,0,0,0,100,0),
+(518450,35,-1233.591797,412.767426,3.494786,0,0,0,0,100,0),
+(518450,36,-1231.269775,384.682373,-1.099372,0,0,0,0,100,0),
+(518450,37,-1215.842285,369.726135,-1.821958,0,0,0,0,100,0),
+(518450,38,-1195.579590,360.878784,4.173124,0,0,0,0,100,0),
+(518450,39,-1176.721313,351.738220,10.693844,0,0,0,0,100,0),
+(518450,40,-1156.654419,345.599243,15.725755,0,0,0,0,100,0),
+(518450,41,-1130.640137,342.170074,22.589449,0,0,0,0,100,0),
+(518450,42,-1102.557251,342.299896,31.515118,0,0,0,0,100,0),
+(518450,43,-1080.748291,344.271393,37.185501,0,0,0,0,100,0),
+(518450,44,-1064.598389,353.161041,35.431694,0,0,0,0,100,0),
+(518450,45,-1040.972900,368.182465,32.022644,0,0,0,0,100,0),
+(518450,46,-1023.555725,379.914581,27.822573,0,0,0,0,100,0),
+(518450,47,-1006.352783,391.955780,24.177290,0,0,0,0,100,0),
+(518450,48,-988.705933,402.575775,20.717924,0,0,0,0,100,0),
+(518450,49,-969.883667,398.736816,17.409334,0,0,0,0,100,0),
+(518450,50,-954.819580,383.869385,18.176464,0,0,0,0,100,0),
+(518450,51,-940.532715,364.391052,19.092533,0,0,0,0,100,0),
+(518450,52,-930.115662,346.157562,23.026438,0,0,0,0,100,0),
+(518450,53,-914.620056,322.843170,27.801060,0,0,0,0,100,0),
+(518450,54,-907.517029,307.239838,28.464359,0,0,0,0,100,0),
+(518450,55,-899.405396,286.196198,28.664932,0,0,0,0,100,0),
+(518450,56,-883.979919,262.894531,23.531834,0,0,0,0,100,0),
+(518450,57,-875.788635,248.850708,16.680983,0,0,0,0,100,0),
+(518450,58,-872.646851,221.030136,3.035634,0,0,0,0,100,0),
+(518450,59,-869.936951,200.205719,-4.584671,0,0,0,0,100,0),
+(518450,60,-865.188293,175.768646,-11.755344,0,0,0,0,100,0),
+(518450,61,-856.970764,158.444336,-10.823591,0,0,0,0,100,0),
+(518450,62,-840.617371,142.700714,-10.213431,0,0,0,0,100,0),
+(518450,63,-819.317688,131.755249,-10.598165,0,0,0,0,100,0),
+(518450,64,-794.494324,124.537750,-8.377938,0,0,0,0,100,0),
+(518450,65,-769.618774,126.572906,-4.253401,0,0,0,0,100,0),
+(518450,66,-751.691223,122.151276,0.485237,0,0,0,0,100,0),
+(518450,67,-727.576599,116.421646,5.932970,0,0,0,0,100,0),
+(518450,68,-701.033875,114.985733,7.786272,0,0,0,0,100,0);
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8606: Magram Pack Runners & Bonepaws - pathing and formations
+-- The 3 Magram Pack Runners are supposed to have paths and
+-- each in a formation with 2 of the 6 Magram Bonepaws
+-- ====================================
+-- Path for Magram Pack Runner #27113
+-- ====================================
+UPDATE `creature` SET `MovementType`=2,`position_x`=-1891.590088,`position_y`=980.184692,`position_z`=90.829735 WHERE `guid`=27113;
+UPDATE `creature_addon` SET `path_id` = 271130 WHERE `guid`= 27113;
+DELETE FROM `waypoint_data` WHERE `id`=271130;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(271130,1,-1891.590088,980.184692,90.829735,0,0,0,0,100,0),
+(271130,2,-1891.458496,956.675476,91.027580,0,0,0,0,100,0),
+(271130,3,-1891.624878,946.563904,92.976524,0,0,0,0,100,0),
+(271130,4,-1898.689453,936.942932,96.155182,0,0,0,0,100,0),
+(271130,5,-1896.239990,928.439636,100.486923,0,0,0,0,100,0),
+(271130,6,-1895.771118,926.325623,101.644440,0,0,0,0,100,0),
+(271130,7,-1898.247803,913.548157,108.486610,0,0,0,0,100,0),
+(271130,8,-1903.221069,906.490662,112.850449,0,0,0,0,100,0),
+(271130,9,-1900.763306,901.097595,113.787796,0,0,0,0,100,0),
+(271130,10,-1895.742065,893.227478,115.708855,0,0,0,0,100,0),
+(271130,11,-1893.209839,883.200073,119.829475,0,0,0,0,100,0),
+(271130,12,-1888.124268,877.533752,122.451233,0,0,0,0,100,0),
+(271130,13,-1881.200928,876.302002,123.132965,0,0,0,0,100,0),
+(271130,14,-1874.027710,875.738892,120.035500,0,0,0,0,100,0),
+(271130,15,-1863.357178,872.131592,113.412071,0,0,0,0,100,0),
+(271130,16,-1853.591919,866.042908,106.688286,0,0,0,0,100,0),
+(271130,17,-1848.998535,861.435791,105.390579,0,0,0,0,100,0),
+(271130,18,-1838.855347,859.845703,98.179382,0,0,0,0,100,0),
+(271130,19,-1832.145508,857.384705,96.830002,0,0,0,0,100,0),
+(271130,20,-1824.019287,851.966980,95.998306,0,0,0,0,100,0),
+(271130,21,-1820.149292,845.271362,95.867393,0,0,0,0,100,0),
+(271130,22,-1820.087524,837.699524,96.678963,0,0,0,0,100,0),
+(271130,23,-1820.891357,829.095459,101.625664,0,0,0,0,100,0),
+(271130,24,-1822.111328,821.425110,102.975616,0,0,0,0,100,0),
+(271130,25,-1813.876953,816.177124,102.989807,0,0,0,0,100,0),
+(271130,26,-1796.074097,809.767456,103.040268,0,0,0,0,100,0),
+(271130,27,-1775.111328,808.607422,103.003746,0,0,0,0,100,0),
+(271130,28,-1745.328003,812.193054,100.710617,0,0,0,0,100,0),
+(271130,29,-1731.692627,815.352661,98.948845,0,0,0,0,100,0),
+(271130,30,-1704.316528,821.220398,96.105034,0,0,0,0,100,0),
+(271130,31,-1684.435303,827.895630,95.722160,0,0,0,0,100,0),
+(271130,32,-1658.400269,838.199158,94.617905,0,0,0,0,100,0),
+(271130,33,-1639.631348,847.562805,92.239937,0,0,0,0,100,0),
+(271130,34,-1625.172974,862.494629,91.397324,0,0,0,0,100,0),
+(271130,35,-1622.582153,879.298401,89.652138,0,0,0,0,100,0),
+(271130,36,-1621.649536,904.026794,88.916763,0,0,0,0,100,0),
+(271130,37,-1607.298218,909.740479,88.886688,0,0,0,0,100,0),
+(271130,38,-1618.637207,899.038879,89.218735,0,0,0,0,100,0),
+(271130,39,-1621.257446,882.686401,89.581314,0,0,0,0,100,0),
+(271130,40,-1625.103271,866.434509,90.726997,0,0,0,0,100,0),
+(271130,41,-1642.078247,846.703918,92.289513,0,0,0,0,100,0),
+(271130,42,-1657.022583,841.595581,93.342613,0,0,0,0,100,0),
+(271130,43,-1676.612915,834.048279,94.937180,0,0,0,0,100,0),
+(271130,44,-1696.567139,827.531250,95.551430,0,0,0,0,100,0),
+(271130,45,-1716.638916,821.356750,96.912285,0,0,0,0,100,0),
+(271130,46,-1743.523560,813.593079,100.411209,0,0,0,0,100,0),
+(271130,47,-1762.349976,810.495056,102.357765,0,0,0,0,100,0),
+(271130,48,-1783.272583,809.470154,102.856506,0,0,0,0,100,0),
+(271130,49,-1801.859985,812.414734,103.297623,0,0,0,0,100,0),
+(271130,50,-1822.259888,821.903259,102.958633,0,0,0,0,100,0),
+(271130,51,-1819.364502,837.597229,96.466019,0,0,0,0,100,0),
+(271130,52,-1820.273804,844.711060,96.063477,0,0,0,0,100,0),
+(271130,53,-1826.404053,854.782043,95.999260,0,0,0,0,100,0),
+(271130,54,-1836.027832,861.635498,96.368958,0,0,0,0,100,0),
+(271130,55,-1848.700195,864.365601,104.286652,0,0,0,0,100,0),
+(271130,56,-1870.647461,871.074402,118.388863,0,0,0,0,100,0),
+(271130,57,-1880.014038,876.556885,122.919815,0,0,0,0,100,0),
+(271130,58,-1885.373779,877.127441,122.962570,0,0,0,0,100,0),
+(271130,59,-1893.455322,880.086243,120.755325,0,0,0,0,100,0),
+(271130,60,-1896.515259,889.165039,116.963913,0,0,0,0,100,0),
+(271130,61,-1897.799316,898.470825,114.102051,0,0,0,0,100,0),
+(271130,62,-1900.567505,904.286072,113.080307,0,0,0,0,100,0),
+(271130,63,-1903.235352,908.120667,112.314278,0,0,0,0,100,0),
+(271130,64,-1900.511353,914.542542,108.583321,0,0,0,0,100,0),
+(271130,65,-1894.257202,927.594543,100.719864,0,0,0,0,100,0),
+(271130,66,-1896.971069,937.240601,96.210007,0,0,0,0,100,0),
+(271130,67,-1892.367676,945.632507,93.317879,0,0,0,0,100,0),
+(271130,68,-1886.229248,960.514404,90.799576,0,0,0,0,100,0);
+-- ====================================
+-- Path for Magram Pack Runner #27114
+-- ====================================
+UPDATE `creature` SET `MovementType`=2,`position_x`=-1866.258911,`position_y`=1292.665039,`position_z`=90.267395 WHERE `guid`=27114;
+UPDATE `creature_addon` SET `path_id`=271140 WHERE `guid`=27114;
+DELETE FROM `waypoint_data` WHERE `id`=271140;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(271140,1,-1866.258911,1292.665039,90.267395,0,0,0,0,100,0),
+(271140,2,-1886.374634,1289.152222,90.551041,0,0,0,0,100,0),
+(271140,3,-1892.611328,1280.994873,91.166740,0,0,0,0,100,0),
+(271140,4,-1908.316772,1257.842529,93.266472,0,0,0,0,100,0),
+(271140,5,-1917.964233,1246.185059,92.404716,0,0,0,0,100,0),
+(271140,6,-1931.856934,1230.453003,91.080635,0,0,0,0,100,0),
+(271140,7,-1945.802490,1217.474487,90.822105,0,0,0,0,100,0),
+(271140,8,-1953.053955,1205.906982,90.199371,0,0,0,0,100,0),
+(271140,9,-1954.759521,1185.012451,90.546669,0,0,0,0,100,0),
+(271140,10,-1960.632080,1162.009644,92.740318,0,0,0,0,100,0),
+(271140,11,-1968.671509,1142.648438,92.969467,0,0,0,0,100,0),
+(271140,12,-1975.597656,1123.311523,98.838661,0,0,0,0,100,0),
+(271140,13,-1976.925781,1112.383911,100.757591,0,0,0,0,100,0),
+(271140,14,-1978.639648,1091.477661,104.626518,0,0,0,0,100,0),
+(271140,15,-1981.014648,1077.680664,108.600563,0,0,0,0,100,0),
+(271140,16,-1981.231812,1093.783081,104.649025,0,0,0,0,100,0),
+(271140,17,-1980.318115,1114.760254,100.730011,0,0,0,0,100,0),
+(271140,18,-1977.647827,1135.578613,98.110054,0,0,0,0,100,0),
+(271140,19,-1976.883911,1152.740601,92.612328,0,0,0,0,100,0),
+(271140,20,-1972.871948,1168.429443,92.369759,0,0,0,0,100,0),
+(271140,21,-1967.373779,1181.294678,91.924042,0,0,0,0,100,0),
+(271140,22,-1956.891968,1199.446533,90.469025,0,0,0,0,100,0),
+(271140,23,-1944.451538,1216.360474,90.741180,0,0,0,0,100,0),
+(271140,24,-1935.247192,1226.884766,90.725029,0,0,0,0,100,0),
+(271140,25,-1919.173584,1240.278442,91.884590,0,0,0,0,100,0),
+(271140,26,-1910.415283,1250.672729,92.707100,0,0,0,0,100,0),
+(271140,27,-1902.390259,1269.222412,93.079758,0,0,0,0,100,0),
+(271140,28,-1882.762817,1289.113037,89.803139,0,0,0,0,100,0);
+-- ====================================
+-- Path for Magram Pack Runner #27115
+-- ====================================
+UPDATE `creature` SET `MovementType`=2,`position_x`=-1743.915527,`position_y`=1068.425781,`position_z`=91.268845 WHERE `guid`=27115;
+UPDATE `creature_addon` SET `path_id`=271150 WHERE `guid`=27115;
+DELETE FROM `waypoint_data` WHERE `id`=271150;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(271150,1,-1743.915527,1068.425781,91.268845,0,0,0,0,100,0),
+(271150,2,-1736.558838,1082.173950,89.994659,0,0,0,0,100,0),
+(271150,3,-1731.699097,1095.289185,90.883049,0,0,0,0,100,0),
+(271150,4,-1722.143555,1114.410278,93.485123,0,0,0,0,100,0),
+(271150,5,-1709.042358,1125.708862,89.139664,0,0,0,0,100,0),
+(271150,6,-1699.357300,1128.252197,89.850990,0,0,0,0,100,0),
+(271150,7,-1683.567871,1130.573364,93.404541,0,0,0,0,100,0),
+(271150,8,-1667.459351,1123.953369,90.854866,0,0,0,0,100,0),
+(271150,9,-1656.821899,1116.278931,90.431404,0,0,0,0,100,0),
+(271150,10,-1646.577393,1106.751831,91.073830,0,0,0,0,100,0),
+(271150,11,-1631.150879,1093.422852,91.403458,0,0,0,0,100,0),
+(271150,12,-1621.821655,1082.984253,88.607735,0,0,0,0,100,0),
+(271150,13,-1611.260376,1069.123901,90.329842,0,0,0,0,100,0),
+(271150,14,-1604.194092,1057.039795,92.576813,0,0,0,0,100,0),
+(271150,15,-1594.728149,1034.252197,88.385590,0,0,0,0,100,0),
+(271150,16,-1595.609131,1021.981750,89.746979,0,0,0,0,100,0),
+(271150,17,-1604.221924,1005.585327,90.266022,0,0,0,0,100,0),
+(271150,18,-1615.037598,992.642090,90.368553,0,0,0,0,100,0),
+(271150,19,-1631.977051,980.254822,90.305595,0,0,0,0,100,0),
+(271150,20,-1647.029297,972.532104,90.763550,0,0,0,0,100,0),
+(271150,21,-1666.543457,964.811646,93.425499,0,0,0,0,100,0),
+(271150,22,-1679.549927,959.631775,91.412773,0,0,0,0,100,0),
+(271150,23,-1699.294800,952.516907,90.277832,0,0,0,0,100,0),
+(271150,24,-1717.125854,948.837036,90.326904,0,0,0,0,100,0),
+(271150,25,-1738.984375,950.498413,91.433197,0,0,0,0,100,0),
+(271150,26,-1759.411499,958.262085,92.419426,0,0,0,0,100,0),
+(271150,27,-1769.315063,968.137329,92.924309,0,0,0,0,100,0),
+(271150,28,-1783.742065,983.393127,95.142967,0,0,0,0,100,0),
+(271150,29,-1792.408325,994.340515,93.971786,0,0,0,0,100,0),
+(271150,30,-1800.310425,1011.053650,92.614510,0,0,0,0,100,0),
+(271150,31,-1793.093384,1027.993652,91.870705,0,0,0,0,100,0),
+(271150,32,-1772.457642,1046.897461,92.920769,0,0,0,0,100,0);
+-- ====================================
+-- assign the 6 Magram Bonepaws (guid 27601-27606) into groups with the 3 Magram Pack Runners (guid 27113-27115)
+-- ====================================
+DELETE FROM `creature_formations` WHERE `leaderGUID` BETWEEN 27113 AND 27115;
+INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`) VALUES
+(27113,27113,0,0,2),
+(27113,27601,3,20,2),
+(27113,27602,3,340,2),
+(27114,27114,0,0,2),
+(27114,27603,3,20,2),
+(27114,27604,3,340,2),
+(27115,27115,0,0,2),
+(27115,27605,3,20,2),
+(27115,27606,3,340,2);
+UPDATE creature c1, creature c2, `creature_formations` cf SET c1.position_x = c2.position_x, c1.position_y = c2.position_y, c1.position_z = c2.position_z WHERE c1.guid = cf.memberGUID AND c2.guid = cf.leaderGUID AND c1.guid IN (27601,27602,27603,27604,27605,27606);
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8608: Caliph Scorpidsting's guard formation
+-- Caliph Scorpidstring has two guards assigned (guid 23466 and 23467)
+-- but they are defined incorrectly as MovementType=2 with no waypoint data so they just sit at their spawn point and never moved
+-- This places them in a formation with Caliph Scorpidsting so that they follow him on his pathing
+DELETE FROM `creature_formations` WHERE `leaderGUID`=23286;
+INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`) VALUES
+(23286,23286,0,0,2),
+(23286,23466,4,30,2),
+(23286,23467,4,330,2);
diff --git a/sql/updates/world/2012_12_13_00_world.sql b/sql/updates/world/2012_12_13_00_world.sql
new file mode 100644
index 00000000000..ab27796f933
--- /dev/null
+++ b/sql/updates/world/2012_12_13_00_world.sql
@@ -0,0 +1,4 @@
+ALTER TABLE `creature_classlevelstats` ADD PRIMARY KEY (`level`, `class`);
+ALTER TABLE `playercreateinfo_item` ADD PRIMARY KEY (`race`, `class`, `itemid`); -- already got (race, class) index
+ALTER TABLE `spell_enchant_proc_data` ADD PRIMARY KEY (`entry`);
+ALTER TABLE `version` ADD PRIMARY KEY (`core_version`);
diff --git a/sql/updates/world/2012_12_14_00_world_conditions.sql b/sql/updates/world/2012_12_14_00_world_conditions.sql
new file mode 100644
index 00000000000..6b6fbfd02c0
--- /dev/null
+++ b/sql/updates/world/2012_12_14_00_world_conditions.sql
@@ -0,0 +1,4 @@
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9456;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(15,9456,0,0,0,9,0,12132,0,0,0,0,'','Koltira Deathweaver show gossip option if player has quest 12132'),
+(15,9456,0,0,0,1,0,47740,0,0,1,0,'','Koltira Deathweaver show gossip option if player has not aura World of Shadows');
diff --git a/sql/updates/world/2012_12_14_01_world_waypoint_data.sql b/sql/updates/world/2012_12_14_01_world_waypoint_data.sql
new file mode 100644
index 00000000000..e3589c53340
--- /dev/null
+++ b/sql/updates/world/2012_12_14_01_world_waypoint_data.sql
@@ -0,0 +1,188 @@
+SET @NPC := 131038;
+SET @PATH := @NPC*10;
+DELETE FROM `creature` WHERE `guid`=@NPC;
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+(@NPC,26933,571,1,1,0,0,3738.288,310.6056,206.0655,1.91463,120,0,0,1,0,2);
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,3738.288,310.6056,206.0655,0,0,0,100,0),
+(@PATH,2,3775.943,320.1521,206.0655,0,0,0,100,0),
+(@PATH,3,3791.984,364.0035,206.0655,0,0,0,100,0),
+(@PATH,4,3821.821,375.4122,206.0655,0,0,0,100,0),
+(@PATH,5,3862.769,402.7154,206.0655,0,0,0,100,0),
+(@PATH,6,3833.872,426.7561,206.0655,0,0,0,100,0),
+(@PATH,7,3796.899,413.8476,206.0655,0,0,0,100,0),
+(@PATH,8,3780.125,433.8598,206.0655,0,0,0,100,0),
+(@PATH,9,3736.043,443.3744,206.0655,0,0,0,100,0),
+(@PATH,10,3713.603,445.3026,206.0655,0,0,0,100,0),
+(@PATH,11,3683.613,406.9387,206.0655,0,0,0,100,0),
+(@PATH,12,3706.474,364.4982,206.0655,0,0,0,100,0),
+(@PATH,13,3712.073,324.8767,206.0655,0,0,0,100,0);
+
+DELETE FROM `waypoint_data` WHERE `id`=34760;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(34760,1 ,1527.534058,-4154.753418,40.633469,0,0,0,0,100,0),
+(34760,2 ,1538.660889,-4155.732910,40.592560,0,0,0,0,100,0),
+(34760,3 ,1544.449585,-4165.091797,40.235329,0,0,0,0,100,0),
+(34760,4 ,1549.555054,-4182.306152,40.612457,0,0,0,0,100,0),
+(34760,5 ,1546.198364,-4195.886719,41.639046,0,0,0,0,100,0),
+(34760,6 ,1546.507202,-4208.074219,42.972824,0,0,0,0,100,0),
+(34760,7 ,1563.277588,-4208.397949,43.588390,0,0,0,0,100,0),
+(34760,8 ,1580.304932,-4204.166992,42.040199,0,0,0,0,100,0),
+(34760,9 ,1579.333008,-4190.097656,40.364456,0,0,0,0,100,0),
+(34760,10,1578.215454,-4169.156250,36.905151,0,0,0,0,100,0),
+(34760,11,1583.998901,-4151.174316,34.014111,0,0,0,0,100,0),
+(34760,12,1598.492920,-4127.300293,30.541750,0,0,0,0,100,0),
+(34760,13,1617.180908,-4113.645508,29.638874,0,0,0,0,100,0),
+(34760,14,1636.737183,-4106.015625,30.359407,0,0,0,0,100,0),
+(34760,15,1656.451660,-4098.783691,33.361252,0,0,0,0,100,0),
+(34760,16,1682.917603,-4089.642822,37.421402,0,0,0,0,100,0),
+(34760,17,1703.152954,-4084.039551,40.476315,0,0,0,0,100,0),
+(34760,18,1726.875488,-4072.490234,43.763309,0,0,0,0,100,0),
+(34760,19,1731.973511,-4067.927002,44.831135,0,0,0,0,100,0),
+(34760,20,1741.482544,-4049.207031,44.283241,0,0,0,0,100,0),
+(34760,21,1745.628418,-4030.451172,45.169521,0,0,0,0,100,0),
+(34760,22,1745.231323,-4016.597412,45.969612,0,0,0,0,100,0),
+(34760,23,1740.649658,-3996.140625,46.610088,0,0,0,0,100,0),
+(34760,24,1729.449951,-3971.255615,48.347816,0,0,0,0,100,0),
+(34760,25,1723.011841,-3958.823730,49.068924,0,0,0,0,100,0),
+(34760,26,1708.968994,-3932.853760,50.349556,0,0,0,0,100,0),
+(34760,27,1721.805054,-3957.727295,49.226501,0,0,0,0,100,0),
+(34760,28,1734.530396,-3982.660156,47.613869,0,0,0,0,100,0),
+(34760,29,1740.518555,-4002.613770,46.854977,0,0,0,0,100,0),
+(34760,30,1743.422241,-4023.412109,46.146847,0,0,0,0,100,0),
+(34760,31,1742.478638,-4043.433350,44.345577,0,0,0,0,100,0),
+(34760,32,1735.912354,-4059.685303,44.504650,0,0,0,0,100,0),
+(34760,33,1729.070313,-4071.194092,44.119446,0,0,0,0,100,0),
+(34760,34,1714.267700,-4082.427490,40.937172,0,0,0,0,100,0),
+(34760,35,1696.915161,-4087.865967,38.582226,0,0,0,0,100,0),
+(34760,36,1676.688477,-4093.507080,36.173759,0,0,0,0,100,0),
+(34760,37,1656.776611,-4100.146484,33.436935,0,0,0,0,100,0),
+(34760,38,1637.123169,-4107.544922,30.447823,0,0,0,0,100,0),
+(34760,39,1617.755859,-4115.625000,29.678862,0,0,0,0,100,0),
+(34760,40,1597.177124,-4130.714844,31.122652,0,0,0,0,100,0),
+(34760,41,1590.612183,-4140.921875,32.565376,0,0,0,0,100,0),
+(34760,42,1578.348389,-4166.501953,36.404202,0,0,0,0,100,0),
+(34760,43,1578.059326,-4183.750488,39.244587,0,0,0,0,100,0),
+(34760,44,1578.675171,-4204.605957,42.405655,0,0,0,0,100,0),
+(34760,45,1569.681030,-4206.293457,43.517696,0,0,0,0,100,0),
+(34760,46,1548.253662,-4208.393555,43.110550,0,0,0,0,100,0),
+(34760,47,1544.526123,-4201.686035,42.132000,0,0,0,0,100,0),
+(34760,48,1549.644531,-4176.722656,40.245403,0,0,0,0,100,0),
+(34760,49,1547.767822,-4167.392578,39.779228,0,0,0,0,100,0),
+(34760,50,1541.973145,-4159.893555,40.252274,0,0,0,0,100,0);
+
+DELETE FROM `waypoint_data` WHERE `id`=389230 AND `point`=11 AND CONCAT(`position_z`)=21.8886;
+UPDATE `waypoint_data` SET `point`=18 WHERE `id`=798590 AND `point`=17 AND CONCAT(`position_z`)=86.8893;
+
+DELETE FROM `waypoint_data` WHERE `id`=1004880;
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_flag`, `action`, `action_chance`, `wpguid`) VALUES
+(1004880,1 , 3760.31, -5413.58, 26.5976, 0, 0, 0, 0, 100, 0),
+(1004880,2 , 3767.48, -5379.59, 37.1119, 0, 0, 0, 0, 100, 0),
+(1004880,3 , 3766.13, -5345.33, 53.1732, 0, 0, 0, 0, 100, 0),
+(1004880,4 , 3777.34, -5323.27, 63.4175, 0, 0, 0, 0, 100, 0),
+(1004880,5 , 3784.32, -5306.1, 69.4175, 0, 2000, 0, 1158, 100, 0),
+(1004880,6 , 3638.17, -5528.01, 15.9111, 0, 0, 0, 0, 100, 0),
+(1004880,7 , 3659.66, -5509.71, 18.4111, 0, 0, 0, 0, 100, 0),
+(1004880,8 , 3685.62, -5492.93, 17.1109, 0, 0, 0, 0, 100, 0),
+(1004880,9 , 3707.26, -5465.77, 22.0405, 0, 0, 0, 0, 100, 0),
+(1004880,10, 3740.28, -5445.48, 23.4599, 0, 0, 0, 0, 100, 0);
+
+DELETE FROM `waypoint_data` WHERE `id`=1004930;
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_flag`, `action`, `action_chance`, `wpguid`) VALUES
+(1004930,1, 3694.05, -5419.93, 29.8607, 0, 0, 0, 0, 100, 0),
+(1004930,2, 3703.84, -5410.59, 31.9159, 0, 0, 0, 0, 100, 0),
+(1004930,3, 3713.04, -5396.53, 35.2108, 0, 0, 0, 0, 100, 0),
+(1004930,4, 3736.31, -5388.52, 37.2879, 0, 0, 0, 0, 100, 0),
+(1004930,5, 3758.76, -5378.36, 37.9129, 0, 0, 0, 0, 100, 0),
+(1004930,6, 3771.44, -5360.71, 46.7247, 0, 2000, 0, 1156, 100, 0),
+(1004930,7, 3657.57, -5440.7, 26.5234, 0, 0, 0, 0, 100, 0),
+(1004930,8, 3679.07, -5423.48, 29.6107, 0, 0, 0, 0, 100, 0);
+
+DELETE FROM `waypoint_data` WHERE `id`=1005300;
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_flag`, `action`, `action_chance`, `wpguid`) VALUES
+(1005300,1 , 3706.62, -5237.35, 124.168, 0, 0, 0, 0, 100, 0),
+(1005300,2 , 3718.6, -5224.17, 125.384, 0, 0, 0, 0, 100, 0),
+(1005300,3 , 3725.75, -5214.71, 124.134, 0, 0, 0, 0, 100, 0),
+(1005300,4 , 3745.2, -5187.22, 120.89, 0, 2000, 0, 1157, 100, 0),
+(1005300,5 , 3519.54, -5462.26, 168.561, 0, 0, 0, 0, 100, 0),
+(1005300,6 , 3521.78, -5441.77, 164.311, 0, 0, 0, 0, 100, 0),
+(1005300,7 , 3520.97, -5424.06, 162.656, 0, 0, 0, 0, 100, 0),
+(1005300,8 , 3535.27, -5403.59, 156.172, 0, 0, 0, 0, 100, 0),
+(1005300,9 , 3549.19, -5384.1, 150.723, 0, 0, 0, 0, 100, 0),
+(1005300,10, 3558.99, -5362.74, 147.264, 0, 0, 0, 0, 100, 0),
+(1005300,11, 3575.57, -5347.88, 145.144, 0, 0, 0, 0, 100, 0),
+(1005300,12, 3591.95, -5333.96, 138.394, 0, 0, 0, 0, 100, 0),
+(1005300,13, 3614.07, -5316.79, 128.267, 0, 0, 0, 0, 100, 0),
+(1005300,14, 3629.8, -5303.53, 126.767, 0, 0, 0, 0, 100, 0),
+(1005300,15, 3653.6, -5275.46, 122.074, 0, 0, 0, 0, 100, 0),
+(1005300,16, 3673.5, -5264.86, 120.737, 0, 0, 0, 0, 100, 0),
+(1005300,17, 3694, -5250.39, 120.112, 0, 0, 0, 0, 100, 0);
+
+DELETE FROM `waypoint_data` WHERE `id`=1184060;
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_flag`, `action`, `action_chance`, `wpguid`) VALUES
+(1184060,1 , 2202.72, 5394.91, 39.1387, 0, 0, 0, 0, 100, 0),
+(1184060,2 , 2228.7, 5383.33, 41.9165, 0, 0, 0, 0, 100, 0),
+(1184060,3 , 2232.7, 5373.53, 41.111, 0, 0, 0, 0, 100, 0),
+(1184060,4 , 2222.01, 5361.25, 39.1387, 0, 0, 0, 0, 100, 0),
+(1184060,5 , 2198.15, 5369.98, 39.1387, 0, 0, 0, 0, 100, 0),
+(1184060,6 , 2175.98, 5386.82, 39.1387, 0, 0, 0, 0, 100, 0),
+(1184060,7 , 2168.55, 5427.55, 39.1387, 0, 0, 0, 0, 100, 0),
+(1184060,8 , 2152.3, 5456.32, 21.5832, 0, 0, 0, 0, 100, 0),
+(1184060,9 , 2121.99, 5462.54, 15.0276, 0, 0, 0, 0, 100, 0),
+(1184060,10, 2106.46, 5436.09, 7.52763, 0, 0, 0, 0, 100, 0),
+(1184060,11, 2118.35, 5421.9, 11.6109, 0, 0, 0, 0, 100, 0),
+(1184060,12, 2142.4, 5407.65, 26.111, 0, 0, 0, 0, 100, 0),
+(1184060,13, 2163.29, 5410.02, 34.7221, 0, 0, 0, 0, 100, 0),
+(1184060,14, 2175.98, 5410.9, 39.1387, 0, 0, 0, 0, 100, 0),
+(1184060,15, 2191.93, 5401.03, 39.1387, 0, 0, 0, 0, 100, 0);
+
+DELETE FROM `waypoint_data` WHERE `id`=1216840;
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_flag`, `action`, `action_chance`, `wpguid`) VALUES
+(1216840,1, 6156.09, -66.6786, 390.412, 0, 0, 0, 0, 100, 0),
+(1216840,2, 6157.94, -72.739, 390.412, 0, 0, 0, 0, 100, 0),
+(1216840,3, 6156.09, -66.6786, 390.412, 0, 0, 0, 0, 100, 0),
+(1216840,4, 6154.23, -60.7648, 390.412, 0, 0, 0, 0, 100, 0);
+
+DELETE FROM `waypoint_data` WHERE `id`=2026020;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(2026020,1,7024.75,-1625.538,957.3694,0,0,0,0,0,0),
+(2026020,2,7025.494,-1624.87,957.3694,0,0,0,0,0,0),
+(2026020,3,7167.578,-1501.694,962.5693,0,0,0,0,0,0),
+(2026020,4,7440.402,-1295.861,997.2911,0,0,0,0,0,0),
+(2026020,5,7210.958,-1046.892,1006.18,0,0,0,0,0,0),
+(2026020,6,6998.465,-1076.847,1024.819,0,0,0,0,0,0),
+(2026020,7,6874.249,-1097.382,927.736,0,0,0,0,0,0),
+(2026020,8,6614.792,-875.7547,812.7645,0,0,0,0,0,0),
+(2026020,9,6563.275,-811.7673,749.8757,0,0,0,0,0,0),
+(2026020,10,6299.502,-797.577,529.1257,0,0,0,0,0,0),
+(2026020,11,6194.549,-1013.144,501.5424,0,0,0,0,0,0),
+(2026020,12,6319.254,-1251.661,468.6258,0,0,0,0,0,0),
+(2026020,13,6309.161,-1537.857,615.0423,0,0,0,0,0,0),
+(2026020,14,6748.211,-1664.307,919.3118,0,0,0,0,0,0),
+(2026020,15,6913.308,-1725.261,954.7917,0,0,0,0,0,0),
+(2026020,16,7167.578,-1501.694,962.5693,0,0,0,0,0,0),
+(2026020,17,7440.402,-1295.861,997.2911,0,0,0,0,0,0);
+
+DELETE FROM `waypoint_data` WHERE `id` = 833780 AND `point` = 1 AND CONCAT(`position_x`) = 239.604 AND CONCAT(`position_y`) = -98.2138 AND CONCAT(`position_z`) = 26.5913;
+DELETE FROM `waypoint_data` WHERE `id` = 833780 AND `point` = 2 AND CONCAT(`position_x`) = 239.568 AND CONCAT(`position_y`) = -70.2138 AND CONCAT(`position_z`) = 26.5913;
+DELETE FROM `waypoint_data` WHERE `id` = 833780 AND `point` = 3 AND CONCAT(`position_x`) = 239.533 AND CONCAT(`position_y`) = -42.2138 AND CONCAT(`position_z`) = 26.5913;
+DELETE FROM `waypoint_data` WHERE `id` = 833780 AND `point` = 4 AND CONCAT(`position_x`) = 239.173 AND CONCAT(`position_y`) = -126.667 AND CONCAT(`position_z`) = 26.5913;
+
+DELETE FROM `waypoint_data` WHERE `id`=883750;
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_flag`, `action`, `action_chance`, `wpguid`) VALUES
+(883750, 1, -8541.23, 1144.3, 18.9831, 0, 3000, 0, 0, 100, 0),
+(883750, 2, -8538.3, 1149.52, 19.0522, 0, 2000, 0, 0, 100, 0),
+(883750, 3, -8538.3, 1149.52, 19.0522, 0, 15000, 0, 1029, 100, 0),
+(883750, 4, -8538.3, 1149.52, 19.0522, 0, 2000, 0, 0, 100, 0),
+(883750, 5, -8544.61, 1133.18, 18.1536, 0, 0, 0, 0, 100, 0),
+(883750, 6, -8551.97, 1118.55, 19.0523, 0, 0, 0, 0, 100, 0),
+(883750, 7, -8564.22, 1107.25, 19.0523, 0, 0, 0, 0, 100, 0),
+(883750, 8, -8566.66, 1101.82, 19.0523, 0, 2000, 0, 0, 100, 0),
+(883750, 9, -8566.66, 1101.82, 19.0523, 0, 15000, 0, 1030, 100, 0),
+(883750, 10, -8566.66, 1101.82, 19.0523, 0, 2000, 0, 0, 100, 0),
+(883750, 11, -8559.28, 1114.25, 19.0523, 0, 0, 0, 0, 100, 0);
+
+ALTER TABLE `waypoint_data` ADD PRIMARY KEY (`id`, `point`);
diff --git a/sql/updates/world/2012_12_14_02_world_misc.sql b/sql/updates/world/2012_12_14_02_world_misc.sql
new file mode 100644
index 00000000000..29aa47909e1
--- /dev/null
+++ b/sql/updates/world/2012_12_14_02_world_misc.sql
@@ -0,0 +1,15 @@
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (24750, 24751, 44436);
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(24750, 'spell_trick'),
+(24751, 'spell_trick_or_treat'),
+(44436, 'spell_tricky_treat');
+
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (42965,42966);
+INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
+(42965,42919,0, 'Hallows End - Tricky Treat'),
+(42966,-42965,0, 'Hallows End - Upset Tummy removes Tricky Treat'),
+(42966,-42919,0, 'Hallows End - Upset Tummy removes Tricky Treat');
+
+DELETE FROM `conditions` WHERE `SourceEntry`=44436 AND `SourceTypeOrReferenceId`=17;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(17, 0, 44436, 0, 0, 1, 0, 42966, 0, 0, 1, 0, '','Tricky Treat casted only if Upset Tummy aura is missing');
diff --git a/sql/updates/world/2012_12_14_03_world_npc_spellclick_spells.sql b/sql/updates/world/2012_12_14_03_world_npc_spellclick_spells.sql
new file mode 100644
index 00000000000..2669abbc562
--- /dev/null
+++ b/sql/updates/world/2012_12_14_03_world_npc_spellclick_spells.sql
@@ -0,0 +1 @@
+DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=30228;
diff --git a/sql/updates/world/2012_12_14_04_world_misc.sql b/sql/updates/world/2012_12_14_04_world_misc.sql
new file mode 100644
index 00000000000..2cd99cfb12a
--- /dev/null
+++ b/sql/updates/world/2012_12_14_04_world_misc.sql
@@ -0,0 +1,7 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=44436;
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(44436, 'spell_tricky_treat');
+
+DELETE FROM `waypoint_data` WHERE `id`=883750 AND `point`=3;
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_flag`, `action`, `action_chance`, `wpguid`) VALUES
+(883750, 3, -8538.3, 1149.52, 19.0522, 0, 15000, 0, 1029, 100, 0);
diff --git a/sql/updates/world/2012_12_14_05_world_spell_script_names.sql b/sql/updates/world/2012_12_14_05_world_spell_script_names.sql
new file mode 100644
index 00000000000..6d6ab651365
--- /dev/null
+++ b/sql/updates/world/2012_12_14_05_world_spell_script_names.sql
@@ -0,0 +1,10 @@
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (24750,24751,44436,-139,66118,67630,68646,68647);
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(24750, 'spell_hallow_end_trick'),
+(24751, 'spell_hallow_end_trick_or_treat'),
+(44436, 'spell_hallow_end_tricky_treat'),
+( -139, 'spell_pri_renew'),
+(66118, 'spell_anubarak_leeching_swarm'),
+(67630, 'spell_anubarak_leeching_swarm'),
+(68646, 'spell_anubarak_leeching_swarm'),
+(68647, 'spell_anubarak_leeching_swarm');
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/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index 2fdb3cd39c6..3d9e0486838 100644
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -44,10 +44,6 @@ PetAI::PetAI(Creature* c) : CreatureAI(c), i_tracker(TIME_INTERVAL_LOOK)
UpdateAllies();
}
-void PetAI::EnterEvadeMode()
-{
-}
-
bool PetAI::_needToStop()
{
// This is needed for charmed creatures, as once their target was reset other effects can trigger threat
@@ -74,12 +70,13 @@ void PetAI::_stopAttack()
me->InterruptNonMeleeSpells(false);
me->SendMeleeAttackStop(); // Should stop pet's attack button from flashing
me->GetCharmInfo()->SetIsCommandAttack(false);
+ ClearCharmInfoFlags();
HandleReturnMovement();
}
void PetAI::UpdateAI(const uint32 diff)
{
- if (!me->isAlive())
+ if (!me->isAlive() || !me->GetCharmInfo())
return;
Unit* owner = me->GetCharmerOrOwner();
@@ -107,39 +104,33 @@ void PetAI::UpdateAI(const uint32 diff)
}
// Check before attacking to prevent pets from leaving stay position
- if (CanAttack(me->getVictim()))
+ if (me->GetCharmInfo()->HasCommandState(COMMAND_STAY))
+ {
+ if (me->GetCharmInfo()->IsCommandAttack() || (me->GetCharmInfo()->IsAtStay() && me->IsWithinMeleeRange(me->getVictim())))
+ DoMeleeAttackIfReady();
+ }
+ else
DoMeleeAttackIfReady();
}
- else if (owner && me->GetCharmInfo()) //no victim
+ else
{
- // Only aggressive pets do target search every update.
- // Defensive pets do target search only in these cases:
- // * Owner attacks something - handled by OwnerAttacked()
- // * Owner receives damage - handled by OwnerDamagedBy()
- // * Pet is in combat and current target dies - handled by KilledUnit()
- if (me->HasReactState(REACT_AGGRESSIVE))
+ if (me->HasReactState(REACT_AGGRESSIVE) || me->GetCharmInfo()->IsAtStay())
{
- Unit* nextTarget = SelectNextTarget();
+ // Every update we need to check targets only in certain cases
+ // Aggressive - Allow auto select if owner or pet don't have a target
+ // Stay - Only pick from pet or owner targets / attackers so targets won't run by
+ // while chasing our owner. Don't do auto select.
+ // All other cases (ie: defensive) - Targets are assigned by AttackedBy(), OwnerAttackedBy(), OwnerAttacked(), etc.
+ Unit* nextTarget = SelectNextTarget(me->HasReactState(REACT_AGGRESSIVE));
if (nextTarget)
AttackStart(nextTarget);
else
- {
- me->GetCharmInfo()->SetIsCommandAttack(false);
HandleReturnMovement();
- }
}
else
- {
- me->GetCharmInfo()->SetIsCommandAttack(false);
HandleReturnMovement();
- }
}
- else if (owner && !me->HasUnitState(UNIT_STATE_FOLLOW)) // no charm info and no victim
- me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle());
-
- if (!me->GetCharmInfo())
- return;
// Autocast (casted only in combat or persistent spells in any state)
if (!me->HasUnitState(UNIT_STATE_CASTING))
@@ -190,7 +181,8 @@ void PetAI::UpdateAI(const uint32 diff)
spellUsed = true;
}
}
-
+ if (spellInfo->HasEffect(SPELL_EFFECT_JUMP_DEST))
+ continue; //pets must jump only to target
// No enemy, check friendly
if (!spellUsed)
{
@@ -313,15 +305,11 @@ void PetAI::KilledUnit(Unit* victim)
me->InterruptNonMeleeSpells(false);
me->SendMeleeAttackStop(); // Stops the pet's 'Attack' button from flashing
- Unit* nextTarget = SelectNextTarget();
-
- if (nextTarget)
+ // Before returning to owner, see if there are more things to attack
+ if (Unit* nextTarget = SelectNextTarget(false))
AttackStart(nextTarget);
else
- {
- me->GetCharmInfo()->SetIsCommandAttack(false);
HandleReturnMovement(); // Return
- }
}
void PetAI::AttackStart(Unit* target)
@@ -332,17 +320,14 @@ void PetAI::AttackStart(Unit* target)
if (!CanAttack(target))
return;
- if (Unit* owner = me->GetOwner())
- owner->SetInCombatWith(target);
-
// Only chase if not commanded to stay or if stay but commanded to attack
DoAttack(target, (!me->GetCharmInfo()->HasCommandState(COMMAND_STAY) || me->GetCharmInfo()->IsCommandAttack()));
}
-void PetAI::OwnerDamagedBy(Unit* attacker)
+void PetAI::OwnerAttackedBy(Unit* attacker)
{
- // Called when owner takes damage. Allows defensive pets to know
- // that their owner might need help
+ // Called when owner takes damage. This function helps keep pets from running off
+ // simply due to owner gaining aggro.
if (!attacker)
return;
@@ -380,10 +365,12 @@ void PetAI::OwnerAttacked(Unit* target)
AttackStart(target);
}
-Unit* PetAI::SelectNextTarget()
+Unit* PetAI::SelectNextTarget(bool allowAutoSelect) const
{
- // Provides next target selection after current target death
- // Targets are not evaluated here for being valid attack targets
+ // Provides next target selection after current target death.
+ // This function should only be called internally by the AI
+ // Targets are not evaluated here for being valid targets, that is done in _CanAttack()
+ // The parameter: allowAutoSelect lets us disable aggressive pet auto targeting for certain situations
// Passive pets don't do next target selection
if (me->HasReactState(REACT_PASSIVE))
@@ -406,17 +393,17 @@ Unit* PetAI::SelectNextTarget()
// Check owner victim
// 3.0.2 - Pets now start attacking their owners victim in defensive mode as soon as the hunter does
if (Unit* ownerVictim = me->GetCharmerOrOwner()->getVictim())
- if (!ownerVictim->HasBreakableByDamageCrowdControlAura())
return ownerVictim;
// Neither pet or owner had a target and aggressive pets can pick any target
- // Note: Creature::SelectNearestTarget() If no distance is supplied it uses MAX_VISIBILITY_DISTANCE
- // We also want to lock this to LOS so pet doesn't go running through walls and stuff
- if (me->HasReactState(REACT_AGGRESSIVE))
- if (Unit* nearTarget = me->ToCreature()->SelectNearestTarget())
- if (nearTarget->IsHostileTo(me) && !nearTarget->HasBreakableByDamageCrowdControlAura())
- if (nearTarget->IsWithinLOS(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()))
- return nearTarget;
+ // To prevent aggressive pets from chain selecting targets and running off, we
+ // only select a random target if certain conditions are met.
+ if (me->HasReactState(REACT_AGGRESSIVE) && allowAutoSelect)
+ {
+ if (!me->GetCharmInfo()->IsReturning() || me->GetCharmInfo()->IsFollowing() || me->GetCharmInfo()->IsAtStay())
+ if (Unit* nearTarget = me->ToCreature()->SelectNearestHostileUnitInAggroRange(true))
+ return nearTarget;
+ }
// Default - no valid targets
return NULL;
@@ -426,6 +413,11 @@ void PetAI::HandleReturnMovement()
{
// Handles moving the pet back to stay or owner
+ // Prevent activating movement when under control of spells
+ // such as "Eyes of the Beast"
+ if (me->isCharmed())
+ return;
+
if (me->GetCharmInfo()->HasCommandState(COMMAND_STAY))
{
if (!me->GetCharmInfo()->IsAtStay() && !me->GetCharmInfo()->IsReturning())
@@ -436,6 +428,7 @@ void PetAI::HandleReturnMovement()
float x, y, z;
me->GetCharmInfo()->GetStayPosition(x, y, z);
+ ClearCharmInfoFlags();
me->GetCharmInfo()->SetIsReturning(true);
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MovePoint(me->GetGUIDLow(), x, y, z);
@@ -448,6 +441,7 @@ void PetAI::HandleReturnMovement()
{
if (!me->GetCharmInfo()->IsCommandAttack())
{
+ ClearCharmInfoFlags();
me->GetCharmInfo()->SetIsReturning(true);
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveFollow(me->GetCharmerOrOwner(), PET_FOLLOW_DIST, me->GetFollowAngle());
@@ -458,33 +452,33 @@ void PetAI::HandleReturnMovement()
void PetAI::DoAttack(Unit* target, bool chase)
{
- // Handles attack with or without chase and also resets all
- // PetAI flags for next update / creature kill
+ // Handles attack with or without chase and also resets flags
+ // for next update / creature kill
- // me->GetCharmInfo()->SetIsCommandAttack(false);
+ if (me->Attack(target, true))
+ {
+ if (Unit* owner = me->GetOwner())
+ owner->SetInCombatWith(target);
- // The following conditions are true if chase == true
- // (Follow && (Aggressive || Defensive))
- // ((Stay || Follow) && (Passive && player clicked attack))
+ // Play sound to let the player know the pet is attacking something it picked on its own
+ if (me->HasReactState(REACT_AGGRESSIVE) && !me->GetCharmInfo()->IsCommandAttack())
+ me->SendPetAIReaction(me->GetGUID());
- if (chase)
- {
- if (me->Attack(target, true))
+
+ if (chase)
+ {
+ ClearCharmInfoFlags();
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MoveChase(target);
+ }
+ else // (Stay && ((Aggressive || Defensive) && In Melee Range)))
{
- me->GetCharmInfo()->SetIsAtStay(false);
- me->GetCharmInfo()->SetIsFollowing(false);
- me->GetCharmInfo()->SetIsReturning(false);
+ ClearCharmInfoFlags();
+ me->GetCharmInfo()->SetIsAtStay(true);
me->GetMotionMaster()->Clear();
- me->GetMotionMaster()->MoveChase(target);
+ me->GetMotionMaster()->MoveIdle();
}
}
- else // (Stay && ((Aggressive || Defensive) && In Melee Range)))
- {
- me->GetCharmInfo()->SetIsAtStay(true);
- me->GetCharmInfo()->SetIsFollowing(false);
- me->GetCharmInfo()->SetIsReturning(false);
- me->Attack(target, true);
- }
}
void PetAI::MovementInform(uint32 moveType, uint32 data)
@@ -498,10 +492,8 @@ void PetAI::MovementInform(uint32 moveType, uint32 data)
// pet's GUIDLow since we set that as the waypoint ID
if (data == me->GetGUIDLow() && me->GetCharmInfo()->IsReturning())
{
+ ClearCharmInfoFlags();
me->GetCharmInfo()->SetIsAtStay(true);
- me->GetCharmInfo()->SetIsReturning(false);
- me->GetCharmInfo()->SetIsFollowing(false);
- me->GetCharmInfo()->SetIsCommandAttack(false);
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveIdle();
}
@@ -513,10 +505,8 @@ void PetAI::MovementInform(uint32 moveType, uint32 data)
// otherwise we're probably chasing a creature
if (me->GetCharmerOrOwner() && me->GetCharmInfo() && data == me->GetCharmerOrOwner()->GetGUIDLow() && me->GetCharmInfo()->IsReturning())
{
- me->GetCharmInfo()->SetIsAtStay(false);
- me->GetCharmInfo()->SetIsReturning(false);
+ ClearCharmInfoFlags();
me->GetCharmInfo()->SetIsFollowing(true);
- me->GetCharmInfo()->SetIsCommandAttack(false);
}
break;
}
@@ -527,32 +517,55 @@ void PetAI::MovementInform(uint32 moveType, uint32 data)
bool PetAI::CanAttack(Unit* target)
{
- // Evaluates wether a pet can attack a specific
- // target based on CommandState, ReactState and other flags
+ // Evaluates wether a pet can attack a specific target based on CommandState, ReactState and other flags
+ // IMPORTANT: The order in which things are checked is important, be careful if you add or remove checks
- // Can't attack dead targets...
- if (!target->isAlive())
+ // Hmmm...
+ if (!target)
return false;
- // Returning - check first since pets returning ignore attacks
- if (me->GetCharmInfo()->IsReturning())
+ if (!target->isAlive())
+ {
+ // Clear target to prevent getting stuck on dead targets
+ me->AttackStop();
+ me->InterruptNonMeleeSpells(false);
+ me->SendMeleeAttackStop();
return false;
+ }
- // Passive - check now so we don't have to worry about passive in later checks
+ // Passive - passive pets can attack if told to
if (me->HasReactState(REACT_PASSIVE))
return me->GetCharmInfo()->IsCommandAttack();
- // Follow
- if (me->GetCharmInfo()->HasCommandState(COMMAND_FOLLOW))
- return true;
+ // CC - mobs under crowd control can be attacked if owner commanded
+ if (target->HasBreakableByDamageCrowdControlAura())
+ return me->GetCharmInfo()->IsCommandAttack();
+
+ // Returning - pets ignore attacks only if owner clicked follow
+ if (me->GetCharmInfo()->IsReturning())
+ return !me->GetCharmInfo()->IsCommandFollow();
// Stay - can attack if target is within range or commanded to
if (me->GetCharmInfo()->HasCommandState(COMMAND_STAY))
return (me->IsWithinMeleeRange(target) || me->GetCharmInfo()->IsCommandAttack());
- // Pets commanded to attack should not stop their approach if attacked by another creature
- if (me->getVictim() && (me->getVictim() != target))
- return !me->GetCharmInfo()->IsCommandAttack();
+ // Pets attacking something (or chasing) should only switch targets if owner tells them to
+ if (me->getVictim() && me->getVictim() != target)
+ {
+ // Check if our owner selected this target and clicked "attack"
+ Unit* ownerTarget = NULL;
+ if (Player* owner = me->GetCharmerOrOwner()->ToPlayer())
+ ownerTarget = owner->GetSelectedUnit();
+ else
+ ownerTarget = me->GetCharmerOrOwner()->getVictim();
+
+ if (ownerTarget && me->GetCharmInfo()->IsCommandAttack())
+ return (target->GetGUID() == ownerTarget->GetGUID());
+ }
+
+ // Follow
+ if (me->GetCharmInfo()->HasCommandState(COMMAND_FOLLOW))
+ return !me->GetCharmInfo()->IsReturning();
// default, though we shouldn't ever get here
return false;
@@ -565,11 +578,55 @@ 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;
}
}
+
+void PetAI::ClearCharmInfoFlags()
+{
+ // Quick access to set all flags to FALSE
+
+ CharmInfo* ci = me->GetCharmInfo();
+
+ if (ci)
+ {
+ ci->SetIsAtStay(false);
+ ci->SetIsCommandAttack(false);
+ ci->SetIsCommandFollow(false);
+ ci->SetIsFollowing(false);
+ ci->SetIsReturning(false);
+ }
+}
+
+void PetAI::AttackedBy(Unit* attacker)
+{
+ // Called when pet takes damage. This function helps keep pets from running off
+ // simply due to gaining aggro.
+
+ if (!attacker)
+ return;
+
+ // Passive pets don't do anything
+ if (me->HasReactState(REACT_PASSIVE))
+ return;
+
+ // Prevent pet from disengaging from current target
+ if (me->getVictim() && me->getVictim()->isAlive())
+ return;
+
+ // Continue to evaluate and attack if necessary
+ AttackStart(attacker);
+}
diff --git a/src/server/game/AI/CoreAI/PetAI.h b/src/server/game/AI/CoreAI/PetAI.h
index d7f1dca3fbf..8a8853b19b5 100644
--- a/src/server/game/AI/CoreAI/PetAI.h
+++ b/src/server/game/AI/CoreAI/PetAI.h
@@ -31,17 +31,24 @@ class PetAI : public CreatureAI
explicit PetAI(Creature* c);
- void EnterEvadeMode();
void UpdateAI(const uint32);
static int Permissible(const Creature*);
void KilledUnit(Unit* /*victim*/);
void AttackStart(Unit* target);
void MovementInform(uint32 moveType, uint32 data);
- void OwnerDamagedBy(Unit* attacker);
+ void OwnerAttackedBy(Unit* attacker);
void OwnerAttacked(Unit* target);
+ void AttackedBy(Unit* attacker);
void ReceiveEmote(Player* player, uint32 textEmote);
+ // The following aren't used by the PetAI but need to be defined to override
+ // default CreatureAI functions which interfere with the PetAI
+ //
+ void MoveInLineOfSight(Unit* /*who*/) {} // CreatureAI interferes with returning pets
+ void MoveInLineOfSight_Safe(Unit* /*who*/) {} // CreatureAI interferes with returning pets
+ void EnterEvadeMode() {} // For fleeing, pets don't use this type of Evade mechanic
+
private:
bool _isVisible(Unit*) const;
bool _needToStop(void);
@@ -54,10 +61,11 @@ class PetAI : public CreatureAI
std::set<uint64> m_AllySet;
uint32 m_updateAlliesTimer;
- Unit* SelectNextTarget();
+ Unit* SelectNextTarget(bool allowAutoSelect) const;
void HandleReturnMovement();
void DoAttack(Unit* target, bool chase);
bool CanAttack(Unit* target);
+ void ClearCharmInfoFlags();
};
#endif
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/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h
index d3ad27935ca..4f61e168a87 100644
--- a/src/server/game/AI/CreatureAI.h
+++ b/src/server/game/AI/CreatureAI.h
@@ -117,7 +117,7 @@ class CreatureAI : public UnitAI
virtual void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spell*/) {}
// Called when the creature is target of hostile action: swing, hostile spell landed, fear/etc)
- //virtual void AttackedBy(Unit* attacker);
+ virtual void AttackedBy(Unit* /*attacker*/) {}
virtual bool IsEscorted() { return false; }
// Called when creature is spawned or respawned (for reseting variables)
@@ -137,7 +137,7 @@ class CreatureAI : public UnitAI
virtual void ReceiveEmote(Player* /*player*/, uint32 /*emoteId*/) {}
// Called when owner takes damage
- virtual void OwnerDamagedBy(Unit* /*attacker*/) {}
+ virtual void OwnerAttackedBy(Unit* /*attacker*/) {}
// Called when owner attacks something
virtual void OwnerAttacked(Unit* /*target*/) {}
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 41d48cbfc02..02026a5a5a7 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -412,6 +412,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);
@@ -2651,3 +2661,69 @@ bool Creature::SetHover(bool enable)
SendMessageToSet(&data, false);
return true;
}
+
+float Creature::GetAggroRange(Unit const* target) const
+{
+ // Determines the aggro range for creatures (usually pets), used mainly for aggressive pet target selection.
+ // Based on data from wowwiki due to lack of 3.3.5a data
+
+ if (target && this->isPet())
+ {
+ uint32 targetLevel = 0;
+
+ if (target->GetTypeId() == TYPEID_PLAYER)
+ targetLevel = target->getLevelForTarget(this);
+ else if (target->GetTypeId() == TYPEID_UNIT)
+ targetLevel = target->ToCreature()->getLevelForTarget(this);
+
+ uint32 myLevel = getLevelForTarget(target);
+ int32 levelDiff = int32(targetLevel) - int32(myLevel);
+
+ // The maximum Aggro Radius is capped at 45 yards (25 level difference)
+ if (levelDiff < -25)
+ levelDiff = -25;
+
+ // The base aggro radius for mob of same level
+ float aggroRadius = 20;
+
+ // Aggro Radius varies with level difference at a rate of roughly 1 yard/level
+ aggroRadius -= (float)levelDiff;
+
+ // detect range auras
+ aggroRadius += GetTotalAuraModifier(SPELL_AURA_MOD_DETECT_RANGE);
+
+ // detected range auras
+ aggroRadius += target->GetTotalAuraModifier(SPELL_AURA_MOD_DETECTED_RANGE);
+
+ // Just in case, we don't want pets running all over the map
+ if (aggroRadius > MAX_AGGRO_RADIUS)
+ aggroRadius = MAX_AGGRO_RADIUS;
+
+ // Minimum Aggro Radius for a mob seems to be combat range (5 yards)
+ // hunter pets seem to ignore minimum aggro radius so we'll default it a little higher
+ if (aggroRadius < 10)
+ aggroRadius = 10;
+
+ return (aggroRadius);
+ }
+
+ // Default
+ return 0.0f;
+}
+
+Unit* Creature::SelectNearestHostileUnitInAggroRange(bool useLOS) const
+{
+ // Selects nearest hostile target within creature's aggro range. Used primarily by
+ // pets set to aggressive. Will not return neutral or friendly targets.
+
+ Unit* target = NULL;
+
+ {
+ Trinity::NearestHostileUnitInAggroRangeCheck u_check(this, useLOS);
+ Trinity::UnitSearcher<Trinity::NearestHostileUnitInAggroRangeCheck> searcher(this, target, u_check);
+
+ VisitNearbyGridObject(MAX_AGGRO_RADIUS, searcher);
+ }
+
+ return target;
+}
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index 4651adb7006..25042fb5b3f 100644
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -616,12 +616,14 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature
bool canStartAttack(Unit const* u, bool force) const;
float GetAttackDistance(Unit const* player) const;
+ float GetAggroRange(Unit const* target) const;
void SendAIReaction(AiReaction reactionType);
Unit* SelectNearestTarget(float dist = 0) const;
Unit* SelectNearestTargetInAttackDistance(float dist = 0) const;
Player* SelectNearestPlayer(float distance = 0) const;
+ Unit* SelectNearestHostileUnitInAggroRange(bool useLOS = false) const;
void DoFleeToGetAssistance();
void CallForHelp(float fRadius);
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index 9337add8ba3..5dcc0246651 100644
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -75,6 +75,7 @@ void Pet::AddToWorld()
if (GetCharmInfo() && GetCharmInfo()->HasCommandState(COMMAND_FOLLOW))
{
GetCharmInfo()->SetIsCommandAttack(false);
+ GetCharmInfo()->SetIsCommandFollow(false);
GetCharmInfo()->SetIsAtStay(false);
GetCharmInfo()->SetIsFollowing(false);
GetCharmInfo()->SetIsReturning(false);
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index bb5659eeb25..606bcc6cfec 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -7023,7 +7023,7 @@ void Player::RewardReputation(Unit* victim, float rate)
if (Rep->RepFaction1 && (!Rep->TeamDependent || team == ALLIANCE))
{
- int32 donerep1 = CalculateReputationGain(REPUTATION_SOURCE_KILL, victim->getLevel(), Rep->RepValue1, ChampioningFaction ? ChampioningFaction : Rep->RepFaction1, false);
+ int32 donerep1 = CalculateReputationGain(REPUTATION_SOURCE_KILL, victim->getLevel(), Rep->RepValue1, ChampioningFaction ? ChampioningFaction : Rep->RepFaction1);
donerep1 = int32(donerep1*(rate + favored_rep_mult));
if (recruitAFriend)
@@ -7037,7 +7037,7 @@ void Player::RewardReputation(Unit* victim, float rate)
if (Rep->RepFaction2 && (!Rep->TeamDependent || team == HORDE))
{
- int32 donerep2 = CalculateReputationGain(REPUTATION_SOURCE_KILL, victim->getLevel(), Rep->RepValue2, ChampioningFaction ? ChampioningFaction : Rep->RepFaction2, false);
+ int32 donerep2 = CalculateReputationGain(REPUTATION_SOURCE_KILL, victim->getLevel(), Rep->RepValue2, ChampioningFaction ? ChampioningFaction : Rep->RepFaction2);
donerep2 = int32(donerep2*(rate + favored_rep_mult));
if (recruitAFriend)
@@ -7084,25 +7084,25 @@ void Player::RewardReputation(Quest const* quest)
uint32 row = ((quest->RewardFactionValueId[i] < 0) ? 1 : 0) + 1;
uint32 field = abs(quest->RewardFactionValueId[i]);
- if (const QuestFactionRewEntry* pRow = sQuestFactionRewardStore.LookupEntry(row))
+ if (QuestFactionRewEntry const* pRow = sQuestFactionRewardStore.LookupEntry(row))
{
int32 repPoints = pRow->QuestRewFactionValue[field];
if (!repPoints)
continue;
if (quest->IsDaily())
- repPoints = CalculateReputationGain(REPUTATION_SOURCE_DAILY_QUEST, GetQuestLevel(quest), repPoints, quest->RewardFactionId[i], true);
+ repPoints = CalculateReputationGain(REPUTATION_SOURCE_DAILY_QUEST, GetQuestLevel(quest), repPoints, quest->RewardFactionId[i]);
else if (quest->IsWeekly())
- repPoints = CalculateReputationGain(REPUTATION_SOURCE_WEEKLY_QUEST, GetQuestLevel(quest), repPoints, quest->RewardFactionId[i], true);
+ repPoints = CalculateReputationGain(REPUTATION_SOURCE_WEEKLY_QUEST, GetQuestLevel(quest), repPoints, quest->RewardFactionId[i]);
else if (quest->IsMonthly())
- repPoints = CalculateReputationGain(REPUTATION_SOURCE_MONTHLY_QUEST, GetQuestLevel(quest), repPoints, quest->RewardFactionId[i], true);
+ repPoints = CalculateReputationGain(REPUTATION_SOURCE_MONTHLY_QUEST, GetQuestLevel(quest), repPoints, quest->RewardFactionId[i]);
else
- repPoints = CalculateReputationGain(REPUTATION_SOURCE_QUEST, GetQuestLevel(quest), repPoints, quest->RewardFactionId[i], true);
+ repPoints = CalculateReputationGain(REPUTATION_SOURCE_QUEST, GetQuestLevel(quest), repPoints, quest->RewardFactionId[i]);
if (recruitAFriend)
repPoints = int32(repPoints * (1 + sWorld->getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS)));
- if (const FactionEntry* factionEntry = sFactionStore.LookupEntry(quest->RewardFactionId[i]))
+ if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(quest->RewardFactionId[i]))
GetReputationMgr().ModifyReputation(factionEntry, repPoints);
}
}
@@ -12528,22 +12528,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)
@@ -12551,11 +12551,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;
}
}
@@ -12565,18 +12565,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)
@@ -12584,11 +12584,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;
}
}
@@ -12600,15 +12600,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)
@@ -12617,16 +12617,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)
@@ -16764,13 +16826,11 @@ bool Player::LoadPositionFromDB(uint32& mapid, float& x, float& y, float& z, flo
return true;
}
-void Player::SetHomebind(WorldLocation const& /*loc*/, uint32 /*area_id*/)
+void Player::SetHomebind(WorldLocation const& loc, uint32 areaId)
{
- m_homebindMapId = GetMapId();
- m_homebindAreaId = GetAreaId();
- m_homebindX = GetPositionX();
- m_homebindY = GetPositionY();
- m_homebindZ = GetPositionZ();
+ loc.GetPosition(m_homebindX, m_homebindY, m_homebindZ);
+ m_homebindMapId = loc.GetMapId();
+ m_homebindAreaId = areaId;
// update sql homebind
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_PLAYER_HOMEBIND);
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index cdeeb3aa9df..4baa17d4377 100644
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -2541,7 +2541,7 @@ class Player : public Unit, public GridObject<Player>
float m_recallO;
void SaveRecallPosition();
- void SetHomebind(WorldLocation const& loc, uint32 area_id);
+ void SetHomebind(WorldLocation const& loc, uint32 areaId);
// Homebind coordinates
uint32 m_homebindMapId;
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index f470862c890..b6573fe4f8a 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -559,18 +559,22 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam
if (IsAIEnabled)
GetAI()->DamageDealt(victim, damage, damagetype);
- if (victim->GetTypeId() == TYPEID_PLAYER)
+ if (victim->GetTypeId() == TYPEID_PLAYER && this != victim)
{
- if (victim->ToPlayer()->GetCommandStatus(CHEAT_GOD))
- return 0;
-
// Signal to pets that their owner was attacked
Pet* pet = victim->ToPlayer()->GetPet();
if (pet && pet->isAlive())
- pet->AI()->OwnerDamagedBy(this);
+ pet->AI()->OwnerAttackedBy(this);
+
+ if (victim->ToPlayer()->GetCommandStatus(CHEAT_GOD))
+ return 0;
}
+ // Signal the pet it was attacked so the AI can respond if needed
+ if (victim->GetTypeId() == TYPEID_UNIT && this != victim && victim->isPet() && victim->isAlive())
+ victim->ToPet()->AI()->AttackedBy(this);
+
if (damagetype != NODAMAGE)
{
// interrupting auras with AURA_INTERRUPT_FLAG_DAMAGE before checking !damage (absorbed damage breaks that type of auras)
@@ -1018,6 +1022,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)
{
@@ -1114,6 +1121,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)))
{
@@ -13047,17 +13057,17 @@ void Unit::DeleteCharmInfo()
}
CharmInfo::CharmInfo(Unit* unit)
-: m_unit(unit), m_CommandState(COMMAND_FOLLOW), m_petnumber(0), m_barInit(false),
- m_isCommandAttack(false), m_isAtStay(false), m_isFollowing(false), m_isReturning(false),
- m_stayX(0.0f), m_stayY(0.0f), m_stayZ(0.0f)
+: _unit(unit), _CommandState(COMMAND_FOLLOW), _petnumber(0), _barInit(false),
+ _isCommandAttack(false), _isAtStay(false), _isFollowing(false), _isReturning(false),
+ _stayX(0.0f), _stayY(0.0f), _stayZ(0.0f)
{
for (uint8 i = 0; i < MAX_SPELL_CHARM; ++i)
- m_charmspells[i].SetActionAndType(0, ACT_DISABLED);
+ _charmspells[i].SetActionAndType(0, ACT_DISABLED);
- if (m_unit->GetTypeId() == TYPEID_UNIT)
+ if (_unit->GetTypeId() == TYPEID_UNIT)
{
- m_oldReactState = m_unit->ToCreature()->GetReactState();
- m_unit->ToCreature()->SetReactState(REACT_PASSIVE);
+ _oldReactState = _unit->ToCreature()->GetReactState();
+ _unit->ToCreature()->SetReactState(REACT_PASSIVE);
}
}
@@ -13067,9 +13077,9 @@ CharmInfo::~CharmInfo()
void CharmInfo::RestoreState()
{
- if (m_unit->GetTypeId() == TYPEID_UNIT)
- if (Creature* creature = m_unit->ToCreature())
- creature->SetReactState(m_oldReactState);
+ if (_unit->GetTypeId() == TYPEID_UNIT)
+ if (Creature* creature = _unit->ToCreature())
+ creature->SetReactState(_oldReactState);
}
void CharmInfo::InitPetActionBar()
@@ -13100,16 +13110,16 @@ void CharmInfo::InitEmptyActionBar(bool withAttack)
void CharmInfo::InitPossessCreateSpells()
{
InitEmptyActionBar();
- if (m_unit->GetTypeId() == TYPEID_UNIT)
+ if (_unit->GetTypeId() == TYPEID_UNIT)
{
for (uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
{
- uint32 spellId = m_unit->ToCreature()->m_spells[i];
+ uint32 spellId = _unit->ToCreature()->m_spells[i];
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (spellInfo && !(spellInfo->Attributes & SPELL_ATTR0_CASTABLE_WHILE_DEAD))
{
if (spellInfo->IsPassive())
- m_unit->CastSpell(m_unit, spellInfo, true);
+ _unit->CastSpell(_unit, spellInfo, true);
else
AddSpellToActionBar(spellInfo, ACT_PASSIVE);
}
@@ -13119,7 +13129,7 @@ void CharmInfo::InitPossessCreateSpells()
void CharmInfo::InitCharmCreateSpells()
{
- if (m_unit->GetTypeId() == TYPEID_PLAYER) // charmed players don't have spells
+ if (_unit->GetTypeId() == TYPEID_PLAYER) // charmed players don't have spells
{
InitEmptyActionBar();
return;
@@ -13129,23 +13139,23 @@ void CharmInfo::InitCharmCreateSpells()
for (uint32 x = 0; x < MAX_SPELL_CHARM; ++x)
{
- uint32 spellId = m_unit->ToCreature()->m_spells[x];
+ uint32 spellId = _unit->ToCreature()->m_spells[x];
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo || spellInfo->Attributes & SPELL_ATTR0_CASTABLE_WHILE_DEAD)
{
- m_charmspells[x].SetActionAndType(spellId, ACT_DISABLED);
+ _charmspells[x].SetActionAndType(spellId, ACT_DISABLED);
continue;
}
if (spellInfo->IsPassive())
{
- m_unit->CastSpell(m_unit, spellInfo, true);
- m_charmspells[x].SetActionAndType(spellId, ACT_PASSIVE);
+ _unit->CastSpell(_unit, spellInfo, true);
+ _charmspells[x].SetActionAndType(spellId, ACT_PASSIVE);
}
else
{
- m_charmspells[x].SetActionAndType(spellId, ACT_DISABLED);
+ _charmspells[x].SetActionAndType(spellId, ACT_DISABLED);
ActiveStates newstate = ACT_PASSIVE;
@@ -13222,17 +13232,17 @@ void CharmInfo::ToggleCreatureAutocast(SpellInfo const* spellInfo, bool apply)
return;
for (uint32 x = 0; x < MAX_SPELL_CHARM; ++x)
- if (spellInfo->Id == m_charmspells[x].GetAction())
- m_charmspells[x].SetType(apply ? ACT_ENABLED : ACT_DISABLED);
+ if (spellInfo->Id == _charmspells[x].GetAction())
+ _charmspells[x].SetType(apply ? ACT_ENABLED : ACT_DISABLED);
}
void CharmInfo::SetPetNumber(uint32 petnumber, bool statwindow)
{
- m_petnumber = petnumber;
+ _petnumber = petnumber;
if (statwindow)
- m_unit->SetUInt32Value(UNIT_FIELD_PETNUMBER, m_petnumber);
+ _unit->SetUInt32Value(UNIT_FIELD_PETNUMBER, _petnumber);
else
- m_unit->SetUInt32Value(UNIT_FIELD_PETNUMBER, 0);
+ _unit->SetUInt32Value(UNIT_FIELD_PETNUMBER, 0);
}
void CharmInfo::LoadPetActionBar(const std::string& data)
@@ -16963,58 +16973,68 @@ uint32 Unit::GetResistance(SpellSchoolMask mask) const
void CharmInfo::SetIsCommandAttack(bool val)
{
- m_isCommandAttack = val;
+ _isCommandAttack = val;
}
bool CharmInfo::IsCommandAttack()
{
- return m_isCommandAttack;
+ return _isCommandAttack;
+}
+
+void CharmInfo::SetIsCommandFollow(bool val)
+{
+ _isCommandFollow = val;
+}
+
+bool CharmInfo::IsCommandFollow()
+{
+ return _isCommandFollow;
}
void CharmInfo::SaveStayPosition()
{
//! At this point a new spline destination is enabled because of Unit::StopMoving()
- G3D::Vector3 const stayPos = m_unit->movespline->FinalDestination();
- m_stayX = stayPos.x;
- m_stayY = stayPos.y;
- m_stayZ = stayPos.z;
+ G3D::Vector3 const stayPos = _unit->movespline->FinalDestination();
+ _stayX = stayPos.x;
+ _stayY = stayPos.y;
+ _stayZ = stayPos.z;
}
void CharmInfo::GetStayPosition(float &x, float &y, float &z)
{
- x = m_stayX;
- y = m_stayY;
- z = m_stayZ;
+ x = _stayX;
+ y = _stayY;
+ z = _stayZ;
}
void CharmInfo::SetIsAtStay(bool val)
{
- m_isAtStay = val;
+ _isAtStay = val;
}
bool CharmInfo::IsAtStay()
{
- return m_isAtStay;
+ return _isAtStay;
}
void CharmInfo::SetIsFollowing(bool val)
{
- m_isFollowing = val;
+ _isFollowing = val;
}
bool CharmInfo::IsFollowing()
{
- return m_isFollowing;
+ return _isFollowing;
}
void CharmInfo::SetIsReturning(bool val)
{
- m_isReturning = val;
+ _isReturning = val;
}
bool CharmInfo::IsReturning()
{
- return m_isReturning;
+ return _isReturning;
}
void Unit::SetInFront(Unit const* target)
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index 000a254cfbe..1bd3e5d59aa 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -253,6 +253,7 @@ enum UnitRename
#define MAX_SPELL_CONTROL_BAR 10
#define MAX_AGGRO_RESET_TIME 10 // in seconds
+#define MAX_AGGRO_RADIUS 45.0f // yards
enum Swing
{
@@ -1103,12 +1104,12 @@ struct CharmInfo
explicit CharmInfo(Unit* unit);
~CharmInfo();
void RestoreState();
- uint32 GetPetNumber() const { return m_petnumber; }
+ uint32 GetPetNumber() const { return _petnumber; }
void SetPetNumber(uint32 petnumber, bool statwindow);
- void SetCommandState(CommandStates st) { m_CommandState = st; }
- CommandStates GetCommandState() const { return m_CommandState; }
- bool HasCommandState(CommandStates state) const { return (m_CommandState == state); }
+ void SetCommandState(CommandStates st) { _CommandState = st; }
+ CommandStates GetCommandState() const { return _CommandState; }
+ bool HasCommandState(CommandStates state) const { return (_CommandState == state); }
void InitPossessCreateSpells();
void InitCharmCreateSpells();
@@ -1129,12 +1130,14 @@ struct CharmInfo
void ToggleCreatureAutocast(SpellInfo const* spellInfo, bool apply);
- CharmSpellInfo* GetCharmSpell(uint8 index) { return &(m_charmspells[index]); }
+ CharmSpellInfo* GetCharmSpell(uint8 index) { return &(_charmspells[index]); }
GlobalCooldownMgr& GetGlobalCooldownMgr() { return m_GlobalCooldownMgr; }
void SetIsCommandAttack(bool val);
bool IsCommandAttack();
+ void SetIsCommandFollow(bool val);
+ bool IsCommandFollow();
void SetIsAtStay(bool val);
bool IsAtStay();
void SetIsFollowing(bool val);
@@ -1146,23 +1149,24 @@ struct CharmInfo
private:
- Unit* m_unit;
+ Unit* _unit;
UnitActionBarEntry PetActionBar[MAX_UNIT_ACTION_BAR_INDEX];
- CharmSpellInfo m_charmspells[4];
- CommandStates m_CommandState;
- uint32 m_petnumber;
- bool m_barInit;
+ CharmSpellInfo _charmspells[4];
+ CommandStates _CommandState;
+ uint32 _petnumber;
+ bool _barInit;
//for restoration after charmed
- ReactStates m_oldReactState;
-
- bool m_isCommandAttack;
- bool m_isAtStay;
- bool m_isFollowing;
- bool m_isReturning;
- float m_stayX;
- float m_stayY;
- float m_stayZ;
+ ReactStates _oldReactState;
+
+ bool _isCommandAttack;
+ bool _isCommandFollow;
+ bool _isAtStay;
+ bool _isFollowing;
+ bool _isReturning;
+ float _stayX;
+ float _stayY;
+ float _stayZ;
GlobalCooldownMgr m_GlobalCooldownMgr;
};
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h
index 6c1cdf6a7fb..1dbf1ba0be8 100644
--- a/src/server/game/Grids/Notifiers/GridNotifiers.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.h
@@ -1087,6 +1087,35 @@ namespace Trinity
NearestHostileUnitInAttackDistanceCheck(NearestHostileUnitInAttackDistanceCheck const&);
};
+ class NearestHostileUnitInAggroRangeCheck
+ {
+ public:
+ explicit NearestHostileUnitInAggroRangeCheck(Creature const* creature, bool useLOS = false) : _me(creature), _useLOS(useLOS)
+ {
+ }
+ bool operator()(Unit* u)
+ {
+ if (!u->IsHostileTo(_me))
+ return false;
+
+ if (!u->IsWithinDistInMap(_me, _me->GetAggroRange(u)))
+ return false;
+
+ if (!_me->IsValidAttackTarget(u))
+ return false;
+
+ if (_useLOS && !u->IsWithinLOSInMap(_me))
+ return false;
+
+ return true;
+ }
+
+ private:
+ Creature const* _me;
+ bool _useLOS;
+ NearestHostileUnitInAggroRangeCheck(NearestHostileUnitInAggroRangeCheck const&);
+ };
+
class AnyAssistCreatureInRangeCheck
{
public:
diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp
index 02a5a9c26e1..aa9b81aa534 100644
--- a/src/server/game/Handlers/NPCHandler.cpp
+++ b/src/server/game/Handlers/NPCHandler.cpp
@@ -495,22 +495,6 @@ void WorldSession::SendBindPoint(Creature* npc)
uint32 bindspell = 3286;
- // update sql homebind
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_PLAYER_HOMEBIND);
- stmt->setUInt16(0, _player->GetMapId());
- stmt->setUInt16(1, _player->GetAreaId());
- stmt->setFloat (2, _player->GetPositionX());
- stmt->setFloat (3, _player->GetPositionY());
- stmt->setFloat (4, _player->GetPositionZ());
- stmt->setUInt32(5, _player->GetGUIDLow());
- CharacterDatabase.Execute(stmt);
-
- _player->m_homebindMapId = _player->GetMapId();
- _player->m_homebindAreaId = _player->GetAreaId();
- _player->m_homebindX = _player->GetPositionX();
- _player->m_homebindY = _player->GetPositionY();
- _player->m_homebindZ = _player->GetPositionZ();
-
// send spell for homebinding (3286)
npc->CastSpell(_player, bindspell, true);
diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp
index 3bf64726f03..378b00ceed4 100644
--- a/src/server/game/Handlers/PetHandler.cpp
+++ b/src/server/game/Handlers/PetHandler.cpp
@@ -167,6 +167,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
charmInfo->SetIsCommandAttack(false);
charmInfo->SetIsAtStay(true);
+ charmInfo->SetIsCommandFollow(false);
charmInfo->SetIsFollowing(false);
charmInfo->SetIsReturning(false);
charmInfo->SaveStayPosition();
@@ -180,6 +181,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
charmInfo->SetIsCommandAttack(false);
charmInfo->SetIsAtStay(false);
charmInfo->SetIsReturning(true);
+ charmInfo->SetIsCommandFollow(true);
charmInfo->SetIsFollowing(false);
break;
case COMMAND_ATTACK: //spellid=1792 //ATTACK
@@ -220,6 +222,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
charmInfo->SetIsCommandAttack(true);
charmInfo->SetIsAtStay(false);
charmInfo->SetIsFollowing(false);
+ charmInfo->SetIsCommandFollow(false);
charmInfo->SetIsReturning(false);
pet->ToCreature()->AI()->AttackStart(TargetUnit);
@@ -241,6 +244,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
charmInfo->SetIsCommandAttack(true);
charmInfo->SetIsAtStay(false);
charmInfo->SetIsFollowing(false);
+ charmInfo->SetIsCommandFollow(false);
charmInfo->SetIsReturning(false);
pet->Attack(TargetUnit, true);
diff --git a/src/server/game/Handlers/QuestHandler.cpp b/src/server/game/Handlers/QuestHandler.cpp
index 051e71e3b27..cb10b607c4a 100644
--- a/src/server/game/Handlers/QuestHandler.cpp
+++ b/src/server/game/Handlers/QuestHandler.cpp
@@ -43,7 +43,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket& recvData)
Object* questgiver = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT);
if (!questgiver)
{
- sLog->outInfo(LOG_FILTER_NETWORKIO, "Error in CMSG_QUESTGIVER_STATUS_QUERY, called for not found questgiver (Typeid: %u GUID: %u)", GuidHigh2TypeId(GUID_HIPART(guid)), GUID_LOPART(guid));
+ sLog->outInfo(LOG_FILTER_NETWORKIO, "Error in CMSG_QUESTGIVER_STATUS_QUERY, called for non-existing questgiver (Typeid: %u GUID: %u)", GuidHigh2TypeId(GUID_HIPART(guid)), GUID_LOPART(guid));
return;
}
@@ -289,7 +289,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket& recvData)
if (reward >= QUEST_REWARD_CHOICES_COUNT)
{
- sLog->outError(LOG_FILTER_NETWORKIO, "Error in CMSG_QUESTGIVER_CHOOSE_REWARD: player %s (guid %d) tried to get invalid reward (%u) (probably packet hacking)", _player->GetName().c_str(), _player->GetGUIDLow(), reward);
+ sLog->outError(LOG_FILTER_NETWORKIO, "Error in CMSG_QUESTGIVER_CHOOSE_REWARD: player %s (guid %d) tried to get invalid reward (%u) (possible packet-hacking detected)", _player->GetName().c_str(), _player->GetGUIDLow(), reward);
return;
}
@@ -315,7 +315,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket& recvData)
if ((!_player->CanSeeStartQuest(quest) && _player->GetQuestStatus(questId) == QUEST_STATUS_NONE) ||
(_player->GetQuestStatus(questId) != QUEST_STATUS_COMPLETE && !quest->IsAutoComplete()))
{
- sLog->outError(LOG_FILTER_NETWORKIO, "HACK ALERT: Player %s (guid: %u) is trying to complete quest (id: %u) but he has no right to do it!",
+ sLog->outError(LOG_FILTER_NETWORKIO, "Error in QUEST_STATUS_COMPLETE: player %s (guid %u) tried to complete quest %u, but is not allowed to do so (possible packet-hacking or high latency)",
_player->GetName().c_str(), _player->GetGUIDLow(), questId);
return;
}
diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
index 7a669642e7e..8712b2cf527 100755
--- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
@@ -66,7 +66,9 @@ void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T &owner)
// We need to subtract GetObjectSize() because it gets added back further down the chain
// and that makes pets too far away. Subtracting it allows pets to properly
// be (GetCombatReach() + i_offset) away.
- if (owner.isPet())
+ // Only applies when i_target is pet's owner otherwise pets and mobs end up
+ // doing a "dance" while fighting
+ if (owner.isPet() && i_target->GetTypeId() == TYPEID_PLAYER)
{
dist = i_target->GetCombatReach();
size = i_target->GetCombatReach() - i_target->GetObjectSize();
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index 988ef0937c3..51e6ced8d24 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,12 @@ FormulaScript::FormulaScript(const char* name)
ScriptRegistry<FormulaScript>::AddScript(this);
}
+UnitScript::UnitScript(const char* name)
+ : ScriptObject(name)
+{
+ ScriptRegistry<UnitScript>::AddScript(this);
+}
+
WorldMapScript::WorldMapScript(const char* name, uint32 mapId)
: ScriptObject(name), MapScript<Map>(mapId)
{
@@ -1474,7 +1419,7 @@ ItemScript::ItemScript(const char* name)
}
CreatureScript::CreatureScript(const char* name)
- : ScriptObject(name)
+ : UnitScript(name)
{
ScriptRegistry<CreatureScript>::AddScript(this);
}
@@ -1528,7 +1473,7 @@ ConditionScript::ConditionScript(const char* name)
}
VehicleScript::VehicleScript(const char* name)
- : ScriptObject(name)
+ : UnitScript(name)
{
ScriptRegistry<VehicleScript>::AddScript(this);
}
@@ -1552,7 +1497,7 @@ AchievementCriteriaScript::AchievementCriteriaScript(const char* name)
}
PlayerScript::PlayerScript(const char* name)
- : ScriptObject(name)
+ : UnitScript(name)
{
ScriptRegistry<PlayerScript>::AddScript(this);
}
@@ -1598,6 +1543,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 22625d74e10..17cc3844605 100644
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -68,8 +68,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.
@@ -393,7 +391,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);
+
+ 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:
@@ -584,7 +599,7 @@ class ConditionScript : public ScriptObject
virtual bool OnConditionCheck(Condition* /*condition*/, ConditionSourceInfo& /*sourceInfo*/) { return true; }
};
-class VehicleScript : public ScriptObject
+class VehicleScript : public UnitScript
{
protected:
@@ -655,7 +670,7 @@ class AchievementCriteriaScript : public ScriptObject
virtual bool OnCheck(Player* source, Unit* target) = 0;
};
-class PlayerScript : public ScriptObject
+class PlayerScript : public UnitScript
{
protected:
@@ -1032,6 +1047,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 6efeb061448..0ab0b3f21e9 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -3076,9 +3076,10 @@ void AuraEffect::HandleModPossess(AuraApplication const* aurApp, uint8 mode, boo
target->RemoveCharmedBy(caster);
}
-// only one spell has this aura
void AuraEffect::HandleModPossessPet(AuraApplication const* aurApp, uint8 mode, bool apply) const
{
+ // Used by spell "Eyes of the Beast"
+
if (!(mode & AURA_EFFECT_HANDLE_REAL))
return;
@@ -3101,6 +3102,9 @@ void AuraEffect::HandleModPossessPet(AuraApplication const* aurApp, uint8 mode,
if (caster->ToPlayer()->GetPet() != pet)
return;
+ // Must clear current motion or pet leashes back to owner after a few yards
+ // when under spell 'Eyes of the Beast'
+ pet->GetMotionMaster()->Clear();
pet->SetCharmedBy(caster, CHARM_TYPE_POSSESS, aurApp);
}
else
@@ -3111,13 +3115,15 @@ void AuraEffect::HandleModPossessPet(AuraApplication const* aurApp, uint8 mode,
pet->Remove(PET_SAVE_NOT_IN_SLOT, true);
else
{
- // Reinitialize the pet bar and make the pet come back to the owner
+ // Reinitialize the pet bar or it will appear greyed out
caster->ToPlayer()->PetSpellInitialize();
- if (!pet->getVictim())
+
+ // Follow owner only if not fighting or owner didn't click "stay" at new location
+ // This may be confusing because pet bar shows "stay" when under the spell but it retains
+ // the "follow" flag. Player MUST click "stay" while under the spell.
+ if (!pet->getVictim() && !pet->GetCharmInfo()->HasCommandState(COMMAND_STAY))
{
pet->GetMotionMaster()->MoveFollow(caster, PET_FOLLOW_DIST, pet->GetFollowAngle());
- //if (target->GetCharmInfo())
- // target->GetCharmInfo()->SetCommandState(COMMAND_FOLLOW);
}
}
}
@@ -6085,6 +6091,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/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 63198fd39aa..364127a55ba 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -1372,7 +1372,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
if (SpellTargetPosition const* st = sSpellMgr->GetSpellTargetPosition(m_spellInfo->Id))
{
// TODO: fix this check
- if (m_spellInfo->HasEffect(SPELL_EFFECT_TELEPORT_UNITS))
+ if (m_spellInfo->HasEffect(SPELL_EFFECT_TELEPORT_UNITS) || m_spellInfo->HasEffect(SPELL_EFFECT_BIND))
m_targets.SetDst(st->target_X, st->target_Y, st->target_Z, st->target_Orientation, (int32)st->target_mapId);
else if (st->target_mapId == m_caster->GetMapId())
m_targets.SetDst(st->target_X, st->target_Y, st->target_Z, st->target_Orientation);
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 57993ecdc08..ebe005ca67e 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -5988,51 +5988,38 @@ void Spell::EffectBind(SpellEffIndex effIndex)
Player* player = unitTarget->ToPlayer();
- uint32 area_id;
- WorldLocation loc;
- if (m_spellInfo->Effects[effIndex].TargetA.GetTarget() == TARGET_DEST_DB || m_spellInfo->Effects[effIndex].TargetB.GetTarget() == TARGET_DEST_DB)
- {
- SpellTargetPosition const* st = sSpellMgr->GetSpellTargetPosition(m_spellInfo->Id);
- if (!st)
- {
- sLog->outError(LOG_FILTER_SPELLS_AURAS, "Spell::EffectBind - unknown teleport coordinates for spell ID %u", m_spellInfo->Id);
- return;
- }
+ WorldLocation homeLoc;
+ uint32 areaId = player->GetAreaId();
- loc.m_mapId = st->target_mapId;
- loc.m_positionX = st->target_X;
- loc.m_positionY = st->target_Y;
- loc.m_positionZ = st->target_Z;
- loc.SetOrientation(st->target_Orientation);
- area_id = player->GetAreaId();
- }
+ if (m_spellInfo->Effects[effIndex].MiscValue)
+ areaId = m_spellInfo->Effects[effIndex].MiscValue;
+
+ if (m_targets.HasDst())
+ homeLoc.WorldRelocate(*destTarget);
else
{
- player->GetPosition(&loc);
- area_id = player->GetAreaId();
+ player->GetPosition(&homeLoc);
+ homeLoc.m_mapId = player->GetMapId();
}
- player->SetHomebind(loc, area_id);
+ player->SetHomebind(homeLoc, areaId);
// binding
WorldPacket data(SMSG_BINDPOINTUPDATE, (4+4+4+4+4));
- data << float(loc.m_positionX);
- data << float(loc.m_positionY);
- data << float(loc.m_positionZ);
- data << uint32(loc.m_mapId);
- data << uint32(area_id);
+ data << float(homeLoc.GetPositionX());
+ data << float(homeLoc.GetPositionY());
+ data << float(homeLoc.GetPositionZ());
+ data << uint32(homeLoc.GetMapId());
+ data << uint32(areaId);
player->SendDirectMessage(&data);
- sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "New homebind X : %f", loc.m_positionX);
- sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "New homebind Y : %f", loc.m_positionY);
- sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "New homebind Z : %f", loc.m_positionZ);
- sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "New homebind MapId : %u", loc.m_mapId);
- sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "New homebind AreaId : %u", area_id);
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "EffectBind: New homebind X: %f, Y: %f, Z: %f, MapId: %u, AreaId: %u",
+ homeLoc.GetPositionX(), homeLoc.GetPositionY(), homeLoc.GetPositionZ(), homeLoc.GetMapId(), areaId);
// zone update
data.Initialize(SMSG_PLAYERBOUND, 8+4);
data << uint64(player->GetGUID());
- data << uint32(area_id);
+ data << uint32(areaId);
player->SendDirectMessage(&data);
}
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
index 1ec0eda171c..27a3aaa3fae 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
@@ -33,7 +33,7 @@ EndScriptData */
enum eEnums
{
- SAY_BOSS_DIE_AD = 0,
+ SAY_BOSS_DIE_AD = 4,
SAY_BOSS_DIE_AS = 3,
SAY_ARCHMAGE = 0,
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
index 959f8a3f690..5c46519ab1c 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
@@ -231,7 +231,7 @@ public:
{
npc_morriduneAI(Creature* creature) : npc_escortAI(creature)
{
- creature->AI()->Talk(SAY_MORRIDUNE_1);
+ Talk(SAY_MORRIDUNE_1);
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
Start(false, false, 0);
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
index 3329ecf88d2..4887c8adf62 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
@@ -43,7 +43,7 @@ enum Says
SAY_PHASE201 = 10,
SAY_PHASE203 = 11,
SAY_PHASE205 = 12,
- SAY_PHASE208 = 13,
+ SAY_PHASE208 = 13,
SAY_PHASE209 = 14,
SAY_PHASE210 = 15,
@@ -96,7 +96,7 @@ enum Says
SAY_PHASE117 = 1,
//Cityman
- SAY_PHASE202 = 0,
+ SAY_PHASE202 = 0,
//Crazyman
SAY_PHASE204 = 0,
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp
index 03bebe35fd9..5d9eaeac7b9 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp
@@ -59,7 +59,7 @@ enum MedivhBm
SPELL_CORRUPT = 31326,
SPELL_CORRUPT_AEONUS = 37853,
-
+
C_COUNCIL_ENFORCER = 17023
};
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
index 4ebdc408963..99a304e3726 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
@@ -35,7 +35,7 @@ enum Skeram
SAY_SLAY = 1,
SAY_SPLIT = 2,
SAY_DEATH = 3,
-
+
SPELL_ARCANE_EXPLOSION = 25679,
SPELL_EARTH_SHOCK = 26194,
SPELL_TRUE_FULFILLMENT = 785,
diff --git a/src/server/scripts/Kalimdor/azuremyst_isle.cpp b/src/server/scripts/Kalimdor/azuremyst_isle.cpp
index ae0199e5dee..244a0abe8b2 100644
--- a/src/server/scripts/Kalimdor/azuremyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/azuremyst_isle.cpp
@@ -411,14 +411,14 @@ enum Geezle
SPELL_TREE_DISGUISE = 30298,
GEEZLE_SAY_1 = 0,
- SPARK_SAY_2 = 0,
- SPARK_SAY_3 = 1,
+ SPARK_SAY_2 = 3,
+ SPARK_SAY_3 = 4,
GEEZLE_SAY_4 = 1,
- SPARK_SAY_5 = 2,
- SPARK_SAY_6 = 3,
+ SPARK_SAY_5 = 5,
+ SPARK_SAY_6 = 6,
GEEZLE_SAY_7 = 2,
- EMOTE_SPARK = 4,
+ EMOTE_SPARK = 7,
MOB_SPARK = 17243,
GO_NAGA_FLAG = 181694
@@ -490,23 +490,23 @@ public:
Spark->SetInFront(me);
me->SetInFront(Spark);
return 5000;
- case 3:
- Spark->AI()->Talk(SPARK_SAY_2);
+ case 3:
+ Spark->AI()->Talk(SPARK_SAY_2);
return 7000;
- case 4:
+ case 4:
Spark->AI()->Talk(SPARK_SAY_3);
return 8000;
- case 5:
+ case 5:
Talk(GEEZLE_SAY_4, SparkGUID);
return 8000;
- case 6:
+ case 6:
Spark->AI()->Talk(SPARK_SAY_5);
return 9000;
- case 7:
- Spark->AI()->Talk(SPARK_SAY_6);
+ case 7:
+ Spark->AI()->Talk(SPARK_SAY_6);
return 8000;
- case 8:
- Talk(GEEZLE_SAY_7, SparkGUID);
+ case 8:
+ Talk(GEEZLE_SAY_7, SparkGUID);
return 2000;
case 9:
me->GetMotionMaster()->MoveTargetedHome();
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/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
index f618d0e04e7..a9dc9cf394d 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
@@ -25,6 +25,7 @@
#include "ScriptedCreature.h"
#include "trial_of_the_crusader.h"
#include "SpellScript.h"
+#include "SpellAuraEffects.h"
#include <limits>
enum Yells
@@ -53,54 +54,54 @@ enum Summons
enum BossSpells
{
- SPELL_FREEZE_SLASH = 66012,
- SPELL_PENETRATING_COLD = 66013,
- SPELL_LEECHING_SWARM = 66118,
- SPELL_LEECHING_HEAL = 66125,
- SPELL_LEECHING_DAMAGE = 66240,
- SPELL_MARK = 67574,
- SPELL_SPIKE_CALL = 66169,
- SPELL_SUBMERGE_ANUBARAK = 65981,
- SPELL_CLEAR_ALL_DEBUFFS = 34098,
- SPELL_EMERGE_ANUBARAK = 65982,
- SPELL_SUMMON_BEATLES = 66339,
- SPELL_SUMMON_BURROWER = 66332,
+ SPELL_FREEZE_SLASH = 66012,
+ SPELL_PENETRATING_COLD = 66013,
+ SPELL_LEECHING_SWARM = 66118,
+ SPELL_LEECHING_SWARM_HEAL = 66125,
+ SPELL_LEECHING_SWARM_DMG = 66240,
+ SPELL_MARK = 67574,
+ SPELL_SPIKE_CALL = 66169,
+ SPELL_SUBMERGE_ANUBARAK = 65981,
+ SPELL_CLEAR_ALL_DEBUFFS = 34098,
+ SPELL_EMERGE_ANUBARAK = 65982,
+ SPELL_SUMMON_BEATLES = 66339,
+ SPELL_SUMMON_BURROWER = 66332,
// Burrow
- SPELL_CHURNING_GROUND = 66969,
+ SPELL_CHURNING_GROUND = 66969,
// Scarab
- SPELL_DETERMINATION = 66092,
- SPELL_ACID_MANDIBLE = 65774, //Passive - Triggered
+ SPELL_DETERMINATION = 66092,
+ SPELL_ACID_MANDIBLE = 65774, //Passive - Triggered
// Burrower
- SPELL_SPIDER_FRENZY = 66128,
- SPELL_EXPOSE_WEAKNESS = 67720, //Passive - Triggered
- SPELL_SHADOW_STRIKE = 66134,
- SPELL_SUBMERGE_EFFECT = 68394,
- SPELL_AWAKENED = 66311,
- SPELL_EMERGE_EFFECT = 65982,
+ SPELL_SPIDER_FRENZY = 66128,
+ SPELL_EXPOSE_WEAKNESS = 67720, //Passive - Triggered
+ SPELL_SHADOW_STRIKE = 66134,
+ SPELL_SUBMERGE_EFFECT = 68394,
+ SPELL_AWAKENED = 66311,
+ SPELL_EMERGE_EFFECT = 65982,
- SPELL_PERSISTENT_DIRT = 68048,
+ SPELL_PERSISTENT_DIRT = 68048,
- SUMMON_SCARAB = NPC_SCARAB,
- SUMMON_FROSTSPHERE = NPC_FROST_SPHERE,
- SPELL_BERSERK = 26662,
+ SUMMON_SCARAB = NPC_SCARAB,
+ SUMMON_FROSTSPHERE = NPC_FROST_SPHERE,
+ SPELL_BERSERK = 26662,
//Frost Sphere
- SPELL_FROST_SPHERE = 67539,
- SPELL_PERMAFROST = 66193,
- SPELL_PERMAFROST_VISUAL = 65882,
- SPELL_PERMAFROST_MODEL = 66185,
+ SPELL_FROST_SPHERE = 67539,
+ SPELL_PERMAFROST = 66193,
+ SPELL_PERMAFROST_VISUAL = 65882,
+ SPELL_PERMAFROST_MODEL = 66185,
//Spike
- SPELL_SUMMON_SPIKE = 66169,
- SPELL_SPIKE_SPEED1 = 65920,
- SPELL_SPIKE_TRAIL = 65921,
- SPELL_SPIKE_SPEED2 = 65922,
- SPELL_SPIKE_SPEED3 = 65923,
- SPELL_SPIKE_FAIL = 66181,
- SPELL_SPIKE_TELE = 66170
+ SPELL_SUMMON_SPIKE = 66169,
+ SPELL_SPIKE_SPEED1 = 65920,
+ SPELL_SPIKE_TRAIL = 65921,
+ SPELL_SPIKE_SPEED2 = 65922,
+ SPELL_SPIKE_SPEED3 = 65923,
+ SPELL_SPIKE_FAIL = 66181,
+ SPELL_SPIKE_TELE = 66170
};
#define SPELL_PERMAFROST_HELPER RAID_MODE<uint32>(66193, 67855, 67856, 67857)
@@ -841,6 +842,49 @@ class spell_impale : public SpellScriptLoader
}
};
+class spell_anubarak_leeching_swarm : public SpellScriptLoader
+{
+ public:
+ spell_anubarak_leeching_swarm() : SpellScriptLoader("spell_anubarak_leeching_swarm") { }
+
+ class spell_anubarak_leeching_swarm_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_anubarak_leeching_swarm_AuraScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_LEECHING_SWARM_DMG) || !sSpellMgr->GetSpellInfo(SPELL_LEECHING_SWARM_HEAL))
+ return false;
+ return true;
+ }
+
+ void HandleEffectPeriodic(AuraEffect const* aurEff)
+ {
+ Unit* caster = GetCaster();
+ if (Unit* target = GetTarget())
+ {
+ int32 lifeLeeched = target->CountPctFromCurHealth(aurEff->GetAmount());
+ if (lifeLeeched < 250)
+ lifeLeeched = 250;
+ // Damage
+ caster->CastCustomSpell(target, SPELL_LEECHING_SWARM_DMG, &lifeLeeched, 0, 0, false);
+ // Heal
+ caster->CastCustomSpell(caster, SPELL_LEECHING_SWARM_HEAL, &lifeLeeched, 0, 0, false);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_anubarak_leeching_swarm_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_anubarak_leeching_swarm_AuraScript();
+ }
+};
+
void AddSC_boss_anubarak_trial()
{
new boss_anubarak_trial();
@@ -850,4 +894,5 @@ void AddSC_boss_anubarak_trial()
new mob_frost_sphere();
new spell_impale();
+ new spell_anubarak_leeching_swarm();
}
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
index d4e3a9e677d..c1a3a432407 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
@@ -70,7 +70,7 @@ enum Yells
SAY_FALRIC_INTRO_1 = 5,
SAY_FALRIC_INTRO_2 = 6,
- SAY_MARWYN_INTRO_1 = 0
+ SAY_MARWYN_INTRO_1 = 4
};
enum Events
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
index 969a3621e8e..51eca327810 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
@@ -29,7 +29,7 @@ enum Yells
SAY_GORKUN_INTRO_2 = 0,
SAY_GORKUN_OUTRO_1 = 1,
SAY_GORKUN_OUTRO_2 = 2,
-
+
//Tyrannus
SAY_AMBUSH_1 = 3,
SAY_AMBUSH_2 = 4,
@@ -43,7 +43,7 @@ enum Yells
SAY_MARK_RIMEFANG_2 = 12,
SAY_DARK_MIGHT_1 = 13,
SAY_DARK_MIGHT_2 = 14,
-
+
//Jaina
SAY_JAYNA_OUTRO_3 = 3,
SAY_JAYNA_OUTRO_4 = 4,
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/borean_tundra.cpp b/src/server/scripts/Northrend/borean_tundra.cpp
index 628de0238e0..3f20a3d32bc 100644
--- a/src/server/scripts/Northrend/borean_tundra.cpp
+++ b/src/server/scripts/Northrend/borean_tundra.cpp
@@ -931,7 +931,7 @@ enum eThassarian
SAY_LICH_1 = 0,
SAY_LICH_2 = 1,
SAY_LICH_3 = 2,
-
+
SAY_ARLOS_1 = 0,
SAY_ARLOS_2 = 1,
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/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
index 5a9b6e5a94e..dcbbb76162d 100644
--- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
+++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
@@ -37,7 +37,7 @@ enum IllidariCouncil
SAY_GATH_SLAY = 4,
SAY_GATH_COMNT = 5,
SAY_GATH_DEATH = 6,
-
+
SAY_MALA_SPECIAL1 = 2,
SAY_MALA_SPECIAL2 = 3,
SAY_MALA_SLAY = 4,
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
index 6fe1e86551a..157473463af 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
@@ -387,7 +387,7 @@ public:
{
if (victim->GetTypeId() != TYPEID_PLAYER)
return;
-
+
Talk(DemonForm ? SAY_DEMON_SLAY : SAY_NIGHTELF_SLAY);
}
diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp
index 96f707b06f1..7bec3674a84 100644
--- a/src/server/scripts/Outland/netherstorm.cpp
+++ b/src/server/scripts/Outland/netherstorm.cpp
@@ -247,7 +247,7 @@ public:
if (someplayer)
{
Unit* u = Unit::GetUnit(*me, someplayer);
- if (u && u->GetTypeId() == TYPEID_PLAYER)
+ if (u && u->GetTypeId() == TYPEID_PLAYER)
Talk(EMOTE_START, u->GetGUID());
}
Event_Timer = 60000;
@@ -375,7 +375,7 @@ enum eCommanderDawnforgeData
SAY_PATHALEON_CULATOR_IMAGE_2 = 1,
SAY_PATHALEON_CULATOR_IMAGE_2_1 = 2,
SAY_PATHALEON_CULATOR_IMAGE_2_2 = 3,
-
+
QUEST_INFO_GATHERING = 10198,
SPELL_SUNFURY_DISGUISE = 34603,
};
@@ -683,7 +683,7 @@ class npc_professor_dabiri : public CreatureScript
public:
npc_professor_dabiri() : CreatureScript("npc_professor_dabiri") { }
- //OnQuestAccept:
+ //OnQuestAccept:
//if (quest->GetQuestId() == QUEST_DIMENSIUS)
//creature->AI()->Talk(WHISPER_DABIRI, player->GetGUID());
diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp
index 55fce0c4a8d..65a4dbe92a5 100644
--- a/src/server/scripts/Outland/shadowmoon_valley.cpp
+++ b/src/server/scripts/Outland/shadowmoon_valley.cpp
@@ -1495,8 +1495,8 @@ public:
if (!Announced && AnnounceTimer <= diff)
{
Announced = true;
- }
- else
+ }
+ else
AnnounceTimer -= diff;
if (WaveTimer <= diff)
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index b54cc3cdf55..c8ae44d9cd9 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -367,59 +367,9 @@ class spell_gen_remove_flight_auras : public SpellScriptLoader
}
};
-// 66118 Leeching Swarm
-enum LeechingSwarmSpells
-{
- SPELL_LEECHING_SWARM_DMG = 66240,
- SPELL_LEECHING_SWARM_HEAL = 66125,
-};
-
-class spell_gen_leeching_swarm : public SpellScriptLoader
-{
- public:
- spell_gen_leeching_swarm() : SpellScriptLoader("spell_gen_leeching_swarm") { }
-
- class spell_gen_leeching_swarm_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_gen_leeching_swarm_AuraScript);
-
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_LEECHING_SWARM_DMG) || !sSpellMgr->GetSpellInfo(SPELL_LEECHING_SWARM_HEAL))
- return false;
- return true;
- }
-
- void HandleEffectPeriodic(AuraEffect const* aurEff)
- {
- Unit* caster = GetCaster();
- if (Unit* target = GetTarget())
- {
- int32 lifeLeeched = target->CountPctFromCurHealth(aurEff->GetAmount());
- if (lifeLeeched < 250)
- lifeLeeched = 250;
- // Damage
- caster->CastCustomSpell(target, SPELL_LEECHING_SWARM_DMG, &lifeLeeched, 0, 0, false);
- // Heal
- caster->CastCustomSpell(caster, SPELL_LEECHING_SWARM_HEAL, &lifeLeeched, 0, 0, false);
- }
- }
-
- void Register()
- {
- OnEffectPeriodic += AuraEffectPeriodicFn(spell_gen_leeching_swarm_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
- }
- };
-
- AuraScript* GetAuraScript() const
- {
- return new spell_gen_leeching_swarm_AuraScript();
- }
-};
-
enum EluneCandle
{
- NPC_OMEN = 15467,
+ NPC_OMEN = 15467,
SPELL_ELUNE_CANDLE_OMEN_HEAD = 26622,
SPELL_ELUNE_CANDLE_OMEN_CHEST = 26624,
@@ -483,128 +433,6 @@ class spell_gen_elune_candle : public SpellScriptLoader
}
};
-// 24750 Trick
-enum TrickSpells
-{
- SPELL_PIRATE_COSTUME_MALE = 24708,
- SPELL_PIRATE_COSTUME_FEMALE = 24709,
- SPELL_NINJA_COSTUME_MALE = 24710,
- SPELL_NINJA_COSTUME_FEMALE = 24711,
- SPELL_LEPER_GNOME_COSTUME_MALE = 24712,
- SPELL_LEPER_GNOME_COSTUME_FEMALE = 24713,
- SPELL_SKELETON_COSTUME = 24723,
- SPELL_GHOST_COSTUME_MALE = 24735,
- SPELL_GHOST_COSTUME_FEMALE = 24736,
- SPELL_TRICK_BUFF = 24753,
-};
-
-class spell_gen_trick : public SpellScriptLoader
-{
- public:
- spell_gen_trick() : SpellScriptLoader("spell_gen_trick") {}
-
- class spell_gen_trick_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_gen_trick_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_MALE)
- || !sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_FEMALE)
- || !sSpellMgr->GetSpellInfo(SPELL_SKELETON_COSTUME) || !sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_TRICK_BUFF))
- return false;
- return true;
- }
-
- void HandleScript(SpellEffIndex /*effIndex*/)
- {
- Unit* caster = GetCaster();
- if (Player* target = GetHitPlayer())
- {
- uint8 gender = target->getGender();
- uint32 spellId = SPELL_TRICK_BUFF;
- switch (urand(0, 5))
- {
- case 1:
- spellId = gender ? SPELL_LEPER_GNOME_COSTUME_FEMALE : SPELL_LEPER_GNOME_COSTUME_MALE;
- break;
- case 2:
- spellId = gender ? SPELL_PIRATE_COSTUME_FEMALE : SPELL_PIRATE_COSTUME_MALE;
- break;
- case 3:
- spellId = gender ? SPELL_GHOST_COSTUME_FEMALE : SPELL_GHOST_COSTUME_MALE;
- break;
- case 4:
- spellId = gender ? SPELL_NINJA_COSTUME_FEMALE : SPELL_NINJA_COSTUME_MALE;
- break;
- case 5:
- spellId = SPELL_SKELETON_COSTUME;
- break;
- default:
- break;
- }
-
- caster->CastSpell(target, spellId, true, NULL);
- }
- }
-
- void Register()
- {
- OnEffectHitTarget += SpellEffectFn(spell_gen_trick_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
- }
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_gen_trick_SpellScript();
- }
-};
-
-// 24751 Trick or Treat
-enum TrickOrTreatSpells
-{
- SPELL_TRICK = 24714,
- SPELL_TREAT = 24715,
- SPELL_TRICKED_OR_TREATED = 24755
-};
-
-class spell_gen_trick_or_treat : public SpellScriptLoader
-{
- public:
- spell_gen_trick_or_treat() : SpellScriptLoader("spell_gen_trick_or_treat") {}
-
- class spell_gen_trick_or_treat_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_gen_trick_or_treat_SpellScript);
-
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_TRICK) || !sSpellMgr->GetSpellInfo(SPELL_TREAT) || !sSpellMgr->GetSpellInfo(SPELL_TRICKED_OR_TREATED))
- return false;
- return true;
- }
-
- void HandleScript(SpellEffIndex /*effIndex*/)
- {
- Unit* caster = GetCaster();
- if (Player* target = GetHitPlayer())
- {
- caster->CastSpell(target, roll_chance_i(50) ? SPELL_TRICK : SPELL_TREAT, true, NULL);
- caster->CastSpell(target, SPELL_TRICKED_OR_TREATED, true, NULL);
- }
- }
-
- void Register()
- {
- OnEffectHitTarget += SpellEffectFn(spell_gen_trick_or_treat_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
- }
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_gen_trick_or_treat_SpellScript();
- }
-};
-
class spell_creature_permanent_feign_death : public SpellScriptLoader
{
public:
@@ -3397,12 +3225,9 @@ void AddSC_generic_spell_scripts()
new spell_gen_av_drekthar_presence();
new spell_gen_burn_brutallus();
new spell_gen_cannibalize();
- new spell_gen_leeching_swarm();
new spell_gen_parachute();
new spell_gen_pet_summoned();
new spell_gen_remove_flight_auras();
- new spell_gen_trick();
- new spell_gen_trick_or_treat();
new spell_creature_permanent_feign_death();
new spell_pvp_trinket_wotf_shared_cd();
new spell_gen_animal_blood();
diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp
index 5b1cbe0c36a..4f48c311612 100644
--- a/src/server/scripts/Spells/spell_holiday.cpp
+++ b/src/server/scripts/Spells/spell_holiday.cpp
@@ -110,7 +110,176 @@ class spell_love_is_in_the_air_romantic_picnic : public SpellScriptLoader
}
};
+// 24750 Trick
+enum TrickSpells
+{
+ SPELL_PIRATE_COSTUME_MALE = 24708,
+ SPELL_PIRATE_COSTUME_FEMALE = 24709,
+ SPELL_NINJA_COSTUME_MALE = 24710,
+ SPELL_NINJA_COSTUME_FEMALE = 24711,
+ SPELL_LEPER_GNOME_COSTUME_MALE = 24712,
+ SPELL_LEPER_GNOME_COSTUME_FEMALE = 24713,
+ SPELL_SKELETON_COSTUME = 24723,
+ SPELL_GHOST_COSTUME_MALE = 24735,
+ SPELL_GHOST_COSTUME_FEMALE = 24736,
+ SPELL_TRICK_BUFF = 24753,
+};
+
+class spell_hallow_end_trick : public SpellScriptLoader
+{
+ public:
+ spell_hallow_end_trick() : SpellScriptLoader("spell_hallow_end_trick") { }
+
+ class spell_hallow_end_trick_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_hallow_end_trick_SpellScript);
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_MALE)
+ || !sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_FEMALE)
+ || !sSpellMgr->GetSpellInfo(SPELL_SKELETON_COSTUME) || !sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_TRICK_BUFF))
+ return false;
+ return true;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (Player* target = GetHitPlayer())
+ {
+ uint8 gender = target->getGender();
+ uint32 spellId = SPELL_TRICK_BUFF;
+ switch (urand(0, 5))
+ {
+ case 1:
+ spellId = gender ? SPELL_LEPER_GNOME_COSTUME_FEMALE : SPELL_LEPER_GNOME_COSTUME_MALE;
+ break;
+ case 2:
+ spellId = gender ? SPELL_PIRATE_COSTUME_FEMALE : SPELL_PIRATE_COSTUME_MALE;
+ break;
+ case 3:
+ spellId = gender ? SPELL_GHOST_COSTUME_FEMALE : SPELL_GHOST_COSTUME_MALE;
+ break;
+ case 4:
+ spellId = gender ? SPELL_NINJA_COSTUME_FEMALE : SPELL_NINJA_COSTUME_MALE;
+ break;
+ case 5:
+ spellId = SPELL_SKELETON_COSTUME;
+ break;
+ default:
+ break;
+ }
+
+ caster->CastSpell(target, spellId, true, NULL);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_hallow_end_trick_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_hallow_end_trick_SpellScript();
+ }
+};
+
+// 24751 Trick or Treat
+enum TrickOrTreatSpells
+{
+ SPELL_TRICK = 24714,
+ SPELL_TREAT = 24715,
+ SPELL_TRICKED_OR_TREATED = 24755,
+ SPELL_TRICKY_TREAT_SPEED = 42919,
+ SPELL_TRICKY_TREAT_TRIGGER = 42965,
+ SPELL_UPSET_TUMMY = 42966
+};
+
+class spell_hallow_end_trick_or_treat : public SpellScriptLoader
+{
+ public:
+ spell_hallow_end_trick_or_treat() : SpellScriptLoader("spell_hallow_end_trick_or_treat") {}
+
+ class spell_hallow_end_trick_or_treat_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_hallow_end_trick_or_treat_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_TRICK) || !sSpellMgr->GetSpellInfo(SPELL_TREAT) || !sSpellMgr->GetSpellInfo(SPELL_TRICKED_OR_TREATED))
+ return false;
+ return true;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (Player* target = GetHitPlayer())
+ {
+ caster->CastSpell(target, roll_chance_i(50) ? SPELL_TRICK : SPELL_TREAT, true, NULL);
+ caster->CastSpell(target, SPELL_TRICKED_OR_TREATED, true, NULL);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_hallow_end_trick_or_treat_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_hallow_end_trick_or_treat_SpellScript();
+ }
+};
+
+class spell_hallow_end_tricky_treat : public SpellScriptLoader
+{
+ public:
+ spell_hallow_end_tricky_treat() : SpellScriptLoader("spell_hallow_end_tricky_treat") { }
+
+ class spell_hallow_end_tricky_treat_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_hallow_end_tricky_treat_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_TRICKY_TREAT_SPEED))
+ return false;
+ if (!sSpellMgr->GetSpellInfo(SPELL_TRICKY_TREAT_TRIGGER))
+ return false;
+ if (!sSpellMgr->GetSpellInfo(SPELL_UPSET_TUMMY))
+ return false;
+ return true;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (caster->HasAura(SPELL_TRICKY_TREAT_TRIGGER) && caster->GetAuraCount(SPELL_TRICKY_TREAT_SPEED) > 3 && roll_chance_i(33))
+ caster->CastSpell(caster, SPELL_UPSET_TUMMY, true);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_hallow_end_tricky_treat_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_hallow_end_tricky_treat_SpellScript();
+ }
+};
+
void AddSC_holiday_spell_scripts()
{
+ // Love is in the Air
new spell_love_is_in_the_air_romantic_picnic();
+ // Hallow's End
+ new spell_hallow_end_trick();
+ new spell_hallow_end_trick_or_treat();
+ new spell_hallow_end_tricky_treat();
}
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index e52034ed2d9..a5122ff5f08 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -706,14 +706,14 @@ class spell_hun_tame_beast : public SpellScriptLoader
}
};
-class spell_hun_furious_howl : public SpellScriptLoader
+class spell_hun_target_only_pet_and_owner : public SpellScriptLoader
{
public:
- spell_hun_furious_howl() : SpellScriptLoader("spell_hun_furious_howl") { }
+ spell_hun_target_only_pet_and_owner() : SpellScriptLoader("spell_hun_target_only_pet_and_owner") { }
- class spell_hun_furious_howl_SpellScript : public SpellScript
+ class spell_hun_target_only_pet_and_owner_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_hun_furious_howl_SpellScript);
+ PrepareSpellScript(spell_hun_target_only_pet_and_owner_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -725,14 +725,14 @@ class spell_hun_furious_howl : public SpellScriptLoader
void Register()
{
- OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_furious_howl_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_PARTY);
- OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_furious_howl_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_CASTER_AREA_PARTY);
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_target_only_pet_and_owner_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_PARTY);
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_target_only_pet_and_owner_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_CASTER_AREA_PARTY);
}
};
SpellScript* GetSpellScript() const
{
- return new spell_hun_furious_howl_SpellScript();
+ return new spell_hun_target_only_pet_and_owner_SpellScript();
}
};
@@ -752,5 +752,5 @@ void AddSC_hunter_spell_scripts()
new spell_hun_misdirection_proc();
new spell_hun_disengage();
new spell_hun_tame_beast();
- new spell_hun_furious_howl();
+ new spell_hun_target_only_pet_and_owner();
}
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index a04912d0828..a5f6b4cfecf 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 96f7db23281..936052fd8ad 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -913,7 +913,7 @@ public:
struct npc_garments_of_questsAI : public npc_escortAI
{
- npc_garments_of_questsAI(Creature* creature) : npc_escortAI(creature)
+ npc_garments_of_questsAI(Creature* creature) : npc_escortAI(creature)
{
Reset();
}
diff --git a/src/tools/vmap4_extractor/vmapexport.cpp b/src/tools/vmap4_extractor/vmapexport.cpp
index 050ec790dbb..3c7b433e125 100644
--- a/src/tools/vmap4_extractor/vmapexport.cpp
+++ b/src/tools/vmap4_extractor/vmapexport.cpp
@@ -586,7 +586,7 @@ int main(int argc, char ** argv)
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// Create the working directory
if (mkdir(szWorkDirWmo
-#ifdef __linux__
+#if defined(__linux__) || defined(__APPLE__)
, 0711
#endif
))