aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--sql/updates/world/2014_10_11_03_world.sql19
-rw-r--r--sql/updates/world/2014_10_11_04_world.sql51
-rw-r--r--sql/updates/world/2014_10_11_05_world.sql7
-rw-r--r--sql/updates/world/2014_10_11_06_world.sql3
-rw-r--r--sql/updates/world/2014_10_11_07_world.sql91
-rw-r--r--sql/updates/world/2014_10_12_00_world.sql294
-rw-r--r--sql/updates/world/2014_10_12_01_world.sql12
-rw-r--r--sql/updates/world/2014_10_12_02_world.sql2
-rw-r--r--sql/updates/world/2014_10_12_03_world.sql2
-rw-r--r--sql/updates/world/2014_10_12_04_world.sql3
-rw-r--r--sql/updates/world/2014_10_12_05_world.sql2
-rw-r--r--sql/updates/world/2014_10_12_06_world.sql8
-rw-r--r--sql/updates/world/2014_10_12_07_world.sql2
-rw-r--r--sql/updates/world/2014_10_13_00_world.sql2
-rw-r--r--sql/updates/world/2014_10_13_01_world.sql423
-rw-r--r--sql/updates/world/2014_10_15_00_world.sql1
-rw-r--r--sql/updates/world/2014_10_16_00_world.sql21
-rw-r--r--sql/updates/world/2014_10_17_00_world.sql117
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp49
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.h15
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp145
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h38
-rw-r--r--src/server/game/Accounts/AccountMgr.cpp2
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.cpp12
-rw-r--r--src/server/game/Battlefield/Battlefield.cpp2
-rw-r--r--src/server/game/Battlegrounds/Arena.cpp2
-rw-r--r--src/server/game/Battlegrounds/ArenaTeam.cpp10
-rw-r--r--src/server/game/Battlegrounds/Battleground.cpp1
-rw-r--r--src/server/game/Battlegrounds/BattlegroundQueue.cpp10
-rw-r--r--src/server/game/Calendar/CalendarMgr.cpp18
-rw-r--r--src/server/game/Chat/Channels/Channel.cpp20
-rw-r--r--src/server/game/Chat/Chat.cpp4
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.cpp22
-rw-r--r--src/server/game/DungeonFinding/LFGScripts.cpp2
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp5
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp2
-rw-r--r--src/server/game/Entities/Player/Player.cpp9
-rw-r--r--src/server/game/Entities/Player/SocialMgr.cpp2
-rw-r--r--src/server/game/Globals/ObjectAccessor.cpp23
-rw-r--r--src/server/game/Globals/ObjectAccessor.h4
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp8
-rw-r--r--src/server/game/Grids/Notifiers/GridNotifiers.cpp2
-rw-r--r--src/server/game/Groups/Group.cpp40
-rw-r--r--src/server/game/Guilds/Guild.cpp8
-rw-r--r--src/server/game/Guilds/Guild.h3
-rw-r--r--src/server/game/Handlers/CalendarHandler.cpp2
-rw-r--r--src/server/game/Handlers/ChatHandler.cpp4
-rw-r--r--src/server/game/Handlers/GroupHandler.cpp8
-rw-r--r--src/server/game/Handlers/LFGHandler.cpp4
-rw-r--r--src/server/game/Handlers/MailHandler.cpp4
-rw-r--r--src/server/game/Handlers/MiscHandler.cpp7
-rw-r--r--src/server/game/Handlers/PetitionsHandler.cpp8
-rw-r--r--src/server/game/Handlers/QueryHandler.cpp2
-rw-r--r--src/server/game/Mails/Mail.cpp2
-rw-r--r--src/server/game/Maps/Map.cpp2
-rw-r--r--src/server/game/Maps/Map.h2
-rw-r--r--src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp7
-rw-r--r--src/server/game/World/World.cpp4
-rw-r--r--src/server/scripts/Commands/cs_group.cpp2
-rw-r--r--src/server/scripts/Commands/cs_ticket.cpp28
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp1
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp25
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp19
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h16
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp2
-rw-r--r--src/server/scripts/World/go_scripts.cpp20
67 files changed, 1362 insertions, 329 deletions
diff --git a/README.md b/README.md
index 33fea30e36e..540ce485dca 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
# ![logo](http://www.trinitycore.org/f/public/style_images/1_trinitycore.png) TrinityCore
-[![Coverity Scan Build Status](https://scan.coverity.com/projects/435/badge.svg)](https://scan.coverity.com/projects/435)
+[![Coverity Scan Build Status](https://scan.coverity.com/projects/435/badge.svg)](https://scan.coverity.com/projects/435)
+[![Bountysource](https://www.bountysource.com/badge/tracker?tracker_id=1310)](https://www.bountysource.com/trackers/1310-trinity-core?utm_source=1310&utm_medium=shield&utm_campaign=TRACKER_BADGE)
`3.3.5`: [![3.3.5 Build Status](https://travis-ci.org/TrinityCore/TrinityCore.svg?branch=master)](https://travis-ci.org/TrinityCore/TrinityCore)
`4.3.4`: [![4.3.4 Build Status](https://travis-ci.org/TrinityCore/TrinityCore.svg?branch=4.3.4)](https://travis-ci.org/TrinityCore/TrinityCore)
@@ -21,7 +22,6 @@ make pull requests to our [Github repository](https://github.com/TrinityCore/Tri
For further information on the TrinityCore project, please visit our project
website at [TrinityCore.org](http://www.trinitycore.org).
-
## Requirements
+ Platform: Linux, Windows or Mac
diff --git a/sql/updates/world/2014_10_11_03_world.sql b/sql/updates/world/2014_10_11_03_world.sql
new file mode 100644
index 00000000000..a6edf333508
--- /dev/null
+++ b/sql/updates/world/2014_10_11_03_world.sql
@@ -0,0 +1,19 @@
+DELETE FROM gameobject WHERE guid=99998;
+INSERT INTO `gameobject` (guid, id, map, spawnMask, phaseMask, position_x, position_y, position_z, spawntimesecs, State) VALUES
+(99998, 180673, 1, 1, 1, 6723.67, -5271.68, 778, 180, 1);
+
+set @Xandivious:=15623;
+
+Delete from creature_loot_template where entry =@Xandivious and item=21145;
+
+Update creature_template set `AIName`='SmartAI' where entry in (@Xandivious);
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @Xandivious 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
+
+(@Xandivious, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 11, 25818, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ' Xandivious - On reset - cast Aura of Rot'),
+(@Xandivious, 0, 1, 0, 0, 0, 100, 0, 3000, 3000, 15000, 15000, 11, 11980, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Xandivious - IC - cast Curse of Weakness'),
+(@Xandivious, 0, 2, 0, 0, 0, 100, 0, 5000, 5000, 15000, 15000, 11, 11639, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Xandivious - IC - cast Shadow Word: Pain'),
+(@Xandivious, 0, 3, 0, 0, 0, 100, 0, 7000, 7000, 10000, 10000, 11, 16046, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Xandivious - IC - cast Blast Wave'),
+(@Xandivious, 0, 4, 0, 2, 0, 100, 1, 0, 50, 0, 0, 11, 8599, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Xandivious - HP under 50% - Enrage'),
+(@Xandivious, 0, 5, 0, 6, 0, 100, 0, 0, 0, 0, 0, 85, 25791, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Xandivious - On Death - invoker_Cast Xandivious Demon Bag');
diff --git a/sql/updates/world/2014_10_11_04_world.sql b/sql/updates/world/2014_10_11_04_world.sql
new file mode 100644
index 00000000000..5b1eca19278
--- /dev/null
+++ b/sql/updates/world/2014_10_11_04_world.sql
@@ -0,0 +1,51 @@
+-- Schematic: Field Repair Bot 74A
+
+Update npc_text set BroadcastTextID0=9486 where `ID`=6931;
+Delete from gossip_menu where `entry`=5749 and `text_id`=6931;
+insert into gossip_menu (`entry`, `text_id`) values (5749, 6931);
+
+Update npc_text set BroadcastTextID0=9484 where `ID`=6930;
+Delete from gossip_menu where `entry`=5749 and `text_id`=6930;
+insert into gossip_menu (`entry`, `text_id`) values (5749, 6930);
+
+Update npc_text set BroadcastTextID0=9483 where `ID`=6929;
+Delete from gossip_menu where `entry`=5749 and `text_id`=6929;
+insert into gossip_menu (`entry`, `text_id`) values (5749, 6929);
+
+Update npc_text set BroadcastTextID0=9487 where `ID`=6932;
+Delete from gossip_menu where `entry`=5749 and `text_id`=6932;
+insert into gossip_menu (`entry`, `text_id`) values (5749, 6932);
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id` = 5749;
+INSERT INTO `gossip_menu_option` (`menu_id`, id, option_icon, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`)
+VALUES (5749, 0, 0, '<Copy the schematic into your engineering notebook.>', 9485, 1, 3);
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` =15 AND `SourceGroup`=5749;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`, `NegativeCondition`, `ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,5749,0,0,7,202,300,0,0,0,'','Show gossip menu if player have 300 or more in Engineering'),
+(15,5749,0,0,25,22704,0,0,1,0,'','Show gossip menu if player doesn''t learned the spell');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=5749 and `SourceEntry`= 6931;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`, `NegativeCondition`, `ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,5749,6931,0,7,202,300,0,1,0,'','Show gossip menu if player is an Engineer but have less than 300'),
+(14,5749,6931,0,25,4036,0,0,0,0,'','Show gossip menu if player is an Engineer');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=5749 and `SourceEntry`= 6930;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`, `ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,5749,6930,0,7,202,300,0,0,'','Show gossip menu if player have 300 or more in Engineering');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=5749 and `SourceEntry`= 6929;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`, `NegativeCondition`, `ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,5749,6929,0,25,4036,0,0,1,0,'','Show gossip menu if player is not an Engineer');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=5749 and `SourceEntry`= 6932;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`, `ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,5749,6932,0,25,22704,0,0,0,'','Show gossip menu if player learned the spell');
+
+UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI', ScriptName='' WHERE `entry`=179552;
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 179552 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
+
+(179552, 1, 0, 0, 62, 0, 100, 0, 5749, 0, 0, 0, 85, 22864, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, '179552 - On Gossip Select - InvokerCast'),
+(179552, 1, 1, 0, 62, 0, 100, 0, 5749, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, '179552 - On Gossip Select - CloseGossip');
diff --git a/sql/updates/world/2014_10_11_05_world.sql b/sql/updates/world/2014_10_11_05_world.sql
new file mode 100644
index 00000000000..5a087f3c0d4
--- /dev/null
+++ b/sql/updates/world/2014_10_11_05_world.sql
@@ -0,0 +1,7 @@
+UPDATE `smart_scripts` SET `action_type`=86, `action_param2`=2, `action_param3`=18, `action_param4`=35, `target_type`=1, `target_param1`=0 WHERE `entryorguid`=23689 AND `source_type`=0 AND `id`=2;
+UPDATE `smart_scripts` SET `action_type`=86, `action_param2`=2, `action_param3`=18, `action_param4`=35, `target_type`=1, `target_param1`=0 WHERE `entryorguid`=24170 AND `source_type`=0 AND `id`=1;
+UPDATE `smart_scripts` SET `action_type`=86, `action_param2`=2, `action_param3`=21, `action_param4`=20, `target_type`=1, `target_param1`=0 WHERE `entryorguid`=24439 AND `source_type`=0 AND `id`=3;
+UPDATE `smart_scripts` SET `action_type`=86, `action_param2`=2, `action_param3`=21, `action_param4`=10, `target_type`=1, `target_param1`=0 WHERE `entryorguid`=27409 AND `source_type`=0 AND `id`=5;
+UPDATE `smart_scripts` SET `action_type`=86, `action_param2`=2, `action_param3`=23, `action_param4`=0, `target_type`=1, `target_param1`=0 WHERE `entryorguid`=31048 AND `source_type`=0 AND `id`=2;
+UPDATE `smart_scripts` SET `action_type`=85, `action_param2`=2, `target_type`=1 WHERE `entryorguid`=24439 AND `source_type`=0 AND `id`=4;
+UPDATE `smart_scripts` SET `action_type`=85, `action_param2`=2, `target_type`=1 WHERE `entryorguid`=27202 AND `source_type`=0 AND `id`=11;
diff --git a/sql/updates/world/2014_10_11_06_world.sql b/sql/updates/world/2014_10_11_06_world.sql
new file mode 100644
index 00000000000..875d71d4ac0
--- /dev/null
+++ b/sql/updates/world/2014_10_11_06_world.sql
@@ -0,0 +1,3 @@
+--
+UPDATE `creature_template` SET `gossip_menu_id`=10949, `npcflag`=4225 WHERE `entry`=37904;
+UPDATE `gossip_menu_option` SET `option_id`=3, `npc_option_npcflag`=128 WHERE `menu_id`=10949 AND `id`=0;
diff --git a/sql/updates/world/2014_10_11_07_world.sql b/sql/updates/world/2014_10_11_07_world.sql
new file mode 100644
index 00000000000..385f46baa2f
--- /dev/null
+++ b/sql/updates/world/2014_10_11_07_world.sql
@@ -0,0 +1,91 @@
+UPDATE `creature` SET `MovementType`=0,`spawndist`=0 WHERE `guid` IN(121055,121049);
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN(58108,58118);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 58108, 0, 0, 31, 0, 3, 30995, 0, 0, 0, 0, '', 'Patches Chain targets Patches Chain Target'),
+(13, 1, 58118, 0, 0, 31, 0, 3, 30992, 0, 0, 0, 0, '', 'Patches Revenge targets Doctor Sabnok');
+
+UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI', `ScriptName`='' WHERE `entry`=193025;
+UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN(30992,30993,30995);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(30992,30993,30995) and `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(3099200,3099300) and `source_type`=9;
+DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=193025;
+
+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
+(193025, 1, 0 ,1, 70, 0, 100, 0, 2, 0, 0,0,45,1,1,0,0,0,0,19,30993,0,0,0, 0, 0, 0, 'Metal Stake - On State Changed - Set Data 1 1 on "Patches"'),
+(193025, 1, 1 ,0, 61, 0, 100, 0, 0, 0, 0,0,104,1,0,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Metal Stake - On State Changed - Set Flag In Use"'),
+(193025, 1, 2 ,0, 38, 0, 100, 0, 2, 2, 0,0,104,4,0,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Metal Stake - On Data Set - Remove Flag In Use"'),
+(30992, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 45, 3 , 3, 0, 0, 0, 0, 19, 30993, 0, 0, 0, 0, 0, 0, 'Doctor Sabnok - On Death - Set Data 3 3 on "Patches"'),
+(30992, 0, 1, 0,54, 0, 100, 0, 0, 0, 0, 0, 53, 0 , 30992, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Doctor Sabnok - On Just Summoned - Start WP'),
+(30992, 0, 2, 0,40, 0, 100, 0, 10, 30992, 0, 0, 45, 2 , 2, 0, 0, 0, 0, 19, 30993, 0, 0, 0, 0, 0, 0, 'Doctor Sabnok - Reached WP10 - Set Data 2 2 on "Patches"'),
+(30992, 0, 3, 4,40, 0, 100, 0, 14, 30992, 0, 0, 101, 0 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Doctor Sabnok - Reached WP14 - Set Home Position'),
+(30992, 0, 4, 5,61, 0, 100, 0, 0, 0, 0, 0, 8, 2 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Doctor Sabnok - Reached WP14 - Set Hostile'),
+(30992, 0, 5, 7,61, 0, 100, 0, 0, 0, 0, 0, 80, 3099200 , 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Doctor Sabnok - Reached WP14 - Run Script'),
+(30992, 0, 6, 0,11, 0, 100, 0, 0, 0, 0, 0, 18, 256 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Doctor Sabnok - On Spawn - Set Unit Flags'),
+(30992, 0, 7, 0,61, 0, 100, 0, 0, 0, 0, 0, 45, 5 , 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Doctor Sabnok - On Reached WP14 - Set Data 5 5 on "Patches"'),
+(30993, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 22, 2 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '"Patches" - On Respawn - Set Phase 2'),
+(30993, 0, 1, 0, 1, 2, 100, 0, 0, 0, 3000, 3000, 11, 58108 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '"Patches" - OOC (Phase 2) - Cast Patches Chain'),
+(30993, 0, 2, 3, 38, 0, 100, 0, 1, 1, 300000, 300000, 22, 0 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '"Patches" - On Data Set 1 1 - Set Phase 1'),
+(30993, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 28, 58108 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '"Patches" - On Data Set 1 1 - Remove Aura Patches Chain'),
+(30993, 0, 4, 5,61, 0, 100, 0, 0, 0, 0, 0, 45, 1 , 1, 0, 0, 0, 0, 19, 30995, 0, 0, 0, 0, 0, 0, '"Patches" - On Data Set 1 1 - Set Data 1 1 on Patches chain target'),
+(30993, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 12, 30992 , 2, 300000, 0, 0, 0, 8, 0, 0, 0, 6630.52, 3167.312, 659.3602, 2.740049, '"Patches" - On Data Set 1 1 - Summon Doctor Sabnok'),
+(30993, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 1, 1 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '"Patches" - On Data Set 1 1 - Say Line 1'),
+(30993, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 2, 2036 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '"Patches" - On Data Set 1 1 - Set Faction'),
+(30993, 0, 8, 9, 38, 0, 100, 0, 3, 3, 0, 0, 11, 59115 , 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Patches" - On Data Set 3 3 - Cast Patches Credit'),
+(30993, 0, 9, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 5000 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Patches" - On Data Set 3 3 - Despawn'),
+(30993, 0, 10, 15, 38, 0, 100, 0, 5, 5, 0, 0, 89, 0 , 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Patches" - On On Data Set 5 5 - Turn Random Move Off'),
+(30993, 0, 11, 0, 38, 0, 100, 0, 4, 4, 0, 0, 80, 3099300 , 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Patches" - On Data Set 4 4 - Run Script'),
+(30993, 0, 12, 13, 11, 0, 100, 0, 0, 0, 0, 0, 45, 1 , 1, 0, 0, 0, 0, 14, 62005, 193025, 0, 0, 0, 0, 0, 'Patches" - On Respawn - Set Data 1 1 on Metal Stake'),
+(30993, 0, 13, 14, 61, 0, 100, 0, 0, 0, 0, 0, 89, 5 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Patches" - On Respawn - Set Random Movement'),
+(30993, 0, 14, 0, 61, 0, 100, 0, 0, 0, 0, 0, 18, 768 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Patches" - On Respawn - Set Unit Flags'),
+(30993, 0, 15, 0, 61, 0, 100, 0, 0, 0, 0, 0, 66, 0 , 0, 0, 0, 0, 0, 19, 30992, 0, 0, 0, 0, 0, 0, 'Patches" - On On Data Set 5 5 - Face Doctor Sabnok'),
+(30995, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 28, 58108 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Patches Chain Target - On Data Set 1 1 - Remove Aura Patches Chain'),
+(3099200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0 , 0, 0, 0, 0, 0, 21, 50, 0, 0, 0, 0, 0, 0, 'Doctor Sabnok - Script - Face Player'),
+(3099200, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 5, 21 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Doctor Sabnok - Script - Play Emote OneShotApplaud'),
+(3099200, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 1, 1 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Doctor Sabnok - Script - Say Line 1'),
+(3099200, 9, 3, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 2 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Doctor Sabnok - Script - Say Line 2'),
+(3099200, 9, 4, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 3 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Doctor Sabnok - Script - Say Line 3'),
+(3099200, 9, 5, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 5, 11 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Doctor Sabnok - Script - Play Emote OneShotLaugh'),
+(3099200, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 4 , 4, 0, 0, 0, 0, 19, 30993, 0, 0, 0, 0, 0, 0, 'Doctor Sabnok - Set Data 4 4 on "Patches"'),
+(3099200, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 19, 256 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Doctor Sabnok - Set Unit Flags"'),
+(3099300, 9, 0, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 8, 2 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '"Patches" - Script - Set Hostile'),
+(3099300, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 19, 768 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '"Patches" - Script - Set Unit Flags'),
+(3099300, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 49, 0 , 0, 0, 0, 0, 0, 19, 30992, 0, 0, 0, 0, 0, 0, '"Patches" - Script - Start Attack'),
+(3099300, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 2 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '"Patches" - Script - Say Line 2'),
+(3099300, 9, 4, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 11, 58118 , 0, 0, 0, 0, 0, 19, 30992, 0, 0, 0, 0, 0, 0, '"Patches" - Script - Cast Patches Revenge');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=30993;
+
+DELETE FROM `creature_text` WHERE `entry` IN(30992,30993);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
+(30992, 1, 0, 'Oh, bravo. Do you feel proud of yourself now that you''ve unleashed this terrible mistake?', 12, 0, 100, 21, 0, 0, 'Doctor Sabnok',31550),
+(30992, 2, 0, 'I already had him scheduled for disposal, but I suppose we can speed up the process a bit.', 12, 0, 100, 1, 0, 0, 'Doctor Sabnok',31551),
+(30992, 3, 0, 'It''s a pity so many fine, and reusable, parts will go to waste... ', 12, 0, 100, 11, 0, 0, 'Doctor Sabnok',31553),
+(30993, 1, 0, 'Patches get revenge on Doctor Sabnok!', 12, 0, 100, 51, 0, 0, '\"Patches\"',31556),
+(30993, 2, 0, 'Patches not going to be cut open or sewn up no more!', 12, 0, 100, 1, 0, 0, '\"Patches\"',31554);
+
+DELETE FROM `creature` WHERE `id` =30992;
+
+UPDATE `creature_template` SET `faction`=974, `speed_run`=1.142857, `unit_flags`=0 WHERE `entry`=30992;
+UPDATE `creature_template` SET `unit_flags`=0 WHERE `entry` =30993;
+
+DELETE FROM `waypoints` WHERE `entry` IN(30992,30993);
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
+(30992, 1, 6631.495, 3167.087, 659.3602, 'Doctor Sabnok'),
+(30992, 2, 6630.52, 3167.312, 659.3602, 'Doctor Sabnok'),
+(30992, 3, 6626.219, 3169.138, 658.8849, 'Doctor Sabnok'),
+(30992, 4, 6625.229, 3169.558, 658.8132, 'Doctor Sabnok'),
+(30992, 5, 6619.998, 3171.78, 656.6917, 'Doctor Sabnok'),
+(30992, 6, 6618.303, 3172.5, 655.796, 'Doctor Sabnok'),
+(30992, 7, 6618.303, 3172.5, 655.796, 'Doctor Sabnok'),
+(30992, 8, 6618.216, 3172.712, 655.967, 'Doctor Sabnok'),
+(30992, 9, 6614.216, 3176.462, 654.217, 'Doctor Sabnok'),
+(30992, 10, 6613.862, 3176.668, 653.9982, 'Doctor Sabnok'),
+(30992, 11, 6612.862, 3177.668, 653.7482, 'Doctor Sabnok'),
+(30992, 12, 6606.399, 3184.294, 649.7903, 'Doctor Sabnok'),
+(30992, 13, 6606.399, 3185.794, 649.2903, 'Doctor Sabnok'),
+(30992, 14, 6606.149, 3189.544, 648.5403, 'Doctor Sabnok');
+
+DELETE FROM `creature_template_addon` WHERE `entry` IN (30993);
+INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES
+(30993, 0, 0x0, 0x1, '54262'); -- 30993 - 54262
diff --git a/sql/updates/world/2014_10_12_00_world.sql b/sql/updates/world/2014_10_12_00_world.sql
new file mode 100644
index 00000000000..ca1a062f437
--- /dev/null
+++ b/sql/updates/world/2014_10_12_00_world.sql
@@ -0,0 +1,294 @@
+-- Spectral Stable Hand SAI
+SET @ENTRY := 15551;
+UPDATE `smart_scripts` SET `event_chance`=50 WHERE `entryorguid`=@ENTRY AND `id`=4;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `id`=5;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(@ENTRY, 0, 5, 0, 4, 0, 50, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spectral Stable Hand - On Aggro - Talk');
+
+-- Spectral Apprentice SAI
+SET @ENTRY := 16389;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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
+(@ENTRY, 0, 0, 0, 4, 0, 50, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spectral Apprentice - On Aggro - Talk'),
+(@ENTRY, 0, 1, 0, 6, 0, 50, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spectral Apprentice - On Death - Talk');
+
+-- Phantom Attendant SAI
+SET @ENTRY := 16406;
+UPDATE `smart_scripts` SET `event_chance`=100, `event_flags`=0 WHERE `entryorguid`=@ENTRY AND `id`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `id` IN (4, 5);
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(@ENTRY, 0, 4, 0, 4, 0, 10, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Phantom Attendant - On Aggro - Talk'),
+(@ENTRY, 0, 5, 0, 6, 0, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Phantom Attendant - On Death - Talk');
+
+-- Spectral Servant SAI
+SET @ENTRY := 16407;
+UPDATE `smart_scripts` SET `event_chance`=50 WHERE `entryorguid`=@ENTRY AND `id`=2;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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, 4, 0, 50, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spectral Servant - On Aggro - Talk');
+
+-- Phantom Valet SAI
+SET @ENTRY := 16408;
+UPDATE `smart_scripts` SET `event_chance`=50 WHERE `entryorguid`=@ENTRY AND `id`=1;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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, 4, 0, 50, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Phantom Valet - On Aggro - Talk');
+
+-- Phantom Guest SAI
+SET @ENTRY := 16409;
+UPDATE `smart_scripts` SET `event_chance`=10, `event_flags`=0 WHERE `entryorguid`=@ENTRY AND `id`=6;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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, 4, 0, 10, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Phantom Guest - On Aggro - Talk');
+
+-- Spectral Retainer SAI
+SET @ENTRY := 16410;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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
+(@ENTRY, 0, 0, 0, 4, 0, 50, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spectral Retainer - On Aggro - Talk'),
+(@ENTRY, 0, 1, 0, 6, 0, 50, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spectral Retainer - On Death - Talk');
+
+-- Spectral Chef SAI
+SET @ENTRY := 16411;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `id` IN (2, 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, 2, 0, 4, 0, 50, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spectral Chef - On Aggro - Talk'),
+(@ENTRY, 0, 3, 0, 6, 0, 50, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spectral Chef - On Death - Talk');
+
+-- Ghostly Baker SAI
+SET @ENTRY := 16412;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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
+(@ENTRY, 0, 0, 0, 4, 0, 50, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ghostly Baker - On Aggro - Talk'),
+(@ENTRY, 0, 1, 0, 6, 0, 50, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ghostly Baker - On Death - Talk');
+
+-- Spectral Sentry SAI
+SET @ENTRY := 16424;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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
+(@ENTRY, 0, 1, 0, 4, 0, 50, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spectral Sentry - On Aggro - Talk'),
+(@ENTRY, 0, 2, 0, 6, 0, 50, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spectral Sentry - On Death - Talk');
+
+-- Phantom Guardsman SAI
+SET @ENTRY := 16425;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `id` IN (2, 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, 2, 0, 4, 0, 50, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Phantom Guardsman - On Aggro - Talk'),
+(@ENTRY, 0, 3, 0, 6, 0, 50, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Phantom Guardsman - On Death - Talk');
+
+-- Wanton Hostess SAI
+SET @ENTRY := 16459;
+UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=@ENTRY AND `id`=2;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `id` IN (5, 6, 7, 8);
+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, 5, 0, 4, 0, 50, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Wanton Hostess - On Aggro - Talk'),
+(@ENTRY, 0, 6, 0, 6, 0, 50, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Wanton Hostess - On Death - Talk'),
+(@ENTRY, 0, 7, 0, 2, 0, 100, 1, 0, 50, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Wanton Hostess - On Transform - Talk'),
+(@ENTRY, 0, 8, 0, 1, 0, 50, 0, 0, 40000, 45000, 120000, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Wanton Hostess - Out of Combat - Talk');
+
+-- Night Mistress SAI
+SET @ENTRY := 16460;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `id` IN (4, 5, 6, 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, 4, 0, 4, 0, 50, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Night Mistress - On Aggro - Talk'),
+(@ENTRY, 0, 5, 0, 6, 0, 50, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Night Mistress - On Death - Talk'),
+(@ENTRY, 0, 6, 0, 2, 0, 100, 1, 0, 50, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Night Mistress - On Transform - Talk'),
+(@ENTRY, 0, 7, 0, 1, 0, 50, 0, 0, 40000, 45000, 120000, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Night Mistress - Out of Combat - Talk');
+
+-- Concubine SAI
+SET @ENTRY := 16461;
+UPDATE `smart_scripts` SET `action_param1`=2, `comment`='Concubine - Death - Talk' WHERE `entryorguid`=@ENTRY AND `id`=3;
+UPDATE `smart_scripts` SET `event_flags`=0, `event_param2`=40000, `event_param3`=45000, `event_param4`=120000, `action_param1`=0, `comment`='Concubine - Out of Combat - Talk' WHERE `entryorguid`=@ENTRY AND `id`=4;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `id` IN (6, 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, 6, 0, 4, 0, 50, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Concubine - On Aggro - Talk'),
+(@ENTRY, 0, 7, 0, 2, 0, 100, 1, 0, 50, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Concubine - On Transform - Talk');
+
+-- Spectral Patron SAI
+SET @ENTRY := 16468;
+UPDATE `smart_scripts` SET `event_chance`=10 WHERE `entryorguid`=@ENTRY AND `id`=2; -- comment tbh
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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, 4, 0, 10, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spectral Patron - On Aggro - Talk');
+
+-- Ghostly Philanthropist SAI
+SET @ENTRY := 16470;
+UPDATE `smart_scripts` SET `event_chance`=50 WHERE `entryorguid`=@ENTRY AND `id`=2;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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, 4, 0, 50, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ghostly Philanthropist - On Aggro - Talk');
+
+-- Skeletal Usher SAI
+SET @ENTRY := 16471;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `id` IN (3, 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, 3, 0, 4, 0, 50, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Skeletal Usher - On Aggro - Talk'),
+(@ENTRY, 0, 4, 0, 6, 0, 50, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Skeletal Usher - On Death - Talk');
+
+-- Phantom Stagehand SAI
+SET @ENTRY := 16472;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `id` IN (3, 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, 3, 0, 4, 0, 50, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Phantom Stagehand - On Aggro - Talk'),
+(@ENTRY, 0, 4, 0, 6, 0, 50, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Phantom Stagehand - On Death - Talk');
+
+-- Phantom Guardsman SAI
+SET @ENTRY := 16473;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `id` IN (3, 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, 3, 0, 4, 0, 50, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spectral Performer - On Aggro - Talk'),
+(@ENTRY, 0, 4, 0, 6, 0, 50, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spectral Performer - On Death - Talk');
+
+-- Ghastly Haunt SAI
+SET @ENTRY := 16481;
+UPDATE `smart_scripts` SET `event_chance`=50 WHERE `entryorguid`=@ENTRY AND `id`=2;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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, 4, 0, 50, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ghastly Haunt - On Aggro - Talk');
+
+-- Trapped Soul SAI
+SET @ENTRY := 16482;
+UPDATE `smart_scripts` SET `event_chance`=50 WHERE `entryorguid`=@ENTRY AND `id`=2;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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, 4, 0, 50, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Trapped Soul - On Aggro - Talk');
+
+
+UPDATE `creature_text` SET `type`=12 WHERE `entry`=16414 AND `groupid`=0 AND `id`=2; -- Ghostly Steward
+UPDATE `creature_text` SET `type`=12 WHERE `entry`=16470 AND `groupid`=0 AND `id`=1; -- Ghostly Philanthropist
+
+DELETE FROM `creature_text` WHERE (`entry`=15551 AND `groupid`=1 AND `id`=0) OR (`entry`=15551 AND `groupid`=1 AND `id`=1) OR (`entry`=16389 AND `groupid`=0 AND `id`=0) OR (`entry`=16389 AND `groupid`=0 AND `id`=1) OR (`entry`=16389 AND `groupid`=1 AND `id`=0) OR (`entry`=16389 AND `groupid`=1 AND `id`=1) OR (`entry`=16406 AND `groupid`=0 AND `id`=2) OR (`entry`=16406 AND `groupid`=1 AND `id`=0) OR (`entry`=16406 AND `groupid`=1 AND `id`=1) OR (`entry`=16406 AND `groupid`=1 AND `id`=2) OR (`entry`=16407 AND `groupid`=1 AND `id`=0) OR (`entry`=16407 AND `groupid`=1 AND `id`=1) OR (`entry`=16407 AND `groupid`=1 AND `id`=2) OR (`entry`=16408 AND `groupid`=0 AND `id`=1) OR (`entry`=16408 AND `groupid`=0 AND `id`=2) OR (`entry`=16408 AND `groupid`=1 AND `id`=0) OR (`entry`=16408 AND `groupid`=1 AND `id`=1) OR (`entry`=16408 AND `groupid`=1 AND `id`=2) OR (`entry`=16408 AND `groupid`=1 AND `id`=3) OR (`entry`=16408 AND `groupid`=1 AND `id`=4) OR (`entry`=16409 AND `groupid`=0 AND `id`=1) OR (`entry`=16409 AND `groupid`=0 AND `id`=2) OR (`entry`=16409 AND `groupid`=1 AND `id`=0) OR (`entry`=16409 AND `groupid`=1 AND `id`=1) OR (`entry`=16409 AND `groupid`=1 AND `id`=2) OR (`entry`=16410 AND `groupid`=0 AND `id`=0) OR (`entry`=16410 AND `groupid`=0 AND `id`=1) OR (`entry`=16410 AND `groupid`=0 AND `id`=2) OR (`entry`=16410 AND `groupid`=1 AND `id`=0) OR (`entry`=16410 AND `groupid`=1 AND `id`=1) OR (`entry`=16410 AND `groupid`=1 AND `id`=2) OR (`entry`=16411 AND `groupid`=0 AND `id`=0) OR (`entry`=16411 AND `groupid`=0 AND `id`=1) OR (`entry`=16411 AND `groupid`=0 AND `id`=2) OR (`entry`=16411 AND `groupid`=1 AND `id`=0) OR (`entry`=16411 AND `groupid`=1 AND `id`=1) OR (`entry`=16411 AND `groupid`=1 AND `id`=2) OR (`entry`=16412 AND `groupid`=0 AND `id`=0) OR (`entry`=16412 AND `groupid`=0 AND `id`=1) OR (`entry`=16412 AND `groupid`=0 AND `id`=2) OR (`entry`=16412 AND `groupid`=1 AND `id`=0) OR (`entry`=16412 AND `groupid`=1 AND `id`=1) OR (`entry`=16412 AND `groupid`=1 AND `id`=2) OR (`entry`=16414 AND `groupid`=0 AND `id`=3) OR (`entry`=16414 AND `groupid`=1 AND `id`=0) OR (`entry`=16414 AND `groupid`=1 AND `id`=1) OR (`entry`=16414 AND `groupid`=1 AND `id`=2) OR (`entry`=16424 AND `groupid`=0 AND `id`=0) OR (`entry`=16424 AND `groupid`=0 AND `id`=1) OR (`entry`=16424 AND `groupid`=0 AND `id`=2) OR (`entry`=16424 AND `groupid`=1 AND `id`=0) OR (`entry`=16424 AND `groupid`=1 AND `id`=1) OR (`entry`=16424 AND `groupid`=1 AND `id`=2) OR (`entry`=16425 AND `groupid`=0 AND `id`=0) OR (`entry`=16425 AND `groupid`=0 AND `id`=1) OR (`entry`=16425 AND `groupid`=0 AND `id`=2) OR (`entry`=16425 AND `groupid`=1 AND `id`=0) OR (`entry`=16425 AND `groupid`=1 AND `id`=1) OR (`entry`=16425 AND `groupid`=1 AND `id`=2) OR (`entry`=16459 AND `groupid`=0 AND `id`=0) OR (`entry`=16459 AND `groupid`=0 AND `id`=1) OR (`entry`=16459 AND `groupid`=0 AND `id`=2) OR (`entry`=16459 AND `groupid`=0 AND `id`=3) OR (`entry`=16459 AND `groupid`=1 AND `id`=0) OR (`entry`=16459 AND `groupid`=1 AND `id`=1) OR (`entry`=16459 AND `groupid`=1 AND `id`=2) OR (`entry`=16459 AND `groupid`=2 AND `id`=0) OR (`entry`=16459 AND `groupid`=2 AND `id`=1) OR (`entry`=16459 AND `groupid`=2 AND `id`=2) OR (`entry`=16459 AND `groupid`=2 AND `id`=3) OR (`entry`=16459 AND `groupid`=2 AND `id`=4) OR (`entry`=16459 AND `groupid`=3 AND `id`=0) OR (`entry`=16459 AND `groupid`=3 AND `id`=1) OR (`entry`=16459 AND `groupid`=3 AND `id`=2) OR (`entry`=16459 AND `groupid`=3 AND `id`=3) OR (`entry`=16459 AND `groupid`=3 AND `id`=4) OR (`entry`=16459 AND `groupid`=3 AND `id`=5) OR (`entry`=16459 AND `groupid`=3 AND `id`=6) OR (`entry`=16460 AND `groupid`=0 AND `id`=3) OR (`entry`=16460 AND `groupid`=1 AND `id`=0) OR (`entry`=16460 AND `groupid`=1 AND `id`=1) OR (`entry`=16460 AND `groupid`=1 AND `id`=2) OR (`entry`=16460 AND `groupid`=2 AND `id`=0) OR (`entry`=16460 AND `groupid`=2 AND `id`=1) OR (`entry`=16460 AND `groupid`=2 AND `id`=2) OR (`entry`=16460 AND `groupid`=2 AND `id`=3) OR (`entry`=16460 AND `groupid`=2 AND `id`=4) OR (`entry`=16460 AND `groupid`=3 AND `id`=0) OR (`entry`=16460 AND `groupid`=3 AND `id`=1) OR (`entry`=16460 AND `groupid`=3 AND `id`=2) OR (`entry`=16460 AND `groupid`=3 AND `id`=3) OR (`entry`=16460 AND `groupid`=3 AND `id`=4) OR (`entry`=16460 AND `groupid`=3 AND `id`=5) OR (`entry`=16460 AND `groupid`=3 AND `id`=6) OR (`entry`=16461 AND `groupid`=0 AND `id`=0) OR (`entry`=16461 AND `groupid`=0 AND `id`=1) OR (`entry`=16461 AND `groupid`=0 AND `id`=2) OR (`entry`=16461 AND `groupid`=0 AND `id`=3) OR (`entry`=16461 AND `groupid`=1 AND `id`=0) OR (`entry`=16461 AND `groupid`=1 AND `id`=1) OR (`entry`=16461 AND `groupid`=1 AND `id`=2) OR (`entry`=16461 AND `groupid`=2 AND `id`=0) OR (`entry`=16461 AND `groupid`=2 AND `id`=1) OR (`entry`=16461 AND `groupid`=2 AND `id`=2) OR (`entry`=16461 AND `groupid`=2 AND `id`=3) OR (`entry`=16461 AND `groupid`=2 AND `id`=4) OR (`entry`=16461 AND `groupid`=3 AND `id`=0) OR (`entry`=16461 AND `groupid`=3 AND `id`=1) OR (`entry`=16461 AND `groupid`=3 AND `id`=2) OR (`entry`=16461 AND `groupid`=3 AND `id`=3) OR (`entry`=16461 AND `groupid`=3 AND `id`=4) OR (`entry`=16461 AND `groupid`=3 AND `id`=5) OR (`entry`=16461 AND `groupid`=3 AND `id`=6) OR (`entry`=16468 AND `groupid`=1 AND `id`=0) OR (`entry`=16468 AND `groupid`=1 AND `id`=1) OR (`entry`=16470 AND `groupid`=1 AND `id`=0) OR (`entry`=16470 AND `groupid`=1 AND `id`=1) OR (`entry`=16471 AND `groupid`=0 AND `id`=0) OR (`entry`=16471 AND `groupid`=0 AND `id`=1) OR (`entry`=16471 AND `groupid`=0 AND `id`=2) OR (`entry`=16471 AND `groupid`=0 AND `id`=3) OR (`entry`=16471 AND `groupid`=0 AND `id`=4) OR (`entry`=16471 AND `groupid`=1 AND `id`=0) OR (`entry`=16471 AND `groupid`=1 AND `id`=1) OR (`entry`=16472 AND `groupid`=0 AND `id`=0) OR (`entry`=16472 AND `groupid`=0 AND `id`=1) OR (`entry`=16472 AND `groupid`=1 AND `id`=0) OR (`entry`=16472 AND `groupid`=1 AND `id`=1) OR (`entry`=16473 AND `groupid`=0 AND `id`=0) OR (`entry`=16473 AND `groupid`=0 AND `id`=1) OR (`entry`=16473 AND `groupid`=1 AND `id`=0) OR (`entry`=16473 AND `groupid`=1 AND `id`=1) OR (`entry`=16481 AND `groupid`=1 AND `id`=0) OR (`entry`=16481 AND `groupid`=1 AND `id`=1) OR (`entry`=16482 AND `groupid`=1 AND `id`=0) OR (`entry`=16482 AND `groupid`=1 AND `id`=1);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `probability`, `sound`, `BroadcastTextId`, `comment`) VALUES
+(15551, 1, 0, 'Intruder!', 12, 100, 0, 13773, 'Spectral Stable Hand - On Aggro'),
+(15551, 1, 1, 'You are not welcome here!', 12, 100, 0, 13774, 'Spectral Stable Hand - On Aggro'),
+(16389, 0, 0, 'You are not welcome here!', 12, 100, 0, 13774, 'Spectral Apprentice - On Aggro'),
+(16389, 0, 1, 'You, hold there!', 12, 100, 0, 13798, 'Spectral Apprentice - On Aggro'),
+(16389, 1, 0, 'I am lost...', 12, 100, 0, 13801, 'Spectral Apprentice - On Death'),
+(16389, 1, 1, 'Why...?', 12, 100, 0, 13802, 'Spectral Apprentice - On Death'),
+(16406, 0, 2, 'I mustn''t be afraid....', 12, 100, 0, 13849, 'Phantom Attendant - On Death'),
+(16406, 1, 0, 'You''ll ruin everything!', 12, 100, 0, 13844, 'Phantom Attendant - On Aggro'),
+(16406, 1, 1, 'Off with you!', 12, 100, 0, 13845, 'Phantom Attendant - On Aggro'),
+(16406, 1, 2, 'We do not wish to be disturbed!', 12, 100, 0, 13846, 'Phantom Attendant - On Aggro'),
+(16407, 1, 0, 'What is this?', 12, 100, 0, 13820, 'Spectral Servant - On Aggro'),
+(16407, 1, 1, 'Invaders in the tower!', 12, 100, 0, 13821, 'Spectral Servant - On Aggro'),
+(16407, 1, 2, 'Stop them!', 12, 100, 0, 13822, 'Spectral Servant - On Aggro'),
+(16408, 0, 1, 'My time is done.', 12, 100, 0, 13857, 'Phantom Valet - On Death'),
+(16408, 0, 2, 'No, not now! Not like this!', 12, 100, 0, 13858, 'Phantom Valet - On Death'),
+(16408, 1, 0, 'Hey! Where do you think you are going, sneaking around like that?', 12, 100, 0, 13398, 'Phantom Valet - On Aggro'),
+(16408, 1, 1, 'Excuse me, are you trying to sneak by without an invitation?', 12, 100, 0, 13399, 'Phantom Valet - On Aggro'),
+(16408, 1, 2, 'Begone, outsider!', 12, 100, 0, 13851, 'Phantom Valet - On Aggro'),
+(16408, 1, 3, 'You''ll not ruin the celebration!', 12, 100, 0, 13852, 'Phantom Valet - On Aggro'),
+(16408, 1, 4, 'We are besieged!', 12, 100, 0, 13853, 'Phantom Valet - On Aggro'),
+(16409, 0, 1, 'It''s not my time, not yet!', 12, 100, 0, 13842, 'Phantom Guest - On Death'),
+(16409, 0, 2, 'All good things must come to an end.', 12, 100, 0, 13843, 'Phantom Guest - On Death'),
+(16409, 1, 0, 'How dare you interfere?!', 12, 100, 0, 13838, 'Phantom Guest - On Aggro'),
+(16409, 1, 1, 'You do not belong here!', 12, 100, 0, 13839, 'Phantom Guest - On Aggro'),
+(16409, 1, 2, 'Leave us alone! Let us be!', 12, 100, 0, 13840, 'Phantom Guest - On Aggro'),
+(16410, 0, 0, 'You''ll ruin everything!', 12, 100, 0, 13844, 'Spectral Retainer - On Aggro'),
+(16410, 0, 1, 'Off with you!', 12, 100, 0, 13845, 'Spectral Retainer - On Aggro'),
+(16410, 0, 2, 'We do not wish to be disturbed!', 12, 100, 0, 13846, 'Spectral Retainer - On Aggro'),
+(16410, 1, 0, 'Where am I? What--', 12, 100, 0, 13847, 'Spectral Retainer - On Death'),
+(16410, 1, 1, 'What is happening?', 12, 100, 0, 13848, 'Spectral Retainer - On Death'),
+(16410, 1, 2, 'I mustn''t be afraid....', 12, 100, 0, 13849, 'Spectral Retainer - On Death'),
+(16411, 0, 0, 'I''ll chop you into minced meat!', 12, 100, 0, 13861, 'Spectral Chef - On Aggro'),
+(16411, 0, 1, 'I''ll gut you like a fish!', 12, 100, 0, 13862, 'Spectral Chef - On Aggro'),
+(16411, 0, 2, 'I''ll carve the meat from your bones!', 12, 100, 0, 13863, 'Spectral Chef - On Aggro'),
+(16411, 1, 0, 'I have served to the last....', 12, 100, 0, 13864, 'Spectral Chef - On Death'),
+(16411, 1, 1, 'This isn''t the end; it can''t be!', 12, 100, 0, 13865, 'Spectral Chef - On Death'),
+(16411, 1, 2, 'I tried, master. I tried.', 12, 100, 0, 13866, 'Spectral Chef - On Death'),
+(16412, 0, 0, 'I''ll chop you into minced meat!', 12, 100, 0, 13861, 'Ghostly Baker - On Aggro'),
+(16412, 0, 1, 'I''ll gut you like a fish!', 12, 100, 0, 13862, 'Ghostly Baker - On Aggro'),
+(16412, 0, 2, 'I''ll carve the meat from your bones!', 12, 100, 0, 13863, 'Ghostly Baker - On Aggro'),
+(16412, 1, 0, 'I have served to the last....', 12, 100, 0, 13864, 'Ghostly Baker - On Death'),
+(16412, 1, 1, 'This isn''t the end; it can''t be!', 12, 100, 0, 13865, 'Ghostly Baker - On Death'),
+(16412, 1, 2, 'I tried, master. I tried.', 12, 100, 0, 13866, 'Ghostly Baker - On Death'),
+(16414, 0, 3, 'How dare you spill the master''s wine!', 12, 100, 0, 13435, 'Ghostly Steward - On Death'),
+(16414, 1, 0, 'Impudent outsiders!', 12, 100, 0, 13876, 'Ghostly Steward - On Aggro'),
+(16414, 1, 1, 'Meddling fools! You will pay with your lives!', 12, 100, 0, 13877, 'Ghostly Steward - On Aggro'),
+(16414, 1, 2, 'You''ll never make it out alive....', 12, 100, 0, 13879, 'Ghostly Steward - On Aggro'),
+(16424, 0, 0, 'What is this?', 12, 100, 0, 13820, 'Spectral Sentry - On Aggro'),
+(16424, 0, 1, 'Invaders in the tower!', 12, 100, 0, 13821, 'Spectral Sentry - On Aggro'),
+(16424, 0, 2, 'Stop them!', 12, 100, 0, 13822, 'Spectral Sentry - On Aggro'),
+(16424, 1, 0, 'You will be punished!', 12, 100, 0, 13835, 'Spectral Sentry - On Death'),
+(16424, 1, 1, 'You... will... pay.', 12, 100, 0, 13836, 'Spectral Sentry - On Death'),
+(16424, 1, 2, 'I have failed....', 12, 100, 0, 13834, 'Spectral Sentry - On Death'),
+(16425, 0, 0, 'To arms!', 12, 100, 0, 13829, 'Phantom Guardsman - On Aggro'),
+(16425, 0, 1, 'Protect the tower!', 12, 100, 0, 13830, 'Phantom Guardsman - On Aggro'),
+(16425, 0, 2, 'Have at them!', 12, 100, 0, 13831, 'Phantom Guardsman - On Aggro'),
+(16425, 1, 0, 'You will be punished!', 12, 100, 0, 13835, 'Phantom Guardsman - On Death'),
+(16425, 1, 1, 'You... will... pay.', 12, 100, 0, 13836, 'Phantom Guardsman - On Death'),
+(16425, 1, 2, 'I have failed....', 12, 100, 0, 13834, 'Phantom Guardsman - On Death'),
+(16459, 0, 0, 'So I said, "Yeah, but that''ll cost you extra."', 12, 100, 0, 13883, 'Wanton Hostess - Out of Combat'),
+(16459, 0, 1, 'Five seconds. I''m not kidding!', 12, 100, 0, 13884, 'Wanton Hostess - Out of Combat'),
+(16459, 0, 2, 'He asked if the imp could join in--can you believe it? Actually, it wasn''t half bad....', 12, 100, 0, 13885, 'Wanton Hostess - Out of Combat'),
+(16459, 0, 3, 'They fall asleep after. Me, I fall asleep during....', 12, 100, 0, 13886, 'Wanton Hostess - Out of Combat'),
+(16459, 1, 0, 'Come play with me!', 12, 100, 0, 13880, 'Wanton Hostess - On Aggro'),
+(16459, 1, 1, 'You WILL be mine.', 12, 100, 0, 13881, 'Wanton Hostess - On Aggro'),
+(16459, 1, 2, 'Come here, pretty. You have what I need!', 12, 100, 0, 13882, 'Wanton Hostess - On Aggro'),
+(16459, 2, 0, 'It was fun while it lasted....', 12, 100, 0, 13889, 'Wanton Hostess - On Death'),
+(16459, 2, 1, '<sigh> It''s always over too soon.', 12, 100, 0, 13890, 'Wanton Hostess - On Death'),
+(16459, 2, 2, 'Just when things were getting interesting.', 12, 100, 0, 13897, 'Wanton Hostess - On Death'),
+(16459, 2, 3, 'We could have had so much fun!', 12, 100, 0, 13898, 'Wanton Hostess - On Death'),
+(16459, 3, 0, 'Come any closer, and I''ll scream.', 12, 100, 0, 13887, 'Wanton Hostess - On Transform'),
+(16459, 3, 1, 'I want to show you a different side of me....', 12, 100, 0, 13888, 'Wanton Hostess - On Transform'),
+(16459, 3, 2, 'I want you to be with me... forever and ever.', 12, 100, 0, 13891, 'Wanton Hostess - On Transform'),
+(16459, 3, 3, 'Shhh... I have a little secret I''ve been keeping.\n', 12, 100, 0, 13892, 'Wanton Hostess - On Transform'),
+(16459, 3, 4, 'I''ve been very, very naughty....', 12, 100, 0, 13895, 'Wanton Hostess - On Transform'),
+(16459, 3, 5, 'Enough foreplay. Let''s get down to business.', 12, 100, 0, 13896, 'Wanton Hostess - On Transform'),
+(16460, 0, 3, 'They fall asleep after. Me, I fall asleep during....', 12, 100, 0, 13886, 'Night Mistress - Out of Combat'),
+(16460, 1, 0, 'Come play with me!', 12, 100, 0, 13880, 'Night Mistress - On Aggro'),
+(16460, 1, 1, 'You WILL be mine.', 12, 100, 0, 13881, 'Night Mistress - On Aggro'),
+(16460, 1, 2, 'Come here, pretty. You have what I need!', 12, 100, 0, 13882, 'Night Mistress - On Aggro'),
+(16460, 2, 0, 'It was fun while it lasted....', 12, 100, 0, 13889, 'Night Mistress - On Death'),
+(16460, 2, 1, '<sigh> It''s always over too soon.', 12, 100, 0, 13890, 'Night Mistress - On Death'),
+(16460, 2, 2, 'Just when things were getting interesting.', 12, 100, 0, 13897, 'Night Mistress - On Death'),
+(16460, 2, 3, 'We could have had so much fun!', 12, 100, 0, 13898, 'Night Mistress - On Death'),
+(16460, 3, 0, 'Come any closer, and I''ll scream.', 12, 100, 0, 13887, 'Night Mistress - On Transform'),
+(16460, 3, 1, 'I want to show you a different side of me....', 12, 100, 0, 13888, 'Night Mistress - On Transform'),
+(16460, 3, 2, 'I want you to be with me... forever and ever.', 12, 100, 0, 13891, 'Night Mistress - On Transform'),
+(16460, 3, 3, 'Shhh... I have a little secret I''ve been keeping.\n', 12, 100, 0, 13892, 'Night Mistress - On Transform'),
+(16460, 3, 4, 'I''ve been very, very naughty....', 12, 100, 0, 13895, 'Night Mistress - On Transform'),
+(16460, 3, 5, 'Enough foreplay. Let''s get down to business.', 12, 100, 0, 13896, 'Night Mistress - On Transform'),
+(16461, 0, 0, 'So I said, "Yeah, but that''ll cost you extra."', 12, 100, 0, 13883, 'Concubine - Out of Combat'),
+(16461, 0, 1, 'Five seconds. I''m not kidding!', 12, 100, 0, 13884, 'Concubine - Out of Combat'),
+(16461, 0, 2, 'He asked if the imp could join in--can you believe it? Actually, it wasn''t half bad....', 12, 100, 0, 13885, 'Concubine - Out of Combat'),
+(16461, 0, 3, 'They fall asleep after. Me, I fall asleep during....', 12, 100, 0, 13886, 'Concubine - Out of Combat'),
+(16461, 1, 0, 'Come play with me!', 12, 100, 0, 13880, 'Concubine - On Aggro'),
+(16461, 1, 1, 'You WILL be mine.', 12, 100, 0, 13881, 'Concubine - On Aggro'),
+(16461, 1, 2, 'Come here, pretty. You have what I need!', 12, 100, 0, 13882, 'Concubine - On Aggro'),
+(16461, 2, 0, 'It was fun while it lasted....', 12, 100, 0, 13889, 'Concubine - On Death'),
+(16461, 2, 1, '<sigh> It''s always over too soon.', 12, 100, 0, 13890, 'Concubine - On Death'),
+(16461, 2, 2, 'Just when things were getting interesting.', 12, 100, 0, 13897, 'Concubine - On Death'),
+(16461, 2, 3, 'We could have had so much fun!', 12, 100, 0, 13898, 'Concubine - On Death'),
+(16461, 3, 0, 'Come any closer, and I''ll scream.', 12, 100, 0, 13887, 'Concubine - On Transform'),
+(16461, 3, 1, 'I want to show you a different side of me....', 12, 100, 0, 13888, 'Concubine - On Transform'),
+(16461, 3, 2, 'I want you to be with me... forever and ever.', 12, 100, 0, 13891, 'Concubine - On Transform'),
+(16461, 3, 3, 'Shhh... I have a little secret I''ve been keeping.\n', 12, 100, 0, 13892, 'Concubine - On Transform'),
+(16461, 3, 4, 'I''ve been very, very naughty....', 12, 100, 0, 13895, 'Concubine - On Transform'),
+(16461, 3, 5, 'Enough foreplay. Let''s get down to business.', 12, 100, 0, 13896, 'Concubine - On Transform'),
+(16468, 1, 0, 'You must not interfere!', 12, 100, 0, 13916, 'Spectral Patron - On Aggro'),
+(16468, 1, 1, 'What are you doing? Be off!', 12, 100, 0, 13917, 'Spectral Patron - On Aggro'),
+(16470, 1, 0, 'You were not invited!', 12, 100, 0, 13943, 'Ghostly Philanthropist - On Aggro'),
+(16470, 1, 1, 'Your insolence will not be tolerated!', 12, 100, 0, 13942, 'Ghostly Philanthropist - On Aggro'),
+(16471, 0, 0, 'Clear the area!', 12, 100, 0, 13920, 'Skeletal Usher - On Aggro'),
+(16471, 0, 1, 'Where''s your ticket?', 12, 100, 0, 13921, 'Skeletal Usher - On Aggro'),
+(16471, 0, 2, 'The show is for guests only!', 12, 100, 0, 13922, 'Skeletal Usher - On Aggro'),
+(16471, 0, 3, 'You should not have come here!', 12, 100, 0, 13923, 'Skeletal Usher - On Aggro'),
+(16471, 0, 4, 'You''ll be joining the other guests now....', 12, 100, 0, 13924, 'Skeletal Usher - On Aggro'),
+(16471, 1, 0, 'You cannot stop us all!', 12, 100, 0, 13925, 'Skeletal Usher - On Death'),
+(16471, 1, 1, 'Your death will soon follow....', 12, 100, 0, 13926, 'Skeletal Usher - On Death'),
+(16472, 0, 0, 'You''re not allowed here!', 12, 100, 0, 13928, 'Phantom Stagehand - On Aggro'),
+(16472, 0, 1, 'You''re not a guest!', 12, 100, 0, 13929, 'Phantom Stagehand - On Aggro'),
+(16472, 1, 0, 'Am I released from my duties?', 12, 100, 0, 13930, 'Phantom Stagehand - On Death'),
+(16472, 1, 1, 'At last, my work is done.', 12, 100, 0, 13931, 'Phantom Stagehand - On Death'),
+(16473, 0, 0, 'I will not be upstaged by amateurs!', 12, 100, 0, 13938, 'Spectral Performer - On Aggro'),
+(16473, 0, 1, 'The show must go on!', 12, 100, 0, 13939, 'Spectral Performer - On Aggro'),
+(16473, 1, 0, 'It''s so cold, so dark.... I''m not overacting, am I?', 12, 100, 0, 13940, 'Spectral Performer - On Death'),
+(16473, 1, 1, 'Make sure my name is spelled correctly on the tombst--', 12, 100, 0, 13941, 'Spectral Performer - On Death'),
+(16481, 1, 0, 'You will find no reward here, only death!', 12, 100, 0, 13946, 'Ghastly Haunt - On Aggro'),
+(16481, 1, 1, 'Visitors are forbidden!', 12, 100, 0, 13947, 'Ghastly Haunt - On Aggro'),
+(16482, 1, 0, 'You will find no reward here, only death!', 12, 100, 0, 13946, 'Trapped Soul - On Aggro'),
+(16482, 1, 1, 'Visitors are forbidden!', 12, 100, 0, 13947, 'Trapped Soul - On Aggro');
diff --git a/sql/updates/world/2014_10_12_01_world.sql b/sql/updates/world/2014_10_12_01_world.sql
new file mode 100644
index 00000000000..d34ce5b4dbf
--- /dev/null
+++ b/sql/updates/world/2014_10_12_01_world.sql
@@ -0,0 +1,12 @@
+-- Insert "Brazie's Black Book of Secrets" into Brazie Getz's vendor table
+DELETE FROM `npc_vendor` WHERE `entry`=37904 AND `item`=49926;
+INSERT INTO `npc_vendor` (`entry`, `item`, `maxcount`, `incrtime`, `ExtendedCost`, `VerifiedBuild`) VALUES
+(37904, 49926, 0, 0, 0, 0);
+-- Add various Brazie's "guides" inside "Brazie's Black Book of Secrets"
+DELETE FROM `item_loot_template` WHERE `Entry`=49926 AND `Item` IN (49918, 49922, 49923, 49924, 49925);
+INSERT INTO `item_loot_template` (`Entry`, `Item`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
+(49926, 49918, 100, 0, 1, 0, 1, 1), -- Brazie's Guide to Getting Good with Gnomish Girls
+(49926, 49922, 100, 0, 1, 0, 1, 1), -- Brazie's Dictionary of Devilish Draenei Damsels
+(49926, 49923, 100, 0, 1, 0, 1, 1), -- Brazie's Document on Dwarven Dates in Dun Morogh
+(49926, 49924, 100, 0, 1, 0, 1, 1), -- Brazie's Notes on Naughty Night Elves
+(49926, 49925, 100, 0, 1, 0, 1, 1); -- Brazie's Handbook to Handling Human Hunnies
diff --git a/sql/updates/world/2014_10_12_02_world.sql b/sql/updates/world/2014_10_12_02_world.sql
new file mode 100644
index 00000000000..42417c4602a
--- /dev/null
+++ b/sql/updates/world/2014_10_12_02_world.sql
@@ -0,0 +1,2 @@
+--
+DELETE FROM `spell_dbc` WHERE `Id` = 100001;
diff --git a/sql/updates/world/2014_10_12_03_world.sql b/sql/updates/world/2014_10_12_03_world.sql
new file mode 100644
index 00000000000..7f6649cd271
--- /dev/null
+++ b/sql/updates/world/2014_10_12_03_world.sql
@@ -0,0 +1,2 @@
+--
+UPDATE `spell_dbc` SET `AttributesEx3` = 0 WHERE `Id` = 65142;
diff --git a/sql/updates/world/2014_10_12_04_world.sql b/sql/updates/world/2014_10_12_04_world.sql
new file mode 100644
index 00000000000..b522b5fc927
--- /dev/null
+++ b/sql/updates/world/2014_10_12_04_world.sql
@@ -0,0 +1,3 @@
+UPDATE `smart_scripts` SET `link`=12 WHERE `entryorguid`=11680 AND `source_type`=0 AND `id`=11;
+UPDATE `smart_scripts` SET `link`=2 WHERE `entryorguid`=18855 AND `source_type`=0 AND `id`=1;
+UPDATE `smart_scripts` SET `link`=18 WHERE `entryorguid`=26670 AND `source_type`=0 AND `id`=18;
diff --git a/sql/updates/world/2014_10_12_05_world.sql b/sql/updates/world/2014_10_12_05_world.sql
new file mode 100644
index 00000000000..8ea7ba0aea1
--- /dev/null
+++ b/sql/updates/world/2014_10_12_05_world.sql
@@ -0,0 +1,2 @@
+--
+UPDATE `spell_dbc` SET `AttributesEx3` = 128 WHERE `Id` = 65142;
diff --git a/sql/updates/world/2014_10_12_06_world.sql b/sql/updates/world/2014_10_12_06_world.sql
new file mode 100644
index 00000000000..c448e6cbd98
--- /dev/null
+++ b/sql/updates/world/2014_10_12_06_world.sql
@@ -0,0 +1,8 @@
+DELETE FROM `creature_loot_template` WHERE `Entry`=15623;
+INSERT INTO `creature_loot_template`(`Entry`,`Item`,`Chance`,`MinCount`,`MaxCount`) VALUES
+(15623,14047,19,1,4),
+(15623,14256,3,1,1),
+(15623,8952,2,1,1),
+(15623,13446,1.3,1,1),
+(15623,13443,0.3,1,1),
+(15623,14283,0.11,1,1);
diff --git a/sql/updates/world/2014_10_12_07_world.sql b/sql/updates/world/2014_10_12_07_world.sql
new file mode 100644
index 00000000000..1bd0e4d9352
--- /dev/null
+++ b/sql/updates/world/2014_10_12_07_world.sql
@@ -0,0 +1,2 @@
+DELETE FROM `creature_loot_template` WHERE `Entry`=15623 AND `Item`=12002;
+INSERT INTO `creature_loot_template`(`Entry`,`Item`,`Chance`,`MinCount`,`MaxCount`) VALUE (15623,12002,0.13,1,1);
diff --git a/sql/updates/world/2014_10_13_00_world.sql b/sql/updates/world/2014_10_13_00_world.sql
new file mode 100644
index 00000000000..1af4567bfae
--- /dev/null
+++ b/sql/updates/world/2014_10_13_00_world.sql
@@ -0,0 +1,2 @@
+UPDATE `smart_scripts` SET `link`=18 WHERE `entryorguid`=26670 AND `source_type`=0 AND `id`=17;
+UPDATE `smart_scripts` SET `link`=20 WHERE `entryorguid`=26670 AND `source_type`=0 AND `id`=19;
diff --git a/sql/updates/world/2014_10_13_01_world.sql b/sql/updates/world/2014_10_13_01_world.sql
new file mode 100644
index 00000000000..33ab4d3ecda
--- /dev/null
+++ b/sql/updates/world/2014_10_13_01_world.sql
@@ -0,0 +1,423 @@
+DELETE FROM `creature_text` WHERE (`entry`=315 AND `groupid`=0 AND `id`=2) OR (`entry`=706 AND `groupid`=0 AND `id`=3) OR (`entry`=1398 AND `groupid`=0 AND `id`=3) OR (`entry`=1398 AND `groupid`=0 AND `id`=4) OR (`entry`=1398 AND `groupid`=0 AND `id`=5) OR (`entry`=1399 AND `groupid`=0 AND `id`=3) OR (`entry`=1399 AND `groupid`=0 AND `id`=4) OR (`entry`=1399 AND `groupid`=0 AND `id`=5) OR (`entry`=1410 AND `groupid`=0 AND `id`=2) OR (`entry`=1410 AND `groupid`=0 AND `id`=3) OR (`entry`=1410 AND `groupid`=0 AND `id`=4) OR (`entry`=1410 AND `groupid`=0 AND `id`=5) OR (`entry`=1493 AND `groupid`=0 AND `id`=0) OR (`entry`=1493 AND `groupid`=0 AND `id`=6) OR (`entry`=1493 AND `groupid`=0 AND `id`=7) OR (`entry`=1719 AND `groupid`=0 AND `id`=3) OR (`entry`=1719 AND `groupid`=0 AND `id`=4) OR (`entry`=1976 AND `groupid`=0 AND `id`=3) OR (`entry`=1976 AND `groupid`=0 AND `id`=4) OR (`entry`=1976 AND `groupid`=0 AND `id`=5) OR (`entry`=1976 AND `groupid`=0 AND `id`=6) OR (`entry`=1976 AND `groupid`=0 AND `id`=7) OR (`entry`=2044 AND `groupid`=0 AND `id`=2) OR (`entry`=2396 AND `groupid`=0 AND `id`=2) OR (`entry`=2922 AND `groupid`=0 AND `id`=3) OR (`entry`=2922 AND `groupid`=0 AND `id`=4) OR (`entry`=3218 AND `groupid`=0 AND `id`=3) OR (`entry`=3218 AND `groupid`=0 AND `id`=4) OR (`entry`=3218 AND `groupid`=0 AND `id`=5) OR (`entry`=3218 AND `groupid`=0 AND `id`=6) OR (`entry`=3218 AND `groupid`=0 AND `id`=7) OR (`entry`=3296 AND `groupid`=0 AND `id`=3) OR (`entry`=3296 AND `groupid`=0 AND `id`=4) OR (`entry`=3296 AND `groupid`=0 AND `id`=5) OR (`entry`=3296 AND `groupid`=0 AND `id`=6) OR (`entry`=3296 AND `groupid`=0 AND `id`=7) OR (`entry`=3502 AND `groupid`=0 AND `id`=3) OR (`entry`=3502 AND `groupid`=0 AND `id`=4) OR (`entry`=3502 AND `groupid`=0 AND `id`=5) OR (`entry`=3502 AND `groupid`=0 AND `id`=6) OR (`entry`=3502 AND `groupid`=0 AND `id`=7) OR (`entry`=3504 AND `groupid`=0 AND `id`=3) OR (`entry`=3504 AND `groupid`=1 AND `id`=3) OR (`entry`=3518 AND `groupid`=0 AND `id`=2) OR (`entry`=3518 AND `groupid`=0 AND `id`=3) OR (`entry`=3520 AND `groupid`=0 AND `id`=3) OR (`entry`=3520 AND `groupid`=1 AND `id`=3) OR (`entry`=4624 AND `groupid`=0 AND `id`=3) OR (`entry`=4624 AND `groupid`=0 AND `id`=4) OR (`entry`=4624 AND `groupid`=0 AND `id`=5) OR (`entry`=4624 AND `groupid`=0 AND `id`=6) OR (`entry`=4624 AND `groupid`=0 AND `id`=7) OR (`entry`=4979 AND `groupid`=2 AND `id`=3) OR (`entry`=5355 AND `groupid`=0 AND `id`=0) OR (`entry`=5355 AND `groupid`=0 AND `id`=1) OR (`entry`=5355 AND `groupid`=0 AND `id`=4) OR (`entry`=5355 AND `groupid`=0 AND `id`=5) OR (`entry`=5391 AND `groupid`=0 AND `id`=1) OR (`entry`=5391 AND `groupid`=2 AND `id`=2) OR (`entry`=5662 AND `groupid`=0 AND `id`=8) OR (`entry`=5698 AND `groupid`=0 AND `id`=8) OR (`entry`=5699 AND `groupid`=0 AND `id`=5) OR (`entry`=5955 AND `groupid`=0 AND `id`=2) OR (`entry`=5955 AND `groupid`=0 AND `id`=3) OR (`entry`=5955 AND `groupid`=0 AND `id`=4) OR (`entry`=5955 AND `groupid`=0 AND `id`=5) OR (`entry`=5955 AND `groupid`=0 AND `id`=6) OR (`entry`=5955 AND `groupid`=0 AND `id`=7) OR (`entry`=10541 AND `groupid`=0 AND `id`=3) OR (`entry`=10541 AND `groupid`=1 AND `id`=3) OR (`entry`=10541 AND `groupid`=1 AND `id`=4) OR (`entry`=10541 AND `groupid`=1 AND `id`=5) OR (`entry`=10541 AND `groupid`=1 AND `id`=6) OR (`entry`=10799 AND `groupid`=0 AND `id`=3) OR (`entry`=11136 AND `groupid`=0 AND `id`=2) OR (`entry`=11136 AND `groupid`=0 AND `id`=3) OR (`entry`=11136 AND `groupid`=0 AND `id`=4) OR (`entry`=11190 AND `groupid`=0 AND `id`=3) OR (`entry`=11190 AND `groupid`=0 AND `id`=4) OR (`entry`=11190 AND `groupid`=0 AND `id`=5) OR (`entry`=11190 AND `groupid`=0 AND `id`=6) OR (`entry`=11190 AND `groupid`=0 AND `id`=7) OR (`entry`=11582 AND `groupid`=0 AND `id`=3) OR (`entry`=11582 AND `groupid`=0 AND `id`=4) OR (`entry`=12337 AND `groupid`=0 AND `id`=3) OR (`entry`=15184 AND `groupid`=0 AND `id`=3) OR (`entry`=15184 AND `groupid`=0 AND `id`=4) OR (`entry`=15184 AND `groupid`=0 AND `id`=5) OR (`entry`=15184 AND `groupid`=0 AND `id`=6) OR (`entry`=15184 AND `groupid`=0 AND `id`=7) OR (`entry`=17259 AND `groupid`=0 AND `id`=3) OR (`entry`=17259 AND `groupid`=0 AND `id`=4) OR (`entry`=17259 AND `groupid`=0 AND `id`=5) OR (`entry`=17259 AND `groupid`=0 AND `id`=6) OR (`entry`=17271 AND `groupid`=0 AND `id`=3) OR (`entry`=17271 AND `groupid`=0 AND `id`=4) OR (`entry`=17271 AND `groupid`=0 AND `id`=5) OR (`entry`=17271 AND `groupid`=0 AND `id`=6) OR (`entry`=17491 AND `groupid`=0 AND `id`=2) OR (`entry`=17491 AND `groupid`=0 AND `id`=3) OR (`entry`=17491 AND `groupid`=0 AND `id`=4) OR (`entry`=17491 AND `groupid`=0 AND `id`=5) OR (`entry`=17491 AND `groupid`=0 AND `id`=6) OR (`entry`=18103 AND `groupid`=0 AND `id`=2) OR (`entry`=18103 AND `groupid`=0 AND `id`=3) OR (`entry`=18103 AND `groupid`=0 AND `id`=4) OR (`entry`=19283 AND `groupid`=0 AND `id`=3) OR (`entry`=21114 AND `groupid`=0 AND `id`=6) OR (`entry`=21661 AND `groupid`=1 AND `id`=3) OR (`entry`=21661 AND `groupid`=1 AND `id`=4) OR (`entry`=21661 AND `groupid`=1 AND `id`=5) OR (`entry`=21661 AND `groupid`=1 AND `id`=6) OR (`entry`=21661 AND `groupid`=1 AND `id`=7) OR (`entry`=22314 AND `groupid`=0 AND `id`=4) OR (`entry`=23311 AND `groupid`=0 AND `id`=7) OR (`entry`=23861 AND `groupid`=0 AND `id`=7) OR (`entry`=25428 AND `groupid`=0 AND `id`=3) OR (`entry`=25429 AND `groupid`=0 AND `id`=3) OR (`entry`=25682 AND `groupid`=0 AND `id`=1) OR (`entry`=25682 AND `groupid`=0 AND `id`=2) OR (`entry`=28608 AND `groupid`=0 AND `id`=3) OR (`entry`=28608 AND `groupid`=0 AND `id`=4) OR (`entry`=28608 AND `groupid`=0 AND `id`=5) OR (`entry`=28608 AND `groupid`=0 AND `id`=6) OR (`entry`=28609 AND `groupid`=0 AND `id`=3) OR (`entry`=28609 AND `groupid`=0 AND `id`=4) OR (`entry`=28609 AND `groupid`=0 AND `id`=5) OR (`entry`=28609 AND `groupid`=0 AND `id`=6) OR (`entry`=28611 AND `groupid`=0 AND `id`=3) OR (`entry`=28611 AND `groupid`=0 AND `id`=4) OR (`entry`=28611 AND `groupid`=0 AND `id`=5) OR (`entry`=28611 AND `groupid`=0 AND `id`=6) OR (`entry`=28714 AND `groupid`=0 AND `id`=3) OR (`entry`=28714 AND `groupid`=0 AND `id`=4) OR (`entry`=28714 AND `groupid`=0 AND `id`=5) OR (`entry`=28714 AND `groupid`=0 AND `id`=6) OR (`entry`=28715 AND `groupid`=0 AND `id`=3) OR (`entry`=28715 AND `groupid`=0 AND `id`=4) OR (`entry`=28715 AND `groupid`=0 AND `id`=5) OR (`entry`=28715 AND `groupid`=0 AND `id`=6) OR (`entry`=28721 AND `groupid`=0 AND `id`=6) OR (`entry`=28723 AND `groupid`=0 AND `id`=3) OR (`entry`=28723 AND `groupid`=0 AND `id`=4) OR (`entry`=28723 AND `groupid`=0 AND `id`=5) OR (`entry`=28723 AND `groupid`=0 AND `id`=6) OR (`entry`=28725 AND `groupid`=0 AND `id`=4) OR (`entry`=28725 AND `groupid`=0 AND `id`=5) OR (`entry`=28725 AND `groupid`=0 AND `id`=6) OR (`entry`=28726 AND `groupid`=0 AND `id`=6) OR (`entry`=28727 AND `groupid`=0 AND `id`=4) OR (`entry`=28727 AND `groupid`=0 AND `id`=5) OR (`entry`=28727 AND `groupid`=0 AND `id`=6) OR (`entry`=28750 AND `groupid`=0 AND `id`=0) OR (`entry`=28750 AND `groupid`=0 AND `id`=3) OR (`entry`=28989 AND `groupid`=0 AND `id`=6) OR (`entry`=28994 AND `groupid`=0 AND `id`=4) OR (`entry`=28994 AND `groupid`=0 AND `id`=5) OR (`entry`=28994 AND `groupid`=0 AND `id`=6) OR (`entry`=28997 AND `groupid`=0 AND `id`=4) OR (`entry`=28997 AND `groupid`=0 AND `id`=5) OR (`entry`=28997 AND `groupid`=0 AND `id`=6) OR (`entry`=29647 AND `groupid`=1 AND `id`=4) OR (`entry`=29647 AND `groupid`=1 AND `id`=8) OR (`entry`=29647 AND `groupid`=1 AND `id`=9) OR (`entry`=29647 AND `groupid`=1 AND `id`=10) OR (`entry`=29686 AND `groupid`=0 AND `id`=3) OR (`entry`=29686 AND `groupid`=0 AND `id`=4) OR (`entry`=29686 AND `groupid`=0 AND `id`=5) OR (`entry`=29686 AND `groupid`=0 AND `id`=6) OR (`entry`=29884 AND `groupid`=1 AND `id`=8) OR (`entry`=29884 AND `groupid`=1 AND `id`=9) OR (`entry`=29884 AND `groupid`=1 AND `id`=10) OR (`entry`=29491 AND `groupid`=0 AND `id`=2) OR (`entry`=29491 AND `groupid`=0 AND `id`=3) OR (`entry`=29491 AND `groupid`=0 AND `id`=4) OR (`entry`=29491 AND `groupid`=0 AND `id`=5) OR (`entry`=29491 AND `groupid`=0 AND `id`=6) OR (`entry`=29523 AND `groupid`=0 AND `id`=4) OR (`entry`=29523 AND `groupid`=0 AND `id`=5) OR (`entry`=29523 AND `groupid`=0 AND `id`=6) OR (`entry`=30012 AND `groupid`=0 AND `id`=4) OR (`entry`=31397 AND `groupid`=0 AND `id`=5) OR (`entry`=31397 AND `groupid`=0 AND `id`=6) OR (`entry`=31397 AND `groupid`=0 AND `id`=7) OR (`entry`=33027 AND `groupid`=0 AND `id`=5) OR (`entry`=33027 AND `groupid`=0 AND `id`=6) OR (`entry`=33853 AND `groupid`=0 AND `id`=3) OR (`entry`=36764 AND `groupid`=0 AND `id`=5) OR (`entry`=36764 AND `groupid`=0 AND `id`=6) OR (`entry`=36764 AND `groupid`=0 AND `id`=7) OR (`entry`=36764 AND `groupid`=0 AND `id`=8) OR (`entry`=36764 AND `groupid`=0 AND `id`=9) OR (`entry`=36764 AND `groupid`=0 AND `id`=10) OR (`entry`=36764 AND `groupid`=0 AND `id`=11) OR (`entry`=36764 AND `groupid`=0 AND `id`=12) OR (`entry`=36764 AND `groupid`=0 AND `id`=13) OR (`entry`=36764 AND `groupid`=0 AND `id`=14) OR (`entry`=36764 AND `groupid`=0 AND `id`=15) OR (`entry`=36764 AND `groupid`=0 AND `id`=16) OR (`entry`=36764 AND `groupid`=0 AND `id`=17) OR (`entry`=36764 AND `groupid`=0 AND `id`=18) OR (`entry`=36764 AND `groupid`=0 AND `id`=19) OR (`entry`=36764 AND `groupid`=0 AND `id`=20) OR (`entry`=36764 AND `groupid`=0 AND `id`=21) OR (`entry`=36764 AND `groupid`=0 AND `id`=22) OR (`entry`=36764 AND `groupid`=0 AND `id`=23) OR (`entry`=36764 AND `groupid`=0 AND `id`=24) OR (`entry`=36765 AND `groupid`=0 AND `id`=5) OR (`entry`=36765 AND `groupid`=0 AND `id`=6) OR (`entry`=36765 AND `groupid`=0 AND `id`=7) OR (`entry`=36765 AND `groupid`=0 AND `id`=8) OR (`entry`=36765 AND `groupid`=0 AND `id`=9) OR (`entry`=36765 AND `groupid`=0 AND `id`=10) OR (`entry`=36765 AND `groupid`=0 AND `id`=11) OR (`entry`=36765 AND `groupid`=0 AND `id`=12) OR (`entry`=36765 AND `groupid`=0 AND `id`=13) OR (`entry`=36765 AND `groupid`=0 AND `id`=14) OR (`entry`=36765 AND `groupid`=0 AND `id`=15) OR (`entry`=36765 AND `groupid`=0 AND `id`=16) OR (`entry`=36765 AND `groupid`=0 AND `id`=17) OR (`entry`=36765 AND `groupid`=0 AND `id`=18) OR (`entry`=36765 AND `groupid`=0 AND `id`=19) OR (`entry`=36765 AND `groupid`=0 AND `id`=20) OR (`entry`=36765 AND `groupid`=0 AND `id`=21) OR (`entry`=36765 AND `groupid`=0 AND `id`=22) OR (`entry`=36765 AND `groupid`=0 AND `id`=23) OR (`entry`=36765 AND `groupid`=0 AND `id`=24) OR (`entry`=36766 AND `groupid`=0 AND `id`=5) OR (`entry`=36766 AND `groupid`=0 AND `id`=6) OR (`entry`=36766 AND `groupid`=0 AND `id`=7) OR (`entry`=36766 AND `groupid`=0 AND `id`=8) OR (`entry`=36766 AND `groupid`=0 AND `id`=9) OR (`entry`=36766 AND `groupid`=0 AND `id`=10) OR (`entry`=36766 AND `groupid`=0 AND `id`=11) OR (`entry`=36766 AND `groupid`=0 AND `id`=12) OR (`entry`=36766 AND `groupid`=0 AND `id`=13) OR (`entry`=36766 AND `groupid`=0 AND `id`=14) OR (`entry`=36766 AND `groupid`=0 AND `id`=15) OR (`entry`=36766 AND `groupid`=0 AND `id`=16) OR (`entry`=36766 AND `groupid`=0 AND `id`=17) OR (`entry`=36766 AND `groupid`=0 AND `id`=18) OR (`entry`=36766 AND `groupid`=0 AND `id`=19) OR (`entry`=36766 AND `groupid`=0 AND `id`=20) OR (`entry`=36766 AND `groupid`=0 AND `id`=21) OR (`entry`=36766 AND `groupid`=0 AND `id`=22) OR (`entry`=36766 AND `groupid`=0 AND `id`=23) OR (`entry`=36766 AND `groupid`=0 AND `id`=24) OR (`entry`=36767 AND `groupid`=0 AND `id`=5) OR (`entry`=36767 AND `groupid`=0 AND `id`=6) OR (`entry`=36767 AND `groupid`=0 AND `id`=7) OR (`entry`=36767 AND `groupid`=0 AND `id`=8) OR (`entry`=36767 AND `groupid`=0 AND `id`=9) OR (`entry`=36767 AND `groupid`=0 AND `id`=10) OR (`entry`=36767 AND `groupid`=0 AND `id`=11) OR (`entry`=36767 AND `groupid`=0 AND `id`=12) OR (`entry`=36767 AND `groupid`=0 AND `id`=13) OR (`entry`=36767 AND `groupid`=0 AND `id`=14) OR (`entry`=36767 AND `groupid`=0 AND `id`=15) OR (`entry`=36767 AND `groupid`=0 AND `id`=16) OR (`entry`=36767 AND `groupid`=0 AND `id`=17) OR (`entry`=36767 AND `groupid`=0 AND `id`=18) OR (`entry`=36767 AND `groupid`=0 AND `id`=19) OR (`entry`=36767 AND `groupid`=0 AND `id`=20) OR (`entry`=36767 AND `groupid`=0 AND `id`=21) OR (`entry`=36767 AND `groupid`=0 AND `id`=22) OR (`entry`=36767 AND `groupid`=0 AND `id`=23) OR (`entry`=36767 AND `groupid`=0 AND `id`=24) OR (`entry`=36770 AND `groupid`=0 AND `id`=5) OR (`entry`=36770 AND `groupid`=0 AND `id`=6) OR (`entry`=36770 AND `groupid`=0 AND `id`=7) OR (`entry`=36770 AND `groupid`=0 AND `id`=8) OR (`entry`=36770 AND `groupid`=0 AND `id`=9) OR (`entry`=36770 AND `groupid`=0 AND `id`=10) OR (`entry`=36770 AND `groupid`=0 AND `id`=11) OR (`entry`=36770 AND `groupid`=0 AND `id`=12) OR (`entry`=36770 AND `groupid`=0 AND `id`=13) OR (`entry`=36770 AND `groupid`=0 AND `id`=14) OR (`entry`=36770 AND `groupid`=0 AND `id`=15) OR (`entry`=36770 AND `groupid`=0 AND `id`=16) OR (`entry`=36770 AND `groupid`=0 AND `id`=17) OR (`entry`=36770 AND `groupid`=0 AND `id`=18) OR (`entry`=36770 AND `groupid`=0 AND `id`=19) OR (`entry`=36770 AND `groupid`=0 AND `id`=20) OR (`entry`=36770 AND `groupid`=0 AND `id`=21) OR (`entry`=36770 AND `groupid`=0 AND `id`=22) OR (`entry`=36770 AND `groupid`=0 AND `id`=23) OR (`entry`=36770 AND `groupid`=0 AND `id`=24) OR (`entry`=36771 AND `groupid`=0 AND `id`=5) OR (`entry`=36771 AND `groupid`=0 AND `id`=6) OR (`entry`=36771 AND `groupid`=0 AND `id`=7) OR (`entry`=36771 AND `groupid`=0 AND `id`=8) OR (`entry`=36771 AND `groupid`=0 AND `id`=9) OR (`entry`=36771 AND `groupid`=0 AND `id`=10) OR (`entry`=36771 AND `groupid`=0 AND `id`=11) OR (`entry`=36771 AND `groupid`=0 AND `id`=12) OR (`entry`=36771 AND `groupid`=0 AND `id`=13) OR (`entry`=36771 AND `groupid`=0 AND `id`=14) OR (`entry`=36771 AND `groupid`=0 AND `id`=15) OR (`entry`=36771 AND `groupid`=0 AND `id`=16) OR (`entry`=36771 AND `groupid`=0 AND `id`=17) OR (`entry`=36771 AND `groupid`=0 AND `id`=18) OR (`entry`=36771 AND `groupid`=0 AND `id`=19) OR (`entry`=36771 AND `groupid`=0 AND `id`=20) OR (`entry`=36771 AND `groupid`=0 AND `id`=21) OR (`entry`=36771 AND `groupid`=0 AND `id`=22) OR (`entry`=36771 AND `groupid`=0 AND `id`=23) OR (`entry`=36771 AND `groupid`=0 AND `id`=24) OR (`entry`=36772 AND `groupid`=0 AND `id`=5) OR (`entry`=36772 AND `groupid`=0 AND `id`=6) OR (`entry`=36772 AND `groupid`=0 AND `id`=7) OR (`entry`=36772 AND `groupid`=0 AND `id`=8) OR (`entry`=36772 AND `groupid`=0 AND `id`=9) OR (`entry`=36772 AND `groupid`=0 AND `id`=10) OR (`entry`=36772 AND `groupid`=0 AND `id`=11) OR (`entry`=36772 AND `groupid`=0 AND `id`=12) OR (`entry`=36772 AND `groupid`=0 AND `id`=13) OR (`entry`=36772 AND `groupid`=0 AND `id`=14) OR (`entry`=36772 AND `groupid`=0 AND `id`=15) OR (`entry`=36772 AND `groupid`=0 AND `id`=16) OR (`entry`=36772 AND `groupid`=0 AND `id`=17) OR (`entry`=36772 AND `groupid`=0 AND `id`=18) OR (`entry`=36772 AND `groupid`=0 AND `id`=19) OR (`entry`=36772 AND `groupid`=0 AND `id`=20) OR (`entry`=36772 AND `groupid`=0 AND `id`=21) OR (`entry`=36772 AND `groupid`=0 AND `id`=22) OR (`entry`=36772 AND `groupid`=0 AND `id`=23) OR (`entry`=36772 AND `groupid`=0 AND `id`=24) OR (`entry`=36773 AND `groupid`=0 AND `id`=5) OR (`entry`=36773 AND `groupid`=0 AND `id`=6) OR (`entry`=36773 AND `groupid`=0 AND `id`=7) OR (`entry`=36773 AND `groupid`=0 AND `id`=8) OR (`entry`=36773 AND `groupid`=0 AND `id`=9) OR (`entry`=36773 AND `groupid`=0 AND `id`=10) OR (`entry`=36773 AND `groupid`=0 AND `id`=11) OR (`entry`=36773 AND `groupid`=0 AND `id`=12) OR (`entry`=36773 AND `groupid`=0 AND `id`=13) OR (`entry`=36773 AND `groupid`=0 AND `id`=14) OR (`entry`=36773 AND `groupid`=0 AND `id`=15) OR (`entry`=36773 AND `groupid`=0 AND `id`=16) OR (`entry`=36773 AND `groupid`=0 AND `id`=17) OR (`entry`=36773 AND `groupid`=0 AND `id`=18) OR (`entry`=36773 AND `groupid`=0 AND `id`=19) OR (`entry`=36773 AND `groupid`=0 AND `id`=20) OR (`entry`=36773 AND `groupid`=0 AND `id`=21) OR (`entry`=36773 AND `groupid`=0 AND `id`=22) OR (`entry`=36773 AND `groupid`=0 AND `id`=23) OR (`entry`=36773 AND `groupid`=0 AND `id`=24) OR (`entry`=36913 AND `groupid`=0 AND `id`=7);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `probability`, `sound`, `BroadcastTextId`, `comment`) VALUES
+(315, 0, 2, 'Tilloa is that you? Why no! It''s just some dirty $r!', 12, 100, 0, 507, 'Stalvan Mistmantle - On Aggro'),
+
+(706, 0, 3, 'My weapon be thirsty!', 12, 100, 0, 1908, 'Frostmane Troll Whelp - On Aggro'),
+
+(1398, 0, 3, 'The Stonesplinter Tribe shall see to your doom!', 12, 100, 0, 445, 'Boss Galgosh - On Aggro'),
+(1398, 0, 4, 'Die, $R! These lands belong to the Stonesplinter Tribe!', 12, 100, 0, 446, 'Boss Galgosh - On Aggro'),
+(1398, 0, 5, 'The Loch belongs to the Stonesplinter Tribe now, $n! Now die!', 12, 100, 0, 448, 'Boss Galgosh - On Aggro'),
+
+(1399, 0, 3, 'A $C called $n? You''ll make a fine breakfast!', 12, 100, 0, 444, 'Magosh - on Aggro'),
+(1399, 0, 4, 'The Stonesplinter Tribe shall see to your doom!', 12, 100, 0, 445, 'Magosh - on Aggro'),
+(1399, 0, 5, 'The only good $R is a dead $R!', 12, 100, 0, 447, 'Magosh - on Aggro'),
+
+(1410, 0, 2, 'Kill them before they get away!', 12, 100, 0, 16250, 'Firewing Bloodwarder - On Aggro'),
+(1410, 0, 3, 'You know too much!', 12, 100, 0, 16251, 'Firewing Bloodwarder - On Aggro'),
+(1410, 0, 4, 'For Kael''thas!', 12, 100, 0, 16252, 'Firewing Bloodwarder - On Aggro'),
+(1410, 0, 5, 'They mustn''t escape!', 12, 100, 0, 16253, 'Firewing Bloodwarder - On Aggro'),
+
+(1493, 0, 0, 'YOU WERE SUCH GOOD SPORT THE LAST TIME...COME OUT!', 14, 100, 0, 772, 'Mok''rash'),
+(1493, 0, 6, 'SMOTTS!', 14, 100, 0, 773, 'Mok''rash'),
+(1493, 0, 7, 'DON''T YOU WANT TO FIGHT, SMOTTS!?', 14, 100, 0, 776, 'Mok''rash'),
+
+(1719, 0, 3, 'What am I going to do?', 12, 100, 0, 1658, 'Warden Thelwater'),
+(1719, 0, 4, 'How could this happen?', 12, 100, 0, 1660, 'Warden Thelwater'),
+
+(1976, 0, 3, 'You dare spill blood on neutral ground? OUT! OUT, I SAY!', 12, 100, 0, 10948, 'Stormwind City Patroller - On Aggro'),
+(1976, 0, 4, 'We don''t take kindly to miscreants, $r.', 12, 100, 0, 10949, 'Stormwind City Patroller - On Aggro'),
+(1976, 0, 5, 'Get a rope!', 12, 100, 0, 10952, 'Stormwind City Patroller - On Aggro'),
+(1976, 0, 6, 'Believe me when I tell you this: You''re gonna wish you weren''t born, sissy!', 12, 100, 0, 10954, 'Stormwind City Patroller - On Aggro'),
+(1976, 0, 7, 'Your actions shame us all, $c. I hurt inside as I beat you senseless.', 12, 100, 0, 10955, 'Stormwind City Patroller - On Aggro'),
+
+(2044, 0, 2, 'Let the legend of Stalvan rest!', 12, 100, 0, 503, 'Forlorn Spirit'),
+
+(2396, 0, 2, 'My trees.... they have withered up and died just like me.', 12, 100, 0, 614, 'Hans Zandin'),
+
+(2922, 0, 3, 'I am well versed in over 4 languages.', 12, 100, 0, 898, 'Servo'),
+(2922, 0, 4, 'Master, where have all the trees gone?', 12, 100, 0, 900, 'Servo'),
+
+(3218, 0, 3, 'You dare spill blood on neutral ground? OUT! OUT, I SAY!', 12, 100, 0, 10948, 'Brave Swiftwind - On Aggro'),
+(3218, 0, 4, 'We don''t take kindly to miscreants, $r.', 12, 100, 0, 10949, 'Brave Swiftwind - On Aggro'),
+(3218, 0, 5, 'Get a rope!', 12, 100, 0, 10952, 'Brave Swiftwind - On Aggro'),
+(3218, 0, 6, 'Believe me when I tell you this: You''re gonna wish you weren''t born, sissy!', 12, 100, 0, 10954, 'Brave Swiftwind - On Aggro'),
+(3218, 0, 7, 'Your actions shame us all, $c. I hurt inside as I beat you senseless.', 12, 100, 0, 10955, 'Brave Swiftwind - On Aggro'),
+
+(3296, 0, 3, 'You dare spill blood on neutral ground? OUT! OUT, I SAY!', 12, 100, 0, 10948, 'Orgrimmar Grunt - On Aggro'),
+(3296, 0, 4, 'We don''t take kindly to miscreants, $r.', 12, 100, 0, 10949, 'Orgrimmar Grunt - On Aggro'),
+(3296, 0, 5, 'Get a rope!', 12, 100, 0, 10952, 'Orgrimmar Grunt - On Aggro'),
+(3296, 0, 6, 'Believe me when I tell you this: You''re gonna wish you weren''t born, sissy!', 12, 100, 0, 10954, 'Orgrimmar Grunt - On Aggro'),
+(3296, 0, 7, 'Your actions shame us all, $c. I hurt inside as I beat you senseless.', 12, 100, 0, 10955, 'Orgrimmar Grunt - On Aggro'),
+
+(3502, 0, 3, 'You dare spill blood on neutral ground? OUT! OUT, I SAY!', 12, 100, 0, 10948, 'Ratchet Bruiser - On Aggro'),
+(3502, 0, 4, 'We don''t take kindly to miscreants, $r.', 12, 100, 0, 10949, 'Ratchet Bruiser - On Aggro'),
+(3502, 0, 5, 'Get a rope!', 12, 100, 0, 10952, 'Ratchet Bruiser - On Aggro'),
+(3502, 0, 6, 'Believe me when I tell you this: You''re gonna wish you weren''t born, sissy!', 12, 100, 0, 10954, 'Ratchet Bruiser - On Aggro'),
+(3502, 0, 7, 'Your actions shame us all, $c. I hurt inside as I beat you senseless.', 12, 100, 0, 10955, 'Ratchet Bruiser - On Aggro'),
+
+(3504, 0, 3, 'Why are we goin'' this way?', 12, 100, 0, 1093, 'Gil'),
+(3504, 1, 3, 'I need to pee.', 12, 100, 0, 1095, 'Gil'),
+
+(3518, 0, 2, 'Warm, wholesome bread!', 12, 100, 0, 1102, 'Thomas Miller'),
+(3518, 0, 3, 'Rolls, buns and bread. Baked fresh!', 12, 100, 0, 1103, 'Thomas Miller'),
+
+(3520, 0, 3, 'One of these days I''m gonna drown him in that blue robe. And all his brooms too.', 12, 100, 0, 1109, 'Ol'' Emma'),
+(3520, 1, 3, 'Deja vu. For a moment, I thought I was back home... before the plague...', 12, 100, 0, 1112, 'Ol'' Emma'),
+
+(4624, 0, 3, 'You dare spill blood on neutral ground? OUT! OUT, I SAY!', 12, 100, 0, 10948, 'Booty Bay Bruiser - On Aggro'),
+(4624, 0, 4, 'We don''t take kindly to miscreants, $r.', 12, 100, 0, 10949, 'Booty Bay Bruiser - On Aggro'),
+(4624, 0, 5, 'Get a rope!', 12, 100, 0, 10952, 'Booty Bay Bruiser - On Aggro'),
+(4624, 0, 6, 'Believe me when I tell you this: You''re gonna wish you weren''t born, sissy!', 12, 100, 0, 10954, 'Booty Bay Bruiser - On Aggro'),
+(4624, 0, 7, 'Your actions shame us all, $c. I hurt inside as I beat you senseless.', 12, 100, 0, 10955, 'Booty Bay Bruiser - On Aggro'),
+
+(4979, 2, 3, 'That''s the funniest thing I''ve read in a long time. You''ve just made my day!', 12, 100, 0, 22114, 'Theramore Guard'),
+
+(5355, 0, 0, 'Kill them before they get away!', 12, 100, 0, 16250, 'Firewing Defender - On Aggro'),
+(5355, 0, 1, 'For Kael''thas!', 12, 100, 0, 16252, 'Firewing Defender - On Aggro'),
+(5355, 0, 4, 'They mustn''t escape!', 12, 100, 0, 16253, 'Firewing Defender - On Aggro'),
+(5355, 0, 5, 'I will have your energy and then your life!', 12, 100, 0, 16254, 'Firewing Defender - On Aggro'),
+
+(5391, 0, 1, 'I''m glad you''re here! Because I need your help!!', 12, 100, 0, 1631, 'Galen Goodward'),
+(5391, 2, 2, 'Help! The beast is on me!', 12, 100, 0, 1630, 'Galen Goodward'),
+
+(5662, 0, 8, 'Can you see yourselves? That is the most pathetic excuse for sword slinging I''ve ever seen! ', 12, 100, 0, 1965, 'Sergeant Houser'),
+
+(5698, 0, 8, 'Impressive, very impressive. Does she do tricks?', 12, 100, 0, 2020, 'Joanna Whitehall'),
+
+(5699, 0, 5, 'Astounding. You managed to dominate her, yet she retains self awareness and function. How did you do it?', 12, 100, 0, 2015, 'Leona Tharpe'),
+
+(5955, 0, 2, 'Do we have much further to go?', 12, 100, 0, 2221, 'Tooga'),
+(5955, 0, 3, 'Are we there yet?', 12, 100, 0, 2223, 'Tooga'),
+(5955, 0, 4, 'I keep getting sand stuck in my toes.', 12, 100, 0, 2224, 'Tooga'),
+(5955, 0, 5, 'How much further to go?', 12, 100, 0, 2225, 'Tooga'),
+(5955, 0, 6, 'I wish you could just pick me up and carry me.', 12, 100, 0, 2226, 'Tooga'),
+(5955, 0, 7, 'Have you heard the one about the ogre, the goblin and the pit lord?', 12, 100, 0, 2227, 'Tooga'),
+
+(10541, 0, 3, 'Holy Krakle! The temperature is 428,000 degrees Kraklenheit! ', 12, 100, 0, 5763, 'Krakle''s Thermometer'),
+(10541, 1, 3, 'The temperature is 564 degrees Kraklenheit.', 12, 100, 0, 5765, 'Krakle''s Thermometer'),
+(10541, 1, 4, 'The temperature is 12 degrees Kraklenheit. How exciting.', 12, 100, 0, 5767, 'Krakle''s Thermometer'),
+(10541, 1, 5, '18 degrees Kraklenheit. It''s kind of cold, actually...', 12, 100, 0, 6009, 'Krakle''s Thermometer'),
+(10541, 1, 6, 'It''s 40 degrees Kraklenheit. Can you feel the heat? No? I really couldn''t either.', 12, 100, 0, 6010, 'Krakle''s Thermometer'),
+
+(10799, 0, 3, '%s whimpers.', 12, 100, 0, 6101, 'Warosh'),
+
+(11136, 0, 2, 'FREE!!!', 12, 100, 0, 6451, 'Freed Soul'),
+(11136, 0, 3, 'The curse ends!', 12, 100, 0, 6452, 'Freed Soul'),
+(11136, 0, 4, 'May Kel''Thuzad one day feel our vengeance.', 12, 100, 0, 6454, 'Freed Soul'),
+
+(11190, 0, 3, 'You dare spill blood on neutral ground? OUT! OUT, I SAY!', 12, 100, 0, 10948, 'Everlook Bruiser - On Aggro'),
+(11190, 0, 4, 'We don''t take kindly to miscreants, $r.', 12, 100, 0, 10949, 'Everlook Bruiser - On Aggro'),
+(11190, 0, 5, 'Get a rope!', 12, 100, 0, 10952, 'Everlook Bruiser - On Aggro'),
+(11190, 0, 6, 'Believe me when I tell you this: You''re gonna wish you weren''t born, sissy!', 12, 100, 0, 10954, 'Everlook Bruiser - On Aggro'),
+(11190, 0, 7, 'Your actions shame us all, $c. I hurt inside as I beat you senseless.', 12, 100, 0, 10955, 'Everlook Bruiser - On Aggro'),
+
+(11582, 0, 3, 'Note the weak binding structure of this one. Be sure to finish your incantations or this is what you will end up with.', 12, 100, 0, 5951, 'Scholomance Dark Summoner'),
+(11582, 0, 4, 'Wow, this one is just plain useless. Let me try again.', 12, 100, 0, 5953, 'Scholomance Dark Summoner'),
+
+(12337, 0, 3, 'These orders must get to High General Abbendis!', 12, 100, 0, 7598, 'Crimson Courier'),
+
+(15184, 0, 3, 'You dare spill blood on neutral ground? OUT! OUT, I SAY!', 12, 100, 0, 10948, 'Cenarion Hold Infantry - On Aggro'),
+(15184, 0, 4, 'We don''t take kindly to miscreants, $r.', 12, 100, 0, 10949, 'Cenarion Hold Infantry - On Aggro'),
+(15184, 0, 5, 'Get a rope!', 12, 100, 0, 10952, 'Cenarion Hold Infantry - On Aggro'),
+(15184, 0, 6, 'Believe me when I tell you this: You''re gonna wish you weren''t born, sissy!', 12, 100, 0, 10954, 'Cenarion Hold Infantry - On Aggro'),
+(15184, 0, 7, 'Your actions shame us all, $c. I hurt inside as I beat you senseless.', 12, 100, 0, 10955, 'Cenarion Hold Infantry - On Aggro'),
+
+(17259, 0, 3, 'For Kargath! For Victory!', 12, 100, 0, 16698, 'Bonechewer Hungerer - On Aggro'),
+(17259, 0, 4, 'Gakarah ma!', 12, 100, 0, 16699, 'Bonechewer Hungerer - On Aggro'),
+(17259, 0, 5, 'Lok''tar Illadari!\n', 12, 100, 0, 16701, 'Bonechewer Hungerer - On Aggro'),
+(17259, 0, 6, 'Lok narash!', 12, 100, 0, 16703, 'Bonechewer Hungerer - On Aggro'),
+
+(17271, 0, 3, 'Gakarah ma!', 12, 100, 0, 16699, 'Bonechewer Destroyer - On Aggro'),
+(17271, 0, 4, 'Lok''tar Illadari!\n', 12, 100, 0, 16701, 'Bonechewer Destroyer - On Aggro'),
+(17271, 0, 5, 'This world is OURS!', 12, 100, 0, 16702, 'Bonechewer Destroyer - On Aggro'),
+(17271, 0, 6, 'Lok narash!', 12, 100, 0, 16703, 'Bonechewer Destroyer - On Aggro'),
+
+(17491, 0, 2, 'For Kargath! For Victory!', 12, 100, 0, 16698, 'Laughing Skull Rogue - On Aggro'),
+(17491, 0, 3, 'The blood is our power! ', 12, 100, 0, 16700, 'Laughing Skull Rogue - On Aggro'),
+(17491, 0, 4, 'Lok''tar Illadari!\n', 12, 100, 0,16701 , 'Laughing Skull Rogue - On Aggro'),
+(17491, 0, 5, 'This world is OURS!', 12, 100, 0, 16702, 'Laughing Skull Rogue - On Aggro'),
+(17491, 0, 6, 'Lok narash!', 12, 100, 0, 16703, 'Laughing Skull Rogue - On Aggro'),
+
+(18103, 0, 2, 'Happiness is mandatory, citizen.', 12, 100, 0, 14782, 'Arcane Guardian - Random Talk'),
+(18103, 0, 3, 'Remain strong. Kael''thas will - error - Lor''themar will lead you to power and glory!', 12, 100, 0, 14784, 'Arcane Guardian - Random Talk'),
+(18103, 0, 4, 'Do not disturb the serenity of the city. Peace must be upheld.', 12, 100, 0, 14785, 'Arcane Guardian - Random Talk'),
+
+(19283, 0, 3, 'Any spare copper?', 12, 100, 0, 16614, 'Vagrant - Random Talk'),
+
+(21114, 0, 6, 'This is going to hurt in the morning.', 12, 100, 0, 18797, 'Station Technician - On Burning'),
+
+(21661, 1, 3, 'Ruin finds us all!', 12, 100, 0, 16798, 'Cabal Skirmisher'),
+(21661, 1, 4, 'In Sargeras'' name!', 12, 100, 0, 16799, 'Cabal Skirmisher'),
+(21661, 1, 5, 'I do as I must!', 12, 100, 0, 16801, 'Cabal Skirmisher'),
+(21661, 1, 6, 'The Legion reigns!', 12, 100, 0, 16802, 'Cabal Skirmisher'),
+(21661, 1, 7, 'You''ll go nowhere, fool!', 12, 100, 0, 20164, 'Cabal Skirmisher'),
+
+(22314, 0, 4, 'Yay! We love you! You saved us!', 12, 100, 0, 20111, 'Captive Child'),
+
+(23311, 0, 7, 'Hey... me not feel so good.', 12, 100, 0, 21122, 'Disobedient Dragonmaw Peon - On Script Action'),
+
+(23861, 0, 7, 'It is too late for Jarl... its hold is too strong...', 12, 100, 0, 22366, 'Restless Apparition - On Script Action'),
+
+(25428, 0, 3, 'Grr... na su ka Magmoth!', 12, 100, 0, 24651, 'Magmoth Shaman - On Aggro'),
+
+(25429, 0, 3, 'Grr... na su ka Magmoth!', 12, 100, 0, 24651, 'Magmoth Forager - On Aggro'),
+
+(25682, 0, 1, 'Die!', 12, 100, 0, 24874, 'Lich-Lord Chillwinter - On Aggro'),
+(25682, 0, 2, 'Filthy breather!', 12, 100, 0, 24876, 'Lich-Lord Chillwinter - On Aggro'),
+
+(28608, 0, 3, 'Scourge filth! DIE!', 12, 100, 0, 28597, 'Scarlet Medic - On Aggro'),
+(28608, 0, 4, 'I will present your head to Abbendis myself!', 12, 100, 0, 28599, 'Scarlet Medic - On Aggro'),
+(28608, 0, 5, 'By the Light be cleansed!', 12, 100, 0, 28602, 'Scarlet Medic - On Aggro'),
+(28608, 0, 6, 'Light bless you, my child.', 12, 100, 0, 28603, 'Scarlet Medic - On Aggro'),
+
+(28609, 0, 3, 'Scourge filth! DIE!', 12, 100, 0, 28597, 'Scarlet Infantryman - On Aggro'),
+(28609, 0, 4, 'I will present your head to Abbendis myself!', 12, 100, 0, 28599, 'Scarlet Infantryman - On Aggro'),
+(28609, 0, 5, 'By the Light be cleansed!', 12, 100, 0, 28602, 'Scarlet Infantryman - On Aggro'),
+(28609, 0, 6, 'Light bless you, my child.', 12, 100, 0, 28603, 'Scarlet Infantryman - On Aggro'),
+
+(28611, 0, 3, 'Scourge filth! DIE!', 12, 100, 0, 28597, 'Scarlet Captain - On Aggro'),
+(28611, 0, 4, 'I will present your head to Abbendis myself!', 12, 100, 0, 28599, 'Scarlet Captain - On Aggro'),
+(28611, 0, 5, 'By the Light be cleansed!', 12, 100, 0, 28602, 'Scarlet Captain - On Aggro'),
+(28611, 0, 6, 'Light bless you, my child.', 12, 100, 0, 28603, 'Scarlet Captain - On Aggro'),
+
+(28714, 0, 3, 'Welcome!', 12, 100, 0, 32807, 'Ildine Sorrowspear - Player In Range'),
+(28714, 0, 4, 'Greetings, $c.', 12, 100, 0, 32808, 'Ildine Sorrowspear - Player In Range'),
+(28714, 0, 5, 'Greetings! Please have a look around.', 12, 100, 0, 32809, 'Ildine Sorrowspear - Player In Range'),
+(28714, 0, 6, 'Welcome. May I help you find something?', 12, 100, 0, 32811, 'Ildine Sorrowspear - Player In Range'),
+
+(28715, 0, 3, 'Let me know if you need help finding anything, $c.', 12, 100, 0, 32810, 'Endora Moorehead - Player In Range'),
+(28715, 0, 4, 'Welcome. May I help you find something?', 12, 100, 0, 32811, 'Endora Moorehead - Player In Range'),
+(28715, 0, 5, 'Greetings.', 12, 100, 0, 32935, 'Endora Moorehead - Player In Range'),
+(28715, 0, 6, 'Welcome.', 12, 100, 0, 32936, 'Endora Moorehead - Player In Range'),
+
+(28721, 0, 6, 'Welcome!', 12, 100, 0, 32807, 'Tiffany Cartier - Player In Range'),
+
+(28723, 0, 3, 'Welcome!', 12, 100, 0, 32807, 'Larana Drome - Player In Range'),
+(28723, 0, 4, 'Greetings! Please have a look around.', 12, 100, 0, 32809, 'Larana Drome - Player In Range'),
+(28723, 0, 5, 'Let me know if you need help finding anything, $c.', 12, 100, 0, 32810, 'Larana Drome - Player In Range'),
+(28723, 0, 6, 'Welcome. May I help you find something?', 12, 100, 0, 32811, 'Larana Drome - Player In Range'),
+
+(28725, 0, 4, 'Greetings, $c.', 12, 100, 0, 32808, 'Patricia Egan - Player In Range'),
+(28725, 0, 5, 'Let me know if you need help finding anything, $c.', 12, 100, 0, 32810, 'Patricia Egan - Player In Range'),
+(28725, 0, 6, 'Greetings.', 12, 100, 0, 32935, 'Patricia Egan - Player In Range'),
+
+(28726, 0, 6, 'Welcome.', 12, 100, 0, 32936, 'Dominique Stefano - Player In Range'),
+
+(28727, 0, 4, 'Greetings, $c.', 12, 100, 0, 32808, 'Edward Egan - Player In Range'),
+(28727, 0, 5, 'Let me know if you need help finding anything, $c.', 12, 100, 0, 32810, 'Edward Egan - Player In Range'),
+(28727, 0, 6, 'Welcome.', 12, 100, 0, 32936, 'Edward Egan - Player In Range'),
+
+(28750, 0, 0, 'Rmmurphum mmph hmrphum!', 12, 100, 0, 28657, 'Blight Geist'),
+(28750, 0, 3, 'Umphrum mmphur, murruphru...', 12, 100, 0, 28658, 'Blight Geist'),
+
+(28989, 0, 6, 'Welcome!', 12, 100, 0, 32807, 'Aemara - Player In Range'),
+
+(28994, 0, 4, 'Welcome!', 12, 100, 0, 32807, 'Abra Cadabra - Player In Range'),
+(28994, 0, 5, 'Greetings, $c.', 12, 100, 0, 32808, 'Abra Cadabra - Player In Range'),
+(28994, 0, 6, 'Greetings! Please have a look around.', 12, 100, 0, 32809, 'Abra Cadabra - Player In Range'),
+
+(28997, 0, 4, 'Greetings! Please have a look around.', 12, 100, 0, 32809, 'Griselda Hunderland - Player In Range'),
+(28997, 0, 5, 'Welcome. May I help you find something?', 12, 100, 0, 32811, 'Griselda Hunderland - Player In Range'),
+(28997, 0, 6, 'Welcome.', 12, 100, 0, 32936, 'Griselda Hunderland - Player In Range'),
+
+(29647, 1, 4, 'How long do you think this cage can hold me, fiends!', 12, 100, 0, 30497, 'Gymer - In Cage'),
+
+(29686, 0, 3, 'TROLL MAKE ME ANGRY!', 12, 100, 0, 30371, 'Captured Rageclaw'),
+(29686, 0, 4, 'Rageclaw free! Troll die now!', 12, 100, 0, 30396, 'Captured Rageclaw'),
+(29686, 0, 5, 'Revenge for Rageclaw!', 12, 100, 0, 30399, 'Captured Rageclaw'),
+(29686, 0, 6, 'This mean war!', 12, 100, 0, 30401, 'Captured Rageclaw'),
+
+(29884, 1, 8, 'LET THE STORM''S FURY CONSUME YOU!', 14, 100, 0, 30588, 'Gymer'),
+(29884, 1, 9, 'NO ESCAPE FOR THE WICKED!', 14, 100, 0, 30589, 'Gymer'),
+(29884, 1, 10, 'IT IS THE WRATH OF THE STORM KING!', 14, 100, 0, 30592, 'Gymer'),
+
+(29491, 0, 2, 'Welcome!', 12, 100, 0, 32807, 'Karandonna - Player In Range'),
+(29491, 0, 3, 'Greetings, $c.', 12, 100, 0, 32808, 'Karandonna - Player In Range'),
+(29491, 0, 4, 'Greetings! Please have a look around.', 12, 100, 0, 32809, 'Karandonna - Player In Range'),
+(29491, 0, 5, 'Let me know if you need help finding anything, $c.', 12, 100, 0, 32810, 'Karandonna - Player In Range'),
+(29491, 0, 6, 'Greetings.', 12, 100, 0, 32935, 'Karandonna - Player In Range'),
+
+(29523, 0, 4, 'Greetings, $c.', 12, 100, 0, 32808, 'Bragund Brightlink - Player In Range'),
+(29523, 0, 5, 'Welcome. May I help you find something?', 12, 100, 0, 32811, 'Bragund Brightlink - Player In Range'),
+(29523, 0, 6, 'Greetings.', 12, 100, 0, 32935, 'Bragund Brightlink - Player In Range'),
+
+(30012, 0, 4, 'I''m not afraid of anything -- bring it on!', 12, 100, 0, 30807, 'Victorious Challenger'),
+
+(31397, 0, 5, 'I won''t leave!', 12, 100, 0, 32469, 'Saronite Mine Slave'),
+(31397, 0, 6, 'I''ll never return. The whole reason for my existence awaits below!', 12, 100, 0, 32472, 'Saronite Mine Slave'),
+(31397, 0, 7, 'I must get further underground to where he is. I must jump!', 12, 100, 0, 32474, 'Saronite Mine Slave'),
+
+(33027, 0, 5, 'Welcome!', 12, 100, 0, 32807, 'Jessica Sellers'),
+(33027, 0, 6, 'Greetings.', 12, 100, 0, 32935, 'Jessica Sellers'),
+
+(33853, 0, 3, 'Show support for your favorite champion! Wear their colors at the next bout and let ''em know who you love!', 12, 100, 0, 33834, ''),
+
+(36764, 0, 5, 'I''d almost given up hope.', 12, 100, 0, 37079, 'Alliance Slave - On Liberation'),
+(36764, 0, 6, 'I thought I might die in this pit. Thank you!', 12, 100, 0, 37262, 'Alliance Slave - On Liberation'),
+(36764, 0, 7, 'Don''t let a single one of them live.', 12, 100, 0, 37264, 'Alliance Slave - On Liberation'),
+(36764, 0, 8, 'Please, carry out our vengeance on the Scourgelord.', 12, 100, 0, 37265, 'Alliance Slave - On Liberation'),
+(36764, 0, 9, 'When you kill the Pit Master, spit on his corpse for me, will you?', 12, 100, 0, 37266, 'Alliance Slave - On Liberation'),
+(36764, 0, 10, 'I''d lost all track of time in this forsaken place. You''re a sight for sore eyes, friend.', 12, 100, 0, 37268, 'Alliance Slave - On Liberation'),
+(36764, 0, 11, 'Too many of us died in this pit. Far too many.', 12, 100, 0, 37270, 'Alliance Slave - On Liberation'),
+(36764, 0, 12, 'I''m so glad you''re here. I wouldn''t have made it much longer.', 12, 100, 0, 37271, 'Alliance Slave - On Liberation'),
+(36764, 0, 13, 'Now is the time for revenge.', 12, 100, 0, 37273, 'Alliance Slave - On Liberation'),
+(36764, 0, 14, 'You deserve a mighty man-hug.', 12, 100, 0, 37274, 'Alliance Slave - On Liberation'),
+(36764, 0, 15, 'I will find a way to repay you someday, hero.', 12, 100, 0, 37275, 'Alliance Slave - On Liberation'),
+(36764, 0, 16, 'I can hardly believe my eyes. Thank you. Really, thank you.', 12, 100, 0, 37276, 'Alliance Slave - On Liberation'),
+(36764, 0, 17, '%s nods his thanks.', 16, 100, 0, 37277, 'Alliance Slave - On Liberation'),
+(36764, 0, 18, '%s offers an appreciative smile.', 16, 100, 0, 37278, 'Alliance Slave - On Liberation'),
+(36764, 0, 19, '%s almost collapses as he stumbles towards you.', 16, 100, 0, 37279, 'Alliance Slave - On Liberation'),
+(36764, 0, 20, '%s stares at you for a moment, clearly finding it hard to believe that you''re real.', 16, 100, 0, 37280, 'Alliance Slave - On Liberation'),
+(36764, 0, 21, '%s offers a quick, cynical laugh at his fortune.', 16, 100, 0, 37281, 'Alliance Slave - On Liberation'),
+(36764, 0, 22, '%s raises an empty hand in toast to you.', 16, 100, 0, 37282, 'Alliance Slave - On Liberation'),
+(36764, 0, 23, '%s closes his eyes, savoring freedom for a moment.', 16, 100, 0, 37283, 'Alliance Slave - On Liberation'),
+(36764, 0, 24, 'I''m going to return to help free the rest of the slaves. Thank you again, hero.', 16, 100, 0, 37293, 'Alliance Slave - On Liberation'),
+
+(36765, 0, 5, 'I''d almost given up hope.', 12, 100, 0, 37079, 'Alliance Slave - On Liberation'),
+(36765, 0, 6, 'I thought I might die in this pit. Thank you!', 12, 100, 0, 37262, 'Alliance Slave - On Liberation'),
+(36765, 0, 7, 'Don''t let a single one of them live.', 12, 100, 0, 37264, 'Alliance Slave - On Liberation'),
+(36765, 0, 8, 'Please, carry out our vengeance on the Scourgelord.', 12, 100, 0, 37265, 'Alliance Slave - On Liberation'),
+(36765, 0, 9, 'When you kill the Pit Master, spit on his corpse for me, will you?', 12, 100, 0, 37266, 'Alliance Slave - On Liberation'),
+(36765, 0, 10, 'I''d lost all track of time in this forsaken place. You''re a sight for sore eyes, friend.', 12, 100, 0, 37268, 'Alliance Slave - On Liberation'),
+(36765, 0, 11, 'Too many of us died in this pit. Far too many.', 12, 100, 0, 37270, 'Alliance Slave - On Liberation'),
+(36765, 0, 12, 'I''m so glad you''re here. I wouldn''t have made it much longer.', 12, 100, 0, 37271, 'Alliance Slave - On Liberation'),
+(36765, 0, 13, 'Now is the time for revenge.', 12, 100, 0, 37273, 'Alliance Slave - On Liberation'),
+(36765, 0, 14, 'You deserve a mighty man-hug.', 12, 100, 0, 37274, 'Alliance Slave - On Liberation'),
+(36765, 0, 15, 'I will find a way to repay you someday, hero.', 12, 100, 0, 37275, 'Alliance Slave - On Liberation'),
+(36765, 0, 16, 'I can hardly believe my eyes. Thank you. Really, thank you.', 12, 100, 0, 37276, 'Alliance Slave - On Liberation'),
+(36765, 0, 17, '%s nods his thanks.', 16, 100, 0, 37277, 'Alliance Slave - On Liberation'),
+(36765, 0, 18, '%s offers an appreciative smile.', 16, 100, 0, 37278, 'Alliance Slave - On Liberation'),
+(36765, 0, 19, '%s almost collapses as he stumbles towards you.', 16, 100, 0, 37279, 'Alliance Slave - On Liberation'),
+(36765, 0, 20, '%s stares at you for a moment, clearly finding it hard to believe that you''re real.', 16, 100, 0, 37280, 'Alliance Slave - On Liberation'),
+(36765, 0, 21, '%s offers a quick, cynical laugh at his fortune.', 16, 100, 0, 37281, 'Alliance Slave - On Liberation'),
+(36765, 0, 22, '%s raises an empty hand in toast to you.', 16, 100, 0, 37282, 'Alliance Slave - On Liberation'),
+(36765, 0, 23, '%s closes his eyes, savoring freedom for a moment.', 16, 100, 0, 37283, 'Alliance Slave - On Liberation'),
+(36765, 0, 24, 'I''m going to return to help free the rest of the slaves. Thank you again, hero.', 16, 100, 0, 37293, 'Alliance Slave - On Liberation'),
+
+(36766, 0, 5, 'I''d almost given up hope.', 12, 100, 0, 37079, 'Alliance Slave - On Liberation'),
+(36766, 0, 6, 'I thought I might die in this pit. Thank you!', 12, 100, 0, 37262, 'Alliance Slave - On Liberation'),
+(36766, 0, 7, 'Don''t let a single one of them live.', 12, 100, 0, 37264, 'Alliance Slave - On Liberation'),
+(36766, 0, 8, 'Please, carry out our vengeance on the Scourgelord.', 12, 100, 0, 37265, 'Alliance Slave - On Liberation'),
+(36766, 0, 9, 'When you kill the Pit Master, spit on his corpse for me, will you?', 12, 100, 0, 37266, 'Alliance Slave - On Liberation'),
+(36766, 0, 10, 'I''d lost all track of time in this forsaken place. You''re a sight for sore eyes, friend.', 12, 100, 0, 37268, 'Alliance Slave - On Liberation'),
+(36766, 0, 11, 'Too many of us died in this pit. Far too many.', 12, 100, 0, 37270, 'Alliance Slave - On Liberation'),
+(36766, 0, 12, 'I''m so glad you''re here. I wouldn''t have made it much longer.', 12, 100, 0, 37271, 'Alliance Slave - On Liberation'),
+(36766, 0, 13, 'Now is the time for revenge.', 12, 100, 0, 37273, 'Alliance Slave - On Liberation'),
+(36766, 0, 14, 'You deserve a mighty man-hug.', 12, 100, 0, 37274, 'Alliance Slave - On Liberation'),
+(36766, 0, 15, 'I will find a way to repay you someday, hero.', 12, 100, 0, 37275, 'Alliance Slave - On Liberation'),
+(36766, 0, 16, 'I can hardly believe my eyes. Thank you. Really, thank you.', 12, 100, 0, 37276, 'Alliance Slave - On Liberation'),
+(36766, 0, 17, '%s nods his thanks.', 16, 100, 0, 37277, 'Alliance Slave - On Liberation'),
+(36766, 0, 18, '%s offers an appreciative smile.', 16, 100, 0, 37278, 'Alliance Slave - On Liberation'),
+(36766, 0, 19, '%s almost collapses as he stumbles towards you.', 16, 100, 0, 37279, 'Alliance Slave - On Liberation'),
+(36766, 0, 20, '%s stares at you for a moment, clearly finding it hard to believe that you''re real.', 16, 100, 0, 37280, 'Alliance Slave - On Liberation'),
+(36766, 0, 21, '%s offers a quick, cynical laugh at his fortune.', 16, 100, 0, 37281, 'Alliance Slave - On Liberation'),
+(36766, 0, 22, '%s raises an empty hand in toast to you.', 16, 100, 0, 37282, 'Alliance Slave - On Liberation'),
+(36766, 0, 23, '%s closes his eyes, savoring freedom for a moment.', 16, 100, 0, 37283, 'Alliance Slave - On Liberation'),
+(36766, 0, 24, 'I''m going to return to help free the rest of the slaves. Thank you again, hero.', 16, 100, 0, 37293, 'Alliance Slave - On Liberation'),
+
+(36767, 0, 5, 'I''d almost given up hope.', 12, 100, 0, 37079, 'Alliance Slave - On Liberation'),
+(36767, 0, 6, 'I thought I might die in this pit. Thank you!', 12, 100, 0, 37262, 'Alliance Slave - On Liberation'),
+(36767, 0, 7, 'Don''t let a single one of them live.', 12, 100, 0, 37264, 'Alliance Slave - On Liberation'),
+(36767, 0, 8, 'Please, carry out our vengeance on the Scourgelord.', 12, 100, 0, 37265, 'Alliance Slave - On Liberation'),
+(36767, 0, 9, 'When you kill the Pit Master, spit on his corpse for me, will you?', 12, 100, 0, 37266, 'Alliance Slave - On Liberation'),
+(36767, 0, 10, 'I''d lost all track of time in this forsaken place. You''re a sight for sore eyes, friend.', 12, 100, 0, 37268, 'Alliance Slave - On Liberation'),
+(36767, 0, 11, 'Too many of us died in this pit. Far too many.', 12, 100, 0, 37270, 'Alliance Slave - On Liberation'),
+(36767, 0, 12, 'I''m so glad you''re here. I wouldn''t have made it much longer.', 12, 100, 0, 37271, 'Alliance Slave - On Liberation'),
+(36767, 0, 13, 'Now is the time for revenge.', 12, 100, 0, 37273, 'Alliance Slave - On Liberation'),
+(36767, 0, 14, 'You deserve a mighty man-hug.', 12, 100, 0, 37274, 'Alliance Slave - On Liberation'),
+(36767, 0, 15, 'I will find a way to repay you someday, hero.', 12, 100, 0, 37275, 'Alliance Slave - On Liberation'),
+(36767, 0, 16, 'I can hardly believe my eyes. Thank you. Really, thank you.', 12, 100, 0, 37276, 'Alliance Slave - On Liberation'),
+(36767, 0, 17, '%s nods his thanks.', 16, 100, 0, 37277, 'Alliance Slave - On Liberation'),
+(36767, 0, 18, '%s offers an appreciative smile.', 16, 100, 0, 37278, 'Alliance Slave - On Liberation'),
+(36767, 0, 19, '%s almost collapses as he stumbles towards you.', 16, 100, 0, 37279, 'Alliance Slave - On Liberation'),
+(36767, 0, 20, '%s stares at you for a moment, clearly finding it hard to believe that you''re real.', 16, 100, 0, 37280, 'Alliance Slave - On Liberation'),
+(36767, 0, 21, '%s offers a quick, cynical laugh at his fortune.', 16, 100, 0, 37281, 'Alliance Slave - On Liberation'),
+(36767, 0, 22, '%s raises an empty hand in toast to you.', 16, 100, 0, 37282, 'Alliance Slave - On Liberation'),
+(36767, 0, 23, '%s closes his eyes, savoring freedom for a moment.', 16, 100, 0, 37283, 'Alliance Slave - On Liberation'),
+(36767, 0, 24, 'I''m going to return to help free the rest of the slaves. Thank you again, hero.', 16, 100, 0, 37293, 'Alliance Slave - On Liberation'),
+
+(36770, 0, 5, 'I''d almost given up hope.', 12, 100, 0, 37079, 'Horde Slave - On Liberation'),
+(36770, 0, 6, 'I thought I might die in this pit. Thank you!', 12, 100, 0, 37262, 'Horde Slave - On Liberation'),
+(36770, 0, 7, 'Don''t let a single one of them live.', 12, 100, 0, 37264, 'Horde Slave - On Liberation'),
+(36770, 0, 8, 'Please, carry out our vengeance on the Scourgelord.', 12, 100, 0, 37265, 'Horde Slave - On Liberation'),
+(36770, 0, 9, 'When you kill the Pit Master, spit on his corpse for me, will you?', 12, 100, 0, 37266, 'Horde Slave - On Liberation'),
+(36770, 0, 10, 'I''d lost all track of time in this forsaken place. You''re a sight for sore eyes, friend.', 12, 100, 0, 37268, 'Horde Slave - On Liberation'),
+(36770, 0, 11, 'Too many of us died in this pit. Far too many.', 12, 100, 0, 37270, 'Horde Slave - On Liberation'),
+(36770, 0, 12, 'I''m so glad you''re here. I wouldn''t have made it much longer.', 12, 100, 0, 37271, 'Horde Slave - On Liberation'),
+(36770, 0, 13, 'Now is the time for revenge.', 12, 100, 0, 37273, 'Horde Slave - On Liberation'),
+(36770, 0, 14, 'You deserve a mighty man-hug.', 12, 100, 0, 37274, 'Horde Slave - On Liberation'),
+(36770, 0, 15, 'I will find a way to repay you someday, hero.', 12, 100, 0, 37275, 'Horde Slave - On Liberation'),
+(36770, 0, 16, 'I can hardly believe my eyes. Thank you. Really, thank you.', 12, 100, 0, 37276, 'Horde Slave - On Liberation'),
+(36770, 0, 17, '%s nods his thanks.', 16, 100, 0, 37277, 'Horde Slave - On Liberation'),
+(36770, 0, 18, '%s offers an appreciative smile.', 16, 100, 0, 37278, 'Horde Slave - On Liberation'),
+(36770, 0, 19, '%s almost collapses as he stumbles towards you.', 16, 100, 0, 37279, 'Horde Slave - On Liberation'),
+(36770, 0, 20, '%s stares at you for a moment, clearly finding it hard to believe that you''re real.', 16, 100, 0, 37280, 'Horde Slave - On Liberation'),
+(36770, 0, 21, '%s offers a quick, cynical laugh at his fortune.', 16, 100, 0, 37281, 'Horde Slave - On Liberation'),
+(36770, 0, 22, '%s raises an empty hand in toast to you.', 16, 100, 0, 37282, 'Horde Slave - On Liberation'),
+(36770, 0, 23, '%s closes his eyes, savoring freedom for a moment.', 16, 100, 0, 37283, 'Horde Slave - On Liberation'),
+(36770, 0, 24, 'I''m going to return to help free the rest of the slaves. Thank you again, hero.', 16, 100, 0, 37293, 'Horde Slave - On Liberation'),
+
+(36771, 0, 5, 'I''d almost given up hope.', 12, 100, 0, 37079, 'Horde Slave - On Liberation'),
+(36771, 0, 6, 'I thought I might die in this pit. Thank you!', 12, 100, 0, 37262, 'Horde Slave - On Liberation'),
+(36771, 0, 7, 'Don''t let a single one of them live.', 12, 100, 0, 37264, 'Horde Slave - On Liberation'),
+(36771, 0, 8, 'Please, carry out our vengeance on the Scourgelord.', 12, 100, 0, 37265, 'Horde Slave - On Liberation'),
+(36771, 0, 9, 'When you kill the Pit Master, spit on his corpse for me, will you?', 12, 100, 0, 37266, 'Horde Slave - On Liberation'),
+(36771, 0, 10, 'I''d lost all track of time in this forsaken place. You''re a sight for sore eyes, friend.', 12, 100, 0, 37268, 'Horde Slave - On Liberation'),
+(36771, 0, 11, 'Too many of us died in this pit. Far too many.', 12, 100, 0, 37270, 'Horde Slave - On Liberation'),
+(36771, 0, 12, 'I''m so glad you''re here. I wouldn''t have made it much longer.', 12, 100, 0, 37271, 'Horde Slave - On Liberation'),
+(36771, 0, 13, 'Now is the time for revenge.', 12, 100, 0, 37273, 'Horde Slave - On Liberation'),
+(36771, 0, 14, 'You deserve a mighty man-hug.', 12, 100, 0, 37274, 'Horde Slave - On Liberation'),
+(36771, 0, 15, 'I will find a way to repay you someday, hero.', 12, 100, 0, 37275, 'Horde Slave - On Liberation'),
+(36771, 0, 16, 'I can hardly believe my eyes. Thank you. Really, thank you.', 12, 100, 0, 37276, 'Horde Slave - On Liberation'),
+(36771, 0, 17, '%s nods his thanks.', 16, 100, 0, 37277, 'Horde Slave - On Liberation'),
+(36771, 0, 18, '%s offers an appreciative smile.', 16, 100, 0, 37278, 'Horde Slave - On Liberation'),
+(36771, 0, 19, '%s almost collapses as he stumbles towards you.', 16, 100, 0, 37279, 'Horde Slave - On Liberation'),
+(36771, 0, 20, '%s stares at you for a moment, clearly finding it hard to believe that you''re real.', 16, 100, 0, 37280, 'Horde Slave - On Liberation'),
+(36771, 0, 21, '%s offers a quick, cynical laugh at his fortune.', 16, 100, 0, 37281, 'Horde Slave - On Liberation'),
+(36771, 0, 22, '%s raises an empty hand in toast to you.', 16, 100, 0, 37282, 'Horde Slave - On Liberation'),
+(36771, 0, 23, '%s closes his eyes, savoring freedom for a moment.', 16, 100, 0, 37283, 'Horde Slave - On Liberation'),
+(36771, 0, 24, 'I''m going to return to help free the rest of the slaves. Thank you again, hero.', 16, 100, 0, 37293, 'Horde Slave - On Liberation'),
+
+(36772, 0, 5, 'I''d almost given up hope.', 12, 100, 0, 37079, 'Horde Slave - On Liberation'),
+(36772, 0, 6, 'I thought I might die in this pit. Thank you!', 12, 100, 0, 37262, 'Horde Slave - On Liberation'),
+(36772, 0, 7, 'Don''t let a single one of them live.', 12, 100, 0, 37264, 'Horde Slave - On Liberation'),
+(36772, 0, 8, 'Please, carry out our vengeance on the Scourgelord.', 12, 100, 0, 37265, 'Horde Slave - On Liberation'),
+(36772, 0, 9, 'When you kill the Pit Master, spit on his corpse for me, will you?', 12, 100, 0, 37266, 'Horde Slave - On Liberation'),
+(36772, 0, 10, 'I''d lost all track of time in this forsaken place. You''re a sight for sore eyes, friend.', 12, 100, 0, 37268, 'Horde Slave - On Liberation'),
+(36772, 0, 11, 'Too many of us died in this pit. Far too many.', 12, 100, 0, 37270, 'Horde Slave - On Liberation'),
+(36772, 0, 12, 'I''m so glad you''re here. I wouldn''t have made it much longer.', 12, 100, 0, 37271, 'Horde Slave - On Liberation'),
+(36772, 0, 13, 'Now is the time for revenge.', 12, 100, 0, 37273, 'Horde Slave - On Liberation'),
+(36772, 0, 14, 'You deserve a mighty man-hug.', 12, 100, 0, 37274, 'Horde Slave - On Liberation'),
+(36772, 0, 15, 'I will find a way to repay you someday, hero.', 12, 100, 0, 37275, 'Horde Slave - On Liberation'),
+(36772, 0, 16, 'I can hardly believe my eyes. Thank you. Really, thank you.', 12, 100, 0, 37276, 'Horde Slave - On Liberation'),
+(36772, 0, 17, '%s nods his thanks.', 16, 100, 0, 37277, 'Horde Slave - On Liberation'),
+(36772, 0, 18, '%s offers an appreciative smile.', 16, 100, 0, 37278, 'Horde Slave - On Liberation'),
+(36772, 0, 19, '%s almost collapses as he stumbles towards you.', 16, 100, 0, 37279, 'Horde Slave - On Liberation'),
+(36772, 0, 20, '%s stares at you for a moment, clearly finding it hard to believe that you''re real.', 16, 100, 0, 37280, 'Horde Slave - On Liberation'),
+(36772, 0, 21, '%s offers a quick, cynical laugh at his fortune.', 16, 100, 0, 37281, 'Horde Slave - On Liberation'),
+(36772, 0, 22, '%s raises an empty hand in toast to you.', 16, 100, 0, 37282, 'Horde Slave - On Liberation'),
+(36772, 0, 23, '%s closes his eyes, savoring freedom for a moment.', 16, 100, 0, 37283, 'Horde Slave - On Liberation'),
+(36772, 0, 24, 'I''m going to return to help free the rest of the slaves. Thank you again, hero.', 16, 100, 0, 37293, 'Horde Slave - On Liberation'),
+
+(36773, 0, 5, 'I''d almost given up hope.', 12, 100, 0, 37079, 'Horde Slave - On Liberation'),
+(36773, 0, 6, 'I thought I might die in this pit. Thank you!', 12, 100, 0, 37262, 'Horde Slave - On Liberation'),
+(36773, 0, 7, 'Don''t let a single one of them live.', 12, 100, 0, 37264, 'Horde Slave - On Liberation'),
+(36773, 0, 8, 'Please, carry out our vengeance on the Scourgelord.', 12, 100, 0, 37265, 'Horde Slave - On Liberation'),
+(36773, 0, 9, 'When you kill the Pit Master, spit on his corpse for me, will you?', 12, 100, 0, 37266, 'Horde Slave - On Liberation'),
+(36773, 0, 10, 'I''d lost all track of time in this forsaken place. You''re a sight for sore eyes, friend.', 12, 100, 0, 37268, 'Horde Slave - On Liberation'),
+(36773, 0, 11, 'Too many of us died in this pit. Far too many.', 12, 100, 0, 37270, 'Horde Slave - On Liberation'),
+(36773, 0, 12, 'I''m so glad you''re here. I wouldn''t have made it much longer.', 12, 100, 0, 37271, 'Horde Slave - On Liberation'),
+(36773, 0, 13, 'Now is the time for revenge.', 12, 100, 0, 37273, 'Horde Slave - On Liberation'),
+(36773, 0, 14, 'You deserve a mighty man-hug.', 12, 100, 0, 37274, 'Horde Slave - On Liberation'),
+(36773, 0, 15, 'I will find a way to repay you someday, hero.', 12, 100, 0, 37275, 'Horde Slave - On Liberation'),
+(36773, 0, 16, 'I can hardly believe my eyes. Thank you. Really, thank you.', 12, 100, 0, 37276, 'Horde Slave - On Liberation'),
+(36773, 0, 17, '%s nods his thanks.', 16, 100, 0, 37277, 'Horde Slave - On Liberation'),
+(36773, 0, 18, '%s offers an appreciative smile.', 16, 100, 0, 37278, 'Horde Slave - On Liberation'),
+(36773, 0, 19, '%s almost collapses as he stumbles towards you.', 16, 100, 0, 37279, 'Horde Slave - On Liberation'),
+(36773, 0, 20, '%s stares at you for a moment, clearly finding it hard to believe that you''re real.', 16, 100, 0, 37280, 'Horde Slave - On Liberation'),
+(36773, 0, 21, '%s offers a quick, cynical laugh at his fortune.', 16, 100, 0, 37281, 'Horde Slave - On Liberation'),
+(36773, 0, 22, '%s raises an empty hand in toast to you.', 16, 100, 0, 37282, 'Horde Slave - On Liberation'),
+(36773, 0, 23, '%s closes his eyes, savoring freedom for a moment.', 16, 100, 0, 37283, 'Horde Slave - On Liberation'),
+(36773, 0, 24, 'I''m going to return to help free the rest of the slaves. Thank you again, hero.', 16, 100, 0, 37293, 'Horde Slave - On Liberation'),
+
+(36913, 0, 7, 'He watches your every move...', 15, 100, 0, 38354, 'Eye of the Lich King - Whisper');
diff --git a/sql/updates/world/2014_10_15_00_world.sql b/sql/updates/world/2014_10_15_00_world.sql
new file mode 100644
index 00000000000..4414565d5bf
--- /dev/null
+++ b/sql/updates/world/2014_10_15_00_world.sql
@@ -0,0 +1 @@
+UPDATE `creature_text` SET `language`=0 WHERE `entry`=23678 AND `groupid`=1;
diff --git a/sql/updates/world/2014_10_16_00_world.sql b/sql/updates/world/2014_10_16_00_world.sql
new file mode 100644
index 00000000000..45b34d2cdc6
--- /dev/null
+++ b/sql/updates/world/2014_10_16_00_world.sql
@@ -0,0 +1,21 @@
+DELETE FROM `creature_text` WHERE `entry` IN(23439,25510,25511,25513,25512);
+
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
+(23439, 0, 0, '%s feeds on the freshly-killed warp chaser.', 16, 0, 100, 35, 0, 0, 'Hungry Nether Ray',21657),
+(25510, 0, 0, 'The Serpent''s Maw is engulfed in tuskarr fire!', 41, 0, 100, 0, 0, 0, '1st Kvaldir Vessel (The Serpent''s Maw)',24722),
+(25512, 0, 0, 'Bor''s Hammer is engulfed in tuskarr fire!', 41, 0, 100, 0, 0, 0, '3rd Kvaldir Vessel (Bor''s Hammer)',24724),
+(25511, 0, 0, 'The Kur Drakkar is engulfed in tuskarr fire!', 41, 0, 100, 0, 0, 0, '2nd Kvaldir Vessel (The Kur Drakkar)',24723),
+(25513, 0, 0, 'Bor''s Anvil is engulfed in tuskarr fire!', 41, 0, 100, 0, 0, 0, '4th Kvaldir Vessel (Bor''s Anvil)',24725);
+
+UPDATE `smart_scripts` SET `link`=1 WHERE `entryorguid` IN(25510,25511,25512,25513) AND `source_type`=0 AND `id`=0 AND `link`=0;
+UPDATE `smart_scripts` SET `link`=2 WHERE `entryorguid`=23439 AND `source_type`=0 AND `id`=1 AND `link`=0;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(25510,25511,25512,25513) AND `source_type`=0 AND `id`=1;
+DELETE FROM `smart_scripts` WHERE `entryorguid` =23439 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
+(25510, 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, '1st Kvaldir Vessel (The Serpent\'s Maw) - On Spellhit \'Use Tuskarr Torch\' - Say'),
+(25511, 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, '2nd Kvaldir Vessel (The Kur Drakkar) - On Spellhit \'Use Tuskarr Torch\' - Say'),
+(25512, 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, '3rd Kvaldir Vessel (Bor''s Hammer) - On Spellhit \'Use Tuskarr Torch\' - Say'),
+(25513, 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, '4th Kvaldir Vessel (Bor''s Anvil) - On Spellhit \'Use Tuskarr Torch\' - Say'),
+(23439, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hungry Nether Ray - On Data Set 1 1 - Cast \'Lucille Feed Credit Trigger\'');
diff --git a/sql/updates/world/2014_10_17_00_world.sql b/sql/updates/world/2014_10_17_00_world.sql
new file mode 100644
index 00000000000..858bac569f2
--- /dev/null
+++ b/sql/updates/world/2014_10_17_00_world.sql
@@ -0,0 +1,117 @@
+-- Skeletal Guardian SAI
+SET @ENTRY := 10390;
+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,2,1000,1000,1800000,1800000,11,13787,1,0,0,0,0,1,0,0,0,0,0,0,0,"Skeletal Guardian - Out of Combat - Cast 'Demon Armor' (Normal Dungeon)"),
+(@ENTRY,0,1,0,4,0,100,2,0,0,0,0,11,16799,0,0,0,0,0,2,0,0,0,0,0,0,0,"Skeletal Guardian - On Aggro - Cast 'Frostbolt' (Normal Dungeon)"),
+(@ENTRY,0,2,0,0,0,100,2,2400,3800,2400,3800,11,9613,64,0,0,0,0,2,0,0,0,0,0,0,0,"Skeletal Guardian - In Combat CMC - Cast 'Shadow Bolt' (Normal Dungeon)"),
+(@ENTRY,0,3,0,0,0,85,2,9000,12000,9000,12000,11,9672,0,0,0,0,0,2,0,0,0,0,0,0,0,"Skeletal Guardian - In Combat Range - Cast 'Frostbolt' (Normal Dungeon)"),
+(@ENTRY,0,4,0,0,0,85,2,6000,7000,9000,12000,11,37361,0,0,0,0,0,2,0,0,0,0,0,0,0,"Skeletal Guardian - In Combat - Cast 'Arcane Bolt' (Normal Dungeon)"),
+(@ENTRY,0,5,0,0,0,85,2,14000,18000,14000,18000,11,11975,1,0,0,0,0,1,0,0,0,0,0,0,0,"Skeletal Guardian - In Combat - Cast 'Arcane Explosion' (Normal Dungeon)");
+
+-- Skul SAI
+SET @ENTRY := 10393;
+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,2,1000,1000,1800000,1800000,11,12544,1,0,0,0,0,1,0,0,0,0,0,0,0,"Skul - Out of Combat - Cast 'Frost Armor' (Normal Dungeon)"),
+(@ENTRY,0,1,0,0,0,100,2,0,0,2400,3800,11,16799,64,0,0,0,0,2,0,0,0,0,0,0,0,"Skul - In Combat - Cast 'Frostbolt' (Normal Dungeon)"),
+(@ENTRY,0,2,0,0,0,50,2,6000,8000,16000,20000,11,15499,1,0,0,0,0,5,0,0,0,0,0,0,0,"Skul - In Combat - Cast 'Frost Shock' (Normal Dungeon)"),
+(@ENTRY,0,3,0,0,0,40,2,9000,11000,9000,11000,11,15230,0,0,0,0,0,2,0,0,0,0,0,0,0,"Skul - In Combat - Cast 'Arcane Bolt' (Normal Dungeon)"),
+(@ENTRY,0,4,0,2,0,100,3,0,15,0,0,25,1,0,0,0,0,0,0,0,0,0,0,0,0,0,"Skul - Between 0-15% Health - Flee For Assist (No Repeat) (Normal Dungeon)");
+
+-- Thuzadin Shadowcaster SAI
+SET @ENTRY := 10398;
+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,2400,3800,11,15232,64,0,0,0,0,2,0,0,0,0,0,0,0,"Thuzadin Shadowcaster - In Combat CMC - Cast 'Shadow Bolt' (Normal Dungeon)"),
+(@ENTRY,0,1,0,0,0,100,2,4000,6000,20000,25000,11,11443,1,0,0,0,0,2,0,0,0,0,0,0,0,"Thuzadin Shadowcaster - In Combat - Cast 'Cripple' (Normal Dungeon)"),
+(@ENTRY,0,2,0,0,0,100,2,7000,12000,15000,20000,11,16429,33,0,0,0,0,5,0,0,0,0,0,0,0,"Thuzadin Shadowcaster - In Combat - Cast 'Piercing Shadow' (Normal Dungeon)");
+
+-- Crimson Conjuror SAI
+SET @ENTRY := 10419;
+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,40,2400,3800,11,12675,64,0,0,0,0,2,0,0,0,0,0,0,0,"Crimson Conjuror - In Combat CMC - Cast 'Frostbolt' (Normal Dungeon)"),
+(@ENTRY,0,1,0,0,0,85,2,7000,7000,10000,10000,11,17195,1,0,0,0,0,5,0,0,0,0,0,0,0,"Crimson Conjuror - In Combat - Cast 'Scorch' (Normal Dungeon)"),
+(@ENTRY,0,2,0,0,0,100,2,10000,10000,15000,15000,11,12674,1,0,0,0,0,1,0,0,0,0,0,0,0,"Crimson Conjuror - In Combat - Cast 'Frost Nova' (Normal Dungeon)"),
+(@ENTRY,0,3,0,0,0,100,2,5000,5000,35000,45000,11,17162,1,0,0,0,0,1,0,0,0,0,0,0,0,"Crimson Conjuror - In Combat - Cast 'Summon Water Elemental' (Normal Dungeon)");
+
+-- Crimson Sorcerer SAI
+SET @ENTRY := 10422;
+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,2,1000,1000,1800000,1800000,11,12544,1,0,0,0,0,1,0,0,0,0,0,0,0,"Crimson Sorcerer - Out of Combat - Cast 'Frost Armor' (Normal Dungeon)"),
+(@ENTRY,0,1,0,1,0,100,2,3000,3000,1800000,1800000,11,17150,1,0,0,0,0,1,0,0,0,0,0,0,0,"Crimson Sorcerer - Out of Combat - Cast 'Arcane Might' (Normal Dungeon)"),
+(@ENTRY,0,2,0,0,0,100,2,0,0,2400,3800,11,15230,64,0,0,0,0,2,0,0,0,0,0,0,0,"Crimson Sorcerer - In Combat CMC - Cast 'Arcane Bolt' (Normal Dungeon)"),
+(@ENTRY,0,3,0,0,0,100,2,7000,14000,21000,26000,11,13323,1,0,0,0,0,6,0,0,0,0,0,0,0,"Crimson Sorcerer - In Combat - Cast 'Polymorph' (Normal Dungeon)"),
+(@ENTRY,0,4,0,0,0,100,2,5000,6000,8500,10000,11,14145,0,0,0,0,0,2,0,0,0,0,0,0,0,"Crimson Sorcerer - In Combat - Cast 'Fire Blast' (Normal Dungeon)");
+
+-- Chromatic Whelp SAI
+SET @ENTRY := 10442;
+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,4,0,100,2,0,0,0,0,11,16249,0,0,0,0,0,2,0,0,0,0,0,0,0,"Chromatic Whelp - On Aggro - Cast 'Frostbolt' (Normal Dungeon)"),
+(@ENTRY,0,1,0,0,0,100,2,2400,3800,2400,3800,11,12167,64,0,0,0,0,2,0,0,0,0,0,0,0,"Chromatic Whelp - In Combat CMC - Cast 'Lightning Bolt' (Normal Dungeon)"),
+(@ENTRY,0,2,0,0,0,100,2,16200,26500,7000,27900,11,16249,0,0,0,0,0,2,0,0,0,0,0,0,0,"Chromatic Whelp - In Combat - Cast 'Frostbolt' (Normal Dungeon)"),
+(@ENTRY,0,3,0,0,0,100,2,10800,19600,15700,20400,11,16250,1,0,0,0,0,2,0,0,0,0,0,0,0,"Chromatic Whelp - In Combat - Cast 'Fireball Volley' (Normal Dungeon)");
+
+-- Scholomance Adept SAI
+SET @ENTRY := 10469;
+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,3200,4800,11,15043,64,0,0,0,0,2,0,0,0,0,0,0,0,"Scholomance Adept - In Combat CMC - Cast 'Frostbolt' (Normal Dungeon)"),
+(@ENTRY,0,1,0,0,0,100,2,7300,17300,9400,14300,11,15244,1,0,0,0,0,1,0,0,0,0,0,0,0,"Scholomance Adept - In Combat - Cast 'Cone of Cold' (Normal Dungeon)"),
+(@ENTRY,0,2,0,0,0,100,2,7600,19700,12200,24700,11,15499,0,0,0,0,0,2,0,0,0,0,0,0,0,"Scholomance Adept - In Combat - Cast 'Frost Shock' (Normal Dungeon)"),
+(@ENTRY,0,3,0,2,0,100,3,0,15,0,0,25,1,0,0,0,0,0,0,0,0,0,0,0,0,0,"Scholomance Adept - Between 0-15% Health - Flee For Assist (No Repeat) (Normal Dungeon)");
+
+-- Scholomance Neophyte SAI
+SET @ENTRY := 10470;
+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,4800,11,12739,64,0,0,0,0,2,0,0,0,0,0,0,0,"Scholomance Neophyte - In Combat CMC - Cast 'Shadow Bolt'"),
+(@ENTRY,0,1,0,0,0,100,2,8600,26300,18400,36000,11,17165,1,0,0,0,0,2,0,0,0,0,0,0,0,"Scholomance Neophyte - In Combat - Cast 'Mind Flay'");
+
+-- Scholomance Necrolyte SAI
+SET @ENTRY := 10476;
+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,2400,3800,11,12739,64,0,0,0,0,2,0,0,0,0,0,0,0,"Scholomance Necrolyte - In Combat CMC - Cast 'Shadow Bolt' (Normal Dungeon)"),
+(@ENTRY,0,1,0,0,0,100,2,1400,6200,7400,22000,11,17234,1,0,0,0,0,2,0,0,0,0,0,0,0,"Scholomance Necrolyte - In Combat - Cast 'Shadow Shock' (Normal Dungeon)"),
+(@ENTRY,0,2,0,0,0,100,2,1400,22000,22000,33200,11,17151,32,0,0,0,0,1,0,0,0,0,0,0,0,"Scholomance Necrolyte - In Combat - Cast 'Shadow Barrier' (Normal Dungeon)");
+
+-- Hearthsinger Forresten SAI
+SET @ENTRY := 10558;
+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,5,30,2300,3900,11,16100,64,0,0,0,0,2,0,0,0,0,0,0,0,"Hearthsinger Forresten - In Combat CMC - Cast 'Shoot' (Normal Dungeon)"),
+(@ENTRY,0,1,0,0,0,100,2,3000,5000,12000,19000,11,16244,1,0,0,0,0,1,0,0,0,0,0,0,0,"Hearthsinger Forresten - In Combat - Cast 'Demoralizing Shout' (Normal Dungeon)"),
+(@ENTRY,0,2,0,0,0,100,2,7000,9000,20000,25000,11,16798,1,0,0,0,0,6,0,0,0,0,0,0,0,"Hearthsinger Forresten - In Combat - Cast 'Enchanting Lullaby' (Normal Dungeon)"),
+(@ENTRY,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,"Hearthsinger Forresten - Between 0-15% Health - Flee For Assist (No Repeat) (Normal Dungeon)");
+
+-- Lady Vespia SAI
+SET @ENTRY := 10559;
+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,5400,7100,14300,19600,11,8398,0,0,0,0,0,2,0,0,0,0,0,0,0,"Lady Vespia - In Combat - Cast 'Frostbolt Volley' (Normal Dungeon)"),
+(@ENTRY,0,1,0,0,0,100,0,15300,19100,9500,22100,11,13586,0,0,0,0,0,2,0,0,0,0,0,0,0,"Lady Vespia - In Combat - Cast 'Aqua Jet' (Normal Dungeon)"),
+(@ENTRY,0,2,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Vespia - Between 0-15% Health - Flee For Assist (No Repeat) (Normal Dungeon)");
+
+-- 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,2400,3800,11,15979,64,0,0,0,0,2,0,0,0,0,0,0,0,"Urok Ogre Magus - In Combat CMC - Cast 'Arcane Bolt' (Normal Dungeon)"),
+(@ENTRY,0,1,0,0,0,100,2,8000,11000,17000,24000,11,13747,1,0,0,0,0,5,0,0,0,0,0,0,0,"Urok Ogre Magus - In Combat - Cast 'Slow' (Normal Dungeon)"),
+(@ENTRY,0,2,0,2,0,100,3,0,30,30000,35000,11,6742,1,0,0,0,0,1,0,0,0,0,0,0,0,"Urok Ogre Magus - Between 0-30% Health - Cast 'Bloodlust' (No Repeat) (Normal Dungeon)");
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index b877a4ca2c0..f3060972288 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -83,13 +83,13 @@ void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint3
{
for (SmartAIEventList::iterator i = mEvents.begin(); i != mEvents.end(); ++i)
{
- SMART_EVENT eventType = SMART_EVENT((*i).GetEventType());
+ SMART_EVENT eventType = SMART_EVENT(i->GetEventType());
if (eventType == SMART_EVENT_LINK)//special handling
continue;
- if (eventType == e/* && (!(*i).event.event_phase_mask || IsInPhase((*i).event.event_phase_mask)) && !((*i).event.event_flags & SMART_EVENT_FLAG_NOT_REPEATABLE && (*i).runOnce)*/)
+ if (eventType == e /*&& (!i->event.event_phase_mask || IsInPhase(i->event.event_phase_mask)) && !(i->event.event_flags & SMART_EVENT_FLAG_NOT_REPEATABLE && i->runOnce)*/)
{
- ConditionList conds = sConditionMgr->GetConditionsForSmartEvent((*i).entryOrGuid, (*i).event_id, (*i).source_type);
+ ConditionList conds = sConditionMgr->GetConditionsForSmartEvent(i->entryOrGuid, i->event_id, i->source_type);
ConditionSourceInfo info = ConditionSourceInfo(unit, GetBaseObject());
if (sConditionMgr->IsObjectMeetToConditions(info, conds))
@@ -167,7 +167,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
{
if (IsCreature(*itr))
- sCreatureTextMgr->SendChat((*itr)->ToCreature(), uint8(e.action.talk.textGroupID), IsPlayer(GetLastInvoker())? GetLastInvoker() : 0);
+ sCreatureTextMgr->SendChat((*itr)->ToCreature(), uint8(e.action.talk.textGroupID), IsPlayer(GetLastInvoker()) ? GetLastInvoker() : 0);
else if (IsPlayer(*itr) && me)
{
Unit* templastInvoker = GetLastInvoker();
@@ -2252,8 +2252,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (e.link && e.link != e.event_id)
{
- SmartScriptHolder linked = FindLinkedEvent(e.link);
- if (linked.GetActionType() && linked.GetEventType() == SMART_EVENT_LINK)
+ SmartScriptHolder& linked = SmartAIMgr::FindLinkedEvent(mEvents, e.link);
+ if (linked)
ProcessEvent(linked, unit, var0, var1, bvar, spell, gob);
else
TC_LOG_ERROR("sql.sql", "SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Link Event %u not found or invalid, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.link);
@@ -2461,7 +2461,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
if (me && me->GetGUID() == (*itr)->GetGUID())
continue;
- if (((e.target.unitRange.creature && (*itr)->ToCreature()->GetEntry() == e.target.unitRange.creature) || !e.target.unitRange.creature) && baseObject->IsInRange(*itr, (float)e.target.unitRange.minDist, (float)e.target.unitRange.maxDist))
+ if ((!e.target.unitRange.creature || (*itr)->ToCreature()->GetEntry() == e.target.unitRange.creature) && baseObject->IsInRange(*itr, float(e.target.unitRange.minDist), float(e.target.unitRange.maxDist)))
l->push_back(*itr);
}
@@ -2480,7 +2480,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
if (me && me->GetGUID() == (*itr)->GetGUID())
continue;
- if ((e.target.unitDistance.creature && (*itr)->ToCreature()->GetEntry() == e.target.unitDistance.creature) || !e.target.unitDistance.creature)
+ if (!e.target.unitDistance.creature || (*itr)->ToCreature()->GetEntry() == e.target.unitDistance.creature)
l->push_back(*itr);
}
@@ -2499,7 +2499,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
if (go && go->GetGUID() == (*itr)->GetGUID())
continue;
- if ((e.target.goDistance.entry && (*itr)->ToGameObject()->GetEntry() == e.target.goDistance.entry) || !e.target.goDistance.entry)
+ if (!e.target.goDistance.entry || (*itr)->ToGameObject()->GetEntry() == e.target.goDistance.entry)
l->push_back(*itr);
}
@@ -2518,7 +2518,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
if (go && go->GetGUID() == (*itr)->GetGUID())
continue;
- if (((e.target.goRange.entry && IsGameObject(*itr) && (*itr)->ToGameObject()->GetEntry() == e.target.goRange.entry) || !e.target.goRange.entry) && baseObject->IsInRange((*itr), (float)e.target.goRange.minDist, (float)e.target.goRange.maxDist))
+ if ((!e.target.goRange.entry && (*itr)->ToGameObject()->GetEntry() == e.target.goRange.entry) && baseObject->IsInRange(*itr, float(e.target.goRange.minDist), float(e.target.goRange.maxDist)))
l->push_back(*itr);
}
@@ -2527,32 +2527,28 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
}
case SMART_TARGET_CREATURE_GUID:
{
- Creature* target = NULL;
if (!scriptTrigger && !baseObject)
{
TC_LOG_ERROR("sql.sql", "SMART_TARGET_CREATURE_GUID can not be used without invoker");
break;
}
- target = FindCreatureNear(scriptTrigger ? scriptTrigger : baseObject, e.target.unitGUID.dbGuid);
-
- if (target && (!e.target.unitGUID.entry || target->GetEntry() == e.target.unitGUID.entry))
- l->push_back(target);
+ if (Creature* target = FindCreatureNear(scriptTrigger ? scriptTrigger : baseObject, e.target.unitGUID.dbGuid))
+ if (!e.target.unitGUID.entry || target->GetEntry() == e.target.unitGUID.entry)
+ l->push_back(target);
break;
}
case SMART_TARGET_GAMEOBJECT_GUID:
{
- GameObject* target = NULL;
if (!scriptTrigger && !baseObject)
{
TC_LOG_ERROR("sql.sql", "SMART_TARGET_GAMEOBJECT_GUID can not be used without invoker");
break;
}
- target = FindGameObjectNear(scriptTrigger ? scriptTrigger : baseObject, e.target.goGUID.dbGuid);
-
- if (target && (!e.target.goGUID.entry || target->GetEntry() == e.target.goGUID.entry))
- l->push_back(target);
+ if (GameObject* target = FindGameObjectNear(scriptTrigger ? scriptTrigger : baseObject, e.target.goGUID.dbGuid))
+ if (!e.target.goGUID.entry || target->GetEntry() == e.target.goGUID.entry)
+ l->push_back(target);
break;
}
case SMART_TARGET_PLAYER_RANGE:
@@ -2591,26 +2587,21 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
}
case SMART_TARGET_CLOSEST_CREATURE:
{
- Creature* target = GetClosestCreatureWithEntry(baseObject, e.target.closest.entry, (float)(e.target.closest.dist ? e.target.closest.dist : 100), !e.target.closest.dead);
- if (target)
+ if (Creature* target = GetClosestCreatureWithEntry(baseObject, e.target.closest.entry, float(e.target.closest.dist ? e.target.closest.dist : 100), !e.target.closest.dead))
l->push_back(target);
break;
}
case SMART_TARGET_CLOSEST_GAMEOBJECT:
{
- GameObject* target = GetClosestGameObjectWithEntry(baseObject, e.target.closest.entry, (float)(e.target.closest.dist ? e.target.closest.dist : 100));
- if (target)
+ if (GameObject* target = GetClosestGameObjectWithEntry(baseObject, e.target.closest.entry, float(e.target.closest.dist ? e.target.closest.dist : 100)))
l->push_back(target);
break;
}
case SMART_TARGET_CLOSEST_PLAYER:
{
if (me)
- {
- Player* target = me->SelectNearestPlayer((float)e.target.playerDistance.dist);
- if (target)
+ if (Player* target = me->SelectNearestPlayer(float(e.target.playerDistance.dist)))
l->push_back(target);
- }
break;
}
case SMART_TARGET_OWNER_OR_SUMMONER:
@@ -2643,7 +2634,6 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
if (me)
if (Unit* target = me->SelectNearestTarget(e.target.closestAttackable.maxDist, e.target.closestAttackable.playerOnly != 0))
l->push_back(target);
-
break;
}
case SMART_TARGET_CLOSEST_FRIENDLY:
@@ -2651,7 +2641,6 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
if (me)
if (Unit* target = DoFindClosestFriendlyInRange(e.target.closestFriendly.maxDist, e.target.closestFriendly.playerOnly != 0))
l->push_back(target);
-
break;
}
case SMART_TARGET_POSITION:
diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h
index 02bc1a2b487..b59b62c5697 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.h
+++ b/src/server/game/AI/SmartScripts/SmartScript.h
@@ -257,21 +257,6 @@ class SmartScript
}
}
}
- SmartScriptHolder FindLinkedEvent(uint32 link)
- {
- if (!mEvents.empty())
- {
- for (SmartAIEventList::iterator i = mEvents.begin(); i != mEvents.end(); ++i)
- {
- if (i->event_id == link)
- {
- return (*i);
- }
- }
- }
- SmartScriptHolder s;
- return s;
- }
};
#endif
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
index 40f37acf1f7..0f0dcbc557a 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -91,7 +91,6 @@ void SmartWaypointMgr::LoadFromDB()
while (result->NextRow());
TC_LOG_INFO("server.loading", ">> Loaded %u SmartAI waypoint paths (total %u waypoints) in %u ms", count, total, GetMSTimeDiffToNow(oldMSTime));
-
}
SmartWaypointMgr::~SmartWaypointMgr()
@@ -192,23 +191,23 @@ void SmartAIMgr::LoadSmartAIFromDB()
}
else
{
- CreatureData const* creature = sObjectMgr->GetCreatureData(uint32(abs(temp.entryOrGuid)));
+ CreatureData const* creature = sObjectMgr->GetCreatureData(uint32(std::abs(temp.entryOrGuid)));
if (!creature)
{
- TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature guid (%u) does not exist, skipped loading.", uint32(abs(temp.entryOrGuid)));
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature guid (%u) does not exist, skipped loading.", uint32(std::abs(temp.entryOrGuid)));
continue;
}
CreatureTemplate const* creatureInfo = sObjectMgr->GetCreatureTemplate(creature->id);
if (!creatureInfo)
{
- TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature entry (%u) guid (%u) does not exist, skipped loading.", creature->id, uint32(abs(temp.entryOrGuid)));
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature entry (%u) guid (%u) does not exist, skipped loading.", creature->id, uint32(std::abs(temp.entryOrGuid)));
continue;
}
if (creatureInfo->AIName != "SmartAI")
{
- TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature entry (%u) guid (%u) is not using SmartAI, skipped loading.", creature->id, uint32(abs(temp.entryOrGuid)));
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature entry (%u) guid (%u) is not using SmartAI, skipped loading.", creature->id, uint32(std::abs(temp.entryOrGuid)));
continue;
}
}
@@ -263,26 +262,29 @@ void SmartAIMgr::LoadSmartAIFromDB()
}
while (result->NextRow());
- // TO-DO: Find better way
- for (uint8 i = 0; i < SMART_SCRIPT_TYPE_MAX; i++)
+ // Post Loading Validation
+ for (uint8 i = 0; i < SMART_SCRIPT_TYPE_MAX; ++i)
{
- for (auto itr = mEventMap[i].begin(); itr != mEventMap[i].end(); ++itr)
+ for (SmartAIEventMap::iterator itr = mEventMap[i].begin(); itr != mEventMap[i].end(); ++itr)
{
- for (auto e : mEventMap[i][itr->first])
+ for (SmartScriptHolder const& e : itr->second)
{
- bool found = false;
- if (e.link && e.link != e.event_id)
+ if (e.link)
{
- for (auto linked : mEventMap[i][itr->first])
+ if (!FindLinkedEvent(itr->second, e.link))
{
- if (linked.event_id == e.link)
- if (linked.GetActionType() && linked.GetEventType() == SMART_EVENT_LINK)
- found = true;
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Entry %d SourceType %u, Event %u, Link Event %u not found or invalid.",
+ e.entryOrGuid, e.GetScriptType(), e.event_id, e.link);
}
+ }
- if (!found)
- TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Entry %d SourceType %u, Event %u, Link Event %u not found or invalid",
- e.entryOrGuid, e.GetScriptType(), e.event_id, e.link);
+ if (e.GetEventType() == SMART_EVENT_LINK)
+ {
+ if (!FindLinkedSourceEvent(itr->second, e.event_id))
+ {
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Entry %d SourceType %u, Event %u, Link Source Event not found or invalid. Event will never trigger.",
+ e.entryOrGuid, e.GetScriptType(), e.event_id);
+ }
}
}
}
@@ -296,11 +298,12 @@ void SmartAIMgr::LoadSmartAIFromDB()
bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
{
if (std::abs(e.target.o) > 2 * float(M_PI))
- TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has abs(`target.o`) > 2*PI (orientation is expressed in radians)",
- e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has abs(`target.o` = %f) > 2*PI (orientation is expressed in radians)",
+ e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.o);
if (e.GetActionType() == SMART_ACTION_INSTALL_AI_TEMPLATE)
return true; // AI template has special handling
+
switch (e.GetTargetType())
{
case SMART_TARGET_CREATURE_DISTANCE:
@@ -379,27 +382,38 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
TC_LOG_ERROR("sql.sql", "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid event type (%u), skipped.", e.entryOrGuid, e.event_id, e.GetEventType());
return false;
}
+
// in SMART_SCRIPT_TYPE_TIMED_ACTIONLIST all event types are overriden by core
if (e.GetScriptType() != SMART_SCRIPT_TYPE_TIMED_ACTIONLIST && !(SmartAIEventMask[e.event.type][1] & SmartAITypeMask[e.GetScriptType()][1]))
{
TC_LOG_ERROR("sql.sql", "SmartAIMgr: EntryOrGuid %d, event type %u can not be used for Script type %u", e.entryOrGuid, e.GetEventType(), e.GetScriptType());
return false;
}
+
if (e.action.type <= 0 || e.action.type >= SMART_ACTION_END)
{
TC_LOG_ERROR("sql.sql", "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid action type (%u), skipped.", e.entryOrGuid, e.event_id, e.GetActionType());
return false;
}
+
if (e.event.event_phase_mask > SMART_EVENT_PHASE_ALL)
{
TC_LOG_ERROR("sql.sql", "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid phase mask (%u), skipped.", e.entryOrGuid, e.event_id, e.event.event_phase_mask);
return false;
}
+
if (e.event.event_flags > SMART_EVENT_FLAGS_ALL)
{
TC_LOG_ERROR("sql.sql", "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid event flags (%u), skipped.", e.entryOrGuid, e.event_id, e.event.event_flags);
return false;
}
+
+ if (e.link && e.link == e.event_id)
+ {
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: EntryOrGuid %d SourceType %u, Event %u, Event is linking self (infinite loop), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id);
+ return false;
+ }
+
if (e.GetScriptType() == SMART_SCRIPT_TYPE_TIMED_ACTIONLIST)
{
e.event.type = SMART_EVENT_UPDATE_OOC;//force default OOC, can change when calling the script!
@@ -411,8 +425,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
}
else
{
- uint32 type = e.event.type;
- switch (type)
+ switch (e.GetEventType())
{
case SMART_EVENT_UPDATE:
case SMART_EVENT_UPDATE_IC:
@@ -572,17 +585,9 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
break;
}
case SMART_EVENT_TEXT_OVER:
- //if (e.event.textOver.textGroupID && !IsTextValid(e, e.event.textOver.textGroupID)) return false;// 0 is a valid text group!
- break;
- case SMART_EVENT_LINK:
- {
- if (e.link && e.link == e.event_id)
- {
- TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u, Event %u, Link Event is linking self (infinite loop), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id);
+ if (!IsTextValid(e, e.event.textOver.textGroupID))
return false;
- }
break;
- }
case SMART_EVENT_DUMMY_EFFECT:
{
if (!IsSpellValid(e, e.event.dummy.spell))
@@ -690,6 +695,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
return false;
}
break;
+ case SMART_EVENT_LINK:
case SMART_EVENT_GO_STATE_CHANGED:
case SMART_EVENT_GO_EVENT_INFORM:
case SMART_EVENT_TIMED_EVENT_TRIGGERED:
@@ -733,14 +739,10 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
switch (e.GetActionType())
{
case SMART_ACTION_TALK:
- {
- if (e.GetScriptType() == SMART_SCRIPT_TYPE_CREATURE)
- {
- if (!IsTextValid(e, e.action.talk.textGroupID))
- return false;
- }
+ case SMART_ACTION_SIMPLE_TALK:
+ if (!IsTextValid(e, e.action.talk.textGroupID))
+ return false;
break;
- }
case SMART_ACTION_SET_FACTION:
if (e.action.faction.factionID && !sFactionTemplateStore.LookupEntry(e.action.faction.factionID))
{
@@ -820,7 +822,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
if (!IsSpellValid(e, e.action.cast.spell))
return false;
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(e.action.cast.spell);
+ SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(e.action.cast.spell);
for (uint32 j = 0; j < MAX_SPELL_EFFECTS; ++j)
{
if (spellInfo->Effects[j].IsEffect(SPELL_EFFECT_KILL_CREDIT) || spellInfo->Effects[j].IsEffect(SPELL_EFFECT_KILL_CREDIT2))
@@ -983,10 +985,10 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
if (!NotNULL(e, e.action.item.count))
return false;
- CacheSpellContainerBounds sBounds = GetCreditItemSpellContainerBounds(e.action.item.entry);
+ CacheSpellContainerBounds sBounds = GetCreateItemSpellContainerBounds(e.action.item.entry);
for (CacheSpellContainer::const_iterator itr = sBounds.first; itr != sBounds.second; ++itr)
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u Create Item: There is a create item spell for item %u (SpellId: %u effect: %u)",
- e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.item.entry, itr->second.first, itr->second.second);
+ e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.item.entry, itr->second.first, itr->second.second);
break;
}
case SMART_ACTION_TELEPORT:
@@ -1150,7 +1152,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_SET_NPC_FLAG:
case SMART_ACTION_ADD_NPC_FLAG:
case SMART_ACTION_REMOVE_NPC_FLAG:
- case SMART_ACTION_SIMPLE_TALK:
case SMART_ACTION_CROSS_CAST:
case SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST:
case SMART_ACTION_RANDOM_MOVE:
@@ -1181,49 +1182,45 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
return true;
}
-bool SmartAIMgr::IsTextValid(SmartScriptHolder const& e, uint32 id) // unused
+bool SmartAIMgr::IsTextValid(SmartScriptHolder const& e, uint32 id)
{
- bool error = false;
+ if (e.GetScriptType() != SMART_SCRIPT_TYPE_CREATURE)
+ return true;
+
uint32 entry = 0;
- if (e.entryOrGuid >= 0)
+ if (e.GetEventType() == SMART_EVENT_TEXT_OVER)
{
- if (e.GetEventType() == SMART_EVENT_TEXT_OVER)
- {
- entry = e.event.textOver.creatureEntry;
- id = e.event.textOver.textGroupID;
- }
- else
- {
- switch (e.GetTargetType())
- {
- case SMART_TARGET_CREATURE_DISTANCE:
- case SMART_TARGET_CREATURE_RANGE:
- case SMART_TARGET_CLOSEST_CREATURE:
- return true; // ignore
- default:
- entry = uint32(e.entryOrGuid);
- break;
- }
- }
+ entry = e.event.textOver.creatureEntry;
}
else
{
- entry = uint32(abs(e.entryOrGuid));
- CreatureData const* data = sObjectMgr->GetCreatureData(entry);
- if (!data)
+ switch (e.GetTargetType())
{
- TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Creature guid %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
- return false;
+ case SMART_TARGET_CREATURE_DISTANCE:
+ case SMART_TARGET_CREATURE_RANGE:
+ case SMART_TARGET_CLOSEST_CREATURE:
+ return true; // ignore
+ default:
+ if (e.entryOrGuid < 0)
+ {
+ entry = uint32(std::abs(e.entryOrGuid));
+ CreatureData const* data = sObjectMgr->GetCreatureData(entry);
+ if (!data)
+ {
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Creature guid %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
+ return false;
+ }
+ else
+ entry = data->id;
+ }
+ else
+ entry = uint32(e.entryOrGuid);
+ break;
}
- else
- entry = data->id;
}
if (!entry || !sCreatureTextMgr->TextExist(entry, uint8(id)))
- error = true;
-
- if (error)
{
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Text id %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), id);
return false;
@@ -1285,7 +1282,7 @@ CacheSpellContainerBounds SmartAIMgr::GetKillCreditSpellContainerBounds(uint32 k
return KillCreditSpellStore.equal_range(killCredit);
}
-CacheSpellContainerBounds SmartAIMgr::GetCreditItemSpellContainerBounds(uint32 itemId) const
+CacheSpellContainerBounds SmartAIMgr::GetCreateItemSpellContainerBounds(uint32 itemId) const
{
return CreateItemSpellStore.equal_range(itemId);
}
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
index 249c63f5cf6..9bb34d1347e 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -1347,6 +1347,8 @@ struct SmartScriptHolder
bool active;
bool runOnce;
bool enableTimed;
+
+ operator bool() const { return entryOrGuid != 0; }
};
typedef std::unordered_map<uint32, WayPoint*> WPPath;
@@ -1469,6 +1471,30 @@ class SmartAIMgr
}
}
+ static SmartScriptHolder& FindLinkedSourceEvent(SmartAIEventList& list, uint32 eventId)
+ {
+ SmartAIEventList::iterator itr = std::find_if(list.begin(), list.end(),
+ [eventId](SmartScriptHolder& source) { return source.link == eventId; });
+
+ if (itr != list.end())
+ return *itr;
+
+ static SmartScriptHolder SmartScriptHolderDummy;
+ return SmartScriptHolderDummy;
+ }
+
+ static SmartScriptHolder& FindLinkedEvent(SmartAIEventList& list, uint32 link)
+ {
+ SmartAIEventList::iterator itr = std::find_if(list.begin(), list.end(),
+ [link](SmartScriptHolder& linked) { return linked.event_id == link && linked.GetEventType() == SMART_EVENT_LINK; });
+
+ if (itr != list.end())
+ return *itr;
+
+ static SmartScriptHolder SmartScriptHolderDummy;
+ return SmartScriptHolderDummy;
+ }
+
private:
//event stores
SmartAIEventMap mEventMap[SMART_SCRIPT_TYPE_MAX];
@@ -1476,16 +1502,6 @@ class SmartAIMgr
bool IsEventValid(SmartScriptHolder& e);
bool IsTargetValid(SmartScriptHolder const& e);
- /*inline bool IsTargetValid(SmartScriptHolder e, int32 target)
- {
- if (target < SMART_TARGET_NONE || target >= SMART_TARGET_END)
- {
- TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Target type %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), target);
- return false;
- }
- return true;
- }*/
-
bool IsMinMaxValid(SmartScriptHolder const& e, uint32 min, uint32 max)
{
if (max < min)
@@ -1615,7 +1631,7 @@ class SmartAIMgr
CacheSpellContainerBounds GetSummonCreatureSpellContainerBounds(uint32 creatureEntry) const;
CacheSpellContainerBounds GetSummonGameObjectSpellContainerBounds(uint32 gameObjectEntry) const;
CacheSpellContainerBounds GetKillCreditSpellContainerBounds(uint32 killCredit) const;
- CacheSpellContainerBounds GetCreditItemSpellContainerBounds(uint32 itemId) const;
+ CacheSpellContainerBounds GetCreateItemSpellContainerBounds(uint32 itemId) const;
CacheSpellContainer SummonCreatureSpellStore;
CacheSpellContainer SummonGameObjectSpellStore;
diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp
index 0c90dde5ea8..79b9557fc2b 100644
--- a/src/server/game/Accounts/AccountMgr.cpp
+++ b/src/server/game/Accounts/AccountMgr.cpp
@@ -84,7 +84,7 @@ AccountOpResult AccountMgr::DeleteAccount(uint32 accountId)
ObjectGuid guid(HIGHGUID_PLAYER, (*result)[0].GetUInt32());
// Kick if player is online
- if (Player* p = ObjectAccessor::FindPlayer(guid))
+ if (Player* p = ObjectAccessor::FindConnectedPlayer(guid))
{
WorldSession* s = p->GetSession();
s->KickPlayer(); // mark session to remove at next session list update
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
index 8955fc9014f..53267a6e565 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
@@ -93,7 +93,7 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry* auction, SQLTransaction&
uint32 bidderAccId = 0;
ObjectGuid bidderGuid(HIGHGUID_PLAYER, auction->bidder);
- Player* bidder = ObjectAccessor::FindPlayer(bidderGuid);
+ Player* bidder = ObjectAccessor::FindConnectedPlayer(bidderGuid);
// data for gm.log
std::string bidderName;
bool logGmTrade = false;
@@ -157,7 +157,7 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry* auction, SQLTransaction&
void AuctionHouseMgr::SendAuctionSalePendingMail(AuctionEntry* auction, SQLTransaction& trans)
{
ObjectGuid owner_guid(HIGHGUID_PLAYER, auction->owner);
- Player* owner = ObjectAccessor::FindPlayer(owner_guid);
+ Player* owner = ObjectAccessor::FindConnectedPlayer(owner_guid);
uint32 owner_accId = sObjectMgr->GetPlayerAccountIdByGUID(owner_guid);
// owner exist (online or offline)
if (owner || owner_accId)
@@ -169,7 +169,7 @@ void AuctionHouseMgr::SendAuctionSalePendingMail(AuctionEntry* auction, SQLTrans
void AuctionHouseMgr::SendAuctionSuccessfulMail(AuctionEntry* auction, SQLTransaction& trans)
{
ObjectGuid owner_guid(HIGHGUID_PLAYER, auction->owner);
- Player* owner = ObjectAccessor::FindPlayer(owner_guid);
+ Player* owner = ObjectAccessor::FindConnectedPlayer(owner_guid);
uint32 owner_accId = sObjectMgr->GetPlayerAccountIdByGUID(owner_guid);
// owner exist
if (owner || owner_accId)
@@ -200,7 +200,7 @@ void AuctionHouseMgr::SendAuctionExpiredMail(AuctionEntry* auction, SQLTransacti
return;
ObjectGuid owner_guid(HIGHGUID_PLAYER, auction->owner);
- Player* owner = ObjectAccessor::FindPlayer(owner_guid);
+ Player* owner = ObjectAccessor::FindConnectedPlayer(owner_guid);
uint32 owner_accId = sObjectMgr->GetPlayerAccountIdByGUID(owner_guid);
// owner exist
if (owner || owner_accId)
@@ -223,7 +223,7 @@ void AuctionHouseMgr::SendAuctionExpiredMail(AuctionEntry* auction, SQLTransacti
void AuctionHouseMgr::SendAuctionOutbiddedMail(AuctionEntry* auction, uint32 newPrice, Player* newBidder, SQLTransaction& trans)
{
ObjectGuid oldBidder_guid(HIGHGUID_PLAYER, auction->bidder);
- Player* oldBidder = ObjectAccessor::FindPlayer(oldBidder_guid);
+ Player* oldBidder = ObjectAccessor::FindConnectedPlayer(oldBidder_guid);
uint32 oldBidder_accId = 0;
if (!oldBidder)
@@ -245,7 +245,7 @@ void AuctionHouseMgr::SendAuctionOutbiddedMail(AuctionEntry* auction, uint32 new
void AuctionHouseMgr::SendAuctionCancelledToBidderMail(AuctionEntry* auction, SQLTransaction& trans)
{
ObjectGuid bidder_guid = ObjectGuid(HIGHGUID_PLAYER, auction->bidder);
- Player* bidder = ObjectAccessor::FindPlayer(bidder_guid);
+ Player* bidder = ObjectAccessor::FindConnectedPlayer(bidder_guid);
uint32 bidder_accId = 0;
if (!bidder)
diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp
index 76b6e66b219..8b7ed103190 100644
--- a/src/server/game/Battlefield/Battlefield.cpp
+++ b/src/server/game/Battlefield/Battlefield.cpp
@@ -421,7 +421,7 @@ void Battlefield::BroadcastPacketToQueue(WorldPacket& data) const
{
for (uint8 team = 0; team < BG_TEAMS_COUNT; ++team)
for (GuidSet::const_iterator itr = m_PlayersInQueue[team].begin(); itr != m_PlayersInQueue[team].end(); ++itr)
- if (Player* player = ObjectAccessor::FindPlayer(*itr))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(*itr))
player->SendDirectMessage(&data);
}
diff --git a/src/server/game/Battlegrounds/Arena.cpp b/src/server/game/Battlegrounds/Arena.cpp
index f523ec6a09b..6b631a5d357 100644
--- a/src/server/game/Battlegrounds/Arena.cpp
+++ b/src/server/game/Battlegrounds/Arena.cpp
@@ -177,7 +177,7 @@ void Arena::EndBattleground(uint32 winner)
if (sWorld->getBoolConfig(CONFIG_ARENA_LOG_EXTENDED_INFO))
for (auto const& score : PlayerScores)
- if (Player* player = ObjectAccessor::FindPlayer(ObjectGuid(HIGHGUID_PLAYER, score.first)))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(ObjectGuid(HIGHGUID_PLAYER, score.first)))
{
TC_LOG_DEBUG("bg.arena", "Statistics match Type: %u for %s (GUID: %u, Team: %d, IP: %s): %s",
GetArenaType(), player->GetName().c_str(), score.first, player->GetArenaTeamId(GetArenaType() == 5 ? 2 : GetArenaType() == 3),
diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp
index 6831cc42f49..19617a8dff2 100644
--- a/src/server/game/Battlegrounds/ArenaTeam.cpp
+++ b/src/server/game/Battlegrounds/ArenaTeam.cpp
@@ -410,7 +410,7 @@ void ArenaTeam::Roster(WorldSession* session)
for (MemberList::const_iterator itr = Members.begin(); itr != Members.end(); ++itr)
{
- player = ObjectAccessor::FindPlayer(itr->Guid);
+ player = ObjectAccessor::FindConnectedPlayer(itr->Guid);
data << uint64(itr->Guid); // guid
data << uint8((player ? 1 : 0)); // online flag
@@ -467,7 +467,7 @@ void ArenaTeam::NotifyStatsChanged()
// This is called after a rated match ended
// Updates arena team stats for every member of the team (not only the ones who participated!)
for (MemberList::const_iterator itr = Members.begin(); itr != Members.end(); ++itr)
- if (Player* player = ObjectAccessor::FindPlayer(itr->Guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(itr->Guid))
SendStats(player->GetSession());
}
@@ -514,7 +514,7 @@ void ArenaTeamMember::ModifyMatchmakerRating(int32 mod, uint32 /*slot*/)
void ArenaTeam::BroadcastPacket(WorldPacket* packet)
{
for (MemberList::const_iterator itr = Members.begin(); itr != Members.end(); ++itr)
- if (Player* player = ObjectAccessor::FindPlayer(itr->Guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(itr->Guid))
player->GetSession()->SendPacket(packet);
}
@@ -625,7 +625,7 @@ uint32 ArenaTeam::GetAverageMMR(Group* group) const
for (MemberList::const_iterator itr = Members.begin(); itr != Members.end(); ++itr)
{
// Skip if player is not online
- if (!ObjectAccessor::FindPlayer(itr->Guid))
+ if (!ObjectAccessor::FindConnectedPlayer(itr->Guid))
continue;
// Skip if player is not member of group
@@ -713,7 +713,7 @@ void ArenaTeam::FinishGame(int32 mod)
// Check if rating related achivements are met
for (MemberList::iterator itr = Members.begin(); itr != Members.end(); ++itr)
- if (Player* member = ObjectAccessor::FindPlayer(itr->Guid))
+ if (Player* member = ObjectAccessor::FindConnectedPlayer(itr->Guid))
member->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_TEAM_RATING, Stats.Rating, Type);
}
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 99b1f240e5e..7032610cad5 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -564,6 +564,7 @@ Player* Battleground::_GetPlayer(ObjectGuid guid, bool offlineRemove, char const
Player* player = NULL;
if (!offlineRemove)
{
+ // should this be ObjectAccessor::FindConnectedPlayer() to return players teleporting ?
player = ObjectAccessor::FindPlayer(guid);
if (!player)
TC_LOG_ERROR("bg.battleground", "Battleground::%s: player (%s) not found for BG (map: %u, instance id: %u)!",
diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
index a3b0051e697..3993ec0a9ba 100644
--- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
@@ -362,7 +362,7 @@ void BattlegroundQueue::RemovePlayer(ObjectGuid guid, bool decreaseInvitedCount)
if (ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(group->ArenaTeamId))
{
TC_LOG_DEBUG("bg.battleground", "UPDATING memberLost's personal arena rating for %s by opponents rating: %u", guid.ToString().c_str(), group->OpponentsTeamRating);
- if (Player* player = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
at->MemberLost(player, group->OpponentsMatchmakerRating);
else
at->OfflineMemberLost(guid, group->OpponentsMatchmakerRating);
@@ -385,7 +385,7 @@ void BattlegroundQueue::RemovePlayer(ObjectGuid guid, bool decreaseInvitedCount)
{
// remove next player, this is recursive
// first send removal information
- if (Player* plr2 = ObjectAccessor::FindPlayer(group->Players.begin()->first))
+ if (Player* plr2 = ObjectAccessor::FindConnectedPlayer(group->Players.begin()->first))
{
Battleground* bg = sBattlegroundMgr->GetBattlegroundTemplate(group->BgTypeId);
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(group->BgTypeId, group->ArenaType);
@@ -449,7 +449,7 @@ bool BattlegroundQueue::InviteGroupToBG(GroupQueueInfo* ginfo, Battleground* bg,
for (std::map<ObjectGuid, PlayerQueueInfo*>::iterator itr = ginfo->Players.begin(); itr != ginfo->Players.end(); ++itr)
{
// get the player
- Player* player = ObjectAccessor::FindPlayer(itr->first);
+ Player* player = ObjectAccessor::FindConnectedPlayer(itr->first);
// if offline, skip him, this should not happen - player is removed from queue when he logs out
if (!player)
continue;
@@ -980,7 +980,7 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundTyp
bool BGQueueInviteEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
{
- Player* player = ObjectAccessor::FindPlayer(m_PlayerGuid);
+ Player* player = ObjectAccessor::FindConnectedPlayer(m_PlayerGuid);
// player logged off (we should do nothing, he is correctly removed from queue in another procedure)
if (!player)
return true;
@@ -1023,7 +1023,7 @@ void BGQueueInviteEvent::Abort(uint64 /*e_time*/)
*/
bool BGQueueRemoveEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
{
- Player* player = ObjectAccessor::FindPlayer(m_PlayerGuid);
+ Player* player = ObjectAccessor::FindConnectedPlayer(m_PlayerGuid);
if (!player)
// player logged off (we should do nothing, he is correctly removed from queue in another procedure)
return true;
diff --git a/src/server/game/Calendar/CalendarMgr.cpp b/src/server/game/Calendar/CalendarMgr.cpp
index d85f3e7e9c5..2a5fd677c09 100644
--- a/src/server/game/Calendar/CalendarMgr.cpp
+++ b/src/server/game/Calendar/CalendarMgr.cpp
@@ -350,7 +350,7 @@ CalendarEventStore CalendarMgr::GetPlayerEvents(ObjectGuid guid)
if (CalendarEvent* event = GetEvent(itr->first)) // NULL check added as attempt to fix #11512
events.insert(event);
- if (Player* player = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
for (CalendarEventStore::const_iterator itr = _events.begin(); itr != _events.end(); ++itr)
if ((*itr)->GetGuildId() == player->GetGuildId())
events.insert(*itr);
@@ -424,7 +424,7 @@ void CalendarMgr::SendCalendarEventInvite(CalendarInvite const& invite)
bool hasStatusTime = statusTime != 946684800; // 01/01/2000 00:00:00
ObjectGuid invitee = invite.GetInviteeGUID();
- Player* player = ObjectAccessor::FindPlayer(invitee);
+ Player* player = ObjectAccessor::FindConnectedPlayer(invitee);
uint8 level = player ? player->getLevel() : Player::GetLevelFromDB(invitee);
@@ -441,7 +441,7 @@ void CalendarMgr::SendCalendarEventInvite(CalendarInvite const& invite)
if (!calendarEvent) // Pre-invite
{
- if (Player* playerSender = ObjectAccessor::FindPlayer(invite.GetSenderGUID()))
+ if (Player* playerSender = ObjectAccessor::FindConnectedPlayer(invite.GetSenderGUID()))
playerSender->SendDirectMessage(&data);
}
else
@@ -538,13 +538,13 @@ void CalendarMgr::SendCalendarEventInviteAlert(CalendarEvent const& calendarEven
guild->BroadcastPacket(&data);
}
else
- if (Player* player = ObjectAccessor::FindPlayer(invite.GetInviteeGUID()))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(invite.GetInviteeGUID()))
player->SendDirectMessage(&data);
}
void CalendarMgr::SendCalendarEvent(ObjectGuid guid, CalendarEvent const& calendarEvent, CalendarSendEventType sendType)
{
- Player* player = ObjectAccessor::FindPlayer(guid);
+ Player* player = ObjectAccessor::FindConnectedPlayer(guid);
if (!player)
return;
@@ -590,7 +590,7 @@ void CalendarMgr::SendCalendarEvent(ObjectGuid guid, CalendarEvent const& calend
void CalendarMgr::SendCalendarEventInviteRemoveAlert(ObjectGuid guid, CalendarEvent const& calendarEvent, CalendarInviteStatus status)
{
- if (Player* player = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
{
WorldPacket data(SMSG_CALENDAR_EVENT_INVITE_REMOVED_ALERT, 8 + 4 + 4 + 1);
data << uint64(calendarEvent.GetEventId());
@@ -604,7 +604,7 @@ void CalendarMgr::SendCalendarEventInviteRemoveAlert(ObjectGuid guid, CalendarEv
void CalendarMgr::SendCalendarClearPendingAction(ObjectGuid guid)
{
- if (Player* player = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
{
WorldPacket data(SMSG_CALENDAR_CLEAR_PENDING_ACTION, 0);
player->SendDirectMessage(&data);
@@ -613,7 +613,7 @@ void CalendarMgr::SendCalendarClearPendingAction(ObjectGuid guid)
void CalendarMgr::SendCalendarCommandResult(ObjectGuid guid, CalendarError err, char const* param /*= NULL*/)
{
- if (Player* player = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
{
WorldPacket data(SMSG_CALENDAR_COMMAND_RESULT, 0);
data << uint32(0);
@@ -646,7 +646,7 @@ void CalendarMgr::SendPacketToAllEventRelatives(WorldPacket& packet, CalendarEve
// Send packet to all invitees if event is non-guild, in other case only to non-guild invitees (packet was broadcasted for them)
CalendarInviteStore invites = _invites[calendarEvent.GetEventId()];
for (CalendarInviteStore::iterator itr = invites.begin(); itr != invites.end(); ++itr)
- if (Player* player = ObjectAccessor::FindPlayer((*itr)->GetInviteeGUID()))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer((*itr)->GetInviteeGUID()))
if (!calendarEvent.IsGuildEvent() || (calendarEvent.IsGuildEvent() && player->GetGuildId() != calendarEvent.GetGuildId()))
player->SendDirectMessage(&packet);
}
diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp
index 654ce8da2b9..40605444ec0 100644
--- a/src/server/game/Chat/Channels/Channel.cpp
+++ b/src/server/game/Chat/Channels/Channel.cpp
@@ -296,7 +296,7 @@ void Channel::KickOrBan(Player const* player, std::string const& badname, bool b
return;
}
- Player* bad = sObjectAccessor->FindPlayerByName(badname);
+ Player* bad = sObjectAccessor->FindConnectedPlayerByName(badname);
ObjectGuid victim = bad ? bad->GetGUID() : ObjectGuid::Empty;
if (!victim || !IsOn(victim))
{
@@ -366,7 +366,7 @@ void Channel::UnBan(Player const* player, std::string const& badname)
return;
}
- Player* bad = sObjectAccessor->FindPlayerByName(badname);
+ Player* bad = sObjectAccessor->FindConnectedPlayerByName(badname);
ObjectGuid victim = bad ? bad->GetGUID() : ObjectGuid::Empty;
if (!victim || !IsBanned(victim))
@@ -439,7 +439,7 @@ void Channel::SetMode(Player const* player, std::string const& p2n, bool mod, bo
if (guid == _ownerGUID && std::string(p2n) == player->GetName() && mod)
return;
- Player* newp = sObjectAccessor->FindPlayerByName(p2n);
+ Player* newp = sObjectAccessor->FindConnectedPlayerByName(p2n);
ObjectGuid victim = newp ? newp->GetGUID() : ObjectGuid::Empty;
if (!victim || !IsOn(victim) ||
@@ -487,7 +487,7 @@ void Channel::SetOwner(Player const* player, std::string const& newname)
return;
}
- Player* newp = sObjectAccessor->FindPlayerByName(newname);
+ Player* newp = sObjectAccessor->FindConnectedPlayerByName(newname);
ObjectGuid victim = newp ? newp->GetGUID() : ObjectGuid::Empty;
if (!victim || !IsOn(victim) ||
@@ -543,7 +543,7 @@ void Channel::List(Player const* player)
uint32 count = 0;
for (PlayerContainer::const_iterator i = playersStore.begin(); i != playersStore.end(); ++i)
{
- Player* member = ObjectAccessor::FindPlayer(i->first);
+ Player* member = ObjectAccessor::FindConnectedPlayer(i->first);
// PLAYER can't see MODERATOR, GAME MASTER, ADMINISTRATOR characters
// MODERATOR, GAME MASTER, ADMINISTRATOR can see all
@@ -621,7 +621,7 @@ void Channel::Say(ObjectGuid guid, std::string const& what, uint32 lang)
}
WorldPacket data;
- if (Player* player = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
ChatHandler::BuildChatPacket(data, CHAT_MSG_CHANNEL, Language(lang), player, player, what, 0, _name);
else
ChatHandler::BuildChatPacket(data, CHAT_MSG_CHANNEL, Language(lang), guid, guid, what, 0, "", "", 0, false, _name);
@@ -641,7 +641,7 @@ void Channel::Invite(Player const* player, std::string const& newname)
return;
}
- Player* newp = sObjectAccessor->FindPlayerByName(newname);
+ Player* newp = sObjectAccessor->FindConnectedPlayerByName(newname);
if (!newp || !newp->isGMVisible())
{
WorldPacket data;
@@ -723,7 +723,7 @@ void Channel::SetOwner(ObjectGuid guid, bool exclaim)
void Channel::SendToAll(WorldPacket* data, ObjectGuid guid)
{
for (PlayerContainer::const_iterator i = playersStore.begin(); i != playersStore.end(); ++i)
- if (Player* player = ObjectAccessor::FindPlayer(i->first))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(i->first))
if (!guid || !player->GetSocial()->HasIgnore(guid.GetCounter()))
player->GetSession()->SendPacket(data);
}
@@ -732,13 +732,13 @@ void Channel::SendToAllButOne(WorldPacket* data, ObjectGuid who)
{
for (PlayerContainer::const_iterator i = playersStore.begin(); i != playersStore.end(); ++i)
if (i->first != who)
- if (Player* player = ObjectAccessor::FindPlayer(i->first))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(i->first))
player->GetSession()->SendPacket(data);
}
void Channel::SendToOne(WorldPacket* data, ObjectGuid who)
{
- if (Player* player = ObjectAccessor::FindPlayer(who))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(who))
player->GetSession()->SendPacket(data);
}
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp
index 4099b3ac3fd..30405128ab8 100644
--- a/src/server/game/Chat/Chat.cpp
+++ b/src/server/game/Chat/Chat.cpp
@@ -747,7 +747,7 @@ Player* ChatHandler::getSelectedPlayer()
if (!selected)
return m_session->GetPlayer();
- return ObjectAccessor::FindPlayer(selected);
+ return ObjectAccessor::FindConnectedPlayer(selected);
}
Unit* ChatHandler::getSelectedUnit()
@@ -792,7 +792,7 @@ Player* ChatHandler::getSelectedPlayerOrSelf()
return m_session->GetPlayer();
// first try with selected target
- Player* targetPlayer = ObjectAccessor::FindPlayer(selected);
+ Player* targetPlayer = ObjectAccessor::FindConnectedPlayer(selected);
// if the target is not a player, then return self
if (!targetPlayer)
targetPlayer = m_session->GetPlayer();
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index 7d662c2fc75..c2042e9664b 100644
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -1358,7 +1358,7 @@ void LFGMgr::FinishDungeon(ObjectGuid gguid, const uint32 dungeonId)
}
Player* player = ObjectAccessor::FindPlayer(guid);
- if (!player || !player->IsInWorld())
+ if (!player)
{
TC_LOG_DEBUG("lfg.dungeon.finish", "Group: %s, Player: %s not found in world", gguid.ToString().c_str(), guid.ToString().c_str());
continue;
@@ -1771,56 +1771,56 @@ ObjectGuid LFGMgr::GetLeader(ObjectGuid guid)
bool LFGMgr::HasIgnore(ObjectGuid guid1, ObjectGuid guid2)
{
- Player* plr1 = ObjectAccessor::FindPlayer(guid1);
- Player* plr2 = ObjectAccessor::FindPlayer(guid2);
+ Player* plr1 = ObjectAccessor::FindConnectedPlayer(guid1);
+ Player* plr2 = ObjectAccessor::FindConnectedPlayer(guid2);
return plr1 && plr2 && (plr1->GetSocial()->HasIgnore(guid2.GetCounter()) || plr2->GetSocial()->HasIgnore(guid1.GetCounter()));
}
void LFGMgr::SendLfgRoleChosen(ObjectGuid guid, ObjectGuid pguid, uint8 roles)
{
- if (Player* player = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
player->GetSession()->SendLfgRoleChosen(pguid, roles);
}
void LFGMgr::SendLfgRoleCheckUpdate(ObjectGuid guid, LfgRoleCheck const& roleCheck)
{
- if (Player* player = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
player->GetSession()->SendLfgRoleCheckUpdate(roleCheck);
}
void LFGMgr::SendLfgUpdatePlayer(ObjectGuid guid, LfgUpdateData const& data)
{
- if (Player* player = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
player->GetSession()->SendLfgUpdatePlayer(data);
}
void LFGMgr::SendLfgUpdateParty(ObjectGuid guid, LfgUpdateData const& data)
{
- if (Player* player = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
player->GetSession()->SendLfgUpdateParty(data);
}
void LFGMgr::SendLfgJoinResult(ObjectGuid guid, LfgJoinResultData const& data)
{
- if (Player* player = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
player->GetSession()->SendLfgJoinResult(data);
}
void LFGMgr::SendLfgBootProposalUpdate(ObjectGuid guid, LfgPlayerBoot const& boot)
{
- if (Player* player = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
player->GetSession()->SendLfgBootProposalUpdate(boot);
}
void LFGMgr::SendLfgUpdateProposal(ObjectGuid guid, LfgProposal const& proposal)
{
- if (Player* player = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
player->GetSession()->SendLfgUpdateProposal(proposal);
}
void LFGMgr::SendLfgQueueStatus(ObjectGuid guid, LfgQueueStatusData const& data)
{
- if (Player* player = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
player->GetSession()->SendLfgQueueStatus(data);
}
diff --git a/src/server/game/DungeonFinding/LFGScripts.cpp b/src/server/game/DungeonFinding/LFGScripts.cpp
index 68ea1cd1030..774f814ffb4 100644
--- a/src/server/game/DungeonFinding/LFGScripts.cpp
+++ b/src/server/game/DungeonFinding/LFGScripts.cpp
@@ -184,7 +184,7 @@ void LFGGroupScript::OnRemoveMember(Group* group, ObjectGuid guid, RemoveMethod
}
if (isLFG && state != LFG_STATE_FINISHED_DUNGEON) // Need more players to finish the dungeon
- if (Player* leader = ObjectAccessor::FindPlayer(sLFGMgr->GetLeader(gguid)))
+ if (Player* leader = ObjectAccessor::FindConnectedPlayer(sLFGMgr->GetLeader(gguid)))
leader->GetSession()->SendLfgOfferContinue(sLFGMgr->GetDungeon(gguid, false));
}
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 9f28305e3cf..8adc98b3766 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -871,7 +871,7 @@ Player* Creature::GetLootRecipient() const
{
if (!m_lootRecipient)
return NULL;
- return ObjectAccessor::FindPlayer(m_lootRecipient);
+ return ObjectAccessor::FindConnectedPlayer(m_lootRecipient);
}
Group* Creature::GetLootRecipientGroup() const
@@ -1876,6 +1876,9 @@ void Creature::CallForHelp(float radius)
bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction /*= true*/) const
{
+ if (IsInEvadeMode())
+ return false;
+
// is it true?
if (!HasReactState(REACT_AGGRESSIVE))
return false;
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 98b49c46f83..290ac87181d 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -2111,7 +2111,7 @@ Player* GameObject::GetLootRecipient() const
{
if (!m_lootRecipient)
return NULL;
- return ObjectAccessor::FindPlayer(m_lootRecipient);
+ return ObjectAccessor::FindConnectedPlayer(m_lootRecipient);
}
Group* GameObject::GetLootRecipientGroup() const
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 0a2dc3366d7..74863b7e6f2 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -4814,11 +4814,8 @@ void Player::DeleteFromDB(ObjectGuid playerguid, uint32 accountId, bool updateRe
{
if (Player* pFriend = ObjectAccessor::FindPlayer(ObjectGuid(HIGHGUID_PLAYER, 0, (*resultFriends)[0].GetUInt32())))
{
- if (pFriend->IsInWorld())
- {
- pFriend->GetSocial()->RemoveFromSocialList(guid, false);
- sSocialMgr->SendFriendStatus(pFriend, FRIEND_REMOVED, guid, false);
- }
+ pFriend->GetSocial()->RemoveFromSocialList(guid, false);
+ sSocialMgr->SendFriendStatus(pFriend, FRIEND_REMOVED, guid, false);
}
} while (resultFriends->NextRow());
}
@@ -21123,7 +21120,7 @@ void Player::RemovePetitionsAndSigns(ObjectGuid guid, uint32 type)
ObjectGuid petitionguid = ObjectGuid(HIGHGUID_ITEM, fields[1].GetUInt32());
// send update if charter owner in game
- Player* owner = ObjectAccessor::FindPlayer(ownerguid);
+ Player* owner = ObjectAccessor::FindConnectedPlayer(ownerguid);
if (owner)
owner->GetSession()->SendPetitionQueryOpcode(petitionguid);
} while (result->NextRow());
diff --git a/src/server/game/Entities/Player/SocialMgr.cpp b/src/server/game/Entities/Player/SocialMgr.cpp
index 498cdfecf6e..55e48e0623c 100644
--- a/src/server/game/Entities/Player/SocialMgr.cpp
+++ b/src/server/game/Entities/Player/SocialMgr.cpp
@@ -294,7 +294,7 @@ void SocialMgr::BroadcastToFriendListers(Player* player, WorldPacket* packet)
if (itr2 != itr->second.m_playerSocialMap.end() && (itr2->second.Flags & SOCIAL_FLAG_FRIEND))
{
Player* target = ObjectAccessor::FindPlayer(ObjectGuid(HIGHGUID_PLAYER, 0, itr->first));
- if (!target || !target->IsInWorld())
+ if (!target)
continue;
WorldSession* session = target->GetSession();
diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp
index 50b006a89bd..1323e232e80 100644
--- a/src/server/game/Globals/ObjectAccessor.cpp
+++ b/src/server/game/Globals/ObjectAccessor.cpp
@@ -203,6 +203,11 @@ Player* ObjectAccessor::FindPlayer(ObjectGuid guid)
return GetObjectInWorld(guid, (Player*)NULL);
}
+Player* ObjectAccessor::FindConnectedPlayer(ObjectGuid guid)
+{
+ return HashMapHolder<Player>::Find(guid);
+}
+
Unit* ObjectAccessor::FindUnit(ObjectGuid guid)
{
return GetObjectInWorld(guid, (Unit*)NULL);
@@ -228,6 +233,24 @@ Player* ObjectAccessor::FindPlayerByName(std::string const& name)
return NULL;
}
+Player* ObjectAccessor::FindConnectedPlayerByName(std::string const& name)
+{
+ boost::shared_lock<boost::shared_mutex> lock(*HashMapHolder<Player>::GetLock());
+
+ std::string nameStr = name;
+ std::transform(nameStr.begin(), nameStr.end(), nameStr.begin(), ::tolower);
+ HashMapHolder<Player>::MapType const& m = GetPlayers();
+ for (HashMapHolder<Player>::MapType::const_iterator iter = m.begin(); iter != m.end(); ++iter)
+ {
+ std::string currentName = iter->second->GetName();
+ std::transform(currentName.begin(), currentName.end(), currentName.begin(), ::tolower);
+ if (nameStr.compare(currentName) == 0)
+ return iter->second;
+ }
+
+ return NULL;
+}
+
void ObjectAccessor::SaveAllPlayers()
{
boost::shared_lock<boost::shared_mutex> lock(*HashMapHolder<Player>::GetLock());
diff --git a/src/server/game/Globals/ObjectAccessor.h b/src/server/game/Globals/ObjectAccessor.h
index 95d0b70f429..d8beb22690a 100644
--- a/src/server/game/Globals/ObjectAccessor.h
+++ b/src/server/game/Globals/ObjectAccessor.h
@@ -169,6 +169,10 @@ class ObjectAccessor
static Unit* FindUnit(ObjectGuid);
static Player* FindPlayerByName(std::string const& name);
+ // this returns Player even if he is not in world, for example teleporting
+ static Player* FindConnectedPlayer(ObjectGuid);
+ static Player* FindConnectedPlayerByName(std::string const& name);
+
// when using this, you must use the hashmapholder's lock
static HashMapHolder<Player>::MapType const& GetPlayers()
{
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 0fc8bcc73d3..d27596fc990 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -2136,7 +2136,7 @@ ObjectGuid ObjectMgr::GetPlayerGUIDByName(std::string const& name) const
bool ObjectMgr::GetPlayerNameByGUID(ObjectGuid guid, std::string& name) const
{
// prevent DB access for online player
- if (Player* player = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
{
name = player->GetName();
return true;
@@ -2160,7 +2160,7 @@ bool ObjectMgr::GetPlayerNameByGUID(ObjectGuid guid, std::string& name) const
uint32 ObjectMgr::GetPlayerTeamByGUID(ObjectGuid guid) const
{
// prevent DB access for online player
- if (Player* player = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
{
return Player::TeamForRace(player->getRace());
}
@@ -2183,7 +2183,7 @@ uint32 ObjectMgr::GetPlayerTeamByGUID(ObjectGuid guid) const
uint32 ObjectMgr::GetPlayerAccountIdByGUID(ObjectGuid guid) const
{
// prevent DB access for online player
- if (Player* player = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
{
return player->GetSession()->GetAccountId();
}
@@ -5510,7 +5510,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp)
Player* player = NULL;
if (serverUp)
- player = ObjectAccessor::FindPlayer(ObjectGuid(HIGHGUID_PLAYER, m->receiver));
+ player = ObjectAccessor::FindConnectedPlayer(ObjectGuid(HIGHGUID_PLAYER, m->receiver));
if (player && player->m_mailsLoaded)
{ // this code will run very improbably (the time is between 4 and 5 am, in game is online a player, who has old mail
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.cpp b/src/server/game/Grids/Notifiers/GridNotifiers.cpp
index 854e5cffe5d..8c8ac52d91f 100644
--- a/src/server/game/Grids/Notifiers/GridNotifiers.cpp
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.cpp
@@ -73,7 +73,7 @@ void VisibleNotifier::SendToSelf()
if (it->IsPlayer())
{
Player* player = ObjectAccessor::FindPlayer(*it);
- if (player && player->IsInWorld() && !player->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
+ if (player && !player->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
player->UpdateVisibilityOf(&i_player);
}
}
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index b203ccb8bb9..9854feaffba 100644
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -495,7 +495,7 @@ bool Group::RemoveMember(ObjectGuid guid, const RemoveMethod& method /*= GROUP_R
// remove member and change leader (if need) only if strong more 2 members _before_ member remove (BG/BF allow 1 member group)
if (GetMembersCount() > ((isBGGroup() || isLFGGroup() || isBFGroup()) ? 1u : 2u))
{
- Player* player = ObjectAccessor::FindPlayer(guid);
+ Player* player = ObjectAccessor::FindConnectedPlayer(guid);
if (player)
{
// Battleground group handling
@@ -579,7 +579,7 @@ bool Group::RemoveMember(ObjectGuid guid, const RemoveMethod& method /*= GROUP_R
{
for (member_witerator itr = m_memberSlots.begin(); itr != m_memberSlots.end(); ++itr)
{
- if (ObjectAccessor::FindPlayer(itr->guid))
+ if (ObjectAccessor::FindConnectedPlayer(itr->guid))
{
ChangeLeader(itr->guid);
break;
@@ -591,7 +591,7 @@ bool Group::RemoveMember(ObjectGuid guid, const RemoveMethod& method /*= GROUP_R
if (isLFGGroup() && GetMembersCount() == 1)
{
- Player* leader = ObjectAccessor::FindPlayer(GetLeaderGUID());
+ Player* leader = ObjectAccessor::FindConnectedPlayer(GetLeaderGUID());
uint32 mapId = sLFGMgr->GetDungeonMapId(GetGUID());
if (!mapId || !leader || (leader->IsAlive() && leader->GetMapId() != mapId))
{
@@ -620,7 +620,7 @@ void Group::ChangeLeader(ObjectGuid newLeaderGuid)
if (slot == m_memberSlots.end())
return;
- Player* newLeader = ObjectAccessor::FindPlayer(slot->guid);
+ Player* newLeader = ObjectAccessor::FindConnectedPlayer(slot->guid);
// Don't allow switching leader to offline players
if (!newLeader)
@@ -668,7 +668,7 @@ void Group::ChangeLeader(ObjectGuid newLeaderGuid)
CharacterDatabase.CommitTransaction(trans);
}
- if (Player* oldLeader = ObjectAccessor::FindPlayer(m_leaderGuid))
+ if (Player* oldLeader = ObjectAccessor::FindConnectedPlayer(m_leaderGuid))
oldLeader->RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_GROUP_LEADER);
newLeader->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_GROUP_LEADER);
@@ -688,7 +688,7 @@ void Group::Disband(bool hideDestroy /* = false */)
Player* player;
for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
{
- player = ObjectAccessor::FindPlayer(citr->guid);
+ player = ObjectAccessor::FindConnectedPlayer(citr->guid);
if (!player)
continue;
@@ -786,7 +786,7 @@ void Group::SendLootStartRoll(uint32 countDown, uint32 mapid, const Roll &r)
for (Roll::PlayerVote::const_iterator itr=r.playerVote.begin(); itr != r.playerVote.end(); ++itr)
{
- Player* p = ObjectAccessor::FindPlayer(itr->first);
+ Player* p = ObjectAccessor::FindConnectedPlayer(itr->first);
if (!p || !p->GetSession())
continue;
@@ -832,7 +832,7 @@ void Group::SendLootRoll(ObjectGuid sourceGuid, ObjectGuid targetGuid, uint8 rol
for (Roll::PlayerVote::const_iterator itr = roll.playerVote.begin(); itr != roll.playerVote.end(); ++itr)
{
- Player* p = ObjectAccessor::FindPlayer(itr->first);
+ Player* p = ObjectAccessor::FindConnectedPlayer(itr->first);
if (!p || !p->GetSession())
continue;
@@ -855,7 +855,7 @@ void Group::SendLootRollWon(ObjectGuid sourceGuid, ObjectGuid targetGuid, uint8
for (Roll::PlayerVote::const_iterator itr = roll.playerVote.begin(); itr != roll.playerVote.end(); ++itr)
{
- Player* p = ObjectAccessor::FindPlayer(itr->first);
+ Player* p = ObjectAccessor::FindConnectedPlayer(itr->first);
if (!p || !p->GetSession())
continue;
@@ -875,7 +875,7 @@ void Group::SendLootAllPassed(Roll const& roll)
for (Roll::PlayerVote::const_iterator itr = roll.playerVote.begin(); itr != roll.playerVote.end(); ++itr)
{
- Player* player = ObjectAccessor::FindPlayer(itr->first);
+ Player* player = ObjectAccessor::FindConnectedPlayer(itr->first);
if (!player || !player->GetSession())
continue;
@@ -967,7 +967,7 @@ void Group::GroupLoot(Loot* loot, WorldObject* pLootedObject)
{
for (Roll::PlayerVote::const_iterator itr=r->playerVote.begin(); itr != r->playerVote.end(); ++itr)
{
- Player* p = ObjectAccessor::FindPlayer(itr->first);
+ Player* p = ObjectAccessor::FindConnectedPlayer(itr->first);
if (!p || !p->GetSession())
continue;
@@ -1110,7 +1110,7 @@ void Group::NeedBeforeGreed(Loot* loot, WorldObject* lootedObject)
//Broadcast Pass and Send Rollstart
for (Roll::PlayerVote::const_iterator itr = r->playerVote.begin(); itr != r->playerVote.end(); ++itr)
{
- Player* p = ObjectAccessor::FindPlayer(itr->first);
+ Player* p = ObjectAccessor::FindConnectedPlayer(itr->first);
if (!p || !p->GetSession())
continue;
@@ -1173,7 +1173,7 @@ void Group::NeedBeforeGreed(Loot* loot, WorldObject* lootedObject)
//Broadcast Pass and Send Rollstart
for (Roll::PlayerVote::const_iterator itr = r->playerVote.begin(); itr != r->playerVote.end(); ++itr)
{
- Player* p = ObjectAccessor::FindPlayer(itr->first);
+ Player* p = ObjectAccessor::FindConnectedPlayer(itr->first);
if (!p || !p->GetSession())
continue;
@@ -1340,7 +1340,7 @@ void Group::CountTheRoll(Rolls::iterator rollI)
}
}
SendLootRollWon(ObjectGuid::Empty, maxguid, maxresul, ROLL_NEED, *roll);
- player = ObjectAccessor::FindPlayer(maxguid);
+ player = ObjectAccessor::FindConnectedPlayer(maxguid);
if (player && player->GetSession())
{
@@ -1389,7 +1389,7 @@ void Group::CountTheRoll(Rolls::iterator rollI)
}
}
SendLootRollWon(ObjectGuid::Empty, maxguid, maxresul, rollvote, *roll);
- player = ObjectAccessor::FindPlayer(maxguid);
+ player = ObjectAccessor::FindConnectedPlayer(maxguid);
if (player && player->GetSession())
{
@@ -1506,7 +1506,7 @@ void Group::SendUpdate()
void Group::SendUpdateToPlayer(ObjectGuid playerGUID, MemberSlot* slot)
{
- Player* player = ObjectAccessor::FindPlayer(playerGUID);
+ Player* player = ObjectAccessor::FindConnectedPlayer(playerGUID);
if (!player || !player->GetSession() || player->GetGroup() != this)
return;
@@ -1541,7 +1541,7 @@ void Group::SendUpdateToPlayer(ObjectGuid playerGUID, MemberSlot* slot)
if (slot->guid == citr->guid)
continue;
- Player* member = ObjectAccessor::FindPlayer(citr->guid);
+ Player* member = ObjectAccessor::FindConnectedPlayer(citr->guid);
uint8 onlineState = (member && !member->GetSession()->PlayerLogout()) ? MEMBER_STATUS_ONLINE : MEMBER_STATUS_OFFLINE;
onlineState = onlineState | ((isBGGroup() || isBFGroup()) ? MEMBER_STATUS_PVP : 0);
@@ -1619,7 +1619,7 @@ void Group::OfflineReadyCheck()
{
for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
{
- Player* player = ObjectAccessor::FindPlayer(citr->guid);
+ Player* player = ObjectAccessor::FindConnectedPlayer(citr->guid);
if (!player || !player->GetSession())
{
WorldPacket data(MSG_RAID_READY_CHECK_CONFIRM, 9);
@@ -1702,7 +1702,7 @@ void Group::ChangeMembersGroup(ObjectGuid guid, uint8 group)
}
// In case the moved player is online, update the player object with the new sub group references
- if (Player* player = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindConnectedPlayer(guid))
{
if (player->GetGroup() == this)
player->GetGroupRef().setSubGroup(group);
@@ -2127,7 +2127,7 @@ void Group::BroadcastGroupUpdate(void)
for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
{
Player* pp = ObjectAccessor::FindPlayer(citr->guid);
- if (pp && pp->IsInWorld())
+ if (pp)
{
pp->ForceValuesUpdateAtIndex(UNIT_FIELD_BYTES_2);
pp->ForceValuesUpdateAtIndex(UNIT_FIELD_FACTIONTEMPLATE);
diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp
index 8261811d8e0..c655be6291f 100644
--- a/src/server/game/Guilds/Guild.cpp
+++ b/src/server/game/Guilds/Guild.cpp
@@ -2150,7 +2150,7 @@ void Guild::BroadcastToGuild(WorldSession* session, bool officerOnly, std::strin
WorldPacket data;
ChatHandler::BuildChatPacket(data, officerOnly ? CHAT_MSG_OFFICER : CHAT_MSG_GUILD, Language(language), session->GetPlayer(), NULL, msg);
for (Members::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
- if (Player* player = itr->second->FindPlayer())
+ if (Player* player = itr->second->FindConnectedPlayer())
if (player->GetSession() && _HasRankRight(player, officerOnly ? GR_RIGHT_OFFCHATLISTEN : GR_RIGHT_GCHATLISTEN) &&
!player->GetSocial()->HasIgnore(session->GetPlayer()->GetGUIDLow()))
player->GetSession()->SendPacket(&data);
@@ -2161,7 +2161,7 @@ void Guild::BroadcastPacketToRank(WorldPacket* packet, uint8 rankId) const
{
for (Members::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
if (itr->second->IsRank(rankId))
- if (Player* player = itr->second->FindPlayer())
+ if (Player* player = itr->second->FindConnectedPlayer())
player->GetSession()->SendPacket(packet);
}
@@ -2208,7 +2208,7 @@ void Guild::MassInviteToEvent(WorldSession* session, uint32 minLevel, uint32 max
// Members handling
bool Guild::AddMember(ObjectGuid guid, uint8 rankId)
{
- Player* player = ObjectAccessor::FindPlayer(guid);
+ Player* player = ObjectAccessor::FindConnectedPlayer(guid);
// Player cannot be in guild
if (player)
{
@@ -2285,7 +2285,7 @@ bool Guild::AddMember(ObjectGuid guid, uint8 rankId)
void Guild::DeleteMember(ObjectGuid guid, bool isDisbanding, bool isKicked, bool canDeleteGuild)
{
uint32 lowguid = guid.GetCounter();
- Player* player = ObjectAccessor::FindPlayer(guid);
+ Player* player = ObjectAccessor::FindConnectedPlayer(guid);
// Guild master can be deleted when loading guild and guid doesn't exist in characters table
// or when he is removed from guild by gm command
diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h
index f0daa257ae6..94bd5d39a2f 100644
--- a/src/server/game/Guilds/Guild.h
+++ b/src/server/game/Guilds/Guild.h
@@ -342,6 +342,7 @@ private:
void ResetValues();
inline Player* FindPlayer() const { return ObjectAccessor::FindPlayer(m_guid); }
+ inline Player* FindConnectedPlayer() const { return ObjectAccessor::FindConnectedPlayer(m_guid); }
private:
uint32 m_guildId;
@@ -723,7 +724,7 @@ public:
void BroadcastWorker(Do& _do, Player* except = NULL)
{
for (Members::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
- if (Player* player = itr->second->FindPlayer())
+ if (Player* player = itr->second->FindConnectedPlayer())
if (player != except)
_do(player);
}
diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp
index 6d0caf9c072..5db9cbab9ce 100644
--- a/src/server/game/Handlers/CalendarHandler.cpp
+++ b/src/server/game/Handlers/CalendarHandler.cpp
@@ -432,7 +432,7 @@ void WorldSession::HandleCalendarEventInvite(WorldPacket& recvData)
recvData >> eventId >> inviteId >> name >> isPreInvite >> isGuildEvent;
- if (Player* player = sObjectAccessor->FindPlayerByName(name.c_str()))
+ if (Player* player = sObjectAccessor->FindConnectedPlayerByName(name.c_str()))
{
// Invitee is online
inviteeGuid = player->GetGUID();
diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp
index b33f2364683..d5495f42480 100644
--- a/src/server/game/Handlers/ChatHandler.cpp
+++ b/src/server/game/Handlers/ChatHandler.cpp
@@ -268,7 +268,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
break;
}
- Player* receiver = sObjectAccessor->FindPlayerByName(to);
+ Player* receiver = sObjectAccessor->FindConnectedPlayerByName(to);
if (!receiver || (lang != LANG_ADDON && !receiver->isAcceptWhispers() && receiver->GetSession()->HasPermission(rbac::RBAC_PERM_CAN_FILTER_WHISPERS) && !receiver->IsInWhisperWhiteList(sender->GetGUID())))
{
SendPlayerNotFoundNotice(to);
@@ -605,7 +605,7 @@ void WorldSession::HandleChatIgnoredOpcode(WorldPacket& recvData)
recvData >> iguid;
recvData >> unk; // probably related to spam reporting
- Player* player = ObjectAccessor::FindPlayer(iguid);
+ Player* player = ObjectAccessor::FindConnectedPlayer(iguid);
if (!player || !player->GetSession())
return;
diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp
index a7ce1f8533a..c366c725c18 100644
--- a/src/server/game/Handlers/GroupHandler.cpp
+++ b/src/server/game/Handlers/GroupHandler.cpp
@@ -257,7 +257,7 @@ void WorldSession::HandleGroupDeclineOpcode(WorldPacket & /*recvData*/)
return;
// Remember leader if online (group pointer will be invalid if group gets disbanded)
- Player* leader = ObjectAccessor::FindPlayer(group->GetLeaderGUID());
+ Player* leader = ObjectAccessor::FindConnectedPlayer(group->GetLeaderGUID());
// uninvite, group can be deleted
GetPlayer()->UninviteFromGroup();
@@ -372,7 +372,7 @@ void WorldSession::HandleGroupSetLeaderOpcode(WorldPacket& recvData)
ObjectGuid guid;
recvData >> guid;
- Player* player = ObjectAccessor::FindPlayer(guid);
+ Player* player = ObjectAccessor::FindConnectedPlayer(guid);
Group* group = GetPlayer()->GetGroup();
if (!group || !player)
@@ -551,7 +551,7 @@ void WorldSession::HandleRaidTargetUpdateOpcode(WorldPacket& recvData)
if (guid.IsPlayer())
{
- Player* target = ObjectAccessor::FindPlayer(guid);
+ Player* target = ObjectAccessor::FindConnectedPlayer(guid);
if (!target || target->IsHostileTo(GetPlayer()))
return;
@@ -606,7 +606,7 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket& recvData)
if (!group->HasFreeSlotSubGroup(groupNr))
return;
- Player* movedPlayer = sObjectAccessor->FindPlayerByName(name);
+ Player* movedPlayer = sObjectAccessor->FindConnectedPlayerByName(name);
ObjectGuid guid;
if (movedPlayer)
{
diff --git a/src/server/game/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp
index 3c7f116c8f6..f6954b8fd0f 100644
--- a/src/server/game/Handlers/LFGHandler.cpp
+++ b/src/server/game/Handlers/LFGHandler.cpp
@@ -424,7 +424,7 @@ void WorldSession::SendLfgRoleCheckUpdate(lfg::LfgRoleCheck const& roleCheck)
data << uint64(guid); // Guid
data << uint8(roles > 0); // Ready
data << uint32(roles); // Roles
- Player* player = ObjectAccessor::FindPlayer(guid);
+ Player* player = ObjectAccessor::FindConnectedPlayer(guid);
data << uint8(player ? player->getLevel() : 0); // Level
for (lfg::LfgRolesMap::const_iterator it = roleCheck.roles.begin(); it != roleCheck.roles.end(); ++it)
@@ -437,7 +437,7 @@ void WorldSession::SendLfgRoleCheckUpdate(lfg::LfgRoleCheck const& roleCheck)
data << uint64(guid); // Guid
data << uint8(roles > 0); // Ready
data << uint32(roles); // Roles
- player = ObjectAccessor::FindPlayer(guid);
+ player = ObjectAccessor::FindConnectedPlayer(guid);
data << uint8(player ? player->getLevel() : 0);// Level
}
}
diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp
index 6ea3ae69786..b79cbecda10 100644
--- a/src/server/game/Handlers/MailHandler.cpp
+++ b/src/server/game/Handlers/MailHandler.cpp
@@ -144,7 +144,7 @@ void WorldSession::HandleSendMail(WorldPacket& recvData)
return;
}
- Player* receiver = ObjectAccessor::FindPlayer(receiverGuid);
+ Player* receiver = ObjectAccessor::FindConnectedPlayer(receiverGuid);
uint32 receiverTeam = 0;
uint8 mailsCount = 0; //do not allow to send to one player more than 100 mails
@@ -500,7 +500,7 @@ void WorldSession::HandleMailTakeItem(WorldPacket& recvData)
if (m->COD > 0) //if there is COD, take COD money from player and send them to sender by mail
{
ObjectGuid sender_guid(HIGHGUID_PLAYER, m->sender);
- Player* receiver = ObjectAccessor::FindPlayer(sender_guid);
+ Player* receiver = ObjectAccessor::FindConnectedPlayer(sender_guid);
uint32 sender_accId = 0;
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index bede3b4323c..f2aa334eb3a 100644
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -414,7 +414,8 @@ void WorldSession::HandleLogoutRequestOpcode(WorldPacket& /*recvData*/)
// not set flags if player can't free move to prevent lost state at logout cancel
if (GetPlayer()->CanFreeMove())
{
- GetPlayer()->SetStandState(UNIT_STAND_STATE_SIT);
+ if (GetPlayer()->getStandState() == UNIT_STAND_STATE_STAND)
+ GetPlayer()->SetStandState(UNIT_STAND_STATE_SIT);
WorldPacket data(SMSG_FORCE_MOVE_ROOT, (8+4)); // guess size
data << GetPlayer()->GetPackGUID();
@@ -590,7 +591,7 @@ void WorldSession::HandleAddFriendOpcodeCallBack(PreparedQueryResult result, std
else
{
Player* pFriend = ObjectAccessor::FindPlayer(friendGuid);
- if (pFriend && pFriend->IsInWorld() && pFriend->IsVisibleGloballyFor(GetPlayer()))
+ if (pFriend && pFriend->IsVisibleGloballyFor(GetPlayer()))
friendResult = FRIEND_ADDED_ONLINE;
else
friendResult = FRIEND_ADDED_OFFLINE;
@@ -1279,7 +1280,7 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recvData)
return;
}
- Player* player = sObjectAccessor->FindPlayerByName(charname);
+ Player* player = sObjectAccessor->FindConnectedPlayerByName(charname);
if (!player)
{
diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp
index f838dccde36..1e6dc1adbb9 100644
--- a/src/server/game/Handlers/PetitionsHandler.cpp
+++ b/src/server/game/Handlers/PetitionsHandler.cpp
@@ -555,7 +555,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
SendPacket(&data);
// update for owner if online
- if (Player* owner = ObjectAccessor::FindPlayer(ownerGuid))
+ if (Player* owner = ObjectAccessor::FindConnectedPlayer(ownerGuid))
owner->GetSession()->SendPacket(&data);
return;
}
@@ -585,7 +585,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
// item->SetUInt32Value(ITEM_FIELD_ENCHANTMENT_1_1+1, signs);
// update for owner if online
- if (Player* owner = ObjectAccessor::FindPlayer(ownerGuid))
+ if (Player* owner = ObjectAccessor::FindConnectedPlayer(ownerGuid))
owner->GetSession()->SendPacket(&data);
}
@@ -609,7 +609,7 @@ void WorldSession::HandlePetitionDeclineOpcode(WorldPacket& recvData)
Field* fields = result->Fetch();
ObjectGuid ownerguid(HIGHGUID_PLAYER, 0, fields[0].GetUInt32());
- Player* owner = ObjectAccessor::FindPlayer(ownerguid);
+ Player* owner = ObjectAccessor::FindConnectedPlayer(ownerguid);
if (owner) // petition owner online
{
WorldPacket data(MSG_PETITION_DECLINE, 8);
@@ -630,7 +630,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket& recvData)
recvData >> petitionguid; // petition guid
recvData >> plguid; // player guid
- player = ObjectAccessor::FindPlayer(plguid);
+ player = ObjectAccessor::FindConnectedPlayer(plguid);
if (!player)
return;
diff --git a/src/server/game/Handlers/QueryHandler.cpp b/src/server/game/Handlers/QueryHandler.cpp
index 661ecf4652e..929f34c67de 100644
--- a/src/server/game/Handlers/QueryHandler.cpp
+++ b/src/server/game/Handlers/QueryHandler.cpp
@@ -33,7 +33,7 @@
void WorldSession::SendNameQueryOpcode(ObjectGuid guid)
{
- Player* player = ObjectAccessor::FindPlayer(guid);
+ Player* player = ObjectAccessor::FindConnectedPlayer(guid);
CharacterNameData const* nameData = sWorld->GetCharacterNameData(guid);
WorldPacket data(SMSG_NAME_QUERY_RESPONSE, (8+1+1+1+1+1+10));
diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp
index 2459e468c25..820a54b9760 100644
--- a/src/server/game/Mails/Mail.cpp
+++ b/src/server/game/Mails/Mail.cpp
@@ -131,7 +131,7 @@ void MailDraft::deleteIncludedItems(SQLTransaction& trans, bool inDB /*= false*/
void MailDraft::SendReturnToSender(uint32 sender_acc, uint32 sender_guid, uint32 receiver_guid, SQLTransaction& trans)
{
ObjectGuid receiverGuid(HIGHGUID_PLAYER, receiver_guid);
- Player* receiver = ObjectAccessor::FindPlayer(receiverGuid);
+ Player* receiver = ObjectAccessor::FindConnectedPlayer(receiverGuid);
uint32 rc_account = 0;
if (!receiver)
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index 37563acd74a..7f350df2280 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -1586,7 +1586,7 @@ GridMap::~GridMap()
unloadData();
}
-bool GridMap::loadData(char* filename)
+bool GridMap::loadData(const char* filename)
{
// Unload old data if exist
unloadData();
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index 87434d555aa..e2e9fa1f706 100644
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -200,7 +200,7 @@ class GridMap
public:
GridMap();
~GridMap();
- bool loadData(char* filaname);
+ bool loadData(const char* filename);
void unloadData();
uint16 getArea(float x, float y) const;
diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
index dbe8c8b0329..2e859a7a56f 100644
--- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
@@ -99,7 +99,12 @@ void RandomMovementGenerator<Creature>::_setRandomLocation(Creature* creature)
if (is_air_ok)
i_nextMoveTime.Reset(0);
else
- i_nextMoveTime.Reset(urand(500, 10000));
+ {
+ if (roll_chance_i(50))
+ i_nextMoveTime.Reset(urand(5000, 10000));
+ else
+ i_nextMoveTime.Reset(urand(50, 400));
+ }
creature->AddUnitState(UNIT_STATE_ROAMING_MOVE);
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index fae613797e9..33c5042fc8d 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -2459,7 +2459,7 @@ bool World::RemoveBanAccount(BanMode mode, std::string const& nameOrIP)
/// Ban an account or ban an IP address, duration will be parsed using TimeStringToSecs if it is positive, otherwise permban
BanReturn World::BanCharacter(std::string const& name, std::string const& duration, std::string const& reason, std::string const& author)
{
- Player* pBanned = sObjectAccessor->FindPlayerByName(name);
+ Player* pBanned = sObjectAccessor->FindConnectedPlayerByName(name);
uint32 guid = 0;
uint32 duration_secs = TimeStringToSecs(duration);
@@ -2500,7 +2500,7 @@ BanReturn World::BanCharacter(std::string const& name, std::string const& durati
/// Remove a ban from a character
bool World::RemoveBanCharacter(std::string const& name)
{
- Player* pBanned = sObjectAccessor->FindPlayerByName(name);
+ Player* pBanned = sObjectAccessor->FindConnectedPlayerByName(name);
uint32 guid = 0;
/// Pick a player to ban if not online
diff --git a/src/server/scripts/Commands/cs_group.cpp b/src/server/scripts/Commands/cs_group.cpp
index e39aca6f6a7..a558d977b85 100644
--- a/src/server/scripts/Commands/cs_group.cpp
+++ b/src/server/scripts/Commands/cs_group.cpp
@@ -343,7 +343,7 @@ public:
// Check if iterator is online. If is...
Player* p = ObjectAccessor::FindPlayer((*itr).guid);
- if (p && p->IsInWorld())
+ if (p)
{
// ... than, it prints information like "is online", where he is, etc...
onlineState = "online";
diff --git a/src/server/scripts/Commands/cs_ticket.cpp b/src/server/scripts/Commands/cs_ticket.cpp
index 674658f41ff..23858ce67e6 100644
--- a/src/server/scripts/Commands/cs_ticket.cpp
+++ b/src/server/scripts/Commands/cs_ticket.cpp
@@ -162,12 +162,9 @@ public:
// Inform player, who submitted this ticket, that it is closed
if (Player* submitter = ticket->GetPlayer())
{
- if (submitter->IsInWorld())
- {
- WorldPacket data(SMSG_GMTICKET_DELETETICKET, 4);
- data << uint32(GMTICKET_RESPONSE_TICKET_DELETED);
- submitter->GetSession()->SendPacket(&data);
- }
+ WorldPacket data(SMSG_GMTICKET_DELETETICKET, 4);
+ data << uint32(GMTICKET_RESPONSE_TICKET_DELETED);
+ submitter->GetSession()->SendPacket(&data);
}
return true;
}
@@ -232,8 +229,7 @@ public:
}
if (Player* player = ticket->GetPlayer())
- if (player->IsInWorld())
- ticket->SendResponse(player->GetSession());
+ ticket->SendResponse(player->GetSession());
SQLTransaction trans = SQLTransaction(NULL);
ticket->SetCompleted();
@@ -273,13 +269,10 @@ public:
if (Player* player = ticket->GetPlayer())
{
- if (player->IsInWorld())
- {
- // Force abandon ticket
- WorldPacket data(SMSG_GMTICKET_DELETETICKET, 4);
- data << uint32(GMTICKET_RESPONSE_TICKET_DELETED);
- player->GetSession()->SendPacket(&data);
- }
+ // Force abandon ticket
+ WorldPacket data(SMSG_GMTICKET_DELETETICKET, 4);
+ data << uint32(GMTICKET_RESPONSE_TICKET_DELETED);
+ player->GetSession()->SendPacket(&data);
}
return true;
@@ -301,8 +294,7 @@ public:
ticket->SetEscalatedStatus(TICKET_IN_ESCALATION_QUEUE);
if (Player* player = ticket->GetPlayer())
- if (player->IsInWorld())
- sTicketMgr->SendTicket(player->GetSession(), ticket);
+ sTicketMgr->SendTicket(player->GetSession(), ticket);
sTicketMgr->UpdateLastChange();
return true;
@@ -372,7 +364,7 @@ public:
// Get security level of player, whom this ticket is assigned to
uint32 security = SEC_PLAYER;
Player* assignedPlayer = ticket->GetAssignedPlayer();
- if (assignedPlayer && assignedPlayer->IsInWorld())
+ if (assignedPlayer)
security = assignedPlayer->GetSession()->GetSecurity();
else
{
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
index d5bd2bcae7e..072dbd81fd8 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
@@ -212,7 +212,6 @@ class boss_anubarak_trial : public CreatureScript
}
void MoveInLineOfSight(Unit* /*who*/) override
-
{
if (!_intro)
{
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
index 79fb154d6e3..e3ad891fdc7 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
@@ -68,15 +68,10 @@ class instance_trial_of_the_crusader : public InstanceMapScript
else
player->SendUpdateWorldState(UPDATE_STATE_UI_SHOW, 0);
- // make sure Anub'arak isnt missing and floor is destroyed after a crash
+ // make sure Anub'arak isnt missing
if (GetBossState(BOSS_LICH_KING) == DONE && TrialCounter && GetBossState(BOSS_ANUBARAK) != DONE)
- {
- if (Creature* anubArak = ObjectAccessor::GetCreature(*player, GetGuidData(NPC_ANUBARAK)))
- anubArak = player->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
-
- if (GameObject* floor = ObjectAccessor::GetGameObject(*player, GetGuidData(GO_ARGENT_COLISEUM_FLOOR)))
- floor->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
- }
+ if (!ObjectAccessor::GetCreature(*player, GetGuidData(NPC_ANUBARAK)))
+ player->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
}
void OpenDoor(ObjectGuid guid)
@@ -160,23 +155,15 @@ class instance_trial_of_the_crusader : public InstanceMapScript
switch (go->GetEntry())
{
case GO_CRUSADERS_CACHE_10:
- if (instance->GetSpawnMode() == RAID_DIFFICULTY_10MAN_NORMAL)
- CrusadersCacheGUID = go->GetGUID();
- break;
case GO_CRUSADERS_CACHE_25:
- if (instance->GetSpawnMode() == RAID_DIFFICULTY_25MAN_NORMAL)
- CrusadersCacheGUID = go->GetGUID();
- break;
case GO_CRUSADERS_CACHE_10_H:
- if (instance->GetSpawnMode() == RAID_DIFFICULTY_10MAN_HEROIC)
- CrusadersCacheGUID = go->GetGUID();
- break;
case GO_CRUSADERS_CACHE_25_H:
- if (instance->GetSpawnMode() == RAID_DIFFICULTY_25MAN_HEROIC)
- CrusadersCacheGUID = go->GetGUID();
+ CrusadersCacheGUID = go->GetGUID();
break;
case GO_ARGENT_COLISEUM_FLOOR:
FloorGUID = go->GetGUID();
+ if (GetBossState(BOSS_LICH_KING) == DONE)
+ go->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
break;
case GO_MAIN_GATE_DOOR:
MainGateDoorGUID = go->GetGUID();
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
index d8ec322c57c..885017c24dd 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
@@ -207,11 +207,8 @@ class npc_announcer_toc10 : public CreatureScript
creature->CastSpell(creature, SPELL_CORPSE_TELEPORT, false);
creature->CastSpell(creature, SPELL_DESTROY_FLOOR_KNOCKUP, false);
- Creature* anubArak = ObjectAccessor::GetCreature(*creature, instance->GetGuidData(NPC_ANUBARAK));
- if (!anubArak || !anubArak->IsAlive())
- anubArak = creature->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
-
- instance->SetBossState(BOSS_ANUBARAK, NOT_STARTED);
+ if (!ObjectAccessor::GetCreature(*creature, instance->GetGuidData(NPC_ANUBARAK)))
+ creature->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
if (creature->IsVisible())
creature->SetVisible(false);
@@ -319,19 +316,15 @@ class boss_lich_king_toc : public CreatureScript
case 5080:
{
if (GameObject* go = ObjectAccessor::GetGameObject(*me, _instance->GetGuidData(GO_ARGENT_COLISEUM_FLOOR)))
- {
- go->SetDisplayId(DISPLAYID_DESTROYED_FLOOR);
- go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED | GO_FLAG_NODESPAWN);
- go->SetGoState(GO_STATE_ACTIVE);
- }
+ go->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
me->CastSpell(me, SPELL_CORPSE_TELEPORT, false);
me->CastSpell(me, SPELL_DESTROY_FLOOR_KNOCKUP, false);
_instance->SetBossState(BOSS_LICH_KING, DONE);
- Creature* temp = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_ANUBARAK));
- if (!temp || !temp->IsAlive())
- temp = me->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
+
+ if (!ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_ANUBARAK)))
+ me->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
_instance->SetData(TYPE_EVENT, 0);
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h
index cf08fb75228..e37148aa508 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h
@@ -42,9 +42,7 @@ enum SpellIds
enum MiscData
{
- DESPAWN_TIME = 1200000,
-
- DISPLAYID_DESTROYED_FLOOR = 9060
+ DESPAWN_TIME = 1200000
};
const Position ToCSpawnLoc[]=
@@ -133,7 +131,7 @@ const Position LichKingLoc[]=
const Position AnubarakLoc[]=
{
- {787.932556f, 133.289780f, 142.612152f, 0}, // 0 - Anub'arak start location
+ {783.9305f, 132.9722f, 142.6711f, 3.141593f}, // 0 - Anub'arak Spawn Location (sniffed)
{695.240051f, 137.834824f, 142.200000f, 0}, // 1 - Anub'arak move point location
{694.886353f, 102.484665f, 142.119614f, 0}, // 3 - Nerub Spawn
{694.500671f, 185.363968f, 142.117905f, 0}, // 5 - Nerub Spawn
@@ -232,13 +230,13 @@ enum CreatureIds
NPC_HORDE_WARLOCK = 34450,
NPC_HORDE_WARRIOR = 34453,
- NPC_LIGHTBANE = 34497,
- NPC_DARKBANE = 34496,
+ NPC_LIGHTBANE = 34497,
+ NPC_DARKBANE = 34496,
- NPC_DARK_ESSENCE = 34567,
- NPC_LIGHT_ESSENCE = 34568,
+ NPC_DARK_ESSENCE = 34567,
+ NPC_LIGHT_ESSENCE = 34568,
- NPC_ANUBARAK = 34564
+ NPC_ANUBARAK = 34564
};
enum GameObjectIds
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp
index 5e55256ae59..d5c07fb6942 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp
@@ -178,6 +178,8 @@ class boss_rotface : public CreatureScript
if (summon->GetEntry() == NPC_VILE_GAS_STALKER)
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PROFESSOR_PUTRICIDE)))
professor->CastSpell(summon, SPELL_VILE_GAS_H, true);
+
+ summons.Summon(summon);
}
void UpdateAI(uint32 diff) override
diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp
index 63562436196..e35f7c9b70e 100644
--- a/src/server/scripts/World/go_scripts.cpp
+++ b/src/server/scripts/World/go_scripts.cpp
@@ -24,7 +24,6 @@ go_ethereum_stasis
go_sacred_fire_of_life
go_shrine_of_the_birds
go_southfury_moonstone
-go_field_repair_bot_74A
go_orb_of_command
go_resonite_cask
go_tablet_of_madness
@@ -94,24 +93,6 @@ public:
};
/*######
-## go_field_repair_bot_74A
-######*/
-
-class go_field_repair_bot_74A : public GameObjectScript
-{
-public:
- go_field_repair_bot_74A() : GameObjectScript("go_field_repair_bot_74A") { }
-
- bool OnGossipHello(Player* player, GameObject* /*go*/) override
- {
- if (player->HasSkill(SKILL_ENGINEERING) && player->GetBaseSkillValue(SKILL_ENGINEERING) >= 300 && !player->HasSpell(22704))
- player->CastSpell(player, 22864, false);
-
- return true;
- }
-};
-
-/*######
## go_gilded_brazier (Paladin First Trail quest (9678))
######*/
@@ -1284,7 +1265,6 @@ void AddSC_go_scripts()
{
new go_cat_figurine();
new go_barov_journal();
- new go_field_repair_bot_74A();
new go_gilded_brazier();
new go_orb_of_command();
new go_shrine_of_the_birds();