aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2016_02_06_01_world.sql3
-rw-r--r--sql/updates/world/2016_02_06_02_world.sql20
-rw-r--r--sql/updates/world/2016_02_06_03_world.sql6
-rw-r--r--sql/updates/world/2016_02_06_04_world.sql6
-rw-r--r--sql/updates/world/2016_02_06_05_world.sql20
-rw-r--r--sql/updates/world/2016_02_06_06_world.sql7
-rw-r--r--sql/updates/world/2016_02_06_07_world.sql8
-rw-r--r--sql/updates/world/2016_02_06_08_world.sql9
-rw-r--r--sql/updates/world/2016_02_06_09_world.sql3
-rw-r--r--sql/updates/world/2016_02_06_10_world.sql19
-rw-r--r--sql/updates/world/2016_02_06_11_world.sql2
-rw-r--r--sql/updates/world/2016_02_06_12_world.sql4
-rw-r--r--sql/updates/world/2016_02_06_13_world_335.sql3
-rw-r--r--sql/updates/world/2016_02_06_14_world.sql3
-rw-r--r--sql/updates/world/2016_02_07_00_world.sql5
-rw-r--r--sql/updates/world/2016_02_07_01_world_335.sql8
-rw-r--r--sql/updates/world/2016_02_07_02_world_335.sql13
-rw-r--r--sql/updates/world/2016_02_07_03_world_335.sql65
-rw-r--r--sql/updates/world/2016_02_07_04_world.sql67
-rw-r--r--sql/updates/world/2016_02_07_05_world_335.sql4
-rw-r--r--sql/updates/world/2016_02_07_06_world.sql71
-rw-r--r--sql/updates/world/2016_02_07_07_world_335.sql6
-rw-r--r--sql/updates/world/2016_02_07_08_world_335.sql72
-rw-r--r--sql/updates/world/2016_02_07_09_world.sql6
-rw-r--r--sql/updates/world/2016_02_07_10_world.sql7
-rw-r--r--sql/updates/world/2016_02_07_11_world.sql29
-rw-r--r--sql/updates/world/2016_02_07_12_world.sql29
-rw-r--r--sql/updates/world/2016_02_07_13_world.sql413
-rw-r--r--sql/updates/world/2016_02_07_14_world.sql55
-rw-r--r--sql/updates/world/2016_02_07_15_world.sql175
-rw-r--r--sql/updates/world/2016_02_08_00_world_335.sql2
-rw-r--r--sql/updates/world/2016_02_08_01_world.sql25
-rw-r--r--sql/updates/world/2016_02_08_02_world.sql10
-rw-r--r--sql/updates/world/2016_02_08_03_world.sql5
-rw-r--r--sql/updates/world/2016_02_08_04_world.sql2
-rw-r--r--sql/updates/world/2016_02_08_05_world.sql2
-rw-r--r--sql/updates/world/2016_02_08_06_world.sql2
-rw-r--r--sql/updates/world/2016_02_08_07_world.sql82
-rw-r--r--sql/updates/world/2016_02_08_08_world.sql3
-rw-r--r--sql/updates/world/2016_02_09_00_world.sql3
-rw-r--r--sql/updates/world/2016_02_09_01_world.sql211
-rw-r--r--sql/updates/world/2016_02_09_02_world.sql21
-rw-r--r--sql/updates/world/2016_02_09_02_world_335.sql29
-rw-r--r--sql/updates/world/2016_02_09_03_world.sql124
-rw-r--r--sql/updates/world/2016_02_09_04_world.sql5
-rw-r--r--sql/updates/world/2016_02_09_05_world.sql62
-rw-r--r--sql/updates/world/2016_02_09_06_world.sql14
-rw-r--r--sql/updates/world/2016_02_09_07_world.sql77
-rw-r--r--sql/updates/world/2016_02_09_08_world.sql1
-rw-r--r--sql/updates/world/2016_02_10_00_world.sql18
-rw-r--r--sql/updates/world/2016_02_10_01_world.sql21
-rw-r--r--sql/updates/world/2016_02_10_02_world.sql19
-rw-r--r--sql/updates/world/2016_02_10_03_world.sql2
-rw-r--r--sql/updates/world/2016_02_10_04_world.sql6
-rw-r--r--src/common/Define.h6
-rw-r--r--src/common/Utilities/Containers.h (renamed from src/server/shared/Containers.h)61
-rw-r--r--src/common/Utilities/Random.cpp83
-rw-r--r--src/common/Utilities/Random.h95
-rw-r--r--src/common/Utilities/Util.cpp57
-rw-r--r--src/common/Utilities/Util.h34
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp2
-rw-r--r--src/server/game/Achievements/AchievementMgr.cpp14
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp6
-rw-r--r--src/server/game/Chat/Chat.cpp4
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp2
-rw-r--r--src/server/game/DataStores/DBCStores.cpp63
-rw-r--r--src/server/game/DataStores/DBCStores.h7
-rw-r--r--src/server/game/DataStores/DBCStructure.h2
-rw-r--r--src/server/game/DataStores/DBCfmt.h2
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp14
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp3
-rw-r--r--src/server/game/Entities/Player/Player.cpp53
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp22
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp10
-rw-r--r--src/server/game/Grids/GridDefines.h2
-rw-r--r--src/server/game/Grids/Notifiers/GridNotifiers.cpp2
-rw-r--r--src/server/game/Handlers/ChannelHandler.cpp2
-rw-r--r--src/server/game/Handlers/MiscHandler.cpp4
-rw-r--r--src/server/game/Handlers/MovementHandler.cpp3
-rw-r--r--src/server/game/Loot/LootMgr.cpp4
-rw-r--r--src/server/game/Maps/Map.cpp141
-rw-r--r--src/server/game/Maps/Map.h37
-rw-r--r--src/server/game/Maps/MapManager.h14
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvP.cpp2
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp24
-rw-r--r--src/server/game/Spells/Spell.cpp2
-rw-r--r--src/server/game/Spells/SpellEffects.cpp4
-rw-r--r--src/server/game/Spells/SpellMgr.cpp4
-rw-r--r--src/server/game/Texts/CreatureTextMgr.cpp43
-rw-r--r--src/server/scripts/Commands/cs_go.cpp4
-rw-r--r--src/server/scripts/Commands/cs_group.cpp4
-rw-r--r--src/server/scripts/Commands/cs_lookup.cpp4
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp38
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp55
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.h16
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp29
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp84
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h19
-rw-r--r--src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp58
-rw-r--r--src/server/scripts/Kalimdor/zone_ashenvale.cpp34
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp1
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp1
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp1
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_icecrown.cpp1
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp5
-rw-r--r--src/server/scripts/Spells/spell_rogue.cpp142
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp44
-rw-r--r--src/server/scripts/World/npcs_special.cpp93
-rw-r--r--src/tools/map_extractor/CMakeLists.txt2
-rw-r--r--src/tools/map_extractor/System.cpp171
-rw-r--r--src/tools/map_extractor/adt.cpp27
-rw-r--r--src/tools/map_extractor/adt.h51
-rw-r--r--src/tools/mmaps_generator/TerrainBuilder.cpp2
116 files changed, 3001 insertions, 603 deletions
diff --git a/sql/updates/world/2016_02_06_01_world.sql b/sql/updates/world/2016_02_06_01_world.sql
new file mode 100644
index 00000000000..6812c4af52e
--- /dev/null
+++ b/sql/updates/world/2016_02_06_01_world.sql
@@ -0,0 +1,3 @@
+--
+-- Stinky + Precious - Knockbackimmunity
+UPDATE `creature_template` SET `flags_extra`=`flags_extra`|0x40000000 WHERE `entry` IN (37025, 38064, 37217, 38103);
diff --git a/sql/updates/world/2016_02_06_02_world.sql b/sql/updates/world/2016_02_06_02_world.sql
new file mode 100644
index 00000000000..b9fd7cd9d63
--- /dev/null
+++ b/sql/updates/world/2016_02_06_02_world.sql
@@ -0,0 +1,20 @@
+--
+-- Knockbackimmunity Cleanup
+UPDATE `creature_template` SET `flags_extra`=`flags_extra`|0x40000000 WHERE `entry` IN (
+-- npc_kinetic_bomb
+38454, 38775, 38776, 38777,
+-- npc_iron_roots
+33088, 33396, 33168, 33397,
+-- npc_saronite_vapors
+33488, 33789,
+-- NPC_GAS_CLOUD
+37562, 38602, 38760, 38761,
+-- NPC_VOLATILE_OOZE
+37697, 38604, 38758, 38759,
+-- npc_training_dummy
+2673, 2674, 17578, 16111, 24792, 32543, 32546, 32547, 32542, 32545, 30527, 31143, 31144, 31146, 32541, 32666, 32667,
+-- npc_tournament_training_dummy
+33229, 33243, 33272,
+-- npc_ice_tomb
+36980, 38320, 38321, 38322
+);
diff --git a/sql/updates/world/2016_02_06_03_world.sql b/sql/updates/world/2016_02_06_03_world.sql
new file mode 100644
index 00000000000..85f8d3c6ae7
--- /dev/null
+++ b/sql/updates/world/2016_02_06_03_world.sql
@@ -0,0 +1,6 @@
+--
+-- Warsong Recruitment Officer gives dublicate quest
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND (`SourceEntry`=11586 OR `SourceEntry`=11585);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionValue1`,`Comment`) VALUES
+(19, 11586, 14, 10172, "Accept quest 11586 - Quest 10172 needs to be incomplete"),
+(19, 11585, 8, 10172, "Accept quest 11585 - Quest 10172 needs to be rewarded");
diff --git a/sql/updates/world/2016_02_06_04_world.sql b/sql/updates/world/2016_02_06_04_world.sql
new file mode 100644
index 00000000000..188b3b5f2a7
--- /dev/null
+++ b/sql/updates/world/2016_02_06_04_world.sql
@@ -0,0 +1,6 @@
+--
+-- Quest: Scalps!
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=52090 AND `ElseGroup`=1;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(17, 0, 52090, 0, 1, 31, 1, 3, 28465, 0, 0, 173, 0, '', 'Item 38731 "Ahunae\'s Knife" targets 28465 "Heb\'Drakkar Striker'),
+(17, 0, 52090, 0, 1, 36, 1, 0, 0, 0, 1, 173, 0, '', 'Item 38731 "Ahunae\'s Knife" targets 28465 "Heb\'Drakkar Striker');
diff --git a/sql/updates/world/2016_02_06_05_world.sql b/sql/updates/world/2016_02_06_05_world.sql
new file mode 100644
index 00000000000..823a8abaca6
--- /dev/null
+++ b/sql/updates/world/2016_02_06_05_world.sql
@@ -0,0 +1,20 @@
+--
+-- Silithus Stone spells should ignore LoS
+DELETE FROM `disables` WHERE `sourceType`=0 AND `entry` IN (24803,24745,24747,24757,24759,24761,24762,24766,24769,24771,24773,24785,24787,24791,24792,24793);
+INSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES
+(0, 24803, 64, '', '', 'Abyssal Punishment ignores LoS'),
+(0, 24745, 64, '', '', 'Summon Templar, Trigger ignores LoS'),
+(0, 24747, 64, '', '', 'Summon Templar Fire, Trigger ignores LoS'),
+(0, 24757, 64, '', '', 'Summon Templar Air, Trigger ignores LoS'),
+(0, 24759, 64, '', '', 'Summon Templar Earth, Trigger ignores LoS'),
+(0, 24761, 64, '', '', 'Summon Templar Water, Trigger ignores LoS'),
+(0, 24762, 64, '', '', 'Summon Duke, Trigger ignores LoS'),
+(0, 24766, 64, '', '', 'Summon Duke Fire, Trigger ignores LoS'),
+(0, 24769, 64, '', '', 'Summon Duke Air, Trigger ignores LoS'),
+(0, 24771, 64, '', '', 'Summon Duke Earth, Trigger ignores LoS'),
+(0, 24773, 64, '', '', 'Summon Duke Water, Trigger ignores LoS'),
+(0, 24785, 64, '', '', 'Summon Royal, Trigger ignores LoS'),
+(0, 24787, 64, '', '', 'Summon Royal Fire, Trigger ignores LoS'),
+(0, 24791, 64, '', '', 'Summon Royal Air, Trigger ignores LoS'),
+(0, 24792, 64, '', '', 'Summon Royal Earth, Trigger ignores LoS'),
+(0, 24793, 64, '', '', 'Summon Royal Water, Trigger ignores LoS');
diff --git a/sql/updates/world/2016_02_06_06_world.sql b/sql/updates/world/2016_02_06_06_world.sql
new file mode 100644
index 00000000000..37df2ef0868
--- /dev/null
+++ b/sql/updates/world/2016_02_06_06_world.sql
@@ -0,0 +1,7 @@
+--
+-- Defias Gunpowder SAI
+SET @ENTRY := 17155;
+UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=1;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,1,0,0,70,0,100,0,2,0,0,0,12,4417,3,120000,1,0,0,8,0,0,0,-123.77,-613.586,14.126,6.035,"Defias Gunpowder - On Gossip Hello - Summon Creature 'Defias Taskmaster' (No Repeat)");
diff --git a/sql/updates/world/2016_02_06_07_world.sql b/sql/updates/world/2016_02_06_07_world.sql
new file mode 100644
index 00000000000..c5d6434321a
--- /dev/null
+++ b/sql/updates/world/2016_02_06_07_world.sql
@@ -0,0 +1,8 @@
+--
+-- Pustulating Horror SAI
+SET @ENTRY := 10404;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,0,0,0,100,0,2000,6000,10000,10000,11,71089,0,0,0,0,0,5,0,0,0,0,0,0,0,"Pustulating Horror - In Combat - Cast 'Bubbling Pus'"),
+(@ENTRY,0,1,0,2,0,100,0,0,10,60000,60000,11,71088,0,0,0,0,0,1,0,0,0,0,0,0,0,"Pustulating Horror - Between 0-10% Health - Cast 'Blight Bomb'");
diff --git a/sql/updates/world/2016_02_06_08_world.sql b/sql/updates/world/2016_02_06_08_world.sql
new file mode 100644
index 00000000000..f0855ba348a
--- /dev/null
+++ b/sql/updates/world/2016_02_06_08_world.sql
@@ -0,0 +1,9 @@
+--
+-- DB/Creature: Koren - Gossipoptions
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=7435;
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES
+(7435, 0, 1, 'I\'m in need of your skill as a blacksmith, Koren.', 14188, 3, 128, 0, 0, 0, 0, NULL, 0);
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceID` = 15 AND `SourceGroup` = 7435;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(15, 7435, 0, 0, 0, 5, 0, 967, 224, 0, 0, 0, 0, '', 'Koren - Show Vendor option if Honored Exalted with Violet Eye');
diff --git a/sql/updates/world/2016_02_06_09_world.sql b/sql/updates/world/2016_02_06_09_world.sql
new file mode 100644
index 00000000000..bf92b89e1c2
--- /dev/null
+++ b/sql/updates/world/2016_02_06_09_world.sql
@@ -0,0 +1,3 @@
+--
+-- Fiery Payback mage talent
+DELETE FROM `spell_ranks` WHERE `first_spell_id`=44440;
diff --git a/sql/updates/world/2016_02_06_10_world.sql b/sql/updates/world/2016_02_06_10_world.sql
new file mode 100644
index 00000000000..291bd0bb333
--- /dev/null
+++ b/sql/updates/world/2016_02_06_10_world.sql
@@ -0,0 +1,19 @@
+
+-- Estelle Gendry - Gossip
+DELETE FROM `gossip_menu_option` WHERE (`menu_id`=161 AND `id`=0);
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES
+(161, 0, 0, 'I need another set of thieves'' tools.', 2643, 1, 1, 0, 0, 0, 0, NULL, 0);
+
+-- Estelle Gendry SAI
+SET @ENTRY := 6566;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,1,62,0,100,0,161,0,0,0,11,9949,2,0,0,0,0,7,0,0,0,0,0,0,0,"Estelle Gendry - On Gossip Option 0 Selected - Invoker Cast 'Thieves' Tool Rack Conjure'"),
+(@ENTRY,0,1,0,61,0,100,0,161,0,0,0,72,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Estelle Gendry - On Gossip Option 0 Selected - Close Gossip");
+
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=161 AND `SourceEntry`=0;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`, `NegativeCondition`) VALUES
+(15,161,0,0,0,9,0,1999,0,0,0,"","Show Gossip if player has Quest: Tools of the Trade", 0),
+(15,161,0,0,0,2,0,5060,1,1,0,"","Show Gossip if player has not item: Thieves' Tools", 1);
diff --git a/sql/updates/world/2016_02_06_11_world.sql b/sql/updates/world/2016_02_06_11_world.sql
new file mode 100644
index 00000000000..cea352fec36
--- /dev/null
+++ b/sql/updates/world/2016_02_06_11_world.sql
@@ -0,0 +1,2 @@
+-- Implement Pandaran Monk's pet abilitys
+UPDATE creature_template SET ScriptName = "npc_pandaren_monk" WHERE entry = 36911;
diff --git a/sql/updates/world/2016_02_06_12_world.sql b/sql/updates/world/2016_02_06_12_world.sql
new file mode 100644
index 00000000000..df550156bc1
--- /dev/null
+++ b/sql/updates/world/2016_02_06_12_world.sql
@@ -0,0 +1,4 @@
+--
+-- DB/Conditions: Meridith the Mermaiden
+UPDATE `conditions` SET `NegativeCondition`=0 WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=6658 AND `SourceEntry`=7916;
+UPDATE `conditions` SET `NegativeCondition`=1 WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=6658 AND `SourceEntry`=7917;
diff --git a/sql/updates/world/2016_02_06_13_world_335.sql b/sql/updates/world/2016_02_06_13_world_335.sql
new file mode 100644
index 00000000000..22bd5596d98
--- /dev/null
+++ b/sql/updates/world/2016_02_06_13_world_335.sql
@@ -0,0 +1,3 @@
+--
+-- DB/Quest: Avenging The Fallen
+UPDATE `quest_template_addon` SET `SpecialFlags`=0 WHERE `Id`=7830;
diff --git a/sql/updates/world/2016_02_06_14_world.sql b/sql/updates/world/2016_02_06_14_world.sql
new file mode 100644
index 00000000000..7bf05b61c71
--- /dev/null
+++ b/sql/updates/world/2016_02_06_14_world.sql
@@ -0,0 +1,3 @@
+--
+-- DB/Quest: Venomhide Eggs
+UPDATE `quest_template_addon` SET `PrevQuestID`=13850 WHERE `ID`=13887;
diff --git a/sql/updates/world/2016_02_07_00_world.sql b/sql/updates/world/2016_02_07_00_world.sql
new file mode 100644
index 00000000000..5a49f8fd310
--- /dev/null
+++ b/sql/updates/world/2016_02_07_00_world.sql
@@ -0,0 +1,5 @@
+--
+-- Creature: Injured Goblin Miner conditional gossip
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceID` = 15 AND `SourceGroup` = 9859 AND `SourceEntry` = 0;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,9859,0,0,0,9,0,12832,0,0,0,0,'','Injured Goblin Miner - Show gossip option 0 if player has taken quest ID 12832');
diff --git a/sql/updates/world/2016_02_07_01_world_335.sql b/sql/updates/world/2016_02_07_01_world_335.sql
new file mode 100644
index 00000000000..5f1d5f4280e
--- /dev/null
+++ b/sql/updates/world/2016_02_07_01_world_335.sql
@@ -0,0 +1,8 @@
+-- DB/Item: "Deprecated BKP "Impact" Shot"
+-- Restore correct values for bullet item "Deprecated BKP "Impact" Shot":
+UPDATE `item_template` SET `name`= 'Deprecated BKP "Impact" Shot', `Quality`= 1,
+ `Flags`= 16, `FlagsExtra`= 8192, `BuyCount`= 200, `BuyPrice`= 450, `SellPrice`= 0,
+ `ItemLevel`= 35, `RequiredLevel`= 30, `stackable`= 1000, `StatsCount`= 0,
+ `stat_type1`= 0, `stat_value1`= 0, `stat_type2`= 0, `stat_value2`= 0, `dmg_min1`= 9,
+ `dmg_max1`= 9, `armor`= 0, `delay`= 3000, `bonding`= 0, `MaxDurability`= 0, `BagFamily`= 2,
+ `RequiredDisenchantSkill`= -1, `DisenchantID`= 0 WHERE `entry`= 3034;
diff --git a/sql/updates/world/2016_02_07_02_world_335.sql b/sql/updates/world/2016_02_07_02_world_335.sql
new file mode 100644
index 00000000000..ea4608f3a6b
--- /dev/null
+++ b/sql/updates/world/2016_02_07_02_world_335.sql
@@ -0,0 +1,13 @@
+--
+-- DB/Quest: Escape Through Force
+DELETE FROM `smart_scripts` WHERE `entryorguid`=3692 AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(3692, 0, 0, 1, 19, 0, 100, 0, 994, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Volcor - On Quest \'Escape Through Force\' Taken - Store Targetlist'),
+(3692, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Volcor - On Quest \'Escape Through Force\' Taken - Set Unit Flags'),
+(3692, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 369200, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Volcor - On Quest \'Escape Through Force\' Taken - Run Script'),
+(3692, 0, 3, 4, 19, 0, 100, 0, 995, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Volcor - On Quest \'Escape Through Stealth\' Taken - Store Targetlist'),
+(3692, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Volcor - On Quest \'Escape Through Stealth\' Taken - Set Unit Flags'),
+(3692, 0, 5, 0, 61, 0, 100, 0, 995, 0, 0, 0, 80, 369201, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Volcor - On Quest \'Escape Through Stealth\' Taken - Run Script'),
+(3692, 0, 6, 0, 40, 0, 100, 0, 15, 3692, 0, 0, 41, 5000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Volcor - On Waypoint 15 Reached - Despawn 5 Seconds');
+
+UPDATE `smart_scripts` SET `target_type`=12, `target_param1`=1 WHERE `entryorguid` IN(369200,369201) AND `source_type`=9 AND `id`IN(2,3);
diff --git a/sql/updates/world/2016_02_07_03_world_335.sql b/sql/updates/world/2016_02_07_03_world_335.sql
new file mode 100644
index 00000000000..8322ff59c4c
--- /dev/null
+++ b/sql/updates/world/2016_02_07_03_world_335.sql
@@ -0,0 +1,65 @@
+--
+-- Sorrow Wing (3.3.5) loot items
+DELETE FROM `creature_loot_template` WHERE `Entry`= 5928;
+INSERT INTO `creature_loot_template` (`Entry`,`Item`,`Reference`,`Chance`,`QuestRequired`,`LootMode`,`GroupID`,`MinCount`,`MaxCount`,`Comment`) VALUES
+(5928, 5808,0, 50, 1,1,0,1,1,'Pridewing Venom Sac (Quest item)'),
+(5928, 5137,0, 0.8, 0,1,0,1,2,'Bright Eyeball'),
+(5928, 1686,0, 10, 0,1,0,1,2,'Bristly Whisker'),
+(5928, 7073,0, 88, 0,1,0,1,2,'Broken Fang'),
+(5928, 3381,0,0.19, 0,1,0,1,1,'Cross-Stitched Bracers'),
+(5928, 1783,0, 0.3, 0,1,0,1,1,'Cross-Stitched Gloves'),
+(5928, 2785,0,0.16, 0,1,0,1,1,'Stiff Recurve Bow'),
+(5928, 2221,0, 0.2, 0,1,0,1,1,'Targe Shield'),
+(5928, 1808,0,0.16, 0,1,0,1,1,'Tough Leather Pants'),
+(5928, 5136,0, 0.8, 0,1,0,1,2,'Torn Furry Ear'),
+(5928, 9837,0, 0.9, 0,1,0,1,1,'Banded Bracers'),
+(5928, 9838,0, 1.3, 0,1,0,1,1,'Banded Cloak'),
+(5928, 9839,0, 0.8, 0,1,0,1,1,'Banded Gauntlets'),
+(5928, 9840,0, 0.3, 0,1,0,1,1,'Banded Girdle'),
+(5928, 6592,0, 1.2, 0,1,0,1,1,'Battleforge Armor'),
+(5928, 6590,0, 1.4, 0,1,0,1,1,'Battleforge Boots'),
+(5928, 6595,0, 3, 0,1,0,1,1,'Battleforge Gauntlets'),
+(5928, 6594,0, 3, 0,1,0,1,1,'Battleforge Girdle'),
+(5928, 6596,0, 4, 0,1,0,1,1,'Battleforge Legguards'),
+(5928, 6597,0, 3, 0,1,0,1,1,'Battleforge Shoulderguards'),
+(5928, 6591,0, 3, 0,1,0,1,1,'Battleforge Wristguards'),
+(5928, 6600,0, 3, 0,1,0,1,1,'Dervish Belt'),
+(5928, 6601,0, 5, 0,1,0,1,1,'Dervish Boots'),
+(5928, 6602,0, 3, 0,1,0,1,1,'Dervish Bracers'),
+(5928, 6605,0, 3, 0,1,0,1,1,'Dervish Gloves'),
+(5928, 7415,0, 1.5, 0,1,0,1,1,'Dervish Spaulders'),
+(5928, 6607,0, 1.3, 0,1,0,1,1,'Dervish Leggings'),
+(5928, 6603,0, 2, 0,1,0,1,1,'Dervish Tunic'),
+(5928,10404,0, 1.6, 0,1,0,1,1,'Durable Belt'),
+(5928, 9820,0, 0.4, 0,1,0,1,1,'Durable Boots'),
+(5928, 9821,0, 1.1, 0,1,0,1,1,'Durable Bracers'),
+(5928, 9822,0, 1.3, 0,1,0,1,1,'Durable Cape'),
+(5928, 9823,0, 0.5, 0,1,0,1,1,'Durable Gloves'),
+(5928, 7355,0, 0.8, 0,1,0,1,1,'Elders Bracers'),
+(5928, 7356,0, 0.9, 0,1,0,1,1,'Elders Cloak'),
+(5928, 7370,0, 0.7, 0,1,0,1,1,'Elders Sash'),
+(5928, 4715,0, 6, 0,1,0,1,1,'Emblazoned Cloak'),
+(5928, 7410,0, 0.7, 0,1,0,1,1,'Infiltrator Bracers'),
+(5928, 7411,0, 0.6, 0,1,0,1,1,'Infiltrator Cloak'),
+(5928, 9796,0, 3, 0,1,0,1,1,'Ivycloth Mantle'),
+(5928, 9797,0, 3, 0,1,0,1,1,'Ivycloth Pants'),
+(5928, 9791,0, 1.3, 0,1,0,1,1,'Ivycloth Tunic'),
+(5928, 7416,0, 0.6, 0,1,0,1,1,'Phalanx Bracers'),
+(5928, 7419,0, 1.1, 0,1,0,1,1,'Phalanx Cloak'),
+(5928, 6612,0, 3, 0,1,0,1,1,'Sages Boots'),
+(5928, 6613,0, 4, 0,1,0,1,1,'Sages Bracers'),
+(5928,10288,0, 0.8, 0,1,0,1,1,'Sages Circlet'),
+(5928, 6614,0, 4, 0,1,0,1,1,'Sages Cloak'),
+(5928, 6615,0, 0.9, 0,1,0,1,1,'Sages Gloves'),
+(5928, 6617,0, 1.2, 0,1,0,1,1,'Sages Mantle'),
+(5928, 6611,0, 2, 0,1,0,1,1,'Sages Sash'),
+(5928, 9831,0, 1.8, 0,1,0,1,1,'Scaled Cloak'),
+(5928, 9827,0, 0.8, 0,1,0,1,1,'Scaled Leather Belt'),
+(5928, 9828,0, 0.9, 0,1,0,1,1,'Scaled Leather Boots'),
+(5928, 9829,0, 1.6, 0,1,0,1,1,'Scaled Leather Bracers'),
+(5928, 9832,0, 0.9, 0,1,0,1,1,'Scaled Leather Gloves'),
+(5928, 9806,0, 3, 0,1,0,1,1,'Superior Gloves'),
+(5928, 9808,0, 3, 0,1,0,1,1,'Superior Leggings'),
+(5928, 9807,0, 3, 0,1,0,1,1,'Superior Shoulders'),
+(5928, 9809,0, 4, 0,1,0,1,1,'Superior Tunic'),
+(5928,15539,0,0.03, 0,1,0,1,1,'Wicked Chain Waistband');
diff --git a/sql/updates/world/2016_02_07_04_world.sql b/sql/updates/world/2016_02_07_04_world.sql
new file mode 100644
index 00000000000..3a3a7a393d7
--- /dev/null
+++ b/sql/updates/world/2016_02_07_04_world.sql
@@ -0,0 +1,67 @@
+-- DB/Quest: The Collapse
+DELETE FROM `event_scripts` WHERE `id`=16929;
+INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) VALUES
+(16929, 10, 8, 25742, 0, 0, 0, 0, 0, 0),
+(16929, 3, 10, 25742, 360000, 0, 3517.290039, 4538.782715, -12.983689, 4.428759),
+(16929, 7, 10, 25629, 360000, 0, 3492.105469, 4478.011719, -12.997340, 0.210166),
+(16929, 7, 10, 25652, 360000, 0, 3507.666260, 4509.300293, -14.792936, 0.945820),
+(16929, 7, 10, 25652, 360000, 0, 3505.954834, 4506.928223, -14.817587, 0.945820),
+(16929, 7, 10, 25652, 360000, 0, 3505.296631, 4506.016113, -14.837238, 0.945820),
+(16929, 7, 10, 25652, 360000, 0, 3504.330322, 4504.676758, -14.837238, 0.945820);
+
+-- Alluvius SAI
+SET @ENTRY := 25742;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,0,54,0,100,0,0,0,0,0,53,1,25742,0,0,0,0,1,0,0,0,0,0,0,0,"Alluvius - On Just Summoned - Start Waypoint"),
+(@ENTRY,0,1,0,40,0,100,0,1,25742,0,0,80,@ENTRY*100+00,2,0,0,0,0,1,0,0,0,0,0,0,0,"Alluvius - On Waypoint 1 Reached - Run Script");
+
+DELETE FROM `waypoints` WHERE `entry`=25742;
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
+(25742, 1, 3511.336426, 4519.295898, -11.937509, 'Alluvius');
+
+-- Actionlist SAI
+SET @ENTRY := 2574200;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,9,0,0,0,0,100,0,5000,5000,5000,5000,45,1,1,0,0,0,0,9,25652,0,25,0,0,0,0,"Alluvius - On Script - Set Data 1 1"),
+(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,5,36,0,0,0,0,0,1,0,0,0,0,0,0,0,"Alluvius - On Script - Play Emote 36"),
+(@ENTRY,9,2,0,0,0,100,0,10000,10000,10000,10000,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Alluvius - On Script - Despawn Instant");
+
+-- Nerub'ar Scarab SAI
+SET @ENTRY := 25652;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,0,38,0,100,0,1,1,0,0,53,0,25652,0,0,0,0,1,0,0,0,0,0,0,0,"Nerub'ar Scarab - On Data Set 1 1 - Start Waypoint"),
+(@ENTRY,0,1,0,40,0,100,0,6,25652,0,0,41,1000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Nerub'ar Scarab - On Waypoint 6 Reached - Despawn In 1000 ms");
+
+DELETE FROM `waypoints` WHERE `entry`=25652;
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
+(25652, 1, 3509.71, 4510.5, -14.6752, 'Nerub\'ar Scarab'),
+(25652, 2, 3515.16, 4512.57, -13.4052, 'Nerub\'ar Scarab'),
+(25652, 3, 3520.58, 4511.77, -12.5632, 'Nerub\'ar Scarab'),
+(25652, 4, 3530.14, 4507.88, -12.9948, 'Nerub\'ar Scarab'),
+(25652, 5, 3536.34, 4508.6, -12.9948, 'Nerub\'ar Scarab'),
+(25652, 6, 3553.48, 4510.25, -12.9948, 'Nerub\'ar Scarab');
+
+-- Lord Kryxix SAI
+SET @ENTRY := 25629;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,1,54,0,100,0,0,0,0,0,53,1,25629,0,0,0,2,1,0,0,0,0,0,0,0,"Lord Kryxix - On Just Summoned - Start Waypoint"),
+(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lord Kryxix - On Just Summoned - Say Line 0"),
+(@ENTRY,0,2,0,40,0,100,0,4,25629,0,0,49,0,0,0,0,0,0,21,80,0,0,0,0,0,0,"Lord Kryxix - On Waypoint 4 Reached - Start Attacking");
+
+DELETE FROM `waypoints` WHERE `entry`=25629;
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
+(25629, 1, 3529.33, 4490.55, -12.9951, 'Lord Kryxix'),
+(25629, 2, 3534.51, 4509.94, -12.9951, 'Lord Kryxix'),
+(25629, 3, 3533.52, 4527.86, -12.9951, 'Lord Kryxix'),
+(25629, 4, 3512.91, 4539.59, -12.987, 'Lord Kryxix');
+
+DELETE FROM `creature_text` WHERE `entry`=25629;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextId`) VALUES
+(25629, 0, 0, 'Foolish elemental slave! You an your master will pay for your medding!', 14, 0, 100, 0, 0, 0, 'Lord Kryxix', 24956);
diff --git a/sql/updates/world/2016_02_07_05_world_335.sql b/sql/updates/world/2016_02_07_05_world_335.sql
new file mode 100644
index 00000000000..794b3d80411
--- /dev/null
+++ b/sql/updates/world/2016_02_07_05_world_335.sql
@@ -0,0 +1,4 @@
+--
+-- Wotlk armor value
+UPDATE `creature_classlevelstats` SET `basearmor`=10643 WHERE `level`=83 AND `class`=1;
+UPDATE `creature_classlevelstats` SET `basearmor`=10643 WHERE `level`=83 AND `class`=2;
diff --git a/sql/updates/world/2016_02_07_06_world.sql b/sql/updates/world/2016_02_07_06_world.sql
new file mode 100644
index 00000000000..31ecf826660
--- /dev/null
+++ b/sql/updates/world/2016_02_07_06_world.sql
@@ -0,0 +1,71 @@
+--
+-- Diremaul North Rndmemotes
+-- Gordok Mauler SAI
+SET @ENTRY := 11442;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=4;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,4,0,1,0,100,0,3000,3000,5000,10000,10,1,11,391,0,0,0,1,0,0,0,0,0,0,0,"Gordok Mauler - Out of Combat - Play Random Emote (1, 11, 391)");
+
+-- Gordok Mage-Lord SAI
+SET @ENTRY := 11444;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=7;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,7,0,1,0,100,0,3000,3000,5000,10000,10,1,11,391,0,0,0,1,0,0,0,0,0,0,0,"Gordok Mage Lord - Out of Combat - Play Random Emote (1, 11, 391)");
+
+-- Gordok Brute SAI
+SET @ENTRY := 11441;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=6;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,6,0,1,0,100,0,3000,3000,5000,10000,10,1,11,391,0,0,0,1,0,0,0,0,0,0,0,"Gordok Brute - Out of Combat - Play Random Emote (1, 11, 391)");
+
+-- Stomper Kreeg SAI
+SET @ENTRY := 14322;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=6;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,6,0,1,0,100,0,1000,1000,20000,20000,80,@ENTRY*100+00,2,0,0,0,0,1,0,0,0,0,0,0,0,"Stomper Kreeg - Out of Combat - Run Script");
+-- Actionlist SAI
+SET @ENTRY := 1432200;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,9,0,0,0,0,100,0,1000,1000,0,0,90,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stomper Kreeg - On Script - Set Flag Standstate Sleep"),
+(@ENTRY,9,1,0,0,0,100,0,8000,8000,0,0,91,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stomper Kreeg - On Script - Remove Flag Standstate Sleep"),
+(@ENTRY,9,2,0,0,0,100,0,2000,2000,0,0,17,10,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stomper Kreeg - On Script - Set Emote State 10");
+
+-- Gordok Bushwacker SAI
+SET @ENTRY := 14351;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=3;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,3,0,1,0,100,0,3000,3000,5000,10000,10,1,11,391,0,0,0,1,0,0,0,0,0,0,0,"Gordok Bushwacker - Out of Combat - Play Random Emote (1, 11, 391)");
+
+-- Gordok Reaver SAI
+SET @ENTRY := 11450;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=3;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,3,0,1,0,100,0,3000,3000,5000,10000,10,1,11,391,0,0,0,1,0,0,0,0,0,0,0,"Gordok Reaver - Out of Combat - Play Random Emote (1, 11, 391)");
+
+-- Gordok Warlock SAI
+SET @ENTRY := 11448;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=7;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,7,0,1,0,100,0,3000,3000,5000,10000,10,1,11,391,0,0,0,1,0,0,0,0,0,0,0,"Gordok Warlock - Out of Combat - Play Random Emote (1, 11, 391)");
+
+-- Gordok Spirit SAI
+SET @ENTRY := 11446;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,0,1,0,100,0,3000,3000,5000,10000,10,1,11,391,0,0,0,1,0,0,0,0,0,0,0,"Gordok Spirit - Out of Combat - Play Random Emote (1, 11, 397)");
+
+-- Gordok Captain SAI
+SET @ENTRY := 11445;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=4;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,4,0,1,0,100,0,3000,3000,5000,10000,10,1,11,391,0,0,0,1,0,0,0,0,0,0,0,"Gordok Captain - Out of Combat - Play Random Emote (1, 11, 397)");
diff --git a/sql/updates/world/2016_02_07_07_world_335.sql b/sql/updates/world/2016_02_07_07_world_335.sql
new file mode 100644
index 00000000000..af323a47bda
--- /dev/null
+++ b/sql/updates/world/2016_02_07_07_world_335.sql
@@ -0,0 +1,6 @@
+--
+-- Remove skinning_loot_template 100008 from non-skinnable beasts:
+UPDATE `creature_template` SET `skinloot`= 0 WHERE `skinloot`= 100008 AND `entry` NOT IN (1042,1043,1069);
+
+UPDATE `skinning_loot_template` SET `Comment`='Light Leather' WHERE `Item`= 2318 AND `Entry` IN (3098,3124);
+UPDATE `skinning_loot_template` SET `Comment`='Ruined Leather Scraps' WHERE `Item`= 2934 AND `Entry` IN (3098,3124);
diff --git a/sql/updates/world/2016_02_07_08_world_335.sql b/sql/updates/world/2016_02_07_08_world_335.sql
new file mode 100644
index 00000000000..2b78a317f95
--- /dev/null
+++ b/sql/updates/world/2016_02_07_08_world_335.sql
@@ -0,0 +1,72 @@
+-- DB/Quest: Urok Doomhowl - Summonscript
+SET @MAGUS = 10602;
+SET @ENFORCER = 10601;
+SET @UROK = 10584;
+SET @OGUID = 21202;
+
+UPDATE `creature_template` SET `faction`=40 WHERE `entry`IN(10601,10602);
+
+
+DELETE FROM `gameobject` WHERE `id` IN(175571,175584);
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(@OGUID+0, 175571, 229, 3, 1, -47.90947, -369.0891, 51.54253, 1.378809, 0, 0, 0, 1, -1, 255, 1), -- 175571 (Area: 0)
+(@OGUID+1, 175571, 229, 3, 1, -27.88039, -385.8911, 48.50668, 3.700105, 0, 0, 0, 1, -1, 255, 1), -- 175571 (Area: 0)
+(@OGUID+2, 175571, 229, 3, 1, -13.72754, -384.8161, 48.97457, 3.68265, 0, 0, 0, 1, -1, 255, 1), -- 175571 (Area: 0)
+(@OGUID+3, 175571, 229, 3, 1, -12.36894, -376.4748, 49.335, 5.044002, 0, 0, 0, 1, -1, 255, 1), -- 175571 (Area: 0)
+(@OGUID+4, 175571, 229, 3, 1, -24.88243, -369.6189, 49.70592, 3.403396, 0, 0, 0, 1, -1, 255, 1), -- 175571 (Area: 0)
+(@OGUID+5, 175584, 229, 3, 1, -14.3415, -395.7287, 48.53813, 2.862335, 0, 0, 0, 1, -1, 255, 0), -- 175584 (Area: 0)
+(@OGUID+6, 175571, 229, 3, 1, -34.54366, -370.2325, 50.3396, 5.358161, 0, 0, 0, 1, -1, 255, 1); -- 175571 (Area: 0)
+
+UPDATE `gameobject` SET `position_y`=-395.729 WHERE `guid`=99791;
+
+DELETE FROM `event_scripts` WHERE `id`=4845;
+INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) VALUES
+(4845, 0, 9, @OGUID+0, 66, 0, 0, 0, 0, 0),
+(4845, 0, 9, @OGUID+1, 66, 0, 0, 0, 0, 0),
+(4845, 0, 9, @OGUID+2, 66, 0, 0, 0, 0, 0),
+(4845, 0, 9, @OGUID+3, 66, 0, 0, 0, 0, 0),
+(4845, 0, 9, @OGUID+4, 66, 0, 0, 0, 0, 0),
+(4845, 0, 9, @OGUID+5, 66, 0, 0, 0, 0, 0),
+(4845, 0, 9, @OGUID+6, 66, 0, 0, 0, 0, 0),
+
+(4845, 5, 10, @MAGUS, 900000, 0, -33.04, -385.57, 48.60, 5.98),
+(4845, 5, 10, @ENFORCER, 900000, 0, -16.12, -376.99, 49.20, 4.89),
+(4845, 5, 10, @ENFORCER, 900000, 0, -25.13, -376.60, 48.94, 5.17),
+(4845, 13, 10, @MAGUS, 900000, 0, -14.93, -381.99, 49.04, 4.70),
+(4845, 28, 10, @MAGUS, 900000, 0, -35.47, -371.36, 50.22, 4.79),
+(4845, 28, 10, @ENFORCER, 900000, 0, -47.54, -368.11, 51.67, 5.70),
+(4845, 42, 10, @MAGUS, 900000, 0, -33.04, -385.57, 48.60, 5.98),
+(4845, 42, 10, @MAGUS, 900000, 0, -14.58, -375.16, 49.31, 4.73),
+(4845, 42, 10, @ENFORCER, 900000, 0, -24.91, -376.41, 48.95, 4.67),
+(4845, 58, 10, @MAGUS, 900000, 0, -47.54, -368.11, 51.67, 5.70),
+(4845, 66, 10, @UROK, 900000, 0, -23.97, -391.89, 48.58, 1.68);
+
+-- Urok Ogre Magus SAI
+SET @ENTRY := 10602;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,0,0,0,100,2,0,0,3400,4700,11,15979,64,0,0,0,0,2,0,0,0,0,0,0,0,"Urok Ogre Magus - In Combat - Cast 'Arcane Bolt' (Normal Dungeon)"),
+(@ENTRY,0,1,2,2,0,100,3,0,15,0,0,25,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Urok Ogre Magus - Between 0-15% Health - Flee For Assist (No Repeat) (Normal Dungeon)"),
+(@ENTRY,0,2,0,61,0,100,3,0,15,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Urok Ogre Magus - Between 0-15% Health - Say Line 0 (No Repeat) (Normal Dungeon)"),
+(@ENTRY,0,3,0,16,0,100,2,6742,30,10000,15000,11,6742,0,0,0,0,0,7,0,0,0,0,0,0,0,"Urok Ogre Magus - On Friendly Unit Missing Buff 'Bloodlust' - Cast 'Bloodlust' (Normal Dungeon)"),
+(@ENTRY,0,4,0,0,0,100,2,3000,4000,5000,8000,11,13747,1,0,0,0,0,2,0,0,0,0,0,0,0,"Urok Ogre Magus - In Combat - Cast 'Slow' (Normal Dungeon)"),
+(@ENTRY,0,5,0,54,0,100,1,0,0,0,0,11,64195,2,0,0,0,0,1,0,0,0,0,0,0,0,"Urok Ogre Magus - On Just Summoned - Cast 'Simple Teleport' (No Repeat)"),
+(@ENTRY,0,6,0,54,0,100,1,0,0,0,0,49,0,0,0,0,0,0,21,50,0,0,0,0,0,0,"Urok Ogre Magus - On Just Summoned - Start Attacking (No Repeat)");
+
+-- NPC talk text insert
+SET @ENTRY := 10602;
+DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES
+(@ENTRY,0,0, '%s attempts to run away in fear!',16,0,100,0,0,0, 'combat Flee', 1150);
+
+-- Urok Enforcer SAI
+SET @ENTRY := 10601;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,0,0,0,100,2,3000,5000,3000,6000,11,16856,2,0,0,0,0,2,0,0,0,0,0,0,0,"Urok Enforcer - In Combat - Cast 'Mortal Strike' (Normal Dungeon)"),
+(@ENTRY,0,1,0,0,0,100,1,0,1000,6000,7000,11,11084,2,0,0,0,0,2,0,0,0,0,0,0,0,"Urok Enforcer - In Combat - Cast 'Shock' (No Repeat)"),
+(@ENTRY,0,2,0,0,0,100,2,8000,8000,12000,17000,11,14516,2,0,0,0,0,2,0,0,0,0,0,0,0,"Urok Enforcer - In Combat - Cast 'Strike' (Normal Dungeon)"),
+(@ENTRY,0,3,0,54,0,100,1,0,0,0,0,11,64195,2,0,0,0,0,1,0,0,0,0,0,0,0,"Urok Enforcer - On Just Summoned - Cast 'Simple Teleport' (No Repeat)"),
+(@ENTRY,0,4,0,54,0,100,1,0,0,0,0,49,0,0,0,0,0,0,21,50,0,0,0,0,0,0,"Urok Enforcer - On Just Summoned - Start Attacking (No Repeat)");
diff --git a/sql/updates/world/2016_02_07_09_world.sql b/sql/updates/world/2016_02_07_09_world.sql
new file mode 100644
index 00000000000..8057534fbb8
--- /dev/null
+++ b/sql/updates/world/2016_02_07_09_world.sql
@@ -0,0 +1,6 @@
+--
+-- Solace of the Defeated/Solace of the Fallen (Normal/Heroic) proc fix
+DELETE FROM `spell_proc_event` WHERE `entry` IN (67698,67752);
+INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES
+(67698, 0, 0, 0, 0, 0, 0, 65536, 0, 0, 0),
+(67752, 0, 0, 0, 0, 0, 0, 65536, 0, 0, 0);
diff --git a/sql/updates/world/2016_02_07_10_world.sql b/sql/updates/world/2016_02_07_10_world.sql
new file mode 100644
index 00000000000..c2e59c15d9c
--- /dev/null
+++ b/sql/updates/world/2016_02_07_10_world.sql
@@ -0,0 +1,7 @@
+-- DB/Item: Bryntroll, the Bone Arbiter
+UPDATE `item_template` SET `spellcooldown_1`=-1 WHERE `entry`=50415;
+UPDATE `item_template` SET `spellppmRate_1`=2 WHERE `entry` IN (50415,50709);
+DELETE FROM `spell_bonus_data` WHERE `entry` IN (71839,71838);
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+(71839,0,0,0,0,'Drain Life'),
+(71838,0,0,0,0,'Drain Life');
diff --git a/sql/updates/world/2016_02_07_11_world.sql b/sql/updates/world/2016_02_07_11_world.sql
new file mode 100644
index 00000000000..c40b663c205
--- /dev/null
+++ b/sql/updates/world/2016_02_07_11_world.sql
@@ -0,0 +1,29 @@
+--
+-- Razorthorn Ravager SAI
+SET @ENTRY := 24922;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id` >=3;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,3,4,8,0,100,0,44935,0,0,0,69,0,0,0,0,0,0,20,187073,30,0,0,0,0,0,"Razorthorn Ravager - On Spellhit 'Expose Razorthorn Root' - Move To Closest Gameobject 'Razorthorn Dirt Mound'"),
+(@ENTRY,0,4,5,61,0,100,0,44935,0,0,0,45,1,1,0,0,0,0,20,187073,30,0,0,0,0,0,"Razorthorn Ravager - On Spellhit 'Expose Razorthorn Root' - Set Data 1 1"),
+(@ENTRY,0,5,0,61,0,100,0,44935,0,0,0,80,@ENTRY*100,2,0,0,0,0,1,0,0,0,0,0,0,0,"Razorthorn Ravager - On Spellhit 'Expose Razorthorn Root' - Run Script");
+
+-- Actionlist SAI
+SET @ENTRY := 2492200;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,9,0,0,0,0,100,0,3000,3000,0,0,11,44941,2,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Cast 'Summon Razorthorn Root'");
+
+-- Razorthorn Dirt Mound SAI
+SET @ENTRY := 187073;
+UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=1;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,1,0,0,38,0,100,0,1,1,0,0,80,18707300,2,0,0,0,0,1,0,0,0,0,0,0,0,"Razorthorn Dirt Mound - On Data Set 1 1 - Run Script");
+
+-- Actionlist SAI
+SET @ENTRY := 18707300;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,9,0,0,0,0,100,0,10,10,0,0,44,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Set Phase 2"),
+(@ENTRY,9,1,0,0,0,100,0,120000,120000,0,0,44,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Set Phase 1");
diff --git a/sql/updates/world/2016_02_07_12_world.sql b/sql/updates/world/2016_02_07_12_world.sql
new file mode 100644
index 00000000000..c85265d857d
--- /dev/null
+++ b/sql/updates/world/2016_02_07_12_world.sql
@@ -0,0 +1,29 @@
+-- DB/Quest: Drop It then Rock It!
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (24640, 24015);
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (24640, 24015) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (2464000, 24015*100) AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(24640, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 80, 2464000, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Alliance Banner - just summoned - Action list'),
+(24640, 0, 1, 0, 0, 0, 100, 0, 1000, 1000, 2000, 2000, 19, 2048, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Alliance Banner - IC- remove unit flag'),
+(24640, 0, 2, 0, 1, 0, 100, 0, 1000, 1000, 2000, 2000, 19, 2048, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Alliance Banner - OOC - remove unit flag'),
+(2464000, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Alliance Banner - Action list - Set react passif'),
+(2464000, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Alliance Banner - Action list - Set root'),
+(2464000, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Alliance Banner - Action list - Set health regen off'),
+(2464000, 9, 3, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 12, 24015, 4, 60000, 0, 1, 0, 8, 0, 0, 0, 1483.793091, -5352.790039, 192.023712, 1.431473, 'Alliance Banner - Action list - Summon Winterskorn Defender'),
+(2464000, 9, 4, 0, 0, 0, 100, 0, 20000, 20000, 0, 0, 12, 24015, 4, 60000, 0, 1, 0, 8, 0, 0, 0, 1460.096436, -5342.498535, 195.991714, 0.339768, 'Alliance Banner - Action list - Summon Winterskorn Defender'),
+(2464000, 9, 5, 0, 0, 0, 100, 0, 20000, 20000, 0, 0, 12, 24015, 4, 60000, 0, 1, 0, 8, 0, 0, 0, 1468.549561, -5300.886230, 195.633850, 5.760584, 'Alliance Banner - Action list - Summon Winterskorn Defender'),
+(2464000, 9, 6, 0, 0, 0, 100, 0, 20000, 20000, 0, 0, 11, 44124, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 'Alliance Banner - Action list - Quest Credit'),
+(2464000, 9, 7, 0, 0, 0, 100, 0, 100, 100, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Alliance Banner - Action list - Despawn'),
+
+(24015, 0, 0, 0, 0, 0, 100, 0, 3000, 5000, 5000, 7000, 11, 15496, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Winterskorn Defender - IC - Cast Cleave'),
+(24015, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 10000, 15000, 11, 18812, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Winterskorn Defender - IC - Cast Knockdown'),
+(24015, 0, 2, 0, 54, 0, 100, 0, 0, 0, 0, 0, 80, 24015*100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Winterskorn Defender - Just sumoned - Action list'),
+(24015*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Winterskorn Defender - Action list - Talk'),
+(24015*100, 9, 1, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 1499.201538, -5319.049316, 195.300629, 0.451290, 'Winterskorn Defender - Action list - move to pos');
+
+DELETE FROM `creature_text` WHERE `entry` IN (24015);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
+(24015, 0, 0, 'Your remains will be fed TO the sharks of Daggercap!', 14, 0, 100, 0, 0, 0, 23619, 0, 'Winterskorn Defender'),
+(24015, 0, 1, 'The sacrifices NOW bring themselves TO us? Have you NO sense!?', 14, 0, 100, 0, 0, 0, 23618, 0, 'Winterskorn Defender'),
+(24015, 0, 2, 'You dare challenge Winterskorn?! I will impale you ON your own puny flag!', 14, 0, 100, 0, 0, 0, 23617, 0, 'Winterskorn Defender');
diff --git a/sql/updates/world/2016_02_07_13_world.sql b/sql/updates/world/2016_02_07_13_world.sql
new file mode 100644
index 00000000000..612fef2274d
--- /dev/null
+++ b/sql/updates/world/2016_02_07_13_world.sql
@@ -0,0 +1,413 @@
+DELETE FROM `creature_formations` WHERE `leaderGUID`=81531;
+INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES
+(81531, 81531, 0, 0, 1),
+(81531, 81532, 2, 310, 2),
+(81531, 81530, 2, 40, 2);
+
+-- Pathing for Sul'lithuz Sandcrawler Entry: 8095 'TDB FORMAT'
+SET @NPC := 81531;
+SET @PATH := @NPC * 10;
+UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1843.703,`position_y`=1193.693,`position_z`=9.399462 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '');
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,1843.703,1193.693,9.399462,0,0,0,0,100,0), -- 09:47:28
+(@PATH,2,1853.01,1172.636,11.64427,0,0,0,0,100,0), -- 09:47:34
+(@PATH,3,1866.308,1173.398,9.788191,0,0,0,0,100,0), -- 09:47:39
+(@PATH,4,1872.583,1166.405,9.729328,0,0,0,0,100,0), -- 09:47:46
+(@PATH,5,1871.299,1156.692,10.96628,0,0,0,0,100,0), -- 09:47:47
+(@PATH,6,1871.138,1151.655,11.56361,0,0,0,0,100,0), -- 09:47:52
+(@PATH,7,1868.171,1128.227,15.75623,0,0,0,0,100,0), -- 09:47:54
+(@PATH,8,1867.59,1117.35,10.0786,0,0,0,0,100,0), -- 09:48:03
+(@PATH,9,1867.531,1112.539,9.42872,0,0,0,0,100,0), -- 09:48:08
+(@PATH,10,1869.916,1103.111,9.419256,0,0,0,0,100,0), -- 09:48:11
+(@PATH,11,1885.483,1101.25,12.69302,0,0,0,0,100,0), -- 09:48:15
+(@PATH,12,1895.659,1106.266,13.07423,0,0,0,0,100,0), -- 09:48:20
+(@PATH,13,1899.068,1114.828,11.51437,0,0,0,0,100,0), -- 09:48:24
+(@PATH,14,1897.243,1124.311,9.819095,0,0,0,0,100,0), -- 09:48:27
+(@PATH,15,1895.536,1129.667,9.065989,0,0,0,0,100,0), -- 09:48:32
+(@PATH,16,1892.813,1140.595,9.251789,0,0,0,0,100,0), -- 09:48:36
+(@PATH,17,1895.494,1145.588,9.251789,0,0,0,0,100,0), -- 09:48:38
+(@PATH,18,1912.283,1152.97,9.721882,0,0,0,0,100,0), -- 09:48:42
+(@PATH,19,1918.871,1158.545,10.8794,0,0,0,0,100,0), -- 09:48:45
+(@PATH,20,1920.596,1160.717,11.4007,0,0,0,0,100,0), -- 09:48:49
+(@PATH,21,1918.562,1168.737,10.45978,0,0,0,0,100,0), -- 09:48:51
+(@PATH,22,1911.641,1178.46,9.442093,0,0,0,0,100,0), -- 09:48:55
+(@PATH,23,1909.036,1182.083,9.251789,0,0,0,0,100,0), -- 09:48:59
+(@PATH,24,1902.43,1192.171,9.225698,0,0,0,0,100,0), -- 09:49:02
+(@PATH,25,1901.362,1201.077,9.209784,0,0,0,0,100,0), -- 09:49:06
+(@PATH,26,1904.497,1211.609,9.074608,0,0,0,0,100,0), -- 09:49:10
+(@PATH,27,1909.629,1219.002,9.34004,0,0,0,0,100,0), -- 09:49:13
+(@PATH,28,1893.508,1226.117,9.880462,0,0,0,0,100,0), -- 09:49:16
+(@PATH,29,1882.001,1223.113,9.380271,0,0,0,0,100,0), -- 09:49:20
+(@PATH,30,1874.822,1220.509,9.350756,0,0,0,0,100,0), -- 09:49:27
+(@PATH,31,1857.651,1200.784,9.280435,0,0,0,0,100,0), -- 09:49:33
+(@PATH,32,1856.005,1198.657,9.078081,0,0,0,0,100,0); -- 09:49:37
+-- 0x1C16F41A2007E7C00020100000370E69 .go 1843.703 1193.693 9.399462
+
+DELETE FROM `creature_formations` WHERE `leaderGUID`=81581;
+INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES
+(81581, 81581, 0, 0, 1),
+(81581, 81583, 2, 310, 2),
+(81581, 81582, 2, 40, 2);
+
+-- Pathing for Sul'lithuz Sandcrawler Entry: 8095 'TDB FORMAT'
+SET @NPC := 81581;
+SET @PATH := @NPC * 10;
+UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1675.997,`position_y`=1232.113,`position_z`=8.987229 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '');
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,1675.997,1232.113,8.987229,0,0,0,0,100,0), -- 09:41:26
+(@PATH,2,1664.236,1222.652,9.116917,0,0,0,0,100,0), -- 09:41:35
+(@PATH,3,1652.006,1213.038,9.562586,0,0,0,0,100,0), -- 09:41:42
+(@PATH,4,1637.653,1203.694,9.001921,0,0,0,0,100,0), -- 09:41:48
+(@PATH,5,1629.32,1192.027,9.076674,0,0,0,0,100,0), -- 09:41:52
+(@PATH,6,1625.091,1172.658,10.96705,0,0,0,0,100,0), -- 09:41:57
+(@PATH,7,1626.96,1164.297,9.917568,0,0,0,0,100,0), -- 09:42:02
+(@PATH,8,1629.299,1156.629,9.361486,0,0,0,0,100,0), -- 09:42:07
+(@PATH,9,1636.125,1149.019,9.258444,0,0,0,0,100,0), -- 09:42:11
+(@PATH,10,1643.561,1144.494,9.247617,0,0,0,0,100,0), -- 09:42:13
+(@PATH,11,1655.12,1139.766,9.255368,0,0,0,0,100,0), -- 09:42:18
+(@PATH,12,1661.656,1140.804,9.253,0,0,0,0,100,0), -- 09:42:20
+(@PATH,13,1668.802,1147.428,9.253811,0,0,0,0,100,0), -- 09:42:24
+(@PATH,14,1676.315,1157.238,9.244503,0,0,0,0,100,0), -- 09:42:29
+(@PATH,15,1685.79,1169.683,9.239374,0,0,0,0,100,0), -- 09:42:34
+(@PATH,16,1692.607,1177.311,9.237229,0,0,0,0,100,0), -- 09:42:37
+(@PATH,17,1699.878,1182.912,9.244503,0,0,0,0,100,0), -- 09:42:41
+(@PATH,18,1713.954,1196.856,10.56152,0,0,0,0,100,0), -- 09:42:44
+(@PATH,19,1723.85,1206.719,12.34495,0,0,0,0,100,0), -- 09:42:49
+(@PATH,20,1727.292,1213.318,11.02762,0,0,0,0,100,0), -- 09:42:54
+(@PATH,21,1729.919,1225.602,9.878916,0,0,0,0,100,0), -- 09:42:57
+(@PATH,22,1731.314,1244.776,10.92413,0,0,0,0,100,0), -- 09:43:04
+(@PATH,23,1728.812,1260.437,12.06071,0,0,0,0,100,0), -- 09:43:10
+(@PATH,24,1727.822,1263.875,12.22826,0,0,0,0,100,0), -- 09:43:15
+(@PATH,25,1711.478,1264.379,11.21737,0,0,0,0,100,0), -- 09:43:20
+(@PATH,26,1713.401,1265.821,11.66045,0,0,0,0,100,0), -- 09:43:25
+(@PATH,27,1716.675,1267.497,11.77379,0,0,0,0,100,0), -- 09:43:28
+(@PATH,28,1729.911,1256.21,11.58052,0,0,0,0,100,0), -- 09:43:32
+(@PATH,29,1731.174,1235.849,10.49311,0,0,0,0,100,0), -- 09:43:38
+(@PATH,30,1731.024,1231.776,10.09937,0,0,0,0,100,0), -- 09:43:44
+(@PATH,31,1725.16,1208.78,11.51352,0,0,0,0,100,0), -- 09:43:50
+(@PATH,32,1720.919,1203.628,11.9393,0,0,0,0,100,0), -- 09:43:54
+(@PATH,33,1709.198,1192.878,9.553079,0,0,0,0,100,0), -- 09:43:57
+(@PATH,34,1706.149,1190.558,9.102777,0,0,0,0,100,0), -- 09:44:02
+(@PATH,35,1699.551,1182.485,9.240244,0,0,0,0,100,0), -- 09:44:06
+(@PATH,36,1692.22,1177.217,9.237229,0,0,0,0,100,0), -- 09:44:10
+(@PATH,37,1685.667,1169.501,9.244503,0,0,0,0,100,0), -- 09:44:13
+(@PATH,38,1675.968,1157.188,9.250818,0,0,0,0,100,0), -- 09:44:19
+(@PATH,39,1668.579,1147.053,9.257448,0,0,0,0,100,0), -- 09:44:23
+(@PATH,40,1661.406,1140.643,9.253025,0,0,0,0,100,0), -- 09:44:26
+(@PATH,41,1655.021,1139.765,9.252222,0,0,0,0,100,0), -- 09:44:29
+(@PATH,42,1643.208,1144.652,9.247617,0,0,0,0,100,0), -- 09:44:34
+(@PATH,43,1635.916,1149.401,9.287905,0,0,0,0,100,0), -- 09:44:37
+(@PATH,44,1626.234,1167.293,10.93676,0,0,0,0,100,0), -- 09:44:41
+(@PATH,45,1623.834,1178.643,9.497221,0,0,0,0,100,0), -- 09:44:45
+(@PATH,46,1623.34,1181.442,9.245241,0,0,0,0,100,0), -- 09:44:49
+(@PATH,47,1629.774,1192.288,9.232269,0,0,0,0,100,0), -- 09:44:54
+(@PATH,48,1637.901,1204.049,9.117538,0,0,0,0,100,0), -- 09:44:59
+(@PATH,49,1652.142,1213.244,9.560089,0,0,0,0,100,0), -- 09:45:05
+(@PATH,50,1664.489,1222.979,8.98844,0,0,0,0,100,0); -- 09:45:11
+-- 0x1C16F41A2007E7C00020100000370E6A .go 1675.997 1232.113 8.987229
+
+DELETE FROM `creature_formations` WHERE `leaderGUID`=81587;
+INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES
+(81587, 81587, 0, 0, 1),
+(81587, 81601, 2, 310, 2),
+(81587, 81588, 2, 40, 2);
+
+-- Pathing for Sul'lithuz Sandcrawler Entry: 8095 'TDB FORMAT'
+SET @NPC := 81587;
+SET @PATH := @NPC * 10;
+UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1600.69,`position_y`=1126.462,`position_z`=12.41756 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '');
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,1600.69,1126.462,12.41756,0,0,0,0,100,0), -- 09:39:21
+(@PATH,2,1598.398,1122.63,11.59186,0,0,0,0,100,0), -- 09:39:26
+(@PATH,3,1593.572,1109.275,10.02831,0,0,0,0,100,0), -- 09:39:30
+(@PATH,4,1592.7,1107.054,9.462294,0,0,0,0,100,0), -- 09:39:33
+(@PATH,5,1588.454,1097.563,9.271156,0,0,0,0,100,0), -- 09:39:38
+(@PATH,6,1583.779,1087.09,9.251778,0,0,0,0,100,0), -- 09:39:42
+(@PATH,7,1577.599,1072.18,9.251631,0,0,0,0,100,0), -- 09:39:48
+(@PATH,8,1572.181,1059.509,9.217859,0,0,0,0,100,0), -- 09:39:53
+(@PATH,9,1566.106,1048.195,9.189631,0,0,0,0,100,0), -- 09:39:58
+(@PATH,10,1561.209,1038.885,9.217978,0,0,0,0,100,0), -- 09:40:01
+(@PATH,11,1554.598,1029.24,9.240252,0,0,0,0,100,0), -- 09:40:05
+(@PATH,12,1551.634,1018.51,9.219183,0,0,0,0,100,0), -- 09:40:10
+(@PATH,13,1564.537,989.8197,10.66319,0,0,0,0,100,0), -- 09:40:17
+(@PATH,14,1573.23,992.3699,9.814154,0,0,0,0,100,0), -- 09:40:23
+(@PATH,15,1585.951,1004.943,9.409527,0,0,0,0,100,0), -- 09:40:32
+(@PATH,16,1583.934,1017.611,9.291721,0,0,0,0,100,0), -- 09:40:36
+(@PATH,17,1570.175,1035.014,9.251503,0,0,0,0,100,0), -- 09:40:45
+(@PATH,18,1572.35,1046.109,9.251484,0,0,0,0,100,0), -- 09:40:48
+(@PATH,19,1579.434,1059.837,9.251631,0,0,0,0,100,0), -- 09:40:55
+(@PATH,20,1580.449,1072.369,9.251754,0,0,0,0,100,0), -- 09:40:59
+(@PATH,21,1584.936,1085.009,9.251778,0,0,0,0,100,0), -- 09:41:04
+(@PATH,22,1588.972,1094.886,9.251778,0,0,0,0,100,0), -- 09:41:08
+(@PATH,23,1596.379,1107.74,9.251778,0,0,0,0,100,0), -- 09:41:13
+(@PATH,24,1603.914,1114.008,9.251778,0,0,0,0,100,0), -- 09:41:16
+(@PATH,25,1613.207,1117.757,9.251778,0,0,0,0,100,0), -- 09:41:20
+(@PATH,26,1622.645,1121.169,9.251778,0,0,0,0,100,0), -- 09:41:24
+(@PATH,27,1626.143,1131.002,9.106209,0,0,0,0,100,0), -- 09:41:27
+(@PATH,28,1613.163,1134.797,10.02532,0,0,0,0,100,0); -- 09:41:31
+-- 0x1C16F41A2007E7C00020100000B70E69 .go 1600.69 1126.462 12.41756
+
+-- Pathing for Sandfury Blood Drinker Entry: 5649 'TDB FORMAT'
+SET @NPC := 45709;
+SET @PATH := @NPC * 10;
+UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1617.601,`position_y`=983.7964,`position_z`=9.916536 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '');
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,1617.601,983.7964,9.916536,0,0,0,0,100,0), -- 09:32:38
+(@PATH,2,1633.528,955.7834,9.235924,0,0,0,0,100,0), -- 09:32:59
+(@PATH,3,1648.17,936.5194,9.250045,0,0,0,0,100,0), -- 09:33:09
+(@PATH,4,1676.1,915.9411,9.25178,0,0,0,0,100,0), -- 09:33:22
+(@PATH,5,1688.716,903.3527,9.251783,0,0,0,0,100,0), -- 09:33:29
+(@PATH,6,1688.836,903.3895,9.001781,0,0,0,0,100,0), -- 09:33:39
+(@PATH,7,1688.783,903.5739,9.251781,0,0,0,0,100,0), -- 09:33:45
+(@PATH,8,1675.767,916.0085,9.251778,0,0,0,0,100,0), -- 09:33:52
+(@PATH,9,1647.774,936.6549,9.231987,0,0,0,0,100,0), -- 09:34:05
+(@PATH,10,1633.304,956.1119,9.007839,0,0,0,0,100,0); -- 09:34:15
+-- 0x1C16F41A200584400020100000B70E69 .go 1617.601 983.7964 9.916536
+
+DELETE FROM `creature_formations` WHERE `leaderGUID`=44170;
+INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES
+(44170, 44170, 0, 0, 1),
+(44170, 44177, 4, 0, 2);
+
+-- Pathing for Sandfury Shadowhunter Entry: 7246 'TDB FORMAT'
+SET @NPC := 44170;
+SET @PATH := @NPC * 10;
+UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1655.273,`position_y`=905.2343,`position_z`=9.25178 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '');
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,1655.273,905.2343,9.25178,0,0,0,0,100,0), -- 09:33:10
+(@PATH,2,1655.911,899.7297,9.251781,0,0,0,0,100,0), -- 09:33:13
+(@PATH,3,1659.89,895.1904,9.251783,0,0,0,0,100,0), -- 09:33:15
+(@PATH,4,1666.527,892.6587,9.251785,0,0,0,0,100,0), -- 09:33:19
+(@PATH,5,1671.451,893.4264,9.251785,0,0,0,0,100,0), -- 09:33:20
+(@PATH,6,1677.89,896.6896,9.251787,0,0,0,0,100,0), -- 09:33:24
+(@PATH,7,1682.431,897.1668,9.251787,0,0,0,0,100,0), -- 09:33:25
+(@PATH,8,1687.213,895.057,9.251787,0,0,0,0,100,0), -- 09:33:27
+(@PATH,9,1691.418,891.8385,9.251787,0,0,0,0,100,0), -- 09:33:30
+(@PATH,10,1707.106,892.9658,9.001792,0,0,0,0,100,0), -- 09:33:35
+(@PATH,11,1707.17,893.1018,9.251791,0,0,0,0,100,0), -- 09:33:37
+(@PATH,12,1707.188,899.764,9.251793,0,0,0,0,100,0), -- 09:33:41
+(@PATH,13,1705.826,907.7333,9.051537,0,0,0,0,100,0), -- 09:33:43
+(@PATH,14,1696.466,915.4108,10.69149,0,0,0,0,100,0), -- 09:33:45
+(@PATH,15,1695.094,916.186,11.46166,0,0,0,0,100,0), -- 09:33:49
+(@PATH,16,1684.856,919.5836,10.99732,0,0,0,0,100,0), -- 09:33:51
+(@PATH,17,1683.066,920.494,10.5781,0,0,0,0,100,0), -- 09:33:54
+(@PATH,18,1674.156,923.7375,10.20567,0,0,0,0,100,0), -- 09:33:57
+(@PATH,19,1664.302,928.6282,9.453308,0,0,0,0,100,0), -- 09:34:00
+(@PATH,20,1661.029,929.8394,9.146419,0,0,0,0,100,0), -- 09:34:04
+(@PATH,21,1655.01,926.2007,9.26087,0,0,0,0,100,0), -- 09:34:07
+(@PATH,22,1652.682,919.4923,9.257462,0,0,0,0,100,0), -- 09:34:10
+(@PATH,23,1651.4,910.429,9.254412,0,0,0,0,100,0), -- 09:34:13
+(@PATH,24,1647.536,904.8036,9.126776,0,0,0,0,100,0), -- 09:34:16
+(@PATH,25,1644.714,900.452,9.315964,0,0,0,0,100,0), -- 09:34:18
+(@PATH,26,1643.629,893.2144,9.066956,0,0,0,0,100,0), -- 09:34:21
+(@PATH,27,1647.002,888.5004,9.251783,0,0,0,0,100,0), -- 09:34:23
+(@PATH,28,1653.137,885.6685,9.281507,0,0,0,0,100,0), -- 09:34:26
+(@PATH,29,1662.074,885.7325,10.57716,0,0,0,0,100,0), -- 09:34:29
+(@PATH,30,1671.613,886.2659,10.16994,0,0,0,0,100,0), -- 09:34:32
+(@PATH,31,1674.008,886.346,9.495081,0,0,0,0,100,0), -- 09:34:35
+(@PATH,32,1681.862,881.2953,9.280839,0,0,0,0,100,0), -- 09:34:39
+(@PATH,33,1685.906,877.4709,9.251787,0,0,0,0,100,0), -- 09:34:41
+(@PATH,34,1691.133,874.519,9.251787,0,0,0,0,100,0), -- 09:34:44
+(@PATH,35,1698.035,875.4692,9.251789,0,0,0,0,100,0), -- 09:34:46
+(@PATH,36,1701.057,884.8716,9.251791,0,0,0,0,100,0), -- 09:34:50
+(@PATH,37,1700.372,888.9851,9.251789,0,0,0,0,100,0), -- 09:34:52
+(@PATH,38,1697.707,894.2527,9.251787,0,0,0,0,100,0), -- 09:34:55
+(@PATH,39,1695.577,900.1669,9.251783,0,0,0,0,100,0), -- 09:34:57
+(@PATH,40,1691.47,905.3853,9.251781,0,0,0,0,100,0), -- 09:34:59
+(@PATH,41,1685.541,907.8835,9.251781,0,0,0,0,100,0), -- 09:35:02
+(@PATH,42,1677.038,912.5565,9.251781,0,0,0,0,100,0), -- 09:35:06
+(@PATH,43,1673.069,915.2619,9.251778,0,0,0,0,100,0), -- 09:35:08
+(@PATH,44,1663.253,918.3373,9.251777,0,0,0,0,100,0), -- 09:35:12
+(@PATH,45,1657.931,912.8817,9.251776,0,0,0,0,100,0); -- 09:35:15
+-- 0x1C16F41A200713800020100003B70E69 .go 1655.273 905.2343 9.25178
+
+UPDATE `creature` SET `id`=7246 WHERE `guid`=81449;
+
+-- Pathing for Sandfury Shadowhunter Entry: 7246 'TDB FORMAT'
+SET @NPC := 81449;
+SET @PATH := @NPC * 10;
+UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1714.547,`position_y`=751.6357,`position_z`=31.01397 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '');
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,1714.547,751.6357,31.01397,0,0,0,0,100,0), -- 09:33:36
+(@PATH,2,1706.419,767.5251,20.53269,0,0,0,0,100,0), -- 09:33:47
+(@PATH,3,1713.905,783.2459,18.27732,0,0,0,0,100,0), -- 09:33:56
+(@PATH,4,1736.666,804.5889,19.37791,0,0,0,0,100,0), -- 09:34:06
+(@PATH,5,1756.694,816.8251,17.76507,0,0,0,0,100,0), -- 09:34:16
+(@PATH,6,1777.771,811.2102,24.82411,0,0,0,0,100,0), -- 09:34:28
+(@PATH,7,1798.088,809.4211,17.09367,0,0,0,0,100,0), -- 09:34:38
+(@PATH,8,1799.94,798.6746,14.59042,0,0,0,0,100,0), -- 09:34:46
+(@PATH,9,1796.858,772.2805,14.40658,0,0,0,0,100,0), -- 09:34:55
+(@PATH,10,1795.703,767.491,14.4094,0,0,0,0,100,0), -- 09:35:03
+(@PATH,11,1783.244,740.9023,16.0862,0,0,0,0,100,0), -- 09:35:12
+(@PATH,12,1753.258,723.8399,20.43831,0,0,0,0,100,0), -- 09:35:20
+(@PATH,13,1739.673,704.8474,24.96986,0,0,0,0,100,0), -- 09:35:30
+(@PATH,14,1732.086,695.3857,29.82811,0,0,0,0,100,0), -- 09:35:41
+(@PATH,15,1730.985,682.3048,37.22635,0,0,0,0,100,0), -- 09:35:46
+(@PATH,16,1730.52,664.7642,46.17672,0,0,0,0,100,0), -- 09:35:52
+(@PATH,17,1730.83,680.5409,37.68767,0,0,0,0,100,0), -- 09:36:01
+(@PATH,18,1730.119,692.5168,32.08631,0,0,0,0,100,0), -- 09:36:09
+(@PATH,19,1737.599,702.1305,26.13027,0,0,0,0,100,0), -- 09:36:14
+(@PATH,20,1749.973,719.9585,21.75875,0,0,0,0,100,0), -- 09:36:18
+(@PATH,21,1770.449,731.5471,16.75012,0,0,0,0,100,0), -- 09:36:29
+(@PATH,22,1787.836,744.8066,15.48635,0,0,0,0,100,0), -- 09:36:39
+(@PATH,23,1790.129,746.8105,14.82397,0,0,0,0,100,0), -- 09:36:48
+(@PATH,24,1800.35,786.1299,15.01233,0,0,0,0,100,0), -- 09:36:56
+(@PATH,25,1799.381,808.5591,16.25235,0,0,0,0,100,0), -- 09:37:05
+(@PATH,26,1784.557,809.4543,26.70631,0,0,0,0,100,0), -- 09:37:13
+(@PATH,27,1768.491,817.0541,16.94501,0,0,0,0,100,0), -- 09:37:22
+(@PATH,28,1740.522,807.2539,18.77644,0,0,0,0,100,0), -- 09:37:32
+(@PATH,29,1719.27,792.5435,17.62323,0,0,0,0,100,0), -- 09:37:44
+(@PATH,30,1707.021,770.4479,18.85983,0,0,0,0,100,0); -- 09:37:53
+-- 0x1C16F41A200713800020100003B70E6B .go 1714.547 751.6357 31.01397
+
+-- Pathing for Hydromancer Velratha Entry: 7795 'TDB FORMAT'
+SET @NPC := 81570;
+SET @PATH := @NPC * 10;
+UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1680.114,`position_y`=1177.732,`position_z`=8.987229 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '');
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,1680.114,1177.732,8.987229,2.303835,0,0,0,100,0), -- 09:34:01
+(@PATH,2,1700.927,1195.028,9.603146,0,0,0,0,100,0), -- 09:34:01
+(@PATH,3,1707.2,1200.687,9.403647,0,0,0,0,100,0), -- 09:34:14
+(@PATH,4,1692.938,1213.952,8.987229,3.909538,0,0,0,100,0), -- 09:34:23
+(@PATH,5,1680.51,1225.099,8.987229,0,0,0,0,100,0), -- 09:34:42
+(@PATH,6,1680.468,1225.099,9.265305,0,0,0,0,100,0), -- 09:34:48
+(@PATH,7,1660.3,1205.108,9.04338,5.5676,0,0,0,100,0), -- 09:35:00
+(@PATH,8,1681.249,1229.22,8.987229,0,0,0,0,100,0), -- 09:35:00
+(@PATH,9,1701.589,1207.354,9.564609,0,0,0,0,100,0), -- 09:35:12
+(@PATH,10,1694.085,1190.304,9.394554,0,0,0,0,100,0); -- 09:35:27
+-- 0x1C16F41A20079CC00020100000370E68 .go 1680.114 1177.732 8.987229
+
+UPDATE `creature` SET `id`=5650 WHERE `guid`=81575;
+UPDATE `creature` SET `id`=5649 WHERE `guid`=81623;
+
+-- Pathing for Sandfury Blood Drinker Entry: 5649 'TDB FORMAT'
+SET @NPC := 81623;
+SET @PATH := @NPC * 10;
+UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1467.867,`position_y`=814.7855,`position_z`=9.265823 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '');
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,1467.867,814.7855,9.265823,0,0,0,0,100,0), -- 09:33:47
+(@PATH,2,1487.211,800.545,9.218481,0,0,0,0,100,0), -- 09:33:56
+(@PATH,3,1511.808,811.0946,9.178488,0,0,0,0,100,0), -- 09:34:07
+(@PATH,4,1515.796,829.2292,9.161482,0,0,0,0,100,0), -- 09:34:16
+(@PATH,5,1536.178,831.7927,8.960844,0,0,0,0,100,0), -- 09:34:23
+(@PATH,6,1571.074,854.2294,9.261095,0,0,0,0,100,0), -- 09:34:40
+(@PATH,7,1591.516,871.9385,9.265827,0,0,0,0,100,0), -- 09:34:51
+(@PATH,8,1607.848,876.8568,9.265826,0,0,0,0,100,0), -- 09:34:58
+(@PATH,9,1607.711,876.7318,9.015826,0,0,0,0,100,0), -- 09:35:10
+(@PATH,10,1607.748,876.855,9.265827,0,0,0,0,100,0), -- 09:35:19
+(@PATH,11,1591.351,871.8887,9.265827,0,0,0,0,100,0), -- 09:35:26
+(@PATH,12,1570.754,854.1002,9.208826,0,0,0,0,100,0), -- 09:35:37
+(@PATH,13,1535.719,831.4611,9.164757,0,0,0,0,100,0), -- 09:35:54
+(@PATH,14,1515.512,828.9963,9.170406,0,0,0,0,100,0), -- 09:36:03
+(@PATH,15,1511.881,810.6445,8.968481,0,0,0,0,100,0), -- 09:36:10
+(@PATH,16,1486.829,800.4541,9.261948,0,0,0,0,100,0); -- 09:36:21
+-- 0x1C16F41A200584400020100004370E69 .go 1467.867 814.7855 9.265823
+
+-- Update spawn distance & movementype so they move around randomly
+UPDATE `creature` SET `spawndist`=10, `MovementType`=1 WHERE `guid` IN (81566, 81569, 81580, 81568, 81597, 81598, 81539, 81538, 81542, 81548, 81551, 45710, 81482, 81517, 81515, 81518, 81468, 81452, 81579, 81460, 81461, 81512, 81516);
+
+UPDATE `creature` SET `id`=5650 WHERE `guid`=81578;
+
+-- Pathing for Sandfury Witch Doctor Entry: 5650 'TDB FORMAT'
+SET @NPC := 81578;
+SET @PATH := @NPC * 10;
+UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1676.368,`position_y`=1157.151,`position_z`=9.249697 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '');
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,1676.368,1157.151,9.249697,0,0,0,0,100,0), -- 13:40:40
+(@PATH,2,1653.736,1135.86,9.245178,0,0,0,0,100,0), -- 13:40:52
+(@PATH,3,1626.023,1177.506,9.271156,0,0,0,0,100,0), -- 13:41:05
+(@PATH,4,1625.849,1178.628,9.327552,0,0,0,0,100,0), -- 13:41:14
+(@PATH,5,1641.739,1209.753,9.657928,0,0,0,0,100,0), -- 13:41:25
+(@PATH,6,1681.225,1250.528,10.47596,0,0,0,0,100,0), -- 13:41:38
+(@PATH,7,1696.953,1250.462,10.17584,0,0,0,0,100,0), -- 13:41:54
+(@PATH,8,1714.498,1240.271,9.738787,0,0,0,0,100,0), -- 13:42:06
+(@PATH,9,1717.624,1219.73,9.457044,0,0,0,0,100,0), -- 13:42:15
+(@PATH,10,1704.706,1187.339,9.265233,0,0,0,0,100,0); -- 13:42:29
+-- 0x1C16F41A2005848000491D0001B743F7 .go 1676.368 1157.151 9.249697
+
+-- Pathing for Sandfury Witch Doctor Entry: 5650 'TDB FORMAT'
+SET @NPC := 81526;
+SET @PATH := @NPC * 10;
+UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1879.829,`position_y`=1016.147,`position_z`=9.251789 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '');
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,1879.829,1016.147,9.251789,0,0,0,0,100,0), -- 13:59:01
+(@PATH,2,1866.291,1028.589,9.251736,0,0,0,0,100,0), -- 13:59:23
+(@PATH,3,1853.719,1035.176,9.251698,0,0,0,0,100,0), -- 13:59:28
+(@PATH,4,1847.862,1044.768,9.251684,0,0,0,0,100,0), -- 13:59:33
+(@PATH,5,1853.86,1062.672,9.252108,0,0,0,0,100,0), -- 13:59:40
+(@PATH,6,1870.639,1091.271,9.252114,0,0,0,0,100,0), -- 13:59:53
+(@PATH,7,1875.563,1107.849,9.25185,0,0,0,0,100,0), -- 14:00:00
+(@PATH,8,1890.563,1129.902,9.251789,0,0,0,0,100,0), -- 14:00:11
+(@PATH,9,1888.277,1155.863,9.251789,0,0,0,0,100,0), -- 14:00:21
+(@PATH,10,1895.958,1173.92,9.251789,0,0,0,0,100,0), -- 14:00:30
+(@PATH,11,1903.501,1197.795,9.251789,0,0,0,0,100,0), -- 14:00:39
+(@PATH,12,1899.594,1215.067,9.227224,0,0,0,0,100,0), -- 14:00:47
+(@PATH,13,1899.237,1214.72,9.001789,0,0,0,0,100,0), -- 14:00:57
+(@PATH,14,1899.508,1214.759,9.285032,0,0,0,0,100,0), -- 14:01:05
+(@PATH,15,1903.433,1197.489,9.251789,0,0,0,0,100,0), -- 14:01:12
+(@PATH,16,1895.648,1173.515,9.251789,0,0,0,0,100,0), -- 14:01:22
+(@PATH,17,1888.245,1155.736,9.251789,0,0,0,0,100,0), -- 14:01:30
+(@PATH,18,1890.73,1129.828,9.25179,0,0,0,0,100,0), -- 14:01:40
+(@PATH,19,1875.201,1107.714,9.25216,0,0,0,0,100,0), -- 14:01:51
+(@PATH,20,1870.43,1091.029,9.252037,0,0,0,0,100,0), -- 14:01:58
+(@PATH,21,1853.549,1062.582,9.251722,0,0,0,0,100,0), -- 14:02:12
+(@PATH,22,1847.7,1044.523,9.251684,0,0,0,0,100,0), -- 14:02:19
+(@PATH,23,1853.871,1034.924,9.251736,0,0,0,0,100,0), -- 14:02:24
+(@PATH,24,1866.429,1028.186,9.251782,0,0,0,0,100,0); -- 14:02:30
+-- 0x1C16F41A2005848000491D0001B743F4 .go 1879.829 1016.147 9.251789
+
+UPDATE `creature` SET `id`=5649 WHERE `guid`=81505;
+
+-- Pathing for Sandfury Blood Drinker Entry: 5649 'TDB FORMAT'
+SET @NPC := 81505;
+SET @PATH := @NPC * 10;
+UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1822.724,`position_y`=914.1884,`position_z`=9.001788 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '');
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,1822.724,914.1884,9.001788,0,0,0,0,100,0), -- 13:59:35
+(@PATH,2,1829.56,924.1556,9.251788,0,0,0,0,100,0), -- 13:59:41
+(@PATH,3,1837.984,936.5698,9.251788,0,0,0,0,100,0), -- 13:59:47
+(@PATH,4,1844.23,947.9322,9.251788,0,0,0,0,100,0), -- 13:59:53
+(@PATH,5,1853.508,963.5331,9.251788,0,0,0,0,100,0), -- 14:00:00
+(@PATH,6,1858.897,971.714,9.251788,0,0,0,0,100,0), -- 14:00:04
+(@PATH,7,1862.767,977.868,9.251788,0,0,0,0,100,0), -- 14:00:06
+(@PATH,8,1862.533,977.6647,9.001788,0,0,0,0,100,0), -- 14:00:13
+(@PATH,9,1862.49,977.5964,9.251788,0,0,0,0,100,0), -- 14:00:17
+(@PATH,10,1858.673,971.532,9.251788,0,0,0,0,100,0), -- 14:00:19
+(@PATH,11,1853.258,963.3405,9.251788,0,0,0,0,100,0), -- 14:00:24
+(@PATH,12,1844.16,947.6928,9.251788,0,0,0,0,100,0), -- 14:00:32
+(@PATH,13,1837.749,936.4601,9.251788,0,0,0,0,100,0), -- 14:00:36
+(@PATH,14,1829.292,923.94,9.251788,0,0,0,0,100,0); -- 14:00:43
+-- 0x1C16F41A2005844000491D00033743F5 .go 1822.724 914.1884 9.001788
diff --git a/sql/updates/world/2016_02_07_14_world.sql b/sql/updates/world/2016_02_07_14_world.sql
new file mode 100644
index 00000000000..6550e53f9c9
--- /dev/null
+++ b/sql/updates/world/2016_02_07_14_world.sql
@@ -0,0 +1,55 @@
+-- An end to the suffering
+UPDATE `creature_template` SET `unit_flags`=33536 WHERE `entry`=28416;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` =28416;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=28416 AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=2841600 AND `source_type`=9;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(-113558,-113482,-113483,-113481) AND `source_type`=0;
+
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(-113558, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 11, 51607, 0, 0, 0, 0, 0, 10, 95460, 28416, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Data Set - Cast \'Rhunok\'s Chains\''),
+(-113558, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 92, 0, 51607, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Data Set - Remove Aura \'Rhunok\'s Chains\''),
+(-113558, 0, 2, 0, 1, 0, 100, 1, 5000, 5000, 0, 0, 11, 51607, 0, 0, 0, 0, 0, 10, 95460, 28416, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Spawn - Cast \'Rhunok\'s Chains\''),
+(-113482, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 11, 51607, 0, 0, 0, 0, 0, 10, 95460, 28416, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Data Set - Cast \'Rhunok\'s Chains\''),
+(-113482, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 92, 0, 51607, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Data Set - Remove Aura \'Rhunok\'s Chains\''),
+(-113482, 0, 2, 0, 1, 0, 100, 1, 5000, 5000, 0, 0, 11, 51607, 0, 0, 0, 0, 0, 10, 95460, 28416, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Spawn - Cast \'Rhunok\'s Chains\''),
+(-113483, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 11, 51607, 0, 0, 0, 0, 0, 10, 95460, 28416, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Data Set - Cast \'Rhunok\'s Chains\''),
+(-113483, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 92, 0, 51607, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Data Set - Remove Aura \'Rhunok\'s Chains\''),
+(-113483, 0, 2, 0, 1, 0, 100, 1, 5000, 5000, 0, 0, 11, 51607, 0, 0, 0, 0, 0, 10, 95460, 28416, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Spawn - Cast \'Rhunok\'s Chains\''),
+(-113481, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 11, 51607, 0, 0, 0, 0, 0, 10, 95460, 28416, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Data Set - Cast \'Rhunok\'s Chains\''),
+(-113481, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 92, 0, 51607, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Data Set - Remove Aura \'Rhunok\'s Chains\''),
+(-113481, 0, 2, 0, 1, 0, 100, 1, 5000, 5000, 0, 0, 11, 51607, 0, 0, 0, 0, 0, 10, 95460, 28416, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) Large - On Spawn - Cast \'Rhunok\'s Chains\''),
+(28416, 0, 0, 1, 25, 0, 100, 0, 0, 0, 0, 0, 18, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - On Reset - Set Unit Flags'),
+(28416, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 90, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - On Reset - Set Bytes 1'),
+(28416, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, 113558, 26298, 0, 0, 0, 0, 0, 'Rhunok - On Reset - Set Data on ELM General Purpose Bunny (scale x0.01) Large'),
+(28416, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, 113482, 26298, 0, 0, 0, 0, 0, 'Rhunok - On Reset - Set Data on ELM General Purpose Bunny (scale x0.01) Large'),
+(28416, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, 113481, 26298, 0, 0, 0, 0, 0, 'Rhunok - On Reset - Set Data on ELM General Purpose Bunny (scale x0.01) Large'),
+(28416, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, 113483, 26298, 0, 0, 0, 0, 0, 'Rhunok - On Reset - Set Data on ELM General Purpose Bunny (scale x0.01) Large'),
+(28416, 0, 6, 7, 8, 0, 100, 0, 51964, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, 113558, 26298, 0, 0, 0, 0, 0, 'Rhunok - Spellhit - Set Data on ELM General Purpose Bunny (scale x0.01) Large'), -- 17:16:47.641
+(28416, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, 113481, 26298, 0, 0, 0, 0, 0, 'Rhunok - Spellhit - Set Data on ELM General Purpose Bunny (scale x0.01) Large'),
+(28416, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, 113482, 26298, 0, 0, 0, 0, 0, 'Rhunok - Spellhit - Set Data on ELM General Purpose Bunny (scale x0.01) Large'),
+(28416, 0, 9, 10, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, 113483, 26298, 0, 0, 0, 0, 0, 'Rhunok - Spellhit - Set Data on ELM General Purpose Bunny (scale x0.01) Large'),
+(28416, 0, 10, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 2841600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - Spellhit - Run Script'),
+(28416, 0, 11, 0, 9, 0, 100, 0, 0, 5, 1000, 5000, 11, 34298, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - On Range - Cast Maul'),
+(28416, 0, 12, 0, 2, 0, 100, 1, 0, 25, 0, 0, 11, 57861, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - On 25% HP - Cast Roar of Rhunok'),
+(28416, 0, 13, 0, 8, 0, 100, 0, 51603, 0, 0, 0, 4, 477, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - On Spellhit - Play Sound'),
+(2841600, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 91, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - Script - Remove Bytes 1'),
+(2841600, 9, 1, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 66, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - Script - Face Invoker'),
+(2841600, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 45111, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - Script - Cast Enrage'),
+(2841600, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - Script - Say'),
+(2841600, 9, 4, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhunok - Script - Remove Unit Flags'),
+(2841600, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 50, 0, 0, 0, 0, 0, 0, 'Rhunok - Script - Start Attack');
+
+DELETE FROM `creature_text` WHERE `entry`=28416;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `comment`) VALUES
+(28416, 0, 0, 'I will not simply lay here and allow you to slay me! You will have to earn your right to draw another breath if you want to kill me, mortal!', 14, 0, 100, 0, 0, 478, 28544, 'Rhunok to Player');
+
+DELETE FROM `disables` WHERE `sourceType`=0 AND `entry`=51964;
+INSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES
+(0, 51964, 64, '', '', 'Ignore LOS on Tormentor''s Incense');
+-- Catching up with Brann linking
+UPDATE quest_template_addon SET PrevQuestID = 12917 WHERE ID = 12920;
+-- Valkyrion Must Burn
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (30066) AND `source_type`=0 AND `id`=1 ;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(30066,0,1,0,28,0,100,0,0,0,0,0,81,16777216,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Valkyrion Harpoon Gun - On Passenger Dismounted - Set NPC Flags');
diff --git a/sql/updates/world/2016_02_07_15_world.sql b/sql/updates/world/2016_02_07_15_world.sql
new file mode 100644
index 00000000000..ceec02f881b
--- /dev/null
+++ b/sql/updates/world/2016_02_07_15_world.sql
@@ -0,0 +1,175 @@
+SET @Guid := 52030;
+
+DELETE FROM `creature` WHERE `id` IN(37964,37981,36817);
+INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES
+(@Guid, 37964, 0, 0, 0, 1, 1, 0, 0, 1484.662, 348.019, -64.54687, 0.8377581, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0),
+(@Guid+1, 37981, 1, 0, 0, 1, 1, 0, 0, 9843.134, 2430.733, 1313.6, 5.5676, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0),
+(@Guid+2, 36817, 0, 0, 0, 1, 1, 0, 0, -8796.021, 775.0364, 95.22309, 0.01745329, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0);
+
+DELETE FROM `game_event_creature` WHERE `eventEntry`=8 AND `guid` BETWEEN @Guid AND @Guid+2;
+INSERT INTO `game_event_creature` (`eventEntry`, `guid`) VALUES
+(8, @Guid),
+(8, @Guid+1),
+(8, @Guid+2);
+
+UPDATE `creature_template` SET `InhabitType`=4,`npcflag`=16777216,`VehicleId`=616,`IconName`='vehichleCursor' WHERE `entry` =37966;
+UPDATE `creature_template` SET `InhabitType`=4,`npcflag`=16777216,`VehicleId`=615,`IconName`='vehichleCursor' WHERE `entry` =37980;
+UPDATE `creature_template` SET `InhabitType`=4,`npcflag`=16777216,`VehicleId`=548,`IconName`='vehichleCursor' WHERE `entry`=36812;
+
+UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` IN(37966,37964,37981,37980,36817,36812);
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(37966,37964,37980,37981,36817,36812) AND `source_type`=0;
+
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(37964, 0, 0, 0, 1, 0, 100, 0, 0, 0, 20000, 20000, 11, 70846, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '[DND] Love Boat Summoner 02 - OOC - Cast Love Boat Summon'),
+(37981, 0, 0, 0, 1, 0, 100, 0, 0, 0, 20000, 20000, 11, 70863, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '[DND] Love Boat Summoner 03 - OOC - Cast Love Boat Summon'),
+(36817, 0, 0, 0, 1, 0, 100, 0, 0, 0, 20000, 20000, 11, 69371, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '[DND] Love Boat Summoner - OOC - Cast Love Boat Summon'),
+(37964, 0, 1, 0, 11, 0, 100, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '[DND] Love Boat Summoner 02 - On Spawn - Set Active'),
+(37981, 0, 1, 0, 11, 0, 100, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '[DND] Love Boat Summoner 03 - On Spawn - Set Active'),
+(36817, 0, 1, 0, 11, 0, 100, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '[DND] Love Boat Summoner - On Spawn - Set Active'),
+(37966, 0, 0, 0, 1, 0, 100, 1, 5000, 5000, 0, 0, 53, 0, 37966, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undercity Love Boat - OOC - Start WP'),
+(37966, 0, 1, 2, 40, 0, 100, 0, 31, 37966, 0, 0, 11, 50630, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undercity Love Boat - On Reached WP31 - Cast Eject All Passengers'),
+(37966, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 2000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undercity Love Boat - On Reached WP31 - Despawn'),
+(37966, 0, 3, 4, 54, 0, 100, 0, 0, 0, 0, 0, 11, 70143, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undercity Love Boat - On Just Summoned - Cast Vehicle Test'),
+(37966, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undercity Love Boat - On Just Summoned - Set Active'),
+(37966, 0, 5, 0, 1, 0, 100, 0, 0, 0, 3000, 3000, 75, 69341, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Undercity Love Boat - OOC - Cast Love Boat'),
+(37966, 0, 6, 0, 23, 0, 100, 0, 69342, 2, 1000, 1000, 75, 62011, 0, 0, 0, 0, 0, 17, 0, 20, 0, 0, 0, 0, 0, 'Undercity Love Boat - On Has Aura (2) - Add Aura'),
+(37966, 0, 7, 0, 28, 0, 100, 0, 0, 0, 0, 0, 28, 62011, 0, 0, 0, 0, 0, 17, 0, 20, 0, 0, 0, 0, 0, 'Undercity Love Boat - On Passenger Dismounted - Remove Aura'),
+(37980, 0, 0, 0, 1, 0, 100, 1, 5000, 5000, 0, 0, 53, 0, 37980, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darnassus Love Boat - OOC - Start WP'),
+(37980, 0, 1, 2, 40, 0, 100, 0, 60, 37980, 0, 0, 11, 50630, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darnassus Love Boat - On Reached WP60 - Cast Eject All Passengers'),
+(37980, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 2000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darnassus Love Boat - On Reached WP31 - Despawn'),
+(37980, 0, 3, 4, 54, 0, 100, 0, 0, 0, 0, 0, 11, 70143, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darnassus Love Boat - On Just Summoned - Cast Vehicle Test'),
+(37980, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darnassus Love Boat - On Just Summoned - Set Active'),
+(37980, 0, 5, 0, 1, 0, 100, 0, 0, 0, 3000, 3000, 75, 69341, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darnassus Love Boat - On Passenger Boarded - Cast Love Boat'),
+(37980, 0, 6, 0, 23, 0, 100, 0, 69342, 2, 1000, 1000, 75, 62011, 0, 0, 0, 0, 0, 17, 0, 20, 0, 0, 0, 0, 0, 'Darnassus Love Boat - On Has Aura (2) - Add Aura'),
+(37980, 0, 7, 0, 28, 0, 100, 0, 0, 0, 0, 0, 28, 62011, 0, 0, 0, 0, 0, 17, 0, 20, 0, 0, 0, 0, 0, 'Darnassus Love Boat - On Passenger Removed - Remove Aura'),
+(36812, 0, 0, 0, 1, 0, 100, 1, 5000, 5000, 0, 0, 53, 0, 36812, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Stormwind Love Boat - OOC - Start WP'),
+(36812, 0, 1, 2, 40, 0, 100, 0, 21, 36812, 0, 0, 11, 50630, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Stormwind Love Boat - On Reached WP21 - Cast Eject All Passengers'),
+(36812, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 2000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Stormwind Love Boat - On Reached 19 - Despawn'),
+(36812, 0, 3, 4, 54, 0, 100, 0, 0, 0, 0, 0, 11, 70143, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Stormwind Love Boat - On Just Summoned - Cast Vehicle Test'),
+(36812, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Stormwind - Love Boat - On Just Summoned - Set Active'),
+(36812, 0, 5, 0, 1, 0, 100, 0, 0, 0, 3000, 3000, 75, 69341, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Stormwind Love Boat - OOC - Cast Love Boat'),
+(36812, 0, 6, 0, 23, 0, 100, 0, 69342, 2, 1000, 1000, 75, 62011, 0, 0, 0, 0, 0, 17, 0, 20, 0, 0, 0, 0, 0, 'Stormwind Love Boat - On Has Aura (2) - Add Aura'),
+(36812, 0, 7, 0, 28, 0, 100, 0, 0, 0, 0, 0, 28, 62011, 0, 0, 0, 0, 0, 17, 0, 20, 0, 0, 0, 0, 0, 'Stormwind Love Boat - On Pasenger Removed - Remove Aura');
+
+DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`IN(37966,37980,36812);
+INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES
+(37966, 69342, 1, 0),
+(37980, 69342, 1, 0),
+(36812, 69342, 1, 0);
+
+
+DELETE FROM `waypoints` WHERE `entry` IN(37966,37980,36812);
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
+(37966, 1, 1485.332, 348.7621, -64.54687, 'Undercity Love Boat'),
+(37966, 2, 1487.063, 350.9445, -64.86743, 'Undercity Love Boat'),
+(37966, 3, 1494.434, 360.592, -64.86742, 'Undercity Love Boat'),
+(37966, 4, 1505.792, 368.026, -64.81186, 'Undercity Love Boat'),
+(37966, 5, 1520.413, 376.7361, -64.81187, 'Undercity Love Boat'),
+(37966, 6, 1542.724, 389.7309, -64.81187, 'Undercity Love Boat'),
+(37966, 7, 1555.352, 393.1875, -64.81187, 'Undercity Love Boat'),
+(37966, 8, 1577.076, 397.1563, -64.81187, 'Undercity Love Boat'),
+(37966, 9, 1618.071, 395.9705, -64.81187, 'Undercity Love Boat'),
+(37966, 10, 1642.727, 391.0139, -64.81187, 'Undercity Love Boat'),
+(37966, 11, 1685.007, 370.4167, -64.81187, 'Undercity Love Boat'),
+(37966, 12, 1711.104, 350.4514, -64.81187, 'Undercity Love Boat'),
+(37966, 13, 1738.417, 310.0278, -64.81187, 'Undercity Love Boat'),
+(37966, 14, 1746.345, 286.441, -64.81187, 'Undercity Love Boat'),
+(37966, 15, 1752.087, 240.5399, -64.81187, 'Undercity Love Boat'),
+(37966, 16, 1750.016, 206.7309, -64.81187, 'Undercity Love Boat'),
+(37966, 17, 1737.47, 167.8559, -64.81187, 'Undercity Love Boat'),
+(37966, 18, 1707.885, 128.5122, -64.81187, 'Undercity Love Boat'),
+(37966, 19, 1667.977, 99.80035, -64.81187, 'Undercity Love Boat'),
+(37966, 20, 1624.948, 85.43229, -64.81187, 'Undercity Love Boat'),
+(37966, 21, 1583.814, 83.33507, -64.81187, 'Undercity Love Boat'),
+(37966, 22, 1539.444, 94.43403, -64.81187, 'Undercity Love Boat'),
+(37966, 23, 1502.849, 114.3142, -64.81187, 'Undercity Love Boat'),
+(37966, 24, 1482.955, 132.6806, -64.81187, 'Undercity Love Boat'),
+(37966, 25, 1456.214, 170.0521, -64.81187, 'Undercity Love Boat'),
+(37966, 26, 1441.738, 207.8819, -64.81187, 'Undercity Love Boat'),
+(37966, 27, 1438.825, 244.4427, -64.81187, 'Undercity Love Boat'),
+(37966, 28, 1450.882, 299.3177, -64.81187, 'Undercity Love Boat'),
+(37966, 29, 1462.38, 320.4583, -64.81187, 'Undercity Love Boat'),
+(37966, 30, 1467.97, 333.1337, -64.81187, 'Undercity Love Boat'),
+(37966, 31, 1471.193, 337.8559, -64.81187, 'Undercity Love Boat'),
+(37980, 1, 9843.134, 2430.733, 1313.6, 'Darnassus Love Boat'),
+(37980, 2, 9847.023, 2427.627, 1313.516, 'Darnassus Love Boat'),
+(37980, 3, 9856.224, 2423.156, 1313.516, 'Darnassus Love Boat'),
+(37980, 4, 9871.393, 2416.719, 1313.516, 'Darnassus Love Boat'),
+(37980, 5, 9888.688, 2408.337, 1313.516, 'Darnassus Love Boat'),
+(37980, 6, 9901.832, 2399.545, 1313.516, 'Darnassus Love Boat'),
+(37980, 7, 9915.912, 2390.616, 1313.516, 'Darnassus Love Boat'),
+(37980, 8, 9930.722, 2381.382, 1313.516, 'Darnassus Love Boat'),
+(37980, 9, 9946.339, 2377.861, 1313.516, 'Darnassus Love Boat'),
+(37980, 10, 9964.972, 2377.967, 1313.516, 'Darnassus Love Boat'),
+(37980, 11, 9977.46, 2379.141, 1313.516, 'Darnassus Love Boat'),
+(37980, 12, 9989.397, 2375.556, 1313.516, 'Darnassus Love Boat'),
+(37980, 13, 10006.68, 2364.491, 1313.516, 'Darnassus Love Boat'),
+(37980, 14, 10022.01, 2353.608, 1313.516, 'Darnassus Love Boat'),
+(37980, 15, 10031.78, 2353.427, 1313.516, 'Darnassus Love Boat'),
+(37980, 16, 10041.6, 2366.207, 1313.516, 'Darnassus Love Boat'),
+(37980, 17, 10043.1, 2373.267, 1313.516, 'Darnassus Love Boat'),
+(37980, 18, 10040.94, 2384.248, 1313.516, 'Darnassus Love Boat'),
+(37980, 19, 10040.11, 2396.392, 1313.516, 'Darnassus Love Boat'),
+(37980, 20, 10043.54, 2406.759, 1313.516, 'Darnassus Love Boat'),
+(37980, 21, 10051.08, 2414.868, 1313.516, 'Darnassus Love Boat'),
+(37980, 22, 10059.58, 2421.014, 1313.516, 'Darnassus Love Boat'),
+(37980, 23, 10061.45, 2433.856, 1313.516, 'Darnassus Love Boat'),
+(37980, 24, 10056.65, 2445.88, 1313.516, 'Darnassus Love Boat'),
+(37980, 25, 10049.1, 2453.844, 1313.516, 'Darnassus Love Boat'),
+(37980, 26, 10039.64, 2458.193, 1313.516, 'Darnassus Love Boat'),
+(37980, 27, 10030.21, 2461.353, 1313.516, 'Darnassus Love Boat'),
+(37980, 28, 10013.85, 2465.007, 1313.516, 'Darnassus Love Boat'),
+(37980, 29, 10007.3, 2472.648, 1313.516, 'Darnassus Love Boat'),
+(37980, 30, 10001.77, 2490.97, 1313.516, 'Darnassus Love Boat'),
+(37980, 31, 10007.02, 2503.859, 1313.516, 'Darnassus Love Boat'),
+(37980, 32, 10014.66, 2519.925, 1313.516, 'Darnassus Love Boat'),
+(37980, 33, 10022.5, 2532.248, 1313.516, 'Darnassus Love Boat'),
+(37980, 34, 10032.06, 2559.106, 1313.516, 'Darnassus Love Boat'),
+(37980, 35, 10032.88, 2579.188, 1313.516, 'Darnassus Love Boat'),
+(37980, 36, 10032.36, 2598.909, 1313.516, 'Darnassus Love Boat'),
+(37980, 37, 10029.7, 2612.815, 1313.516, 'Darnassus Love Boat'),
+(37980, 38, 10022.64, 2648.693, 1313.516, 'Darnassus Love Boat'),
+(37980, 39, 9999.638, 2667.306, 1313.516, 'Darnassus Love Boat'),
+(37980, 40, 9985.304, 2673.353, 1313.516, 'Darnassus Love Boat'),
+(37980, 41, 9967.442, 2671.7, 1313.516, 'Darnassus Love Boat'),
+(37980, 42, 9938.718, 2668.114, 1313.516, 'Darnassus Love Boat'),
+(37980, 43, 9898.393, 2665.895, 1313.516, 'Darnassus Love Boat'),
+(37980, 44, 9874.026, 2660.383, 1313.516, 'Darnassus Love Boat'),
+(37980, 45, 9848.894, 2657.903, 1313.516, 'Darnassus Love Boat'),
+(37980, 46, 9834.57, 2658.452, 1313.516, 'Darnassus Love Boat'),
+(37980, 47, 9820.689, 2652.576, 1313.516, 'Darnassus Love Boat'),
+(37980, 48, 9802.497, 2636.835, 1313.516, 'Darnassus Love Boat'),
+(37980, 49, 9795.239, 2622.99, 1313.516, 'Darnassus Love Boat'),
+(37980, 50, 9785.92, 2605.789, 1313.516, 'Darnassus Love Boat'),
+(37980, 51, 9784.899, 2593.911, 1313.516, 'Darnassus Love Boat'),
+(37980, 52, 9793.405, 2574.175, 1313.516, 'Darnassus Love Boat'),
+(37980, 53, 9812.471, 2555.666, 1313.516, 'Darnassus Love Boat'),
+(37980, 54, 9829.779, 2539.537, 1313.516, 'Darnassus Love Boat'),
+(37980, 55, 9841.714, 2520.574, 1313.516, 'Darnassus Love Boat'),
+(37980, 56, 9847.395, 2499.439, 1313.516, 'Darnassus Love Boat'),
+(37980, 57, 9850.591, 2481.936, 1313.516, 'Darnassus Love Boat'),
+(37980, 58, 9846.033, 2466.465, 1313.516, 'Darnassus Love Boat'),
+(37980, 59, 9838.938, 2451.995, 1313.516, 'Darnassus Love Boat'),
+(37980, 60, 9833.917, 2446.236, 1313.516, 'Darnassus Love Boat'),
+(36812, 1, -8795.021, 775.0364, 95.22309, 'Stormwind Love Boat'),
+(36812, 2, -8791.573, 776.316, 95.0583, 'Stormwind Love Boat'),
+(36812, 3, -8783.189, 778.1111, 95.0583, 'Stormwind Love Boat'),
+(36812, 4, -8769.04, 777.9063, 95.0583, 'Stormwind Love Boat'),
+(36812, 5, -8757.161, 764.092, 95.0583, 'Stormwind Love Boat'),
+(36812, 6, -8750.976, 741.6354, 95.08608, 'Stormwind Love Boat'),
+(36812, 7, -8733.618, 717.3299, 95.08608, 'Stormwind Love Boat'),
+(36812, 8, -8717.854, 698.5886, 95.0583, 'Stormwind Love Boat'),
+(36812, 9, -8698.192, 662.2465, 95.0583, 'Stormwind Love Boat'),
+(36812, 10, -8688.56, 630.1719, 95.11386, 'Stormwind Love Boat'),
+(36812, 11, -8696.212, 596.9983, 95.08608, 'Stormwind Love Boat'),
+(36812, 12, -8702.024, 577.2761, 95.0583, 'Stormwind Love Boat'),
+(36812, 13, -8691.561, 565.0538, 95.0583, 'Stormwind Love Boat'),
+(36812, 14, -8671.857, 565.382, 95.0583, 'Stormwind Love Boat'),
+(36812, 15, -8646.634, 563.7743, 95.0583, 'Stormwind Love Boat'),
+(36812, 16, -8631.895, 554.441, 95.0583, 'Stormwind Love Boat'),
+(36812, 17, -8618.281, 557.4114, 95.0583, 'Stormwind Love Boat'),
+(36812, 18, -8608.049, 577.191, 95.0583, 'Stormwind Love Boat'),
+(36812, 19, -8602.768, 595.4983, 95.0583, 'Stormwind Love Boat'),
+(36812, 20, -8594.357, 623.566, 95.0583, 'Stormwind Love Boat'),
+(36812, 21, -8581.717, 629.7882, 95.08608, 'Stormwind Love Boat');
diff --git a/sql/updates/world/2016_02_08_00_world_335.sql b/sql/updates/world/2016_02_08_00_world_335.sql
new file mode 100644
index 00000000000..83091035e3c
--- /dev/null
+++ b/sql/updates/world/2016_02_08_00_world_335.sql
@@ -0,0 +1,2 @@
+-- http://wowwiki.wikia.com/wiki/Love_Rocket?oldid=2190122
+UPDATE `item_template` SET `BuyCount`=5 WHERE `entry`=34258;
diff --git a/sql/updates/world/2016_02_08_01_world.sql b/sql/updates/world/2016_02_08_01_world.sql
new file mode 100644
index 00000000000..9f8fa3dc4ed
--- /dev/null
+++ b/sql/updates/world/2016_02_08_01_world.sql
@@ -0,0 +1,25 @@
+SET @JOVAAN := 21633; -- Deathbringer Jovaan
+SET @TRIGGER := 4548; -- Smart Trigger
+SET @DEVICE := 184833;-- Legion Communication Device
+SET @GO_INFERNAL := 184834;-- Gobject that needs to be despawned during the script
+SET @GO_INFERNAL2 := 184835;-- Gobject that needs to be despawned during the script
+SET @EVENTID := 13852; -- From spell_dbc id 37492
+
+DELETE FROM event_scripts WHERE id =@EVENTID;
+INSERT INTO event_scripts (id, command, datalong, datalong2, x, y, z, o) VALUES
+(@EVENTID, 10, @JOVAAN, 57000, -3310.995, 2951.892, 171.2171, 5.5355);
+
+DELETE FROM areatrigger_scripts WHERE entry=@TRIGGER;
+DELETE FROM smart_scripts WHERE entryorguid=@TRIGGER AND source_type=2;
+
+UPDATE gameobject_template SET AIName ='' WHERE entry =@DEVICE;
+DELETE FROM smart_scripts WHERE source_type=1 AND entryorguid =@DEVICE;
+
+DELETE FROM smart_scripts WHERE entryorguid=@JOVAAN AND source_type=0;
+INSERT INTO smart_scripts (entryorguid, source_type, id, link, event_type, event_phase_mask, event_chance, event_flags, event_param1, event_param2, event_param3, event_param4, action_type, action_param1, action_param2, action_param3, action_param4, action_param5, action_param6, target_type, target_param1, target_param2, target_param3, target_x, target_y, target_z, target_o, comment) VALUES
+(@JOVAAN,0,0,1,11,0,100,0,0,0,0,0,11,34427,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathbringer Jovaan - Just summoned - Spellcast Etheral Teleport'),
+(@JOVAAN,0,1,2,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,14,25737,@GO_INFERNAL,0,0,0,0,0,'Deathbringer Jovaan - Just summoned - Set Data GO'),
+(@JOVAAN,0,2,3,61,0,100,0,0,0,0,0,45,0,2,0,0,0,0,14,25738,@GO_INFERNAL2,0,0,0,0,0,'Deathbringer Jovaan - Just summoned Set Data GO'),
+(@JOVAAN,0,3,0,61,0,100,0,0,0,0,0,53,0,@JOVAAN,0,0,0,0,1,0,0,0,0,0,0,0,'Deathbringer Jovaan - Just summoned - Start WP movement'),
+(@JOVAAN,0,4,5,40,0,100,0,4,@JOVAAN,0,0,54,45000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathbringer Jovaan - On WP 4 reached - Pause 45 seconds'),
+(@JOVAAN,0,5,0,61,0,100,0,0,0,0,0,80,@JOVAAN*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Deathbringer Jovaan - On WP 4 reached - Run Script');
diff --git a/sql/updates/world/2016_02_08_02_world.sql b/sql/updates/world/2016_02_08_02_world.sql
new file mode 100644
index 00000000000..0f22abafe8e
--- /dev/null
+++ b/sql/updates/world/2016_02_08_02_world.sql
@@ -0,0 +1,10 @@
+--
+UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|1|2|4|8|16|32|64|256|512|1024|2048|4096|8192|65536|131072|524288|4194304|8388608|33554432|67108864|536870912 WHERE `entry` IN (
+37697, -- 10N Volatile Ooze
+38604, -- 10H Volatile Ooze
+38758, -- 25N Volatize Ooze
+38759, -- 25H Volatile Ooze
+37562, -- 10N Gas Cloud
+38602, -- 10H Gas Cloud
+38760, -- 25N Gas Cloud
+38761); -- 25H Gas Cloud
diff --git a/sql/updates/world/2016_02_08_03_world.sql b/sql/updates/world/2016_02_08_03_world.sql
new file mode 100644
index 00000000000..fe429cf42c8
--- /dev/null
+++ b/sql/updates/world/2016_02_08_03_world.sql
@@ -0,0 +1,5 @@
+--
+-- DB/Creature: Frost Freeze Trap - Spellcast
+DELETE FROM `disables` WHERE `sourceType`=0 AND `entry`=70460;
+INSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES
+(0, 70460, 64, '', '', 'Ignore LOS for Coldflame Jets');
diff --git a/sql/updates/world/2016_02_08_04_world.sql b/sql/updates/world/2016_02_08_04_world.sql
new file mode 100644
index 00000000000..f8a9e2c776a
--- /dev/null
+++ b/sql/updates/world/2016_02_08_04_world.sql
@@ -0,0 +1,2 @@
+-- Lock and Load - Procc
+UPDATE `spell_proc_event` SET `SchoolMask`=0, `SpellFamilyName`=9, `SpellFamilyMask0`=0, `SpellFamilyMask1`=0, `SpellFamilyMask2`=0, `procFlags`=2430272, `procEx`=0, `ppmRate`=0, `CustomChance`=0, `Cooldown`=22 WHERE (`entry`=-56342);
diff --git a/sql/updates/world/2016_02_08_05_world.sql b/sql/updates/world/2016_02_08_05_world.sql
new file mode 100644
index 00000000000..d2cc597a6ac
--- /dev/null
+++ b/sql/updates/world/2016_02_08_05_world.sql
@@ -0,0 +1,2 @@
+-- diseases immunity tbc
+UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask` &~ 2097152 WHERE `exp` = 1;
diff --git a/sql/updates/world/2016_02_08_06_world.sql b/sql/updates/world/2016_02_08_06_world.sql
new file mode 100644
index 00000000000..c9e93889790
--- /dev/null
+++ b/sql/updates/world/2016_02_08_06_world.sql
@@ -0,0 +1,2 @@
+-- fix quest reward text for "The Key to the Focusing Iris" and "The Key to the Heroic Focusing Iris"
+UPDATE `quest_offer_reward` SET `RewardText`="These keys are held by the most ancient members of the blue dragonflight. Only they are entrusted with them by their master, Malygos.$b$bThis is the break that we've been waiting for to strike at the Aspect of Magic!$b$b<The queen of dragons studies you for a brief moment.>$b$bYou are not able to use the key as-is to access the Focusing Iris, but I can imbue you with a portion of my power; enough to enable you to use it to open the iris a fraction.$b$bIt will be enough to draw Malygos's ire!" WHERE `ID` in (13372,13375);
diff --git a/sql/updates/world/2016_02_08_07_world.sql b/sql/updates/world/2016_02_08_07_world.sql
new file mode 100644
index 00000000000..1d90630d829
--- /dev/null
+++ b/sql/updates/world/2016_02_08_07_world.sql
@@ -0,0 +1,82 @@
+--
+-- DB/Quest: King of the Foulweald
+DELETE FROM `spell_script_names` WHERE `spell_id`=20783;
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(20783, 'spell_destroy_karangs_banner');
+
+-- remove this stuff - eventscripts will be running even without gameobject
+DELETE FROM `event_scripts` where id=6721;
+
+-- Karang's Banner SAI
+SET @ENTRY := 178205;
+UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=1;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,1,0,0,1,0,100,1,5000,5000,0,0,80,@ENTRY*100+00,2,0,0,0,0,1,0,0,0,0,0,0,0,"Karang's Banner - Out of Combat - Run Script (No Repeat)");
+
+-- Actionlist SAI
+SET @ENTRY := 17820500;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,12,3749,3,180000,0,0,0,8,0,0,0,2237.48,-1524.45,89.7827,0,"On Script - Summon Creature 'Foulweald Ursa'"),
+(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,12,3743,3,180000,0,0,0,8,0,0,0,2202.16,-1544.48,87.796,0,"On Script - Summon Creature 'Foulweald Warrior'"),
+(@ENTRY,9,2,0,0,0,100,0,20000,20000,0,0,12,3750,3,180000,0,0,0,8,0,0,0,2208.93,-1567.59,87.2283,0,"On Script - Summon Creature 'Foulweald Totemic'"),
+(@ENTRY,9,3,0,0,0,100,0,0,0,0,0,12,3749,3,180000,0,0,0,8,0,0,0,2235.44,-1578.43,86.4944,0,"On Script - Summon Creature 'Foulweald Ursa'"),
+(@ENTRY,9,4,0,0,0,100,0,0,0,0,0,12,3743,3,180000,0,0,0,8,0,0,0,2260.9,-1547.91,89.1733,0,"On Script - Summon Creature 'Foulweald Warrior'"),
+(@ENTRY,9,5,0,0,0,100,0,30000,30000,0,0,12,3750,3,180000,0,0,0,8,0,0,0,2237.48,-1524.45,89.7827,0,"On Script - Summon Creature 'Foulweald Totemic'"),
+(@ENTRY,9,6,0,0,0,100,0,0,0,0,0,12,3749,3,180000,0,0,0,8,0,0,0,2202.16,-1544.48,87.796,0,"On Script - Summon Creature 'Foulweald Ursa'"),
+(@ENTRY,9,7,0,0,0,100,0,20000,20000,0,0,12,3743,3,180000,0,0,0,8,0,0,0,2208.93,-1567.59,87.2283,0,"On Script - Summon Creature 'Foulweald Warrior'"),
+(@ENTRY,9,8,0,0,0,100,0,0,0,0,0,12,3750,3,180000,0,0,0,8,0,0,0,2235.44,-1578.43,86.4944,0,"On Script - Summon Creature 'Foulweald Totemic'"),
+(@ENTRY,9,9,0,0,0,100,0,0,0,0,0,12,3749,3,180000,0,0,0,8,0,0,0,2260.9,-1547.91,89.1733,0,"On Script - Summon Creature 'Foulweald Ursa'"),
+(@ENTRY,9,10,0,0,0,100,0,30000,30000,0,0,12,3743,3,180000,0,0,0,8,0,0,0,2237.48,-1524.45,89.7827,0,"On Script - Summon Creature 'Foulweald Warrior'"),
+(@ENTRY,9,11,0,0,0,100,0,0,0,0,0,12,3750,3,180000,0,0,0,8,0,0,0,2202.16,-1544.48,87.796,0,"On Script - Summon Creature 'Foulweald Totemic'"),
+(@ENTRY,9,12,0,0,0,100,0,20000,20000,0,0,12,3749,3,180000,0,0,0,8,0,0,0,2208.93,-1567.59,87.2283,0,"On Script - Summon Creature 'Foulweald Ursa'"),
+(@ENTRY,9,13,0,0,0,100,0,0,0,0,0,12,3743,3,180000,0,0,0,8,0,0,0,2235.44,-1578.43,86.4944,0,"On Script - Summon Creature 'Foulweald Warrior'"),
+(@ENTRY,9,14,0,0,0,100,0,0,0,0,0,12,3750,3,180000,0,0,0,8,0,0,0,2260.9,-1547.91,89.1733,0,"On Script - Summon Creature 'Foulweald Totemic'"),
+(@ENTRY,9,15,0,0,0,100,0,30000,30000,0,0,12,3749,3,180000,0,0,0,8,0,0,0,2237.48,-1524.45,89.7827,0,"On Script - Summon Creature 'Foulweald Ursa'"),
+(@ENTRY,9,16,0,0,0,100,0,0,0,0,0,12,3743,3,180000,0,0,0,8,0,0,0,2202.16,-1544.48,87.796,0,"On Script - Summon Creature 'Foulweald Warrior'"),
+(@ENTRY,9,17,0,0,0,100,0,25000,25000,0,0,12,12918,3,180000,0,0,0,8,0,0,0,2208.93,-1567.59,87.2283,0,"On Script - Summon Creature 'Chief Murgut'");
+
+-- Foulweald Ursa SAI
+SET @ENTRY := 3749;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`>=4;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,4,0,1,0,100,0,2000,2000,20000,20000,69,1,0,0,0,0,0,20,178205,100,0,0,0,0,0,"Foulweald Ursa - Out of Combat - Move To Position"),
+(@ENTRY,0,5,0,34,0,100,0,8,1,0,0,11,20786,0,0,0,0,0,1,0,0,0,0,0,0,0,"Foulweald Ursa - On Reached Point 1 - Cast 'Destroy Karang's Banner'");
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup`=5 AND `SourceEntry`=3749;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(22,5,3749,0,0,30,1,178205,35,0,0,"","Foulweald SAI - ONLY near Banner");
+
+-- Foulweald Warrior SAI
+SET @ENTRY := 3743;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`>=2;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,2,0,1,0,100,0,2000,2000,20000,20000,69,1,0,0,0,0,0,20,178205,100,0,0,0,0,0,"Foulweald Warrior - Out of Combat - Move To Closest Gameobject 'Karang's Banner' (Phase 1)"),
+(@ENTRY,0,3,0,34,0,100,0,8,1,0,0,11,20786,0,0,0,0,0,1,0,0,0,0,0,0,0,"Foulweald Warrior - On Reached Point 1 - Cast 'Destroy Karang's Banner'");
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup`=3 AND `SourceEntry`=3743;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(22,3,3743,0,0,30,1,178205,35,0,0,"","Foulweald SAI - ONLY near Banner");
+
+-- Foulweald Totemic SAI
+SET @ENTRY := 3750;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`>=4;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,4,0,1,0,100,0,2000,2000,20000,20000,69,1,0,0,0,0,0,20,178205,100,0,0,0,0,0,"Foulweald Totemic - Out of Combat - Move To Closest Gameobject 'Karang's Banner' (Phase 1)"),
+(@ENTRY,0,5,0,34,0,100,0,8,1,0,0,11,20786,0,0,0,0,0,1,0,0,0,0,0,0,0,"Foulweald Totemic - On Reached Point 1 - Cast 'Destroy Karang's Banner'");
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup`=5 AND `SourceEntry`=3750;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(22,5,3750,0,0,30,1,178205,35,0,0,"","Foulweald SAI - ONLY near Banner");
+
+-- Chief Murgut SAI
+SET @ENTRY := 12918;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`>=4;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,4,0,1,0,100,0,2000,2000,20000,20000,69,1,0,0,0,0,0,20,178205,100,0,0,0,0,0,"Chief Murgut - Out of Combat - Move To Closest Gameobject 'Karang's Banner' (Phase 1)"),
+(@ENTRY,0,5,0,34,0,100,0,8,1,0,0,11,20786,0,0,0,0,0,1,0,0,0,0,0,0,0,"Chief Murgut - On Reached Point 1 - Cast 'Destroy Karang's Banner'");
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup`=5 AND `SourceEntry`=12918;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(22,5,12918,0,0,30,1,178205,35,0,0,"","Foulweald SAI - ONLY near Banner");
diff --git a/sql/updates/world/2016_02_08_08_world.sql b/sql/updates/world/2016_02_08_08_world.sql
new file mode 100644
index 00000000000..ae4f454bc91
--- /dev/null
+++ b/sql/updates/world/2016_02_08_08_world.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_sha_totemic_mastery';
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(38443, 'spell_sha_totemic_mastery');
diff --git a/sql/updates/world/2016_02_09_00_world.sql b/sql/updates/world/2016_02_09_00_world.sql
new file mode 100644
index 00000000000..c93a1d8fed1
--- /dev/null
+++ b/sql/updates/world/2016_02_09_00_world.sql
@@ -0,0 +1,3 @@
+-- Garhal (Examples To Be Made quest target): Add CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ, spawn time = 60 seconds; closes #16084
+UPDATE `creature_template` SET `flags_extra`=`flags_extra`|2097152 WHERE `entry`=30147;
+UPDATE `creature` SET `spawntimesecs`=60 WHERE `guid`=114369;
diff --git a/sql/updates/world/2016_02_09_01_world.sql b/sql/updates/world/2016_02_09_01_world.sql
new file mode 100644
index 00000000000..7878ea7faa2
--- /dev/null
+++ b/sql/updates/world/2016_02_09_01_world.sql
@@ -0,0 +1,211 @@
+-- Razorfen Kraul (Update SAI)
+-- Razorfen Handler
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4530;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4530;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4530, 0, 0, 0, 9, 0, 100, 0, 0, 30, 2300, 3900, 11, 6660, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Handler - Within 0-30 Range - Cast \'Shoot\'');
+
+-- Razorfen Quilguard
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4436;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4436 AND `id` IN (1, 2);
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4436, 0, 1, 0, 4, 0, 100, 1, 0, 0, 0, 0, 11, 8258, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Quilguard - On Aggro - Cast \'Devotion Aura\''),
+(4436, 0, 2, 0, 0, 0, 100, 0, 4000, 8000, 12000, 16000, 11, 15548, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Quilguard - In Combat - Cast \'Thunderclap\'');
+
+-- Razorfen Geomancer
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4520;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4520 AND `id` IN (0, 1);
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4520, 0, 0, 0, 0, 0, 100, 0, 0, 0, 3400, 4800, 11, 9532, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Geomancer - In Combat CMC - Cast \'Lightning Bolt\''),
+(4520, 0, 1, 0, 25, 0, 100, 0, 0, 0, 0, 0, 11, 8270, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Geomancer - On Reset - Cast to summon Earth Rumbler');
+
+-- Razorfen Defender
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4442;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4442 AND `id` IN (0, 1, 2);
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4442, 0, 0, 0, 0, 0, 100, 1, 1000, 1000, 180000, 180000, 11, 7164, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Defender - In Combat - Cast \'Defensive Stance\''),
+(4442, 0, 1, 0, 0, 0, 100, 0, 6000, 11000, 19000, 25000, 11, 11972, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Defender - In Combat - Cast \'Shield Bash\''),
+(4442, 0, 2, 0, 0, 0, 100, 0, 2000, 5000, 12000, 15000, 11, 3248, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Defender - In Combat - Cast \'Improved Blocking\'');
+
+-- Death's Head Adept
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4516;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4516;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4516, 0, 0, 0, 0, 0, 100, 2, 0, 0, 2400, 3800, 11, 9672, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Death\'s Head Adept - In Combat CMC - Cast \'Frostbolt\''),
+(4516, 0, 1, 0, 0, 0, 100, 2, 3000, 6000, 10000, 15000, 11, 113, 1, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Death\'s Head Adept - In Combat - Cast \'Chains of Ice\' '),
+(4516, 0, 2, 0, 2, 0, 100, 3, 0, 15, 0, 0, 25, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Death\'s Head Adept - Between 0-15% Health - Flee For Assist (No Repeat)');
+
+-- Razorfen Groundshaker
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4523;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4523;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4523, 0, 0, 0, 0, 0, 100, 0, 7700, 14500, 11000, 26300, 11, 6524, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Groundshaker - In Combat - Cast \'Ground Tremor\''),
+(4523, 0, 1, 0, 0, 0, 100, 0, 3000, 6000, 10000, 15000, 11, 8046, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Groundshaker - In Combat - Cast \'Earth Shock\'');
+
+-- Razorfen Beastmaster
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4532;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4532;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4532, 0, 0, 0, 9, 0, 100, 0, 0, 30, 2300, 3900, 11, 6660, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Beastmaster - Within 0-30 Range - Cast \'Shoot\''),
+(4532, 0, 1, 0, 25, 0, 100, 0, 0, 0, 0, 0, 11, 8276, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Beastmaster - On Reset - Cast to summon Tamed Hyena'),
+(4532, 0, 2, 0, 9, 0, 100, 1, 0, 30, 4000, 6000, 11, 8275, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Beastmaster - Within 0-30 Range - Cast \'Poisoned Shot\'(No Repeat)');
+
+ -- Razorfen Dustweaver
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4522;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4522;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4522, 0, 0, 0, 0, 0, 100, 0, 12000, 12000, 28000, 28000, 11, 6728, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Dustweaver - In Combat - Cast \'Enveloping Winds\'');
+
+-- Razorfen Beast Trainer
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4531;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4531;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4531, 0, 0, 0, 0, 0, 100, 0, 0, 30, 2300, 3900, 11, 6660, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Beast Trainer - Within 0-30 Range - Cast \'Shoot\''),
+(4531, 0, 1, 0, 0, 0, 100, 0, 0, 30, 4000, 6000, 11, 6984, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Beast Trainer - Within 0-30 Range - Cast \'Frost Shot\'');
+
+-- Aggem Thorncurse <Death's Head Prophet>
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4424;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4424;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4424, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 9128, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Aggem Thorncurse - In Combat - Cast \'Battle Shout\''),
+(4424, 0, 1, 0, 0, 0, 100, 0, 10000, 10000, 26000, 26000, 11, 8286, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Aggem Thorncurse - In Combat - Cast \'Summon Boar Spirit\'');
+
+-- Razorfen Totemic
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4440;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4440;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4440, 0, 0, 0, 0, 0, 100, 0, 6000, 6000, 30000, 30000, 11, 4971, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Totemic - In Combat - Cast \'Healing Ward\' (No Repeat)'),
+(4440, 0, 1, 0, 0, 0, 100, 0, 4000, 4000, 32000, 32000, 11, 8376, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Totemic - In Combat - Cast \'Earthgrab Totem\'');
+
+-- Death Speaker Jargba
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4428;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4428;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4428, 0, 0, 0, 0, 0, 100, 2, 0, 0, 2400, 3800, 11, 9613, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Death Speaker Jargba - In Combat CMC - Cast \'Shadow Bolt\''),
+(4428, 0, 1, 0, 0, 0, 100, 2, 7000, 10000, 10000, 15000, 11, 14515, 1, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 'Death Speaker Jargba - In Combat - Cast \'Dominate Mind\'');
+
+-- Quilguard Champion
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4623;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4623;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4623, 0, 0, 0, 4, 0, 100, 1, 0, 0, 0, 0, 11, 8258, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Quilguard Champion - On Aggro - Cast \'Devotion Aura\''),
+(4623, 0, 1, 0, 0, 0, 100, 1, 1000, 1000, 180000, 180000, 11, 7164, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Quilguard Champion - In Combat - Cast \'Defensive Stance\''),
+(4623, 0, 2, 0, 0, 0, 100, 0, 2000, 10000, 6000, 15000, 11, 15572, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Quilguard Champion - In Combat - Cast \'Sunder Armor\'(No Repeat)');
+
+-- Overlord Ramtusk
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4420;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4420 AND `id` IN (1, 2);
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES (4420, 0, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 9128, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overlord Ramtusk - In Combat - Cast \'Battle Shout\''),
+(4420, 0, 2, 0, 0, 0, 100, 0, 4000, 8000, 12000, 16000, 11, 15548, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overlord Ramtusk - In Combat - Cast \'Thunderclap\'');
+
+-- Razorfen Earthbreaker
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4525;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4525;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES (4525, 0, 0, 0, 0, 0, 100, 0, 7700, 14500, 11000, 26300, 11, 8272, 32, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Groundshaker - In Combat - Cast \'Mind Tremor\''),
+(4525, 0, 1, 0, 0, 0, 100, 0, 3000, 6000, 10000, 15000, 11, 8046, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Groundshaker - In Combat - Cast \'Earth Shock\'');
+
+-- Kraul Bat
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4538;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4538;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4538, 0, 0, 0, 0, 0, 100, 0, 5000, 8000, 10000, 12000, 11, 12553, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Kraul Bat - In Combat - Cast \'Shock\'');
+
+-- Ward Guardian
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4427;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4427;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4427, 0, 0, 0, 14, 0, 100, 0, 500, 40, 10000, 12000, 11, 959, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ward Guardian - Friendly At 500 Health - Cast \'Healing Wave\''),
+(4427, 0, 1, 0, 9, 0, 100, 0, 0, 35, 3400, 4800, 11, 8400, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Ward Guardian - Within 0-35 Range - Cast \'Fireball\'');
+
+-- Agathelos the Raging
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4422;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4422;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4422, 0, 0, 0, 0, 0, 100, 0, 5000, 8000, 12000, 14000, 11, 8285, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Agathelos the Raging - In Combat - Cast \'Rampage\'');
+
+-- Death's Head Priest
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4517;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4517;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4517, 0, 0, 0, 1, 0, 100, 2, 1000, 1000, 1800000, 1800000, 11, 1245, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Death\'s Head Priest - Out of Combat - Cast \'Power Word: Fortitude\''),
+(4517, 0, 1, 0, 0, 0, 100, 2, 0, 0, 2400, 3800, 11, 9613, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Death\'s Head Priest - In Combat CMC - Cast \'Shadow Bolt\' (No Repeat)'),
+(4517, 0, 2, 0, 2, 0, 100, 2, 0, 40, 14000, 20000, 11, 6063, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Death\'s Head Priest - Between 0-40% Health - Cast \'Heal\' (Normal Dungeon)'),
+(4517, 0, 3, 0, 2, 0, 100, 3, 0, 15, 0, 0, 25, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Death\'s Head Priest - Between 0-15% Health - Flee For Assist (No Repeat)');
+
+-- Razorfen Warden
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4437;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4437;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4437, 0, 0, 0, 0, 0, 100, 0, 3500, 7500, 20100, 33400, 11, 6533, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Razorfen Warden - In Combat - Cast \'Net\' (No Repeat)');
+
+-- Raging Agam'ar
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4514;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4514;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4514, 0, 0, 0, 2, 0, 100, 1, 0, 50, 0, 0, 11, 8269, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Raging Agam\'ar - Between 0-50% Health - Cast \'Frenzy\'');
+
+-- Agam'ar
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4511;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4511;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4511, 0, 0, 0, 4, 0, 15, 1, 0, 0, 0, 0, 11, 6268, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Agam\'ar - On Aggro - Cast \'Rushing Charge\' (No Repeat)');
+
+-- Blood of Agamaggan
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4541;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4541;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4541, 0, 0, 0, 0, 0, 100, 0, 5000, 9000, 15000, 25000, 11, 8282, 32, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Blood of Agamaggan - In Combat - Cast \'Curse of Blood\'');
+
+-- Roogug
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=6168;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=6168;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(6168, 0, 0, 0, 0, 0, 100, 0, 0, 40, 3700, 7500, 11, 9532, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Roogug - In Combat CMC - Cast \'Lightning Bolt\''),
+(6168, 0, 1, 0, 0, 0, 100, 0, 0, 30, 6000, 8000, 11, 943, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Roogug - In Combat - Cast \'Lightning Bolt\'');
+
+-- Charlga Razorflank <The Crone> SAI
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4421;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4421 AND `source_type`=0;
+
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(4421, 0, 0, 0, 4, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Charlga Razorflank - On Aggro - Yell Line 0'),
+(4421, 0, 1, 0, 5, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Charlga Razorflank - On Killed Unit - Yell Line 1'),
+(4421, 0, 2, 0, 2, 0, 100, 1, 0, 75, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Charlga Razorflank - Between 0-75% Health - Yell Line 2''(No Repeat)'),
+(4421, 0, 3, 0, 2, 0, 100, 1, 0, 50, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Charlga Razorflank - Between 0-50% Health - Yell Line 3''(No Repeat)'),
+(4421, 0, 4, 0, 2, 0, 100, 1, 0, 25, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Charlga Razorflank - Between 0-25% Health - Yell Line 4''(No Repeat)'),
+(4421, 0, 5, 0, 0, 0, 100, 0, 0, 0, 78000, 78000, 11, 8361, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Charlga Razorflank - In combat - Cast \'Purity\''),
+(4421, 0, 6, 0, 2, 0, 100, 0, 0, 80, 15000, 18000, 11, 6077, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Charlga Razorflank - Between 0-80% Health - Cast \'Renew\''),
+(4421, 0, 7, 0, 0, 0, 100, 0, 6000, 6000, 8000, 8000, 11, 8292, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Charlga Razorflank - In Combat - Cast \'Chain Bolt\''),
+(4421, 0, 8, 0, 3, 0, 100, 0, 0, 5, 0, 0, 11, 8358, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Charlga Razorflank - Between 0-5% Mana - Cast \'Mana Spike\'');
+
+DELETE FROM `creature_text` WHERE `entry`= 4421 AND `groupid` IN (0, 1, 2, 3, 4);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES
+(4421,0,0,"Troublesome whelps. I'll teach you to interfere!", 14,0,100,0,0,0,6179,3,'Charlga Razorflank - on initial aggro'),
+(4421,1,0,"Who's next?", 14,0,100,0,0,0,6180,3,'Charlga Razorflank - killing a player'),
+(4421,2,0,"You outsiders will pay for encroaching on our land!",14,0,100,0,0,0,6181,3,'Charlga Razorflank - on 75% hp reached'),
+(4421,3,0,"Bah! My power rules here!", 14,0,100,0,0,0,6182,3,'Charlga Razorflank - on 50% hp reached'),
+(4421,4,0,"Our new allies will avenge us!", 14,0,100,0,0,0,6183,3,'Charlga Razorflank - on 25% hp reached');
diff --git a/sql/updates/world/2016_02_09_02_world.sql b/sql/updates/world/2016_02_09_02_world.sql
new file mode 100644
index 00000000000..891c8c2ff4b
--- /dev/null
+++ b/sql/updates/world/2016_02_09_02_world.sql
@@ -0,0 +1,21 @@
+-- Sunblade Mage Guard SAI
+SET @ENTRY := 24683;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,1,1,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Out of Combat - Disable Combat Movement"),
+(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,20,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Out of Combat - Stop Attacking"),
+(@ENTRY,0,2,0,0,0,100,7,0,0,0,0,11,44475,1,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - In Combat - Cast 'Magic Dampening Field' (No Repeat) (Dungeon)"),
+(@ENTRY,0,3,4,9,0,100,0,0,60,5000,5000,11,44478,0,0,0,0,0,2,0,0,0,0,0,0,0,"Sunblade Mage Guard - Within 0-60 Range - Cast 'Glaive Throw'"),
+(@ENTRY,0,4,0,61,0,100,0,0,60,5000,5000,40,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Within 0-60 Range - Set Sheath Ranged"),
+(@ENTRY,0,5,6,9,0,100,0,45,80,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Within 45-80 Range - Enable Combat Movement"),
+(@ENTRY,0,6,0,61,0,100,0,45,80,0,0,20,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Within 45-80 Range - Start Attacking"),
+(@ENTRY,0,7,0,9,0,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Within 0-5 Range - Enable Combat Movement"),
+(@ENTRY,0,8,9,9,0,100,0,0,0,0,0,40,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Within 0-0 Range - Set Sheath Melee"),
+(@ENTRY,0,9,0,61,0,100,0,0,0,0,0,20,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Within 0-0 Range - Start Attacking"),
+(@ENTRY,0,10,11,9,0,100,0,5,20,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Within 5-20 Range - Disable Combat Movement"),
+(@ENTRY,0,11,0,61,0,100,0,5,20,0,0,20,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Within 5-20 Range - Stop Attacking"),
+(@ENTRY,0,12,0,2,0,100,7,0,15,0,0,23,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Between 0-15% Health - Increment Phase (No Repeat) (Dungeon)"),
+(@ENTRY,0,13,14,2,0,100,1,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - Between 0-15% Health - Enable Combat Movement (No Repeat)"),
+(@ENTRY,0,14,0,61,0,100,1,0,15,0,0,25,1,0,0,0,0,0,7,0,0,0,0,0,0,0,"Sunblade Mage Guard - Between 0-15% Health - Flee For Assist (No Repeat)"),
+(@ENTRY,0,15,0,7,0,100,0,0,0,0,0,40,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunblade Mage Guard - On Evade - Set Sheath Melee");
diff --git a/sql/updates/world/2016_02_09_02_world_335.sql b/sql/updates/world/2016_02_09_02_world_335.sql
new file mode 100644
index 00000000000..a8612c5d88d
--- /dev/null
+++ b/sql/updates/world/2016_02_09_02_world_335.sql
@@ -0,0 +1,29 @@
+-- move script 'npc_myranda_the_hag' to SAI (PR #16438)
+UPDATE `gossip_menu_option` SET `option_id`=1 WHERE `menu_id`=3801;
+DELETE FROM `gossip_menu` WHERE `entry`=3801 AND `text_id`=4773;
+INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES
+(3801, 4773);
+
+UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=11872;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=11872 AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(11872, 0, 0, 1, 62, 0, 100, 0, 3801, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Myranda the Hag - On Gossip Option 0 Selected - Close Gossip'),
+(11872, 0, 1, 0, 61, 0, 100, 0, 3801, 0, 0, 0, 85, 17961, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Myranda the Hag - On Gossip Option 0 Selected - Invoker Cast \'Scarlet Illusion\'');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=3801;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=3801;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(15, 3801, 0, 0, 0, 28, 0, 5862, 0, 0, 0, 0, 0, '', 'Only show gossip menu option if quest \'Scarlet Subterfuge\' is complete'),
+(15, 3801, 0, 0, 0, 28, 0, 5944, 0, 0, 1, 0, 0, '', 'Only show gossip menu option if quest \'In Dreams\' is not complete'),
+(15, 3801, 0, 0, 0, 8, 0, 5944, 0, 0, 1, 0, 0, '', 'Only show gossip menu option if quest \'In Dreams\' is not rewarded'),
+(15, 3801, 0, 0, 0, 1, 0, 17961, 0, 0, 1, 0, 0, '', 'Only show gossip menu option if no \'Scarlet Illusion\' Aura'),
+(15, 3801, 0, 0, 1, 8, 0, 5862, 0, 0, 0, 0, 0, '', 'Only show gossip menu option if quest \'Scarlet Subterfuge\' is rewarded'),
+(15, 3801, 0, 0, 1, 28, 0, 5944, 0, 0, 1, 0, 0, '', 'Only show gossip menu option if quest \'In Dreams\' is not complete'),
+(15, 3801, 0, 0, 1, 8, 0, 5944, 0, 0, 1, 0, 0, '', 'Only show gossip menu option if quest \'In Dreams\' is not rewarded'),
+(15, 3801, 0, 0, 1, 1, 0, 17961, 0, 0, 1, 0, 0, '', 'Only show gossip menu option if no \'Scarlet Illusion\' Aura'),
+(14, 3801, 4773, 0, 0, 28, 0, 5862, 0, 0, 0, 0, 0, '', 'Only show text if quest \'Scarlet Subterfuge\' is complete'),
+(14, 3801, 4773, 0, 0, 28, 0, 5944, 0, 0, 1, 0, 0, '', 'Only show text if quest \'In Dreams\' is not complete'),
+(14, 3801, 4773, 0, 0, 8, 0, 5944, 0, 0, 1, 0, 0, '', 'Only show text if quest \'In Dreams\' is not rewarded'),
+(14, 3801, 4773, 0, 1, 8, 0, 5862, 0, 0, 0, 0, 0, '', 'Only show text if quest \'Scarlet Subterfuge\' is rewarded'),
+(14, 3801, 4773, 0, 1, 28, 0, 5944, 0, 0, 1, 0, 0, '', 'Only show text if quest \'In Dreams\' is not complete'),
+(14, 3801, 4773, 0, 1, 8, 0, 5944, 0, 0, 1, 0, 0, '', 'Only show text if quest \'In Dreams\' is not rewarded');
diff --git a/sql/updates/world/2016_02_09_03_world.sql b/sql/updates/world/2016_02_09_03_world.sql
new file mode 100644
index 00000000000..bd012f0d172
--- /dev/null
+++ b/sql/updates/world/2016_02_09_03_world.sql
@@ -0,0 +1,124 @@
+--
+-- DB/Quest: Translation to Ello
+DELETE FROM `waypoints` WHERE `entry`=412;
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`) VALUES
+(412, 1, -10290.1, 73.7148, 38.849),
+(412, 2, -10290.4, 81.547, 38.7702),
+(412, 3, -10283.2, 86.6661, 38.7694),
+(412, 4, -10271.1, 83.5772, 39.1122),
+(412, 5, -10266, 76.0585, 39.4047),
+(412, 6, -10272.4, 65.7703, 39.524),
+(412, 7, -10283.4, 59.1681, 40.6902),
+(412, 8, -10300.2, 45.8306, 47.3053),
+(412, 9, -10315.3, 45.1015, 48.0097),
+(412, 10, -10324.4, 38.7441, 47.3935),
+(412, 11, -10330.2, 27.0829, 50.5753),
+(412, 12, -10335.3, 13.4164, 50.1259),
+(412, 13, -10342.2, 3.3501, 51.1675),
+(412, 14, -10354.6, -13.0266, 47.1154),
+(412, 15, -10379.4, -27.1456, 49.2841),
+(412, 16, -10401, -30.8108, 48.1353),
+(412, 17, -10416.5, -28.4794, 48.4772),
+(412, 18, -10436.4, -34.2376, 46.5064),
+(412, 19, -10468.7, -38.8985, 48.7035),
+(412, 20, -10500.2, -44.6662, 45.882),
+(412, 21, -10539.1, -39.3422, 43.0622),
+(412, 22, -10568, -35.1434, 37.2048),
+(412, 23, -10585.6, -37.5056, 37.4296),
+(412, 24, -10606.3, -51.7202, 36.0713),
+(412, 25, -10629.2, -64.211, 32.6163),
+(412, 26, -10645.9, -73.4561, 32.7337),
+(412, 27, -10671, -81.8316, 35.6535),
+(412, 28, -10687.6, -85.57, 34.1549),
+(412, 29, -10702.8, -89.2772, 37.9242),
+(412, 30, -10709.1, -97.5837, 37.892),
+(412, 31, -10725.6, -101.348, 34.5892),
+(412, 32, -10748, -99.1517, 38.2323),
+(412, 33, -10759.9, -93.0657, 38.5876),
+(412, 34, -10774.9, -89.8001, 34.8007),
+(412, 35, -10788.6, -86.7376, 33.4988),
+(412, 36, -10802.7, -88.6347, 29.0679),
+(412, 37, -10811.5, -97.1736, 29.2451),
+(412, 38, -10821.4, -121.335, 30.142),
+(412, 39, -10826.2, -134.391, 31.7845),
+(412, 40, -10830.6, -148.284, 31.7985),
+(412, 41, -10835.3, -164.201, 33.8299),
+(412, 42, -10840.4, -182.63, 34.0254),
+(412, 43, -10843.3, -193.104, 35.8227),
+(412, 44, -10848.7, -215.175, 37.7986),
+(412, 45, -10851.7, -235.779, 38.6853),
+(412, 46, -10857.4, -264.019, 38.0974),
+(412, 47, -10866.6, -293.454, 37.9429),
+(412, 48, -10882.9, -332.562, 37.9688),
+(412, 49, -10900, -365.26, 39.4542),
+(412, 50, -10904.1, -393.833, 41.0451),
+(412, 51, -10905.7, -431.964, 42.7237),
+(412, 52, -10908, -461.901, 46.7191),
+(412, 53, -10911.2, -510.492, 52.0594),
+(412, 54, -10915.1, -533.78, 53.8047),
+(412, 55, -10927, -565.685, 54.042),
+(412, 56, -10936.5, -581.62, 53.8887),
+(412, 57, -10950.1, -597.371, 55.177),
+(412, 58, -10957.9, -619.554, 55.0689),
+(412, 59, -10958.8, -637.183, 55.2047),
+(412, 60, -10954.3, -652.46, 55.4423),
+(412, 61, -10931.8, -681.568, 55.3955),
+(412, 62, -10916.9, -710.733, 55.6988),
+(412, 63, -10902.9, -734.1, 55.1313),
+(412, 64, -10878.3, -760.091, 55.5638),
+(412, 65, -10851.1, -787.76, 56.1885),
+(412, 66, -10831.9, -818.655, 56.2795),
+(412, 67, -10825.2, -833.223, 55.5758),
+(412, 68, -10808.3, -873.497, 55.9567),
+(412, 69, -10796.7, -912.719, 55.8731),
+(412, 70, -10796.1, -934.562, 56.2303),
+(412, 71, -10800.5, -949.721, 56.5614),
+(412, 72, -10807.1, -969.027, 56.2941),
+(412, 73, -10806.8, -992.166, 53.8349),
+(412, 74, -10804.6, -1030.41, 47.0768),
+(412, 75, -10801.3, -1047.26, 44.0233),
+(412, 76, -10787.8, -1074.49, 37.7652),
+(412, 77, -10783.3, -1095.07, 33.6488),
+(412, 78, -10781.2, -1112.66, 30.3863),
+(412, 79, -10763.6, -1138.91, 27.0977),
+(412, 80, -10738, -1158.02, 26.4475),
+(412, 81, -10705.3, -1179.29, 26.3723),
+(412, 82, -10682.3, -1190.45, 27.2793),
+(412, 83, -10662.5, -1193.06, 28.2884),
+(412, 84, -10641.6, -1189.92, 28.5594),
+(412, 85, -10615.7, -1182.78, 28.5022),
+(412, 86, -10586.8, -1177.32, 28.3931),
+(412, 87, -10576.4, -1179.26, 28.1946),
+(412, 88, -10566.7, -1189.27, 27.8756),
+(412, 89, -10557, -1192.38, 28.0606),
+(412, 90, -10550.4, -1185.71, 27.8428),
+(412, 91, -10554.4, -1167.97, 27.5984);
+
+-- Lord Ello Ebonlocke SAI
+SET @ENTRY := 263;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,0,1,0,100,0,20000,30000,120000,120000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lord Ello Ebonlocke - Out of Combat - Say Line 0"),
+(@ENTRY,0,1,0,20,0,100,0,252,0,0,0,12,412,3,3600000,0,0,0,8,0,0,0,-10290.171875,72.781136,38.881119,4.801499,"Lord Ello Ebonlocke - On Quest 'Translation to Ello' Finished - Summon Creature 'Stitches'");
+
+-- Stitches SAI
+SET @ENTRY := 412;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,0,0,0,100,0,6900,12100,3500,11300,11,3106,0,0,0,0,0,2,0,0,0,0,0,0,0,"Stitches - In Combat - Cast 'Aura of Rot'"),
+(@ENTRY,0,1,2,54,0,100,0,0,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stitches - On Just Summoned - Set Active On"),
+(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,53,1,412,0,0,0,2,0,0,0,0,0,0,0,0,"Stitches - On Just Summoned - Start Waypoint"),
+(@ENTRY,0,3,0,40,0,100,0,47,412,0,0,1,0,0,0,0,0,0,19,468,200,0,0,0,0,0,"Stitches - On Waypoint 47 Reached - Say Line 0"),
+(@ENTRY,0,5,6,40,0,100,0,50,412,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stitches - On Waypoint 50 Reached - Say Line 0"),
+(@ENTRY,0,6,0,61,0,100,0,50,412,0,0,1,1,0,0,0,0,0,19,468,200,0,0,0,0,0,"Stitches - On Waypoint 50 Reached - Say Line 1"),
+(@ENTRY,0,7,8,40,0,100,0,91,412,0,0,101,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stitches - On Waypoint 91 Reached - Set Home Position"),
+(@ENTRY,0,8,0,61,0,100,0,91,412,0,0,89,20,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stitches - On Waypoint 91 Reached - Start Random Movement");
+
+DELETE FROM `creature_text` WHERE `entry` IN (468, 412);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextId`) VALUES
+(468, 0, 0, 'An abomination of the undead is approaching!', 14, 0, 100, 0, 0, 0, 'Guard', 89),
+(468, 1, 0, 'The abomination has overrun the Night Watch camp! Quickly, we must intercept it before it reaches town!', 14, 0, 100, 0, 0, 0, 'Guard', 90),
+(412, 0, 0, 'ROARRRRR!!', 14, 0, 100, 0, 0, 0, 'Stitches', 278),
+(412, 0, 1, 'DARKSHIRE... I HUNGER!!', 14, 0, 100, 0, 0, 0, 'Stitches', 277);
diff --git a/sql/updates/world/2016_02_09_04_world.sql b/sql/updates/world/2016_02_09_04_world.sql
new file mode 100644
index 00000000000..015ab519557
--- /dev/null
+++ b/sql/updates/world/2016_02_09_04_world.sql
@@ -0,0 +1,5 @@
+--
+SET @SPELL_ATTR0_CU_ALLOW_INFLIGHT_TARGET := 262144;
+DELETE FROM `spell_custom_attr` WHERE `entry`=43419;
+INSERT INTO `spell_custom_attr` (`entry`, `attributes`) VALUES
+(43419, @SPELL_ATTR0_CU_ALLOW_INFLIGHT_TARGET);
diff --git a/sql/updates/world/2016_02_09_05_world.sql b/sql/updates/world/2016_02_09_05_world.sql
new file mode 100644
index 00000000000..3612c270d02
--- /dev/null
+++ b/sql/updates/world/2016_02_09_05_world.sql
@@ -0,0 +1,62 @@
+--
+-- DB/Quest: Absholutely... Thish Will Work (11330)
+SET @Prisoner :=24284; -- Dragonflayer Vrykul Prisoner
+SET @PeppysMix :=43386; -- Spell Peppy's Special Mix
+SET @WGDefender :=23842; -- Westguard Defender
+SET @WGDguid1 :=99009; -- Westguard Defender Guid 1
+SET @WGDguid2 :=99010; -- Westguard Defender Guid 2
+SET @WGDguid3 :=99008; -- Westguard Defender Guid 3
+SET @WGDguid4 :=99013; -- Westguard Defender Guid 4
+SET @WGOfficer :=23844; -- Westguard Officer
+SET @WGOguid :=99195; -- Westguard Officer Guid
+SET @HumoVerde :=18951; -- Spirit Particles (green) / humo verde
+SET @CuerpoVerde:=39168; -- Vertex Color Green / efecto verde
+SET @MocoVerde :=28989; -- Plague Slime (Green) / Morph de Moco-Ooze
+SET @Crazed :=48147; -- Crazed (enrage) - Only Defender
+SET @Defensive :=7164; -- Defensive stance
+SET @ImpBlocking:=3639; -- improved blocking
+SET @ShieldBash :=11972; -- Shield Bash
+SET @Shoot :=6660; -- Shoot
+SET @DemorlShout:=16244; -- Demoralizing Shout - Only Officer
+
+UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry` IN (@Prisoner,@WGDefender,@WGOfficer);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@Prisoner,@WGDefender,@WGOfficer) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@Prisoner*100) AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(@Prisoner,0,0,0,8,0,100,0,@PeppysMix,0,0,0,80,@Prisoner*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - On Spell Hit (Olakin''s Torch) - Run Script'),
+(@Prisoner*100,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Say'),
+(@Prisoner*100,9,1,0,0,0,100,0,3000,3000,0,0,11,@HumoVerde,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Cast Spirit Particles (green)'),
+(@Prisoner*100,9,2,0,0,0,100,0,1000,1000,0,0,45,1,1,0,0,0,0,10,@WGDguid1,@WGDefender,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Set Data to Westguard Defender'),
+(@Prisoner*100,9,3,0,0,0,100,0,3000,3000,0,0,45,1,1,0,0,0,0,10,@WGDguid3,@WGDefender,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Set Data to Westguard Defender'),
+(@Prisoner*100,9,4,0,0,0,100,0,2000,2000,0,0,11,@CuerpoVerde,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Vertex Color Green'),
+(@Prisoner*100,9,5,0,0,0,100,0,2000,2000,0,0,45,1,1,0,0,0,0,10,@WGDguid2,@WGDefender,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Set Data to Westguard Defender'),
+(@Prisoner*100,9,6,0,0,0,100,0,3000,3000,0,0,45,1,1,0,0,0,0,10,@WGDguid4,@WGDefender,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Set Data to Westguard Defender'),
+(@Prisoner*100,9,7,0,0,0,100,0,2000,2000,0,0,11,@MocoVerde,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Plague Slime (Green)'),
+(@Prisoner*100,9,8,0,0,0,100,0,3000,3000,0,0,45,1,1,0,0,0,0,10,@WGOguid,@WGOfficer,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Set Data to Westguard Defender'),
+(@Prisoner*100,9,9,0,0,0,100,0,2000,2000,0,0,33,@Prisoner,0,0,0,0,0,7,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Call Killedmonster'),
+(@Prisoner*100,9,10,0,0,0,100,0,20000,20000,0,0,28,@HumoVerde,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Remove Spirit Particles'),
+(@Prisoner*100,9,11,0,0,0,100,0,0,0,0,0,28,@CuerpoVerde,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Remove Vertex Color Green'),
+(@Prisoner*100,9,12,0,0,0,100,0,0,0,0,0,28,@MocoVerde,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Remove Plage Slime'),
+(@WGDefender,0,0,0,38,0,100,0,1,1,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - On Data set - Say'),
+(@WGDefender,0,1,0,0,0,100,0,5000,15000,20000,40000,11,@Crazed,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast Crazed'),
+(@WGDefender,0,2,0,0,0,100,1,500,500,0,0,11,@Defensive,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast Defensive'),
+(@WGDefender,0,3,0,0,0,100,0,1000,3000,10400,10400,11,@ImpBlocking,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast Improved Blocking'),
+(@WGDefender,0,4,0,0,0,100,0,2000,5000,10000,21000,11,@ShieldBash,0,0,0,0,0,2,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast ShieldBash'),
+(@WGDefender,0,5,0,0,0,100,0,0,5000,1000,6000,11,@Shoot,0,0,0,0,0,2,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast Shoot'),
+(@WGOfficer,0,0,0,38,0,100,0,1,1,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Officer - On Data set - Say'),
+(@WGOfficer,0,1,0,0,0,100,0,10000,15000,20000,30000,11,@DemorlShout,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Officer - IC - Cast Demoralizing Shout'),
+(@WGOfficer,0,2,0,0,0,100,1,500,500,0,0,11,@Defensive,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Officer - IC - Cast Defensive'),
+(@WGOfficer,0,3,0,0,0,100,0,1000,3000,10400,10400,11,@ImpBlocking,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Officer - IC - Cast Improved Blocking'),
+(@WGOfficer,0,4,0,0,0,100,0,2000,5000,8000,21000,11,@ShieldBash,0,0,0,0,0,2,0,0,0,0,0,0,0,'Westguard Officer - IC - Cast ShieldBash'),
+(@WGOfficer,0,5,0,0,0,100,0,0,5000,1000,6000,11,@Shoot,0,0,0,0,0,2,0,0,0,0,0,0,0,'Westguard Officer - IC - Cast Shoot');
+
+DELETE FROM `creature_text` WHERE `entry` IN (@Prisoner,@WGDefender,@WGOfficer);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES
+(@Prisoner,0,0,'The vrykul clutches at his throat as he begins to gag and thrash about.',16,0,100,1,0,0,'Dragonflayer Vrykul Prisoner', 23087),
+(@WGOfficer,0,0,'Is he okay?',12,0,100,1,0,0,'Westguard Officer - Say', 23105),
+(@WGDefender,0,0,'Yikes.',12,0,100,1,0,0,'Westguard Defender - Say', 23104),
+(@WGDefender,0,1,'Captain''s not gonna like this.',12,0,100,1,0,0,'Westguard Defender - Say', 23106),
+(@WGDefender,0,2,'What kind of sicko are you?',12,0,100,1,0,0,'Westguard Defender - Say', 23095),
+(@WGDefender,0,3,'Heh, cool!',12,0,100,1,0,0,'Westguard Defender - Say', 23094),
+(@WGDefender,0,4,'That''s the new Forsaken plague?',12,0,100,1,0,0,'Westguard Defender - Say', 23098),
+(@WGDefender,0,5,'Oh, sick!',12,0,100,1,0,0,'Westguard Defender - Say', 23091);
diff --git a/sql/updates/world/2016_02_09_06_world.sql b/sql/updates/world/2016_02_09_06_world.sql
new file mode 100644
index 00000000000..03fe998cca5
--- /dev/null
+++ b/sql/updates/world/2016_02_09_06_world.sql
@@ -0,0 +1,14 @@
+-- Karazhan Optional Boss spawn
+-- Hyakiss the Lurker SAI
+SET @ENTRY := 16179;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,0,0,0,100,0,5000,5000,35000,35000,11,29901,0,0,0,0,0,2,0,0,0,0,0,0,0,"Hyakiss the Lurker - In Combat - Cast 'Acidic Fang'");
+
+-- Rokad the Ravager SAI
+SET @ENTRY := 16181;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,0,0,0,100,0,2000,3000,12000,15000,11,29906,0,0,0,0,0,2,0,0,0,0,0,0,0,"Rokad the Ravager - In Combat - Cast 'Ravage'");
diff --git a/sql/updates/world/2016_02_09_07_world.sql b/sql/updates/world/2016_02_09_07_world.sql
new file mode 100644
index 00000000000..84d65e2eda5
--- /dev/null
+++ b/sql/updates/world/2016_02_09_07_world.sql
@@ -0,0 +1,77 @@
+UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry` IN(23842,24284);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(23842,24284) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(23844) AND `source_type`=0 AND `id`=0;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(2428400,2428401,2384200) AND `source_type`=9;
+
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(23842,0,0,0,38,0,30,0,1,1,0,0,80,2384200,2,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - On Data Set - Run Script'),
+(23842,0,1,0,0,0,100,0,5000,15000,20000,40000,11,48147,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast Crazed'),
+(23842,0,2,0,0,0,100,1,500,500,0,0,11,7164,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast Defensive'),
+(23842,0,3,0,0,0,100,0,1000,3000,10400,10400,11,3639,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast Improved Blocking'),
+(23842,0,4,0,0,0,100,0,2000,5000,10000,21000,11,11972,0,0,0,0,0,2,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast ShieldBash'),
+(23842,0,5,0,0,0,100,0,0,5000,1000,6000,11,6660,0,0,0,0,0,2,0,0,0,0,0,0,0,'Westguard Defender - IC - Cast Shoot'),
+(24284,0,0,0,8,0,100,0,43386,0,0,0,80,2428400,2,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - On Spell Hit (Peppys Special Mix) - Run Script'),
+(24284,0,1,2,40,0,100,0,1,24284,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - On Reached WP1 - Say Line 0'),
+(24284,0,2,0,61,0,100,0,0,0,0,0,54,1000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - On Reached WP1 - Pause WP'),
+(24284,0,3,4,40,0,100,0,9,24284,0,0,11,43401,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - On Reached WP9 - Cast Cosmetic - Blood Explosion Green - Large'),
+(24284,0,4,5,61,0,100,0,0,0,0,0,3,0,1145,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - On Reached WP9 - Change displayid to 1145'),
+(24284,0,5,0,61,0,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - On Reached WP9 - Set Phase 2'),
+(24284,0,6,0,1,2,100,1,4000,4000,0,0,80,2428401,2,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - OOC (Phase 2) - Run Script'),
+(2384200,9,0,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,19,24288,0,0,0,0,0,0,'Westguard Defender - Script - Face Target'), -- 19:36:43.046
+(2384200,9,1,0,0,0,100,0,0,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - Script - Set Bytes 1'), -- 19:36:43.046
+(2384200,9,2,0,0,0,100,0,1000,1000,0,0,11,43391,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - Script - Cast Vomit'), -- 19:36:44.231
+(2384200,9,3,0,0,0,100,0,9000,9000,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - Script - Set Bytes 1'), -- 19:36:53.872
+(2384200,9,4,0,0,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Westguard Defender - Script - Evade'),
+(2428401,9,0,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,10,99027,23842,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script 2 - Say'),
+(2428401,9,1,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,10,99023,23842,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script 2 - Say'),
+(2428401,9,2,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,10,99012,23842,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script 2 - Say'),
+(2428401,9,3,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,10,99010,23842,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script 2 - Say'),
+(2428401,9,4,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,10,99024,23842,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script 2 - Say'),
+(2428401,9,5,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,10,99026,23842,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script 2 - Say'),
+(2428401,9,6,0,0,0,100,0,0,0,0,0,45,1,1,0,0,0,0,9,23842,0,80,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script 2 - Set Data'),
+(2428401,9,7,0,0,0,100,0,1000,1000,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script 2 - Cast Suicide, No Blood, No Logging'),
+(2428400,9,0,0,0,0,100,0,0,0,0,0,5,7,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Play Emote (OneShotEat)'), -- 19:36:18.195
+(2428400,9,1,0,0,0,100,0,0,0,0,0,71,0,0,2200,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Equip item 2200 to Slot 1'), -- 19:36:18.195
+(2428400,9,2,0,0,0,100,0,2800,2800,0,0,11,21862,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Cast Radiation'), -- 19:36:20.925
+(2428400,9,3,0,0,0,100,0,0,0,0,0,33,24284,0,0,0,0,0,7,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Give Quest Credit'),
+(2428400,9,4,0,0,0,100,0,0,0,0,0,71,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - UnEquip item'), -- 19:36:20.925
+(2428400,9,5,0,0,0,100,0,0,0,0,0,91,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Remove Bytes 1'), -- 19:36:20.925
+(2428400,9,6,0,0,0,100,0,3200,3200,0,0,4,9110,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Play Sound 9110'), -- 19:36:23.421
+(2428400,9,7,0,0,0,100,0,0,0,0,0,5,53,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Play Emote OneShotBattleRoar'), -- 19:36:23.421
+(2428400,9,8,0,0,0,100,0,1200,1200,0,0,53,0,24284,0,0,0,0,1,0,0,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Start WP'), -- 19:36:24.622
+(2428400,9,9,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,10,99027,23842,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Say'), -- 19:36:24.622
+(2428400,9,10,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,10,99023,23842,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Say'), -- 19:36:24.622
+(2428400,9,11,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,10,99012,23842,0,0,0,0,0,'Dragonflayer Vrykul Prisoner - Script - Say'); -- 19:36:24.622
+
+
+DELETE FROM `waypoints` WHERE `entry`=24284;
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
+(24284, 1, 1366.673, -3179.636, 153.576, 'Dragonflayer Vrykul Prisoner'),
+(24284, 2, 1367.06, -3177.925, 153.576, 'Dragonflayer Vrykul Prisoner'),
+(24284, 3, 1368.679, -3181.09, 153.576, 'Dragonflayer Vrykul Prisoner'),
+(24284, 4, 1367.308, -3179.079, 153.576, 'Dragonflayer Vrykul Prisoner'),
+(24284, 5, 1366.374, -3179.791, 153.576, 'Dragonflayer Vrykul Prisoner'),
+(24284, 6, 1365.373, -3179.188, 153.576, 'Dragonflayer Vrykul Prisoner'),
+(24284, 7, 1365.733, -3179.677, 153.576, 'Dragonflayer Vrykul Prisoner'),
+(24284, 8, 1366.468, -3176.728, 153.576, 'Dragonflayer Vrykul Prisoner'),
+(24284, 9, 1365.269, -3181.054, 153.576, 'Dragonflayer Vrykul Prisoner');
+
+DELETE FROM `creature_text` WHERE `entry`IN(24284,23842);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `comment`) VALUES
+(24284, 0, 0, 'The vrykul clutches at his throat as he begins to gag and thrash about.', 16, 0, 100, 53, 0, 0, 23087, 'Dragonflayer Vrykul Prisoner to Player'),
+(23842, 0, 0, 'Uh...?', 12, 7, 100, 1, 0, 0, 23103, 'Westguard Defender to Player'),
+(23842, 0, 1, 'Interesting.', 12, 7, 100, 1, 0, 0, 23107, 'Westguard Defender to Player'),
+(23842, 0, 2, 'Yikes.', 12, 7, 100, 0, 0, 0, 23104, 'Westguard Defender to Player'),
+(23842, 0, 3, 'Is he okay?', 12, 7, 100, 0, 0, 0, 23105, 'Westguard Defender to Player'),
+(23842, 0, 4, 'Captain''s not gonna like this.', 12, 7, 100, 0, 0, 0, 23106, 'Westguard Defender to Player'),
+(23842, 0, 5, 'Whoa.', 12, 7, 100, 0, 0, 0, 23108, 'Westguard Defender to Player'),
+(23842, 1, 0, 'I didn''t know they could do that.', 12, 7, 100, 1, 0, 0, 23096, 'Westguard Defender to Player'),
+(23842, 1, 1, 'That''s... special.', 12, 7, 100, 1, 0, 0, 23097, 'Westguard Defender to Player'),
+(23842, 1, 2, 'Heh, cool!', 12, 7, 100, 1, 0, 0, 23094, 'Westguard Defender to Player'),
+(23842, 1, 3, 'That''s the new Forsaken plague?', 12, 7, 100, 1, 0, 0, 23098, 'Westguard Defender to Player'),
+(23842, 1, 4, 'What kind of sicko are you?', 12, 7, 100, 1, 0, 0, 23095, 'Westguard Defender to Player'),
+(23842, 1, 5, 'Oh, sick!', 12, 7, 100, 1, 0, 0, 23091, 'Westguard Defender to Player'),
+(23842, 1, 6, 'I feel ill.', 12, 7, 100, 1, 0, 0, 23093, 'Westguard Defender to Player'),
+(23842, 1, 7, 'That did NOT just happen!', 12, 7, 100, 1, 0, 0, 23092, 'Westguard Defender to Player');
+
diff --git a/sql/updates/world/2016_02_09_08_world.sql b/sql/updates/world/2016_02_09_08_world.sql
new file mode 100644
index 00000000000..307a9f9a0b3
--- /dev/null
+++ b/sql/updates/world/2016_02_09_08_world.sql
@@ -0,0 +1 @@
+UPDATE `gameobject` SET `state`=1 WHERE `guid`=61216;
diff --git a/sql/updates/world/2016_02_10_00_world.sql b/sql/updates/world/2016_02_10_00_world.sql
new file mode 100644
index 00000000000..872861b08dc
--- /dev/null
+++ b/sql/updates/world/2016_02_10_00_world.sql
@@ -0,0 +1,18 @@
+-- Pathing for Kalecgos Entry: 24844 'TDB FORMAT'
+SET @NPC := 24844;
+SET @PATH := @NPC * 10;
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,163.9735,-398.0906,2.083333,0,0,0,0,100,0), -- 16:16:43
+(@PATH,2,164.3802,-397.1771,2.083333,0,0,0,0,100,0), -- 16:16:43
+(@PATH,3,162.7923,-386.1964,15.67094,0,0,0,0,100,0), -- 16:16:43
+(@PATH,4,151.5555,-345.349,5.92646,0,0,0,0,100,0), -- 16:16:43
+(@PATH,5,162.2416,-299.8032,-5.436685,0,0,0,0,100,0), -- 16:16:43
+(@PATH,6,199.7482,-272.3315,-7.186677,0,0,0,0,100,0), -- 16:16:43
+(@PATH,7,199.7482,-272.3315,-7.186677,0,0,0,0,100,0), -- 16:16:43
+(@PATH,8,199.7482,-272.3315,-7.186677,0.06981317,0,0,0,100,0); -- 16:16:54
+-- 0x1C2F2C4920184300001F1D000038BF6E .go 163.9735 -398.0906 2.083333
+
+DELETE FROM `creature_text` WHERE `entry` = 24844 AND `groupid` = 0;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
+(24844, 0, 0, 'Be still, mortals, and hearken to my words.', 14, 0, 100, 0, 0, 0, 23936, 3, 'Kalecgos - SAY_KALECGOS_SPAWN');
diff --git a/sql/updates/world/2016_02_10_01_world.sql b/sql/updates/world/2016_02_10_01_world.sql
new file mode 100644
index 00000000000..9ffe2e81c1c
--- /dev/null
+++ b/sql/updates/world/2016_02_10_01_world.sql
@@ -0,0 +1,21 @@
+-- Nethurbian Crater KC Bunny SAI
+SET @ENTRY := 28352;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,1,8,0,100,0,51381,0,180000,180000,33,28352,0,0,0,0,0,7,0,0,0,0,0,0,0,"Nethurbian Crater KC Bunny - On Spellhit 'Toss Grenade' - Quest Credit ''"),
+(@ENTRY,0,1,0,61,0,100,0,51381,0,180000,180000,45,1,1,0,0,0,0,20,190555,2,0,0,0,0,0,"Nethurbian Crater KC Bunny - On Spellhit 'Toss Grenade' - Set Data 1 1");
+
+-- Nerubian Crater SAI
+SET @ENTRY := 190555;
+UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI" WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=1;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,1,0,0,38,0,100,0,1,1,0,0,80,@ENTRY*100+00,2,0,0,0,0,1,0,0,0,0,0,0,0,"Nerubian Crater - On Data Set 1 1 - Run Script");
+
+-- Actionlist SAI
+SET @ENTRY := 19055500;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,44,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Set Phase 2"),
+(@ENTRY,9,1,0,0,0,100,0,180000,180000,0,0,44,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Set Phase 1");
diff --git a/sql/updates/world/2016_02_10_02_world.sql b/sql/updates/world/2016_02_10_02_world.sql
new file mode 100644
index 00000000000..92ee165dd83
--- /dev/null
+++ b/sql/updates/world/2016_02_10_02_world.sql
@@ -0,0 +1,19 @@
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=9546;
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES
+(9546, 0, 2, 'Where would you like to fly to?', 10753, 4, 8192, 0, 0, 0, 0, '', 0),
+(9546, 1, 0, 'I need to get to Wintergarde Keep fast!', 26697, 1, 1, 0, 0, 0, 0, '', 0),
+(9546, 2, 0, 'Greer, I need a gryphon to ride and some bombs to drop on New Agamand!', 23112, 1, 1, 0, 0, 0, 0, '', 0);
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9546;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(15, 9546, 1, 0, 0, 28, 0, 12298, 0, 0, 0, 0, 0, '', 'Greer Orehammer - Show gossip option only if player has taken quest 12298'),
+(15, 9546, 2, 0, 0, 9, 0, 11332, 0, 0, 0, 0, 0, '', 'Greer Orehammer - Show gossip option only if player has taken quest 11332');
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=23859 AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(23859, 0, 0, 0, 4, 0, 100, 0, 0, 0, 0, 0, 80, 2385900, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Greer Orehammer - On Aggro - Run Script'),
+(23859, 0, 1, 2, 62, 0, 100, 0, 9546, 2, 0, 0, 56, 33634, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Greer Orehammer - On Gossip Option 1 Selected - Add Item \'Orehammer\'s Precision Bombs\' 10 Times'),
+(23859, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 52, 745, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Greer Orehammer - On Gossip Option 1 Selected - Cast \'High Commander Halford Wyrmbane: Westguard Keep to Wintergarde Keep Taxi\''),
+(23859, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Greer Orehammer - On Gossip Option 1 Selected - Close Gossip'),
+(23859, 0, 4, 5, 62, 0, 100, 0, 9546, 1, 0, 0, 11, 48862, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Greer Orehammer - On gossip select - Invoker spellcast'),
+(23859, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Greer Orehammer - On gossip select - Close gossip');
diff --git a/sql/updates/world/2016_02_10_03_world.sql b/sql/updates/world/2016_02_10_03_world.sql
new file mode 100644
index 00000000000..f52872c3431
--- /dev/null
+++ b/sql/updates/world/2016_02_10_03_world.sql
@@ -0,0 +1,2 @@
+--
+UPDATE `gameobject` SET `spawnmask`=1 WHERE `map`=229;
diff --git a/sql/updates/world/2016_02_10_04_world.sql b/sql/updates/world/2016_02_10_04_world.sql
new file mode 100644
index 00000000000..1349b83f442
--- /dev/null
+++ b/sql/updates/world/2016_02_10_04_world.sql
@@ -0,0 +1,6 @@
+-- Honor among thieves
+DELETE FROM `spell_script_names` WHERE `scriptname` = 'spell_rog_honor_among_thieves';
+DELETE FROM `spell_script_names` WHERE `scriptname` = 'spell_rog_honor_among_thieves_proc';
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(-51698, 'spell_rog_honor_among_thieves'),
+(52916, 'spell_rog_honor_among_thieves_proc');
diff --git a/src/common/Define.h b/src/common/Define.h
index df3dd37b503..b34edb6a549 100644
--- a/src/common/Define.h
+++ b/src/common/Define.h
@@ -83,10 +83,16 @@
# define ATTR_NORETURN __attribute__((__noreturn__))
# define ATTR_PRINTF(F, V) __attribute__ ((__format__ (__printf__, F, V)))
# define ATTR_DEPRECATED __attribute__((__deprecated__))
+# define TRINITY_CONSTEXPR constexpr
#else //COMPILER != COMPILER_GNU
# define ATTR_NORETURN
# define ATTR_PRINTF(F, V)
# define ATTR_DEPRECATED
+#if _MSC_VER >= 1900
+# define TRINITY_CONSTEXPR constexpr
+#else
+# define TRINITY_CONSTEXPR
+#endif
#endif //COMPILER == COMPILER_GNU
#define UI64FMTD "%" PRIu64
diff --git a/src/server/shared/Containers.h b/src/common/Utilities/Containers.h
index c2ebbf58a1e..f3e9432ca4c 100644
--- a/src/server/shared/Containers.h
+++ b/src/common/Utilities/Containers.h
@@ -19,10 +19,11 @@
#define TRINITY_CONTAINERS_H
#include "Define.h"
+#include "Random.h"
+#include <algorithm>
+#include <functional>
#include <list>
-
-//! Because circular includes are bad
-extern uint32 urand(uint32 min, uint32 max);
+#include <vector>
namespace Trinity
{
@@ -57,14 +58,64 @@ namespace Trinity
list = listCopy;
}
- /* Select a random element from a container. Note: make sure you explicitly empty check the container */
- template <class C> typename C::value_type const& SelectRandomContainerElement(C const& container)
+ /*
+ * Select a random element from a container.
+ *
+ * Note: container cannot be empty
+ */
+ template <class C>
+ typename C::value_type const& SelectRandomContainerElement(C const& container)
{
typename C::const_iterator it = container.begin();
std::advance(it, urand(0, container.size() - 1));
return *it;
}
+ /*
+ * Select a random element from a container where each element has a different chance to be selected.
+ *
+ * @param container Container to select an element from
+ * @param weights Chances of each element to be selected, must be in the same order as elements in container.
+ * Caller is responsible for checking that sum of all weights is greater than 0.
+ *
+ * Note: container cannot be empty
+ */
+ template <class C>
+ typename C::const_iterator SelectRandomWeightedContainerElement(C const& container, std::vector<double> weights)
+ {
+ Trinity::discrete_distribution_param<uint32> ddParam(weights.begin(), weights.end());
+ std::discrete_distribution<uint32> dd(ddParam);
+ typename C::const_iterator it = container.begin();
+ std::advance(it, dd(SFMTEngine::Instance()));
+ return it;
+ }
+
+ /*
+ * Select a random element from a container where each element has a different chance to be selected.
+ *
+ * @param container Container to select an element from
+ * @param weightExtractor Function retrieving chance of each element in container, expected to take an element of the container and returning a double
+ *
+ * Note: container cannot be empty
+ */
+ template <class C, class Fn>
+ typename C::const_iterator SelectRandomWeightedContainerElement(C const& container, Fn weightExtractor)
+ {
+ std::vector<double> weights;
+ weights.reserve(container.size());
+ double weightSum = 0.0;
+ for (auto itr = container.begin(); itr != container.end(); ++itr)
+ {
+ double weight = weightExtractor(*itr);
+ weights.push_back(weight);
+ weightSum += weight;
+ }
+ if (weightSum <= 0.0)
+ weights.assign(container.size(), 1.0);
+
+ return SelectRandomWeightedContainerElement(container, weights);
+ }
+
/**
* @fn bool Trinity::Containers::Intersects(Iterator first1, Iterator last1, Iterator first2, Iterator last2)
*
diff --git a/src/common/Utilities/Random.cpp b/src/common/Utilities/Random.cpp
new file mode 100644
index 00000000000..cc013110b01
--- /dev/null
+++ b/src/common/Utilities/Random.cpp
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "Random.h"
+#include "Common.h"
+#include "Errors.h"
+#include "SFMT.h"
+#include <boost/thread/tss.hpp>
+
+static boost::thread_specific_ptr<SFMTRand> sfmtRand;
+
+static SFMTRand* GetRng()
+{
+ SFMTRand* rand = sfmtRand.get();
+
+ if (!rand)
+ {
+ rand = new SFMTRand();
+ sfmtRand.reset(rand);
+ }
+
+ return rand;
+}
+
+int32 irand(int32 min, int32 max)
+{
+ ASSERT(max >= min);
+ return int32(GetRng()->IRandom(min, max));
+}
+
+uint32 urand(uint32 min, uint32 max)
+{
+ ASSERT(max >= min);
+ return GetRng()->URandom(min, max);
+}
+
+uint32 urandms(uint32 min, uint32 max)
+{
+ ASSERT(max >= min);
+ ASSERT(INT_MAX / IN_MILLISECONDS >= max);
+ return GetRng()->URandom(min * IN_MILLISECONDS, max * IN_MILLISECONDS);
+}
+
+float frand(float min, float max)
+{
+ ASSERT(max >= min);
+ return float(GetRng()->Random() * (max - min) + min);
+}
+
+uint32 rand32()
+{
+ return GetRng()->BRandom();
+}
+
+double rand_norm()
+{
+ return GetRng()->Random();
+}
+
+double rand_chance()
+{
+ return GetRng()->Random() * 100.0;
+}
+
+SFMTEngine& SFMTEngine::Instance()
+{
+ static SFMTEngine engine;
+ return engine;
+}
diff --git a/src/common/Utilities/Random.h b/src/common/Utilities/Random.h
new file mode 100644
index 00000000000..5610651a83b
--- /dev/null
+++ b/src/common/Utilities/Random.h
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef Random_h__
+#define Random_h__
+
+#include "Define.h"
+#include <limits>
+#include <random>
+
+/* Return a random number in the range min..max. */
+int32 irand(int32 min, int32 max);
+
+/* Return a random number in the range min..max (inclusive). */
+uint32 urand(uint32 min, uint32 max);
+
+/* Return a random millisecond value between min and max seconds. Functionally equivalent to urand(min*IN_MILLISECONDS, max*IN_MILLISECONDS). */
+uint32 urandms(uint32 min, uint32 max);
+
+/* Return a random number in the range 0 .. UINT32_MAX. */
+uint32 rand32();
+
+/* Return a random number in the range min..max */
+float frand(float min, float max);
+
+/* Return a random double from 0.0 to 1.0 (exclusive). */
+double rand_norm();
+
+/* Return a random double from 0.0 to 100.0 (exclusive). */
+double rand_chance();
+
+/* Return true if a random roll fits in the specified chance (range 0-100). */
+inline bool roll_chance_f(float chance)
+{
+ return chance > rand_chance();
+}
+
+/* Return true if a random roll fits in the specified chance (range 0-100). */
+inline bool roll_chance_i(int chance)
+{
+ return chance > irand(0, 99);
+}
+
+/*
+* SFMT wrapper satisfying UniformRandomNumberGenerator concept for use in <random> algorithms
+*/
+class SFMTEngine
+{
+public:
+ typedef uint32 result_type;
+
+ static TRINITY_CONSTEXPR result_type min() { return std::numeric_limits<result_type>::min(); }
+ static TRINITY_CONSTEXPR result_type max() { return std::numeric_limits<result_type>::max(); }
+ result_type operator()() const { return rand32(); }
+
+ static SFMTEngine& Instance();
+};
+
+// Ugly, horrible, i don't even..., hack for VS2013 to work around missing discrete_distribution(iterator, iterator) constructor
+namespace Trinity
+{
+#if COMPILER == COMPILER_MICROSOFT && _MSC_VER <= 1800
+ template<typename T>
+ struct discrete_distribution_param : public std::discrete_distribution<T>::param_type
+ {
+ typedef typename std::discrete_distribution<T>::param_type base;
+
+ template<typename InIt>
+ discrete_distribution_param(InIt begin, InIt end) : base(_Noinit())
+ {
+ this->_Pvec.assign(begin, end);
+ this->_Init();
+ }
+ };
+#else
+ template<typename T>
+ using discrete_distribution_param = typename std::discrete_distribution<T>::param_type;
+#endif
+}
+
+#endif // Random_h__
diff --git a/src/common/Utilities/Util.cpp b/src/common/Utilities/Util.cpp
index 3eb901ca35d..1360253294f 100644
--- a/src/common/Utilities/Util.cpp
+++ b/src/common/Utilities/Util.cpp
@@ -20,10 +20,8 @@
#include "Common.h"
#include "CompilerDefs.h"
#include "utf8.h"
-#include "SFMT.h"
#include "Errors.h" // for ASSERT
#include <stdarg.h>
-#include <boost/thread/tss.hpp>
#if COMPILER == COMPILER_GNU
#include <sys/socket.h>
@@ -31,61 +29,6 @@
#include <arpa/inet.h>
#endif
-static boost::thread_specific_ptr<SFMTRand> sfmtRand;
-
-static SFMTRand* GetRng()
-{
- SFMTRand* rand = sfmtRand.get();
-
- if (!rand)
- {
- rand = new SFMTRand();
- sfmtRand.reset(rand);
- }
-
- return rand;
-}
-
-int32 irand(int32 min, int32 max)
-{
- ASSERT(max >= min);
- return int32(GetRng()->IRandom(min, max));
-}
-
-uint32 urand(uint32 min, uint32 max)
-{
- ASSERT(max >= min);
- return GetRng()->URandom(min, max);
-}
-
-uint32 urandms(uint32 min, uint32 max)
-{
- ASSERT(max >= min);
- ASSERT(INT_MAX/IN_MILLISECONDS >= max);
- return GetRng()->URandom(min * IN_MILLISECONDS, max * IN_MILLISECONDS);
-}
-
-float frand(float min, float max)
-{
- ASSERT(max >= min);
- return float(GetRng()->Random() * (max - min) + min);
-}
-
-uint32 rand32()
-{
- return GetRng()->BRandom();
-}
-
-double rand_norm()
-{
- return GetRng()->Random();
-}
-
-double rand_chance()
-{
- return GetRng()->Random() * 100.0;
-}
-
Tokenizer::Tokenizer(const std::string &src, const char sep, uint32 vectorReserve)
{
m_str = new char[src.length() + 1];
diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h
index 1f3b78a8d56..ab5cabca8d2 100644
--- a/src/common/Utilities/Util.h
+++ b/src/common/Utilities/Util.h
@@ -21,6 +21,7 @@
#include "Define.h"
#include "Errors.h"
+#include "Random.h"
#include <algorithm>
#include <string>
@@ -77,39 +78,6 @@ std::string secsToTimeString(uint64 timeInSecs, bool shortText = false, bool hou
uint32 TimeStringToSecs(const std::string& timestring);
std::string TimeToTimestampStr(time_t t);
-/* Return a random number in the range min..max. */
-int32 irand(int32 min, int32 max);
-
-/* Return a random number in the range min..max (inclusive). */
-uint32 urand(uint32 min, uint32 max);
-
-/* Return a random millisecond value between min and max seconds. Functionally equivalent to urand(min*IN_MILLISECONDS, max*IN_MILLISECONDS). */
-uint32 urandms(uint32 min, uint32 max);
-
-/* Return a random number in the range 0 .. UINT32_MAX. */
-uint32 rand32();
-
-/* Return a random number in the range min..max */
-float frand(float min, float max);
-
-/* Return a random double from 0.0 to 1.0 (exclusive). */
-double rand_norm();
-
-/* Return a random double from 0.0 to 100.0 (exclusive). */
-double rand_chance();
-
-/* Return true if a random roll fits in the specified chance (range 0-100). */
-inline bool roll_chance_f(float chance)
-{
- return chance > rand_chance();
-}
-
-/* Return true if a random roll fits in the specified chance (range 0-100). */
-inline bool roll_chance_i(int chance)
-{
- return chance > irand(0, 99);
-}
-
inline void ApplyPercentModFloatVar(float& var, float val, bool apply)
{
if (val == -100.0f) // prevent set var to zero
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
index 977847e60c9..ef3357fa6ed 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -468,7 +468,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Map entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.map);
return false;
}
- if (e.event.respawn.type == SMART_SCRIPT_RESPAWN_CONDITION_AREA && !GetAreaEntryByAreaID(e.event.respawn.area))
+ if (e.event.respawn.type == SMART_SCRIPT_RESPAWN_CONDITION_AREA && !sAreaTableStore.LookupEntry(e.event.respawn.area))
{
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Area entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.area);
return false;
diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp
index 90e61826e35..ac8e0298a44 100644
--- a/src/server/game/Achievements/AchievementMgr.cpp
+++ b/src/server/game/Achievements/AchievementMgr.cpp
@@ -156,7 +156,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
return true;
}
case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AREA:
- if (!GetAreaEntryByAreaID(area.id))
+ if (!sAreaTableStore.LookupEntry(area.id))
{
TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AREA (%u) has wrong area id in value1 (%u), ignored.",
criteria->ID, criteria->requiredType, dataType, area.id);
@@ -1905,17 +1905,15 @@ bool AchievementMgr::RequirementsSatisfied(AchievementCriteriaEntry const* achie
bool matchFound = false;
for (int j = 0; j < MAX_WORLD_MAP_OVERLAY_AREA_IDX; ++j)
{
- uint32 area_id = worldOverlayEntry->areatableID[j];
- if (!area_id) // array have 0 only in empty tail
+ AreaTableEntry const* area = sAreaTableStore.LookupEntry(worldOverlayEntry->areatableID[j]);
+ if (!area)
break;
- int32 exploreFlag = GetAreaFlagByAreaID(area_id);
- if (exploreFlag < 0)
+ uint32 playerIndexOffset = uint32(area->exploreFlag) / 32;
+ if (playerIndexOffset >= PLAYER_EXPLORED_ZONES_SIZE)
continue;
- uint32 playerIndexOffset = uint32(exploreFlag) / 32;
- uint32 mask = 1 << (uint32(exploreFlag) % 32);
-
+ uint32 mask = 1 << (uint32(area->exploreFlag) % 32);
if (GetPlayer()->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + playerIndexOffset) & mask)
{
matchFound = true;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
index 9ab96383ed1..1942ac9d648 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
@@ -389,6 +389,8 @@ void BattlegroundSA::PostUpdateImpl(uint32 diff)
{
if (TotalTime >= BG_SA_ROUNDLENGTH)
{
+ CastSpellOnTeam(SPELL_END_OF_ROUND, ALLIANCE);
+ CastSpellOnTeam(SPELL_END_OF_ROUND, HORDE);
RoundScores[0].winner = Attackers;
RoundScores[0].time = BG_SA_ROUNDLENGTH;
TotalTime = 0;
@@ -401,8 +403,6 @@ void BattlegroundSA::PostUpdateImpl(uint32 diff)
ToggleTimer();
ResetObjs();
GetBgMap()->UpdateAreaDependentAuras();
- CastSpellOnTeam(SPELL_END_OF_ROUND, ALLIANCE);
- CastSpellOnTeam(SPELL_END_OF_ROUND, HORDE);
return;
}
}
@@ -410,6 +410,8 @@ void BattlegroundSA::PostUpdateImpl(uint32 diff)
{
if (TotalTime >= EndRoundTimer)
{
+ CastSpellOnTeam(SPELL_END_OF_ROUND, ALLIANCE);
+ CastSpellOnTeam(SPELL_END_OF_ROUND, HORDE);
RoundScores[1].time = BG_SA_ROUNDLENGTH;
RoundScores[1].winner = (Attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE;
if (RoundScores[0].time == RoundScores[1].time)
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp
index 011b68a2bb3..8fe0810f3b9 100644
--- a/src/server/game/Chat/Chat.cpp
+++ b/src/server/game/Chat/Chat.cpp
@@ -296,11 +296,11 @@ bool ChatHandler::ExecuteCommandInTable(std::vector<ChatCommand> const& table, c
uint32 areaId = player->GetAreaId();
std::string areaName = "Unknown";
std::string zoneName = "Unknown";
- if (AreaTableEntry const* area = GetAreaEntryByAreaID(areaId))
+ if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(areaId))
{
int locale = GetSessionDbcLocale();
areaName = area->area_name[locale];
- if (AreaTableEntry const* zone = GetAreaEntryByAreaID(area->zone))
+ if (AreaTableEntry const* zone = sAreaTableStore.LookupEntry(area->zone))
zoneName = zone->area_name[locale];
}
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index d5367e919a3..4215a3a5d02 100644
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -1708,7 +1708,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) const
}
case CONDITION_ZONEID:
{
- AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(cond->ConditionValue1);
+ AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(cond->ConditionValue1);
if (!areaEntry)
{
TC_LOG_ERROR("sql.sql", "%s Area (%u) does not exist, skipped.", cond->ToString(true).c_str(), cond->ConditionValue1);
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index c73350872cc..6c51c71fe7b 100644
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -51,11 +51,9 @@ struct WMOAreaTableTripple
typedef std::map<WMOAreaTableTripple, WMOAreaTableEntry const*> WMOAreaInfoByTripple;
typedef std::multimap<uint32, CharSectionsEntry const*> CharSectionsMap;
-DBCStorage <AreaTableEntry> sAreaStore(AreaTableEntryfmt);
+DBCStorage <AreaTableEntry> sAreaTableStore(AreaTableEntryfmt);
DBCStorage <AreaGroupEntry> sAreaGroupStore(AreaGroupEntryfmt);
DBCStorage <AreaPOIEntry> sAreaPOIStore(AreaPOIEntryfmt);
-static AreaFlagByAreaID sAreaFlagByAreaID;
-static AreaFlagByMapID sAreaFlagByMapID; // for instances without generated *.map files
static WMOAreaInfoByTripple sWMOAreaInfoByTripple;
@@ -286,21 +284,7 @@ void LoadDBCStores(const std::string& dataPath)
StoreProblemList bad_dbc_files;
uint32 availableDbcLocales = 0xFFFFFFFF;
- LoadDBC(availableDbcLocales, bad_dbc_files, sAreaStore, dbcPath, "AreaTable.dbc");
-
- // must be after sAreaStore loading
- for (uint32 i = 0; i < sAreaStore.GetNumRows(); ++i) // areaflag numbered from 0
- {
- if (AreaTableEntry const* area = sAreaStore.LookupEntry(i))
- {
- // fill AreaId->DBC records
- sAreaFlagByAreaID.insert(AreaFlagByAreaID::value_type(uint16(area->ID), area->exploreFlag));
-
- // fill MapId->DBC records (skip sub zones and continents)
- if (area->zone == 0 && area->mapid != 0 && area->mapid != 1 && area->mapid != 530 && area->mapid != 571)
- sAreaFlagByMapID.insert(AreaFlagByMapID::value_type(area->mapid, area->exploreFlag));
- }
- }
+ LoadDBC(availableDbcLocales, bad_dbc_files, sAreaTableStore, dbcPath, "AreaTable.dbc");
LoadDBC(availableDbcLocales, bad_dbc_files, sAchievementStore, dbcPath, "Achievement.dbc", &CustomAchievementfmt, &CustomAchievementIndex);
LoadDBC(availableDbcLocales, bad_dbc_files, sAchievementCriteriaStore, dbcPath, "Achievement_Criteria.dbc");
@@ -721,7 +705,7 @@ void LoadDBCStores(const std::string& dataPath)
}
// Check loaded DBC files proper version
- if (!sAreaStore.LookupEntry(3617) || // last area (areaflag) added in 3.3.5a
+ if (!sAreaTableStore.LookupEntry(4987) || // last area added in 3.3.5a
!sCharTitlesStore.LookupEntry(177) || // last char title added in 3.3.5a
!sGemPropertiesStore.LookupEntry(1629) || // last added spell in 3.3.5a
!sItemStore.LookupEntry(56806) || // last gem property added in 3.3.5a
@@ -773,41 +757,13 @@ uint32 GetTalentSpellCost(uint32 spellId)
return 0;
}
-int32 GetAreaFlagByAreaID(uint32 area_id)
-{
- AreaFlagByAreaID::iterator i = sAreaFlagByAreaID.find(area_id);
- if (i == sAreaFlagByAreaID.end())
- return -1;
-
- return i->second;
-}
WMOAreaTableEntry const* GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid, int32 groupid)
{
WMOAreaInfoByTripple::iterator i = sWMOAreaInfoByTripple.find(WMOAreaTableTripple(rootid, adtid, groupid));
- if (i == sWMOAreaInfoByTripple.end())
- return NULL;
- return i->second;
-}
-
-AreaTableEntry const* GetAreaEntryByAreaID(uint32 area_id)
-{
- int32 areaflag = GetAreaFlagByAreaID(area_id);
- if (areaflag < 0)
+ if (i == sWMOAreaInfoByTripple.end())
return NULL;
-
- return sAreaStore.LookupEntry(areaflag);
-}
-
-AreaTableEntry const* GetAreaEntryByAreaFlagAndMap(uint32 area_flag, uint32 map_id)
-{
- if (area_flag)
- return sAreaStore.LookupEntry(area_flag);
-
- if (MapEntry const* mapEntry = sMapStore.LookupEntry(map_id))
- return GetAreaEntryByAreaID(mapEntry->linked_zone);
-
- return NULL;
+ return i->second;
}
char const* GetRaceName(uint8 race, uint8 locale)
@@ -822,15 +778,6 @@ char const* GetClassName(uint8 class_, uint8 locale)
return classEntry ? classEntry->name[locale] : NULL;
}
-uint32 GetAreaFlagByMapId(uint32 mapid)
-{
- AreaFlagByMapID::iterator i = sAreaFlagByMapID.find(mapid);
- if (i == sAreaFlagByMapID.end())
- return 0;
- else
- return i->second;
-}
-
uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId)
{
if (mapid != 530 && mapid != 571) // speed for most cases
diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h
index 14f59b04e6d..56ee1f618dd 100644
--- a/src/server/game/DataStores/DBCStores.h
+++ b/src/server/game/DataStores/DBCStores.h
@@ -33,11 +33,6 @@ char* GetPetName(uint32 petfamily, uint32 dbclang);
uint32 GetTalentSpellCost(uint32 spellId);
TalentSpellPos const* GetTalentSpellPos(uint32 spellId);
-int32 GetAreaFlagByAreaID(uint32 area_id); // -1 if not found
-AreaTableEntry const* GetAreaEntryByAreaID(uint32 area_id);
-AreaTableEntry const* GetAreaEntryByAreaFlagAndMap(uint32 area_flag, uint32 map_id);
-uint32 GetAreaFlagByMapId(uint32 mapid);
-
char const* GetRaceName(uint8 race, uint8 locale);
char const* GetClassName(uint8 class_, uint8 locale);
@@ -86,7 +81,7 @@ EmotesTextSoundEntry const* FindTextSoundEmoteFor(uint32 emote, uint32 race, uin
extern DBCStorage <AchievementEntry> sAchievementStore;
extern DBCStorage <AchievementCriteriaEntry> sAchievementCriteriaStore;
-extern DBCStorage <AreaTableEntry> sAreaStore;// recommend access using functions
+extern DBCStorage <AreaTableEntry> sAreaTableStore;
extern DBCStorage <AreaGroupEntry> sAreaGroupStore;
extern DBCStorage <AreaPOIEntry> sAreaPOIStore;
extern DBCStorage <AreaTriggerEntry> sAreaTriggerStore;
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
index 2f4820d0353..b5dc4489148 100644
--- a/src/server/game/DataStores/DBCStructure.h
+++ b/src/server/game/DataStores/DBCStructure.h
@@ -509,7 +509,7 @@ struct AreaTableEntry
uint32 ID; // 0
uint32 mapid; // 1
uint32 zone; // 2 if 0 then it's zone, else it's zone id of this area
- uint32 exploreFlag; // 3, main index
+ uint32 exploreFlag; // 3
uint32 flags; // 4, unknown value but 312 for all cities
// 5-9 unused
int32 area_level; // 10
diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h
index 22a01dae9f0..c61ec997bc2 100644
--- a/src/server/game/DataStores/DBCfmt.h
+++ b/src/server/game/DataStores/DBCfmt.h
@@ -23,7 +23,7 @@ char const Achievementfmt[] = "niixssssssssssssssssxxxxxxxxxxxxxxxxxxiixixxxxxxx
const std::string CustomAchievementfmt = "pppaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaapapaaaaaaaaaaaaaaaaaapp";
const std::string CustomAchievementIndex = "ID";
char const AchievementCriteriafmt[] = "niiiiiiiixxxxxxxxxxxxxxxxxiiiix";
-char const AreaTableEntryfmt[] = "iiinixxxxxissssssssssssssssxiiiiixxx";
+char const AreaTableEntryfmt[] = "niiiixxxxxissssssssssssssssxiiiiixxx";
char const AreaGroupEntryfmt[] = "niiiiiii";
char const AreaPOIEntryfmt[] = "niiiiiiiiiiifffixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxix";
char const AreaTriggerEntryfmt[] = "niffffffff";
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 1497eb4922c..5d62b740947 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -369,13 +369,13 @@ bool Creature::InitEntry(uint32 entry, CreatureData const* data /*= nullptr*/)
SetByteValue(UNIT_FIELD_BYTES_0, 2, minfo->gender);
// Load creature equipment
- if (!data || data->equipmentId == 0)
- LoadEquipment(); // use default equipment (if available)
- else if (data && data->equipmentId != 0) // override, 0 means no equipment
+ if (data && data->equipmentId != 0)
{
m_originalEquipmentId = data->equipmentId;
LoadEquipment(data->equipmentId);
}
+ else
+ LoadEquipment(0, true);
SetName(normalInfo->Name); // at normal entry always
@@ -1409,6 +1409,7 @@ void Creature::LoadEquipment(int8 id, bool force /*= true*/)
SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + i, 0);
m_equipmentId = 0;
}
+
return;
}
@@ -1417,7 +1418,7 @@ void Creature::LoadEquipment(int8 id, bool force /*= true*/)
return;
m_equipmentId = id;
- for (uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < MAX_EQUIPMENT_ITEMS; ++i)
SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + i, einfo->ItemEntry[i]);
}
@@ -2148,6 +2149,11 @@ bool Creature::CanCreatureAttack(Unit const* victim, bool /*force*/) const
if (GetMap()->IsDungeon())
return true;
+ // if the mob is actively being damaged, do not reset due to distance unless it's a world boss
+ if (!isWorldBoss())
+ if (time(NULL) - GetLastDamagedTime() <= MAX_AGGRO_RESET_TIME)
+ return true;
+
//Use AttackDistance in distance check if threat radius is lower. This prevents creature bounce in and out of combat every update tick.
float dist = std::max(GetAttackDistance(victim), sWorld->getFloatConfig(CONFIG_THREAT_RADIUS)) + m_CombatDistance;
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index b030f42bef7..1acfeacbf83 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -1399,7 +1399,10 @@ void GameObject::Use(Unit* user)
player->SendCinematicStart(info->camera.cinematicId);
if (info->camera.eventID)
+ {
GetMap()->ScriptsStart(sEventScripts, info->camera.eventID, player, this);
+ EventInform(info->camera.eventID, user);
+ }
return;
}
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 8ce78f88906..9ae9f21c967 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -4682,6 +4682,7 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
// remove death flag + set aura
SetByteValue(UNIT_FIELD_BYTES_1, 3, 0x00);
+ RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_IS_OUT_OF_BOUNDS);
// This must be called always even on Players with race != RACE_NIGHTELF in case of faction change
RemoveAurasDueToSpell(20584); // RACE_NIGHTELF speed bonuses
@@ -5102,10 +5103,10 @@ void Player::RepopAtGraveyard()
// note: this can be called also when the player is alive
// for example from WorldSession::HandleMovementOpcodes
- AreaTableEntry const* zone = GetAreaEntryByAreaID(GetAreaId());
+ AreaTableEntry const* zone = sAreaTableStore.LookupEntry(GetAreaId());
// Such zones are considered unreachable as a ghost and the player must be automatically revived
- if ((!IsAlive() && zone && zone->flags & AREA_FLAG_NEED_FLY) || GetTransport() || GetPositionZ() < -500.0f)
+ if ((!IsAlive() && zone && zone->flags & AREA_FLAG_NEED_FLY) || GetTransport() || GetPositionZ() < GetMap()->GetMinHeight(GetPositionX(), GetPositionY()))
{
ResurrectPlayer(0.5f);
SpawnCorpseBones();
@@ -5142,8 +5143,10 @@ void Player::RepopAtGraveyard()
GetSession()->SendPacket(&data);
}
}
- else if (GetPositionZ() < -500.0f)
+ else if (GetPositionZ() < GetMap()->GetMinHeight(GetPositionX(), GetPositionY()))
TeleportTo(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ, GetOrientation());
+
+ RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_IS_OUT_OF_BOUNDS);
}
bool Player::CanJoinConstantChannelInZone(ChatChannelsEntry const* channel, AreaTableEntry const* zone)
@@ -5188,7 +5191,7 @@ void Player::UpdateLocalChannels(uint32 newZone)
if (GetSession()->PlayerLoading() && !IsBeingTeleportedFar())
return; // The client handles it automatically after loading, but not after teleporting
- AreaTableEntry const* current_zone = GetAreaEntryByAreaID(newZone);
+ AreaTableEntry const* current_zone = sAreaTableStore.LookupEntry(newZone);
if (!current_zone)
return;
@@ -6429,22 +6432,32 @@ void Player::CheckAreaExploreAndOutdoor()
return;
bool isOutdoor;
- uint16 areaFlag = GetBaseMap()->GetAreaFlag(GetPositionX(), GetPositionY(), GetPositionZ(), &isOutdoor);
+ uint32 areaId = GetBaseMap()->GetAreaId(GetPositionX(), GetPositionY(), GetPositionZ(), &isOutdoor);
+ AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(areaId);
if (sWorld->getBoolConfig(CONFIG_VMAP_INDOOR_CHECK) && !isOutdoor)
RemoveAurasWithAttribute(SPELL_ATTR0_OUTDOORS_ONLY);
- if (areaFlag == 0xffff)
+ if (!areaId)
return;
- int offset = areaFlag / 32;
+
+ if (!areaEntry)
+ {
+ TC_LOG_ERROR("entities.player", "Player '%s' (%s) discovered unknown area (x: %f y: %f z: %f map: %u)",
+ GetName().c_str(), GetGUID().ToString().c_str(), GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId());
+ return;
+ }
+
+ uint32 offset = areaEntry->exploreFlag / 32;
if (offset >= PLAYER_EXPLORED_ZONES_SIZE)
{
- TC_LOG_ERROR("entities.player", "Wrong area flag %u in map data for (X: %f Y: %f) point to field PLAYER_EXPLORED_ZONES_1 + %u ( %u must be < %u ).", areaFlag, GetPositionX(), GetPositionY(), offset, offset, PLAYER_EXPLORED_ZONES_SIZE);
+ TC_LOG_ERROR("entities.player", "Player::CheckAreaExploreAndOutdoor: Wrong area flag %u in map data for (X: %f Y: %f) point to field PLAYER_EXPLORED_ZONES_1 + %u ( %u must be < %u ).",
+ areaEntry->exploreFlag, GetPositionX(), GetPositionY(), offset, offset, PLAYER_EXPLORED_ZONES_SIZE);
return;
}
- uint32 val = (uint32)(1 << (areaFlag % 32));
+ uint32 val = (uint32)(1 << (areaEntry->exploreFlag % 32));
uint32 currFields = GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset);
if (!(currFields & val))
@@ -6453,19 +6466,11 @@ void Player::CheckAreaExploreAndOutdoor()
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EXPLORE_AREA);
- AreaTableEntry const* areaEntry = GetAreaEntryByAreaFlagAndMap(areaFlag, GetMapId());
- if (!areaEntry)
- {
- TC_LOG_ERROR("entities.player", "Player %u discovered unknown area (x: %f y: %f z: %f map: %u", GetGUID().GetCounter(), GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId());
- return;
- }
-
if (areaEntry->area_level > 0)
{
- uint32 area = areaEntry->ID;
if (getLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
- SendExplorationExperience(area, 0);
+ SendExplorationExperience(areaId, 0);
}
else
{
@@ -6489,9 +6494,9 @@ void Player::CheckAreaExploreAndOutdoor()
}
GiveXP(XP, NULL);
- SendExplorationExperience(area, XP);
+ SendExplorationExperience(areaId, XP);
}
- TC_LOG_DEBUG("entities.player", "Player %u discovered a new area: %u", GetGUID().GetCounter(), area);
+ TC_LOG_DEBUG("entities.player", "Player '%s' (%s) discovered a new area: %u", GetName().c_str(),GetGUID().ToString().c_str(), areaId);
}
}
}
@@ -7061,7 +7066,7 @@ void Player::UpdateArea(uint32 newArea)
// so apply them accordingly
m_areaUpdateId = newArea;
- AreaTableEntry const* area = GetAreaEntryByAreaID(newArea);
+ AreaTableEntry const* area = sAreaTableStore.LookupEntry(newArea);
pvpInfo.IsInFFAPvPArea = area && (area->flags & AREA_FLAG_ARENA);
UpdatePvPState(true);
@@ -7109,7 +7114,7 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)
// zone changed, so area changed as well, update it
UpdateArea(newArea);
- AreaTableEntry const* zone = GetAreaEntryByAreaID(newZone);
+ AreaTableEntry const* zone = sAreaTableStore.LookupEntry(newZone);
if (!zone)
return;
@@ -26154,11 +26159,11 @@ std::string Player::GetMapAreaAndZoneString()
uint32 areaId = GetAreaId();
std::string areaName = "Unknown";
std::string zoneName = "Unknown";
- if (AreaTableEntry const* area = GetAreaEntryByAreaID(areaId))
+ if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(areaId))
{
int locale = GetSession()->GetSessionDbcLocale();
areaName = area->area_name[locale];
- if (AreaTableEntry const* zone = GetAreaEntryByAreaID(area->zone))
+ if (AreaTableEntry const* zone = sAreaTableStore.LookupEntry(area->zone))
zoneName = zone->area_name[locale];
}
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 3aed5fde7b3..c224ef78ec8 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -8328,8 +8328,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
case 52914:
case 52915:
case 52910:
- // Honor Among Thieves
- case 52916:
{
target = triggeredByAura->GetBase()->GetCaster();
if (!target)
@@ -12750,7 +12748,7 @@ Unit* Creature::SelectVictim()
}
}
else
- return NULL;
+ return nullptr;
if (target && _IsTargetAcceptable(target) && CanCreatureAttack(target))
{
@@ -12759,14 +12757,6 @@ Unit* Creature::SelectVictim()
return target;
}
- // Case where mob is being kited.
- // Mob may not be in range to attack or may have dropped target. In any case,
- // don't evade if damage received within the last 10 seconds
- // Does not apply to world bosses to prevent kiting to cities
- if (!isWorldBoss() && !GetInstanceId())
- if (time(NULL) - GetLastDamagedTime() <= MAX_AGGRO_RESET_TIME)
- return target;
-
// last case when creature must not go to evade mode:
// it in combat but attacker not make any damage and not enter to aggro radius to have record in threat list
// for example at owner command to pet attack some far away creature
@@ -12775,12 +12765,12 @@ Unit* Creature::SelectVictim()
{
if ((*itr) && !CanCreatureAttack(*itr) && (*itr)->GetTypeId() != TYPEID_PLAYER
&& !(*itr)->ToCreature()->HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
- return NULL;
+ return nullptr;
}
/// @todo a vehicle may eat some mob, so mob should not evade
if (GetVehicle())
- return NULL;
+ return nullptr;
// search nearby enemy before enter evade mode
if (HasReactState(REACT_AGGRESSIVE))
@@ -12798,17 +12788,17 @@ Unit* Creature::SelectVictim()
{
if ((*itr)->GetBase()->IsPermanent())
{
- AI()->EnterEvadeMode();
+ AI()->EnterEvadeMode(CreatureAI::EVADE_REASON_OTHER);
break;
}
}
- return NULL;
+ return nullptr;
}
// enter in evade mode in other case
AI()->EnterEvadeMode(CreatureAI::EVADE_REASON_NO_HOSTILES);
- return NULL;
+ return nullptr;
}
//======================================================================
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index d2064092a65..f45634e9684 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -1756,7 +1756,7 @@ void ObjectMgr::LoadCreatures()
if (!ok)
continue;
- // -1 random, 0 no equipment,
+ // -1 random, 0 no equipment
if (data.equipmentId != 0)
{
if (!GetEquipmentInfo(data.id, data.equipmentId))
@@ -2773,7 +2773,7 @@ void ObjectMgr::LoadItemTemplates()
itemTemplate.ItemSet = 0;
}
- if (itemTemplate.Area && !GetAreaEntryByAreaID(itemTemplate.Area))
+ if (itemTemplate.Area && !sAreaTableStore.LookupEntry(itemTemplate.Area))
TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong Area (%u)", entry, itemTemplate.Area);
if (itemTemplate.Map && !sMapStore.LookupEntry(itemTemplate.Map))
@@ -4143,7 +4143,7 @@ void ObjectMgr::LoadQuests()
// client quest log visual (area case)
if (qinfo->ZoneOrSort > 0)
{
- if (!GetAreaEntryByAreaID(qinfo->ZoneOrSort))
+ if (!sAreaTableStore.LookupEntry(qinfo->ZoneOrSort))
{
TC_LOG_ERROR("sql.sql", "Quest %u has `ZoneOrSort` = %u (zone case) but zone with this id does not exist.",
qinfo->GetQuestId(), qinfo->ZoneOrSort);
@@ -5956,7 +5956,7 @@ void ObjectMgr::LoadGraveyardZones()
continue;
}
- AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(zoneId);
+ AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(zoneId);
if (!areaEntry)
{
TC_LOG_ERROR("sql.sql", "Table `game_graveyard_zone` has a record for not existing zone id (%u), skipped.", zoneId);
@@ -7796,7 +7796,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
uint32 entry = fields[0].GetUInt32();
int32 skill = fields[1].GetInt16();
- AreaTableEntry const* fArea = GetAreaEntryByAreaID(entry);
+ AreaTableEntry const* fArea = sAreaTableStore.LookupEntry(entry);
if (!fArea)
{
TC_LOG_ERROR("sql.sql", "AreaId %u defined in `skill_fishing_base_level` does not exist", entry);
diff --git a/src/server/game/Grids/GridDefines.h b/src/server/game/Grids/GridDefines.h
index 162c39b951b..24c9100b222 100644
--- a/src/server/game/Grids/GridDefines.h
+++ b/src/server/game/Grids/GridDefines.h
@@ -226,7 +226,7 @@ namespace Trinity
inline bool IsValidMapCoord(float x, float y, float z)
{
- return IsValidMapCoord(x, y) && std::isfinite(z);
+ return IsValidMapCoord(x, y) && IsValidMapCoord(z);
}
inline bool IsValidMapCoord(float x, float y, float z, float o)
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.cpp b/src/server/game/Grids/Notifiers/GridNotifiers.cpp
index c48d1947eec..571d56b618e 100644
--- a/src/server/game/Grids/Notifiers/GridNotifiers.cpp
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.cpp
@@ -131,7 +131,7 @@ inline void CreatureUnitRelocationWorker(Creature* c, Unit* u)
if (!u->IsAlive() || !c->IsAlive() || c == u || u->IsInFlight())
return;
- if (c->HasReactState(REACT_AGGRESSIVE) && !c->HasUnitState(UNIT_STATE_SIGHTLESS))
+ if ((c->HasReactState(REACT_AGGRESSIVE) || c->IsTrigger()) && !c->HasUnitState(UNIT_STATE_SIGHTLESS))
{
if (c->IsAIEnabled && c->CanSeeOrDetect(u, false, true))
c->AI()->MoveInLineOfSight_Safe(u);
diff --git a/src/server/game/Handlers/ChannelHandler.cpp b/src/server/game/Handlers/ChannelHandler.cpp
index 976860e8cc0..9285f4247b2 100644
--- a/src/server/game/Handlers/ChannelHandler.cpp
+++ b/src/server/game/Handlers/ChannelHandler.cpp
@@ -39,7 +39,7 @@ void WorldSession::HandleJoinChannel(WorldPacket& recvPacket)
if (!channel)
return;
- AreaTableEntry const* zone = GetAreaEntryByAreaID(GetPlayer()->GetZoneId());
+ AreaTableEntry const* zone = sAreaTableStore.LookupEntry(GetPlayer()->GetZoneId());
if (!zone || !GetPlayer()->CanJoinConstantChannelInZone(channel, zone))
return;
}
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index 6cd8bfc014e..5f5a66e7b20 100644
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -319,7 +319,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket& recvData)
continue;
std::string aname;
- if (AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(pzoneid))
+ if (AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(pzoneid))
aname = areaEntry->area_name[GetSessionDbcLocale()];
bool s_show = true;
@@ -1753,7 +1753,7 @@ void WorldSession::HandleHearthAndResurrect(WorldPacket& /*recvData*/)
return;
}
- AreaTableEntry const* atEntry = GetAreaEntryByAreaID(_player->GetAreaId());
+ AreaTableEntry const* atEntry = sAreaTableStore.LookupEntry(_player->GetAreaId());
if (!atEntry || !(atEntry->flags & AREA_FLAG_WINTERGRASP_2))
return;
diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp
index eea5c62fbd1..02702fc5622 100644
--- a/src/server/game/Handlers/MovementHandler.cpp
+++ b/src/server/game/Handlers/MovementHandler.cpp
@@ -386,7 +386,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
plrMover->UpdateFallInformationIfNeed(movementInfo, opcode);
- if (movementInfo.pos.GetPositionZ() < -500.0f)
+ if (movementInfo.pos.GetPositionZ() < plrMover->GetMap()->GetMinHeight(movementInfo.pos.GetPositionX(), movementInfo.pos.GetPositionY()))
{
if (!(plrMover->GetBattleground() && plrMover->GetBattleground()->HandlePlayerUnderMap(_player)))
{
@@ -395,6 +395,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
/// @todo discard movement packets after the player is rooted
if (plrMover->IsAlive())
{
+ plrMover->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_IS_OUT_OF_BOUNDS);
plrMover->EnvironmentalDamage(DAMAGE_FALL_TO_VOID, GetPlayer()->GetMaxHealth());
// player can be alive if GM/etc
// change the death state to CORPSE to prevent the death timer from
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index 530bcd2902c..19dc210ea5b 100644
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -1580,8 +1580,8 @@ void LoadLootTemplates_Fishing()
uint32 count = LootTemplates_Fishing.LoadAndCollectLootIds(lootIdSet);
// remove real entries and check existence loot
- for (uint32 i = 1; i < sAreaStore.GetNumRows(); ++i)
- if (AreaTableEntry const* areaEntry = sAreaStore.LookupEntry(i))
+ for (uint32 i = 1; i < sAreaTableStore.GetNumRows(); ++i)
+ if (AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(i))
if (lootIdSet.find(areaEntry->ID) != lootIdSet.end())
lootIdSet.erase(areaEntry->ID);
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index a2cb84359f2..1560d4bdd08 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -37,7 +37,7 @@
#include "VMapFactory.h"
u_map_magic MapMagic = { {'M','A','P','S'} };
-u_map_magic MapVersionMagic = { {'v','1','.','3'} };
+u_map_magic MapVersionMagic = { {'v','1','.','7'} };
u_map_magic MapAreaMagic = { {'A','R','E','A'} };
u_map_magic MapHeightMagic = { {'M','H','G','T'} };
u_map_magic MapLiquidMagic = { {'M','L','I','Q'} };
@@ -1644,13 +1644,15 @@ GridMap::GridMap()
_flags = 0;
// Area data
_gridArea = 0;
- _areaMap = NULL;
+ _areaMap = nullptr;
// Height level data
_gridHeight = INVALID_HEIGHT;
_gridGetHeight = &GridMap::getHeightFromFlat;
_gridIntHeightMultiplier = 0;
- m_V9 = NULL;
- m_V8 = NULL;
+ m_V9 = nullptr;
+ m_V8 = nullptr;
+ _maxHeight = nullptr;
+ _minHeight = nullptr;
// Liquid data
_liquidType = 0;
_liquidOffX = 0;
@@ -1658,9 +1660,9 @@ GridMap::GridMap()
_liquidWidth = 0;
_liquidHeight = 0;
_liquidLevel = INVALID_HEIGHT;
- _liquidEntry = NULL;
- _liquidFlags = NULL;
- _liquidMap = NULL;
+ _liquidEntry = nullptr;
+ _liquidFlags = nullptr;
+ _liquidMap = nullptr;
}
GridMap::~GridMap()
@@ -1723,15 +1725,19 @@ void GridMap::unloadData()
delete[] _areaMap;
delete[] m_V9;
delete[] m_V8;
+ delete[] _maxHeight;
+ delete[] _minHeight;
delete[] _liquidEntry;
delete[] _liquidFlags;
delete[] _liquidMap;
- _areaMap = NULL;
- m_V9 = NULL;
- m_V8 = NULL;
- _liquidEntry = NULL;
- _liquidFlags = NULL;
- _liquidMap = NULL;
+ _areaMap = nullptr;
+ m_V9 = nullptr;
+ m_V8 = nullptr;
+ _maxHeight = nullptr;
+ _minHeight = nullptr;
+ _liquidEntry = nullptr;
+ _liquidFlags = nullptr;
+ _liquidMap = nullptr;
_gridGetHeight = &GridMap::getHeightFromFlat;
}
@@ -1746,7 +1752,7 @@ bool GridMap::loadAreaData(FILE* in, uint32 offset, uint32 /*size*/)
_gridArea = header.gridArea;
if (!(header.flags & MAP_AREA_NO_AREA))
{
- _areaMap = new uint16 [16*16];
+ _areaMap = new uint16[16 * 16];
if (fread(_areaMap, sizeof(uint16), 16*16, in) != 16*16)
return false;
}
@@ -1796,6 +1802,16 @@ bool GridMap::loadHeightData(FILE* in, uint32 offset, uint32 /*size*/)
}
else
_gridGetHeight = &GridMap::getHeightFromFlat;
+
+ if (header.flags & MAP_HEIGHT_HAS_FLIGHT_BOUNDS)
+ {
+ _maxHeight = new float[16 * 16];
+ _minHeight = new float[16 * 16];
+ if (fread(_maxHeight, sizeof(float), 16 * 16, in) != 16 * 16 ||
+ fread(_minHeight, sizeof(float), 16 * 16, in) != 16 * 16)
+ return false;
+ }
+
return true;
}
@@ -2066,6 +2082,18 @@ float GridMap::getHeightFromUint16(float x, float y) const
return (float)((a * x) + (b * y) + c)*_gridIntHeightMultiplier + _gridHeight;
}
+float GridMap::getMinHeight(float x, float y) const
+{
+ if (!_minHeight)
+ return -500.0f;
+
+ x = 16 * (CENTER_GRID_ID - x / SIZE_OF_GRIDS);
+ y = 16 * (CENTER_GRID_ID - y / SIZE_OF_GRIDS);
+ int lx = (int)x & 15;
+ int ly = (int)y & 15;
+ return _minHeight[lx * 16 + ly];
+}
+
float GridMap::getLiquidLevel(float x, float y) const
{
if (!_liquidMap)
@@ -2125,12 +2153,12 @@ inline ZLiquidStatus GridMap::getLiquidStatus(float x, float y, float z, uint8 R
uint32 liqTypeIdx = liquidEntry->Type;
if (entry < 21)
{
- if (AreaTableEntry const* area = GetAreaEntryByAreaFlagAndMap(getArea(x, y), MAPID_INVALID))
+ if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(getArea(x, y)))
{
uint32 overrideLiquid = area->LiquidTypeOverride[liquidEntry->Type];
if (!overrideLiquid && area->zone)
{
- area = GetAreaEntryByAreaID(area->zone);
+ area = sAreaTableStore.LookupEntry(area->zone);
if (area)
overrideLiquid = area->LiquidTypeOverride[liquidEntry->Type];
}
@@ -2266,6 +2294,14 @@ float Map::GetHeight(float x, float y, float z, bool checkVMap /*= true*/, float
return mapHeight; // explicitly use map data
}
+float Map::GetMinHeight(float x, float y) const
+{
+ if (GridMap const* grid = const_cast<Map*>(this)->GetGrid(x, y))
+ return grid->getMinHeight(x, y);
+
+ return -500.0f;
+}
+
inline bool IsOutdoorWMO(uint32 mogpFlags, int32 /*adtId*/, int32 /*rootId*/, int32 /*groupId*/, WMOAreaTableEntry const* wmoEntry, AreaTableEntry const* atEntry)
{
bool outdoor = true;
@@ -2304,7 +2340,7 @@ bool Map::IsOutdoors(float x, float y, float z) const
if (wmoEntry)
{
TC_LOG_DEBUG("maps", "Got WMOAreaTableEntry! flag %u, areaid %u", wmoEntry->Flags, wmoEntry->areaId);
- atEntry = GetAreaEntryByAreaID(wmoEntry->areaId);
+ atEntry = sAreaTableStore.LookupEntry(wmoEntry->areaId);
}
return IsOutdoorWMO(mogpFlags, adtId, rootId, groupId, wmoEntry, atEntry);
}
@@ -2328,7 +2364,7 @@ bool Map::GetAreaInfo(float x, float y, float z, uint32 &flags, int32 &adtId, in
return false;
}
-uint16 Map::GetAreaFlag(float x, float y, float z, bool *isOutdoors) const
+uint32 Map::GetAreaId(float x, float y, float z, bool *isOutdoors) const
{
uint32 mogpFlags;
int32 adtId, rootId, groupId;
@@ -2341,20 +2377,20 @@ uint16 Map::GetAreaFlag(float x, float y, float z, bool *isOutdoors) const
haveAreaInfo = true;
wmoEntry = GetWMOAreaTableEntryByTripple(rootId, adtId, groupId);
if (wmoEntry)
- atEntry = GetAreaEntryByAreaID(wmoEntry->areaId);
+ atEntry = sAreaTableStore.LookupEntry(wmoEntry->areaId);
}
- uint16 areaflag;
+ uint32 areaId;
if (atEntry)
- areaflag = atEntry->exploreFlag;
+ areaId = atEntry->ID;
else
{
if (GridMap* gmap = const_cast<Map*>(this)->GetGrid(x, y))
- areaflag = gmap->getArea(x, y);
+ areaId = gmap->getArea(x, y);
// this used while not all *.map files generated (instances)
else
- areaflag = GetAreaFlagByMapId(i_mapEntry->MapID);
+ areaId = i_mapEntry->linked_zone;
}
if (isOutdoors)
@@ -2364,8 +2400,31 @@ uint16 Map::GetAreaFlag(float x, float y, float z, bool *isOutdoors) const
else
*isOutdoors = true;
}
- return areaflag;
- }
+ return areaId;
+}
+
+uint32 Map::GetAreaId(float x, float y, float z) const
+{
+ return GetAreaId(x, y, z, nullptr);
+}
+
+uint32 Map::GetZoneId(float x, float y, float z) const
+{
+ uint32 areaId = GetAreaId(x, y, z);
+ if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(areaId))
+ if (area->zone)
+ return area->zone;
+
+ return areaId;
+}
+
+void Map::GetZoneAndAreaId(uint32& zoneid, uint32& areaid, float x, float y, float z) const
+{
+ areaid = zoneid = GetAreaId(x, y, z);
+ if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(areaid))
+ if (area->zone)
+ zoneid = area->zone;
+}
uint8 Map::GetTerrainType(float x, float y) const
{
@@ -2401,12 +2460,12 @@ ZLiquidStatus Map::getLiquidStatus(float x, float y, float z, uint8 ReqLiquidTyp
if (liquid_type && liquid_type < 21)
{
- if (AreaTableEntry const* area = GetAreaEntryByAreaFlagAndMap(GetAreaFlag(x, y, z), GetId()))
+ if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(GetAreaId(x, y, z)))
{
uint32 overrideLiquid = area->LiquidTypeOverride[liquidFlagType];
if (!overrideLiquid && area->zone)
{
- area = GetAreaEntryByAreaID(area->zone);
+ area = sAreaTableStore.LookupEntry(area->zone);
if (area)
overrideLiquid = area->LiquidTypeOverride[liquidFlagType];
}
@@ -2468,34 +2527,6 @@ float Map::GetWaterLevel(float x, float y) const
return 0;
}
-uint32 Map::GetAreaIdByAreaFlag(uint16 areaflag, uint32 map_id)
-{
- AreaTableEntry const* entry = GetAreaEntryByAreaFlagAndMap(areaflag, map_id);
-
- if (entry)
- return entry->ID;
- else
- return 0;
-}
-
-uint32 Map::GetZoneIdByAreaFlag(uint16 areaflag, uint32 map_id)
-{
- AreaTableEntry const* entry = GetAreaEntryByAreaFlagAndMap(areaflag, map_id);
-
- if (entry)
- return (entry->zone != 0) ? entry->zone : entry->ID;
- else
- return 0;
-}
-
-void Map::GetZoneAndAreaIdByAreaFlag(uint32& zoneid, uint32& areaid, uint16 areaflag, uint32 map_id)
-{
- AreaTableEntry const* entry = GetAreaEntryByAreaFlagAndMap(areaflag, map_id);
-
- areaid = entry ? entry->ID : 0;
- zoneid = entry ? ((entry->zone != 0) ? entry->zone : entry->ID) : 0;
-}
-
bool Map::isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask) const
{
return VMAP::VMapFactory::createOrGetVMapManager()->isInLineOfSight(GetId(), x1, y1, z1, x2, y2, z2)
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index 01db38d9c30..13d48db0f9d 100644
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -98,9 +98,10 @@ struct map_areaHeader
uint16 gridArea;
};
-#define MAP_HEIGHT_NO_HEIGHT 0x0001
-#define MAP_HEIGHT_AS_INT16 0x0002
-#define MAP_HEIGHT_AS_INT8 0x0004
+#define MAP_HEIGHT_NO_HEIGHT 0x0001
+#define MAP_HEIGHT_AS_INT16 0x0002
+#define MAP_HEIGHT_AS_INT8 0x0004
+#define MAP_HEIGHT_HAS_FLIGHT_BOUNDS 0x0008
struct map_heightHeader
{
@@ -166,6 +167,8 @@ class GridMap
uint16* m_uint16_V8;
uint8* m_uint8_V8;
};
+ float* _maxHeight;
+ float* _minHeight;
// Height level data
float _gridHeight;
float _gridIntHeightMultiplier;
@@ -206,6 +209,7 @@ public:
uint16 getArea(float x, float y) const;
inline float getHeight(float x, float y) const {return (this->*_gridGetHeight)(x, y);}
+ float getMinHeight(float x, float y) const;
float getLiquidLevel(float x, float y) const;
uint8 getTerrainType(float x, float y) const;
ZLiquidStatus getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData* data = 0);
@@ -326,11 +330,15 @@ class Map : public GridRefManager<NGridType>
// some calls like isInWater should not use vmaps due to processor power
// can return INVALID_HEIGHT if under z+2 z coord not found height
float GetHeight(float x, float y, float z, bool checkVMap = true, float maxSearchDist = DEFAULT_HEIGHT_SEARCH) const;
+ float GetMinHeight(float x, float y) const;
ZLiquidStatus getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData* data = nullptr) const;
- uint16 GetAreaFlag(float x, float y, float z, bool *isOutdoors=nullptr) const;
- bool GetAreaInfo(float x, float y, float z, uint32 &mogpflags, int32 &adtId, int32 &rootId, int32 &groupId) const;
+ uint32 GetAreaId(float x, float y, float z, bool *isOutdoors) const;
+ bool GetAreaInfo(float x, float y, float z, uint32& mogpflags, int32& adtId, int32& rootId, int32& groupId) const;
+ uint32 GetAreaId(float x, float y, float z) const;
+ uint32 GetZoneId(float x, float y, float z) const;
+ void GetZoneAndAreaId(uint32& zoneid, uint32& areaid, float x, float y, float z) const;
bool IsOutdoors(float x, float y, float z) const;
@@ -339,25 +347,6 @@ class Map : public GridRefManager<NGridType>
bool IsInWater(float x, float y, float z, LiquidData* data = nullptr) const;
bool IsUnderWater(float x, float y, float z) const;
- static uint32 GetAreaIdByAreaFlag(uint16 areaflag, uint32 map_id);
- static uint32 GetZoneIdByAreaFlag(uint16 areaflag, uint32 map_id);
- static void GetZoneAndAreaIdByAreaFlag(uint32& zoneid, uint32& areaid, uint16 areaflag, uint32 map_id);
-
- uint32 GetAreaId(float x, float y, float z) const
- {
- return GetAreaIdByAreaFlag(GetAreaFlag(x, y, z), GetId());
- }
-
- uint32 GetZoneId(float x, float y, float z) const
- {
- return GetZoneIdByAreaFlag(GetAreaFlag(x, y, z), GetId());
- }
-
- void GetZoneAndAreaId(uint32& zoneid, uint32& areaid, float x, float y, float z) const
- {
- GetZoneAndAreaIdByAreaFlag(zoneid, areaid, GetAreaFlag(x, y, z), GetId());
- }
-
void MoveAllCreaturesInMoveList();
void MoveAllGameObjectsInMoveList();
void MoveAllDynamicObjectsInMoveList();
diff --git a/src/server/game/Maps/MapManager.h b/src/server/game/Maps/MapManager.h
index 51bb418bdf5..7f9621593d4 100644
--- a/src/server/game/Maps/MapManager.h
+++ b/src/server/game/Maps/MapManager.h
@@ -42,22 +42,20 @@ class MapManager
Map* CreateMap(uint32 mapId, Player* player, uint32 loginInstanceId=0);
Map* FindMap(uint32 mapId, uint32 instanceId) const;
- uint16 GetAreaFlag(uint32 mapid, float x, float y, float z) const
- {
- Map const* m = const_cast<MapManager*>(this)->CreateBaseMap(mapid);
- return m->GetAreaFlag(x, y, z);
- }
uint32 GetAreaId(uint32 mapid, float x, float y, float z) const
{
- return Map::GetAreaIdByAreaFlag(GetAreaFlag(mapid, x, y, z), mapid);
+ Map const* m = const_cast<MapManager*>(this)->CreateBaseMap(mapid);
+ return m->GetAreaId(x, y, z);
}
uint32 GetZoneId(uint32 mapid, float x, float y, float z) const
{
- return Map::GetZoneIdByAreaFlag(GetAreaFlag(mapid, x, y, z), mapid);
+ Map const* m = const_cast<MapManager*>(this)->CreateBaseMap(mapid);
+ return m->GetZoneId(x, y, z);
}
void GetZoneAndAreaId(uint32& zoneid, uint32& areaid, uint32 mapid, float x, float y, float z)
{
- Map::GetZoneAndAreaIdByAreaFlag(zoneid, areaid, GetAreaFlag(mapid, x, y, z), mapid);
+ Map const* m = const_cast<MapManager*>(this)->CreateBaseMap(mapid);
+ m->GetZoneAndAreaId(zoneid, areaid, x, y, z);
}
void Initialize(void);
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
index 868cba9a5b9..d329ab27de9 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
@@ -687,7 +687,7 @@ void OutdoorPvP::BroadcastWorker(Worker& _worker, uint32 zoneId)
void OutdoorPvP::SetMapFromZone(uint32 zone)
{
- AreaTableEntry const* areaTable = GetAreaEntryByAreaID(zone);
+ AreaTableEntry const* areaTable = sAreaTableStore.LookupEntry(zone);
ASSERT(areaTable);
Map* map = sMapMgr->CreateBaseMap(areaTable->mapid);
ASSERT(!map->Instanceable());
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 6a10d113553..207908c6d51 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -4683,11 +4683,6 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
if (target->GetTypeId() == TYPEID_PLAYER)
target->ToPlayer()->RemoveAmmo(); // not use ammo and not allow use
break;
- case 52916: // Honor Among Thieves
- if (target->GetTypeId() == TYPEID_PLAYER)
- if (Unit* spellTarget = ObjectAccessor::GetUnit(*target, target->ToPlayer()->GetComboTarget()))
- target->CastSpell(spellTarget, 51699, true);
- break;
case 71563:
if (Aura* newAura = target->AddAura(71564, target))
newAura->SetStackAmount(newAura->GetSpellInfo()->StackAmount);
@@ -5619,25 +5614,6 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
target->RemoveAurasDueToSpell(28820);
return;
}
- // Totemic Mastery (Skyshatter Regalia (Shaman Tier 6) - bonus)
- case 38443:
- {
- bool all = true;
- for (int i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i)
- {
- if (!target->m_SummonSlot[i])
- {
- all = false;
- break;
- }
- }
-
- if (all)
- target->CastSpell(target, 38437, true, NULL, this);
- else
- target->RemoveAurasDueToSpell(38437);
- return;
- }
}
break;
}
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 63fe148dd93..7c1ccbdb463 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -5477,7 +5477,7 @@ SpellCastResult Spell::CheckCast(bool strict)
if (m_originalCaster && m_originalCaster->GetTypeId() == TYPEID_PLAYER && m_originalCaster->IsAlive())
{
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldToZoneId(m_originalCaster->GetZoneId());
- if (AreaTableEntry const* area = GetAreaEntryByAreaID(m_originalCaster->GetAreaId()))
+ if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(m_originalCaster->GetAreaId()))
if (area->flags & AREA_FLAG_NO_FLY_ZONE || (Bf && !Bf->CanFlyIn()))
return (_triggeredCastFlags & TRIGGERED_DONT_REPORT_CAST_ERROR) ? SPELL_FAILED_DONT_REPORT : SPELL_FAILED_NOT_HERE;
}
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index f961654f279..b2aa44e28df 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -4137,14 +4137,14 @@ void Spell::EffectDuel(SpellEffIndex effIndex)
return;
// Players can only fight a duel in zones with this flag
- AreaTableEntry const* casterAreaEntry = GetAreaEntryByAreaID(caster->GetAreaId());
+ AreaTableEntry const* casterAreaEntry = sAreaTableStore.LookupEntry(caster->GetAreaId());
if (casterAreaEntry && !(casterAreaEntry->flags & AREA_FLAG_ALLOW_DUELS))
{
SendCastResult(SPELL_FAILED_NO_DUELING); // Dueling isn't allowed here
return;
}
- AreaTableEntry const* targetAreaEntry = GetAreaEntryByAreaID(target->GetAreaId());
+ AreaTableEntry const* targetAreaEntry = sAreaTableStore.LookupEntry(target->GetAreaId());
if (targetAreaEntry && !(targetAreaEntry->flags & AREA_FLAG_ALLOW_DUELS))
{
SendCastResult(SPELL_FAILED_NO_DUELING); // Dueling isn't allowed here
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index ff8fc4539ff..40e8f2d4e24 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -1159,7 +1159,7 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32
if (!player)
return false;
- AreaTableEntry const* pArea = GetAreaEntryByAreaID(player->GetAreaId());
+ AreaTableEntry const* pArea = sAreaTableStore.LookupEntry(player->GetAreaId());
if (!(pArea && pArea->flags & AREA_FLAG_NO_FLY_ZONE))
return false;
if (!player->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) && !player->HasAuraType(SPELL_AURA_FLY))
@@ -2618,7 +2618,7 @@ void SpellMgr::LoadSpellAreas()
}
}
- if (spellArea.areaId && !GetAreaEntryByAreaID(spellArea.areaId))
+ if (spellArea.areaId && !sAreaTableStore.LookupEntry(spellArea.areaId))
{
TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` have wrong area (%u) requirement", spell, spellArea.areaId);
continue;
diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp
index 8d3ee939e2c..499f0c9cbf0 100644
--- a/src/server/game/Texts/CreatureTextMgr.cpp
+++ b/src/server/game/Texts/CreatureTextMgr.cpp
@@ -191,7 +191,6 @@ void CreatureTextMgr::LoadCreatureTextLocales()
} while (result->NextRow());
TC_LOG_INFO("server.loading", ">> Loaded %u creature localized texts in %u ms", textCount, GetMSTimeDiffToNow(oldMSTime));
-
}
uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject const* whisperTarget /*= nullptr*/, ChatMsg msgType /*= CHAT_MSG_ADDON*/, Language language /*= LANG_ADDON*/, CreatureTextRange range /*= TEXT_RANGE_NORMAL*/, uint32 sound /*= 0*/, Team team /*= TEAM_OTHER*/, bool gmOnly /*= false*/, Player* srcPlr /*= nullptr*/)
@@ -228,42 +227,10 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject
tempGroup = textGroupContainer;
}
- uint8 count = 0;
- float lastChance = -1;
- bool isEqualChanced = true;
-
- float totalChance = 0;
-
- for (CreatureTextGroup::const_iterator iter = tempGroup.begin(); iter != tempGroup.end(); ++iter)
+ auto iter = Trinity::Containers::SelectRandomWeightedContainerElement(tempGroup, [](CreatureTextEntry const& t) -> double
{
- if (lastChance >= 0 && lastChance != iter->probability)
- isEqualChanced = false;
-
- lastChance = iter->probability;
- totalChance += iter->probability;
- ++count;
- }
-
- int32 offset = -1;
- if (!isEqualChanced)
- {
- for (CreatureTextGroup::const_iterator iter = tempGroup.begin(); iter != tempGroup.end(); ++iter)
- {
- uint32 chance = uint32(iter->probability);
- uint32 r = urand(0, 100);
- ++offset;
- if (r <= chance)
- break;
- }
- }
-
- uint32 pos = 0;
- if (isEqualChanced || offset < 0)
- pos = urand(0, count - 1);
- else if (offset >= 0)
- pos = offset;
-
- CreatureTextGroup::const_iterator iter = tempGroup.begin() + pos;
+ return t.probability;
+ });
ChatMsg finalType = (msgType == CHAT_MSG_ADDON) ? iter->type : msgType;
Language finalLang = (language == LANG_ADDON) ? iter->lang : language;
@@ -293,9 +260,7 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject
SendChatPacket(finalSource, builder, finalType, whisperTarget, range, team, gmOnly);
}
- if (isEqualChanced || totalChance == 100.0f)
- SetRepeatId(source, textGroup, iter->id);
-
+ SetRepeatId(source, textGroup, iter->id);
return iter->duration;
}
diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp
index b7acfb85f50..039af61c010 100644
--- a/src/server/scripts/Commands/cs_go.cpp
+++ b/src/server/scripts/Commands/cs_go.cpp
@@ -424,7 +424,7 @@ public:
uint32 areaId = id ? (uint32)atoi(id) : player->GetZoneId();
- AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(areaId);
+ AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(areaId);
if (x < 0 || x > 100 || y < 0 || y > 100 || !areaEntry)
{
@@ -434,7 +434,7 @@ public:
}
// update to parent zone if exist (client map show only zones without parents)
- AreaTableEntry const* zoneEntry = areaEntry->zone ? GetAreaEntryByAreaID(areaEntry->zone) : areaEntry;
+ AreaTableEntry const* zoneEntry = areaEntry->zone ? sAreaTableStore.LookupEntry(areaEntry->zone) : areaEntry;
ASSERT(zoneEntry);
Map const* map = sMapMgr->CreateBaseMap(zoneEntry->mapid);
diff --git a/src/server/scripts/Commands/cs_group.cpp b/src/server/scripts/Commands/cs_group.cpp
index 5e8952ce881..9f2bc86f9c0 100644
--- a/src/server/scripts/Commands/cs_group.cpp
+++ b/src/server/scripts/Commands/cs_group.cpp
@@ -348,10 +348,10 @@ public:
phase = (!p->IsGameMaster() ? p->GetPhaseMask() : -1);
uint32 locale = handler->GetSessionDbcLocale();
- AreaTableEntry const* area = GetAreaEntryByAreaID(p->GetAreaId());
+ AreaTableEntry const* area = sAreaTableStore.LookupEntry(p->GetAreaId());
if (area)
{
- AreaTableEntry const* zone = GetAreaEntryByAreaID(area->zone);
+ AreaTableEntry const* zone = sAreaTableStore.LookupEntry(area->zone);
if (zone)
zoneName = zone->area_name[locale];
}
diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp
index 4e749d33fcf..61e6acfb4d8 100644
--- a/src/server/scripts/Commands/cs_lookup.cpp
+++ b/src/server/scripts/Commands/cs_lookup.cpp
@@ -97,9 +97,9 @@ public:
wstrToLower(wNamePart);
// Search in AreaTable.dbc
- for (uint32 areaflag = 0; areaflag < sAreaStore.GetNumRows(); ++areaflag)
+ for (uint32 i = 0; i < sAreaTableStore.GetNumRows(); ++i)
{
- AreaTableEntry const* areaEntry = sAreaStore.LookupEntry(areaflag);
+ AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(i);
if (areaEntry)
{
int locale = handler->GetSessionDbcLocale();
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp
index 6ae509af443..c70246f7fb5 100644
--- a/src/server/scripts/Commands/cs_misc.cpp
+++ b/src/server/scripts/Commands/cs_misc.cpp
@@ -198,8 +198,8 @@ public:
uint32 mapId = object->GetMapId();
MapEntry const* mapEntry = sMapStore.LookupEntry(mapId);
- AreaTableEntry const* zoneEntry = GetAreaEntryByAreaID(zoneId);
- AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(areaId);
+ AreaTableEntry const* zoneEntry = sAreaTableStore.LookupEntry(zoneId);
+ AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(areaId);
float zoneX = object->GetPositionX();
float zoneY = object->GetPositionY();
@@ -961,7 +961,7 @@ public:
uint32 zoneId = player->GetZoneId();
- AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(zoneId);
+ AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(zoneId);
if (!areaEntry || areaEntry->zone !=0)
{
handler->PSendSysMessage(LANG_COMMAND_GRAVEYARDWRONGZONE, graveyardId, zoneId);
@@ -1052,17 +1052,23 @@ public:
return false;
}
- int32 area = GetAreaFlagByAreaID(atoi((char*)args));
- int32 offset = area / 32;
+ AreaTableEntry const* area = sAreaTableStore.LookupEntry(atoi(args));
+ if (!area)
+ {
+ handler->SendSysMessage(LANG_BAD_VALUE);
+ handler->SetSentErrorMessage(true);
+ return false;
+ }
- if (area<0 || offset >= PLAYER_EXPLORED_ZONES_SIZE)
+ int32 offset = area->exploreFlag / 32;
+ if (offset >= PLAYER_EXPLORED_ZONES_SIZE)
{
handler->SendSysMessage(LANG_BAD_VALUE);
handler->SetSentErrorMessage(true);
return false;
}
- uint32 val = uint32((1 << (area % 32)));
+ uint32 val = uint32((1 << (area->exploreFlag % 32)));
uint32 currFields = playerTarget->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset);
playerTarget->SetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset, uint32((currFields | val)));
@@ -1083,17 +1089,23 @@ public:
return false;
}
- int32 area = GetAreaFlagByAreaID(atoi((char*)args));
- int32 offset = area / 32;
+ AreaTableEntry const* area = sAreaTableStore.LookupEntry(atoi(args));
+ if (!area)
+ {
+ handler->SendSysMessage(LANG_BAD_VALUE);
+ handler->SetSentErrorMessage(true);
+ return false;
+ }
- if (area < 0 || offset >= PLAYER_EXPLORED_ZONES_SIZE)
+ int32 offset = area->exploreFlag / 32;
+ if (offset >= PLAYER_EXPLORED_ZONES_SIZE)
{
handler->SendSysMessage(LANG_BAD_VALUE);
handler->SetSentErrorMessage(true);
return false;
}
- uint32 val = uint32((1 << (area % 32)));
+ uint32 val = uint32((1 << (area->exploreFlag % 32)));
uint32 currFields = playerTarget->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset);
playerTarget->SetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset, uint32((currFields ^ val)));
@@ -1737,12 +1749,12 @@ public:
// Position data
MapEntry const* map = sMapStore.LookupEntry(mapId);
- AreaTableEntry const* area = GetAreaEntryByAreaID(areaId);
+ AreaTableEntry const* area = sAreaTableStore.LookupEntry(areaId);
if (area)
{
areaName = area->area_name[locale];
- AreaTableEntry const* zone = GetAreaEntryByAreaID(area->zone);
+ AreaTableEntry const* zone = sAreaTableStore.LookupEntry(area->zone);
if (zone)
zoneName = zone->area_name[locale];
}
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp
index b23b9e645d0..b725f421c8f 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp
@@ -44,6 +44,13 @@ EndScriptData */
11 - Nightbane
*/
+const Position OptionalSpawn[] =
+{
+ { -10960.981445f, -1940.138428f, 46.178097f, 4.12f }, // Hyakiss the Lurker
+ { -10899.903320f, -2085.573730f, 49.474449f, 1.38f }, // Rokad the Ravager
+ { -10945.769531f, -2040.153320f, 49.474438f, 0.077f } // Shadikith the Glider
+};
+
class instance_karazhan : public InstanceMapScript
{
public:
@@ -64,6 +71,7 @@ public:
// 1 - OZ, 2 - HOOD, 3 - RAJ, this never gets altered.
m_uiOperaEvent = urand(1, 3);
m_uiOzDeathCount = 0;
+ OptionalBossCount = 0;
}
uint32 m_auiEncounter[MAX_ENCOUNTER];
@@ -71,6 +79,7 @@ public:
uint32 m_uiOperaEvent;
uint32 m_uiOzDeathCount;
+ uint32 OptionalBossCount;
ObjectGuid m_uiCurtainGUID;
ObjectGuid m_uiStageDoorLeftGUID;
@@ -107,6 +116,29 @@ public:
}
}
+ void OnUnitDeath(Unit* unit) override
+ {
+ Creature* creature = unit->ToCreature();
+ if (!creature)
+ return;
+
+ switch (creature->GetEntry())
+ {
+ case NPC_COLDMIST_WIDOW:
+ case NPC_COLDMIST_STALKER:
+ case NPC_SHADOWBAT:
+ case NPC_VAMPIRIC_SHADOWBAT:
+ case NPC_GREATER_SHADOWBAT:
+ case NPC_PHASE_HOUND:
+ case NPC_DREADBEAST:
+ case NPC_SHADOWBEAST:
+ SetData(TYPE_OPTIONAL_BOSS, NOT_STARTED);
+ break;
+ default:
+ break;
+ }
+ }
+
void SetData(uint32 type, uint32 uiData) override
{
switch (type)
@@ -118,7 +150,28 @@ public:
m_auiEncounter[1] = uiData;
break;
case TYPE_MAIDEN: m_auiEncounter[2] = uiData; break;
- case TYPE_OPTIONAL_BOSS: m_auiEncounter[3] = uiData; break;
+ case TYPE_OPTIONAL_BOSS:
+ m_auiEncounter[3] = uiData;
+ if (uiData == NOT_STARTED)
+ {
+ ++OptionalBossCount;
+ if (OptionalBossCount == 50)
+ {
+ switch (urand(0, 2))
+ {
+ case 0:
+ instance->SummonCreature(NPC_HYAKISS_THE_LURKER, OptionalSpawn[0]);
+ break;
+ case 1:
+ instance->SummonCreature(NPC_ROKAD_THE_RAVAGER, OptionalSpawn[1]);
+ break;
+ case 2:
+ instance->SummonCreature(NPC_SHADIKITH_THE_GLIDER, OptionalSpawn[2]);
+ break;
+ }
+ }
+ }
+ break;
case TYPE_OPERA:
m_auiEncounter[4] = uiData;
if (uiData == DONE)
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h
index db68484c4a8..4d86492257c 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h
@@ -64,4 +64,20 @@ enum OperaEvents
EVENT_RAJ = 3
};
+enum MiscCreatures
+{
+ NPC_HYAKISS_THE_LURKER = 16179,
+ NPC_ROKAD_THE_RAVAGER = 16181,
+ NPC_SHADIKITH_THE_GLIDER = 16180,
+
+ // Trash
+ NPC_COLDMIST_WIDOW = 16171,
+ NPC_COLDMIST_STALKER = 16170,
+ NPC_SHADOWBAT = 16173,
+ NPC_VAMPIRIC_SHADOWBAT = 16175,
+ NPC_GREATER_SHADOWBAT = 16174,
+ NPC_PHASE_HOUND = 16178,
+ NPC_DREADBEAST = 16177,
+ NPC_SHADOWBEAST = 16176
+};
#endif
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
index b48f0edec25..6386bb50e1a 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
@@ -16,8 +16,10 @@
*/
#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
#include "InstanceScript.h"
#include "magisters_terrace.h"
+#include "EventMap.h"
/*
0 - Selin Fireheart
@@ -36,6 +38,8 @@ DoorData const doorData[] =
{ 0, 0, DOOR_TYPE_ROOM } // END
};
+Position const KalecgosSpawnPos = { 164.3747f, -397.1197f, 2.151798f, 1.66219f };
+
class instance_magisters_terrace : public InstanceMapScript
{
public:
@@ -93,6 +97,10 @@ class instance_magisters_terrace : public InstanceMapScript
case NPC_DELRISSA:
DelrissaGUID = creature->GetGUID();
break;
+ case NPC_KALECGOS:
+ case NPC_HUMAN_KALECGOS:
+ KalecgosGUID = creature->GetGUID();
+ break;
default:
break;
}
@@ -139,6 +147,25 @@ class instance_magisters_terrace : public InstanceMapScript
}
}
+ void ProcessEvent(WorldObject* obj, uint32 eventId) override
+ {
+ if (eventId == EVENT_SPAWN_KALECGOS)
+ if (!ObjectAccessor::GetCreature(*obj, KalecgosGUID) && Events.Empty())
+ Events.ScheduleEvent(EVENT_SPAWN_KALECGOS, Minutes(1));
+ }
+
+ void Update(uint32 diff) override
+ {
+ Events.Update(diff);
+
+ if (Events.ExecuteEvent() == EVENT_SPAWN_KALECGOS)
+ if (Creature* kalecgos = instance->SummonCreature(NPC_KALECGOS, KalecgosSpawnPos))
+ {
+ kalecgos->GetMotionMaster()->MovePath(PATH_KALECGOS_FLIGHT, false);
+ kalecgos->AI()->Talk(SAY_KALECGOS_SPAWN);
+ }
+ }
+
bool SetBossState(uint32 type, EncounterState state) override
{
if (!InstanceScript::SetBossState(type, state))
@@ -177,10 +204,12 @@ class instance_magisters_terrace : public InstanceMapScript
}
protected:
+ EventMap Events;
ObjectGuid SelinGUID;
ObjectGuid DelrissaGUID;
ObjectGuid KaelStatue[2];
ObjectGuid EscapeOrbGUID;
+ ObjectGuid KalecgosGUID;
uint32 DelrissaDeathCount;
};
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp
index e216a024468..5b90ac8ccf4 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp
@@ -31,7 +31,8 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "Player.h"
-#include "SpellInfo.h"
+#include "magisters_terrace.h"
+#include "EventMap.h"
/*######
## npc_kalecgos
@@ -39,30 +40,29 @@ EndContentData */
enum Spells
{
- SPELL_TRANSFORM_TO_KAEL = 44670,
+ SPELL_KALECGOS_TRANSFORM = 44670,
+ SPELL_TRANSFORM_VISUAL = 24085,
+ SPELL_CAMERA_SHAKE = 44762,
SPELL_ORB_KILL_CREDIT = 46307
};
-enum Creatures
+enum MovementPoints
{
- NPC_KAEL = 24848 //human form entry
+ POINT_ID_PREPARE_LANDING = 6
};
-enum Misc
+enum EventIds
{
- POINT_ID_LAND = 1
+ EVENT_KALECGOS_TRANSFORM = 1,
+ EVENT_KALECGOS_LANDING = 2
};
-const float afKaelLandPoint[] = {225.045f, -276.236f, -5.434f};
-
#define GOSSIP_ITEM_KAEL_1 "Who are you?"
#define GOSSIP_ITEM_KAEL_2 "What can we do to assist you?"
#define GOSSIP_ITEM_KAEL_3 "What brings you to the Sunwell?"
#define GOSSIP_ITEM_KAEL_4 "You're not alone here?"
#define GOSSIP_ITEM_KAEL_5 "What would Kil'jaeden want with a mortal woman?"
-// This is friendly keal that appear after used Orb.
-// If we assume DB handle summon, summon appear somewhere outside the platform where Orb is
class npc_kalecgos : public CreatureScript
{
public:
@@ -115,52 +115,46 @@ public:
struct npc_kalecgosAI : public ScriptedAI
{
- npc_kalecgosAI(Creature* creature) : ScriptedAI(creature)
- {
- Initialize();
- }
+ npc_kalecgosAI(Creature* creature) : ScriptedAI(creature) { }
- void Initialize()
+ void MovementInform(uint32 type, uint32 pointId) override
{
- m_uiTransformTimer = 0;
- }
-
- uint32 m_uiTransformTimer;
-
- void Reset() override
- {
- Initialize();
-
- // we must assume he appear as dragon somewhere outside the platform of orb, and then move directly to here
- if (me->GetEntry() != NPC_KAEL)
- me->GetMotionMaster()->MovePoint(POINT_ID_LAND, afKaelLandPoint[0], afKaelLandPoint[1], afKaelLandPoint[2]);
- }
-
- void MovementInform(uint32 uiType, uint32 uiPointId) override
- {
- if (uiType != POINT_MOTION_TYPE)
+ if (type != WAYPOINT_MOTION_TYPE)
return;
- if (uiPointId == POINT_ID_LAND)
- m_uiTransformTimer = MINUTE*IN_MILLISECONDS;
+ if (pointId == POINT_ID_PREPARE_LANDING)
+ {
+ me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
+ me->SetDisableGravity(false);
+ me->SetHover(false);
+ events.ScheduleEvent(EVENT_KALECGOS_LANDING, Seconds(2));
+ }
}
- void UpdateAI(uint32 uiDiff) override
+ void UpdateAI(uint32 diff) override
{
- if (m_uiTransformTimer)
+ events.Update(diff);
+
+ switch (events.ExecuteEvent())
{
- if (m_uiTransformTimer <= uiDiff)
- {
+ case EVENT_KALECGOS_LANDING:
+ DoCastAOE(SPELL_CAMERA_SHAKE);
+ me->SetObjectScale(0.6f);
+ events.ScheduleEvent(EVENT_KALECGOS_TRANSFORM, Seconds(1));
+ break;
+ case EVENT_KALECGOS_TRANSFORM:
DoCast(me, SPELL_ORB_KILL_CREDIT, true);
-
- // Transform and update entry, now ready for quest/read gossip
- DoCast(me, SPELL_TRANSFORM_TO_KAEL, false);
- me->UpdateEntry(NPC_KAEL);
-
- m_uiTransformTimer = 0;
- } else m_uiTransformTimer -= uiDiff;
+ DoCast(me, SPELL_TRANSFORM_VISUAL, false);
+ DoCast(me, SPELL_KALECGOS_TRANSFORM, false);
+ me->UpdateEntry(NPC_HUMAN_KALECGOS);
+ break;
+ default:
+ break;
}
}
+
+ private:
+ EventMap events;
};
};
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h
index 917ad0eb50b..05718dfc1dd 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h
@@ -42,7 +42,9 @@ enum CreatureIds
{
NPC_SELIN = 24723,
NPC_DELRISSA = 24560,
- NPC_FEL_CRYSTAL = 24722
+ NPC_FEL_CRYSTAL = 24722,
+ NPC_KALECGOS = 24844,
+ NPC_HUMAN_KALECGOS = 24848
};
enum GameObjectIds
@@ -57,4 +59,19 @@ enum GameObjectIds
GO_ESCAPE_ORB = 188173
};
+enum InstanceEventIds
+{
+ EVENT_SPAWN_KALECGOS = 16547
+};
+
+enum InstanceText
+{
+ SAY_KALECGOS_SPAWN = 0
+};
+
+enum MovementData
+{
+ PATH_KALECGOS_FLIGHT = 248440
+};
+
#endif
diff --git a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp
index b1a00f35bb5..a01b93a140b 100644
--- a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp
@@ -25,7 +25,6 @@ EndScriptData */
/* ContentData
npcs_dithers_and_arbington
-npc_myranda_the_hag
npc_the_scourge_cauldron
npc_andorhal_tower
EndContentData */
@@ -33,7 +32,6 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
-#include "ScriptedEscortAI.h"
#include "Player.h"
#include "WorldSession.h"
@@ -120,54 +118,6 @@ public:
};
/*######
-## npc_myranda_the_hag
-######*/
-
-enum Myranda
-{
- ILLUSION_GOSSIP = 4773,
- QUEST_SUBTERFUGE = 5862,
- QUEST_IN_DREAMS = 5944,
- SPELL_SCARLET_ILLUSION = 17961
-};
-
-class npc_myranda_the_hag : public CreatureScript
-{
-public:
- npc_myranda_the_hag() : CreatureScript("npc_myranda_the_hag") { }
-
- bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) override
- {
- player->PlayerTalkClass->ClearMenus();
- if (action == GOSSIP_ACTION_INFO_DEF + 1)
- {
- player->CLOSE_GOSSIP_MENU();
- player->CastSpell(player, SPELL_SCARLET_ILLUSION, false);
- }
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature) override
- {
- if (creature->IsQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
-
- if (player->GetQuestStatus(QUEST_SUBTERFUGE) == QUEST_STATUS_COMPLETE &&
- player->GetQuestStatus(QUEST_IN_DREAMS) != QUEST_STATUS_COMPLETE &&
- !player->HasAura(SPELL_SCARLET_ILLUSION))
- {
- player->ADD_GOSSIP_ITEM_DB(Player::GetDefaultGossipMenuForSource(creature), 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
- player->SEND_GOSSIP_MENU(ILLUSION_GOSSIP, creature->GetGUID());
- return true;
- }
- else
- player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
-
- return true;
- }
-};
-
-/*######
## npc_the_scourge_cauldron
######*/
@@ -195,7 +145,7 @@ public:
me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
//override any database `spawntimesecs` to prevent duplicated summons
uint32 rTime = me->GetRespawnDelay();
- if (rTime<600)
+ if (rTime < 600)
me->SetRespawnDelay(600);
}
@@ -274,7 +224,6 @@ public:
}
void MoveInLineOfSight(Unit* who) override
-
{
if (!who || who->GetTypeId() != TYPEID_PLAYER)
return;
@@ -286,14 +235,9 @@ public:
};
};
-/*######
-##
-######*/
-
void AddSC_western_plaguelands()
{
new npcs_dithers_and_arbington();
- new npc_myranda_the_hag();
new npc_the_scourge_cauldron();
new npc_andorhal_tower();
}
diff --git a/src/server/scripts/Kalimdor/zone_ashenvale.cpp b/src/server/scripts/Kalimdor/zone_ashenvale.cpp
index 52a83c02a8a..50730507b8f 100644
--- a/src/server/scripts/Kalimdor/zone_ashenvale.cpp
+++ b/src/server/scripts/Kalimdor/zone_ashenvale.cpp
@@ -31,6 +31,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
#include "Player.h"
+#include "SpellScript.h"
/*####
# npc_ruul_snowhoof
@@ -344,9 +345,42 @@ class go_naga_brazier : public GameObjectScript
}
};
+enum KingoftheFoulwealdMisc
+{
+ GO_BANNER = 178205
+};
+
+class spell_destroy_karangs_banner : public SpellScriptLoader
+{
+ public:
+ spell_destroy_karangs_banner() : SpellScriptLoader("spell_destroy_karangs_banner") { }
+
+ class spell_destroy_karangs_banner_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_destroy_karangs_banner_SpellScript);
+
+ void HandleAfterCast()
+ {
+ if (GameObject* banner = GetCaster()->FindNearestGameObject(GO_BANNER, GetSpellInfo()->GetMaxRange(true)))
+ banner->Delete();
+ }
+
+ void Register() override
+ {
+ AfterCast += SpellCastFn(spell_destroy_karangs_banner_SpellScript::HandleAfterCast);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_destroy_karangs_banner_SpellScript();
+ }
+};
+
void AddSC_ashenvale()
{
new npc_ruul_snowhoof();
new npc_muglash();
new go_naga_brazier();
+ new spell_destroy_karangs_banner();
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
index b8e7dcc91d5..f59701b9c25 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
@@ -1222,7 +1222,6 @@ class npc_kinetic_bomb : public CreatureScript
_x = 0.f;
_y = 0.f;
_groundZ = 0.f;
- me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);
}
void Reset() override
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
index 0f721148b72..2db9d206a00 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
@@ -317,14 +317,12 @@ class boss_professor_putricide : public CreatureScript
// no possible aura seen in sniff adding the aurastate
summon->ModifyAuraState(AURA_STATE_UNKNOWN22, true);
summon->CastSpell(summon, SPELL_GASEOUS_BLOAT_PROC, true);
- summon->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);
summon->SetReactState(REACT_PASSIVE);
break;
case NPC_VOLATILE_OOZE:
// no possible aura seen in sniff adding the aurastate
summon->ModifyAuraState(AURA_STATE_UNKNOWN19, true);
summon->CastSpell(summon, SPELL_OOZE_ERUPTION_SEARCH_PERIODIC, true);
- summon->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);
summon->SetReactState(REACT_PASSIVE);
break;
case NPC_CHOKING_GAS_BOMB:
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
index fd945db4604..89868fc7bf2 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
@@ -980,7 +980,7 @@ class go_celestial_planetarium_access : public GameObjectScript
bool GossipHello(Player* player) override
{
if (go->HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE))
- return false;
+ return true;
bool hasKey = true;
if (LockEntry const* lock = sLockStore.LookupEntry(go->GetGOInfo()->goober.lockId))
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
index df5877d9220..05beacca638 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
@@ -222,7 +222,6 @@ class npc_iron_roots : public CreatureScript
{
SetCombatMovement(false);
- me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);
me->ApplySpellImmune(0, IMMUNITY_ID, 49560, true); // Death Grip
me->setFaction(14);
me->SetReactState(REACT_PASSIVE);
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
index 385f7d6a69d..09d95b34521 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
@@ -380,7 +380,6 @@ class npc_saronite_vapors : public CreatureScript
{
Talk(EMOTE_VAPORS);
instance = me->GetInstanceScript();
- me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);
me->ApplySpellImmune(0, IMMUNITY_ID, 49560, true); // Death Grip jump effect
me->SetReactState(REACT_PASSIVE);
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
index 4d6aa046d10..f435c669935 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
@@ -1637,7 +1637,7 @@ class go_mimiron_hardmode_button : public GameObjectScript
bool OnGossipHello(Player* /*player*/, GameObject* go) override
{
if (go->HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE))
- return false;
+ return true;
InstanceScript* instance = go->GetInstanceScript();
if (!instance)
diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp
index 88217cb384e..1e020edd10a 100644
--- a/src/server/scripts/Northrend/zone_icecrown.cpp
+++ b/src/server/scripts/Northrend/zone_icecrown.cpp
@@ -213,7 +213,6 @@ class npc_tournament_training_dummy : public CreatureScript
void Reset() override
{
me->SetControlled(true, UNIT_STATE_STUNNED);
- me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);
Initialize();
// Cast Defend spells to max stack size
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 5c3ee1d7f4a..abde43ef952 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -1930,10 +1930,7 @@ class spell_gen_mount : public SpellScriptLoader
if (map == 530 || (map == 571 && target->HasSpell(SPELL_COLD_WEATHER_FLYING)))
canFly = true;
- float x, y, z;
- target->GetPosition(x, y, z);
- uint32 areaFlag = target->GetBaseMap()->GetAreaFlag(x, y, z);
- AreaTableEntry const* area = sAreaStore.LookupEntry(areaFlag);
+ AreaTableEntry const* area = sAreaTableStore.LookupEntry(target->GetAreaId());
if (!area || (canFly && (area->flags & AREA_FLAG_NO_FLY_ZONE)))
canFly = false;
diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp
index 3ca2db40d65..9b577d4e140 100644
--- a/src/server/scripts/Spells/spell_rogue.cpp
+++ b/src/server/scripts/Spells/spell_rogue.cpp
@@ -41,6 +41,9 @@ enum RogueSpells
SPELL_ROGUE_SHIV_TRIGGERED = 5940,
SPELL_ROGUE_TRICKS_OF_THE_TRADE_DMG_BOOST = 57933,
SPELL_ROGUE_TRICKS_OF_THE_TRADE_PROC = 59628,
+ SPELL_ROGUE_HONOR_AMONG_THIEVES = 51698,
+ SPELL_ROGUE_HONOR_AMONG_THIEVES_PROC = 52916,
+ SPELL_ROGUE_HONOR_AMONG_THIEVES_2 = 51699
};
// 13877, 33735, (check 51211, 65956) - Blade Flurry
@@ -703,6 +706,143 @@ class spell_rog_tricks_of_the_trade_proc : public SpellScriptLoader
}
};
+// 51698,51700,51701 - Honor Among Thieves
+class spell_rog_honor_among_thieves : public SpellScriptLoader
+{
+public:
+ spell_rog_honor_among_thieves() : SpellScriptLoader("spell_rog_honor_among_thieves") { }
+
+ class spell_rog_honor_among_thieves_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_rog_honor_among_thieves_AuraScript);
+
+ bool CheckProc(ProcEventInfo& /*eventInfo*/)
+ {
+ Unit* caster = GetCaster();
+ if (!caster)
+ return false;
+
+ if (!caster->GetSpellHistory()->HasCooldown(GetSpellInfo()->Effects[EFFECT_0].TriggerSpell))
+ return true;
+
+ return false;
+ }
+
+ void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
+ {
+ PreventDefaultAction();
+
+ Unit* caster = GetCaster();
+ if (!caster)
+ return;
+
+ Unit* target = GetTarget();
+ target->CastSpell(target, GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD), nullptr, aurEff, caster->GetGUID());
+ }
+
+ void Register() override
+ {
+ DoCheckProc += AuraCheckProcFn(spell_rog_honor_among_thieves_AuraScript::CheckProc);
+ OnEffectProc += AuraEffectProcFn(spell_rog_honor_among_thieves_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const override
+ {
+ return new spell_rog_honor_among_thieves_AuraScript();
+ }
+};
+
+// 52916 - Honor Among Thieves (Proc)
+class spell_rog_honor_among_thieves_proc : public SpellScriptLoader
+{
+public:
+ spell_rog_honor_among_thieves_proc() : SpellScriptLoader("spell_rog_honor_among_thieves_proc") { }
+
+ class spell_rog_honor_among_thieves_proc_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_rog_honor_among_thieves_proc_SpellScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_HONOR_AMONG_THIEVES_PROC))
+ return false;
+
+ return true;
+ }
+
+ void FilterTargets(std::list<WorldObject*>& targets)
+ {
+ targets.clear();
+
+ Unit* target = GetOriginalCaster();
+ if (!target)
+ return;
+
+ targets.push_back(target);
+ }
+
+ void HandleBeforeHit()
+ {
+ Unit* target = GetHitUnit();
+ if (!target)
+ return;
+
+ /*
+ * The applied aura has a duration of 8 seconds
+ * This prevents new applications while its active
+ * Removing it on each new proc enables the application from different sources (different grouped players)
+ * and on new procs after the source cooldown is finished (1 second)
+ */
+ if (target->HasAura(GetSpellInfo()->Id))
+ target->RemoveAura(GetSpellInfo()->Id);
+ }
+
+ void TriggerCooldown()
+ {
+ Unit* target = GetHitUnit();
+ if (!target)
+ return;
+
+ target->GetSpellHistory()->AddCooldown(GetSpellInfo()->Id, 0, std::chrono::seconds(1));
+ }
+
+ void Register() override
+ {
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_rog_honor_among_thieves_proc_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_PARTY);
+ BeforeHit += SpellHitFn(spell_rog_honor_among_thieves_proc_SpellScript::HandleBeforeHit);
+ AfterHit += SpellHitFn(spell_rog_honor_among_thieves_proc_SpellScript::TriggerCooldown);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_rog_honor_among_thieves_proc_SpellScript();
+ }
+
+ class spell_rog_honor_among_thieves_proc_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_rog_honor_among_thieves_proc_AuraScript);
+
+ void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (Player* player = GetTarget()->ToPlayer())
+ if (Unit* spellTarget = ObjectAccessor::GetUnit(*player, player->GetTarget()))
+ player->CastSpell(spellTarget, SPELL_ROGUE_HONOR_AMONG_THIEVES_2, true);
+ }
+
+ void Register() override
+ {
+ AfterEffectApply += AuraEffectApplyFn(spell_rog_honor_among_thieves_proc_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const override
+ {
+ return new spell_rog_honor_among_thieves_proc_AuraScript();
+ }
+};
+
void AddSC_rogue_spell_scripts()
{
new spell_rog_blade_flurry();
@@ -716,4 +856,6 @@ void AddSC_rogue_spell_scripts()
new spell_rog_shiv();
new spell_rog_tricks_of_the_trade();
new spell_rog_tricks_of_the_trade_proc();
+ new spell_rog_honor_among_thieves();
+ new spell_rog_honor_among_thieves_proc();
}
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
index c8b0264995b..41e72b1388b 100644
--- a/src/server/scripts/Spells/spell_shaman.cpp
+++ b/src/server/scripts/Spells/spell_shaman.cpp
@@ -55,7 +55,8 @@ enum ShamanSpells
SPELL_SHAMAN_TOTEM_EARTHBIND_EARTHGRAB = 64695,
SPELL_SHAMAN_TOTEM_EARTHBIND_TOTEM = 6474,
SPELL_SHAMAN_TOTEM_EARTHEN_POWER = 59566,
- SPELL_SHAMAN_TOTEM_HEALING_STREAM_HEAL = 52042
+ SPELL_SHAMAN_TOTEM_HEALING_STREAM_HEAL = 52042,
+ SPELL_SHAMAN_TOTEMIC_MASTERY = 38437
};
enum ShamanSpellIcons
@@ -1025,6 +1026,46 @@ class spell_sha_thunderstorm : public SpellScriptLoader
}
};
+// 38443 - Totemic Mastery (Tier 6 - 2P)
+class spell_sha_totemic_mastery : public SpellScriptLoader
+{
+public:
+ spell_sha_totemic_mastery() : SpellScriptLoader("spell_sha_totemic_mastery") { }
+
+ class spell_sha_totemic_mastery_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_sha_totemic_mastery_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_TOTEMIC_MASTERY))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(AuraEffect const* /*aurEff*/)
+ {
+ Unit* target = GetTarget();
+ for (uint8 i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i)
+ if (!target->m_SummonSlot[i])
+ return;
+
+ target->CastSpell(target, SPELL_SHAMAN_TOTEMIC_MASTERY, true);
+ PreventDefaultAction();
+ }
+
+ void Register() override
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_sha_totemic_mastery_AuraScript::HandleDummy, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const override
+ {
+ return new spell_sha_totemic_mastery_AuraScript();
+ }
+};
+
void AddSC_shaman_spell_scripts()
{
new spell_sha_ancestral_awakening_proc();
@@ -1048,4 +1089,5 @@ void AddSC_shaman_spell_scripts()
new spell_sha_mana_tide_totem();
new spell_sha_sentry_totem();
new spell_sha_thunderstorm();
+ new spell_sha_totemic_mastery();
}
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 40f9e63f4f6..56d48949fac 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -1485,7 +1485,6 @@ public:
void Reset() override
{
me->SetControlled(true, UNIT_STATE_STUNNED);//disable rotate
- me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);//imune to knock aways like blast wave
_events.Reset();
_damageTimes.clear();
@@ -2635,6 +2634,97 @@ public:
}
};
+enum PandarenMonkMisc
+{
+ SPELL_PANDAREN_MONK = 69800,
+ EVENT_FOCUS = 1,
+ EVENT_EMOTE = 2,
+ EVENT_FOLLOW = 3,
+ EVENT_DRINK = 4
+};
+
+class npc_pandaren_monk : public CreatureScript
+{
+public:
+ npc_pandaren_monk() : CreatureScript("npc_pandaren_monk") {}
+
+ struct npc_pandaren_monkAI : public NullCreatureAI
+ {
+ npc_pandaren_monkAI(Creature* creature) : NullCreatureAI(creature) { }
+
+ void Reset() override
+ {
+ _events.Reset();
+ _events.ScheduleEvent(EVENT_FOCUS, 1000);
+ }
+
+ void EnterEvadeMode(EvadeReason why) override
+ {
+ if (!_EnterEvadeMode(why))
+ return;
+
+ Reset();
+ }
+
+ void ReceiveEmote(Player* /*player*/, uint32 emote) override
+ {
+ me->InterruptSpell(CURRENT_CHANNELED_SPELL);
+ me->StopMoving();
+
+ switch (emote)
+ {
+ case TEXT_EMOTE_BOW:
+ _events.ScheduleEvent(EVENT_FOCUS, 1000);
+ break;
+ case TEXT_EMOTE_DRINK:
+ _events.ScheduleEvent(EVENT_DRINK, 1000);
+ break;
+ }
+ }
+
+ void UpdateAI(uint32 diff) override
+ {
+ _events.Update(diff);
+
+ if (Unit* owner = me->GetCharmerOrOwner())
+ if (!me->IsWithinDist(owner, 30.f))
+ me->InterruptSpell(CURRENT_CHANNELED_SPELL);
+
+ while (uint32 eventId = _events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_FOCUS:
+ if (Unit* owner = me->GetCharmerOrOwner())
+ me->SetFacingToObject(owner);
+ _events.ScheduleEvent(EVENT_EMOTE, 1000);
+ break;
+ case EVENT_EMOTE:
+ me->HandleEmoteCommand(EMOTE_ONESHOT_BOW);
+ _events.ScheduleEvent(EVENT_FOLLOW, 1000);
+ break;
+ case EVENT_FOLLOW:
+ if (Unit* owner = me->GetCharmerOrOwner())
+ me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
+ break;
+ case EVENT_DRINK:
+ me->CastSpell(me, SPELL_PANDAREN_MONK, false);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ private:
+ EventMap _events;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_pandaren_monkAI(creature);
+ }
+};
+
void AddSC_npcs_special()
{
new npc_air_force_bots();
@@ -2661,4 +2751,5 @@ void AddSC_npcs_special()
new npc_stable_master();
new npc_train_wrecker();
new npc_egbert();
+ new npc_pandaren_monk();
}
diff --git a/src/tools/map_extractor/CMakeLists.txt b/src/tools/map_extractor/CMakeLists.txt
index e86ef6aedcb..d0f3e42cef8 100644
--- a/src/tools/map_extractor/CMakeLists.txt
+++ b/src/tools/map_extractor/CMakeLists.txt
@@ -14,6 +14,7 @@ file(GLOB_RECURSE mapextractor_SRCS *.cpp *.h)
set(include_Dirs
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/dep/cppformat
+ ${CMAKE_SOURCE_DIR}/dep/g3dlite/include
${CMAKE_SOURCE_DIR}/dep/libmpq
${CMAKE_SOURCE_DIR}/src/common
${CMAKE_SOURCE_DIR}/src/common/Utilities
@@ -37,6 +38,7 @@ add_executable(mapextractor
target_link_libraries(mapextractor
common
format
+ g3dlib
mpq
${BZIP2_LIBRARIES}
${ZLIB_LIBRARIES}
diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp
index 5d1c31ba2dc..3694a2f9d41 100644
--- a/src/tools/map_extractor/System.cpp
+++ b/src/tools/map_extractor/System.cpp
@@ -31,6 +31,7 @@
#include "adt.h"
#include "wdt.h"
+#include <G3D/Plane.h>
#include <boost/filesystem.hpp>
extern ArchiveSet gOpenArchives;
@@ -42,12 +43,10 @@ typedef struct
} map_id;
map_id *map_ids;
-uint16 *areas;
uint16 *LiqType;
#define MAX_PATH_LENGTH 128
char output_path[MAX_PATH_LENGTH] = ".";
char input_path[MAX_PATH_LENGTH] = ".";
-uint32 maxAreaId = 0;
// **************************************************
// Extractor options
@@ -231,30 +230,6 @@ uint32 ReadMapDBC()
return map_count;
}
-void ReadAreaTableDBC()
-{
- printf("Read AreaTable.dbc file...");
- DBCFile dbc("DBFilesClient\\AreaTable.dbc");
-
- if(!dbc.open())
- {
- printf("Fatal error: Invalid AreaTable.dbc file format!\n");
- exit(1);
- }
-
- size_t area_count = dbc.getRecordCount();
- size_t maxid = dbc.getMaxId();
- areas = new uint16[maxid + 1];
- memset(areas, 0xff, (maxid + 1) * sizeof(uint16));
-
- for(uint32 x = 0; x < area_count; ++x)
- areas[dbc.getRecord(x).getUInt(0)] = dbc.getRecord(x).getUInt(3);
-
- maxAreaId = dbc.getMaxId();
-
- printf("Done! (" SZFMTD " areas loaded)\n", area_count);
-}
-
void ReadLiquidTypeTableDBC()
{
printf("Read LiquidType.dbc file...");
@@ -282,7 +257,7 @@ void ReadLiquidTypeTableDBC()
// Map file format data
static char const* MAP_MAGIC = "MAPS";
-static char const* MAP_VERSION_MAGIC = "v1.3";
+static char const* MAP_VERSION_MAGIC = "v1.7";
static char const* MAP_AREA_MAGIC = "AREA";
static char const* MAP_HEIGHT_MAGIC = "MHGT";
static char const* MAP_LIQUID_MAGIC = "MLIQ";
@@ -311,9 +286,10 @@ struct map_areaHeader
uint16 gridArea;
};
-#define MAP_HEIGHT_NO_HEIGHT 0x0001
-#define MAP_HEIGHT_AS_INT16 0x0002
-#define MAP_HEIGHT_AS_INT8 0x0004
+#define MAP_HEIGHT_NO_HEIGHT 0x0001
+#define MAP_HEIGHT_AS_INT16 0x0002
+#define MAP_HEIGHT_AS_INT8 0x0004
+#define MAP_HEIGHT_HAS_FLIGHT_BOUNDS 0x0008
struct map_heightHeader
{
@@ -358,7 +334,7 @@ float selectUInt16StepStore(float maxDiff)
return 65535 / maxDiff;
}
// Temporary grid data store
-uint16 area_flags[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID];
+uint16 area_ids[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID];
float V8[ADT_GRID_SIZE][ADT_GRID_SIZE];
float V9[ADT_GRID_SIZE+1][ADT_GRID_SIZE+1];
@@ -372,6 +348,9 @@ uint8 liquid_flags[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID];
bool liquid_show[ADT_GRID_SIZE][ADT_GRID_SIZE];
float liquid_height[ADT_GRID_SIZE+1][ADT_GRID_SIZE+1];
+float flight_box_max[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID];
+float flight_box_min[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID];
+
bool ConvertADT(std::string const& inputPath, std::string const& outputPath, int /*cell_y*/, int /*cell_x*/, uint32 build)
{
ADT_file adt;
@@ -397,34 +376,20 @@ bool ConvertADT(std::string const& inputPath, std::string const& outputPath, int
map.buildMagic = build;
// Get area flags data
- for (int i=0;i<ADT_CELLS_PER_GRID;i++)
- {
- for(int j=0;j<ADT_CELLS_PER_GRID;j++)
- {
- adt_MCNK * cell = cells->getMCNK(i,j);
- uint32 areaid = cell->areaid;
- if(areaid && areaid <= maxAreaId)
- {
- if(areas[areaid] != 0xffff)
- {
- area_flags[i][j] = areas[areaid];
- continue;
- }
- printf("File: %s\nCan't find area flag for areaid %u [%d, %d].\n", inputPath.c_str(), areaid, cell->ix, cell->iy);
- }
- area_flags[i][j] = 0xffff;
- }
- }
+ for (int i = 0; i < ADT_CELLS_PER_GRID; i++)
+ for (int j = 0; j < ADT_CELLS_PER_GRID; j++)
+ area_ids[i][j] = cells->getMCNK(i, j)->areaid;
+
//============================================
// Try pack area data
//============================================
bool fullAreaData = false;
- uint32 areaflag = area_flags[0][0];
- for (int y=0;y<ADT_CELLS_PER_GRID;y++)
+ uint32 areaId = area_ids[0][0];
+ for (int y = 0; y < ADT_CELLS_PER_GRID; ++y)
{
- for(int x=0;x<ADT_CELLS_PER_GRID;x++)
+ for (int x = 0; x < ADT_CELLS_PER_GRID; ++x)
{
- if(area_flags[y][x]!=areaflag)
+ if (area_ids[y][x] != areaId)
{
fullAreaData = true;
break;
@@ -441,12 +406,12 @@ bool ConvertADT(std::string const& inputPath, std::string const& outputPath, int
if (fullAreaData)
{
areaHeader.gridArea = 0;
- map.areaMapSize+=sizeof(area_flags);
+ map.areaMapSize += sizeof(area_ids);
}
else
{
areaHeader.flags |= MAP_AREA_NO_AREA;
- areaHeader.gridArea = static_cast<uint16>(areaflag);
+ areaHeader.gridArea = static_cast<uint16>(areaId);
}
//
@@ -561,6 +526,82 @@ bool ConvertADT(std::string const& inputPath, std::string const& outputPath, int
maxHeight = CONF_use_minHeight;
}
+ bool hasFlightBox = false;
+ if (adt_MFBO* mfbo = adt.a_grid->getMFBO())
+ {
+ static uint32 const indices[] =
+ {
+ 3, 0, 4,
+ 0, 1, 4,
+ 1, 2, 4,
+ 2, 5, 4,
+ 5, 8, 4,
+ 8, 7, 4,
+ 7, 6, 4,
+ 6, 3, 4
+ };
+
+ static float const boundGridCoords[] =
+ {
+ 0.0f, 0.0f,
+ 0.0f, -266.66666f,
+ 0.0f, -533.33331f,
+ -266.66666f, 0.0f,
+ -266.66666f, -266.66666f,
+ -266.66666f, -533.33331f,
+ -533.33331f, 0.0f,
+ -533.33331f, -266.66666f,
+ -533.33331f, -533.33331f
+ };
+
+ for (int gy = 0; gy < ADT_CELLS_PER_GRID; ++gy)
+ {
+ for (int gx = 0; gx < ADT_CELLS_PER_GRID; ++gx)
+ {
+ int32 quarterIndex = 0;
+ if (gy > ADT_CELLS_PER_GRID / 2)
+ {
+ if (gx > ADT_CELLS_PER_GRID / 2)
+ {
+ quarterIndex = 4 + gx < gy;
+ }
+ else
+ quarterIndex = 2;
+ }
+ else if (gx > ADT_CELLS_PER_GRID / 2)
+ {
+ quarterIndex = 7;
+ }
+ else
+ quarterIndex = gx > gy;
+
+ quarterIndex *= 3;
+ G3D::Plane planeMax(
+ G3D::Vector3(boundGridCoords[indices[quarterIndex + 0] * 2 + 0], boundGridCoords[indices[quarterIndex + 0] * 2 + 1], mfbo->max.coords[indices[quarterIndex + 0]]),
+ G3D::Vector3(boundGridCoords[indices[quarterIndex + 1] * 2 + 0], boundGridCoords[indices[quarterIndex + 1] * 2 + 1], mfbo->max.coords[indices[quarterIndex + 1]]),
+ G3D::Vector3(boundGridCoords[indices[quarterIndex + 2] * 2 + 0], boundGridCoords[indices[quarterIndex + 2] * 2 + 1], mfbo->max.coords[indices[quarterIndex + 2]])
+ );
+
+ G3D::Plane planeMin(
+ G3D::Vector3(boundGridCoords[indices[quarterIndex + 0] * 2 + 0], boundGridCoords[indices[quarterIndex + 0] * 2 + 1], mfbo->min.coords[indices[quarterIndex + 0]]),
+ G3D::Vector3(boundGridCoords[indices[quarterIndex + 1] * 2 + 0], boundGridCoords[indices[quarterIndex + 1] * 2 + 1], mfbo->min.coords[indices[quarterIndex + 1]]),
+ G3D::Vector3(boundGridCoords[indices[quarterIndex + 2] * 2 + 0], boundGridCoords[indices[quarterIndex + 2] * 2 + 1], mfbo->min.coords[indices[quarterIndex + 2]])
+ );
+
+ auto non_nan_distance = [](G3D::Plane const& plane) {
+ auto d = plane.distance(G3D::Vector3(0.0f, 0.0f, 0.0f));
+ assert(!G3D::isNaN(d));
+ return d;
+ };
+
+ flight_box_max[gy][gx] = non_nan_distance(planeMax);
+ flight_box_min[gy][gx] = non_nan_distance(planeMin);
+ }
+ }
+
+ hasFlightBox = true;
+ }
+
map.heightMapOffset = map.areaMapOffset + map.areaMapSize;
map.heightMapSize = sizeof(map_heightHeader);
@@ -577,6 +618,12 @@ bool ConvertADT(std::string const& inputPath, std::string const& outputPath, int
if (CONF_allow_float_to_int && (maxHeight - minHeight) < CONF_flat_height_delta_limit)
heightHeader.flags |= MAP_HEIGHT_NO_HEIGHT;
+ if (hasFlightBox)
+ {
+ heightHeader.flags |= MAP_HEIGHT_HAS_FLIGHT_BOUNDS;
+ map.heightMapSize += sizeof(flight_box_max) + sizeof(flight_box_min);
+ }
+
// Try store as packed in uint16 or uint8 values
if (!(heightHeader.flags & MAP_HEIGHT_NO_HEIGHT))
{
@@ -875,8 +922,8 @@ bool ConvertADT(std::string const& inputPath, std::string const& outputPath, int
outFile.write(reinterpret_cast<const char*>(&map), sizeof(map));
// Store area data
outFile.write(reinterpret_cast<const char*>(&areaHeader), sizeof(areaHeader));
- if (!(areaHeader.flags&MAP_AREA_NO_AREA))
- outFile.write(reinterpret_cast<const char*>(area_flags), sizeof(area_flags));
+ if (!(areaHeader.flags & MAP_AREA_NO_AREA))
+ outFile.write(reinterpret_cast<const char*>(area_ids), sizeof(area_ids));
// Store height data
outFile.write(reinterpret_cast<const char*>(&heightHeader), sizeof(heightHeader));
@@ -899,6 +946,12 @@ bool ConvertADT(std::string const& inputPath, std::string const& outputPath, int
}
}
+ if (heightHeader.flags & MAP_HEIGHT_HAS_FLIGHT_BOUNDS)
+ {
+ outFile.write(reinterpret_cast<char*>(flight_box_max), sizeof(flight_box_max));
+ outFile.write(reinterpret_cast<char*>(flight_box_min), sizeof(flight_box_min));
+ }
+
// Store liquid data if need
if (map.liquidMapOffset)
{
@@ -935,7 +988,6 @@ void ExtractMapsFromMpq(uint32 build)
uint32 map_count = ReadMapDBC();
- ReadAreaTableDBC();
ReadLiquidTypeTableDBC();
std::string path = output_path;
@@ -972,8 +1024,7 @@ void ExtractMapsFromMpq(uint32 build)
}
}
printf("\n");
- delete [] areas;
- delete [] map_ids;
+ delete[] map_ids;
}
bool ExtractFile( char const* mpq_name, std::string const& filename )
diff --git a/src/tools/map_extractor/adt.cpp b/src/tools/map_extractor/adt.cpp
index f8e6e469ff0..e97b40475d0 100644
--- a/src/tools/map_extractor/adt.cpp
+++ b/src/tools/map_extractor/adt.cpp
@@ -21,15 +21,16 @@
#include "adt.h"
// Helper
-int holetab_h[4] = {0x1111, 0x2222, 0x4444, 0x8888};
-int holetab_v[4] = {0x000F, 0x00F0, 0x0F00, 0xF000};
+int holetab_h[4] = { 0x1111, 0x2222, 0x4444, 0x8888 };
+int holetab_v[4] = { 0x000F, 0x00F0, 0x0F00, 0xF000 };
-u_map_fcc MHDRMagic = { {'R','D','H','M'} };
-u_map_fcc MCINMagic = { {'N','I','C','M'} };
-u_map_fcc MH2OMagic = { {'O','2','H','M'} };
-u_map_fcc MCNKMagic = { {'K','N','C','M'} };
-u_map_fcc MCVTMagic = { {'T','V','C','M'} };
-u_map_fcc MCLQMagic = { {'Q','L','C','M'} };
+u_map_fcc MHDRMagic = { { 'R','D','H','M' } };
+u_map_fcc MCINMagic = { { 'N','I','C','M' } };
+u_map_fcc MH2OMagic = { { 'O','2','H','M' } };
+u_map_fcc MCNKMagic = { { 'K','N','C','M' } };
+u_map_fcc MCVTMagic = { { 'T','V','C','M' } };
+u_map_fcc MCLQMagic = { { 'Q','L','C','M' } };
+u_map_fcc MFBOMagic = { { 'O','B','F','M' } };
bool isHole(int holes, int i, int j)
{
@@ -81,7 +82,7 @@ bool adt_MHDR::prepareLoadedData()
if (fcc != MHDRMagic.fcc)
return false;
- if (size!=sizeof(adt_MHDR)-8)
+ if (size != sizeof(adt_MHDR) - 8)
return false;
// Check and prepare MCIN
@@ -92,6 +93,9 @@ bool adt_MHDR::prepareLoadedData()
if (offsMH2O && !getMH2O()->prepareLoadedData())
return false;
+ if (offsMFBO && flags & 1 && !getMFBO()->prepareLoadedData())
+ return false;
+
return true;
}
@@ -154,3 +158,8 @@ bool adt_MCLQ::prepareLoadedData()
return true;
}
+
+bool adt_MFBO::prepareLoadedData()
+{
+ return fcc == MFBOMagic.fcc;
+}
diff --git a/src/tools/map_extractor/adt.h b/src/tools/map_extractor/adt.h
index 7b3dc07ae84..30389939f38 100644
--- a/src/tools/map_extractor/adt.h
+++ b/src/tools/map_extractor/adt.h
@@ -263,6 +263,28 @@ public:
};
//
+// Adt file min/max height chunk
+//
+class adt_MFBO
+{
+ union
+ {
+ uint32 fcc;
+ char fcc_txt[4];
+ };
+public:
+ uint32 size;
+ struct plane
+ {
+ int16 coords[9];
+ };
+ plane max;
+ plane min;
+
+ bool prepareLoadedData();
+};
+
+//
// Adt file header chunk
//
class adt_MHDR
@@ -274,12 +296,12 @@ class adt_MHDR
public:
uint32 size;
- uint32 pad;
+ uint32 flags;
uint32 offsMCIN; // MCIN
- uint32 offsTex; // MTEX
- uint32 offsModels; // MMDX
- uint32 offsModelsIds; // MMID
- uint32 offsMapObejcts; // MWMO
+ uint32 offsTex; // MTEX
+ uint32 offsModels; // MMDX
+ uint32 offsModelsIds; // MMID
+ uint32 offsMapObejcts; // MWMO
uint32 offsMapObejctsIds; // MWID
uint32 offsDoodsDef; // MDDF
uint32 offsObjectsDef; // MODF
@@ -291,9 +313,22 @@ public:
uint32 data4;
uint32 data5;
bool prepareLoadedData();
- adt_MCIN *getMCIN(){ return (adt_MCIN *)((uint8 *)&pad+offsMCIN);}
- adt_MH2O *getMH2O(){ return offsMH2O ? (adt_MH2O *)((uint8 *)&pad+offsMH2O) : 0;}
-
+ adt_MCIN* getMCIN()
+ {
+ return reinterpret_cast<adt_MCIN*>(reinterpret_cast<uint8*>(&flags) + offsMCIN);
+ }
+ adt_MH2O* getMH2O()
+ {
+ if (offsMH2O)
+ return reinterpret_cast<adt_MH2O*>(reinterpret_cast<uint8*>(&flags) + offsMH2O);
+ return nullptr;
+ }
+ adt_MFBO* getMFBO()
+ {
+ if (flags & 1 && offsMFBO)
+ return reinterpret_cast<adt_MFBO*>(reinterpret_cast<uint8*>(&flags) + offsMFBO);
+ return nullptr;
+ }
};
class ADT_file : public FileLoader{
diff --git a/src/tools/mmaps_generator/TerrainBuilder.cpp b/src/tools/mmaps_generator/TerrainBuilder.cpp
index 02f3fb1cf4d..70ab7fca0c9 100644
--- a/src/tools/mmaps_generator/TerrainBuilder.cpp
+++ b/src/tools/mmaps_generator/TerrainBuilder.cpp
@@ -80,7 +80,7 @@ struct map_liquidHeader
namespace MMAP
{
- char const* MAP_VERSION_MAGIC = "v1.3";
+ char const* MAP_VERSION_MAGIC = "v1.7";
TerrainBuilder::TerrainBuilder(bool skipLiquid) : m_skipLiquid (skipLiquid){ }
TerrainBuilder::~TerrainBuilder() { }