aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2014_08_10_00_world_quest_template.sql2
-rw-r--r--sql/updates/world/2014_08_10_01_world_misc.sql90
-rw-r--r--sql/updates/world/2014_08_10_02_world_misc.sql238
-rw-r--r--sql/updates/world/2014_08_11_00_world_misc.sql102
-rw-r--r--sql/updates/world/2014_08_11_01_world_misc.sql70
-rw-r--r--sql/updates/world/2014_08_12_00_world_sai.sql352
-rw-r--r--sql/updates/world/2014_08_12_01_world_misc.sql3
-rw-r--r--sql/updates/world/2014_08_13_00_world_sai.sql95
-rw-r--r--sql/updates/world/2014_08_14_00_world_gameobject.sql4
-rw-r--r--sql/updates/world/2014_08_14_01_world_creature_template.sql16
-rw-r--r--sql/updates/world/2014_08_14_02_world_misc.sql197
-rw-r--r--sql/updates/world/2014_08_15_00_world_sai.sql39
-rw-r--r--sql/updates/world/2014_08_15_01_world_misc.sql170
-rw-r--r--sql/updates/world/2014_08_15_02_world_misc.sql106
-rw-r--r--sql/updates/world/2014_08_16_00_world_misc.sql55
-rw-r--r--sql/updates/world/2014_08_18_00_world_ulduar.sql100
-rw-r--r--sql/updates/world/2014_08_18_01_world_command.sql8
-rw-r--r--sql/updates/world/2014_08_19_00_world_misc.sql9
-rw-r--r--sql/updates/world/2014_08_19_01_world_event.sql231
-rw-r--r--sql/updates/world/2014_08_19_02_world_misc.sql84
-rw-r--r--sql/updates/world/2014_08_20_00_world_sai.sql191
-rw-r--r--sql/updates/world/2014_08_21_00_world_conditions.sql4
-rw-r--r--sql/updates/world/2014_08_21_01_world_achievement_criteria_data.sql7
-rw-r--r--src/server/authserver/Server/AuthSession.cpp84
-rw-r--r--src/server/authserver/Server/AuthSession.h4
-rw-r--r--src/server/collision/Management/VMapManager2.h24
-rw-r--r--src/server/collision/Maps/MapTree.h2
-rw-r--r--src/server/collision/Models/ModelInstance.h4
-rw-r--r--src/server/collision/Models/WorldModel.cpp8
-rw-r--r--src/server/game/AI/CoreAI/CombatAI.h40
-rw-r--r--src/server/game/AI/CoreAI/GameObjectAI.h2
-rw-r--r--src/server/game/AI/CoreAI/GuardAI.h6
-rw-r--r--src/server/game/AI/CoreAI/PassiveAI.cpp2
-rw-r--r--src/server/game/AI/CoreAI/PassiveAI.h34
-rw-r--r--src/server/game/AI/CoreAI/PetAI.cpp2
-rw-r--r--src/server/game/AI/CoreAI/PetAI.h20
-rw-r--r--src/server/game/AI/CoreAI/ReactorAI.h4
-rw-r--r--src/server/game/AI/CoreAI/TotemAI.h8
-rw-r--r--src/server/game/AI/CoreAI/UnitAI.h4
-rw-r--r--src/server/game/AI/CreatureAI.h2
-rw-r--r--src/server/game/AI/CreatureAIFactory.h8
-rw-r--r--src/server/game/AI/CreatureAISelector.cpp2
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedCreature.h50
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.h16
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h14
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp2
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.h100
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp2
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h2
-rw-r--r--src/server/game/Accounts/RBAC.h56
-rw-r--r--src/server/game/Achievements/AchievementMgr.cpp8
-rw-r--r--src/server/game/Battlefield/Battlefield.h8
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldWG.h40
-rw-r--r--src/server/game/Battlegrounds/ArenaScore.h4
-rw-r--r--src/server/game/Battlegrounds/Battleground.cpp4
-rw-r--r--src/server/game/Battlegrounds/BattlegroundQueue.h8
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAB.h32
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAV.h38
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundBE.h10
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundDS.h12
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundEY.h38
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundIC.h40
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundNA.h10
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundRL.h10
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundRV.h10
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundSA.h30
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundWS.h38
-rw-r--r--src/server/game/Chat/Chat.cpp4
-rw-r--r--src/server/game/Chat/Chat.h16
-rw-r--r--src/server/game/Chat/ChatLink.h28
-rw-r--r--src/server/game/Combat/ThreatManager.h6
-rw-r--r--src/server/game/DungeonFinding/LFGScripts.h16
-rw-r--r--src/server/game/Entities/Corpse/Corpse.h4
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp10
-rw-r--r--src/server/game/Entities/Creature/Creature.h99
-rw-r--r--src/server/game/Entities/Creature/TemporarySummon.h40
-rw-r--r--src/server/game/Entities/DynamicObject/DynamicObject.h6
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp11
-rw-r--r--src/server/game/Entities/GameObject/GameObject.h34
-rw-r--r--src/server/game/Entities/Item/Container/Bag.h14
-rw-r--r--src/server/game/Entities/Item/Item.cpp8
-rw-r--r--src/server/game/Entities/Item/Item.h6
-rw-r--r--src/server/game/Entities/Object/Object.cpp2
-rw-r--r--src/server/game/Entities/Object/Object.h16
-rw-r--r--src/server/game/Entities/Object/Updates/UpdateData.cpp6
-rw-r--r--src/server/game/Entities/Pet/Pet.cpp5
-rw-r--r--src/server/game/Entities/Pet/Pet.h26
-rw-r--r--src/server/game/Entities/Player/Player.cpp14
-rw-r--r--src/server/game/Entities/Player/Player.h78
-rw-r--r--src/server/game/Entities/Totem/Totem.h24
-rw-r--r--src/server/game/Entities/Transport/Transport.cpp12
-rw-r--r--src/server/game/Entities/Transport/Transport.h4
-rw-r--r--src/server/game/Entities/Unit/StatSystem.cpp8
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp10
-rw-r--r--src/server/game/Entities/Unit/Unit.h22
-rw-r--r--src/server/game/Entities/Vehicle/Vehicle.h8
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp249
-rw-r--r--src/server/game/Globals/ObjectMgr.h1
-rw-r--r--src/server/game/Grids/GridStates.h8
-rw-r--r--src/server/game/Groups/Group.h2
-rw-r--r--src/server/game/Groups/GroupReference.h6
-rw-r--r--src/server/game/Guilds/Guild.h38
-rw-r--r--src/server/game/Handlers/ArenaTeamHandler.cpp4
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp4
-rw-r--r--src/server/game/Handlers/NPCHandler.h6
-rw-r--r--src/server/game/Handlers/SpellHandler.cpp2
-rw-r--r--src/server/game/Loot/LootMgr.h4
-rw-r--r--src/server/game/Maps/Map.cpp6
-rw-r--r--src/server/game/Maps/Map.h28
-rw-r--r--src/server/game/Maps/MapInstanced.h10
-rw-r--r--src/server/game/Maps/MapReference.h6
-rw-r--r--src/server/game/Miscellaneous/Formulas.h33
-rw-r--r--src/server/game/Miscellaneous/SharedDefines.h2
-rw-r--r--src/server/game/Movement/FollowerReference.h6
-rwxr-xr-xsrc/server/game/Movement/MovementGenerator.h10
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h6
-rw-r--r--src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h2
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/IdleMovementGenerator.h34
-rw-r--r--src/server/game/Movement/MovementGenerators/PointMovementGenerator.h14
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h4
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvP.h6
-rw-r--r--src/server/game/Scripting/ScriptLoader.cpp1
-rw-r--r--src/server/game/Scripting/ScriptMgr.cpp23
-rw-r--r--src/server/game/Scripting/ScriptMgr.h47
-rw-r--r--src/server/game/Server/WorldSession.cpp14
-rw-r--r--src/server/game/Server/WorldSession.h19
-rw-r--r--src/server/game/Server/WorldSocket.cpp137
-rw-r--r--src/server/game/Server/WorldSocket.h8
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp16
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp2
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.h12
-rw-r--r--src/server/game/Spells/Spell.cpp11
-rw-r--r--src/server/game/Spells/Spell.h6
-rw-r--r--src/server/game/Spells/SpellEffects.cpp2
-rw-r--r--src/server/game/Spells/SpellScript.h10
-rw-r--r--src/server/game/Texts/CreatureTextMgr.cpp2
-rw-r--r--src/server/game/Warden/WardenMac.h14
-rw-r--r--src/server/game/Warden/WardenWin.h14
-rw-r--r--src/server/game/Weather/WeatherMgr.cpp2
-rw-r--r--src/server/game/World/World.h8
-rw-r--r--src/server/scripts/Commands/cs_ban.cpp16
-rw-r--r--src/server/scripts/Commands/cs_gobject.cpp2
-rw-r--r--src/server/scripts/Commands/cs_guild.cpp2
-rw-r--r--src/server/scripts/Commands/cs_message.cpp2
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp47
-rw-r--r--src/server/scripts/Commands/cs_reload.cpp88
-rw-r--r--src/server/scripts/Commands/cs_ticket.cpp2
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp72
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp12
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp10
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h14
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp16
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp150
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp1415
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp86
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h35
-rw-r--r--src/server/scripts/Outland/zone_netherstorm.cpp323
-rw-r--r--src/server/scripts/Pet/pet_hunter.cpp2
-rw-r--r--src/server/scripts/Spells/spell_item.cpp2
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp2
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp2
-rw-r--r--src/server/scripts/Spells/spell_rogue.cpp2
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp2
-rw-r--r--src/server/shared/Common.h47
-rw-r--r--src/server/shared/Database/DatabaseWorkerPool.h99
-rw-r--r--src/server/shared/Database/Implementation/CharacterDatabase.h2
-rw-r--r--src/server/shared/Database/Implementation/LoginDatabase.h2
-rw-r--r--src/server/shared/Database/Implementation/WorldDatabase.cpp4
-rw-r--r--src/server/shared/Database/Implementation/WorldDatabase.h3
-rw-r--r--src/server/shared/Database/MySQLConnection.cpp10
-rw-r--r--src/server/shared/Database/PreparedStatement.h2
-rw-r--r--src/server/shared/Database/QueryHolder.cpp8
-rw-r--r--src/server/shared/Database/QueryHolder.h10
-rw-r--r--src/server/shared/Database/QueryResult.cpp2
-rw-r--r--src/server/shared/Database/Transaction.h2
-rw-r--r--src/server/shared/Dynamic/LinkedList.h2
-rw-r--r--src/server/shared/Logging/AppenderConsole.h2
-rw-r--r--src/server/shared/Logging/AppenderDB.h2
-rw-r--r--src/server/shared/Logging/AppenderFile.h2
-rw-r--r--src/server/shared/Networking/MessageBuffer.h95
-rw-r--r--src/server/shared/Networking/Socket.h163
-rw-r--r--src/server/shared/Packets/ByteBuffer.cpp5
-rw-r--r--src/server/shared/Packets/ByteBuffer.h14
-rw-r--r--src/server/shared/Packets/WorldPacket.h2
-rw-r--r--src/server/shared/Threading/ProducerConsumerQueue.h11
-rw-r--r--src/server/worldserver/Main.cpp63
-rw-r--r--src/tools/mmaps_generator/PathGenerator.cpp2
187 files changed, 5380 insertions, 1869 deletions
diff --git a/sql/updates/world/2014_08_10_00_world_quest_template.sql b/sql/updates/world/2014_08_10_00_world_quest_template.sql
new file mode 100644
index 00000000000..f77c3927499
--- /dev/null
+++ b/sql/updates/world/2014_08_10_00_world_quest_template.sql
@@ -0,0 +1,2 @@
+-- Fix Hunter Trainers offering Hunter quest to Rogues
+UPDATE `quest_template` SET `RequiredClasses`=4 WHERE `id` IN (6721,6722);
diff --git a/sql/updates/world/2014_08_10_01_world_misc.sql b/sql/updates/world/2014_08_10_01_world_misc.sql
new file mode 100644
index 00000000000..c6bd7857d3f
--- /dev/null
+++ b/sql/updates/world/2014_08_10_01_world_misc.sql
@@ -0,0 +1,90 @@
+DELETE FROM `creature_text` WHERE `entry` IN(17058,16794,16938,21257,21279,16795,19354,20680,19191,19273,19255,20677,20678,20679);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
+(17058, 0, 0, 'Do not stop! I promise you a thousand deaths if you even think about putting down that pick!', 12, 0, 100, 0, 0, 0, 'Illidari Taskmaster',16425),
+(17058, 0, 1, 'Dig faster, wretch! Do not force me to show you the true meaning of pain!', 12, 0, 100, 0, 0, 0, 'Illidari Taskmaster',16424),
+(17058, 0, 2, 'Faster, scum! The Master won''t be pleased if we don''t find the Ata''mal crystal he''s after.', 12, 0, 100, 0, 0, 0, 'Illidari Taskmaster',16421),
+(17058, 1, 0, 'You dare interfere with the Master''s endeavors? You will pay, foolish mortal!', 12, 0, 100, 0, 0, 0, 'Illidari Taskmaster',16438),
+(17058, 1, 1, 'Slay these intruders, filthy Dreghood! I promise you neverending pain if you disobey me!', 12, 0, 100, 0, 0, 0, 'Illidari Taskmaster',16439),
+(17058, 1, 2, 'Go, you little wretches! Show these fools that our Master is not to be trifled with!', 12, 0, 100, 0, 0, 0, 'Illidari Taskmaster',16440),
+(17058, 1, 3, 'Do not even think of fleeing, Broken wretches! I promise you a fate worse than death if you don''t slay these intruders!', 12, 0, 100, 0, 0, 0, 'Illidari Taskmaster',16441),
+(16794, 0, 0, '...a potent concoction!', 12, 0, 100, 0, 0, 0, 'Apothecary Azethen',13678),
+(16794, 1, 0, 'But where could I ever find a suitable test subject?', 12, 0, 100, 6, 0, 0, 'Apothecary Azethen',13682),
+(16794, 2, 0, 'Drink this, you blue brute! Disobey me and I promise you a slow, painful death!', 12, 0, 100, 25, 0, 0, 'Apothecary Azethen',13683),
+(16794, 3, 0, 'Hmmm... looks like I''m going to need a new test subject.', 12, 0, 100, 274, 0, 0, 'Apothecary Azethen',13684),
+(16938, 0, 0, 'Put me out of this misery!', 12, 0, 100, 0, 0, 0, 'Dreghood Brute',16471),
+(16938, 0, 1, 'Forgive me... I have no choice.', 12, 0, 100, 0, 0, 0, 'Dreghood Brute',16469),
+(21257, 0, 0, 'Thank you, $n. Now, to perform the test...', 12, 0, 100, 1, 0, 0, 'Apothecary Zelana',19022),
+(21257, 1, 0, 'Ah, I see...', 12, 0, 100, 0, 0, 0, 'Apothecary Zelana',19023),
+(21257, 2, 0, 'Yes, this is unfortunate.', 12, 0, 100, 0, 0, 0, 'Apothecary Zelana',19024),
+(21257, 3, 0, '$n, I have confirmed that this blood is from the Bonechewer clan of orcs, tainted with demonic power. I''m afraid, however, that my current equipment can delve no deeper into this mystery...', 12, 0, 100, 1, 0, 0, 'Apothecary Zelana',19025),
+(21279, 0, 0, 'Please excuse me while I begin my tests...', 12, 0, 100, 1, 0, 0, 'Apothecary Albreck',19065),
+(21279, 1, 0, 'Interesting...', 12, 0, 100, 0, 0, 0, 'Apothecary Albreck',19066),
+(21279, 2, 0, 'But what is this?', 12, 0, 100, 0, 0, 0, 'Apothecary Albreck',19067),
+(21279, 3, 0, 'Oh, my!', 12, 0, 100, 0, 0, 0, 'Apothecary Albreck',19068),
+(21279, 4, 0, 'If my blood hadn''t clotted long ago, it would be boiling with rage right now...', 12, 0, 100, 1, 0, 0, 'Apothecary Albreck',19069),
+(16795, 0, 0, 'I pity you, Forsaken. Your soul is devoid of light.', 12, 35, 100, 0, 0, 0, 'Draenei Prisoner',13685),
+(19354, 0, 0, 'Work these Broken wretches to the bones, Illidari! If there''s anything of value in this forsaken place we shall find it!', 14, 0, 100, 0, 0, 0, 'Arzeth the Merciless',16472),
+(19354, 0, 1, 'Do not allow these wretches a moment of rest! If there''s an Ata''mal crystal here then we shall find it!', 14, 0, 100, 0, 0, 0, 'Arzeth the Merciless',16476),
+(19354, 0, 2, 'Keep a close eye on this Broken scum! Far too many have escaped from us!', 14, 0, 100, 0, 0, 0, 'Arzeth the Merciless',16474),
+(19354, 0, 3, 'We will find what the Master is looking for! Failure is not an option!', 14, 0, 100, 0, 0, 0, 'Arzeth the Merciless',16475),
+(20680, 1, 0, 'That Broken worm gave you that staff, didn''t he? Did he also tell you he''s the one that sold out his tribe? No matter, you will both pay for this!', 14, 0, 100, 0, 0, 0, 'Arzeth the Powerless',18349),
+(19191, 0, 0, 'What insolence! What arrogance! To believe you could defeat me on my own doorstep!', 14, 0, 100, 0, 0, 0, 'Arazzius the Cruel',17653),
+(19191, 1, 0, 'Master, I have failed...', 14, 0, 100, 0, 0, 0, 'Arazzius the Cruel',16429),
+(19273, 0, 0, 'Speak with Wing Commander Brack, $n. He''ll outfit you with one of our armored wyvern destroyers. And, good luck!', 12, 0, 100, 25, 0, 0, 'Forward Commander To''arch',17964),
+(19255, 0, 0, 'Yea, we got problems. I think that''s crystal clear. The question is, what are we gonna do about it?', 12, 1, 100, 1, 0, 0, 'General Krakork',16392),
+(19255, 0, 1, 'Get used to it, girls. We''re out here for the rest of our miserable lives as far as I''m concerned. Welcome to Hellfire Peninsula, your new home.', 12, 1, 100, 1, 0, 0, 'General Krakork',16394),
+(19255, 0, 2, 'How many more of you grunts do I need to send back to mommy and daddy in a body bag before you grow a brain and realize that runnin'' head first into a Legion kill squad is suicide? And don''t nod your thick skulls at me as if you know what I''m talkin'' about!', 12, 1, 100, 1, 0, 0, 'General Krakork',16393),
+(19255, 0, 3, 'I''m not gonna lie to you, soldiers. We''re getting our butts kicked out there! Now which one of you is orc enough to do something about it?', 12, 1, 100, 1, 0, 0, 'General Krakork',16390),
+(20677, 0, 0, 'You''ve freed me! The winds speak to my people once again and grant us their strength. I thank you, stranger.', 12, 0, 100, 1, 0, 0, 'Morod the Windstirrer',18358),
+(20678, 0, 0, 'I am free! I will ask the spirit of fire to return to us so that my people may have the courage to fight their masters! I thank you, $r.', 12, 0, 100, 15, 0, 0, 'Akoru the Firecaller',18356),
+(20679, 0, 0, 'I''m free! The spirit of water returns to my people. It will bring us the wisdom we need to survive in this harsh land. I am in your debt, $n.', 12, 0, 100, 1, 0, 0, 'Aylaan the Waterwaker',18357);
+
+UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`='' WHERE `entry` IN(16794,16795,21257,21279,16764,19273);
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(16794,16795,21257,21279,19255) and `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(1679400,1679500,2125700,2127900) and `source_type`=9;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=17058 AND `source_type`=0 AND `id` IN(2,3);
+DELETE FROM `smart_scripts` WHERE `entryorguid`=16938 AND `source_type`=0 AND `id` IN(1);
+DELETE FROM `smart_scripts` WHERE `entryorguid`=19354 AND `source_type`=0 AND `id` IN(3,4);
+DELETE FROM `smart_scripts` WHERE `entryorguid`=19191 AND `source_type`=0 AND `id` IN(4,5);
+DELETE FROM `smart_scripts` WHERE `entryorguid`=19273 AND `source_type`=0 AND `id` IN(1);
+DELETE FROM `smart_scripts` WHERE `entryorguid`IN(20677,20678,20679) AND `source_type`=0 AND `id` IN(2);
+
+UPDATE `smart_scripts` SET `link`=2 WHERE `entryorguid` IN(20677,20678,20679) AND `source_type`=0 AND `id`=1;
+UPDATE `smart_scripts` SET `link`=4 WHERE `entryorguid`=19354 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
+(17058, 0, 2, 0, 4, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Illidari Taskmaster - On Agro - Say'),
+(17058, 0, 3, 0, 1, 0, 100, 0, 15000, 60000, 45000, 90000, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Illidari Taskmaster - OOC - Say'),
+(16794, 0, 0, 0, 20, 0, 100, 0, 9387, 0, 0, 0, 80, 1679400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Azethen - On Quest Reward (Source of the Corruption) - Run Script'),
+(16795, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 80, 1679500, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei Prisoner - On Data Set 1 1 - Run Script'),
+(16938, 0, 1, 0, 4, 0, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Dreghood Brute - On Agro - Say'),
+(21257, 0, 0, 0, 20, 0, 100, 0, 10449, 0, 0, 0, 80, 2125700, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Zelana - On Quest Reward (Apothecary Zelana) - Run Script'),
+(21279, 0, 0, 0, 20, 0, 100, 0, 10538, 0, 0, 0, 80, 2127900, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Albreck - On Quest Reward (Boiling Blood) - Run Script'),
+(19354, 0, 3, 0, 1, 0, 100, 0, 35000, 45000, 40000, 90000, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Arzeth the Merciless - OOC - Say'),
+(19354, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Arzeth the Merciless - Link - Say'),
+(19191, 0, 4, 0, 4, 0, 100, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Arazzius the Cruel - On Agro - Say'),
+(19191, 0, 5, 0, 6, 0, 100, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Arazzius the Cruel - On Death - Say'),
+(19273, 0, 1, 0, 19, 0, 100, 0, 10129, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Forward Commander To''arch - On Quest Accepted (Mission: The Abyssal Shelf) - Say'),
+(19255, 0, 0, 0, 1, 0, 100, 0, 30000, 60000, 30000, 90000, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'General Krakork - OOC - Say'),
+(20677, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Morod the Windstirrer - Link - Say'),
+(20678, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Akoru the Firecaller - Link - Say'),
+(20679, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Aylaan the Waterwaker - Link - Say'),
+(1679400, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Azethen - Script - Say'),
+(1679400, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Azethen - Script - Say'),
+(1679400, 9, 2, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Azethen - Script - Say'),
+(1679400, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 16795, 0, 0, 0, 0, 0, 0, 'Apothecary Azethen - Script - Set Data 1 1 on Draenei Prisoner'),
+(1679400, 9, 4, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Azethen - Script - Say'),
+(1679500, 9, 0, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei Prisoner - Script - Say'),
+(1679500, 9, 1, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 5, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei Prisoner - Script - Play Emote OneShotEat'),
+(1679500, 9, 2, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei Prisoner - Script - Die'),
+(2125700, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Zelana - Script - Say'),
+(2125700, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Zelana - Script - Say'),
+(2125700, 9, 2, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Zelana - Script - Say'),
+(2125700, 9, 3, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Zelana - Script - Say'),
+(2127900, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Albreck - Script - Say'),
+(2127900, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Albreck - Script - Say'),
+(2127900, 9, 2, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Albreck - Script - Say'),
+(2127900, 9, 3, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Albreck - Script - Say'),
+(2127900, 9, 4, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Albreck - Script - Say');
diff --git a/sql/updates/world/2014_08_10_02_world_misc.sql b/sql/updates/world/2014_08_10_02_world_misc.sql
new file mode 100644
index 00000000000..b07b6a3632d
--- /dev/null
+++ b/sql/updates/world/2014_08_10_02_world_misc.sql
@@ -0,0 +1,238 @@
+DELETE FROM `creature_text` WHERE `entry` IN(19270,19228,18756,19271);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
+(19270, 0, 0, 'If you are ready to laugh, head over to the World''s End Tavern!', 14, 0, 100, 0, 0, 0, 'Shattrath Saul',16380),
+(18756, 0, 0, 'I, like, so don''t get it...', 12, 0, 100, 1, 0, 0, 'Haris Pilton',16888),
+(18756, 0, 1, 'Psshh... whatever.', 12, 0, 100, 1, 0, 0, 'Haris Pilton',16882),
+(18756, 0, 2, 'That''s hot.', 12, 0, 100, 1, 0, 0, 'Haris Pilton',16881),
+(18756, 0, 3, 'That joke''s hot.', 12, 0, 100, 1, 0, 0, 'Haris Pilton',16887),
+(19228, 0, 0, 'Hey all! So how long until the jokes spawn?', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16382),
+(19228, 0, 1, 'I just flew in from Ironforge and, Boy!, are my mount''s wings tired!', 12, 0, 100, 1, 0, 0, 'Perry Gatner',16649),
+(19228, 0, 2, 'Hey folks, go easy on me... it''s my first time.', 12, 0, 100, 24, 0, 0, 'Perry Gatner',16328),
+(19228, 0, 3, 'Thanks for coming out to see me! I hope you are ready for a good time, because I am.', 12, 0, 100, 21, 0, 0, 'Perry Gatner',16327),
+
+
+
+(19228, 1, 0, 'I never met a tauren I didn''t like...', 12, 0, 100, 1, 0, 0, 'Perry Gatner',16378),
+(19228, 2, 0, 'To eat!!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16379),
+(19228, 3, 0, 'Last week I was in Goldshire. Have you been there?', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16651),
+(19228, 4, 0, 'That town''s so small, I asked a kid to draw me a map. He drew it on the back of a Defias wanted poster...', 12, 0, 100, 1, 0, 0, 'Perry Gatner',16652),
+(19228, 5, 0, 'to scale!!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16653),
+(19228, 6, 0, 'Impersonation time!! I call this, "The Silly Tauren."', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16337),
+(19228, 7, 0, 'The comedian clears his throat.', 16, 0, 100, 0, 0, 0, 'Perry Gatner',16338),
+(19228, 8, 0, 'The comedian impersonates a tauren.', 16, 0, 100, 5, 0, 6386, 'Perry Gatner',16580),
+(19228, 9, 0, 'Here''s a good one, why do watermelons have water in them? ', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16333),
+(19228, 10, 0, 'Because they are planted in the spring!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16336),
+(19228, 11, 0, 'What''s the deal with women? I mean they are always like...', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16339),
+(19228, 12, 0, 'The comedian impersonates a human female.', 16, 0, 100, 5, 0, 6143, 'Perry Gatner',16583),
+(19228, 13, 0, 'And then gnomes are even worse! They are always saying stuff like...', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16340),
+(19228, 14, 0, 'The comedian impersonates a gnome.', 16, 0, 100, 5, 0, 6133, 'Perry Gatner',16581),
+(19228, 15, 0, 'What time is it when an elekk sits on your fence?', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16368),
+(19228, 16, 0, 'Time to get a new fence!!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16369),
+(19228, 17, 0, 'If I knew it was going to be like this, I''d have worn my Greater Boots of Laughter.', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16388),
+(19228, 17, 1, 'Apparently my reputation with you people is hostile.', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16385),
+(19228, 17, 2, 'Wow! The laughs don''t drop very often here, do they?', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16389),
+(19228, 18, 0, 'Hey! Hey! Hey! It''s Raliq the drunk... His momma''s so fat she didn''t just make the front cover of Ogre Today...', 12, 0, 100, 25, 0, 0, 'Perry Gatner',16667),
+(19228, 19, 0, 'She made the back cover too!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16668),
+(19228, 20, 0, 'The gnomes used to be a nice respectful people...', 12, 0, 100, 1, 0, 0, 'Perry Gatner',16669),
+(19228, 21, 0, 'The other day I saw one walking down the street shouting, "Once you go gnome, you never go home!"', 12, 0, 100, 1, 0, 4415, 'Perry Gatner',16670),
+(19228, 22, 0, 'I love blood elf women. Especially when they say stuff like this...', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16374),
+(19228, 23, 0, 'The comedian impersonates a blood elf.', 16, 0, 100, 5, 0, 9643, 'Perry Gatner',16582),
+(19228, 24, 0, 'So the blood elves think they''re just one step away from ruling the world...', 12, 0, 100, 1, 0, 0, 'Perry Gatner',16682),
+(19228, 25, 0, 'Twelve steps is more like it!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16683),
+(19228, 26, 0, 'One last impersonation. It''s tough, but let''s see if you can guess who it is...', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16351),
+(19228, 27, 0, 'The comedian impersonates an orc.', 16, 0, 100, 5, 0, 7195, 'Perry Gatner',16584),
+(19228, 28, 0, 'Now that the show''s done, can someone run me through Scarlet Monestary?', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16381),
+(19228, 28, 1, 'Thank you! Don''t forget to tip your waiters! Good night folks.', 12, 0, 100, 0, 0, 0, 'Perry Gatner',16341),
+(19228, 28, 2, 'Well, it''s time to take these comedic muscles elsewhere. Have a good night all!', 12, 0, 100, 23, 0, 0, 'Perry Gatner',16348),
+(19228, 28, 3, 'Is it over already? You''ve been great folks. Walk safely and have a good night.', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16343),
+(19228, 29, 0, 'How many kobolds does it take to change a lantern wick?', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16657),
+(19228, 30, 0, 'You no take candle!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16658),
+(19228, 31, 0, 'Goldshire''s inn advertises a lakeside view...', 12, 0, 100, 1, 0, 0, 'Perry Gatner',16655),
+(19228, 32, 0, 'I saw a murloc swim by my window.', 12, 0, 100, 1, 0, 0, 'Perry Gatner',16656),
+(19228, 33, 0, 'Have you ever noticed that all those cute, orc kids look the same?', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16331),
+(19228, 34, 0, 'It''s too bad they don''t stay cute. There must be some rite of passage in the Barrens called, "Climb ugly tree and fall out."', 12, 0, 100, 0, 0, 0, 'Perry Gatner',16334),
+(19228, 35, 0, 'I''ve heard that gnomes can grant wishes...', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16375),
+(19228, 36, 0, 'Well I wish they''d go away!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16376),
+(19228, 37, 0, 'Look who''s here, it''s Raliq the drunk... His momma''s so fat dragons won''t eat her...', 12, 0, 100, 25, 0, 0, 'Perry Gatner',16665),
+(19228, 38, 0, 'They don''t know where to store the leftovers!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16666),
+(19228, 39, 0, 'My wife and I were happy for 23 years...', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16370),
+(19228, 40, 0, 'And then we met!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16371),
+(19228, 41, 0, 'What do you call a broken boomerang?', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16372),
+(19228, 42, 0, 'A stick!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16373),
+(19228, 43, 0, 'So this gnome tells a tauren that he''s been to Molten Core.', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16332),
+(19228, 44, 0, 'The tauren says, "That''s a load of bull."', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16335),
+(19228, 45, 0, 'How desperate do you have to be for allies that you recruit your livestock?', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16680),
+(19228, 46, 0, 'I own a dog, but I''m not giving him a sword.', 12, 0, 100, 1, 0, 0, 'Perry Gatner',16681),
+(19271, 0, 0, 'Thank you all for coming tonight. Now put your hands together to welcome Shattrath''s best, Perry Gatner!', 12, 0, 100, 21, 0, 0, 'Albert Quarksprocket',16383),
+(19271, 1, 0, 'Perry Gatner! What an act! The cantina is open all night long, so please, stay and enjoy yourselves!', 12, 0, 100, 21, 0, 0, 'Albert Quarksprocket',16384);
+-- Delete the permament spawn of Perry Gatner
+DELETE FROM `creature` WHERE `guid`=6747;
+
+DELETE FROM `waypoints` WHERE `entry` IN(19228,19271,1927100);
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
+(19228,1,-1748.807, 5131.199, -35.77385,'Perry Gatner WP1'),
+(19228,2,-1749.057, 5132.199, -36.02385,'Perry Gatner WP2'),
+(19228,3,-1750.557, 5137.449, -36.02385,'Perry Gatner WP3'), -- Stage
+(19228,4,-1748.807, 5131.199, -35.77385,'Perry Gatner WP4'),
+(19228,5,-1749.029, 5132.317, -36.02094,'Perry Gatner WP5'),
+(19228,6,-1748.779, 5131.067, -36.02094,'Perry Gatner WP6'), -- back
+
+
+(19271,1,-1740.421, 5139.315, -37.04716,'Albert Quarksprocket WP1'),
+(19271,2,-1741.421, 5139.315, -36.54716,'Albert Quarksprocket WP2'),
+(19271,3,-1745.072, 5139.196, -36.11526,'Albert Quarksprocket WP3'),
+(19271,4,-1749.072, 5140.196, -36.11526,'Albert Quarksprocket WP4'),
+(19271,5,-1750.931, 5143.452, -35.98227,'Albert Quarksprocket WP5'), -- Intro
+(19271,6,-1749.931, 5144.202, -36.48227,'Albert Quarksprocket WP6'),
+(19271,7,-1749.181, 5144.952, -36.73227,'Albert Quarksprocket WP7'),
+(19271,8,-1748.681, 5145.452, -36.73227,'Albert Quarksprocket WP8'),
+(19271,9,-1747.681, 5144.952, -36.73227,'Albert Quarksprocket WP9'),
+(19271,10,-1740.931, 5142.721, -37.01586,'Albert Quarksprocket WP10'), -- end
+(19271,11,-1739.931, 5141.971, -37.01586,'Albert Quarksprocket WP11'),
+(19271,12,-1740.726, 5142.045, -37.01049,'Albert Quarksprocket WP12'),
+(19271,13,-1741.726, 5142.545, -37.01049,'Albert Quarksprocket WP13'),
+(19271,14,-1747.726, 5145.545, -37.01049,'Albert Quarksprocket WP14'),
+(19271,15,-1748.1, 5145.452, -36.73235,'Albert Quarksprocket WP15'),
+(19271,16,-1748.6, 5145.952, -36.73235,'Albert Quarksprocket WP16'),
+(19271,17,-1749.35, 5144.952, -36.73235,'Albert Quarksprocket WP17'),
+(19271,18,-1749.85, 5143.702, -36.23235,'Albert Quarksprocket WP18'), -- Outro
+(19271,19,-1749.56, 5143.69, -35.98226,'Albert Quarksprocket WP19'),
+(19271,20,-1748.56, 5143.94, -36.48226,'Albert Quarksprocket WP20'),
+(19271,21,-1747.31, 5144.44, -36.73226,'Albert Quarksprocket WP21'),
+(19271,22,-1748.287, 5144.005, -36.37066,'Albert Quarksprocket WP22'),
+(19271,23,-1747.037, 5144.505, -36.87066,'Albert Quarksprocket WP23'),
+(19271,24,-1745.287, 5145.255, -36.87066,'Albert Quarksprocket WP24'),
+(19271,25,-1741.787, 5142.005, -36.87066,'Albert Quarksprocket WP25'),
+(19271,26,-1737.287, 5138.584, -37.30579,'Albert Quarksprocket WP26');-- end
+
+DELETE FROM `game_event` WHERE `eventEntry` IN(65,66);
+INSERT INTO `game_event` (`eventEntry`, `start_time`, `end_time`, `occurence`, `length`, `holiday`, `description`, `world_event`, `announce`) VALUES
+(65, '2008-01-02 15:55:00', '2020-12-31 06:00:00', 1440, 15, 0, 'Perry Gatner 4pm', 0, 2),
+(66, '2008-01-02 19:55:00', '2020-12-31 06:00:00', 1440, 15, 0, 'Perry Gatner 8pm', 0, 2);
+
+UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN(19270,19228,19271,15106,14990,22015,30567,15105,34949);
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`IN(19270,19228,19271,15106,14990,22015,30567,15105,34949) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(1922800,1922801,1922802,1927000,1927100,1927101,1927102,1927103,1927104,1927105,1927106,1927107,1927108,1927109,1927110,1927111,1927112,1927113,1927114) AND `source_type`=9;
+
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(19270, 0, 0, 0, 68, 0, 100, 0, 65, 0, 0, 0, 80, 1927000, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Shattrath Saul - On Event Start Run Timed action list'),
+(19270, 0, 1, 0, 68, 0, 100, 0, 66, 0, 0, 0, 80, 1927000, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Shattrath Saul - On Event Start Run Timed action list'),
+(1927000, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Shattrath Saul - Script - Say'),
+(1927000, 9, 1, 0, 0, 0, 100, 0, 120000, 120000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Shattrath Saul - Script - Say'),
+(1927000, 9, 2, 0, 0, 0, 100, 0, 120000, 120000, 0, 0, 12, 19228, 1, 900000, 0, 0, 0, 8, 0, 0, 0, -1747.617, 5126.938, -35.78802, 1.867502, 'Shattrath Saul - Script - Spawn Perry Gatner'),
+(1927000, 9, 3, 0, 0, 0, 100, 0, 60000, 60000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 19271, 0, 0, 0, 0, 0, 0, 'Shattrath Saul - Script - Set Data 1 1 on Albert Quarksprocket'),
+(19271, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 53, 0, 19271, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Data 11 - Start WP'),
+(19271, 0, 1, 2, 40, 0, 100, 0, 5, 19271, 0, 0, 54, 13000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Reached WP5 - Pause WP'),
+(19271, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1.867502, 'Albert Quarksprocket - On Reached WP5 - Set Orientation'),
+(19271, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 5000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Reached WP5 - Say line 1'),
+(19271, 0, 4, 0, 52, 0, 100, 0, 0, 19271, 0, 0, 80, 1927104, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Text over line 1 - Run Script '),
+(19271, 0, 5, 6, 40, 0, 100, 0, 10, 19271, 0, 0, 54, 229000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Reached WP10 - Stop WP'),
+(19271, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Reached WP10 - Set Orientation'),
+(19271, 0, 7, 0, 38, 0, 100, 0, 2, 2, 0, 0, 87, 1927102, 1927103, 1927113, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2.03774, 'Albert Quarksprocket - On Reached WP26 - Set Orientation'),
+(19271, 0, 8, 9, 40, 0, 100, 0, 18, 19271, 0, 0, 54, 15000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Reached WP18 - Pause WP'),
+(19271, 0, 9, 10, 61, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1.867502, 'Albert Quarksprocket - On Reached WP18 - Set Orientation'),
+(19271, 0, 10, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 1, 14000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Reached WP18 - Say line 2'),
+(19271, 0, 11, 0, 40, 0, 100, 0, 26, 19271, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 2.03774, 'Albert Quarksprocket - On Reached WP26 - Set Orientation'),
+(19271, 0, 12, 0, 38, 0, 100, 0, 3, 3, 0, 0, 87, 1927100, 1927101, 1927111, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Data set 3 3 - Run Random script'),
+(19271, 0, 13, 0, 38, 0, 100, 0, 4, 4, 0, 0, 87, 1927105, 1927106, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Data set 4 4 - Run Random script'),
+(19271, 0, 14, 0, 38, 0, 100, 0, 5, 5, 0, 0, 87, 1927107, 1927108, 1927114, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Data set 5 5 - Run Random script'),
+(19271, 0, 15, 0, 38, 0, 100, 0, 6, 6, 0, 0, 87, 1927109, 1927110, 1927112, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Data set 5 5 - Run Random script'),
+(1927100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 15, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 1 - Say Line 15 (Perry Gatner'),
+(1927100, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 16, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 1 - Say Line 16 (Perry Gatner'),
+(1927101, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 29, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 2 - Say Line 29 (Perry Gatner'),
+(1927101, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 30, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 2 - Say Line 30 (Perry Gatner'),
+(1927102, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 9, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 3 - Say Line 15 (Perry Gatner'),
+(1927102, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 10, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 3 - Say Line 16 (Perry Gatner'),
+(1927103, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 31, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 3 - Say Line 31 (Perry Gatner'),
+(1927103, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 32, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 3 - Say Line 32 (Perry Gatner'),
+(1927104, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 4 - Set Orientation'),
+(1927104, 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, 'Albert Quarksprocket - - Script 4 - Play emote Oneshot_applause'),
+(1927104, 9, 2, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 5, 25, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 4 - Play emote Oneshot_point'),
+(1927104, 9, 3, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 5, 21, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 4 - Play emote Oneshot_applause'),
+(1927104, 9, 4, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 4 - Set Data 1 1 on Perry Gatner'),
+(1927105, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 5 - Say Line 1 (Perry Gatner'),
+(1927105, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 5 - Say Line 2 (Perry Gatner'),
+(1927106, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 33, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 6 - Say Line 33 (Perry Gatner'),
+(1927106, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 34, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 6 - Say Line 34 (Perry Gatner'),
+(1927107, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 24, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 7 - Say Line 24 (Perry Gatner'),
+(1927107, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 25, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 7 - Say Line 25 (Perry Gatner'),
+(1927108, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 35, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 8 - Say Line 35 (Perry Gatner'),
+(1927108, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 36, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 8 - Say Line 36 (Perry Gatner'),
+(1927109, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 18, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 9 - Say Line 24 (Perry Gatner'),
+(1927109, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 19, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 9 - Say Line 25 (Perry Gatner'),
+(1927110, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 37, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 10 - Say Line 35 (Perry Gatner'),
+(1927110, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 38, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 10 - Say Line 36 (Perry Gatner'),
+(1927111, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 39, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 11 - Say Line 39 (Perry Gatner'),
+(1927111, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 40, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 11 - Say Line 40 (Perry Gatner'),
+(1927112, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 41, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 12 - Say Line 41 (Perry Gatner'),
+(1927112, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 42, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 12 - Say Line 42 (Perry Gatner'),
+(1927113, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 43, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 13 - Say Line 42 (Perry Gatner'),
+(1927113, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 44, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 13 - Say Line 43 (Perry Gatner'),
+(1927114, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 45, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 14 - Say Line 44 (Perry Gatner'),
+(1927114, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 46, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 14 - Say Line 45 (Perry Gatner'),
+(19228, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 53, 0, 19228, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - On Data Set 1 1 - Start WP'),
+(19228, 0, 1, 2, 40, 0, 100, 0, 3, 19228, 0, 0, 54, 220000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - On Reached WP3 - Pause WP'),
+(19228, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 1922800, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - On Reached WP3 - Run Script 1'),
+(19228, 0, 3, 0, 40, 0, 100, 0, 6, 19228, 0, 0, 41, 5000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - On Reached WP6 - Despawn'),
+(19228, 0, 4, 0, 40, 0, 100, 0, 2, 19228, 0, 0, 80, 1922801, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - On Reached WP2 - Run Script 2'),
+(19228, 0, 5, 0, 40, 0, 100, 0, 4, 19228, 0, 0, 80, 1922802, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - On Reached WP6 - Run Script 3'),
+(1922800, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 1, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 45, 4, 4, 0, 0, 0, 0, 19, 19271, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Set Data 4 4 on Albert Quarksprocket'),
+(1922800, 9, 2, 0, 0, 0, 100, 0, 14000, 14000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 3, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 4, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 5, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 6, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 7, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 8, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 19271, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Set Data 2 2 on Albert Quarksprocket'),
+(1922800, 9, 9, 0, 0, 0, 100, 0, 14000, 14000, 0, 0, 1, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 10, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 11, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 12, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 12, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 13, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 13, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 14, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 15, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 45, 3, 3, 0, 0, 0, 0, 19, 19271, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Set Data 3 3 on Albert Quarksprocket'),
+(1922800, 9, 16, 0, 0, 0, 100, 0, 12000, 12000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 18756, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line 1 on Hilton Paris'),
+(1922800, 9, 17, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 1, 17, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 18, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 45, 6, 6, 0, 0, 0, 0, 19, 19271, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Set Data 6 6 on Albert Quarksprocket'),
+(1922800, 9, 19, 0, 0, 0, 100, 0, 14000, 14000, 0, 0, 1, 20, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 20, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 21, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 21, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 22, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 22, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 23, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 23, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 24, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 45, 5, 5, 0, 0, 0, 0, 19, 19271, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Set Data 5 5 on Albert Quarksprocket'),
+(1922800, 9, 25, 0, 0, 0, 100, 0, 14000, 14000, 0, 0, 1, 26, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 26, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 27, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 27, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922800, 9, 38, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 28, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
+(1922801, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 15106, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 2 - Set Data 1 1 on Frostwolf Emissary'),
+(1922801, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 14990, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 2 - Set Data 1 1 on Defilers Emissary'),
+(1922801, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 22015, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 2 - Set Data 1 1 on Eye of the Storm Envoy'),
+(1922801, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 30567, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 2 - Set Data 1 1 on Strand of the Ancients Envoy'),
+(1922801, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 15105, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 2 - Set Data 1 1 on Warsong Emissary'),
+(1922801, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 34949, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 2 - Set Data 1 1 on Isle of Conquest Envoy'),
+(1922802, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 15106, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 3 - Set Data 2 2 on Frostwolf Emissary'),
+(1922802, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 14990, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 3 - Set Data 2 2 on Defilers Emissary'),
+(1922802, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 22015, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 3 - Set Data 2 2 on Eye of the Storm Envoy'),
+(1922802, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 30567, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 3 - Set Data 2 2 on Strand of the Ancients Envoy'),
+(1922802, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 15105, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 3 - Set Data 2 2 on Warsong Emissary'),
+(1922802, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 34949, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 3 - Set Data 2 2 on Isle of Conquest Envoy'),
+(15106, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Frostwolf Emissary - On Data Set 1 1 - Set Phase 2'),
+(15106, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Frostwolf Emissary - On Data Set 2 2 - Set Phase 1'),
+(15106, 0, 2, 0, 1, 2, 100, 0, 14000, 21000, 7000, 21000, 5, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Frostwolf Emissary - OOC (Phase 2) - Play emote oneshot laugh'),
+(14990, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Defilers Emissary - On Data Set 1 1 - Set Phase 2'),
+(14990, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Defilers Emissary - On Data Set 2 2 - Set Phase 1'),
+(14990, 0, 2, 0, 1, 2, 100, 0, 14000, 21000, 7000, 21000, 5, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Defilers Emissary - OOC (Phase 2) - Play emote oneshot laugh'),
+(22015, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Eye of the Storm Envoy - On Data Set 1 1 - Set Phase 2'),
+(22015, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Eye of the Storm Envoy - On Data Set 2 2 - Set Phase 1'),
+(22015, 0, 2, 0, 1, 2, 100, 0, 14000, 21000, 7000, 21000, 5, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Eye of the Storm Envoy - OOC (Phase 2) - Play emote oneshot laugh'),
+(30567, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Strand of the Ancients Envoy - On Data Set 1 1 - Set Phase 2'),
+(30567, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Strand of the Ancients Envoy - On Data Set 2 2 - Set Phase 1'),
+(30567, 0, 2, 0, 1, 2, 100, 0, 14000, 21000, 7000, 21000, 5, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Strand of the Ancients Envoy - OOC (Phase 2) - Play emote oneshot laugh'),
+(15105, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Warsong Emissary - On Data Set 1 1 - Set Phase 2'),
+(15105, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Warsong Emissary - On Data Set 2 2 - Set Phase 1'),
+(15105, 0, 2, 0, 1, 2, 100, 0, 14000, 21000, 7000, 21000, 5, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Warsong Emissary - OOC (Phase 2) - Play emote oneshot laugh'),
+(34949, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Isle of Conquest Envoy - On Data Set 1 1 - Set Phase 2'),
+(34949, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Isle of Conquest Envoy - On Data Set 2 2 - Set Phase 1'),
+(34949, 0, 2, 0, 1, 2, 100, 0, 14000, 21000, 7000, 21000, 5, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Isle of Conquest Envoy - OOC (Phase 2) - Play emote oneshot laugh');
diff --git a/sql/updates/world/2014_08_11_00_world_misc.sql b/sql/updates/world/2014_08_11_00_world_misc.sql
new file mode 100644
index 00000000000..06f80db7758
--- /dev/null
+++ b/sql/updates/world/2014_08_11_00_world_misc.sql
@@ -0,0 +1,102 @@
+DELETE FROM `creature_text` WHERE `entry` IN(17831,17955);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
+(17831, 0, 0, '$n, let''s go see if this plan will work. Come along, Buddy!', 12, 0, 100, 0, 0, 0, 'Watcher Leesa''oh',14608),
+(17831, 1, 0, 'Ok, let''s see about using those mushrooms you brought back to grow the bog lords a new food supply.', 12, 0, 100, 0, 0, 0, 'Watcher Leesa''oh',14609),
+(17831, 2, 0, 'Wait and see what happens!', 12, 0, 100, 0, 0, 0, 'Watcher Leesa''oh',14615),
+(17831, 3, 0, 'Oh Buddy, you big baby! Look, it''s working. It''s really working!! Now all I need to do is grow more of these mushrooms here and the bog lords will likely leave the sporelings alone!', 12, 0, 100, 0, 0, 0, 'Watcher Leesa''oh',14610),
+(17831, 4, 0, 'Oh, thank you, $n! You''ve made it possible to save both the sporelings from the bog lords, and the bog lords from our wrath.', 12, 0, 100, 0, 0, 0, 'Watcher Leesa''oh',14611),
+(17955, 0, 0, 'The %s takes a piece of the mushroom tree and holds it to its ''nose''. Seemingly satisfied, it eats it!', 16, 0, 100, 36, 0, 0, 'Hungry Bog Lord',14612),
+(17955, 1, 0, 'The %s uproots the rest of the mushroom tree and makes off with it.', 16, 0, 100, 36, 0, 0, 'Hungry Bog Lord',14613);
+
+DELETE FROM `waypoints` WHERE `entry` IN(17831,17955,17953);
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
+(17831,1, -280.0389, 8304.785, 20.12167,'Watcher Leesa''oh '),
+(17831,2, -276.2272, 8298.744, 20.00148,'Watcher Leesa''oh '),
+(17831,3, -278.8585, 8289.577, 19.76397,'Watcher Leesa''oh '),
+(17831,4, -280.1085, 8285.827, 19.01397,'Watcher Leesa''oh '),
+(17831,5, -280.6085, 8283.827, 18.51397,'Watcher Leesa''oh '),
+(17831,6, -281.8585, 8280.077, 18.01397,'Watcher Leesa''oh '),
+(17831,7, -288.8013, 8259.563, 17.99014,'Watcher Leesa''oh '),
+(17831,8, -292.6434, 8246.023, 18.64896,'Watcher Leesa''oh '),
+(17831,9, -293.1434, 8240.273, 18.89896,'Watcher Leesa''oh '),
+(17831,10, -293.4886, 8239.822, 19.07904,'Watcher Leesa''oh '),
+(17831,11, -293.4886, 8238.322, 19.57904,'Watcher Leesa''oh '),
+(17831,12, -293.7386, 8235.572, 20.32904,'Watcher Leesa''oh '),
+(17831,13, -293.7386, 8233.572, 20.82904,'Watcher Leesa''oh '), -- event
+(17831,14, -293.5977, 8234.545, 20.6902,'Watcher Leesa''oh '),
+(17831,15, -293.5977, 8236.545, 19.9402,'Watcher Leesa''oh '),
+(17831,16, -293.3477, 8238.295, 19.4402,'Watcher Leesa''oh '),
+(17831,17, -293.0977, 8241.295, 18.9402,'Watcher Leesa''oh '),
+(17831,18, -292.3477, 8250.045, 18.1902,'Watcher Leesa''oh '),
+(17831,19, -291.7706, 8253.604, 18.16209,'Watcher Leesa''oh '),
+(17831,20, -288.8718, 8267.246, 17.94799,'Watcher Leesa''oh '),
+(17831,21, -283.1218, 8282.746, 18.44799,'Watcher Leesa''oh '),
+(17831,22, -282.3718, 8284.746, 18.94799,'Watcher Leesa''oh '),
+(17831,23, -281.6218, 8286.496, 19.44799,'Watcher Leesa''oh '),
+(17831,24, -282.2319, 8284.964, 19.17534,'Watcher Leesa''oh '),
+(17831,25, -281.4819, 8286.714, 19.42534,'Watcher Leesa''oh '),
+(17831,26, -281.4819, 8287.214, 19.67534,'Watcher Leesa''oh '),
+(17831,27, -277.4792, 8293.729, 20.06543,'Watcher Leesa''oh '),
+(17831,28, -276.6099, 8299.607, 20.13173,'Watcher Leesa''oh '),
+(17831,29, -280.3798, 8302.444, 20.07166,'Watcher Leesa''oh '),
+(17831,30,-283.8611, 8302.739, 19.72713,'Watcher Leesa''oh '),
+(17955,1, -350.6533, 8217.619, 23.96465,'Hungry Boglord'),
+(17955,2, -343.4033, 8219.119, 23.71465,'Hungry Boglord'),
+(17955,3, -332.9033, 8217.119, 23.46465,'Hungry Boglord'),
+(17955,4, -330.9033, 8216.619, 22.96465,'Hungry Boglord'),
+(17955,5, -330.5525, 8216.891, 22.75951,'Hungry Boglord'),
+(17955,6, -323.0525, 8215.641, 23.00951,'Hungry Boglord'),
+(17955,7, -315.3025, 8216.391, 23.50951,'Hungry Boglord'),
+(17955,8, -306.3025, 8217.141, 22.75951,'Hungry Boglord'),
+(17955,9, -303.5525, 8217.391, 22.25951,'Hungry Boglord'), -- eat
+(17955,10, -270.5456, 8223.803, 21.73361,'Hungry Boglord'),
+(17955,11, -270.1879, 8223.752, 21.80058,'Hungry Boglord'),
+(17955,12, -269.6879, 8224.002, 21.55058,'Hungry Boglord'),
+(17955,13, -267.1879, 8222.752, 21.05058,'Hungry Boglord'),
+(17955,14, -264.1879, 8221.752, 20.55058,'Hungry Boglord'),
+(17955,15, -251.7115, 8216.566, 20.36899,'Hungry Boglord'),
+(17955,16, -245.7115, 8208.816, 21.11899,'Hungry Boglord'),
+(17955,17, -241.9615, 8204.316, 21.61899,'Hungry Boglord'),
+(17955,18, -235.9615, 8196.316, 21.11899,'Hungry Boglord'),
+(17955,19, -235.5499, 8195.942, 21.19431,'Hungry Boglord'),
+(17955,20, -232.5499, 8192.192, 20.94431,'Hungry Boglord'),
+(17955,21, -226.0499, 8159.192, 21.19431,'Hungry Boglord'),
+(17955,22, -226.1419, 8158.809, 21.23708,'Hungry Boglord'),
+(17955,23, -223.8919, 8147.559, 20.73708,'Hungry Boglord'),
+(17953,1, -223.8919, 8147.559, 20.73708,'Buddy');
+
+
+UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` IN(17831,17953,17955);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(17831,17953,17955) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(1783100,1783101) AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(17831, 0, 0, 1, 20, 0, 100, 0, 9709, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - On Quest Reward - Store Target List'),
+(17831, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 1783101, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - On Quest Reward - Run Script'),
+(17831, 0, 2, 3, 40, 0, 100, 0, 13, 17831, 0, 0, 54, 50000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - On Reached WP21 - Pause WP'),
+(17831, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 1783100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - On Reached WP13 - Run Script'),
+(17831, 0, 4, 5, 40, 0, 100, 0, 31, 17831, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0.9250245, 'Watcher Leesa''oh - On Reached WP41 - Set Orientation'),
+(17831, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 81, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - On Reached WP31 - Set NPC Flags'),
+(17953, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 29, 0, 0, 0, 0, 0, 0, 19, 17831, 0, 0, 0, 0, 0, 0, 'Buddy - On Data Set - Follow Watcher Leesa''oh '),
+(17953, 0, 1, 2, 1, 0, 100, 0, 0, 30000, 60000, 0, 5, 36, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Buddy - OOC - Play emote OneShotAttack1H'),
+(17953, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 4, 643, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Buddy - OOC - Play Sound ID 643'),
+(17953, 0, 3, 0, 25, 0, 100, 0, 0, 0, 0, 0, 89, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Buddy - On Reset Set Random Movement'),
+(17953, 0, 4, 5, 38, 0, 100, 0, 2, 2, 0, 0, 29, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Buddy - On Data Set - Follow Watcher Leesa''oh '),
+(17953, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 53, 0, 17953, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Buddy - OOC - Play Sound ID 643'),
+(17953, 0, 6, 0, 40, 0, 100, 0, 1, 17953, 0, 0, 89, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Buddy - On Reached WP1 - Set Random Movement'),
+(17955, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 53, 1, 17955, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hungry Boglord - On Just Summoned Start WP'),
+(17955, 0, 1, 0, 40, 0, 100, 0, 9, 17955, 0, 0, 54, 11500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hungry Boglord - On Reached WP10 Pause WP'),
+(17955, 0, 2, 0, 40, 0, 100, 0, 23, 17955, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hungry Boglord - On Reached WP24 - Despawn'),
+(1783100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script - Say Line 2'),
+(1783100, 9, 1, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 11, 32618, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script - Cast'),
+(1783100, 9, 2, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script - Say Line 3'),
+(1783100, 9, 3, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 50, 182073, 21, 0, 0, 0, 0, 8, 0, 0, 0, -293.1354, 8218.522, 22.26159, 2.757613, 'Watcher Leesa''oh - Script - Spawn Grown Mushroom'),
+(1783100, 9, 4, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 12, 17955, 1, 30000, 0, 0, 0, 8, 0, 0, 0, -362.3764, 8215.58, 25.25911, 0.3794507, 'Watcher Leesa''oh - Script - Spawn Hungry Boglord'),
+(1783100, 9, 5, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 17955, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script - Say Line 1 on Hungry Boglord'),
+(1783100, 9, 6, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 17953, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script - Set Data 2 2 on Buddy'),
+(1783100, 9, 7, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script - Say Line 4'),
+(1783100, 9, 8, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 17955, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script - Say Line 2 on Hungry Boglord'),
+(1783100, 9, 9, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script - Say Line 4'),
+(1783101, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script 2 - Set Npc Flags'),
+(1783101, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 7000, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script 2 - Say Line 1'),
+(1783101, 9, 3, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 17953, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script 2 - Set Data 1 1 on Buddy'),
+(1783101, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 53, 0, 17831, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script 2 - Start WP');
diff --git a/sql/updates/world/2014_08_11_01_world_misc.sql b/sql/updates/world/2014_08_11_01_world_misc.sql
new file mode 100644
index 00000000000..8b0a17b016f
--- /dev/null
+++ b/sql/updates/world/2014_08_11_01_world_misc.sql
@@ -0,0 +1,70 @@
+UPDATE `creature_text` SET `emote`=5 WHERE `entry`=19831 AND `groupid`=4 AND `id`=0;
+UPDATE `creature_text` SET `emote`=1 WHERE `entry`=19831 AND `groupid`=0 AND `id`=0;
+UPDATE `creature_text` SET `emote`=6 WHERE `entry`=19830 AND `groupid`=0 AND `id`=0;
+UPDATE `creature_text` SET `emote`=1 WHERE `entry`=21504 AND `groupid`=0 AND `id`=0;
+UPDATE `creature_text` SET `emote`=5 WHERE `entry`=21504 AND `groupid`=1 AND `id`=0;
+UPDATE `creature_text` SET `emote`=1 WHERE `entry`=21504 AND `groupid`=2 AND `id`=0;
+UPDATE `creature_text` SET `emote`=1 WHERE `entry`=21504 AND `groupid`=3 AND `id`=0;
+UPDATE `creature_text` SET `emote`=2 WHERE `entry`=18554 AND `groupid`=3 AND `id`=0;
+UPDATE `creature_text` SET `emote`=1 WHERE `entry`=21504 AND `groupid`=4 AND `id`=0;
+UPDATE `creature_text` SET `emote`=1 WHERE `entry`=21504 AND `groupid`=5 AND `id`=0;
+UPDATE `creature_text` SET `emote`=5, `sound`=7274 WHERE `entry`=21504 AND `groupid`=6 AND `id`=0;
+UPDATE `creature_text` SET `emote`=25 WHERE `entry`=21504 AND `groupid`=7 AND `id`=0;
+UPDATE `creature_text` SET `emote`=25 WHERE `entry`=18385 AND `groupid`=1 AND `id`=0;
+
+UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` IN(19466);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(19466) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(1946600) AND `source_type`=9;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=1410 AND `source_type`=0 AND `id`=3;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=5355 AND `source_type`=0 AND `id`=3;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=16769 AND `source_type`=0 AND `id`=17;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=21611 AND `source_type`=0 AND `id`=3;
+
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(19466, 0, 0, 0, 1, 0, 100, 0, 0, 30000, 180000, 240000, 80, 1946600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - OOC - Run Script'),
+(1410, 0, 3, 0, 4, 0, 30, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Firewing Bloodwarder - On Agro - Say'),
+(5355, 0, 3, 0, 4, 0, 30, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Firewing Defender - On Agro - Say'),
+(16769, 0, 17, 0, 4, 0, 30, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Firewing Warlock - On Agro - Say'),
+(21611, 0, 3, 0, 4, 0, 30, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Cabal SkirmisheR - On Agro - Say'),
+(1946600, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 19467, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 1 (Anchorite Karja)'),
+(1946600, 9, 1, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 19468, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 1 (Spymaster Thalodien)'),
+(1946600, 9, 2, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 1'),
+(1946600, 9, 3, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 19469, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 1 (Magistrix Larynna)'),
+(1946600, 9, 4, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 19467, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 2 (Anchorite Karja)'),
+(1946600, 9, 5, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 19467, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 3 (Anchorite Karja)'),
+(1946600, 9, 6, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 19469, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 2 (Magistrix Larynna)'),
+(1946600, 9, 7, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 19468, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 2 (Spymaster Thalodien)'),
+(1946600, 9, 8, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 2'),
+(1946600, 9, 9, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 19468, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 3 (Spymaster Thalodien)');
+
+DELETE FROM `creature_text` WHERE `entry` IN(19466,19468,19541,19467,19469,1410,5355,21661);
+DELETE FROM `creature_text` WHERE `entry` =16769 AND `groupid`=1;
+
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
+(19466, 0, 0, 'Hold your tongue, knave! Do not dare use that tone with a priestess of the Light!', 12, 0, 100, 25, 0, 0, 'Exarch Orelis',16873),
+(19466, 1, 0, 'Even you must admit that your information from defectors is outdated and unreliable. Let us make calculated attacks on these manaforges and gather what information we can.', 12, 0, 100, 5, 0, 0, 'Exarch Orelis',16890),
+(19468, 0, 0, 'Look, sweetheart. No one''s talking about storming Tempest Keep ourselves, but when we see a target of opportunity we have to take it.', 12, 0, 100, 0, 0, 0, 'Spymaster Thalodien',16872),
+(19468, 1, 0, '...and just look at where that got us!', 12, 0, 100, 0, 0, 0, 'Spymaster Thalodien',16889),
+(19468, 2, 0, 'Finally some talk of action from the big guy!', 12, 0, 100, 1, 0, 0, 'Spymaster Thalodien',16891),
+(19541, 0, 0, 'Good thing that we''re surrounded by neighbors with excess machine parts.', 12, 0, 100, 1, 0, 0, 'Netherstorm Agent',17119),
+(19541, 0, 1, 'Maybe I should gather up some other agents and head out there after this shift?', 12, 0, 100, 1, 0, 0, 'Netherstorm Agent',17115),
+(19541, 0, 2, 'Hmm, arcane annihilators are pretty tough. I wonder if Papa Wheeler knows what he''s asking for?', 12, 0, 100, 1, 0, 0, 'Netherstorm Agent',17116),
+(19541, 0, 3, 'Last time someone went out to try to collect the bounty on Netherock, all we got back was a compressed layer of foolhardy adventurer!', 12, 0, 100, 1, 0, 0, 'Netherstorm Agent',19660),
+(19541, 0, 4, 'Netherock?! That thing''ll squish you flat with one step of its massive foot! No thanks!', 12, 0, 100, 1, 0, 0, 'Netherstorm Agent',19659),
+(19467, 0, 0, 'With all due respect, A''dal sent us here to investigate Kael''s activities, not mount a full-scaled attack.', 12, 0, 100, 0, 0, 0, 'Anchorite Karja',16870),
+(19467, 1, 0, 'The magistrix will be happy to know I''m fluent in Thalassian. Your courtesy is not lost on me.', 12, 0, 100, 0, 0, 0, 'Anchorite Karja',16875),
+(19467, 2, 0, 'Back to the topic... we should focus our attention on these manaforges. We need to learn what the enemy is doing with them and why.', 12, 0, 100, 0, 0, 0, 'Anchorite Karja',16876),
+(19469, 0, 0, 'I''m surrounded by idiots!', 12, 10, 100, 5, 0, 0, 'Magistrix Larynna',16874),
+(19469, 1, 0, 'We''ve told you all there is to know! Do you forget that many of us used to be trusted followers of Kael''thas?', 12, 0, 100, 22, 0, 0, 'Magistrix Larynna',16883),
+(1410, 0, 0, 'You won''t escape alive!', 12, 0, 100, 0, 0, 0, 'Firewing Bloodwarder',16249),
+(1410, 0, 1, 'I will have your energy and then your life!', 12, 0, 100, 0, 0, 0, 'Firewing Bloodwarder',16254),
+(5355, 0, 2, 'You won''t escape alive!', 12, 0, 100, 0, 0, 0, 'Firewing Defender',16249),
+(5355, 0, 3, 'You know too much!', 12, 0, 100, 0, 0, 0, 'Firewing Defender',16251),
+(16769, 1, 0, 'For Kael''thas!', 12, 0, 100, 0, 0, 0, 'Firewing Warlock',16252),
+(16769, 1, 1, 'You won''t escape alive!', 12, 0, 100, 0, 0, 0, 'Firewing Warlock',16249),
+(16769, 1, 2, 'Kill them before they get away!', 12, 0, 100, 0, 0, 0, 'Firewing Warlock',16250),
+(16769, 1, 3, 'I will have your energy and then your life!', 12, 0, 100, 0, 0, 0, 'Firewing Warlock',16254),
+(21661, 0, 0, '%s becomes enraged!', 16, 0, 100, 0, 0, 0, 'Cabal Skirmisher',10677),
+(21661, 1, 0, 'The end comes for you!', 12, 0, 100, 0, 0, 0, 'Cabal Skirmisher',16800),
+(21661, 1, 1, 'You will not escape us so easily!', 12, 0, 100, 0, 0, 0, 'Cabal Skirmisher',20165),
+(21661, 1, 2, 'I shall be rewarded!', 12, 0, 100, 0, 0, 0, 'Cabal Skirmisher',16803);
diff --git a/sql/updates/world/2014_08_12_00_world_sai.sql b/sql/updates/world/2014_08_12_00_world_sai.sql
new file mode 100644
index 00000000000..c20c948f2f0
--- /dev/null
+++ b/sql/updates/world/2014_08_12_00_world_sai.sql
@@ -0,0 +1,352 @@
+-- Remove bad gossip linking (linking to same gossip menu option)
+UPDATE `gossip_menu_option` SET `action_menu_id`=0 WHERE `menu_id`=8036 AND `id`=0;
+UPDATE `creature_template` SET `flags_extra`=0 WHERE `entry`=20218;
+
+DELETE FROM `creature` WHERE `id`=21267; -- Delete mana beasts as these are duplicated as are summoned by sunfury nethermancer and permament spawn also exists so these are duplicated.
+
+UPDATE `creature_template` SET `gossip_menu_id`=8046 WHERE `entry`=20397;
+UPDATE `creature_template` SET `gossip_menu_id`=8041 WHERE `entry`=19831;
+UPDATE `creature_template` SET `gossip_menu_id`=8040 WHERE `entry`=19830;
+
+
+DELETE FROM `gossip_menu` WHERE `entry`IN(8036,8113,8115,8116,8046,8045,8041,8042,8040,8039);
+INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES
+(8036, 10045),
+(8036, 9922),
+(8113, 10045),
+(8113, 9922),
+(8115, 10045),
+(8115, 9922),
+(8116, 10045),
+(8116, 9922),
+(8046, 9931), -- 20397
+(8045, 9934), -- 20397
+(8041, 9929), -- 19831
+(8042, 9930), -- 19831
+(8040, 9926), -- 19830
+(8039, 9927); -- 19830
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN(35016,35176);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 35016, 0, 0, 31, 0, 3, 20226, 0, 0, 0, 0, '', 'Interrupt Shutdown only hits Netherstorm Repair Target'),
+(13, 1, 35176, 0, 0, 31, 0, 3, 20226, 0, 0, 0, 0, '', 'Interrupt Shutdown only hits Netherstorm Repair Target');
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN(8036, 8113,8115,8116,8046,8041,8040);
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES
+
+(8036, 0, 0, '<Begin emergency shutdown.>', 18119, 1, 1, 0, 0, 0, 0, '', 0),
+(8113, 0, 0, '<Begin emergency shutdown.>', 18119, 1, 1, 0, 0, 0, 0, '', 0),
+(8115, 0, 0, '<Begin emergency shutdown.>', 18119, 1, 1, 0, 0, 0, 0, '', 0),
+(8116, 0, 0, '<Begin emergency shutdown.>', 18119, 1, 1, 0, 0, 0, 0, '', 0),
+(8046, 0, 0, 'Where did this technology come from?', 17475, 1, 1, 8045, 0, 0, 0, '', 0),
+(8041, 0, 0, 'Who attacked Manaforge Duro?', 17464, 1, 1, 8042, 0, 0, 0, '', 0),
+(8040, 0, 0, 'Ultris?', 17444, 1, 1, 8039, 0, 0, 0, '', 0);
+
+
+
+DELETE FROM `creature_text` WHERE `entry`IN(20209,20417,20418,20440) AND `groupid`=5;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
+(20209, 5, 0, 'Manaforge shutdown aborted. Resuming manaforge activity.', 16, 0, 100, 0, 0, 0, 'manaforge_control fail', 17886),
+(20417, 5, 0, 'Manaforge shutdown aborted. Resuming manaforge activity.', 16, 0, 100, 0, 0, 0, 'manaforge_control fail', 17886),
+(20418, 5, 0, 'Manaforge shutdown aborted. Resuming manaforge activity.', 16, 0, 100, 0, 0, 0, 'manaforge_control fail', 17886),
+(20440, 5, 0, 'Manaforge shutdown aborted. Resuming manaforge activity.', 16, 0, 100, 0, 0, 0, 'manaforge_control fail', 17886);
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`IN(14,15) AND `SourceGroup` IN(8036,8113,8115,8116);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(15, 8036, 0, 0, 0, 9, 0, 10299, 0, 0, 0, 0, 0, '', 'Show gossip option if player has quest marked as taken'),
+(15, 8036, 0, 0, 0, 2, 0, 29366, 1, 0, 0, 0, 0, '', 'Only show gossip option if Player Has got B''naar Access Crystal'),
+(15, 8036, 0, 0, 1, 9, 0, 10329, 0, 0, 0, 0, 0, '', 'Show gossip option if player has quest marked as taken'),
+(15, 8036, 0, 0, 1, 2, 0, 29366, 1, 0, 0, 0, 0, '', 'Only show gossip option if Player Has got B''naar Access Crystal'),
+(15, 8113, 0, 0, 0, 9, 0, 10330, 0, 0, 0, 0, 0, '', 'Show gossip option if player has quest marked as taken'),
+(15, 8113, 0, 0, 0, 2, 0, 29396, 1, 0, 0, 0, 0, '', 'Only show gossip option if Player Has got Coruu Access Crystal'),
+(15, 8113, 0, 0, 1, 9, 0, 10321, 0, 0, 0, 0, 0, '', 'Show gossip option if player has quest marked as taken'),
+(15, 8113, 0, 0, 1, 2, 0, 29396, 1, 0, 0, 0, 0, '', 'Only show gossip option if Player Has got Coruu Access Crystal'),
+(15, 8115, 0, 0, 0, 9, 0, 10338, 0, 0, 0, 0, 0, '', 'Show gossip option if player has quest marked as taken'),
+(15, 8115, 0, 0, 0, 2, 0, 29397, 1, 0, 0, 0, 0, '', 'Only show gossip option if Player Has got Duru Access Crystal'),
+(15, 8115, 0, 0, 1, 9, 0, 10322, 0, 0, 0, 0, 0, '', 'Show gossip option if player has quest marked as taken'),
+(15, 8115, 0, 0, 1, 2, 0, 29397, 1, 0, 0, 0, 0, '', 'Only show gossip option if Player Has got Duru Access Crystal'),
+(15, 8116, 0, 0, 0, 9, 0, 10365, 0, 0, 0, 0, 0, '', 'Show gossip option if player has quest marked as taken'),
+(15, 8116, 0, 0, 0, 2, 0, 29411, 1, 0, 0, 0, 0, '', 'Only show gossip option if Player Has got Ara Access Crystal'),
+(15, 8116, 0, 0, 1, 9, 0, 10323, 0, 0, 0, 0, 0, '', 'Show gossip option if player has quest marked as taken'),
+(15, 8116, 0, 0, 1, 2, 0, 29411, 1, 0, 0, 0, 0, '', 'Only show gossip option if Player Has got Ara Access Crystal'),
+
+(14, 8036, 9922, 0, 0, 2, 0, 29366, 1, 0, 1, 0, 0, '', 'Only show npc text if Player does not have B''naar Access Crystal'),
+(14, 8113, 9922, 0, 0, 2, 0, 29396, 1, 0, 1, 0, 0, '', 'Only show npc text if Player does not have Coruu Access Crystal'),
+(14, 8115, 9922, 0, 0, 2, 0, 29397, 1, 0, 1, 0, 0, '', 'Only show npc text if Player does not have Duru Access Crystal'),
+(14, 8116, 9922, 0, 0, 2, 0, 29411, 1, 0, 1, 0, 0, '', 'Onlyshow npc text if Player does not have Ara Access Crystal'),
+(14, 8036, 10045, 0, 0, 2, 0, 29366, 1, 0, 0, 0, 0, '', 'Only show npc text if Player has B''naar Access Crystal'),
+(14, 8113, 10045, 0, 0, 2, 0, 29396, 1, 0, 0, 0, 0, '', 'Only show npc text if Player has Coruu Access Crystal'),
+(14, 8115, 10045, 0, 0, 2, 0, 29397, 1, 0, 0, 0, 0, '', 'Only show npc text if Player has Duru Access Crystal'),
+(14, 8116, 10045, 0, 0, 2, 0, 29411, 1, 0, 0, 0, 0, '', 'Onlyshow npc text if Player has Ara Access Crystal');
+
+UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI',`ScriptName`= '' WHERE `entry`IN(183770,183956,184311,184312);
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(183770,183956,184311,184312) and `source_type`=1;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(18377000,18395600,18431100,18431200) and `source_type`=9;
+
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(183770,1,0,1,62,0,100,0,8036,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'B''naar Control Console - On Gossip Option Select - Store Target List'),
+(183770,1,1,2,61,0,100,0,0,0,0,0,12,20209,1,120000,0,0,0,8,0,0,0,2918.95, 4189.98, 161.88, 0.34,'B''naar Control Console - Linked with previous event - Summon B''naar Control Console'),
+(183770,1,2,3,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,19,20209,0,0,0,0,0,0,'B''naar Control Console - Linked with previous event - Send Targetlist to B''naar Control Console'),
+(183770,1,3,4,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'B''naar Control Console - Linked with previous event - Close Gossip'),
+(183770,1,4,0,61,0,100,0,0,0,0,0,80,18377000,2,0,0,0,0,1,0,0,0,0,0,0,0,'B''naar Control Console - Linked with previous event - Run Script'),
+(183770,1,5,6,38,0,100,0,1,1,2000,2000,104,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'B''naar Control Console - On Data Set - Fail Quest'),
+(183770,1,6,7,61,0,100,0,0,0,0,0,1,5,0,0,0,0,0,19,20209,0,0,0,0,0,0,'B''naar Control Console - On Data Set - Say'),
+(183770,1,7,8,61,0,100,0,0,0,0,0,45,7,7,0,0,0,0,19,20209,0,0,0,0,0,0,'Ara Control Console - On Data Set - Set Data'),
+(183770,1,8,0,61,0,100,0,0,0,0,0,78,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'B''naar Control Console - On Data Set - Reset Scripts'),
+(18377000,9,0,0,0,0,100,0,0,0,0,0,104,16,0,0,0,0,0,1,0,0,0,0,0,0,0,'B''naar Control Console - Linked with previous event - Run Script'),
+(18377000,9,1,0,0,0,100,0,1000,1000,0,0,45,1,1,0,0,0,0,19,20209,0,0,0,0,0,0,'B''naar Control Console - Script - Set Data B''naar Control Console'),
+(18377000,9,2,0,0,0,100,0,0,0,0,0,45,2,2,0,0,0,0,19,20209,0,0,0,0,0,0,'B''naar Control Console Script - Set Data B''naar Control Console'),
+(18377000,9,3,0,0,0,100,0,29000,29000,0,0,45,2,2,0,0,0,0,19,20209,0,0,0,0,0,0,'B''naar Control Console Script - Set Data B''naar Control Console'),
+(18377000,9,4,0,0,0,100,0,30000,30000,0,0,45,3,3,0,0,0,0,19,20209,0,0,0,0,0,0,'B''naar Control Console Script - Set Data B''naar Control Console'),
+(18377000,9,5,0,0,0,100,0,0,0,0,0,45,2,2,0,0,0,0,19,20209,0,0,0,0,0,0,'B''naar Control Console Script - Set Data B''naar Control Console'),
+(18377000,9,6,0,0,0,100,0,30000,30000,0,0,45,4,4,0,0,0,0,19,20209,0,0,0,0,0,0,'B''naar Control Console Script - Set Data B''naar Control Console'),
+(18377000,9,7,0,0,0,100,0,20000,20000,0,0,45,5,5,0,0,0,0,19,20209,0,0,0,0,0,0,'B''naar Control Console Script - Set Data B''naar Control Console'),
+(18377000,9,8,0,0,0,100,0,10000,10000,0,0,45,6,6,0,0,0,0,19,20209,0,0,0,0,0,0,'B''naar Control Console Script - Set Data B''naar Control Console'),
+(18377000,9,9,0,0,0,100,0,0,0,0,0,45,8,8,0,0,0,0,19,20209,0,0,0,0,0,0,'B''naar Control Console Script - Set Data B''naar Control Console'),
+(18377000,9,10,0,0,0,100,0,0,0,0,0,104,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'B''naar Control Console Script - Set Flags'),
+(183956,1,0,1,62,0,100,0,8113,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Coruu Control Console - On Gossip Option Select - Store Target List'),
+(183956,1,1,2,61,0,100,0,0,0,0,0,12,20417,1,120000,0,0,0,8,0,0,0,2426.77, 2750.38, 133.24, 2.14,'Coruu Control Console - Linked with previous event - Summon Coruu Control Console'),
+(183956,1,2,3,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,19,20417,0,0,0,0,0,0,'Coruu Control Console - Linked with previous event - Send Targetlist to Coruu Control Console'),
+(183956,1,3,4,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Coruu Control Console - Linked with previous event - Close Gossip'),
+(183956,1,4,0,61,0,100,0,0,0,0,0,80,18395600,2,0,0,0,0,1,0,0,0,0,0,0,0,'Coruu Control Console - Linked with previous event - Run Script'),
+(183956,1,5,6,38,0,100,0,1,1,2000,2000,104,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Coruu Control Console - On Data Set - Fail Quest'),
+(183956,1,6,7,61,0,100,0,0,0,0,0,1,5,0,0,0,0,0,19,20417,0,0,0,0,0,0,'Coruu Control Console - On Data Set - Say'),
+(183956,1,7,8,61,0,100,0,0,0,0,0,45,7,7,0,0,0,0,19,20417,0,0,0,0,0,0,'Coruu Control Console - On Data Set - Set Data'),
+(183956,1,8,0,61,0,100,0,0,0,0,0,78,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Coruu Control Console - On Data Set - Reset Scripts'),
+(18395600,9,0,0,0,0,100,0,0,0,0,0,104,16,0,0,0,0,0,1,0,0,0,0,0,0,0,'Coruu Control Console - Linked with previous event - Run Script'),
+(18395600,9,1,0,0,0,100,0,1000,1000,0,0,45,1,1,0,0,0,0,19,20417,0,0,0,0,0,0,'Coruu Control Console - Script - Set Data Coruu Control Console'),
+(18395600,9,2,0,0,0,100,0,0,0,0,0,45,2,2,0,0,0,0,19,20417,0,0,0,0,0,0,'Coruu Control Console Script - Set Data Coruu Control Console'),
+(18395600,9,3,0,0,0,100,0,19000,19000,0,0,45,2,2,0,0,0,0,19,20417,0,0,0,0,0,0,'Coruu Control Console Script - Set Data Coruu Control Console'),
+(18395600,9,4,0,0,0,100,0,20000,20000,0,0,45,2,2,0,0,0,0,19,20417,0,0,0,0,0,0,'Coruu Control Console Script - Set Data Coruu Control Console'),
+(18395600,9,5,0,0,0,100,0,20000,20000,0,0,45,2,2,0,0,0,0,19,20417,0,0,0,0,0,0,'Coruu Control Console Script - Set Data Coruu Control Console'),
+(18395600,9,6,0,0,0,100,0,0,0,0,0,45,3,3,0,0,0,0,19,20417,0,0,0,0,0,0,'Coruu Control Console Script - Set Data Coruu Control Console'),
+(18395600,9,8,0,0,0,100,0,20000,20000,0,0,45,2,2,0,0,0,0,19,20417,0,0,0,0,0,0,'Coruu Control Console Script - Set Data Coruu Control Console'),
+(18395600,9,9,0,0,0,100,0,10000,10000,0,0,45,4,4,0,0,0,0,19,20417,0,0,0,0,0,0,'Coruu Control Console Script - Set Data Coruu Control Console'),
+(18395600,9,10,0,0,0,100,0,10000,10000,0,0,45,8,8,0,0,0,0,19,20417,0,0,0,0,0,0,'Coruu Control Console Script - Set Data Coruu Control Console'),
+(18395600,9,11,0,0,0,100,0,10000,10000,0,0,45,5,5,0,0,0,0,19,20417,0,0,0,0,0,0,'Coruu Control Console Script - Set Data Coruu Control Console'),
+(18395600,9,12,0,0,0,100,0,10000,10000,0,0,45,6,6,0,0,0,0,19,20417,0,0,0,0,0,0,'Coruu Control Console Script - Set Data Coruu Control Console'),
+(18395600,9,13,0,0,0,100,0,0,0,0,0,45,8,8,0,0,0,0,19,20417,0,0,0,0,0,0,'Coruu Control Console Script - Set Data Coruu Control Console'),
+(18395600,9,14,0,0,0,100,0,0,0,0,0,104,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Coruu Control Console Script - Set Flags'),
+(184311,1,0,1,62,0,100,0,8115,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Duru Control Console - On Gossip Option Select - Store Target List'),
+(184311,1,1,2,61,0,100,0,0,0,0,0,12,20418,1,120000,0,0,0,8,0,0,0,2976.48, 2183.29, 163.20, 1.85,'Duru Control Console - Linked with previous event - Summon Duru Control Console'),
+(184311,1,2,3,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,19,20418,0,0,0,0,0,0,'Duru Control Console - Linked with previous event - Send Targetlist to Duru Control Console'),
+(184311,1,3,4,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Duru Control Console - Linked with previous event - Close Gossip'),
+(184311,1,4,0,61,0,100,0,0,0,0,0,80,18431100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Duru Control Console - Linked with previous event - Run Script'),
+(184311,1,5,6,38,0,100,0,1,1,2000,2000,104,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Duru Control Console - On Data Set - Fail Quest'),
+(184311,1,6,7,61,0,100,0,0,0,0,0,1,5,0,0,0,0,0,19,20418,0,0,0,0,0,0,'Duru Control Console - On Data Set - Say'),
+(184311,1,7,8,61,0,100,0,0,0,0,0,45,7,7,0,0,0,0,19,20418,0,0,0,0,0,0,'Duru Control Console - On Data Set - Set Data'),
+(184311,1,8,9,61,0,100,0,0,0,0,0,78,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Duru Control Console - On Data Set - Reset Scripts'),
+(18431100,9,0,0,0,0,100,0,0,0,0,0,104,16,0,0,0,0,0,1,0,0,0,0,0,0,0,'Duru Control Console - Linked with previous event - Run Script'),
+(18431100,9,1,0,0,0,100,0,1000,1000,0,0,45,1,1,0,0,0,0,19,20418,0,0,0,0,0,0,'Duru Control Console - Script - Set Data Duru Control Console'),
+(18431100,9,2,0,0,0,100,0,0,0,0,0,45,2,2,0,0,0,0,19,20418,0,0,0,0,0,0,'Duru Control Console Script - Set Data Duru Control Console'),
+(18431100,9,3,0,0,0,100,0,14000,14000,0,0,45,2,2,0,0,0,0,19,20418,0,0,0,0,0,0,'Duru Control Console Script - Set Data Duru Control Console'),
+(18431100,9,4,0,0,0,100,0,15000,15000,0,0,45,2,2,0,0,0,0,19,20418,0,0,0,0,0,0,'Duru Control Console Script - Set Data Duru Control Console'),
+(18431100,9,5,0,0,0,100,0,15000,15000,0,0,45,2,2,0,0,0,0,19,20418,0,0,0,0,0,0,'Duru Control Console Script - Set Data Duru Control Console'),
+(18431100,9,6,0,0,0,100,0,15000,15000,0,0,45,3,3,0,0,0,0,19,20418,0,0,0,0,0,0,'Duru Control Console Script - Set Data Duru Control Console'),
+(18431100,9,7,0,0,0,100,0,0,0,0,0,45,2,2,0,0,0,0,19,20418,0,0,0,0,0,0,'Duru Control Console Script - Set Data Duru Control Console'),
+(18431100,9,8,0,0,0,100,0,15000,15000,0,0,45,2,2,0,0,0,0,19,20418,0,0,0,0,0,0,'Duru Control Console Script - Set Data Duru Control Console'),
+(18431100,9,9,0,0,0,100,0,15000,15000,0,0,45,2,2,0,0,0,0,19,20418,0,0,0,0,0,0,'Duru Control Console Script - Set Data Duru Control Console'),
+(18431100,9,10,0,0,0,100,0,15000,15000,0,0,45,4,4,0,0,0,0,19,20418,0,0,0,0,0,0,'Duru Control Console Script - Set Data Duru Control Console'),
+(18431100,9,11,0,0,0,100,0,5000,5000,0,0,45,5,5,0,0,0,0,19,20418,0,0,0,0,0,0,'Duru Control Console Script - Set Data Duru Control Console'),
+(18431100,9,12,0,0,0,100,0,10000,10000,0,0,45,6,6,0,0,0,0,19,20418,0,0,0,0,0,0,'Duru Control Console Script - Set Data Duru Control Console'),
+(18431100,9,13,0,0,0,100,0,0,0,0,0,45,8,8,0,0,0,0,19,20418,0,0,0,0,0,0,'Duru Control Console Script - Set Data Duru Control Console'),
+(18431100,9,14,0,0,0,100,0,0,0,0,0,104,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Duru Control Console Script - Set Flags'),
+(184312,1,0,1,62,0,100,0,8116,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ara Control Console - On Gossip Option Select - Store Target List'),
+(184312,1,1,2,61,0,100,0,0,0,0,0,12,20440,1,120000,0,0,0,8,0,0,0,4013.71, 4028.76, 192.10, 1.25,'Ara Control Console - Linked with previous event - Summon Ara Control Console'),
+(184312,1,2,3,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,19,20440,0,0,0,0,0,0,'Ara Control Console - Linked with previous event - Send Targetlist to Ara Control Console'),
+(184312,1,3,4,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ara Control Console - Linked with previous event - Close Gossip'),
+(184312,1,4,0,61,0,100,0,0,0,0,0,80,18431200,2,0,0,0,0,1,0,0,0,0,0,0,0,'Ara Control Console - Linked with previous event - Run Script'),
+(184312,1,5,6,38,0,100,0,1,1,2000,2000,104,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ara Control Console - On Data Set - Fail Quest'),
+(184312,1,6,7,61,0,100,0,0,0,0,0,1,5,0,0,0,0,0,19,20440,0,0,0,0,0,0,'Ara Control Console - On Data Set - Say'),
+(184312,1,7,8,61,0,100,0,0,0,0,0,45,7,7,0,0,0,0,19,20440,0,0,0,0,0,0,'Ara Control Console - On Data Set - Set Data'),
+(184312,1,0,0,61,0,100,0,0,0,0,0,78,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ara Control Console - On Data Set - Reset Scripts'),
+(18431200,9,0,0,0,0,100,0,0,0,0,0,104,16,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ara Control Console - Linked with previous event - Run Script'),
+(18431200,9,1,0,0,0,100,0,1000,1000,0,0,45,1,1,0,0,0,0,19,20440,0,0,0,0,0,0,'Ara Control Console - Script - Set Data Ara Control Console'),
+(18431200,9,2,0,0,0,100,0,0,0,0,0,45,2,2,0,0,0,0,19,20440,0,0,0,0,0,0,'Ara Control Console Script - Set Data Ara Control Console'),
+(18431200,9,3,0,0,0,100,0,14000,14000,0,0,45,2,2,0,0,0,0,19,20440,0,0,0,0,0,0,'Ara Control Console Script - Set Data Ara Control Console'),
+(18431200,9,4,0,0,0,100,0,15000,15000,0,0,45,2,2,0,0,0,0,19,20440,0,0,0,0,0,0,'Ara Control Console Script - Set Data Ara Control Console'),
+(18431200,9,5,0,0,0,100,0,15000,15000,0,0,45,2,2,0,0,0,0,19,20440,0,0,0,0,0,0,'Ara Control Console Script - Set Data Ara Control Console'),
+(18431200,9,6,0,0,0,100,0,15000,15000,0,0,45,3,3,0,0,0,0,19,20440,0,0,0,0,0,0,'Ara Control Console Script - Set Data Ara Control Console'),
+(18431200,9,7,0,0,0,100,0,0,0,0,0,45,2,2,0,0,0,0,19,20440,0,0,0,0,0,0,'Ara Control Console Script - Set Data Ara Control Console'),
+(18431200,9,8,0,0,0,100,0,15000,15000,0,0,45,2,2,0,0,0,0,19,20440,0,0,0,0,0,0,'Ara Control Console Script - Set Data Ara Control Console'),
+(18431200,9,9,0,0,0,100,0,15000,15000,0,0,45,2,2,0,0,0,0,19,20440,0,0,0,0,0,0,'Ara Control Console Script - Set Data Ara Control Console'),
+(18431200,9,10,0,0,0,100,0,15000,15000,0,0,45,4,4,0,0,0,0,19,20440,0,0,0,0,0,0,'Ara Control Console Script - Set Data Ara Control Console'),
+(18431200,9,11,0,0,0,100,0,5000,5000,0,0,45,5,5,0,0,0,0,19,20440,0,0,0,0,0,0,'Ara Control Console Script - Set Data Ara Control Console'),
+(18431200,9,12,0,0,0,100,0,10000,10000,0,0,45,6,6,0,0,0,0,19,20440,0,0,0,0,0,0,'Ara Control Console Script - Set Data Ara Control Console'),
+(18431200,9,13,0,0,0,100,0,0,0,0,0,45,8,8,0,0,0,0,19,20440,0,0,0,0,0,0,'Ara Control Console Script - Set Data Ara Control Console'),
+(18431200,9,14,0,0,0,100,0,0,0,0,0,104,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ara Control Console Script - Set Flags');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`IN(183770,183956,184311,184312);
+
+UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`= '' WHERE `entry` IN(20209,20218, 20226, 20417,20418, 20436, 20440, 20438, 20439, 20460);
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(20209,20218,20226,20417, 20418, 20436, 20440, 20438, 20439, 20460) and `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(2020900, 2020901,2041700,2041800,2044000,2044001,2022600,2022601,2022602,2022603,2021800,2021801,2021802,2021803,2021804,2021804,2021805,2043900,2043901,2021806) and `source_type`=9;
+
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(20209, 0,0,0,38,0,100,0,1,1,0,0,1,0,0,0,0,0,0,12,1,0,0,0,0,0,0,'B''naar Control Console - On Data Set 1 1 - Say'),
+(20209, 0,1,0,38,0,100,0,2,2,0,0,87,2020900,2020901,0,0,0,0,1,0,0,0,0, 0, 0, 0,'B''naar Control Console - On Data Set 2 2 - Run Randomscript'),
+(20209, 0,2,0,38,0,100,0,3,3,0,0,1,1,0,0,0,0,0,12,1,0,0,0,0,0,0,'B''naar Control Console - On Data Set 3 3 - Say'),
+(20209, 0,3,4,38,0,100,0,4,4,0,0,1,2,0,0,0,0,0,12,1,0,0,0,0,0,0,'B''naar Control Console - On Data Set 4 4 - Say'),
+(20209, 0,4,5,61,0,100,0,0,0,0,0,12,20218,1,120000,1,0,0,8,0,0,0,2946.52, 4201.42, 163.47, 3.54,'B''naar Control Console - Linked with Previous Event - Summon Sunfury Technician'),
+(20209, 0,5,6,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,9,20218,0,200,0, 0, 0, 0,'B''naar Control Console - Linked with Previous Event - Send Target list to Sunfury Technician'),
+(20209, 0,6,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,9,20218,0,200,0, 0, 0, 0,'B''naar Control Console - Linked with Previous Event - Set Data to to Sunfury Technician'),
+(20209, 0,7,0,38,0,100,0,5,5,0,0,1,3,0,0,0,0,0,12,1,0,0,0,0,0,0,'B''naar Control Console - On Data Set 5 5 - Say'),
+(20209, 0,8,10,38,0,100,0,6,6,0,0,1,4,0,0,0,0,0,12,1,0,0,0,0,0,0,'B''naar Control Console - On Data Set 6 6 - Say'),
+(20209, 0,9,0,38,0,100,0,7,7,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'B''naar Control Console - On Data Set 7 7 - Despawn'),
+(20209, 0,10,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,20226,0,0,0,0,0,0,'B''naar Control Console - On Data Set 6 6 - Set Data Manaforge Visual Trigger'),
+(20209 ,0,11,12,38,0,100,0,8,8,0,0,33,20209,0,0,0,0,0,12,1,0,0,0,0,0,0,'B''naar Control Console Script - Give Kill Credit'),
+(20209 ,0,12,13,61,0,100,0,0,0,0,0,15,10299,0,0,0,0,0,12,1,0,0,0,0,0,0,'B''naar Control Console Script - Give Kill Credit'),
+(20209 ,0,13,0,61,0,100,0,0,0,0,0,15,10329,0,0,0,0,0,12,1,0,0,0,0,0,0,'B''naar Control Console Script - Give Kill Credit'),
+(2020900, 9,0,0,0,0,100,0,0,0,0,0,12,20218,1,120000,1,0,0,8,0,0,0,2927.36, 4212.97, 164.00, 4.94,'B''naar Control Console - Script 1 - Summon Sunfury Technician'),
+(2020900, 9,1,0,0,0,100,0,0,0,0,0,100,1,0,0,0,0,0,9,20218,0,200,0, 0, 0, 0,'B''naar Control Console - Script 1 - Send Target list to Sunfury Technician'),
+(2020900, 9,2,0,0,0,100,0,0,0,0,0,45,1,1,0,0,0,0,9,20218,0,200,0, 0, 0, 0,'B''naar Control Console - Script 1 - Set Data to to Sunfury Technician'),
+(2020901, 9,0,0,0,0,100,0,0,0,0,0,12,20218,1,120000,1,0,0,8,0,0,0,2933.68, 4162.55, 164.00, 1.60,'B''naar Control Console - Script 2 - Summon Sunfury Technician'),
+(2020901, 9,1,0,0,0,100,0,0,0,0,0,100,1,0,0,0,0,0,9,20218,0,200,0, 0, 0, 0,'B''naar Control Console - Script 2 - Send Target list to Sunfury Technician'),
+(2020901, 9,2,0,0,0,100,0,0,0,0,0,45,1,1,0,0,0,0,9,20218,0,200,0, 0, 0, 0,'B''naar Control Console - Script 2 - Set Data to to Sunfury Technician'),
+(20417, 0,0,0,38,0,100,0,1,1,0,0,1,0,0,0,0,0,0,12,1,0,0,0,0,0,0,'Coruu Control Console - On Data Set 1 1 - Say'),
+(20417, 0,1,0,38,0,100,0,2,2,0,0,80,2041700,2,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Coruu Control Console - On Data Set 2 2 - Run Script'),
+(20417, 0,2,0,38,0,100,0,3,3,0,0,1,1,0,0,0,0,0,12,1,0,0,0,0,0,0,'Coruu Control Console - On Data Set 3 3 - Say'),
+(20417, 0,3,0,38,0,100,0,4,4,0,0,1,2,0,0,0,0,0,12,1,0,0,0,0,0,0,'Coruu Control Console - On Data Set 4 4 - Say'),
+(20417, 0,4,5,38,0,100,0,8,8,0,0,12,20218,1,120000,1,0,0,8,0,0,0,2453.88, 2737.85, 133.27, 2.59,'Coruu Control Console - Linked with Previous Event - Summon Sunfury Technician'),
+(20417, 0,5,6,61,0,100,0,0,0,0,0,12,20218,1,120000,1,0,0,8,0,0,0,2441.62, 2735.32, 134.49, 1.97,'Coruu Control Console - Linked with Previous Event - Summon Sunfury Technician'),
+(20417, 0,6,7,61,0,100,0,0,0,0,0,12,20218,1,120000,1,0,0,8,0,0,0,2450.73, 2754.50, 134.49, 3.29,'Coruu Control Console - Linked with Previous Event - Summon Sunfury Technician'),
+(20417, 0,7,8,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,9,20218,0,200,0, 0, 0, 0,'Coruu Control Console - Linked with Previous Event - Send Target list to Sunfury Technician'),
+(20417, 0,8,0,61,0,100,0,0,0,0,0,45,2,2,0,0,0,0,9,20218,0,200,0, 0, 0, 0,'Coruu Control Console - Linked with Previous Event - Set Data to to Sunfury Technician'),
+(20417, 0,9,0,38,0,100,0,5,5,0,0,1,3,0,0,0,0,0,12,1,0,0,0,0,0,0,'Coruu Control Console - On Data Set 5 5 - Say'),
+(20417, 0,10,12,38,0,100,0,6,6,0,0,1,4,0,0,0,0,0,12,1,0,0,0,0,0,0,'Coruu Control Console - On Data Set 6 6 - Say'),
+(20417, 0,11,0,38,0,100,0,7,7,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Coruu Control Console - On Data Set 7 7 - Despawn'),
+(20417, 0,12,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,20226,0,0,0,0,0,0,'Coruu Control Console - On Data Set 6 6 - Set Data Manaforge Visual Trigger'),
+(20417 ,0,13,14,38,0,100,0,8,8,0,0,33,20417,0,0,0,0,0,12,1,0,0,0,0,0,0,'Coruu Control Console Script - Give Kill Credit'),
+(20417 ,0,14,15,61,0,100,0,0,0,0,0,15,10330,0,0,0,0,0,12,1,0,0,0,0,0,0,'Coru Control Console Script - Give Kill Credit'),
+(20417 ,0,13,0,61,0,100,0,0,0,0,0,15,10321,0,0,0,0,0,12,1,0,0,0,0,0,0,'Coru Control Console Script - Give Kill Credit'),
+(2041700, 9,0,0,0,0,100,0,0,0,0,0,12,20218,1,120000,1,0,0,8,0,0,0,2445.21, 2765.26, 134.49, 3.93,'Coruu Control Console - Script - Summon Sunfury Technician'),
+(2041700, 9,1,0,0,0,100,0,0,0,0,0,12,20218,1,120000,1,0,0,8,0,0,0,2429.86, 2731.85, 134.53, 1.31,'Coruu Control Console - Script - Summon Sunfury Technician'),
+(2041700, 9,2,0,0,0,100,0,0,0,0,0,100,1,0,0,0,0,0,9,20218,0,200,0, 0, 0, 0,'Coruu Control Console - Script - Send Target list to Sunfury Technician'),
+(2041700, 9,3,0,0,0,100,0,0,0,0,0,45,2,2,0,0,0,0,9,20218,0,200,0, 0, 0, 0,'Coruu Control Console - Script - Set Data to to Sunfury Technician'),
+(20418, 0,0,0,38,0,100,0,1,1,0,0,1,0,0,0,0,0,0,12,1,0,0,0,0,0,0,'Duru Control Console - On Data Set 1 1 - Say'),
+(20418, 0,1,0,38,0,100,0,2,2,0,0,80,2041800,2,0,0,0,0,1,0,0,0,0,0,0,0,'Duru Control Console - On Data Set 2 2 - Run Script'),
+(20418, 0,2,0,38,0,100,0,3,3,0,0,1,1,0,0,0,0,0,12,1,0,0,0,0,0,0,'Duru Control Console - On Data Set 3 3 - Say'),
+(20418, 0,3,4,38,0,100,0,4,4,0,0,1,2,0,0,0,0,0,12,1,0,0,0,0,0,0,'Duru Control Console - On Data Set 4 4 - Say'),
+(20418, 0,4,5,61,0,100,0,0,0,0,0,12,20218,1,120000,1,0,0,8,0,0,0,2956.18, 2202.85, 165.32, 5.45,'Duru Control Console - Linked with Previous Event - Summon Sunfury Technician'),
+(20418, 0,5,6,61,0,100,0,0,0,0,0,12,20218,1,120000,1,0,0,8,0,0,0,2975.30, 2211.50, 165.32, 4.55,'Duru Control Console - Linked with Previous Event - Summon Sunfury Technician'),
+(20418, 0,6,7,61,0,100,0,0,0,0,0,12,20436,1,120000,1,0,0,8,0,0,0,2965.02, 2217.45, 164.16, 4.96,'Duru Control Console - Linked with Previous Event - Summon Sunfury Protector'),
+(20418, 0,7,8,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,9,20218,0,200,0, 0, 0, 0,'Duru Control Console - Linked with Previous Event - Send Target list to Sunfury Technician'),
+(20418, 0,8,9,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,9,20436,0,200,0, 0, 0, 0,'Duru Control Console - Linked with Previous Event - Send Target list to Sunfury Protector'),
+(20418, 0,9,10,61,0,100,0,0,0,0,0,45,3,3,0,0,0,0,9,20218,0,200,0, 0, 0, 0,'Duru Control Console - Linked with Previous Event - Set Data to to Sunfury Technician'),
+(20418, 0,10,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,9,20436,0,200,0, 0, 0, 0,'Duru Control Console - Linked with Previous Event - Set Data to to Sunfury Protector'),
+(20418, 0,11,0,38,0,100,0,5,5,0,0,1,3,0,0,0,0,0,12,1,0,0,0,0,0,0,'Duru Control Console - On Data Set 5 5 - Say'),
+(20418, 0,12,14,38,0,100,0,6,6,0,0,1,4,0,0,0,0,0,12,1,0,0,0,0,0,0,'Duru Control Console - On Data Set 6 6 - Say'),
+(20418, 0,13,0,38,0,100,0,7,7,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Duru Control Console - On Data Set 7 7 - Despawn'),
+(20418, 0,14,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,20226,0,0,0,0,0,0,'Duru Control Console - On Data Set 6 6 - Set Data Manaforge Visual Trigger'),
+(20418 ,0,15,16,38,0,100,0,8,8,0,0,33,20418,0,0,0,0,0,12,1,0,0,0,0,0,0,'Duru Control Console Script - Give Kill Credit'),
+(20418 ,0,16,17,61,0,100,0,0,0,0,0,15,10338,0,0,0,0,0,12,1,0,0,0,0,0,0,'Duru Control Console Script - Give Kill Credit'),
+(20418 ,0,17,0,61,0,100,0,0,0,0,0,15,10322,0,0,0,0,0,12,1,0,0,0,0,0,0,'Duru Control Console Script - Give Kill Credit'),
+(2041800, 9,0,0,0,0,100,0,2,2,0,0,12,20218,1,120000,1,0,0,8,0,0,0,2986.80, 2205.36, 165.37, 3.74,'Duru Control Console - Script - Summon Sunfury Technician'),
+(2041800, 9,1,0,0,0,100,0,0,0,0,0,12,20218,1,120000,1,0,0,8,0,0,0,2952.91, 2191.20, 165.32, 0.22,'Duru Control Console - Script - Summon Sunfury Technician'),
+(2041800, 9,2,0,0,0,100,0,0,0,0,0,100,1,0,0,0,0,0,9,20218,0,200,0, 0, 0, 0,'Duru Control Console - Script - Send Target list to Sunfury Technician'),
+(2041800, 9,3,0,0,0,100,0,0,0,0,0,45,3,3,0,0,0,0,9,20218,0,200,0, 0, 0, 0,'Duru Control Console - Script - Set Data to to Sunfury Technician'),
+(20440, 0,0,0,38,0,100,0,1,1,0,0,1,0,0,0,0,0,0,12,1,0,0,0,0,0,0,'Ara Control Console - On Data Set 1 1 - Say'),
+(20440, 0,1,0,38,0,100,0,2,2,0,0,87,2044000,2044001,0,0,0,0,1,0,0,0,0,0,0,0,'Ara Control Console - On Data Set 2 2 - Run Random Script'),
+(20440, 0,2,0,38,0,100,0,3,3,0,0,1,1,0,0,0,0,0,12,1,0,0,0,0,0,0,'Ara Control Console - On Data Set 3 3 - Say'),
+(20440, 0,3,4,38,0,100,0,4,4,0,0,1,2,0,0,0,0,0,12,1,0,0,0,0,0,0,'Ara Control Console - On Data Set 4 4 - Say'),
+(20440, 0,4,5,61,0,100,0,0,0,0,0,12,20439,1,120000,1,0,0,8,0,0,0,3994.51, 4020.46, 192.18, 0.91,'Ara Control Console - Linked with Previous Event - Summon Ara Engineer'),
+(20440, 0,5,6,61,0,100,0,0,0,0,0,12,20460,1,120000,1,0,0,8,0,0,0,4021.56, 4059.35, 193.59, 4.44,'Ara Control Console - Linked with Previous Event - Summon Chief Engineer Gork lonn'),
+(20440, 0,6,7,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,9,20239,0,200,0, 0, 0, 0,'Ara Control Console - Linked with Previous Event - Send Target list to Ara Engineer'),
+(20440, 0,7,8,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,9,20460,0,200,0, 0, 0, 0,'Ara Control Console - Linked with Previous Event - Send Target list to Chief Engineer Gork lonn'),
+(20440, 0,8,9,61,0,100,0,0,0,0,0,45,4,4,0,0,0,0,9,20239,0,200,0, 0, 0, 0,'Ara Control Console - Linked with Previous Event - Set Data to to Ara Engineer'),
+(20440, 0,9,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,9,20460,0,200,0, 0, 0, 0,'Ara Control Console - Linked with Previous Event - Set Data to to Chief Engineer Gork lonn'),
+(20440, 0,10,0,38,0,100,0,5,5,0,0,1,3,0,0,0,0,0,12,1,0,0,0,0,0,0,'Ara Control Console - On Data Set 5 5 - Say'),
+(20440, 0,11,13,38,0,100,0,6,6,0,0,1,4,0,0,0,0,0,12,1,0,0,0,0,0,0,'Ara Control Console - On Data Set 6 6 - Say'),
+(20440, 0,12,0,38,0,100,0,7,7,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ara Control Console - On Data Set 7 7 - Despawn'),
+(20440, 0,13,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,20226,0,0,0,0,0,0,'Ara Control Console - On Data Set 6 6 - Set Data Manaforge Visual Trigger'),
+(20440 ,0,14,15,38,0,100,0,8,8,0,0,33,20440,0,0,0,0,0,12,1,0,0,0,0,0,0,'Ara Control Console Script - Give Kill Credit'),
+(20440 ,0,15,16,61,0,100,0,0,0,0,0,15,10365,0,0,0,0,0,12,1,0,0,0,0,0,0,'Ara Control Console Script - Give Kill Credit'),
+(20440 ,0,16,0,61,0,100,0,0,0,0,0,15,10323,0,0,0,0,0,12,1,0,0,0,0,0,0,'Ara Control Console Script - Give Kill Credit'),
+(2044000, 9,0,0,0,0,100,0,2,2,0,0,12,20438,1,120000,1,0,0,8,0,0,0,4035.11, 4038.97, 194.27, 2.57,'Ara Control Console - Script 1 - Summon Ara Technician'),
+(2044000, 9,1,0,0,0,100,0,0,0,0,0,12,20438,1,120000,1,0,0,8,0,0,0,4033.66, 4036.79, 194.28, 2.57,'Ara Control Console - Script 1 - Summon Ara Technician'),
+(2044000, 9,2,0,0,0,100,0,0,0,0,0,12,20438,1,120000,1,0,0,8,0,0,0,4037.13, 4037.30, 194.23, 2.57,'Ara Control Console - Script 1 - Summon Ara Technician'),
+(2044000, 9,3,0,0,0,100,0,0,0,0,0,100,1,0,0,0,0,0,9,20438,0,200,0, 0, 0, 0,'Ara Control Console - Script 1 - Send Target list to Ara Technician'),
+(2044000, 9,4,0,0,0,100,0,0,0,0,0,45,4,4,0,0,0,0,9,20438,0,200,0, 0, 0, 0,'Ara Control Console - Script 1 - Set Data to to Ara Technician'),
+(2044001, 9,0,0,0,0,100,0,2,2,0,0,12,20438,1,120000,1,0,0,8,0,0,0,3099.59, 4049.30, 194.22, 0.05,'Ara Control Console - Script 2 - Summon Ara Technician'),
+(2044001, 9,1,0,0,0,100,0,0,0,0,0,12,20438,1,120000,1,0,0,8,0,0,0,3999.72, 4046.75, 194.22, 0.05,'Ara Control Console - Script 2 - Summon Ara Technician'),
+(2044001, 9,2,0,0,0,100,0,0,0,0,0,12,20438,1,120000,1,0,0,8,0,0,0,3996.81, 4048.26, 194.22, 0.05,'Ara Control Console - Script 2 - Summon Ara Technician'),
+(2044001, 9,3,0,0,0,100,0,0,0,0,0,100,1,0,0,0,0,0,9,20438,0,200,0, 0, 0, 0,'Ara Control Console - Script 1 - Send Target list to Ara Technician'),
+(2044001, 9,4,0,0,0,100,0,0,0,0,0,45,4,4,0,0,0,0,9,20438,0,200,0, 0, 0, 0,'Ara Control Console - Script 1 - Set Data to to Ara Technician'),
+(20218, 0,0,0,54,0,40,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - On Just Summoned - Say'),
+(20218, 0,1,2,38,0,100,1,1,1,0,0,8,1,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - On Data Set - Set Defensive'),
+(20218, 0,2,0,61,0,100,0,0,0,0,0,87,2021800,2021801,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - On Data Set - Set Defensive'),
+(20218, 0,3,0,1,1,100,1,12000,12000,0,0,45,1,1,0,0,0,0,20,183770,0,0,0, 0, 0, 0,'Sunfury Technician - OOC (Phase 1) - Set Data'),
+(20218, 0,4,0,1,1,100,1,12000,12000,0,0,45,1,1,0,0,0,0,20,183956,0,0,0, 0, 0, 0,'Sunfury Technician - On Evade - Set Data'),
+(20218, 0,5,0,1,1,100,1,12000,12000,0,0,45,1,1,0,0,0,0,20,184311,0,0,0, 0, 0, 0,'Sunfury Technician - On Evade - Set Data'),
+(20218, 0,6,0,40,0,100,0,1,0,0,0,80,2021806,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - On Reached WP1 - Cast Interrupt Shutdown'),
+(20218, 0,7,8,4,0,100,0,1,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - On Agro - Set Phase 0'),
+(20218, 0,8,9,61,0,100,0,0,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - On agro - Set agressive'),
+(20218, 0,9,10,61,0,100,0,0,0,0,0,20,1,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - On agro - Set agressive'),
+(20218, 0,10,0,61,0,100,0,0,0,0,0,21,1,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - On agro - Set agressive'),
+(20218, 0,11,12,38,0,100,1,2,2,0,0,8,1,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - On Data Set - Set Defensive'),
+(20218, 0,12,0,61,0,100,0,0,0,0,0,87,2021801,2021802,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - On Data Set - Set Defensive'),
+(20218, 0,13,14,38,0,100,1,3,3,0,0,8,1,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - On Data Set - Set Defensive'),
+(20218, 0,14,0,61,0,100,0,0,0,0,0,87,2021803,2021804,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - On Data Set - Set Defensive'),
+(20218, 0,15,0,7,0,100,0,0,0,0,0,45,1,1,0,0,0,0,20,183770,0,0,0, 0, 0, 0,'Sunfury Technician - On Evade - Set Data'),
+(20218, 0,16,0,7,0,100,0,0,0,0,0,45,1,1,0,0,0,0,20,183956,0,0,0, 0, 0, 0,'Sunfury Technician - On Evade - Set Data'),
+(20218, 0,17,0,7,0,100,0,0,0,0,0,45,1,1,0,0,0,0,20,184311,0,0,0, 0, 0, 0,'Sunfury Technician - On Evade - Set Data'),
+(2021806, 9,0,0,0,0,100,0,1,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0, 0, 0, 3.6,'Sunfury Technician - On Reached WP1 - Cast Interrupt Shutdown'),
+(2021806, 9,1,0,0,0,100,0,0,0,0,0,101,0,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - On Evade - Set Data'),
+(2021806, 9,2,0,0,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - On Agro - Set Phase 0'),
+(2021806, 9,3,0,0,0,100,0,1000,1000,0,0,11,35016,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - On Reached WP1 Set Phase 1'),
+
+
+
+(2021800, 9,0,0,0,0,100,0,0,0,0,0,53,1,2021800,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - Script - Start wp'),
+(2021801, 9,0,0,0,0,100,0,0,0,0,0,53,1,2021801,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - Script - Start wp'),
+(2021802, 9,0,0,0,0,100,0,0,0,0,0,53,1,2021802,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - Script - Start wp'),
+(2021803, 9,0,0,0,0,100,0,0,0,0,0,53,1,2021803,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - Script - Start wp'),
+(2021804, 9,0,0,0,0,100,0,0,0,0,0,53,1,2021804,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - Script - Start wp'),
+(2021805, 9,0,0,0,0,100,0,0,0,0,0,53,1,2021805,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - Script - Start wp'),
+(20436, 0,0,0,38,2,100,0,1,1,0,0,49,0,0,0,0,0,0,12,1,0,0,0, 0, 0, 0,'Sunfury Protector - On Data Set - Attack Stored Target'),
+(20436, 0,1,0,54,0,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Protector - On Just Summoned - Set Phase 2'),
+(20436, 0,2,0,1,2,100,0,1000,1000,1000,1000,49,0,0,0,0,0,0,12,1,0,0,0, 0, 0, 0,'Sunfury Protector - OOC - Attack'),
+(20438, 0,0,1,38,0,100,0,4,4,0,0,8,1,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Ara Engineer - On Data Set - Set Defensive'),
+(20438, 0,1,0,61,0,100,0,0,0,0,0,87,2043900,2043901,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Ara Engineer - On Data Set - Set Defensive'),
+(20438, 0,2,0,1,1,100,1,12000,12000,0,0,45,1,1,0,0,0,0,20,184312,0,0,0, 0, 0, 0,'Ara Engineer - OOC (Phase 1) - Set Data'),
+(20438, 0,3,4,40,0,100,0,1,0,0,0,11,35176,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Ara Engineer - On Reached WP1 - Cast Interrupt Shutdown'),
+(20438, 0,4,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Ara Engineer - On Reached WP1 Set Phase 1'),
+(20438, 0,5,6,4,0,100,0,1,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Ara Engineer - On Agro - Set Phase 0'),
+(20438, 0,6,7,61,0,100,0,0,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - On agro - Set agressive'),
+(20438, 0,7,8,61,0,100,0,0,0,0,0,20,1,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - On agro - Set agressive'),
+(20438, 0,8,0,61,0,100,0,0,0,0,0,21,1,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - On agro - Set agressive'),
+(20438, 0,9,0,7,0,100,0,0,0,0,0,45,1,1,0,0,0,0,20,184312,0,0,0, 0, 0, 0,'Ara Techician - On Evade - Set Data'),
+(20439, 0,3,0,38,0,100,0,1,1,0,0,49,0,0,0,0,0,0,12,1,0,0,0, 0, 0, 0,'Ara Technician - On Data Set - Attack Stored Target'),
+(20439, 0,6,0,7,0,100,0,0,0,0,0,45,1,1,0,0,0,0,20,184312,0,0,0, 0, 0, 0,'Ara Techician - On Evade - Set Data'),
+(20438, 0,13,0,61,0,100,0,0,0,0,0,101,0,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Sunfury Technician - On Evade - Set Data'),
+
+(2043900, 9,0,0,0,0,100,0,0,0,0,0,53,1,2043900,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Ara Engineer - Script - Start wp'),
+(2043901, 9,0,0,0,0,100,0,0,0,0,0,53,1,2043901,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Ara Engineer - Script - Start wp'),
+(20460, 0,0,0,38,2,100,0,1,1,0,0,49,0,0,0,0,0,0,12,1,0,0,0, 0, 0, 0,'Chief Engineer Gork lonn - On Data Set - Attack Stored Target'),
+(20460, 0,1,2,7,2,100,0,0,0,0,0,45,1,1,0,0,0,0,20,184312,0,0,0, 0, 0, 0,'Chief Engineer Gork lonn - On Evade - Set Data'),
+(20460, 0,2,0,61,2,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Chief Engineer Gork lonn - On Evade - Despawn'),
+(20460, 0,3,0,54,0,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Chief Engineer Gork lonn - On Just Summoned - Set Phase 2'),
+(20460, 0,4,0,1,2,100,0,1000,1000,1000,1000,49,0,0,0,0,0,0,12,1,0,0,0, 0, 0, 0,'Chief Engineer Gork lonn - OOC - Attack'),
+(20226, 0,0,1,38,0,100,0,1,1,0,0,11,35031,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Manaforge Visual Trigger - On Data Set - Cast Manaforge Disable Visual'),
+(20226, 0,1,0,61,0,100,0,0,0,0,0,50,184954,60000,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Manaforge Visual Trigger - On Data Set - Summon Manaforge Smoke');
+
+DELETE FROM `creature_text` WHERE `entry`=20218;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
+(20218, 0, 0, 'Stop the emergency shutdown! Kael will have our heads if he hears about this!', 12, 0, 100, 0, 0, 0, 'Sunfury Technician', 17931),
+(20218, 0, 1, 'Stop this immediately!', 12, 0, 100, 0, 0, 0, 'Sunfury Technician', 18131),
+(20218, 0, 2, 'The naaru''s emergency shutdown will disable the manaforge permanently! It must be aborted!', 12, 0, 100, 0, 0, 0, 'Sunfury Technician', 17932);
+
+
+DELETE FROM `waypoints` WHERE `entry` IN(2021800,2021801,2021802,2021803,2021804,2021805,2043900,2043901);
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
+(2021800,1, 2918.929199, 4180.713379, 161.866867,'Manforge B''naar cast point 1'),
+(2021801,1, 2911.797852, 4196.943848, 161.883194,'Manforge B''naar cast point 2'),
+(2021802,1, 2417.708252, 2748.968018, 132.415741,'Manforge Coruu cast point 1'),
+(2021803,1, 2424.118652, 2765.202637, 132.368378,'Manforge Coruu cast point 2'),
+(2021804,1, 2969.341797, 2175.692383, 163.197601,'Manforge Duru cast point 1'),
+(2021805,1, 2986.231201, 2184.670166, 163.204178,'Manforge Duru cast point 2'),
+(2043900,1, 4004.417969, 4033.558105, 192.624023,'Manforge Ara cast point 1'),
+(2043901,1, 4024.727295, 4027.472656, 192.559723,'Manforge Ara cast point 2');
+
diff --git a/sql/updates/world/2014_08_12_01_world_misc.sql b/sql/updates/world/2014_08_12_01_world_misc.sql
new file mode 100644
index 00000000000..a1e386b16a0
--- /dev/null
+++ b/sql/updates/world/2014_08_12_01_world_misc.sql
@@ -0,0 +1,3 @@
+UPDATE `quest_template` SET `SpecialFlags`=2 WHERE `Id` IN(10321,10322,10323,10329,1330,10338,10365);
+UPDATE `smart_scripts` SET `event_param4`=75000 WHERE `entryorguid`=17953 AND `source_type`=0 AND `id`=1 AND `link`=2;
+UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2021806 AND `source_type`=9 AND `id`=0 AND `link`=0;
diff --git a/sql/updates/world/2014_08_13_00_world_sai.sql b/sql/updates/world/2014_08_13_00_world_sai.sql
new file mode 100644
index 00000000000..e478edd86b3
--- /dev/null
+++ b/sql/updates/world/2014_08_13_00_world_sai.sql
@@ -0,0 +1,95 @@
+DELETE FROM `creature_text` WHERE `entry` IN(23782,24126,27248,27250,27349);
+
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
+(24126, 0, 0, 'Excellent. What''s the lowdown? Do we have a bodycount?', 12, 0, 100, 11, 0, 0, 'Apothecary Lysander',22797),
+(24126, 1, 0, 'Well, spit it out! What''s the bad news?', 12, 0, 100, 1, 0, 0, 'Apothecary Lysander',22798),
+(24126, 2, 0, 'Severe stomach pain?', 12, 0, 100, 5, 0, 0, 'Apothecary Lysander',22800),
+(24126, 3, 0, 'SEVERE STOMACH PAIN?', 14, 0, 100, 15, 0, 0, 'Apothecary Lysander',22801),
+(24126, 4, 0, 'We are the Royal Apothecary Society! Inducing belly aches is not part of our job description!', 12, 0, 100, 0, 0, 0, 'Apothecary Lysander',22802),
+(24126, 5, 0, 'Am I surrounded by amateurs? I want a full analysis of the new strain by tomorrow morning! Get on it, Ravien!', 12, 0, 100, 25, 0, 0, 'Apothecary Lysander',22803),
+(24126, 6, 0, 'We were making progress with our plague in Undercity. All of a sudden our strains keep failing!', 12, 0, 100, 5, 0, 0, 'Apothecary Lysander',22406),
+(24126, 6, 1, 'The last ten strains from Undercity... all of them worthless!', 12, 0, 100, 5, 0, 0, 'Apothecary Lysander',22403),
+(24126, 6, 2, 'I cannot work under these conditions! We need a viable strain!', 12, 0, 100, 5, 0, 0, 'Apothecary Lysander',22404),
+(23782, 0, 0, 'Reports from the test on the enemy fleet have come in, sir!', 12, 0, 100, 1, 0, 0, 'Apothecary Ravien',22793),
+(23782, 1, 0, 'Well... the good news is we forced the reinforcements to turn back.', 12, 0, 100, 6, 0, 0, 'Apothecary Ravien',22794),
+(23782, 2, 0, 'The plague was not quite... fatal. However, reports of harmful effects include nausea, loss of equilibrium and severe stomach pain.', 12, 0, 100, 274, 0, 0, 'Apothecary Ravien',22795),
+(23782, 3, 0, 'Yes, sir!', 12, 0, 100, 273, 0, 0, 'Apothecary Ravien',22796),
+(27349, 0, 0, 'The %s moans but seems otherwise unaffected by the blight.', 16, 0, 100, 0, 0, 0, 'Scarlet Onslaught Prisoner',26389),
+(27250, 0, 0, 'Huh?', 12, 0, 100, 6, 0, 0, 'Junior Apothecary Schlemiel',26274),
+(27250, 1, 0, 'But... I followed your instructions precisely! Sorry?', 12, 0, 100, 6, 0, 0, 'Junior Apothecary Schlemiel',26277),
+(27250, 2, 0, 'Eep!', 12, 0, 100, 34, 0, 1368, 'Junior Apothecary Schlemiel',26281),
+(27248, 0, 0, 'Schlemiel!', 12, 0, 100, 5, 0, 0, 'Apothecary Vicky Levine',26273),
+(27248, 1, 0, 'Apparently you flubbed this batch of blight. What do you have to say for yourself?', 12, 0, 100, 5, 0, 0, 'Apothecary Vicky Levine',26275),
+(27248, 2, 0, 'Sorry? SORRY?! Here''s sorry for you!', 12, 0, 100, 5, 0, 0, 'Apothecary Vicky Levine',26279),
+(27248, 3, 0, 'Oops. I guess it IS working! That''s odd.', 12, 0, 100, 6, 0, 0, 'Apothecary Vicky Levine',26280),
+(27248, 4, 0, 'I''m gonna need a cleanup and a new assistant over here!', 12, 0, 100, 5, 0, 0, 'Apothecary Vicky Levine',26289);
+
+UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` IN(23782,24126,27248,27250);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(23782,24126,27248,27250) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(2412600,2412601,2724800) AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(24126, 0, 0, 0, 20, 0, 100, 0, 11170, 0, 0, 0, 80, 2412600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Lysander - On Quest Reward - Run Script 1'),
+(24126, 0, 1, 0, 38, 0, 100, 0, 1, 1, 0, 0, 80, 2412601, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Lysander - On Data Set - Run Script 2'),
+(24126, 0, 2, 3, 38, 0, 100, 0, 2, 2, 0, 0, 81, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Lysander - On Data Set - Set NPC Flags'),
+(24126, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Lysander - On Data Set - Set Phase 1'),
+(24126, 0, 4, 0, 25, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Lysander - On Reset - Set Phase 1'),
+(24126, 0, 5, 0, 1, 1, 100, 0, 0, 30000, 30000, 90000, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Lysander - OOC (Phase 1) - Say'),
+(23782, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 53, 0, 23782, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Ravien - On Just Summoned - Start WP'),
+(23782, 0, 1, 2, 40, 0, 100, 0, 6, 23782, 0, 0, 54, 60000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Ravien - On Reached WP6 - Pause WP'),
+(23782, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 24126, 0, 0, 0, 0, 0, 0, 'Apothecary Ravien - On Reached WP6 - Set Orientation'),
+(23782, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 24126, 0, 0, 0, 0, 0, 0, 'Apothecary Ravien - On Reached WP6 - Set Data on Apothecary Lysander'),
+(23782, 0, 4, 0, 40, 0, 100, 0, 7, 23782, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19,24126, 0, 0, 0, 0, 0, 0, 'Apothecary Ravien - On Reached WP7 - Set Data on Apothecary Lysander'),
+(23782, 0, 5, 0, 40, 0, 100, 0,18, 23782, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1,0, 0, 0, 0, 0, 0, 0, 'Apothecary Ravien - On Reached WP18 - Despawn'),
+(27250, 0, 0, 1, 8, 0, 100, 0,48201, 0, 0, 0, 11, 48196, 0, 0, 0, 0, 0, 1,0, 0, 0, 0, 0, 0, 0, 'Junior Apothecary Schlemiel - On Spellhit (Throw Blight) - Cast Blighted'),
+(27250, 0, 1, 2, 61, 0, 100, 0,0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1,0, 0, 0, 0, 0, 0, 0, 'Junior Apothecary Schlemiel - On Spellhit (Throw Blight) - Set Phase 1'),
+(27250, 0, 2, 0, 61, 0, 100, 0,0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1,0, 0, 0, 0, 0, 0, 0, 'Junior Apothecary Schlemiel - On Spellhit (Throw Blight) - Say Line 3'),
+(27250, 0, 3, 0, 1, 1, 100, 0,5000, 5000, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1,0, 0, 0, 0, 0, 0, 0, 'Junior Apothecary Schlemiel - OOC (Phase 1) - Die'),
+(27248, 0, 0, 0, 20, 0, 100, 0, 12206, 0, 0, 0, 80, 2724800, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Vicky Levine - On Quest Reward - Run Script'),
+(2724800, 9,0,0,0,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Apothecary Vicky Levine - Script - Set NPC Flags'),
+(2724800, 9,1,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,19,27250,0,0,0, 0, 0, 0,'Apothecary Vicky Levine - Script - Set Orientation'),
+(2724800, 9,2,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Apothecary Vicky Levine - Script - Say Line 1'),
+(2724800, 9,3,0,0,0,100,0,6000,6000,0,0,1,0,0,0,0,0,0,19,27250,0,0,0, 0, 0, 0,'Apothecary Vicky Levine - Script - Say Line 1 (Junior Apothecary Schlemiel)'),
+(2724800, 9,4,0,0,0,100,0,6000,6000,0,0,1,1,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Apothecary Vicky Levine - Script - Say Line 2'),
+(2724800, 9,5,0,0,0,100,0,6000,6000,0,0,1,1,0,0,0,0,0,19,27250,0,0,0, 0, 0, 0,'Apothecary Vicky Levine - Script - Say Line 2 (Junior Apothecary Schlemiel)'),
+(2724800, 9,6,0,0,0,100,0,6000,6000,0,0,1,2,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Apothecary Vicky Levine - Script - Say Line 3'),
+(2724800, 9,7,0,0,0,100,0,0,0,0,0,11,48201,0,0,0,0,0,19,27250,0,0,0, 0, 0, 0,'Apothecary Vicky Levine - Script - Cast Throw Blight'),
+(2724800, 9,8,0,0,0,100,0,7000,7000,0,0,1,3,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Apothecary Vicky Levine - Script - Say Line 4'),
+(2724800, 9,9,0,0,0,100,0,6000,6000,0,0,1,4,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Apothecary Vicky Levine - Script - Say Line 5'),
+(2724800, 9,10,0,0,0,100,0,0,0,0,0,81,2,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Apothecary Vicky Levine - Script - Set NPC Flags'),
+(2412600, 9,0,0,0,0,100,0,0,0,0,0,12,23782,1,90000,0,0,0,8,0,0,0,1965.131, -6126.74, 25.61264, 3.271674,'Apothecary Lysander - Script 1 - Spawn Apothecary Ravien'),
+(2412600, 9,1,0,0,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Apothecary Lysander - Script 1 - Set NPC Flags'),
+(2412600, 9,2,0,0,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Apothecary Lysander - Script 1 - Set Phase 0'),
+(2412601, 9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,19,23782,0,0,0, 0, 0, 0,'Apothecary Lysander - Script 2 - Say Line 1 (Apothecary Ravien)'),
+(2412601, 9,1,0,0,0,100,0,6000,6000,0,0,1,0,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Apothecary Lysander - Script 2 - Say Line 1'),
+(2412601, 9,2,0,0,0,100,0,6000,6000,0,0,1,1,0,0,0,0,0,19,23782,0,0,0, 0, 0, 0,'Apothecary Lysander - Script 2 - Say Line 2 (Apothecary Ravien)'),
+(2412601, 9,3,0,0,0,100,0,6000,6000,0,0,1,1,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Apothecary Lysander - Script 2 - Say Line 2'),
+(2412601, 9,4,0,0,0,100,0,6000,6000,0,0,1,2,0,0,0,0,0,19,23782,0,0,0, 0, 0, 0,'Apothecary Lysander - Script 2 - Say Line 3 (Apothecary Ravien)'),
+(2412601, 9,5,0,0,0,100,0,6000,6000,0,0,1,2,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Apothecary Lysander - Script 2 - Say Line 3'),
+(2412601, 9,6,0,0,0,100,0,6000,6000,0,0,1,3,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Apothecary Lysander - Script 2 - Say Line 4'),
+(2412601, 9,7,0,0,0,100,0,6000,6000,0,0,1,4,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Apothecary Lysander - Script 2 - Say Line 5'),
+(2412601, 9,8,0,0,0,100,0,6000,6000,0,0,1,5,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Apothecary Lysander - Script 2 - Say Line 6'),
+(2412601, 9,9,0,0,0,100,0,6000,6000,0,0,1,3,0,0,0,0,0,19,23782,0,0,0, 0, 0, 0,'Apothecary Lysander - Script 2 - Say Line 4 (Apothecary Ravien)');
+
+UPDATE `smart_scripts` SET `event_flags`=0 WHERE `entryorguid`=27349 AND `source_type`=0 AND `id`=0 AND `link`=1;
+UPDATE `smart_scripts` SET `link`=0, `event_flags`=0, `action_type`=1,`comment`='Scarlet Onslaught Prisoner - On Spellhit \'Flask of Blight\' - Say' WHERE `entryorguid`=27349 AND `source_type`=0 AND `id`=1 AND `link`=2;
+
+DELETE FROM `waypoints` WHERE `entry` IN(23782);
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
+(23782,1, 1950.98, -6131.159, 24.8696,'Apothecary Ravien'),
+(23782,2, 1946.992, -6136.564, 24.37891,'Apothecary Ravien'),
+(23782,3, 1946.492, -6139.314, 24.37891,'Apothecary Ravien'),
+(23782,4, 1946.492, -6140.314, 24.37891,'Apothecary Ravien'),
+(23782,5, 1946.492, -6141.314, 24.37891,'Apothecary Ravien'),
+(23782,6, 1946.492, -6142.564, 24.37891,'Apothecary Ravien'), -- Event
+(23782,7, 1946.487, -6142.437, 24.39008,'Apothecary Ravien'),
+(23782,8, 1946.487, -6141.437, 24.39008,'Apothecary Ravien'),
+(23782,9, 1946.487, -6140.437, 24.39008,'Apothecary Ravien'),
+(23782,10, 1946.487, -6139.437, 24.39008,'Apothecary Ravien'),
+(23782,11, 1947.237, -6137.437, 24.39008,'Apothecary Ravien'),
+(23782,12, 1947.051, -6137.372, 24.81357,'Apothecary Ravien'),
+(23782,13, 1948.301, -6134.372, 24.81357,'Apothecary Ravien'),
+(23782,14, 1950.301, -6133.622, 25.06357,'Apothecary Ravien'),
+(23782,15, 1954.051, -6129.622, 25.06357,'Apothecary Ravien'),
+(23782,16, 1958.301, -6127.122, 25.56357,'Apothecary Ravien'),
+(23782,17, 1958.692, -6127.187, 25.5125,'Apothecary Ravien'),
+(23782,18, 1960.692, -6127.187, 26.0125,'Apothecary Ravien'); -- Despawn
diff --git a/sql/updates/world/2014_08_14_00_world_gameobject.sql b/sql/updates/world/2014_08_14_00_world_gameobject.sql
new file mode 100644
index 00000000000..0cbe21fb11a
--- /dev/null
+++ b/sql/updates/world/2014_08_14_00_world_gameobject.sql
@@ -0,0 +1,4 @@
+SET @OGUID := 5495;
+DELETE FROM `gameobject` WHERE `guid`=@OGUID;
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`animprogress`,`state`) VALUES
+(@OGUID,201818,631,15,1,4149.65,2779.59,350.962,0,604800,0,1);
diff --git a/sql/updates/world/2014_08_14_01_world_creature_template.sql b/sql/updates/world/2014_08_14_01_world_creature_template.sql
new file mode 100644
index 00000000000..8889a424b62
--- /dev/null
+++ b/sql/updates/world/2014_08_14_01_world_creature_template.sql
@@ -0,0 +1,16 @@
+ALTER TABLE `creature_template`
+ DROP COLUMN `mindmg`,
+ DROP COLUMN `maxdmg`,
+ DROP COLUMN `attackpower`,
+ DROP COLUMN `minrangedmg`,
+ DROP COLUMN `maxrangedmg`,
+ DROP COLUMN `rangedattackpower`,
+ CHANGE `baseattacktime` `BaseAttackTime` INT(10) UNSIGNED DEFAULT 0 NOT NULL,
+ CHANGE `rangeattacktime` `RangeAttackTime` INT(10) UNSIGNED DEFAULT 0 NOT NULL,
+ ADD COLUMN `BaseVariance` FLOAT DEFAULT 1 NOT NULL AFTER `RangeAttackTime`,
+ ADD COLUMN `RangeVariance` FLOAT DEFAULT 1 NOT NULL AFTER `BaseVariance`,
+ CHANGE `Health_mod` `HealthModifier` FLOAT DEFAULT 1 NOT NULL,
+ CHANGE `Mana_mod` `ManaModifier` FLOAT DEFAULT 1 NOT NULL,
+ CHANGE `Armor_mod` `ArmorModifier` FLOAT DEFAULT 1 NOT NULL,
+ CHANGE `dmg_multiplier` `DamageModifier` FLOAT DEFAULT 1 NOT NULL AFTER `ArmorModifier`,
+ ADD COLUMN `ExperienceModifier` FLOAT DEFAULT 1 NOT NULL AFTER `DamageModifier`;
diff --git a/sql/updates/world/2014_08_14_02_world_misc.sql b/sql/updates/world/2014_08_14_02_world_misc.sql
new file mode 100644
index 00000000000..e08c6f66c74
--- /dev/null
+++ b/sql/updates/world/2014_08_14_02_world_misc.sql
@@ -0,0 +1,197 @@
+DELETE FROM `creature_text` WHERE `entry` IN(24703,24706,24709,25237,25256,23990,24123,23989,23991,24014,24152,24362);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
+(24703, 0, 0, 'The Scourge has us surrounded. We can hold the village for awhile, but if we can''t defeat them, they will overrun us.', 12, 0, 100, 5, 0, 0, 'Chieftain Wintergale',24791),
+(24703, 1, 0, 'The time has come to act. We must decide how to deal with the Scourge before it consumes us.', 12, 0, 100, 1, 0, 0, 'Chieftain Wintergale',24807),
+(24706, 0, 0, 'The choice is clear. We must attack. I know the odds are against us, but Taunka do not go quietly to the slaughter.', 12, 0, 100, 25, 0, 0, 'Durm Icehide',24792),
+(24706, 1, 0, 'I''ll die with my axes in my hands and drenched in the blood of our foes!', 12, 0, 100, 53, 0, 0, 'Durm Icehide',24793),
+(24703, 2, 0, 'I won''t sacrifice my warriors for romantic notions of glorious death on the battlefield. What use is fighting for survival if no one survives?', 12, 0, 100, 1, 0, 0, 'Chieftain Wintergale',24798),
+(24703, 3, 0, 'There will be a time for battle, Durm. But first, we must find a way to even the odds. What would you have me do, Aeire?', 12, 0, 100, 6, 0, 0, 'Chieftain Wintergale',24799),
+(24709, 0, 0, 'The ancestors knew a way to confound an enemy''s senses. We could use this knowledge to discover the Scourge''s weakness or strike at their commanders. Without their leaders, the Scourge would fall before our warriors.', 12, 0, 100, 1, 0, 0, 'Sage Aeire',24800),
+(24706, 2, 0, 'A dishonorable scheme.', 12, 0, 100, 274, 0, 0, 'Durm Icehide',24801),
+(24703, 4, 0, 'What is your honor worth, Durm? Your life? Mine? The life of blind old Greatfather Mahan, who raised you from childhood?', 12, 0, 100, 1, 0, 0, 'Chieftain Wintergale',24802),
+(24703, 5, 0, 'Honor is meaningless to a dead man. A warrior may throw himself into battle for honor''s sake, but a chieftain is responsible for far more. We will follow Sage Aeire''s plan and continue to defend our village.', 12, 0, 100, 1, 0, 0, 'Chieftain Wintergale',24803),
+(24709, 1, 0, 'I''ll take those. We can''t have the mighty chieftain cowering in fear of a few hides.', 12, 0, 100, 11, 0, 0, 'Sage Aeire',24811),
+(24703, 6, 0, 'Aeire, $n has brought your hides. Please, take them before they make me ill.', 12, 0, 100, 25, 0, 0, 'Chieftain Wintergale',24810),
+(25256, 0, 0, 'We are surrounded... Our enemies press in from all sides, young Hellscream.', 12, 1, 100, 1, 0, 0, 'High Overlord Saurfang',24486),
+(25256, 1, 0, 'The Scourge descends like locust from the north.', 12, 1, 100, 25, 0, 0, 'High Overlord Saurfang',24487),
+(25256, 2, 0, 'The Alliance holds the only secure shipping lane in this region, and even that is at risk of being lost to those dreaded mists.', 12, 1, 100, 25, 0, 0, 'High Overlord Saurfang',24488),
+(25256, 3, 0, 'Our only viable port for resupply is held by the Forsaken on the other side of this blasted continent!', 12, 1, 100, 1, 0, 0, 'High Overlord Saurfang',24489),
+(25256, 4, 0, 'Anything our zeppelins cannot haul must be brought in by ship and travel the length of Northrend to reach us.', 12, 1, 100, 1, 0, 0, 'High Overlord Saurfang',24490),
+(25237, 0, 0, '%s grunts.', 16, 1, 100, 0, 0, 0, 'Garrosh Hellscream',24491),
+(25237, 1, 0, 'Shipping lanes... supplies... You bore me to death! We need nothing more than the warrior spirit of the Horde, Saurfang! Now that we are firmly entrenched in this frozen wasteland, nothing shall stop us!', 12, 1, 100, 1, 0, 0, 'Garrosh Hellscream',24492),
+(25256, 5, 0, 'Siege engines, ammunition, heavy armor... How do you propose to shatter the walls of Icecrown without those?', 12, 1, 100, 1, 0, 0, 'High Overlord Saurfang',24493),
+(25237, 2, 0, 'Propose? I will show you what I propose!', 12, 1, 100, 6, 0, 0, 'Garrosh Hellscream',24494),
+(25237, 3, 0, 'There... Now we now have a shipping lane.', 12, 1, 100, 1, 0, 0, 'Garrosh Hellscream',24495),
+(25237, 4, 0, 'And just for good measure...', 12, 1, 100, 5, 0, 0, 'Garrosh Hellscream',24496),
+(25256, 6, 0, 'So the prodigal son has spoken!', 12, 1, 100, 5, 0, 0, 'High Overlord Saurfang',24997),
+(25256, 7, 0, 'Your father''s blood runs strong in you, Hellscream. Impatient as always... Impatient and reckless.', 12, 1, 100, 1, 0, 0, 'High Overlord Saurfang',24498),
+(25256, 8, 0, 'You rush headlong into all-out war without a thought of the consequences.', 12, 1, 100, 1, 0, 0, 'High Overlord Saurfang',24500),
+(25237, 5, 0, 'Do not speak to me of consequences, old one. ', 12, 1, 100, 25, 0, 0, 'Garrosh Hellscream',24501),
+(25256, 9, 0, 'I drank of the same blood your father did, Garrosh. Mannoroth''s cursed venom pumped through my veins as well.', 12, 1, 100, 1, 0, 0, 'High Overlord Saurfang',24502),
+(25256, 10, 0, 'I drove my weapons into the bodies and minds of my enemies.', 12, 1, 100, 1, 0, 0, 'High Overlord Saurfang',24503),
+(25256, 11, 0, 'And while Grom died a glorious death - freeing us all from the blood curse - he could not wipe away the terrible memory of our past.', 12, 1, 100, 1, 0, 0, 'High Overlord Saurfang',24504),
+(25256, 12, 0, 'His act could not erase the horrors we committed. ', 12, 1, 100, 274, 0, 0, 'High Overlord Saurfang',24505),
+(25256, 13, 0, '%s pauses.', 16, 1, 100, 0, 0, 0, 'High Overlord Saurfang',24506),
+(25256, 14, 0, 'The winter after the curse was lifted, hundreds of veteran orcs like me were lost to despair.', 12, 1, 100, 1, 0, 0, 'High Overlord Saurfang',24507),
+(25256, 15, 0, 'Our minds were finally free, yes... Free to relive all of the unthinkable acts that we had performed under the Legions'' influence.', 12, 1, 100, 273, 0, 0, 'High Overlord Saurfang',24508),
+(25256, 16, 0, '%s nods.', 16, 1, 100, 273, 0, 0, 'High Overlord Saurfang',24509),
+(25256, 17, 0, 'I think it was the sounds of the draenei children that unnerved most of them... You never forget...', 12, 1, 100, 1, 0, 0, 'High Overlord Saurfang',24510),
+(25256, 18, 0, 'Have you ever been to Jaggedswine Farm? When the swine are of age for the slaughter... It''s that sound. The sound of the swine being killed... It resonates the loudest. Those are hard times for us older veterans.', 12, 1, 100, 6, 0, 0, 'High Overlord Saurfang',24511),
+(25237, 6, 0, 'But surely you cannot think that those children were born into innocence? They would have grown up and taken arms against us!', 12, 1, 100, 5, 0, 0, 'Garrosh Hellscream',24512),
+(25256, 19, 0, '%s shakes his head.', 16, 1, 100, 274, 0, 0, 'High Overlord Saurfang',24513),
+(25256, 20, 0, 'I am not speaking solely of the children of our enemies...', 12, 1, 100, 1, 0, 0, 'High Overlord Saurfang',24515),
+(25256, 21, 0, '%s pauses.', 16, 1, 100, 1, 0, 0, 'High Overlord Saurfang',24506),
+(25256, 22, 0, 'I won''t let you take us down that dark path again, young Hellscream. I''ll kill you myself before that day comes...', 12, 1, 100, 274, 0, 0, 'High Overlord Saurfang',24516),
+(25237, 7, 0, 'How have you managed to survive for so long, Saurfang? Not fallen victim to your own memories?', 12, 1, 100, 6, 0, 0, 'Garrosh Hellscream',24518),
+(25256, 23, 0, 'I don''t eat pork...', 12, 1, 100, 274, 0, 0, 'High Overlord Saurfang',24519),
+(25256, 24, 0, '%s spits.', 16, 1, 100, 0, 0, 0, 'High Overlord Saurfang',24520),
+(24014, 0, 0, 'You too will serve the Lich King.', 12, 0, 100, 0, 0, 0, 'Necrolord',23663),
+(24014, 0, 1, 'There''s always room for one more.', 12, 0, 100, 0, 0, 13542, 'Necrolord',23669),
+(24014, 0, 2, 'Your life for the Lich King!', 12, 0, 100, 0, 0, 0, 'Necrolord',23667),
+(24014, 0, 3, 'So eager to die are we?', 12, 0, 100, 0, 0, 0, 'Necrolord',23662),
+(24014, 0, 4, 'Hello, little one. Come to play?', 12, 0, 100, 0, 0, 0, 'Necrolord',23666),
+(24014, 0, 5, 'I have so many wonders to show you.', 12, 0, 100, 0, 0, 0, 'Necrolord',23668),
+(24014, 0, 6, 'Excellent, another sacrificial lamb.', 12, 0, 100, 0, 0, 0, 'Necrolord',23661),
+(24014, 0, 7, 'There''s always room for one more.', 12, 0, 100, 0, 0, 0, 'Necrolord',23669),
+(24014, 0, 8, 'Plucked ripe off the vine.', 12, 0, 100, 0, 0, 0, 'Necrolord',23678),
+(23990, 0, 0, 'I spit on you!', 12, 0, 100, 0, 0, 13538, 'Gjalerbron Rune-Caster',30503),
+(23990, 0, 1, 'YAAARRRGH!', 12, 0, 100, 0, 0, 0, 'Gjalerbron Rune-Caster',22700),
+(23990, 0, 2, 'Look what''s come to play.', 12, 0, 100, 0, 0, 0, 'Gjalerbron Rune-Caster',22820),
+(23990, 0, 3, 'Your entrails will make a fine necklace.', 12, 0, 100, 0, 0, 13535, 'Gjalerbron Rune-Caster',30500),
+(24123, 0, 0, 'These are all excellent. It''s going to be hard to choose just one.', 12, 0, 100, 1, 0, 0, 'Nokoma Snowseer',22854),
+(24123, 1, 0, 'I think I''ve found the one I''ll use. Now I have to begin the task of carving it. I don''t think it''s going to be easy. I don''t even know what a female yeti''s mating call sounds like!', 12, 0, 100, 396, 0, 0, 'Nokoma Snowseer',22855),
+(24123, 2, 0, 'I''ve got most of the basic carving done, but it needs to be tested before I can continue. Are you willing to help me with that, $n?', 12, 0, 100, 396, 0, 0, 'Nokoma Snowseer',22856),
+(24152, 0, 0, 'Wait a minute...', 12, 0, 100, 5, 0, 0, 'Apothecary Malthus',22958),
+(24152, 1, 0, 'It''s just...', 12, 0, 100, 6, 0, 0, 'Apothecary Malthus',22959),
+(24152, 2, 0, 'Beer! Mere beer!', 12, 0, 100, 1, 0, 0, 'Apothecary Malthus',22960),
+(24152, 3, 0, 'There''s absolutely nothing out of the ordinary about it.', 12, 0, 100, 1, 0, 0, 'Apothecary Malthus',22961),
+(24152, 4, 0, 'You! Not a word to Grick about this! Do you hear me?', 12, 0, 100, 25, 0, 0, 'Apothecary Malthus',22962),
+(23989, 0, 0, 'I''ll eat your heart!', 12, 0, 100, 0, 0, 13542, 'Gjalerbron Sleep-Watcher',30508),
+(23989, 0, 1, 'YAAARRRGH!', 12, 0, 100, 0, 0, 13542, 'Gjalerbron Sleep-Watcher',22700),
+(23989, 0, 2, 'I will take pleasure in gutting you!', 12, 0, 100, 0, 0, 13533, 'Gjalerbron Sleep-Watcher',30498),
+(23989, 0, 3, 'YAAARRRGH!', 12, 0, 100, 0, 0, 0, 'Gjalerbron Sleep-Watcher',22700),
+(23989, 0, 4, 'There will be no everlasting life for you!', 12, 0, 100, 0, 0, 0, 'Gjalerbron Sleep-Watcher',22822),
+(23989, 0, 5, 'Sniveling pig!', 12, 0, 100, 0, 0, 0, 'Gjalerbron Sleep-Watcher',30504),
+(23989, 0, 6, 'Haraak foln!', 12, 0, 100, 0, 0, 0, 'Gjalerbron Sleep-Watcher',30506),
+(23991, 0, 0, 'I will feed you to the dogs!', 12, 0, 100, 0, 0, 13534, 'Gjalerbron Warrior',30499),
+(23991, 0, 1, 'I''ll eat your heart!', 12, 0, 100, 0, 0, 13542, 'Gjalerbron Warrior',30508),
+(23991, 0, 2, 'Look what''s come to play.', 12, 0, 100, 0, 0, 13542, 'Gjalerbron Warrior',22820),
+(23991, 0, 3, 'My life for Ymiron!', 12, 0, 100, 0, 0, 0, 'Gjalerbron Warrior',22702),
+(23991, 0, 4, 'I spit on you!', 12, 0, 100, 0, 0, 13538, 'Gjalerbron Warrior',30503),
+(23991, 0, 5, 'You tiny creatures disgust me!', 12, 0, 100, 0, 0, 0, 'Gjalerbron Warrior',22816),
+(23991, 0, 6, 'You tiny creatures disgust me!', 12, 0, 100, 0, 0, 13542, 'Gjalerbron Warrior',22816),
+(23991, 0, 7, 'Your entrails will make a fine necklace.', 12, 0, 100, 0, 0, 13535, 'Gjalerbron Warrior',30500),
+(23991, 0, 8, 'YAAARRRGH!', 12, 0, 100, 0, 0, 13535, 'Gjalerbron Warrior',22700),
+(23991, 0, 9, 'For Ymiron!', 12, 0, 100, 0, 0, 0, 'Gjalerbron Warrior',22697),
+(24362, 0, 0, 'They keep their tools in boxes that look like this. Look for them near the pavilions.', 12, 0, 100, 25, 0, 0, 'Longrunner Pembe',23552),
+(24362, 1, 0, 'I''m only going to carve the runes I think will give you command over a giant.', 12, 0, 100, 1, 0, 0, 'Longrunner Pembe',23246),
+(24362, 2, 0, 'I''m omitting the runes for "north" and "west" because I''m not sure how they impact the giant. I''m also including a rune to limit how long you can control it.', 12, 0, 100, 0, 0, 0, 'Longrunner Pembe',23247),
+(24362, 3, 0, 'There we go, the Rune of Command... hopefully. Not nearly as vicious as its Iron Dwarf cousin, but functional.', 12, 0, 100, 1, 0, 0, 'Longrunner Pembe',23248);
+
+UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` IN(25256,24703,25237,24014,23991,23989,23990,24152,24123,24362);
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(25256,24703,25237,24014,23991,23989,23990,24152,24123,24362) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(2525600,2470300,2415200,2412300) AND `source_type`=9;
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=25256 ;
+
+DELETE FROM `waypoints` WHERE `entry` IN(2523700,2523701);
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
+(2523700,1, 2836.876, 6186.151, 84.93269,'Garrosh Hellscream (Path 1)'),
+(2523700,2, 2835.618, 6183.708, 84.93269,'Garrosh Hellscream (Path 1)'),
+(2523700,3, 2838.32, 6187.36, 84.6827,'Garrosh Hellscream (Path 1)'),
+(2523701,1, 2834.367, 6182.802, 84.93269,'Garrosh Hellscream (Path 2)'),
+(2523701,2, 2833.117, 6185.052, 84.93269,'Garrosh Hellscream (Path 2)'),
+(2523701,3, 2832.875, 6185.245, 84.93269,'Garrosh Hellscream (Path 2)'),
+(2523701,4, 2834.375, 6183.995, 84.93269,'Garrosh Hellscream (Path 2)'),
+(2523701,5, 2838.32, 6187.36, 84.6827,'Garrosh Hellscream (Path 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
+(24014, 0, 0, 0, 4, 0, 50, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Necrolord - On Agro - Say'),
+(23989, 0, 0, 0, 4, 0, 50, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gjalerbron Sleep-Watcher - On Agro - Say'),
+(23990, 0, 0, 0, 4, 0, 50, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gjalerbron Rune-Caster - On Agro - Say'),
+(23991, 0, 0, 0, 4, 0, 50, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gjalerbron Warrior - On Agro - Say'),
+(24152, 0, 0, 0, 20, 0, 100, 0, 11298, 0, 0, 0, 80, 2415200, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Malthus <Royal Apothecary Society> - On Quest Reward (Whats in that brew?) - Run Script'),
+(24123, 0, 0, 0, 20, 0, 100, 0, 11275, 0, 0, 0, 80, 2412300, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Nokoma Snowseer - On Quest Reward (Making The Horn) - Run Script'),
+(25256, 0, 0, 0, 1, 0, 100, 0, 0, 0, 300000, 450000, 80, 2525600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - OOC - Run Script'),
+(25237, 0, 0, 6, 40, 0, 100, 0, 2, 2523700, 0, 0, 54, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Garrosh Hellscream - On Reached WP 2 (Path 1) - Pause WP'),
+(25237, 0, 1, 0, 40, 0, 100, 0, 3, 2523700, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 3.822270, 'Garrosh Hellscream - On Reached WP 3 (Path 1) - Set Orientation'),
+(25237, 0, 2, 6, 40, 0, 100, 0, 3, 2523701, 0, 0, 54, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Garrosh Hellscream - On Reached WP 3 (Path 2) - Pause WP'),
+(25237, 0, 3, 0, 40, 0, 100, 0, 5, 2523701, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 3.822270, 'Garrosh Hellscream - On Reached WP 5 (Path 2) - Set Orientation'),
+(25237, 0, 4, 0, 38, 0, 100, 0, 1, 1, 0, 0, 53, 1, 2523700, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Garrosh Hellscream - On Data Set 1 1 - Start WP (Path 1)'),
+(25237, 0, 5, 0, 38, 0, 100, 0, 2, 2, 0, 0, 53, 1, 2523701, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Garrosh Hellscream - On Data Set 2 2 - Start WP (Path 2)'),
+(25237, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 45404, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Garrosh Hellscream - Link - Cast Crush Under Foot'),
+(24703, 0, 0, 0, 1, 0, 100, 0, 0, 0, 300000, 450000, 80, 2470300, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chieftain Wintergale - OOC - Run Script'),
+(24703, 0, 1, 0, 20, 0, 100, 0, 11628, 0, 0, 0, 1, 6, 7000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chieftain Wintergale - On Quest Reward (Shrouds of the Scourge) - Say Line 7'),
+(24703, 0, 2, 0, 52, 0, 100, 0, 6, 24703, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 24709, 0, 0, 0, 0, 0, 0, 'Chieftain Wintergale - On Quest Reward (Shrouds of the Scourge) - Say Line 2 (Sage Aeire)'),
+(24362, 0, 0, 0, 19, 0, 100, 0, 11351, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Longrunner Pembe - On Quest Accept (Mastering the Runes) - Say Line 1'),
+(24362, 0, 1, 0, 20, 0, 100, 0, 11351, 0, 0, 0, 1, 1, 7000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Longrunner Pembe - On Quest Reward (Mastering the Runes) - Say Line 2'),
+(24362, 0, 2, 0, 52, 0, 100, 0, 1, 24362, 0, 0, 1, 2, 7000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Longrunner Pembe - On Text Over Line 2 - Say Line 3'),
+(24362, 0, 3, 0, 52, 0, 100, 0, 2, 24362, 0, 0, 1, 3, 7000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Longrunner Pembe - On Text Over Line 3 - Say Line 4'),
+(2415200, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Malthus <Royal Apothecary Society> - Script - Say Line 1'),
+(2415200, 9, 2, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Malthus <Royal Apothecary Society> - Script - Say Line 2'),
+(2415200, 9, 3, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Malthus <Royal Apothecary Society> - Script - Say Line 2'),
+(2415200, 9, 4, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Malthus <Royal Apothecary Society> - Script - Say Line 2'),
+(2415200, 9, 5, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Malthus <Royal Apothecary Society> - Script - Say Line 2'),
+(2412300, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Nokoma Snowseer - Script - Say Line 1'),
+(2412300, 9, 2, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Nokoma Snowseer - Script - Say Line 2'),
+(2412300, 9, 3, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Nokoma Snowseer - Script - Say Line 2'),
+(2470300, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chieftain Wintergale - Script - Say Line 1'),
+(2470300, 9, 2, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chieftain Wintergale - Script - Say Line 2'),
+(2470300, 9, 3, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 24706, 0, 0, 0, 0, 0, 0, 'Chieftain Wintergale - Script - Say Line 1 (Durm Icehide)'),
+(2470300, 9, 4, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 24706, 0, 0, 0, 0, 0, 0, 'Chieftain Wintergale - Script - Say Line 2 (Durm Icehide)'),
+(2470300, 9, 5, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chieftain Wintergale - Script - Say Line 3'),
+(2470300, 9, 6, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chieftain Wintergale - Script - Say Line 4'),
+(2470300, 9, 7, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 24709, 0, 0, 0, 0, 0, 0, 'Chieftain Wintergale - Script - Say Line 1 (Sage Aeire)'),
+(2470300, 9, 8, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 24706, 0, 0, 0, 0, 0, 0, 'Chieftain Wintergale - Script - Say Line 3 (Durm Icehide)'),
+(2470300, 9, 9, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chieftain Wintergale - Script - Say Line 5'),
+(2470300, 9, 10, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chieftain Wintergale - Script - Say Line 6'),
+(2525600, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 25237, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Set Orientation'),
+(2525600, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 1'),
+(2525600, 9, 2, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 2'),
+(2525600, 9, 3, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 3'),
+(2525600, 9, 4, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 4'),
+(2525600, 9, 5, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 5'),
+(2525600, 9, 6, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 25237, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 1 (Garrosh Hellscream)'),
+(2525600, 9, 7, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 25237, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 2 (Garrosh Hellscream)'),
+(2525600, 9, 8, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 6'),
+(2525600, 9, 9, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 25237, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 3 (Garrosh Hellscream)'),
+(2525600, 9, 10, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 25237, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Set Data 1 1 (Garrosh Hellscream)'),
+(2525600, 9, 11, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 19, 25237, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 4 (Garrosh Hellscream)'),
+(2525600, 9, 12, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 19, 25237, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 5 (Garrosh Hellscream)'),
+(2525600, 9, 13, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 25237, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Set Data 2 2 (Garrosh Hellscream)'),
+(2525600, 9, 14, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 7'),
+(2525600, 9, 15, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 8'),
+(2525600, 9, 16, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 9'),
+(2525600, 9, 17, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 19, 25237, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 6 (Garrosh Hellscream)'),
+(2525600, 9, 18, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 10'),
+(2525600, 9, 19, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 11'),
+(2525600, 9, 20, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 12'),
+(2525600, 9, 21, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 12, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 13'),
+(2525600, 9, 22, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 13, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 14'),
+(2525600, 9, 23, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 15'),
+(2525600, 9, 24, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 15, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 16'),
+(2525600, 9, 25, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 16, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 17'),
+(2525600, 9, 26, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 17, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 18'),
+(2525600, 9, 27, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 18, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 19'),
+(2525600, 9, 28, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 19, 25237, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 7 (Garrosh Hellscream)'),
+(2525600, 9, 29, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 19, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 20'),
+(2525600, 9, 30, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 20, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 21'),
+(2525600, 9, 31, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 21, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 22'),
+(2525600, 9, 32, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 22, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 23'),
+(2525600, 9, 33, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 19, 25237, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 8 (Garrosh Hellscream)'),
+(2525600, 9, 34, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 23, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 24'),
+(2525600, 9, 35, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 24, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Script - Say Line 25'),
+(2525600, 9, 36, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 5.821980, 'High Overlord Saurfang - Script - Set Orientation');
+
+
+UPDATE `quest_template` SET `SpecialFlags`=2 WHERE `Id`=10330;
+
+UPDATE `smart_scripts` SET `link`=6 WHERE `entryorguid`=17831 AND `source_type`=0 AND `id`=1 AND `link`=0;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=17831 AND `source_type`=0 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
+(17831, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Watcher Leesa\'oh - Quest Reward - Set Phase 1'),
+(17831, 0, 7, 8, 1, 1, 100, 0, 300000, 300000, 0, 0, 81, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Watcher Leesa\'oh - OOC (Phase 1) - Set NPC Flags'),
+(17831, 0, 8, 0, 61, 1, 100, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Watcher Leesa\'oh - OOC (Phase 1) - Set Phase 0');
diff --git a/sql/updates/world/2014_08_15_00_world_sai.sql b/sql/updates/world/2014_08_15_00_world_sai.sql
new file mode 100644
index 00000000000..753866d5a87
--- /dev/null
+++ b/sql/updates/world/2014_08_15_00_world_sai.sql
@@ -0,0 +1,39 @@
+DELETE FROM `creature_text` WHERE `entry`=27683;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
+(27683, 0, 0, 'I''ve lived here and kept this shrine with the blessing of the Alexstrasza for longer than I can remember. In its darkest hour, I''ve failed... I fell at the feet of that damned death knight... Bloodbane.', 12, 0, 100, 0, 0, 0, 'Remnant of Dahlia Suntouch',26939),
+(27683, 1, 0, 'Dahlia spits on the ground at the thought of the name.', 16, 0, 100, 0, 0, 0, 'Remnant of Dahlia Suntouch',26943),
+(27683, 2, 0, 'The Lich King is stretching his hand far now... fearlessly treading on the most sacred lands of all of the flights. He intends to force us to action.', 12, 0, 100, 0, 0, 0, 'Remnant of Dahlia Suntouch',26940),
+(27683, 3, 0, 'My time is done... I offered myself to Alexstrasza in life, but I have nothing left to offer in death. She will need a new keeper for her shrine.', 12, 0, 100, 0, 0, 0, 'Remnant of Dahlia Suntouch',26941),
+(27683, 4, 0, 'And thank you... thank you for freeing me from the shackles of the damned. You are a hero... I know you will go on to great deeds.', 12, 0, 100, 0, 0, 0, 'Remnant of Dahlia Suntouch',26942),
+(27683, 5, 0, 'The Remnant of Dahlia Suntouch fades away...', 16, 0, 100, 0, 0, 0, 'Remnant of Dahlia Suntouch',26944);
+
+DELETE FROM `waypoints` WHERE `entry` IN(27683);
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
+(27683,1, 3711.944, 938.4294, 55.09203,'Remnant of Dahlia Suntouch'),
+(27683,2, 3711.274, 937.6862, 55.09203,'Remnant of Dahlia Suntouch'),
+(27683,3, 3722.171, 943.1833, 54.70838,'Remnant of Dahlia Suntouch'),
+(27683,4, 3723.844, 944.0275, 53.94967,'Remnant of Dahlia Suntouch'),
+(27683,5, 3725.486, 944.8557, 54.00668,'Remnant of Dahlia Suntouch'),
+(27683,6, 3729.952, 947.1088, 53.98567,'Remnant of Dahlia Suntouch'),
+(27683,7, 3733.333, 948.8146, 53.49077,'Remnant of Dahlia Suntouch'),
+(27683,8, 3737.499, 950.9161, 53.46587,'Remnant of Dahlia Suntouch'),
+(27683,9, 3737.499, 950.9161, 53.46587,'Remnant of Dahlia Suntouch'),
+(27683,10, 3736.349, 956.1506, 53.60175,'Remnant of Dahlia Suntouch');
+
+UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` =27683;
+DELETE FROM `smart_scripts` WHERE `entryorguid` =27683 AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` =27680 AND `source_type`=0 AND `id`=12;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` =2768300 AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(27683, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 53, 0, 27683, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Remnant of Dahlia Suntouch - On Just Summoned - Start WP'),
+(27683, 0, 1, 2, 40, 0, 100, 0, 9, 27683, 0, 0, 54, 25000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Remnant of Dahlia Suntouch - On Reached WP9 - Pause WP'),
+(27683, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 2768300, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Remnant of Dahlia Suntouch - On Reached WP9 - Run Script'),
+(27680, 0, 12, 0, 6, 0, 100, 0, 0, 0, 0, 0, 12, 27683, 1, 60000, 0, 0, 0, 8, 0, 0, 0, 3712.014, 938.0595, 55.06598, 0.4672305, 'Dahlia Suntouch - On Death - Summon Remnant of Dahlia Suntouch'),
+(2768300, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Remnant of Dahlia Suntouch - Script - Say Line 1'),
+(2768300, 9, 1, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Remnant of Dahlia Suntouch - Script - Say Line 2'),
+(2768300, 9, 2, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Remnant of Dahlia Suntouch - Script - Say Line 3'),
+(2768300, 9, 3, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Remnant of Dahlia Suntouch - Script - Say Line 4'),
+(2768300, 9, 4, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Remnant of Dahlia Suntouch - Script - Say Line 5'),
+(2768300, 9, 5, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Remnant of Dahlia Suntouch - Script - Say Line 6'),
+(2768300, 9, 6, 0, 0, 0, 100, 0, 500, 500, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Remnant of Dahlia Suntouch - Despawn - Say Line 6');
diff --git a/sql/updates/world/2014_08_15_01_world_misc.sql b/sql/updates/world/2014_08_15_01_world_misc.sql
new file mode 100644
index 00000000000..5be02998c64
--- /dev/null
+++ b/sql/updates/world/2014_08_15_01_world_misc.sql
@@ -0,0 +1,170 @@
+SET @CGuid := 143153;
+SET @OGuid := 77204;
+DELETE FROM `creature` WHERE `id` IN(23929,25284);
+INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES
+(@CGUID+0, 23929, 571, 1, 1, 2062.051, -6156.655, 2.237447, 2.628232, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+1, 23929, 571, 1, 1, 2039.878, -6193.417, -3.080797, 0.6698744, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+2, 23929, 571, 1, 1, 2081.596, -6220.62, -5.559644, 5.520558, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+3, 23929, 571, 1, 1, 2077.341, -6119.324, 5.133451, 4.804286, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+4, 23929, 571, 1, 1, 2115, -6212.778, -4.308464, 3.277982, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+5, 23929, 571, 1, 1, 2122.892, -6158.371, 0.6280799, 0.982948, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+6, 23929, 571, 1, 1, 2087.858, -6250.41, -10.2408, 1.35658, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+7, 23929, 571, 1, 1, 2119.835, -6118.032, 4.803041, 4.132127, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+8, 23929, 571, 1, 1, 2013.993, -6254.518, -21.00015, 1.112391, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+9, 23929, 571, 1, 1, 2074.681, -6119.5, 5.277219, 0.4713301, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+10, 23929, 571, 1, 1, 2031.484, -6194.683, -3.001702, 3.621255, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+11, 23929, 571, 1, 1, 1812.82, -6244.173, 1.262661, 2.487445, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+12, 23929, 571, 1, 1, 1776.06, -6286.881, -8.274602, 2.982747, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+13, 23929, 571, 1, 1, 1751.377, -6316.019, -10.69181, 3.970208, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+14, 23929, 571, 1, 1, 1815.154, -6316.675, -13.0728, 4.246229, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+15, 23929, 571, 1, 1, 1720.834, -6354.166, -23.7564, 3.148981, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+16, 23929, 571, 1, 1, 1786.484, -6348.827, -15.25126, 5.586704, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+17, 23929, 571, 1, 1, 2012.074, -6258.688, -24.43521, 1.652964, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+18, 23929, 571, 1, 1, 2079.094, -6215.773, -5.043775, 5.081459, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+19, 23929, 571, 1, 1, 2071.581, -6157.182, 0.1636388, 5.932077, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+20, 23929, 571, 1, 1, 2074.838, -6118.759, 5.493956, 5.970884, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+21, 23929, 571, 1, 1, 2117.708, -6161.979, -0.6126428, 3.141593, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+22, 23929, 571, 1, 1, 2125.113, -6124.736, 3.693666, 0.07874685, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+23, 23929, 571, 1, 1, 2151.335, -6116.62, 3.726775, 0.7912424, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+24, 23929, 571, 1, 1, 2164.445, -6072.661, 6.89298, 2.316718, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+25, 23929, 571, 1, 1, 2179.933, -6160.375, -2.803007, 4.367789, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+26, 23929, 571, 1, 1, 2153.739, -6181.967, -3.171751, 5.224991, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+27, 23929, 571, 1, 1, 2220.191, -6099.616, 0.6470425, 4.567189, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+28, 23929, 571, 1, 1, 2221.758, -6150.805, -3.64033, 6.07286, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+29, 23929, 571, 1, 1, 2219.395, -6119.518, -0.3414693, 5.788517, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+30, 23929, 571, 1, 1, 2244.717, -6174.005, -2.611649, 4.025463, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+31, 23929, 571, 1, 1, 2268.053, -6148.229, 0.8215511, 4.072433, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+32, 23929, 571, 1, 1, 2259.826, -6126.416, -1.830338, 5.523048, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+33, 23929, 571, 1, 1, 2254.738, -6091.322, -2.024077, 5.402378, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+34, 23929, 571, 1, 1, 2271.875, -6126.52, -1.595837, 4.712389, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+35, 23929, 571, 1, 1, 2314.286, -6078.776, -3.049409, 1.255219, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+36, 23929, 571, 1, 1, 2285.159, -6048.628, 1.530014, 1.072228, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+37, 23929, 571, 1, 1, 2343.827, -6044.389, 1.277295, 1.883511, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+38, 23929, 571, 1, 1, 2335.332, -6080.069, 1.338652, 0.232657, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+39, 23929, 571, 1, 1, 2351.129, -6115.324, -4.712684, 3.427819, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+40, 23929, 571, 1, 1, 2386.805, -6029.24, 1.689566, 5.427387, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+41, 23929, 571, 1, 1, 2386.735, -6067.292, -0.04827976, 5.714135, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+42, 23929, 571, 1, 1, 2384.594, -6092.619, -3.653382, 5.481915, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+43, 23929, 571, 1, 1, 2423.318, -6059.001, -6.105264, 3.636262, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+44, 23929, 571, 1, 1, 2377.889, -6160.928, -19.9129, 1.64061, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+45, 23929, 571, 1, 1, 2436.968, -6086.432, -7.688639, 2.888794, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+46, 23929, 571, 1, 1, 2440.737, -6130.041, 1.548573, 0.08994298, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+47, 23929, 571, 1, 1, 2431.062, -6115.15, 1.2024, 0.1236143, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+48, 23929, 571, 1, 1, 2441.386, -6147.935, -9.38678, 5.727692, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+49, 23929, 571, 1, 1, 2481.23, -6117.843, -16.34631, 0.01528431, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+50, 23929, 571, 1, 1, 2416.964, -6180.481, -10.01509, 5.76622, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+51, 23929, 571, 1, 1, 2517.968, -6183.572, -14.04712, 0.9787358, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+52, 23929, 571, 1, 1, 2479.459, -6216.994, -9.751188, 5.713609, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+53, 23929, 571, 1, 1, 2357.83, -6189.611, -5.109934, 4.951204, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+54, 23929, 571, 1, 1, 2449.997, -6250.838, -23.58067, 5.063299, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+55, 23929, 571, 1, 1, 2309.368, -6179.754, -1.228604, 4.355446, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+56, 23929, 571, 1, 1, 2275.881, -6190.431, -3.251583, 4.121325, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+57, 23929, 571, 1, 1, 2145.802, -6215.906, -7.7219, 3.838213, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+58, 23929, 571, 1, 1, 2120.029, -6220.328, -5.733196, 5.31485, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+59, 23929, 571, 1, 1, 2184.749, -6251.813, -16.28959, 5.527495, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+60, 23929, 571, 1, 1, 1854.276, -6285.03, -2.871074, 0.0351761, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+61, 23929, 571, 1, 1, 1380.867, -6553.344, -46.03973, 3.758869, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+62, 23929, 571, 1, 1, 1178.156, -6519.182, -92.66708, 3.490531, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+63, 23929, 571, 1, 1, 1127.725, -6511.934, -94.98593, 4.032036, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+64, 23929, 571, 1, 1, 1084.161, -6485.229, -108.9694, 0.2125256, 120, 0, 1), -- 23929 (Area: 3979)
+(@CGUID+65, 23929, 571, 1, 1, 1921.829, -6288.605, -31.88664, 2.203755, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+66, 23929, 571, 1, 1, 1874.235, -6321.702, -14.44084, 3.356235, 120, 5, 1), -- 23929 (Area: 495)
+(@CGUID+67, 25284, 571, 1, 1, 2978.103, 6172.022, 60.97056, 5.323254, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+68, 25284, 571, 1, 1, 2945.243, 6246.111, 60.97499, 6.161012, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+69, 25284, 571, 1, 1, 2957.582, 6227.221, 60.7323, 3.944444, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+70, 25284, 571, 1, 1, 2926.579, 6281.956, 62.19782, 0.8028514, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+71, 25284, 571, 1, 1, 2887.594, 6237.456, 77.77579, 3.857178, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+72, 25284, 571, 1, 1, 2867.707, 6267.306, 61.74702, 4.991642, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+73, 25284, 571, 1, 1, 2854.757, 6246.977, 77.77579, 3.351032, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+74, 25284, 571, 1, 1, 2905.465, 6216.614, 61.55614, 5.305801, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+75, 25284, 571, 1, 1, 2928.379, 6185.368, 62.54679, 1.919862, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+76, 25284, 571, 1, 1, 2894.524, 6226.447, 77.77579, 3.647738, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+77, 25284, 571, 1, 1, 2887.594, 6237.456, 77.77579, 3.857178, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+78, 25284, 571, 1, 1, 2854.757, 6246.977, 77.77579, 3.351032, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+79, 25284, 571, 1, 1, 2905.465, 6216.614, 61.55614, 5.305801, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+80, 25284, 571, 1, 1, 2902.444, 6158.434, 78.50218, 2.96706, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+81, 25284, 571, 1, 1, 2895.373, 6293.756, 61.66352, 4.24115, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+82, 25284, 571, 1, 1, 2934.037, 6166.059, 62.02911, 2.007129, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+83, 25284, 571, 1, 1, 2819.929, 6311.556, 62.53657, 4.694936, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+84, 25284, 571, 1, 1, 2921.874, 6135.715, 78.50816, 5.166174, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+85, 25284, 571, 1, 1, 2754.331, 6240.902, 77.77577, 3.176499, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+86, 25284, 571, 1, 1, 2704.211, 6040.896, 30.74461, 5.77704, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+87, 25284, 571, 1, 1, 2722.752, 6031.677, 30.67421, 2.181662, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+88, 25284, 571, 1, 1, 2685.116, 6131.614, 40.07638, 2.530727, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+89, 25284, 571, 1, 1, 2689.42, 6110.311, 40.18113, 2.199115, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+90, 25284, 571, 1, 1, 2680.275, 6147.348, 40.37154, 5.602507, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+91, 25284, 571, 1, 1, 2721.42, 6008.339, 32.75626, 3.804818, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+92, 25284, 571, 1, 1, 2650.328, 6111.799, 38.28828, 3.001966, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+93, 25284, 571, 1, 1, 2689.249, 6194.803, 54.03319, 3.490659, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+94, 25284, 571, 1, 1, 2669.266, 6179.793, 39.35976, 5.654867, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+95, 25284, 571, 1, 1, 2656.433, 6220.198, 38.51787, 1.762783, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+96, 25284, 571, 1, 1, 2567.771, 6109.047, 54.6977, 3.769911, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+97, 25284, 571, 1, 1, 2641.339, 6031.713, 54.29123, 3.263766, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+98, 25284, 571, 1, 1, 2625.259, 6095.536, 54.0161, 5.235988, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+99, 25284, 571, 1, 1, 2585.699, 6190.792, 39.16593, 3.909538, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+100, 25284, 571, 1, 1, 2615.039, 6115.129, 45.42371, 2.495821, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+101, 25284, 571, 1, 1, 2634.755, 6034.534, 54.04792, 3.071779, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+102, 25284, 571, 1, 1, 2700.171, 6236.872, 39.57338, 6.126106, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+103, 25284, 571, 1, 1, 2660.299, 6237.816, 38.33454, 3.909538, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+104, 25284, 571, 1, 1, 2671.279, 6169.584, 39.5054, 5.51524, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+105, 25284, 571, 1, 1, 2717.305, 6294.582, 61.74333, 1.343904, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+106, 25284, 571, 1, 1, 2673.979, 6268.218, 39.8142, 2.635447, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+107, 25284, 571, 1, 1, 2629.925, 6118.807, 38.28828, 2.426008, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+108, 25284, 571, 1, 1, 2627.617, 6052.651, 54.03309, 6.213372, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+109, 25284, 571, 1, 1, 2590.953, 6064.318, 53.93201, 0.9948376, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+110, 25284, 571, 1, 1, 2650.328, 6111.799, 38.28828, 3.001966, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+111, 25284, 571, 1, 1, 2669.266, 6179.793, 39.35976, 5.654867, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+112, 25284, 571, 1, 1, 2637.65, 6217.151, 40.16053, 2.199115, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+113, 25284, 571, 1, 1, 2677.915, 6199.642, 39.81421, 2.513274, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+114, 25284, 571, 1, 1, 2708.715, 6270.94, 47.00795, 3.228859, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+115, 25284, 571, 1, 1, 2685.116, 6131.614, 40.07638, 2.530727, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+116, 25284, 571, 1, 1, 2680.275, 6147.348, 40.37154, 5.602507, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+117, 25284, 571, 1, 1, 2990.109, 6142.668, 61.59288, 1.27409, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+118, 25284, 571, 1, 1, 2673.979, 6268.218, 39.8142, 2.635447, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+119, 25284, 571, 1, 1, 2700.171, 6236.872, 39.57338, 6.126106, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+120, 25284, 571, 1, 1, 2641.339, 6031.713, 54.29123, 3.263766, 120, 0, 0), -- 25284 (Area: 3537)
+(@CGUID+121, 25284, 571, 1, 1, 2979.675, 6128.437, 62.3862, 2.844887, 120, 0, 0); -- 25284 (Area: 3537)
+
+DELETE FROM `gameobject` WHERE `id` =188359;
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(@OGUID+0, 188359, 571, 1, 1, 2739.448, 1009.872, -15.50548, 1.117009, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+1, 188359, 571, 1, 1, 2693.321, 800.6493, -35.41924, 4.01426, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+2, 188359, 571, 1, 1, 2626.211, 916.5868, -38.96599, 0.1745321, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+3, 188359, 571, 1, 1, 2676.746, 1013.403, -40.85683, 4.136433, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+4, 188359, 571, 1, 1, 2620.612, 856.0625, -50.26746, 4.450591, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+5, 188359, 571, 1, 1, 2572.437, 893.8802, -58.98691, 1.466076, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+6, 188359, 571, 1, 1, 2529.14, 934.5538, -72.81474, 0.7853968, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+7, 188359, 571, 1, 1, 2575.657, 1030.057, -53.22688, 2.268925, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+8, 188359, 571, 1, 1, 2534.077, 989.4757, -71.60398, 1.466076, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+9, 188359, 571, 1, 1, 2509.641, 873.2882, -75.62807, 1.658062, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+10, 188359, 571, 1, 1, 2563.084, 823.2552, -61.71206, 3.124123, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+11, 188359, 571, 1, 1, 2518.605, 800.5799, -76.53564, 2.146753, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+12, 188359, 571, 1, 1, 2615.869, 802.5712, -51.88618, 4.904376, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+13, 188359, 571, 1, 1, 2581.496, 762.3195, -61.76929, 1.117009, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+14, 188359, 571, 1, 1, 2535.514, 735.6823, -77.05926, 2.617989, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+15, 188359, 571, 1, 1, 2571.571, 706.4549, -67.86278, 1.989672, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+16, 188359, 571, 1, 1, 2629.165, 735.0938, -46.26245, 1.640607, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+17, 188359, 571, 1, 1, 2613.99, 677.934, -56.06399, 6.230826, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+18, 188359, 571, 1, 1, 2681.451, 736.7986, -33.3134, 0.9075702, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+19, 188359, 571, 1, 1, 2645.693, 650.7758, -48.87302, 2.792518, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+20, 188359, 571, 1, 1, 2711.268, 1039.043, -16.4229, 5.724681, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+21, 188359, 571, 1, 1, 2644.706, 1073.232, -23.43658, 3.926996, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+22, 188359, 571, 1, 1, 2647.365, 1045.391, -30.60161, 2.007128, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+23, 188359, 571, 1, 1, 2633.851, 982.8386, -46.50484, 0.2094394, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+24, 188359, 571, 1, 1, 2590.615, 1085.63, -34.9085, 6.265733, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+25, 188359, 571, 1, 1, 2609.903, 625.9184, -57.36692, 4.502952, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+26, 188359, 571, 1, 1, 2549.809, 657.2969, -71.88847, 6.0912, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+27, 188359, 571, 1, 1, 2638.909, 576.8455, -54.19276, 1.815142, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+28, 188359, 571, 1, 1, 2701.917, 570.9913, -38.3619, 1.239183, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+29, 188359, 571, 1, 1, 2575.972, 561.1805, -57.53023, 5.131269, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+30, 188359, 571, 1, 1, 2532.788, 599.1788, -67.74231, 5.951575, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+31, 188359, 571, 1, 1, 2518.677, 539.4149, -57.49432, 3.141593, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+32, 188359, 571, 1, 1, 2660.824, 515.9827, -59.03183, 2.91469, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+33, 188359, 571, 1, 1, 2581.496, 762.3195, -61.76929, 1.117009, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+34, 188359, 571, 1, 1, 2572.437, 893.8802, -58.98691, 1.466076, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+35, 188359, 571, 1, 1, 2633.851, 982.8386, -46.50484, 0.2094394, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+36, 188359, 571, 1, 1, 2676.746, 1013.403, -40.85683, 4.136433, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+37, 188359, 571, 1, 1, 2520.906, 1052.955, -56.98813, 5.794494, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+38, 188359, 571, 1, 1, 2533.467, 1092.911, -30.86761, 1.518436, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+39, 188359, 571, 1, 1, 2599.236, 1126.641, -24.74891, 4.468043, 0, 0, 0, 1, 120, 255, 1), -- 188359 (Area: 65)
+(@OGUID+40, 188359, 571, 1, 1, 2633.851, 982.8386, -46.50484, 0.2094394, 0, 0, 0, 1, 120, 255, 1); -- 188359 (Area: 65)
diff --git a/sql/updates/world/2014_08_15_02_world_misc.sql b/sql/updates/world/2014_08_15_02_world_misc.sql
new file mode 100644
index 00000000000..52c52593ab5
--- /dev/null
+++ b/sql/updates/world/2014_08_15_02_world_misc.sql
@@ -0,0 +1,106 @@
+DELETE FROM `creature_text` WHERE `entry` IN(27210,27951,27202,27203,27246);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
+(27210, 0, 0, 'Now I''ll show you the REAL power of the Onslaught!', 12, 0, 100, 0, 0, 14192, 'High General Abbendis',27593),
+(27951, 0, 0, 'Kill them Abbendis! Do not fail me!', 14, 0, 100, 25, 0, 14198, 'Admiral Barean Westwind',27354),
+(27951, 1, 0, 'The grand admiral studies you a moment through narrowed eyes.', 16, 0, 100, 0, 0, 0, 'Admiral Barean Westwind',27355),
+(27951, 2, 0, 'You served your purpose.', 12, 0, 100, 0, 0, 14199, 'Admiral Barean Westwind',27357),
+(27951, 3, 0, 'I will see you in Icecrown, weakling... if you live that long!', 12, 0, 100, 0, 0, 14200, 'Admiral Barean Westwind',27358),
+(27203, 0, 0, 'Be purified by steel!', 12, 0, 100, 0, 0, 0, 'Onslaught Footman',26404),
+(27203, 0, 1, 'By the Light!', 12, 0, 100, 0, 0, 0, 'Onslaught Footman',26403),
+(27203, 0, 2, 'In the name of the Light!', 12, 0, 100, 0, 0, 0, 'Onslaught Footman',26402),
+(27203, 0, 3, 'You will be cleansed!', 12, 0, 100, 0, 0, 0, 'Onslaught Footman',26401),
+(27202, 0, 0, 'Abbendis will see you purged!', 12, 0, 100, 0, 0, 0, 'Onslaught Raven Priest',26399),
+(27202, 0, 1, 'You are impure!', 12, 0, 100, 0, 0, 0, 'Onslaught Raven Priest',26393),
+(27202, 0, 2, 'Gah! What are you doing?', 12, 0, 100, 5, 0, 7256, 'Onslaught Raven Priest',26637),
+(27202, 1, 0, 'I sense the taint of this land in you, footman. Report to the Bishop before the start of your next shift.', 12, 0, 100, 0, 0, 0, 'Onslaught Raven Priest',26256),
+(27202, 1, 1, 'Your protection is strong, child. Continue your work.', 12, 0, 100, 0, 0, 0, 'Onslaught Raven Priest',26390),
+(27202, 1, 2, 'The Grand Admiral himself has come to see to our dedication. If I see you slacking on your post again, I will gut you myself.', 12, 0, 100, 0, 0, 0, 'Onslaught Raven Priest',26655),
+(27202, 1, 3, 'You require the Bishop''s blessing. Go to him soon.', 12, 0, 100, 0, 0, 0, 'Onslaught Raven Priest',26391),
+(27202, 2, 0, 'HELP! HELP! THIS $g MAN : WOMAN; HAS STOLEN MY IMAGE!', 12, 0, 100, 0, 0, 0, 'Onslaught Raven Priest',26543),
+(27246, 0, 0, 'It is good that you have come my child. The Light''s protection has worn thin on you.', 12, 0, 100, 0, 0, 0, 'Bishop Street',26271),
+(27246, 1, 0, 'It is done. Serve the Light well.', 12, 0, 100, 0, 0, 0, 'Bishop Street',26272),
+(27246, 2, 0, 'How dare you interrupt our righteous work?!', 12, 0, 100, 0, 0, 0, 'Bishop Street',26405);
+
+UPDATE `creature_template` SET `unit_flags`=32768 WHERE `entry`=27951;
+
+UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` =27951;
+DELETE FROM `smart_scripts` WHERE `entryorguid` =27951 AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` =27210 AND `source_type`=0 AND `id`>2;
+DELETE FROM `smart_scripts` WHERE `entryorguid` =27203 AND `source_type`=0 AND `id`=1;
+DELETE FROM `smart_scripts` WHERE `entryorguid` =27202 AND `source_type`=0 AND `id`>13;
+DELETE FROM `smart_scripts` WHERE `entryorguid` =27246 AND `source_type`=0 AND `id`>10;
+
+UPDATE `smart_scripts` SET `action_type`=1, `action_param1`=2,`target_type`=7, `comment`='Onslaught Raven Priest - On Spellhit \'Banshee\'s Magic Mirror\' - Say (No Repeat)' WHERE `entryorguid`=27202 AND `source_type`=0 AND `id`=12 AND `link`=0;
+
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(2795100,2795101,2795102) AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(27951, 0, 0, 1, 25, 0, 100, 0, 0, 0, 0, 0, 20, 0,0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - On Reset - Disable Auto Attack'),
+(27951, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 21, 0,0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - On Reset - Disable Combat Movement'),
+(27951, 0, 2, 0, 38, 0, 100, 0, 2, 2, 0, 0, 28, 50161,0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - On Data Set 2 2 - Remove Aura Protection Sphere'),
+(27951, 0, 3, 4, 4, 0, 100, 0, 0, 0, 0, 0, 11, 50161,0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - On Agro - Cast Protection Sphere'),
+(27951, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 2795100,2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - On Agro - Run Script 1'),
+(27951, 0, 5, 0, 38, 0, 100, 0, 1, 1, 0, 0, 80, 2795101,2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - On Data Set 1 1 - Run Script 2'),
+(27951, 0, 6, 0, 40, 0, 100, 0, 6, 27951, 0, 0, 1, 3,0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - On Reached WP6 - Say Line 4'),
+(27951, 0, 7, 0, 40, 0, 100, 0, 26, 27951, 0, 0, 80, 2795102,2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - On Reached WP26 - Run Script 3'),
+(27951, 0, 8, 0, 11, 0, 100, 0, 0, 0, 0, 0, 19, 768,0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - On Respawn - Remove Unit flags immune to pc/npc'),
+(27951, 0, 9, 0, 38, 0, 100, 0, 3, 3, 0, 0, 49, 0,0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - On Data Set 3 3 - Enter combat (Stored Target)'),
+(27210, 0, 3, 0, 6, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 27951, 0, 0, 0, 0, 0, 0, 'High General Abbendis - On Death - Set Data 1 1 on Admiral Barean Westwind '),
+(27210, 0, 4, 0, 7, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 27951, 0, 0, 0, 0, 0, 0, 'High General Abbendis - On Evade - Set Data 2 2 on Admiral Barean Westwind '),
+(27210, 0, 5, 6, 4, 0, 100, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'High General Abbendis - On Agro - Store Targetlist'),
+(27210, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 19, 27951, 0, 0, 0, 0, 0, 0, 'High General Abbendis - On Agro - Send Target Targetlist to Admiral Barean Westwind'),
+(27210, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 45, 3, 3, 0, 0, 0, 0, 19, 27951, 0, 0, 0, 0, 0, 0, 'High General Abbendis - On Agro - Set Data 3 3 on Admiral Barean Westwind'),
+(27210, 0, 8, 0,11, 0, 100, 1, 0, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 10, 85322, 27951, 0, 0, 0, 0, 0, 'High General Abbendis - On Respawn - Respawn Admiral Barean Westwind '),
+(27203, 0, 1, 0, 4, 0, 30, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Onslaught Footman - On Agro - Say'),
+(27202, 0, 14, 0, 4, 0, 30, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Onslaught Raven Priest - On Aggro - Say'),
+(27202, 0, 15, 0, 1, 0, 50, 0, 0, 45000, 60000, 90000, 1, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Onslaught Raven Priest - OOC - Say'),
+(27246, 0, 11, 0, 10, 0, 100, 0, 0, 40, 45000, 55000, 1, 0, 7000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bishop Street - OOC Los - Say Line 1'),
+(27246, 0, 12, 0, 52, 0, 100, 0, 0, 27246, 0, 0, 1, 1, 7000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bishop Street - On Text Over Line 1 - Say Line 2'),
+(27246, 0, 13, 0, 4, 0, 100, 0, 0, 0, 0, 0, 1, 2, 7000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bishop Street - On Agro Say Line 3'),
+(2795100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0,0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - Script 1 - Say Line 1'),
+(2795100, 9, 1, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 0,0, 0, 0, 0, 0, 19, 27210, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - Script 1 - Say Line 1 (High General Abbendis)'),
+(2795101, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 18, 768,0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - Script 2 - Set Unit Flags Immune to NPC/PC'),
+(2795101, 9, 1, 0, 0, 0, 100, 0, 100, 100, 0, 0, 11, 50161,0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - Script 2 - Cast Protection Spear'),
+(2795101, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0,0, 0, 0, 0, 0, 21, 50, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - Script 2 - Face Player'),
+(2795101, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 1,0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - Script 2 - Say Line 2'),
+(2795101, 9, 4, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 66, 0,0, 0, 0, 0, 0, 19, 27210, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - Script 2 - Face High General Abbendis'),
+(2795101, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0,90, 8,0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - Script 2 - Set Kneel'),
+(2795101, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 2,0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - Script 2 - Say Line 3'),
+(2795101, 9, 7, 0, 0, 0, 100, 0, 5000, 5000, 0, 0,91, 8,0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - Script 2 - Set Stand'),
+(2795101, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0,53, 0,27951, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - Script 2 - Start WP'),
+(2795102, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 34427,0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - Script 3 - Cast Ethereal Teleport'),
+(2795102, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 41, 0,0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Admiral Barean Westwind - Script 3 - Despawn');
+DELETE FROM `creature_template_addon` WHERE `entry` IN (27202);
+INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES
+(27202, 0, 0x0, 0x1, '48154'); -- 27202 - 48154
+
+DELETE FROM `waypoints` WHERE `entry` IN(27951);
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
+(27951,1, 2663.62, -359.1632, 144.224,'Admiral Barean Westwind'),
+(27951,2, 2664.87, -358.9132, 143.724,'Admiral Barean Westwind'),
+(27951,3, 2666.12, -358.6632, 143.224,'Admiral Barean Westwind'),
+(27951,4, 2667.12, -358.4132, 142.724,'Admiral Barean Westwind'),
+(27951,5, 2668.37, -358.4132, 142.474,'Admiral Barean Westwind'),
+(27951,6, 2669.62, -358.1632, 142.224,'Admiral Barean Westwind'),
+(27951,7, 2671.12, -357.9132, 141.724,'Admiral Barean Westwind'),
+(27951,8, 2679.87, -356.6632, 141.724,'Admiral Barean Westwind'),
+(27951,9, 2684.62, -355.9132, 141.724,'Admiral Barean Westwind'),
+(27951,10, 2691.62, -355.1632, 141.724,'Admiral Barean Westwind'),
+(27951,11, 2698.62, -354.1632, 141.724,'Admiral Barean Westwind'),
+(27951,12, 2705.87, -353.1632, 141.724,'Admiral Barean Westwind'),
+(27951,13, 2714.12, -351.9132, 141.724,'Admiral Barean Westwind'),
+(27951,14, 2715.37, -351.6632, 141.724,'Admiral Barean Westwind'),
+(27951,15, 2717.62, -351.4132, 141.724,'Admiral Barean Westwind'),
+(27951,16, 2717.798, -351.4926, 141.4669,'Admiral Barean Westwind'),
+(27951,17, 2718.548, -351.2426, 141.4669,'Admiral Barean Westwind'),
+(27951,18, 2719.298, -353.4926, 141.4669,'Admiral Barean Westwind'),
+(27951,19, 2720.548, -355.2426, 141.4669,'Admiral Barean Westwind'),
+(27951,20, 2720.86, -355.3831, 141.4667,'Admiral Barean Westwind'),
+(27951,21, 2722.36, -357.8831, 141.4667,'Admiral Barean Westwind'),
+(27951,22, 2723.61, -357.6331, 141.4667,'Admiral Barean Westwind'),
+(27951,23, 2726.86, -357.3831, 141.4667,'Admiral Barean Westwind'),
+(27951,24, 2731.61, -356.6331, 141.4667,'Admiral Barean Westwind'),
+(27951,25, 2733.86, -356.3831, 141.4667,'Admiral Barean Westwind'),
+(27951,26, 2736.61, -355.8831, 141.4667,'Admiral Barean Westwind');
+
+UPDATE `creature` SET `spawndist`=5 WHERE `guid`=143217;
diff --git a/sql/updates/world/2014_08_16_00_world_misc.sql b/sql/updates/world/2014_08_16_00_world_misc.sql
new file mode 100644
index 00000000000..4db8b4e7aa1
--- /dev/null
+++ b/sql/updates/world/2014_08_16_00_world_misc.sql
@@ -0,0 +1,55 @@
+DELETE FROM `creature_text` WHERE `entry` IN(30243,30632,31258,29880,30725);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
+(30243, 0, 0, 'I''ll eat your heart!', 12, 0, 100, 0, 0, 14388, 'Njorndar Spear-Sister',30508),
+(30243, 0, 1, 'I will feed you to the dogs!', 12, 0, 100, 0, 0, 14389, 'Njorndar Spear-Sister',30499),
+(30243, 0, 2, 'I will feed you to the dogs!', 12, 0, 100, 0, 0, 14385, 'Njorndar Spear-Sister',30499),
+(30243, 0, 3, 'I will take pleasure in gutting you!', 12, 0, 100, 0, 0, 14384, 'Njorndar Spear-Sister',30498),
+(30243, 0, 4, 'Sniveling pig!', 12, 0, 100, 0, 0, 14394, 'Njorndar Spear-Sister',30504),
+(30243, 0, 5, 'Ugglin oo bjorr!', 12, 0, 100, 0, 0, 14395, 'Njorndar Spear-Sister',30505),
+(30243, 0, 6, 'You come to die!', 12, 0, 100, 0, 0, 14392, 'Njorndar Spear-Sister',30502),
+(30243, 0, 7, 'Die, maggot!', 12, 0, 100, 0, 0, 14391, 'Njorndar Spear-Sister',30501),
+(30243, 0, 8, 'Haraak foln!', 12, 0, 100, 0, 0, 14396, 'Njorndar Spear-Sister',30506),
+(30243, 0, 9, 'Your entrails will make a fine necklace.', 12, 0, 100, 0, 0, 14386, 'Njorndar Spear-Sister',30500),
+(30243, 0, 10, 'Die, maggot!', 12, 0, 100, 0, 0, 14387, 'Njorndar Spear-Sister',30501),
+(30243, 0, 11, 'Your entrails will make a fine necklace.', 12, 0, 100, 0, 0, 14390, 'Njorndar Spear-Sister',30500),
+(30632, 0, 0, 'Your entrails will make a fine necklace.', 12, 0, 100, 0, 0, 13535, 'Mjordin Water Magus',30500),
+(30632, 0, 1, 'I''ll eat your heart!', 12, 0, 100, 0, 0, 13695, 'Mjordin Water Magus',30508),
+(30632, 0, 2, 'Haraak foln!', 12, 0, 100, 0, 0, 13541, 'Mjordin Water Magus',30506),
+(30632, 0, 3, 'I''ll eat your heart!', 12, 0, 100, 0, 0, 13542, 'Mjordin Water Magus',30508),
+(30632, 0, 4, 'Sniveling pig!', 12, 0, 100, 0, 0, 13539, 'Mjordin Water Magus',30504),
+(30632, 0, 5, 'I spit on you!', 12, 0, 100, 0, 0, 13538, 'Mjordin Water Magus',30503),
+(31258, 0, 0, 'I will take pleasure in gutting you!', 12, 0, 100, 0, 0, 13533, 'Ymirheim Chosen Warrior',30498),
+(31258, 0, 1, 'I''ll eat your heart!', 12, 0, 100, 1, 0, 13542, 'Ymirheim Chosen Warrior',30508),
+(29880, 0, 0, 'You come to die!', 12, 0, 100, 0, 0, 13537, 'Jotunheim Warrior',30502),
+(29880, 0, 1, 'Sniveling pig!', 12, 0, 100, 0, 0, 13539, 'Jotunheim Warrior',30504),
+(29880, 0, 2, 'I will feed you to the dogs!', 12, 0, 100, 0, 0, 13534, 'Jotunheim Warrior',30499),
+(30725, 0, 0, 'You come to die!', 12, 0, 100, 0, 0, 13537, 'Jotunheim Sleep-Watcher',30502),
+(30725, 0, 1, 'I spit on you!', 12, 0, 100, 0, 0, 13537, 'Jotunheim Sleep-Watcher',30503),
+(30725, 0, 2, 'Your entrails will make a fine necklace.', 12, 0, 100, 0, 0, 13535, 'Jotunheim Sleep-Watcher',30500);
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=9839;
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES
+(9839, 0, 0, 'Koltira... this might sound strange, but I keep seeing some kid\'s ghost. Matthias Lehner... does the name mean anything to you?', 32828, 1, 1, 10195, 0, 0, 0, '', 0);
+
+DELETE FROM `gossip_menu` WHERE `entry`=10195;
+INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES
+(10195, 14141); -- 29795
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9839;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(15, 9839, 0, 0, 0, 28, 0, 13348, 0, 0, 0, 0, 0, '', 'Only show gossip if player has quest Futility complete'),
+(15, 9839, 0, 0, 1, 28, 0, 13348, 0, 0, 0, 0, 0, '', 'Only show gossip if player has quest Futility rewarded'),
+(15, 9839, 0, 0, 2, 28, 0, 13348, 0, 0, 0, 0, 0, '', 'Only show gossip if player has quest Futility taken');
+
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=30243 AND `id`=2;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=30632 AND `id`=4;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=31258 AND `id`=4;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=29880 AND `id`=4;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=30725 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
+(30243, 0, 2, 0, 4, 0, 66, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Njorndar Spear-Sister - On Agro - Say'),
+(30632, 0, 4, 0, 4, 0, 66, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Mjordin Water Magus - On Agro - Say'),
+(31258, 0, 4, 0, 4, 0, 66, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ymirheim Chosen Warrior - On Agro - Say'),
+(29880, 0, 4, 0, 4, 0, 66, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Jotunheim Warrior - On Agro - Say'),
+(30725, 0, 3, 0, 4, 0, 66, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Jotunheim Sleep-Watcher - On Agro - Say');
diff --git a/sql/updates/world/2014_08_18_00_world_ulduar.sql b/sql/updates/world/2014_08_18_00_world_ulduar.sql
new file mode 100644
index 00000000000..bdf0cedb986
--- /dev/null
+++ b/sql/updates/world/2014_08_18_00_world_ulduar.sql
@@ -0,0 +1,100 @@
+--
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (63274, 63414, 63667, 63382, 64402, 65034, 63681, 64542, 65192, 64570, 63027, 65346, 66351, 65224, 63009, 64620, 63820, 64425, 64426, 64621, 64398, 64619, 64623, 65354, 64618, 64436, 63340, 64383, 63339, 64562, 63041, 63801, 64463);
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(63801, 'spell_mimiron_bomb_bot'),
+(65192, 'spell_mimiron_clear_fires'),
+(65224, 'spell_mimiron_clear_fires'),
+(64619, 'spell_mimiron_clear_fires'),
+(65354, 'spell_mimiron_clear_fires'),
+(64463, 'spell_mimiron_despawn_assault_bots'),
+(64618, 'spell_mimiron_fire_search'),
+(64570, 'spell_mimiron_flame_suppressant'),
+(64436, 'spell_mimiron_magnetic_core'),
+(63667, 'spell_mimiron_napalm_shell'),
+(63274, 'spell_mimiron_p3wx2_laser_barrage'),
+(64542, 'spell_mimiron_plasma_blast'),
+(63027, 'spell_mimiron_proximity_mines'),
+(66351, 'spell_mimiron_proximity_explosion'),
+(63009, 'spell_mimiron_proximity_explosion'),
+(65346, 'spell_mimiron_proximity_trigger'),
+(63382, 'spell_mimiron_rapid_burst'),
+(64402, 'spell_mimiron_rocket_strike'),
+(65034, 'spell_mimiron_rocket_strike'),
+(63041, 'spell_mimiron_rocket_strike_damage'),
+(63681, 'spell_mimiron_rocket_strike_target_select'),
+(64383, 'spell_mimiron_self_repair'),
+(63414, 'spell_mimiron_spinning_up'),
+(64426, 'spell_mimiron_summon_assault_bot'),
+(64425, 'spell_mimiron_summon_assault_bot_target'),
+(64621, 'spell_mimiron_summon_fire_bot'),
+(64620, 'spell_mimiron_summon_fire_bot_target'),
+(64562, 'spell_mimiron_summon_flames_spread'),
+(64623, 'spell_mimiron_summon_frost_bomb_target'),
+(64398, 'spell_mimiron_summon_junk_bot'),
+(63820, 'spell_mimiron_summon_junk_bot_target'),
+(63339, 'spell_mimiron_weld');
+
+DELETE FROM `spelldifficulty_dbc` WHERE `id` IN (66351, 64019, 63387, 62997, 64348, 64352, 63689, 65647, 63677, 63679, 64626);
+INSERT INTO `spelldifficulty_dbc` (`id`, `spellid0`, `spellid1`) VALUES
+(64348, 64348, 64536),
+(64352, 64352, 64537),
+(66351, 66351, 63009),
+(63387, 63387, 64531),
+(64019, 64019, 64532),
+(62997, 62997, 64529),
+(63689, 63689, 64535),
+(65647, 65647, 65648),
+(63677, 63677, 64533),
+(63679, 63679, 64534),
+(64626, 64626, 65333);
+
+DELETE FROM `conditions` WHERE `SourceEntry` IN (65192, 64570, 63274, 66490, 63300, 63414, 64539, 64402, 65034, 63041, 65224, 64620, 63820, 64425, 64619, 64626, 65333, 65354, 64618, 64623, 64436, 64444, 65101, 64463);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 65192, 0, 0, 31, 0, 3, 34363, 0, 0, 0, 0, '', 'Flame Suppressant VX EFFECT_0 can only hit NPC_FLAME'),
+(13, 1, 65192, 0, 1, 31, 0, 3, 34121, 0, 0, 0, 0, '', 'Flame Suppressant VX EFFECT_0 can only hit NPC_FLAME_SPREAD'),
+(13, 2, 64570, 0, 0, 31, 0, 3, 34363, 0, 0, 0, 0, '', 'Flame Suppressant MK EFFECT_1 can only hit NPC_FLAME'),
+(13, 2, 64570, 0, 1, 31, 0, 3, 34121, 0, 0, 0, 0, '', 'Flame Suppressant MK EFFECT_1 can only hit NPC_FLAME_SPREAD'),
+(13, 1, 64623, 0, 0, 31, 0, 3, 34363, 0, 0, 0, 0, '', 'Frost Bomb EFFECT_0 can only hit NPC_FLAME'),
+(13, 1, 64623, 0, 1, 31, 0, 3, 34121, 0, 0, 0, 0, '', 'Frost Bomb EFFECT_0 can only hit NPC_FLAME_SPREAD'),
+(13, 4, 64626, 0, 0, 31, 0, 3, 34363, 0, 0, 0, 0, '', 'Explosion EFFECT_2 can only hit NPC_FLAME'),
+(13, 4, 64626, 0, 1, 31, 0, 3, 34121, 0, 0, 0, 0, '', 'Explosion EFFECT_2 can only hit NPC_FLAME_SPREAD'),
+(13, 4, 65333, 0, 0, 31, 0, 3, 34363, 0, 0, 0, 0, '', 'Explosion EFFECT_2 can only hit NPC_FLAME'),
+(13, 4, 65333, 0, 1, 31, 0, 3, 34121, 0, 0, 0, 0, '', 'Explosion EFFECT_2 can only hit NPC_FLAME_SPREAD'),
+(13, 1, 65224, 0, 0, 31, 0, 3, 34363, 0, 0, 0, 0, '', 'Clear Fires EFFECT_0 can only hit NPC_FLAME'),
+(13, 1, 65224, 0, 1, 31, 0, 3, 34121, 0, 0, 0, 0, '', 'Clear Fires EFFECT_0 can only hit NPC_FLAME_SPREAD'),
+(13, 1, 65354, 0, 0, 31, 0, 3, 34363, 0, 0, 0, 0, '', 'Clear Fires EFFECT_0 can only hit NPC_FLAME'),
+(13, 1, 65354, 0, 1, 31, 0, 3, 34121, 0, 0, 0, 0, '', 'Clear Fires EFFECT_0 can only hit NPC_FLAME_SPREAD'),
+(13, 1, 64619, 0, 0, 31, 0, 3, 34363, 0, 0, 0, 0, '', 'Water Spray EFFECT_0 can only hit NPC_FLAME'),
+(13, 1, 64619, 0, 1, 31, 0, 3, 34121, 0, 0, 0, 0, '', 'Water Spray EFFECT_0 can only hit NPC_FLAME_SPREAD'),
+(13, 1, 64618, 0, 0, 31, 0, 3, 34363, 0, 0, 0, 0, '', 'Fire Search EFFECT_0 can only hit NPC_FLAME'),
+(13, 1, 64618, 0, 1, 31, 0, 3, 34121, 0, 0, 0, 0, '', 'Fire Search EFFECT_0 can only hit NPC_FLAME_SPREAD'),
+(13, 1, 64539, 0, 0, 31, 0, 3, 34071, 0, 0, 0, 0, '', 'Napalm Shell EFFECT_0 can only hit NPC_LEVIATHAN_MKII_TURRET'),
+(13, 1, 63274, 0, 0, 31, 0, 3, 33576, 0, 0, 0, 0, '', 'P3Wx2 Laser Barrage EFFECT_0 can only hit NPC_DB_TARGET'),
+(17, 0, 66490, 0, 0, 31, 0, 3, 33432, 0, 0, 0, 0, '', 'P3Wx2 Laser Barrage can only hit NPC_LEVIATHAN_MKII'),
+(17, 0, 63300, 0, 0, 31, 0, 3, 33651, 0, 0, 0, 0, '', 'P3Wx2 Laser Barrage can only hit NPC_VX_001'),
+(13, 1, 63414, 0, 0, 31, 0, 3, 33576, 0, 0, 0, 0, '', 'Spinning Up EFFECT_0 can only hit NPC_DB_TARGET'),
+(13, 2, 63414, 0, 1, 31, 0, 3, 33432, 0, 0, 0, 0, '', 'Spinning Up EFFECT_1 can only hit NPC_LEVIATHAN_MKII'),
+(13, 1, 64620, 0, 0, 31, 0, 3, 33856, 0, 0, 0, 0, '', 'Summon Fire Bot Trigger EFFECT_0 can only hit NPC_BOT_SUMMON_TRIGGER'),
+(13, 1, 63820, 0, 0, 31, 0, 3, 33856, 0, 0, 0, 0, '', 'Summon Junk Bot Trigger EFFECT_0 can only hit NPC_BOT_SUMMON_TRIGGER'),
+(13, 1, 64425, 0, 0, 31, 0, 3, 33856, 0, 0, 0, 0, '', 'Summon Assault Bot Trigger EFFECT_0 can only hit NPC_BOT_SUMMON_TRIGGER'),
+(13, 1, 64402, 0, 0, 31, 0, 3, 34050, 0, 0, 0, 0, '', 'Rocket Strike EFFECT_0 can only hit NPC_ROCKET_MIMIRON_VISUAL'),
+(13, 1, 65034, 0, 0, 31, 0, 3, 34050, 0, 0, 0, 0, '', 'Rocket Strike EFFECT_0 can only hit NPC_ROCKET_MIMIRON_VISUAL'),
+(13, 2, 64436, 0, 0, 31, 0, 3, 33670, 0, 0, 0, 0, '', 'Magnetic Core EFFECT_1 can only hit NPC_AERIAL_COMMAND_UNIT'),
+(13, 1, 64444, 0, 0, 31, 0, 3, 33670, 0, 0, 0, 0, '', 'Magnetic Core EFFECT_0 can only hit NPC_AERIAL_COMMAND_UNIT'),
+(13, 1, 65101, 0, 0, 31, 0, 3, 34071, 0, 0, 0, 0, '', 'Emergency Mode EFFECT_0 can only hit NPC_LEVIATHAN_MKII_TURRET'),
+(13, 1, 64463, 0, 0, 31, 0, 3, 34057, 0, 0, 0, 0, '', 'Despawn Assault Bots EFFECT_1 can only hit NPC_ASSAULT_BOT'),
+(13, 2, 63041, 0, 0, 31, 0, 3, 34057, 0, 0, 0, 0, '', 'Rocket Strike EFFECT_1 can only hit NPC_ASSAULT_BOT'),
+(13, 4, 63041, 0, 1, 31, 0, 3, 34137, 0, 0, 0, 0, '', 'Rocket Strike EFFECT_2 can only hit NPC_EMERGENCY_FIRE_BOT'),
+(13, 4, 63041, 0, 2, 31, 0, 3, 33855, 0, 0, 0, 0, '', 'Rocket Strike EFFECT_2 can only hit NPC_JUNK_BOT'),
+(13, 4, 63041, 0, 3, 31, 0, 3, 33836, 0, 0, 0, 0, '', 'Rocket Strike EFFECT_2 can only hit NPC_BOMB_BOT');
+
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (64626, 64570, 64627, 65333, 64567);
+INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
+(64626, -64624, 0, 'Explosion - Remove SPELL_FROST_BOMB_LINKED from caster'),
+(64626, -64561, 1, 'Explosion - Remove SPELL_FLAMES_PERIODIC_TRIGGER from targets'),
+(65333, -64624, 0, 'Explosion - Remove SPELL_FROST_BOMB_LINKED from caster'),
+(65333, -64561, 1, 'Explosion - Remove SPELL_FLAMES_PERIODIC_TRIGGER from targets'),
+(64627, -64561, 1, 'Frost Bomb - Remove SPELL_FLAMES_PERIODIC_TRIGGER from target'),
+(64567, 64563, 1, 'Summon Flames Initial - Cast SPELL_SUMMON_FLAMES_INITIAL on hit targets'),
+(64570, -64561, 1, 'Flame Suppressant - Remove SPELL_FLAMES_PERIODIC_TRIGGER from targets');
+--
diff --git a/sql/updates/world/2014_08_18_01_world_command.sql b/sql/updates/world/2014_08_18_01_world_command.sql
new file mode 100644
index 00000000000..0a3b44b1991
--- /dev/null
+++ b/sql/updates/world/2014_08_18_01_world_command.sql
@@ -0,0 +1,8 @@
+DELETE FROM `command` WHERE `permission`='683';
+DELETE FROM `command` WHERE `permission`='684';
+DELETE FROM `command` WHERE `permission`='705';
+
+INSERT INTO `command` (`name`, `permission`, `help`) VALUES
+('reload reputation_reward_rate', 683, 'Syntax: .reload reputation_reward_rate\r\nReload reputation_reward_rate table.'),
+('reload reputation_spillover_template', 684, 'Syntax: .reload reputation_spillover_template\r\nReload reputation_spillover_template table.'),
+('reload warden_action', 705, 'Syntax: .reload warden_action\r\nReload warden_action.');
diff --git a/sql/updates/world/2014_08_19_00_world_misc.sql b/sql/updates/world/2014_08_19_00_world_misc.sql
new file mode 100644
index 00000000000..49d8f11fbdb
--- /dev/null
+++ b/sql/updates/world/2014_08_19_00_world_misc.sql
@@ -0,0 +1,9 @@
+UPDATE `creature_text` SET `emote`=51 WHERE `entry`=27212;
+UPDATE `creature_text` SET `emote`=1 WHERE `entry`=27439 AND `groupid`=0 AND `id`=0;
+UPDATE `creature_text` SET `emote`=6 WHERE `entry`=27439 AND `groupid`=1 AND `id`=0;
+UPDATE `creature_text` SET `emote`=1 WHERE `entry`=27439 AND `groupid`=2 AND `id`=0;
+UPDATE `creature_text` SET `emote`=25 WHERE `entry`=27439 AND `groupid`=3 AND `id`=0;
+UPDATE `creature_text` SET `emote`=274 WHERE `entry`=27439 AND `groupid`=4 AND `id`=0;
+UPDATE `creature_text` SET `sound`=2943 WHERE `entry`=27439 AND `groupid`=5 AND `id`=0;
+
+UPDATE `smart_scripts` SET `event_param1`=30 WHERE `entryorguid`=17831 AND `source_type`=0 AND `id`=4 AND `link`=5;
diff --git a/sql/updates/world/2014_08_19_01_world_event.sql b/sql/updates/world/2014_08_19_01_world_event.sql
new file mode 100644
index 00000000000..7b3bdd86059
--- /dev/null
+++ b/sql/updates/world/2014_08_19_01_world_event.sql
@@ -0,0 +1,231 @@
+SET @EventEntry := 34;
+SET @CGuid := 127312;
+
+-- Add game events to gameevent table (one per month so different brew vendor spawns each month which sells a different brew
+
+DELETE FROM `game_event` WHERE `eventEntry` BETWEEN @EventEntry AND @EventEntry+11;
+
+INSERT INTO `game_event` (`eventEntry`, `start_time`, `end_time`, `occurence`, `length`, `holiday`, `description`, `world_event`, `announce`) VALUES
+(@EventEntry, '2012-10-01 00:01:00', '2020-12-31 06:00:00', 525600, 44640, 0, 'Brew of the Month October', 0, 2),
+(@EventEntry+1, '2012-11-01 00:01:00', '2020-12-31 06:00:00', 525600, 43200, 0, 'Brew of the Month November', 0, 2),
+(@EventEntry+2, '2012-12-01 00:01:00', '2020-12-31 06:00:00', 525600, 44640, 0, 'Brew of the Month December', 0, 2),
+(@EventEntry+3, '2012-01-01 00:01:00', '2020-12-31 06:00:00', 525600, 44640, 0, 'Brew of the Month January', 0, 2),
+(@EventEntry+4, '2012-02-01 00:01:00', '2020-12-31 06:00:00', 525600, 40320, 0, 'Brew of the Month February', 0, 2),
+(@EventEntry+5, '2012-03-01 00:01:00', '2020-12-31 06:00:00', 525600, 44640, 0, 'Brew of the Month March', 0, 2),
+(@EventEntry+6, '2012-04-01 00:01:00', '2020-12-31 06:00:00', 525600, 43200, 0, 'Brew of the Month April', 0, 2),
+(@EventEntry+7, '2012-05-01 00:01:00', '2020-12-31 06:00:00', 525600, 44640, 0, 'Brew of the Month May', 0, 2),
+(@EventEntry+8, '2012-06-01 00:01:00', '2020-12-31 06:00:00', 525600, 43200, 0, 'Brew of the Month June', 0, 2),
+(@EventEntry+9, '2012-07-01 00:01:00', '2020-12-31 06:00:00', 525600, 44640, 0, 'Brew of the Month July', 0, 2),
+(@EventEntry+10, '2012-08-01 00:01:00', '2020-12-31 06:00:00', 525600, 44640, 0, 'Brew of the Month August', 0, 2),
+(@EventEntry+11, '2012-09-01 00:01:00', '2020-12-31 06:00:00', 525600, 44640, 0, 'Brew of the Month September', 0, 2);
+
+UPDATE `creature_template` SET `minlevel`=50, `maxlevel`=50, `npcflag`=129,`gossip_menu_id`=9549 WHERE `entry` IN(27806,27810,27811,27812,27813,27814,27815,27816,27817,27818,27819,27820);
+
+-- Add brewfest brews to vendors some of these are already in db but all are here just in case)
+
+DELETE FROM `npc_vendor` WHERE `entry` IN (27806,27810,27811,27812,27813,27814,27815,27816,27817,27818,27819,27820);
+
+INSERT INTO `npc_vendor` (`entry`, `slot`, `item`, `maxcount`, `incrtime`, `ExtendedCost`) VALUES
+(27806, 0, 37488, 0, 0, 0), -- Wild Winter Pilsner (January)
+(27810, 0, 37899, 0, 0, 0), -- Izzard's Ever Flavor (February)
+(27811, 0, 37490, 0, 0, 0), -- Aromatic Honey Brew (March)
+(27812, 0, 37491, 0, 0, 0), -- Metok's Bubble Bock (April)
+(27813, 0, 37492, 0, 0, 0), -- Springtime Stout (May)
+(27814, 0, 37493, 0, 0, 0), -- Blackrock Lager (June)
+(27815, 0, 37494, 0, 0, 0), -- Stranglethorn Brew (July)
+(27816, 0, 37495, 0, 0, 0), -- Draenic Pale Ale (August)
+(27817, 0, 37496, 0, 0, 0), -- Binary Brew (September)
+(27818, 0, 37497, 0, 0, 0), -- Autumnal Acorn Ale (October)
+(27819, 0, 37498, 0, 0, 0), -- Bartlett's Bitter Brew (November)
+(27820, 0, 37499, 0, 0, 0); -- Lord of Frost's Private Label (December)
+
+-- Set buycount to 6 and make duration of these items so the duration is in realtime and not game time
+UPDATE `item_template` SET `BuyCount`=6, `flagsCustom`=1 WHERE `entry` IN(37488,37899,37490,37491,37492,37493,37494,37495,37496,37497,37498,37499,37496);
+
+-- Link brew vendors to monthly events
+DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @CGuid AND @CGuid+23;
+
+INSERT INTO `game_event_creature` (`eventEntry`, `guid`) VALUES
+(@EventEntry+3, @CGuid),
+(@EventEntry+3, @CGuid+1),
+(@EventEntry+4, @CGuid+2),
+(@EventEntry+4, @CGuid+3),
+(@EventEntry+5, @CGuid+4),
+(@EventEntry+5, @CGuid+5),
+(@EventEntry+6, @CGuid+6),
+(@EventEntry+6, @CGuid+7),
+(@EventEntry+7, @CGuid+8),
+(@EventEntry+7, @CGuid+9),
+(@EventEntry+8, @CGuid+10),
+(@EventEntry+8, @CGuid+11),
+(@EventEntry+9, @CGuid+12),
+(@EventEntry+9, @CGuid+13),
+(@EventEntry+10, @CGuid+14),
+(@EventEntry+10, @CGuid+15),
+(@EventEntry+11, @CGuid+16),
+(@EventEntry+11, @CGuid+17),
+(@EventEntry, @CGuid+18),
+(@EventEntry, @CGuid+19),
+(@EventEntry+1, @CGuid+20),
+(@EventEntry+1, @CGuid+21),
+(@EventEntry+2, @CGuid+22),
+(@EventEntry+2, @CGuid+23);
+
+
+-- Add some missing gossips and conditions for these which are needed so only players who completed brew of the month quest can access vendors
+UPDATE `gossip_menu_option` SET `npc_option_npcflag`=128,`option_id`=3 WHERE `menu_id`=9554 AND `id`=0;
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=9548;
+
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES
+(9548, 0, 0, 'What do you have for me?', 26695, 3, 128, 0, 0, 0, 0, '', 0);
+
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=9549;
+
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES
+(9549, 0, 1, 'I''d like to buy this month''s brew.', 26693, 3, 128, 0, 0, 0, 0, '', 0);
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`IN(9549,9548);
+
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(15, 9548, 0, 0, 0, 2, 0, 37829, 1, 0, 0, 0, 0, '', 'Only show gossip menu if player has at least 1 brewfest prize token'),
+
+(15, 9549, 0, 0, 0, 8, 0, 12421, 0, 0, 0, 0, 0, '', 'Only allow players who have completed brew of the month quest to access vendor'),
+(15, 9549, 0, 0, 2, 8, 0, 12420, 0, 0, 0, 0, 0, '', 'Only allow players who have completed brew of the month quest to access vendor');
+
+DELETE FROM `creature` WHERE `id` IN (27806,27810,27811,27812,27813,27814,27815,27816,27817,27818,27819,27820);
+
+INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES
+(@CGuid, 27806, 0, 1, 1, 24979, 1, -4845.949, -861.9443, 501.9972, 4.485496, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+1, 27806, 1, 1, 1, 24979, 1, 1475.8, -4210.233, 43.2693, 4.014257, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+2, 27810, 0, 1, 1, 24980, 1, -4845.949, -861.9443, 501.9972, 4.485496, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+3, 27810, 1, 1, 1, 24980, 1, 1475.8, -4210.233, 43.2693, 4.014257, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+4, 27811, 0, 1, 1, 24981, 1, -4845.949, -861.9443, 501.9972, 4.485496, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+5, 27811, 1, 1, 1, 24981, 1, 1475.8, -4210.233, 43.2693, 4.014257, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+6, 27812, 0, 1, 1, 24982, 1, -4845.949, -861.9443, 501.9972, 4.485496, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+7, 27812, 1, 1, 1, 24982, 1, 1475.8, -4210.233, 43.2693, 4.014257, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+8, 27813, 0, 1, 1, 24983, 1, -4845.949, -861.9443, 501.9972, 4.485496, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+9, 27813, 1, 1, 1, 24983, 1, 1475.8, -4210.233, 43.2693, 4.014257, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+10, 27814, 0, 1, 1, 24984, 1, -4845.949, -861.9443, 501.9972, 4.485496, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+11, 27814, 1, 1, 1, 24984, 1, 1475.8, -4210.233, 43.2693, 4.014257, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+12, 27815, 0, 1, 1, 24985, 1, -4845.949, -861.9443, 501.9972, 4.485496, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+13, 27815, 1, 1, 1, 24985, 1, 1475.8, -4210.233, 43.2693, 4.014257, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+14, 27816, 0, 1, 1, 24986, 1, -4845.949, -861.9443, 501.9972, 4.485496, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+15, 27816, 1, 1, 1, 24986, 1, 1475.8, -4210.233, 43.2693, 4.014257, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+16, 27817, 0, 1, 1, 24987, 1, -4845.949, -861.9443, 501.9972, 4.485496, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+17, 27817, 1, 1, 1, 24987, 1, 1475.8, -4210.233, 43.2693, 4.014257, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+18, 27818, 0, 1, 1, 24988, 1, -4845.949, -861.9443, 501.9972, 4.485496, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+19, 27818, 1, 1, 1, 24988, 1, 1475.8, -4210.233, 43.2693, 4.014257, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+20, 27819, 0, 1, 1, 24989, 1, -4845.949, -861.9443, 501.9972, 4.485496, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+21, 27819, 1, 1, 1, 24989, 1, 1475.8, -4210.233, 43.2693, 4.014257, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+22, 27820, 0, 1, 1, 24990, 1, -4845.949, -861.9443, 501.9972, 4.485496, 120, 0, 0, 2215, 0, 0, 0, 0, 0),
+(@CGuid+23, 27820, 1, 1, 1, 24990, 1, 1475.8, -4210.233, 43.2693, 4.014257, 120, 0, 0, 2215, 0, 0, 0, 0, 0);
+
+-- Spawn Larkin Thunderbrew <Brew of the Month Club> who is needed so alliance can turn quest to unlock vendors
+DELETE FROM `creature` WHERE `guid`=@CGuid+24;
+
+INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES
+(@CGuid+24, 27478, 0, 1, 1, 22396, 0, -4849.41, -862.255, 501.997, 4.85202, 300, 0, 0, 2215, 0, 0, 0, 0, 0);
+
+-- Smart scripts to dynamically change faction on brew vendors depending on location
+-- 774 = Alliance only alliance can access vendor, vendor still appears neutral to horde but wont allow interaction
+-- 775 = Horde only horde can access vendor, vendor still appears neutral to alliance but wont allow interaction
+
+
+UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN (27806,27810,27811,27812,27813,27814,27815,27816,27817,27818,27819,27820);
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (27806,27810,27811,27812,27813,27814,27815,27816,27817,27818,27819,27820);
+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
+(27806, 0, 0, 2, 11, 0, 100, 0, 0, 0, 0, 0, 2, 774 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Alliance)'),
+(27806, 0, 1, 3, 11, 0, 100, 0, 0, 0, 0, 0, 2, 775 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Horde)'),
+(27806, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49672 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Alliance'),
+(27806, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49673 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Horde'),
+(27810, 0, 0, 2, 11, 0, 100, 0, 0, 0, 0, 0, 2, 774 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Alliance)'),
+(27810, 0, 1, 3, 11, 0, 100, 0, 0, 0, 0, 0, 2, 775 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Horde)'),
+(27810, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49672 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Alliance'),
+(27810, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49673 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Horde'),
+(27811, 0, 0, 2, 11, 0, 100, 0, 0, 0, 0, 0, 2, 774 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Alliance)'),
+(27811, 0, 1, 3, 11, 0, 100, 0, 0, 0, 0, 0, 2, 775 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Horde)'),
+(27811, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49672 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Alliance'),
+(27811, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49673 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Horde'),
+(27812, 0, 0, 2, 11, 0, 100, 0, 0, 0, 0, 0, 2, 774 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Alliance)'),
+(27812, 0, 1, 3, 11, 0, 100, 0, 0, 0, 0, 0, 2, 775 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Horde)'),
+(27812, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49672 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Alliance'),
+(27812, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49673 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Horde'),
+(27813, 0, 0, 2, 11, 0, 100, 0, 0, 0, 0, 0, 2, 774 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Alliance)'),
+(27813, 0, 1, 3, 11, 0, 100, 0, 0, 0, 0, 0, 2, 775 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Horde)'),
+(27813, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49672 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Alliance'),
+(27813, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49673 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Horde'),
+(27814, 0, 0, 2, 11, 0, 100, 0, 0, 0, 0, 0, 2, 774 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Alliance)'),
+(27814, 0, 1, 3, 11, 0, 100, 0, 0, 0, 0, 0, 2, 775 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Horde)'),
+(27814, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49672 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Alliance'),
+(27814, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49673 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Horde'),
+(27815, 0, 0, 2, 11, 0, 100, 0, 0, 0, 0, 0, 2, 774 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Alliance)'),
+(27815, 0, 1, 3, 11, 0, 100, 0, 0, 0, 0, 0, 2, 775 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Horde)'),
+(27815, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49672 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Alliance'),
+(27815, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49673 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Horde'),
+(27816, 0, 0, 2, 11, 0, 100, 0, 0, 0, 0, 0, 2, 774 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Alliance)'),
+(27816, 0, 1, 3, 11, 0, 100, 0, 0, 0, 0, 0, 2, 775 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Horde)'),
+(27816, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49672 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Alliance'),
+(27816, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49673 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Horde'),
+(27817, 0, 0, 2, 11, 0, 100, 0, 0, 0, 0, 0, 2, 774 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Alliance)'),
+(27817, 0, 1, 3, 11, 0, 100, 0, 0, 0, 0, 0, 2, 775 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Horde)'),
+(27817, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49672 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Alliance'),
+(27817, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49673 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Horde'),
+(27818, 0, 0, 2, 11, 0, 100, 0, 0, 0, 0, 0, 2, 774 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Alliance)'),
+(27818, 0, 1, 3, 11, 0, 100, 0, 0, 0, 0, 0, 2, 775 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Horde)'),
+(27818, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49672 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Alliance'),
+(27818, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49673 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Horde'),
+(27819, 0, 0, 2, 11, 0, 100, 0, 0, 0, 0, 0, 2, 774 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Alliance)'),
+(27819, 0, 1, 3, 11, 0, 100, 0, 0, 0, 0, 0, 2, 775 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Horde)'),
+(27819, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49672 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Alliance'),
+(27819, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49673 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Horde'),
+(27820, 0, 0, 2, 11, 0, 100, 0, 0, 0, 0, 0, 2, 774 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Alliance)'),
+(27820, 0, 1, 3, 11, 0, 100, 0, 0, 0, 0, 0, 2, 775 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Set Faction (Horde)'),
+(27820, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49672 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Alliance'),
+(27820, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49673 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brew Vendor - On Spawn - Cast BOTM - Vendor - Transform - Horde');
+
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry` IN (27806,27810,27811,27812,27813,27814,27815,27816,27817,27818,27819,27820);
+
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(22,1,27806,0,0,23,1,1537,0,0,0,0,'','Only Run AI in Ironforge'),
+(22,2,27806,0,0,23,1,1637,0,0,0,0,'','Only Run AI in Ogrimmar'),
+(22,1,27810,0,0,23,1,1537,0,0,0,0,'','Only Run AI in Ironforge'),
+(22,2,27810,0,0,23,1,1637,0,0,0,0,'','Only Run AI in Ogrimmar'),
+(22,1,27811,0,0,23,1,1537,0,0,0,0,'','Only Run AI in Ironforge'),
+(22,2,27811,0,0,23,1,1637,0,0,0,0,'','Only Run AI in Ogrimmar'),
+(22,1,27812,0,0,23,1,1537,0,0,0,0,'','Only Run AI in Ironforge'),
+(22,2,27812,0,0,23,1,1637,0,0,0,0,'','Only Run AI in Ogrimmar'),
+(22,1,27813,0,0,23,1,1537,0,0,0,0,'','Only Run AI in Ironforge'),
+(22,2,27813,0,0,23,1,1637,0,0,0,0,'','Only Run AI in Ogrimmar'),
+(22,1,27814,0,0,23,1,1537,0,0,0,0,'','Only Run AI in Ironforge'),
+(22,2,27814,0,0,23,1,1637,0,0,0,0,'','Only Run AI in Ogrimmar'),
+(22,1,27815,0,0,23,1,1537,0,0,0,0,'','Only Run AI in Ironforge'),
+(22,2,27815,0,0,23,1,1637,0,0,0,0,'','Only Run AI in Ogrimmar'),
+(22,1,27816,0,0,23,1,1537,0,0,0,0,'','Only Run AI in Ironforge'),
+(22,2,27816,0,0,23,1,1637,0,0,0,0,'','Only Run AI in Ogrimmar'),
+(22,1,27817,0,0,23,1,1537,0,0,0,0,'','Only Run AI in Ironforge'),
+(22,2,27817,0,0,23,1,1637,0,0,0,0,'','Only Run AI in Ogrimmar'),
+(22,1,27818,0,0,23,1,1537,0,0,0,0,'','Only Run AI in Ironforge'),
+(22,2,27818,0,0,23,1,1637,0,0,0,0,'','Only Run AI in Ogrimmar'),
+(22,1,27819,0,0,23,1,1537,0,0,0,0,'','Only Run AI in Ironforge'),
+(22,2,27819,0,0,23,1,1637,0,0,0,0,'','Only Run AI in Ogrimmar'),
+(22,1,27820,0,0,23,1,1537,0,0,0,0,'','Only Run AI in Ironforge'),
+(22,2,27820,0,0,23,1,1637,0,0,0,0,'','Only Run AI in Ogrimmar');
+
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN(42256,42255,42254,43961,42263,42257,43959,42264,42259,42260,42258,42261);
+INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
+(42256, 51655, 0, 'BOTM - Create Empty Brew Bottle'),
+(42255, 51655, 0, 'BOTM - Create Empty Brew Bottle'),
+(42254, 51655, 0, 'BOTM - Create Empty Brew Bottle'),
+(43961, 51655, 0, 'BOTM - Create Empty Brew Bottle'),
+(42263, 51655, 0, 'BOTM - Create Empty Brew Bottle'),
+(42257, 51655, 0, 'BOTM - Create Empty Brew Bottle'),
+(43959, 51655, 0, 'BOTM - Create Empty Brew Bottle'),
+(42264, 51655, 0, 'BOTM - Create Empty Brew Bottle'),
+(42259, 51655, 0, 'BOTM - Create Empty Brew Bottle'),
+(42260, 51655, 0, 'BOTM - Create Empty Brew Bottle'),
+(42258, 51655, 0, 'BOTM - Create Empty Brew Bottle'),
+(42261, 51655, 0, 'BOTM - Create Empty Brew Bottle');
diff --git a/sql/updates/world/2014_08_19_02_world_misc.sql b/sql/updates/world/2014_08_19_02_world_misc.sql
new file mode 100644
index 00000000000..dd50c4ce027
--- /dev/null
+++ b/sql/updates/world/2014_08_19_02_world_misc.sql
@@ -0,0 +1,84 @@
+UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`= '' WHERE `entry` IN(29491,28994,28721,28725,33027,28727,28715,28714,28726,29523,28989,28997,28723,28718);
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(29491,28994,28721,28725,33027,28727,28715,28714,28726,29523,28989,28997,28723,28718) 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
+(29491, 0, 0, 0, 10, 0, 100, 0, 1, 20, 30000, 120000, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Karandonna - OOC LOS - Say Line'),
+(28994, 0, 0, 0, 10, 0, 100, 0, 1, 20, 30000, 120000, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Abra Cadabra - OOC LOS - Say Line'),
+(28721, 0, 0, 0, 10, 0, 100, 0, 1, 20, 30000, 120000, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Tiffany Cartier - OOC LOS - Say Line'),
+(28727, 0, 0, 0, 10, 0, 100, 0, 1, 20, 30000, 120000, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Edward Egan - OOC LOS - Say Line'),
+(33027, 0, 0, 0, 10, 0, 100, 0, 1, 20, 30000, 120000, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Jessica Sellers - OOC LOS - Say Line'),
+(28725, 0, 0, 0, 10, 0, 100, 0, 1, 20, 30000, 120000, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Patricia Egan - OOC LOS - Say Line'),
+(28715, 0, 0, 0, 10, 0, 100, 0, 1, 20, 30000, 120000, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Endora Moorehead - OOC LOS - Say Line'),
+(28714, 0, 0, 0, 10, 0, 100, 0, 1, 20, 30000, 120000, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ildine Sorrowspear - OOC LOS - Say Line'),
+(28726, 0, 0, 0, 10, 0, 100, 0, 1, 20, 30000, 120000, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Dominique Stefano - OOC LOS - Say Line'),
+(29523, 0, 0, 0, 10, 0, 100, 0, 1, 20, 30000, 120000, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Bragund Brightlink - OOC LOS - Say Line'),
+(28989, 0, 0, 0, 10, 0, 100, 0, 1, 20, 30000, 120000, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Aemara - OOC LOS - Say Line'),
+(28997, 0, 0, 0, 10, 0, 100, 0, 1, 20, 30000, 120000, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Griselda Hunderland - OOC LOS - Say Line'),
+(28723, 0, 0, 0, 10, 0, 100, 0, 1, 20, 30000, 120000, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Larana Drome - OOC LOS - Say Line'),
+(28718, 0, 0, 0, 10, 0, 100, 0, 1, 20, 30000, 120000, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ranid Glowergold - OOC LOS - Say Line');
+
+DELETE FROM `creature_text` WHERE `entry` IN(29491,28994,28721,28725,33027,28727,28715,28714,28726,29523,28989,28997,28723,28718);
+
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
+(29491, 0, 0, 'Welcome. May I help you find something?', 12, 0, 100, 3, 0, 0, 'Karandonna', 32811),
+(29491, 0, 1, 'Welcome.', 12, 0, 100, 3, 0, 0, 'Karandonna',32936),
+(28994, 0, 0, 'Greetings.', 12, 0, 100, 3, 0, 0, 'Abra Cadabra',32935),
+(28994, 0, 1, 'Welcome. May I help you find something?', 12, 0, 100, 3, 0, 0, 'Abra Cadabra',32811),
+(28994, 0, 2, 'Welcome.', 12, 0, 100, 3, 0, 0, 'Abra Cadabra',32936),
+(28994, 0, 3, 'Let me know if you need help finding anything, $c.', 12, 0, 100, 3, 0, 0, 'Abra Cadabra',32810),
+(28721, 0, 0, 'Greetings! Please have a look around.', 12, 0, 100, 3, 0, 0, 'Tiffany Cartier',32809),
+(28721, 0, 1, 'Greetings, $c.', 12, 0, 100, 3, 0, 0, 'Tiffany Cartier',32808),
+(28721, 0, 2, 'Greetings.', 12, 0, 100, 3, 0, 0, 'Tiffany Cartier',32935),
+(28721, 0, 3, 'Let me know if you need help finding anything, $c.', 12, 0, 100, 3, 0, 0, 'Tiffany Cartier',32810),
+(28721, 0, 4, 'Welcome.', 12, 0, 100, 3, 0, 0, 'Tiffany Cartier',32936),
+(28721, 0, 5, 'Welcome. May I help you find something?', 12, 0, 100, 3, 0, 0, 'Tiffany Cartier',32811),
+(28725, 0, 0, 'Welcome. May I help you find something?', 12, 0, 100, 3, 0, 0, 'Patricia Egan',32811),
+(28725, 0, 1, 'Welcome.', 12, 0, 100, 3, 0, 0, 'Patricia Egan',32936),
+(28725, 0, 2, 'Greetings! Please have a look around.', 12, 0, 100, 3, 0, 0, 'Patricia Egan',32809),
+(28725, 0, 3, 'Welcome!', 12, 0, 100, 3, 0, 0, 'Patricia Egan',32807),
+(33027, 0, 0, 'Let me know if you need help finding anything, $c.', 12, 0, 100, 3, 0, 0, 'Jessica Sellers',32810),
+(33027, 0, 1, 'Greetings, $c.', 12, 0, 100, 3, 0, 0, 'Jessica Sellers',32808),
+(33027, 0, 2, 'Welcome. May I help you find something?', 12, 0, 100, 3, 0, 0, 'Jessica Sellers',32811),
+(33027, 0, 3, 'Greetings! Please have a look around.', 12, 0, 100, 3, 0, 0, 'Jessica Sellers',32809),
+(33027, 0, 4, 'Welcome.', 12, 0, 100, 3, 0, 0, 'Jessica Sellers',32936),
+(28727, 0, 0, 'Welcome!', 12, 0, 100, 3, 0, 0, 'Edward Egan',32807),
+(28727, 0, 1, 'Greetings.', 12, 0, 100, 3, 0, 0, 'Edward Egan',32935),
+(28727, 0, 2, 'Welcome. May I help you find something?', 12, 0, 100, 3, 0, 0, 'Edward Egan',32811),
+(28727, 0, 3, 'Greetings! Please have a look around.', 12, 0, 100, 3, 0, 0, 'Edward Egan', 32809),
+(28715, 0, 0, 'Greetings! Please have a look around.', 12, 0, 100, 3, 0, 0, 'Endora Moorehead',32809),
+(28715, 0, 1, 'Greetings, $c.', 12, 0, 100, 3, 0, 0, 'Endora Moorehead',32808),
+(28715, 0, 2, 'Welcome!', 12, 0, 100, 3, 0, 0, 'Endora Moorehead',32807),
+(28714, 0, 0, 'Welcome.', 12, 0, 100, 3, 0, 0, 'Ildine Sorrowspear',32936),
+(28714, 0, 1, 'Greetings.', 12, 0, 100, 3, 0, 0, 'Ildine Sorrowspear',32935),
+(28714, 0, 2, 'Let me know if you need help finding anything, $c.', 12, 0, 100, 3, 0, 0, 'Ildine Sorrowspear',32810),
+(28726, 0, 0, 'Greetings! Please have a look around.', 12, 0, 100, 3, 0, 0, 'Dominique Stefano',32809),
+(28726, 0, 1, 'Welcome!', 12, 0, 100, 3, 0, 0, 'Dominique Stefano',32807),
+(28726, 0, 2, 'Greetings, $c.', 12, 0, 100, 3, 0, 0, 'Dominique Stefano',32808),
+(28726, 0, 3, 'Welcome. May I help you find something?', 12, 0, 100, 3, 0, 0, 'Dominique Stefano',32811),
+(28726, 0, 4, 'Greetings.', 12, 0, 100, 3, 0, 0, 'Dominique Stefano',32935),
+(28726, 0, 5, 'Let me know if you need help finding anything, $c.', 12, 0, 100, 3, 0, 0, 'Dominique Stefano',32810),
+(29523, 0, 0, 'Welcome.', 12, 0, 100, 3, 0, 0, 'Bragund Brightlink',32936),
+(29523, 0, 1, 'Welcome!', 12, 0, 100, 3, 0, 0, 'Bragund Brightlink',32807),
+(29523, 0, 2, 'Greetings! Please have a look around.', 12, 0, 100, 3, 0, 0, 'Bragund Brightlink',32809),
+(29523, 0, 3, 'Let me know if you need help finding anything, $c.', 12, 0, 100, 3, 0, 0, 'Bragund Brightlink',32810),
+(28989, 0, 0, 'Greetings! Please have a look around.', 12, 0, 100, 3, 0, 0, 'Aemara',32809),
+(28989, 0, 1, 'Greetings.', 12, 0, 100, 3, 0, 0, 'Aemara',32935),
+(28989, 0, 2, 'Welcome. May I help you find something?', 12, 0, 100, 3, 0, 0, 'Aemara',32811),
+(28989, 0, 3, 'Greetings, $c.', 12, 0, 100, 3, 0, 0, 'Aemara',32808),
+(28989, 0, 4, 'Let me know if you need help finding anything, $c.', 12, 0, 100, 3, 0, 0, 'Aemara',32810),
+(28989, 0, 5, 'Welcome.', 12, 0, 100, 3, 0, 0, 'Aemara',32936),
+(28997, 0, 0, 'Greetings, $c.', 12, 0, 100, 3, 0, 0, 'Griselda Hunderland',32808),
+(28997, 0, 1, 'Let me know if you need help finding anything, $c.', 12, 0, 100, 3, 0, 0, 'Griselda Hunderland',32810),
+(28997, 0, 2, 'Greetings.', 12, 0, 100, 3, 0, 0, 'Griselda Hunderland',32935),
+(28997, 0, 3, 'Welcome!', 12, 0, 100, 3, 0, 0, 'Griselda Hunderland',32807),
+(28723, 0, 0, 'Greetings, $c.', 12, 0, 100, 3, 0, 0, 'Larana Drome',32808),
+(28723, 0, 1, 'Greetings.', 12, 0, 100, 3, 0, 0, 'Larana Drome',32935),
+(28723, 0, 2, 'Welcome.', 12, 0, 100, 3, 0, 0, 'Larana Drome',32936),
+(28718, 0, 0, 'Welcome!', 12, 0, 100, 3, 0, 0, 'Ranid Glowergold',32807),
+(28718, 0, 1, 'Greetings.', 12, 0, 100, 3, 0, 0, 'Ranid Glowergold',32935),
+(28718, 0, 2, 'Welcome. May I help you find something?', 12, 0, 100, 3, 0, 0, 'Ranid Glowergold',32811),
+(28718, 0, 3, 'Let me know if you need help finding anything, $c.', 12, 0, 100, 3, 0, 0, 'Ranid Glowergold',32810),
+(28718, 0, 4, 'Greetings! Please have a look around.', 12, 0, 100, 3, 0, 0, 'Ranid Glowergold',32809),
+(28718, 0, 5, 'Greetings, $c.', 12, 0, 100, 3, 0, 0, 'Ranid Glowergold',32808),
+(28718, 0, 6, 'Welcome.', 12, 0, 100, 3, 0, 0, 'Ranid Glowergold',32936);
diff --git a/sql/updates/world/2014_08_20_00_world_sai.sql b/sql/updates/world/2014_08_20_00_world_sai.sql
new file mode 100644
index 00000000000..b1ff32d4b9b
--- /dev/null
+++ b/sql/updates/world/2014_08_20_00_world_sai.sql
@@ -0,0 +1,191 @@
+SET @CGUID := 74528;
+
+DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID AND @CGUID+10;
+INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES
+(@CGUID+0, 28332, 571, 1, 1, 5711.057, 645.7639, 672.0823, 0, 120, 0, 0), -- top
+(@CGUID+1, 28332, 571, 1, 1, 5713.228, 646.6321, 653.1444, 0, 120, 0, 0),
+(@CGUID+2, 28332, 571, 1, 1, 5713.016, 648.0272, 657.1592, 0, 120, 0, 0),
+(@CGUID+3, 28332, 571, 1, 1, 5710.699, 648.6166, 656.5358, 0, 120, 0, 0),
+(@CGUID+4, 28332, 571, 1, 1, 5711.029, 645.7101, 653.7773, 0, 120, 0, 0),
+(@CGUID+5, 28332, 571, 1, 1, 5712.544, 644.6033, 656.4701, 0, 120, 0, 0),
+(@CGUID+6, 28332, 571, 1, 1, 5709.351, 644.943, 655.8727, 0, 120, 0, 0),
+(@CGUID+7, 28332, 571, 1, 1, 5711.693, 645.9358, 737.1865, 0, 120, 0, 0),
+(@CGUID+8, 28332, 571, 1, 1, 5711.447, 646.1441, 761.046, 0, 120, 0, 0),
+(@CGUID+9, 28332, 571, 1, 1, 5711.718, 645.9705, 796.1944, 0, 120, 0, 0),
+(@CGUID+10, 28332, 571, 1, 1, 5711.647, 645.8472, 856.7622, 0, 120, 0, 0);
+
+UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` IN(34044,16128,28332,30116);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(34044,16128,28332,30116) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(-@CGUID-0,-@CGUID-1,-@CGUID-2,-@CGUID-3,-@CGUID-4,-@CGUID-5,-@CGUID-6,-@CGUID-7,-@CGUID-8,-@CGUID-9,-@CGUID-10) AND `source_type`=0;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(1612800,1612801,1612802,2833200,3011600) AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(30116, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 80, 3011600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Archmage Aethas Sunreaver <Kirin Tor> - On Data Set - Run Script'), -- On retail Rhonin teleports back to original position since on tc teleport does not work for npcs this script is to respawn rhonin otherwise takes a long time to respawn.
+
+(16128, 0, 0, 5, 20, 0, 100, 0, 13631, 0, 0, 0, 80, 1612800, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhonin - On Quest Reward (All Is Well That Ends Well) - Run Script'),
+(16128, 0, 1, 5, 20, 0, 100, 0, 13819, 0, 0, 0, 80, 1612800, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhonin - On Quest Reward (Heroic: All Is Well That Ends Well) - Run Script'),
+(16128, 0, 2, 0, 38, 0, 100, 0, 1, 1, 0, 0, 80, 1612801, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhonin - On Data Set 1 1 - Run Script 2'),
+(16128, 0, 3, 0, 40, 0, 100, 0, 11, 16128, 0, 0, 80, 1612802, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhonin - On Reached WP11 - Run Script 3'),
+(16128, 0, 4, 5, 38, 0, 100, 0, 6, 6, 0, 0, 80, 1612800, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhonin - On Quest Reward (All Is Well That Ends Well) - Run Script'),
+(16128, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 30116, 0, 0, 0, 0, 0, 0, 'Rhonin - Link - Set Data to Archmage Aethas Sunreaver <Kirin Tor>'), -- To trigger respawn script
+(34044, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 53, 0, 34044, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brann Bronzebeard - On On Spawn - Start WP'),
+(34044, 0, 1, 2, 40, 0, 100, 0, 11, 34044, 0, 0, 54, 4000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brann Bronzebeard - On Reached WP13 - Pause WP'),
+(34044, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brann Bronzebeard - On Reached WP13 - Say Line 1'),
+(34044, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 16128, 0, 0, 0, 0, 0, 0, 'Brann Bronzebeard - On Reached WP13 - Set Data On Rhonin'),
+(34044, 0, 4, 0, 38, 0, 100, 0, 1, 1, 0, 0, 41, 5000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brann Bronzebeard - On Data Set - Despawn'),
+(-@CGUID-1, 0, 0, 0, 38, 0, 100, 0, 32, 32, 0, 0, 11, 64367, 0, 0, 0, 0, 0, 9, 28332, 20, 200, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Cast Algalon Event Beam'),
+(-@CGUID-2, 0, 0, 0, 38, 0, 100, 0, 32, 32, 0, 0, 11, 64367, 0, 0, 0, 0, 0, 9, 28332, 20, 200, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Cast Algalon Event Beam'),
+(-@CGUID-3, 0, 0, 0, 38, 0, 100, 0, 32, 32, 0, 0, 11, 64367, 0, 0, 0, 0, 0, 9, 28332, 20, 200, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Cast Algalon Event Beam'),
+(-@CGUID-4, 0, 0, 0, 38, 0, 100, 0, 32, 32, 0, 0, 11, 64367, 0, 0, 0, 0, 0, 9, 28332, 20, 200, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Cast Algalon Event Beam'),
+(-@CGUID-5, 0, 0, 0, 38, 0, 100, 0, 32, 32, 0, 0, 11, 64367, 0, 0, 0, 0, 0, 9, 28332, 20, 200, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Cast Algalon Event Beam'),
+(-@CGUID-6, 0, 0, 0, 38, 0, 100, 0, 32, 32, 0, 0, 11, 64367, 0, 0, 0, 0, 0, 9, 28332, 20, 200, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Cast Algalon Event Beam'),
+(-@CGUID-0, 0, 0, 0, 38, 0, 100, 0, 30, 30, 0, 0, 11, 64580, 2, 0, 0, 0, 0, 10, @CGUID+7, 28332, 0, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Cast Reply-Code Alpha (Phase 2)'),
+(-@CGUID-7, 0, 0, 0, 38, 0, 100, 0, 30, 30, 0, 0, 11, 64580, 2, 0, 0, 0, 0, 10, @CGUID+8, 28332, 0, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Cast Reply-Code Alpha (Phase 2)'),
+(-@CGUID-8, 0, 0, 0, 38, 0, 100, 0, 30, 30, 0, 0, 11, 64580, 2, 0, 0, 0, 0, 10, @CGUID+9, 28332, 0, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Cast Reply-Code Alpha (Phase 2)'),
+(-@CGUID-9, 0, 0, 0, 38, 0, 100, 0, 30, 30, 0, 0, 11, 64580, 2, 0, 0, 0, 0, 10, @CGUID+10, 28332, 0, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Cast Reply-Code Alpha (Phase 2)'),
+(-@CGUID-10, 0, 0, 0, 38, 0, 100, 0, 29, 29, 0, 0, 11, 64581, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Cast Reply-Code Alpha (Phase 2)'),
+(-@CGUID-10, 0, 1, 0, 38, 0, 100, 0, 31, 31, 0, 0, 11, 64510, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Cast Reply-Code Alpha (Phase 2)'),
+(-@CGUID-0, 0, 1, 0, 38, 0, 100, 0, 28, 28, 0, 0, 80, 2833200, 2, 0, 0, 0, 0, 9, 28332, 20, 200, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Run Script'),
+(-@CGUID-1, 0, 1, 0, 38, 0, 100, 0, 28, 28, 0, 0, 80, 2833200, 2, 0, 0, 0, 0, 9, 28332, 20, 200, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Run Script'),
+(-@CGUID-2, 0, 1, 0, 38, 0, 100, 0, 28, 28, 0, 0, 80, 2833200, 2, 0, 0, 0, 0, 9, 28332, 20, 200, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Run Script'),
+(-@CGUID-3, 0, 1, 0, 38, 0, 100, 0, 28, 28, 0, 0, 80, 2833200, 2, 0, 0, 0, 0, 9, 28332, 20, 200, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Run Script'),
+(-@CGUID-4, 0, 1, 0, 38, 0, 100, 0, 28, 28, 0, 0, 80, 2833200, 2, 0, 0, 0, 0, 9, 28332, 20, 200, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Run Script'),
+(-@CGUID-5, 0, 1, 0, 38, 0, 100, 0, 28, 28, 0, 0, 80, 2833200, 2, 0, 0, 0, 0, 9, 28332, 20, 200, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Run Script'),
+(-@CGUID-6, 0, 1, 0, 38, 0, 100, 0, 28, 28, 0, 0, 80, 2833200, 2, 0, 0, 0, 0, 9, 28332, 20, 200, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Run Script'),
+(-@CGUID-7, 0, 1, 0, 38, 0, 100, 0, 28, 28, 0, 0, 80, 2833200, 2, 0, 0, 0, 0, 9, 28332, 20, 200, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Run Script'),
+(-@CGUID-8, 0, 1, 0, 38, 0, 100, 0, 28, 28, 0, 0, 80, 2833200, 2, 0, 0, 0, 0, 9, 28332, 20, 200, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Run Script'),
+(-@CGUID-9, 0, 1, 0, 38, 0, 100, 0, 28, 28, 0, 0, 80, 2833200, 2, 0, 0, 0, 0, 9, 28332, 20, 200, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Run Script'),
+(-@CGUID-10, 0, 2, 0, 38, 0, 100, 0, 28, 28, 0, 0, 80, 2833200, 2, 0, 0, 0, 0, 9, 28332, 20, 200, 0, 0, 0, 0, 'Generic Trigger LAB (Large AOI) - On Data Set - Run Script'),
+(3011600, 9, 0, 0, 0, 0, 100, 0, 205000, 205000, 0, 0, 70, 0, 0, 0, 0, 0, 0, 10, 95366, 16128, 0, 0, 0, 0, 0, 'Archmage Aethas Sunreaver <Kirin Tor> - Script - Respawn Rhonin'),
+(2833200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 28, 64367, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Generic Trigger LAB - Script - Remove aura'),
+(2833200, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 28, 64510, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Generic Trigger LAB - Script - Remove aura'),
+(2833200, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 28, 64580, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Generic Trigger LAB - Script - Remove aura'),
+(1612800, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhonin - Script - Set NPC Flags'),
+(1612800, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 34044, 1, 300000, 0, 0, 0, 8, 0, 0, 0, 5800.296, 822.4527, 668.519, 4.812811, 'Rhonin - Script - Summon Brann Bronzebeard'),
+(1612800, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 'Rhonin - Script - Say Line 1'),
+(1612801, 9, 0, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 53, 0, 16128, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhonin - Script 2 - Start WP'),
+(1612802, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 32, 32, 0, 0, 0, 0, 10, @CGUID+1, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 32, 32, 0, 0, 0, 0, 10, @CGUID+2, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 32, 32, 0, 0, 0, 0, 10, @CGUID+3, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 32, 32, 0, 0, 0, 0, 10, @CGUID+4, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 32, 32, 0, 0, 0, 0, 10, @CGUID+5, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 32, 32, 0, 0, 0, 0, 10, @CGUID+6, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 30, 30, 0, 0, 0, 0, 10, @CGUID+0, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 30, 30, 0, 0, 0, 0, 10, @CGUID+7, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 30, 30, 0, 0, 0, 0, 10, @CGUID+8, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 30, 30, 0, 0, 0, 0, 10, @CGUID+9, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 10, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 31, 31, 0, 0, 0, 0, 10, @CGUID+10, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 11, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Say Line 2'),
+(1612802, 9, 12, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Say Line 3'),
+(1612802, 9, 13, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Say Line 3'),
+(1612802, 9, 14, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Say Line 3'),
+(1612802, 9, 15, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Say Line 3'),
+(1612802, 9, 16, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Say Line 3'),
+(1612802, 9, 17, 0, 0, 0, 100, 0, 14000, 14000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Say Line 3'),
+(1612802, 9, 18, 0, 0, 0, 100, 0, 60000, 60000, 0, 0, 45, 29, 29, 0, 0, 0, 0, 10, @CGUID+10, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 19, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 28, 28, 0, 0, 0, 0, 10, @CGUID+0, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 20, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 28, 28, 0, 0, 0, 0, 10, @CGUID+1, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 21, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 28, 28, 0, 0, 0, 0, 10, @CGUID+2, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 22, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 28, 28, 0, 0, 0, 0, 10, @CGUID+3, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 23, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 28, 28, 0, 0, 0, 0, 10, @CGUID+4, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 24, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 28, 28, 0, 0, 0, 0, 10, @CGUID+5, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 25, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 28, 28, 0, 0, 0, 0, 10, @CGUID+6, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 26, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 28, 28, 0, 0, 0, 0, 10, @CGUID+7, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 27, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 28, 28, 0, 0, 0, 0, 10, @CGUID+8, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 28, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 28, 28, 0, 0, 0, 0, 10, @CGUID+9, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 29, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 28, 28, 0, 0, 0, 0, 10, @CGUID+10, 28332, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Generic Trigger LAB (Large AOI)'),
+(1612802, 9, 30, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 34044, 0, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Brann Bronzebeard'),
+(1612802, 9, 31, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 11, 51347, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Set Data on Brann Bronzebeard'),
+(1612802, 9, 32, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rhonin - Script 3 - Despawn');
+
+
+
+DELETE FROM `creature_text` WHERE `entry` IN(34044,16128);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
+(34044, 0, 0, 'Just in time. Let''s see this thing off, then.', 12, 0, 100, 0, 0, 15826, 'Brann Bronzebeard',34084),
+(16128, 0, 0, 'We received Brann''s message, and we have begun preparations.', 12, 0, 100, 1, 0, 15649, 'Rhonin',33982),
+(16128, 1, 0, 'Citizens of Dalaran! Raise your eyes to the skies and observe!', 14, 0, 100, 0, 0, 15650, 'Rhonin',33983),
+(16128, 2, 0, 'Today our world''s destruction has been averted in defiance of our very makers!', 14, 0, 100, 0, 0, 15651, 'Rhonin',33984),
+(16128, 3, 0, 'Algalon the Observer, herald of the titans, has been defeated by our brave comrades in the depths of the titan city of Ulduar.', 14, 0, 100, 0, 0, 15652, 'Rhonin',33985),
+(16128, 4, 0, 'Algalon was sent here to judge the fate of our world.', 14, 0, 100, 0, 0, 15653, 'Rhonin',33986),
+(16128, 5, 0, 'He found a planet whose races had deviated from the titans'' blueprints. A planet where not everything had gone according to plan.', 14, 0, 100, 0, 0, 15654, 'Rhonin',33987),
+(16128, 6, 0, 'Cold logic deemed our world not worth saving. Cold logic, however, does not account for the power of free will. It''s up to each of us to prove this is a world worth saving.', 14, 0, 100, 0, 0, 15655, 'Rhonin',33988),
+(16128, 7, 0, 'That our lives... our lives are worth living.', 14, 0, 100, 0, 0, 15656, 'Rhonin',33989);
+
+DELETE FROM `waypoints` WHERE `entry` IN(34044,16128);
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
+(34044,1, 5799.257, 822.8445, 668.8303,'Brann Bronzebeard'),
+(34044,2, 5800.257, 822.8445, 668.8303,'Brann Bronzebeard'),
+(34044,3, 5800.367, 821.7542, 667.9642,'Brann Bronzebeard'),
+(34044,4, 5800.662, 818.8298, 666.119,'Brann Bronzebeard'),
+(34044,5, 5801.204, 813.4578, 662.2362,'Brann Bronzebeard'),
+(34044,6, 5801.204, 813.4578, 662.2362,'Brann Bronzebeard'),
+(34044,7, 5801.473, 813.3398, 662.5571,'Brann Bronzebeard'),
+(34044,8, 5801.478, 811.0238, 662.2334,'Brann Bronzebeard'),
+(34044,9, 5801.978, 807.0238, 662.2334,'Brann Bronzebeard'),
+(34044,10, 5801.978, 806.2738, 662.2334,'Brann Bronzebeard'),
+(34044,11, 5800.728, 802.5238, 662.2334,'Brann Bronzebeard'), -- Say 1
+(34044,12, 5799.999, 799.77, 662.1868,'Brann Bronzebeard'),
+(34044,13, 5798.749, 789.02, 662.1868,'Brann Bronzebeard'),
+(34044,14, 5798.749, 787.77, 662.1868,'Brann Bronzebeard'),
+(34044,15, 5798.499, 786.52, 662.1868,'Brann Bronzebeard'),
+(34044,16, 5798.366, 786.4135, 662.1921,'Brann Bronzebeard'),
+(34044,17, 5798.116, 784.4135, 662.1921,'Brann Bronzebeard'),
+(34044,18, 5797.866, 783.6635, 662.6921,'Brann Bronzebeard'),
+(34044,19, 5797.866, 779.4135, 662.6921,'Brann Bronzebeard'),
+(34044,20, 5797.866, 775.6635, 661.9421,'Brann Bronzebeard'),
+(34044,21, 5797.866, 774.6635, 661.6921,'Brann Bronzebeard'),
+(34044,22, 5797.628, 774.3326, 661.3541,'Brann Bronzebeard'),
+(34044,23, 5797.378, 772.5826, 661.3541,'Brann Bronzebeard'),
+(34044,24, 5797.378, 772.0826, 661.3541,'Brann Bronzebeard'),
+(34044,25, 5796.628, 766.8326, 661.6041,'Brann Bronzebeard'),
+(34044,26, 5796.378, 761.8326, 658.3541,'Brann Bronzebeard'),
+(34044,27, 5795.75, 756.938, 654.6126,'Brann Bronzebeard'),
+(34044,28, 5795.75, 754.438, 652.8626,'Brann Bronzebeard'),
+(34044,29, 5795.75, 745.438, 646.8626,'Brann Bronzebeard'),
+(34044,30, 5795.75, 737.188, 640.8626,'Brann Bronzebeard'),
+(34044,31, 5795.75, 736.188, 640.6126,'Brann Bronzebeard'),
+(34044,32, 5795.629, 732.4694, 640.3873,'Brann Bronzebeard'),
+(34044,33, 5795.379, 731.2194, 640.3873,'Brann Bronzebeard'),
+(34044,34, 5794.879, 722.7194, 640.6373,'Brann Bronzebeard'),
+(34044,35, 5794.379, 720.2194, 640.6373,'Brann Bronzebeard'),
+(34044,36, 5794.141, 719.7362, 641.0156,'Brann Bronzebeard'),
+(34044,37, 5794.141, 719.4862, 641.0156,'Brann Bronzebeard'),
+(34044,38, 5793.391, 718.2362, 641.0156,'Brann Bronzebeard'),
+(34044,39, 5792.141, 716.7362, 641.0156,'Brann Bronzebeard'),
+(34044,40, 5788.391, 710.9862, 641.5156,'Brann Bronzebeard'),
+(34044,41, 5784.409, 705.4751, 642.0784,'Brann Bronzebeard'),
+(34044,42, 5780.409, 699.9751, 642.3284,'Brann Bronzebeard'),
+(34044,43, 5778.909, 697.9751, 642.5784,'Brann Bronzebeard'),
+(34044,44, 5778.659, 697.4751, 642.5784,'Brann Bronzebeard'),
+(34044,45, 5773.409, 690.4751, 642.8284,'Brann Bronzebeard'),
+(34044,46, 5772.659, 689.2251, 642.8284,'Brann Bronzebeard'),
+(34044,47, 5772.451, 688.9385, 643.1041,'Brann Bronzebeard'),
+(34044,48, 5769.951, 685.9385, 643.1041,'Brann Bronzebeard'),
+(34044,49, 5767.951, 683.4385, 643.1041,'Brann Bronzebeard'),
+(34044,50, 5761.951, 676.6885, 642.8541,'Brann Bronzebeard'),
+(34044,51, 5758.701, 672.6885, 643.1041,'Brann Bronzebeard'),
+(34044,52, 5757.701, 671.9385, 643.1041,'Brann Bronzebeard'),
+(34044,53, 5756.951, 670.9385, 643.1041,'Brann Bronzebeard'),
+(34044,54, 5755.701, 669.4385, 643.1041,'Brann Bronzebeard'),
+(34044,55, 5754.951, 668.6885, 643.3541,'Brann Bronzebeard'),
+(34044,56, 5750.951, 663.9385, 643.6041,'Brann Bronzebeard'),
+(34044,57, 5750.721, 663.7521, 643.809,'Brann Bronzebeard'),
+(34044,58, 5750.221, 663.2521, 643.809,'Brann Bronzebeard'),
+(34044,59, 5745.221, 659.0021, 644.559,'Brann Bronzebeard'),
+(34044,60, 5740.221, 654.7521, 645.559,'Brann Bronzebeard'),
+(34044,61, 5740.14, 654.6359, 645.801,'Brann Bronzebeard'),
+(34044,62, 5736.89, 651.8859, 646.051,'Brann Bronzebeard'),
+(34044,63, 5734.89, 651.1359, 646.301,'Brann Bronzebeard'),
+(34044,64, 5731.39, 649.8859, 646.801,'Brann Bronzebeard'),
+(16128,1, 5797.603, 793.3063, 662.1119,'Rhonin'),
+(16128,2, 5796.103, 777.5563, 662.3619,'Rhonin'),
+(16128,3, 5794.603, 767.0563, 661.6119,'Rhonin'),
+(16128,4, 5793.103, 753.0563, 651.8619,'Rhonin'),
+(16128,5, 5790.603, 736.8063, 640.6119,'Rhonin'),
+(16128,6, 5786.353, 717.5563, 641.1119,'Rhonin'),
+(16128,7, 5773.603, 702.0563, 642.1119,'Rhonin'),
+(16128,8, 5759.103, 683.5563, 642.6119,'Rhonin'),
+(16128,9, 5746.853, 669.0563, 644.3619,'Rhonin'),
+(16128,10, 5736.353, 658.8063, 645.8619,'Rhonin'),
+(16128,11, 5727.353, 653.8063, 646.8619,'Rhonin');
diff --git a/sql/updates/world/2014_08_21_00_world_conditions.sql b/sql/updates/world/2014_08_21_00_world_conditions.sql
new file mode 100644
index 00000000000..6a34d273f20
--- /dev/null
+++ b/sql/updates/world/2014_08_21_00_world_conditions.sql
@@ -0,0 +1,4 @@
+--
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=10027;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `Comment`) VALUES
+(15, 10027, 15, 32, 'Show gossip option if player is a Death knight');
diff --git a/sql/updates/world/2014_08_21_01_world_achievement_criteria_data.sql b/sql/updates/world/2014_08_21_01_world_achievement_criteria_data.sql
new file mode 100644
index 00000000000..afa5fc6d1d4
--- /dev/null
+++ b/sql/updates/world/2014_08_21_01_world_achievement_criteria_data.sql
@@ -0,0 +1,7 @@
+-- Supreme Defender
+DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (3698, 3699);
+INSERT INTO `achievement_criteria_data` VALUES
+(3698,6,3277,0,''),
+(3698,7,23335,0,''), -- Alliance target should have Alliance Flag buff
+(3699,6,3277,0,''),
+(3699,7,23333,0,''); -- Horde target should have Horde Flag buff
diff --git a/src/server/authserver/Server/AuthSession.cpp b/src/server/authserver/Server/AuthSession.cpp
index cdd8298174f..9931595e860 100644
--- a/src/server/authserver/Server/AuthSession.cpp
+++ b/src/server/authserver/Server/AuthSession.cpp
@@ -21,6 +21,7 @@
#include "AuthCodes.h"
#include "Database/DatabaseEnv.h"
#include "SHA1.h"
+#include "TOTP.h"
#include "openssl/crypto.h"
#include "Configuration/Config.h"
#include "RealmList.h"
@@ -52,7 +53,6 @@ enum eStatus
typedef struct AUTH_LOGON_CHALLENGE_C
{
- uint8 cmd;
uint8 error;
uint16 size;
uint8 gamename[4];
@@ -71,7 +71,6 @@ typedef struct AUTH_LOGON_CHALLENGE_C
typedef struct AUTH_LOGON_PROOF_C
{
- uint8 cmd;
uint8 A[32];
uint8 M1[20];
uint8 crc_hash[20];
@@ -99,7 +98,6 @@ typedef struct AUTH_LOGON_PROOF_S_OLD
typedef struct AUTH_RECONNECT_PROOF_C
{
- uint8 cmd;
uint8 R1[16];
uint8 R2[20];
uint8 R3[20];
@@ -114,10 +112,10 @@ enum class BufferSizes : uint32
SRP_6_S = 0x20,
};
-#define REALM_LIST_PACKET_SIZE 5
-#define XFER_ACCEPT_SIZE 1
-#define XFER_RESUME_SIZE 9
-#define XFER_CANCEL_SIZE 1
+#define REALM_LIST_PACKET_SIZE 4
+#define XFER_ACCEPT_SIZE 0
+#define XFER_RESUME_SIZE 8
+#define XFER_CANCEL_SIZE 0
std::unordered_map<uint8, AuthHandler> AuthSession::InitHandlers()
{
@@ -137,48 +135,43 @@ std::unordered_map<uint8, AuthHandler> AuthSession::InitHandlers()
std::unordered_map<uint8, AuthHandler> const Handlers = AuthSession::InitHandlers();
-void AuthSession::ReadHeaderHandler(boost::system::error_code error, size_t transferedBytes)
+void AuthSession::ReadHeaderHandler()
{
- if (!error && transferedBytes == 1)
+ uint8 cmd = GetHeaderBuffer()[0];
+ auto itr = Handlers.find(cmd);
+ if (itr != Handlers.end())
{
- uint8 cmd = GetReadBuffer()[0];
- auto itr = Handlers.find(cmd);
- if (itr != Handlers.end())
+ // Handle dynamic size packet
+ if (cmd == AUTH_LOGON_CHALLENGE || cmd == AUTH_RECONNECT_CHALLENGE)
{
- // Handle dynamic size packet
- if (cmd == AUTH_LOGON_CHALLENGE || cmd == AUTH_RECONNECT_CHALLENGE)
- {
- ReadData(sizeof(uint8) + sizeof(uint16), sizeof(cmd)); //error + size
- sAuthLogonChallenge_C* challenge = reinterpret_cast<sAuthLogonChallenge_C*>(GetReadBuffer());
+ ReadData(sizeof(uint8) + sizeof(uint16)); //error + size
+ sAuthLogonChallenge_C* challenge = reinterpret_cast<sAuthLogonChallenge_C*>(GetDataBuffer());
- AsyncReadData(challenge->size, sizeof(uint8) + sizeof(uint8) + sizeof(uint16)); // cmd + error + size
- }
- else
- AsyncReadData(itr->second.packetSize, sizeof(uint8));
+ AsyncReadData(challenge->size);
}
+ else
+ AsyncReadData(itr->second.packetSize);
}
else
CloseSocket();
}
-void AuthSession::ReadDataHandler(boost::system::error_code error, size_t transferedBytes)
+void AuthSession::ReadDataHandler()
{
- if (!error && transferedBytes > 0)
+ if (!(*this.*Handlers.at(GetHeaderBuffer()[0]).handler)())
{
- if (!(*this.*Handlers.at(GetReadBuffer()[0]).handler)())
- {
- CloseSocket();
- return;
- }
-
- AsyncReadHeader();
- }
- else
CloseSocket();
+ return;
+ }
+
+ AsyncReadHeader();
}
void AuthSession::AsyncWrite(ByteBuffer& packet)
{
+ if (!IsOpen())
+ return;
+
std::lock_guard<std::mutex> guard(_writeLock);
bool needsWriteStart = _writeQueue.empty();
@@ -191,7 +184,7 @@ void AuthSession::AsyncWrite(ByteBuffer& packet)
bool AuthSession::HandleLogonChallenge()
{
- sAuthLogonChallenge_C* challenge = reinterpret_cast<sAuthLogonChallenge_C*>(GetReadBuffer());
+ sAuthLogonChallenge_C* challenge = reinterpret_cast<sAuthLogonChallenge_C*>(GetDataBuffer());
//TC_LOG_DEBUG("server.authserver", "[AuthChallenge] got full packet, %#04x bytes", challenge->size);
TC_LOG_DEBUG("server.authserver", "[AuthChallenge] name(%d): '%s'", challenge->I_len, challenge->I);
@@ -410,7 +403,7 @@ bool AuthSession::HandleLogonProof()
TC_LOG_DEBUG("server.authserver", "Entering _HandleLogonProof");
// Read the packet
- sAuthLogonProof_C *logonProof = reinterpret_cast<sAuthLogonProof_C*>(GetReadBuffer());
+ sAuthLogonProof_C *logonProof = reinterpret_cast<sAuthLogonProof_C*>(GetDataBuffer());
// If the client has no valid version
if (_expversion == NO_VALID_EXP_FLAG)
@@ -522,17 +515,12 @@ bool AuthSession::HandleLogonProof()
// Check auth token
if ((logonProof->securityFlags & 0x04) || !_tokenKey.empty())
{
- // TODO To be fixed
-
- /*
- uint8 size;
- socket().recv((char*)&size, 1);
- char* token = new char[size + 1];
- token[size] = '\0';
- socket().recv(token, size);
- unsigned int validToken = TOTP::GenerateToken(_tokenKey.c_str());
- unsigned int incomingToken = atoi(token);
- delete[] token;
+ ReadData(1);
+ uint8 size = *(GetDataBuffer() + sizeof(sAuthLogonProof_C));
+ ReadData(size);
+ std::string token(reinterpret_cast<char*>(GetDataBuffer() + sizeof(sAuthLogonProof_C) + sizeof(size)), size);
+ uint32 validToken = TOTP::GenerateToken(_tokenKey.c_str());
+ uint32 incomingToken = atoi(token.c_str());
if (validToken != incomingToken)
{
ByteBuffer packet;
@@ -542,7 +530,7 @@ bool AuthSession::HandleLogonProof()
packet << uint8(0);
AsyncWrite(packet);
return false;
- }*/
+ }
}
ByteBuffer packet;
@@ -650,7 +638,7 @@ bool AuthSession::HandleLogonProof()
bool AuthSession::HandleReconnectChallenge()
{
TC_LOG_DEBUG("server.authserver", "Entering _HandleReconnectChallenge");
- sAuthLogonChallenge_C* challenge = reinterpret_cast<sAuthLogonChallenge_C*>(GetReadBuffer());
+ sAuthLogonChallenge_C* challenge = reinterpret_cast<sAuthLogonChallenge_C*>(GetDataBuffer());
//TC_LOG_DEBUG("server.authserver", "[AuthChallenge] got full packet, %#04x bytes", challenge->size);
TC_LOG_DEBUG("server.authserver", "[AuthChallenge] name(%d): '%s'", challenge->I_len, challenge->I);
@@ -701,7 +689,7 @@ bool AuthSession::HandleReconnectChallenge()
bool AuthSession::HandleReconnectProof()
{
TC_LOG_DEBUG("server.authserver", "Entering _HandleReconnectProof");
- sAuthReconnectProof_C *reconnectProof = reinterpret_cast<sAuthReconnectProof_C*>(GetReadBuffer());
+ sAuthReconnectProof_C *reconnectProof = reinterpret_cast<sAuthReconnectProof_C*>(GetDataBuffer());
if (_login.empty() || !_reconnectProof.GetNumBytes() || !K.GetNumBytes())
return false;
diff --git a/src/server/authserver/Server/AuthSession.h b/src/server/authserver/Server/AuthSession.h
index 5a05ee6f8e9..3497e3a030c 100644
--- a/src/server/authserver/Server/AuthSession.h
+++ b/src/server/authserver/Server/AuthSession.h
@@ -53,8 +53,8 @@ public:
void AsyncWrite(ByteBuffer& packet);
protected:
- void ReadHeaderHandler(boost::system::error_code error, size_t transferedBytes) override;
- void ReadDataHandler(boost::system::error_code error, size_t transferedBytes) override;
+ void ReadHeaderHandler() override;
+ void ReadDataHandler() override;
private:
bool HandleLogonChallenge();
diff --git a/src/server/collision/Management/VMapManager2.h b/src/server/collision/Management/VMapManager2.h
index 03de6951d5d..04292e7d8e4 100644
--- a/src/server/collision/Management/VMapManager2.h
+++ b/src/server/collision/Management/VMapManager2.h
@@ -53,7 +53,7 @@ namespace VMAP
class ManagedModel
{
public:
- ManagedModel() : iModel(0), iRefCount(0) { }
+ ManagedModel() : iModel(nullptr), iRefCount(0) { }
void setModel(WorldModel* model) { iModel = model; }
WorldModel* getModel() { return iModel; }
void incRefCount() { ++iRefCount; }
@@ -86,32 +86,32 @@ namespace VMAP
VMapManager2();
~VMapManager2(void);
- int loadMap(const char* pBasePath, unsigned int mapId, int x, int y);
+ int loadMap(const char* pBasePath, unsigned int mapId, int x, int y) override;
- void unloadMap(unsigned int mapId, int x, int y);
- void unloadMap(unsigned int mapId);
+ void unloadMap(unsigned int mapId, int x, int y) override;
+ void unloadMap(unsigned int mapId) override;
- bool isInLineOfSight(unsigned int mapId, float x1, float y1, float z1, float x2, float y2, float z2) ;
+ bool isInLineOfSight(unsigned int mapId, float x1, float y1, float z1, float x2, float y2, float z2) override ;
/**
fill the hit pos and return true, if an object was hit
*/
- bool getObjectHitPos(unsigned int mapId, float x1, float y1, float z1, float x2, float y2, float z2, float& rx, float& ry, float& rz, float modifyDist);
- float getHeight(unsigned int mapId, float x, float y, float z, float maxSearchDist);
+ bool getObjectHitPos(unsigned int mapId, float x1, float y1, float z1, float x2, float y2, float z2, float& rx, float& ry, float& rz, float modifyDist) override;
+ float getHeight(unsigned int mapId, float x, float y, float z, float maxSearchDist) override;
- bool processCommand(char* /*command*/) { return false; } // for debug and extensions
+ bool processCommand(char* /*command*/) override { return false; } // for debug and extensions
- bool getAreaInfo(unsigned int pMapId, float x, float y, float& z, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const;
- bool GetLiquidLevel(uint32 pMapId, float x, float y, float z, uint8 reqLiquidType, float& level, float& floor, uint32& type) const;
+ bool getAreaInfo(unsigned int pMapId, float x, float y, float& z, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const override;
+ bool GetLiquidLevel(uint32 pMapId, float x, float y, float z, uint8 reqLiquidType, float& level, float& floor, uint32& type) const override;
WorldModel* acquireModelInstance(const std::string& basepath, const std::string& filename);
void releaseModelInstance(const std::string& filename);
// what's the use of this? o.O
- virtual std::string getDirFileName(unsigned int mapId, int /*x*/, int /*y*/) const
+ virtual std::string getDirFileName(unsigned int mapId, int /*x*/, int /*y*/) const override
{
return getMapFileName(mapId);
}
- virtual bool existsMap(const char* basePath, unsigned int mapId, int x, int y);
+ virtual bool existsMap(const char* basePath, unsigned int mapId, int x, int y) override;
public:
void getInstanceMapTree(InstanceTreeMap &instanceMapTree);
};
diff --git a/src/server/collision/Maps/MapTree.h b/src/server/collision/Maps/MapTree.h
index 05351b74019..e16f5701de1 100644
--- a/src/server/collision/Maps/MapTree.h
+++ b/src/server/collision/Maps/MapTree.h
@@ -31,7 +31,7 @@ namespace VMAP
struct LocationInfo
{
- LocationInfo(): hitInstance(0), hitModel(0), ground_Z(-G3D::inf()) { }
+ LocationInfo(): hitInstance(nullptr), hitModel(nullptr), ground_Z(-G3D::inf()) { }
const ModelInstance* hitInstance;
const GroupModel* hitModel;
float ground_Z;
diff --git a/src/server/collision/Models/ModelInstance.h b/src/server/collision/Models/ModelInstance.h
index 3ea68f57ba4..1cb8fdde942 100644
--- a/src/server/collision/Models/ModelInstance.h
+++ b/src/server/collision/Models/ModelInstance.h
@@ -63,9 +63,9 @@ namespace VMAP
class ModelInstance: public ModelSpawn
{
public:
- ModelInstance(): iInvScale(0.0f), iModel(0) { }
+ ModelInstance(): iInvScale(0.0f), iModel(nullptr) { }
ModelInstance(const ModelSpawn &spawn, WorldModel* model);
- void setUnloaded() { iModel = 0; }
+ void setUnloaded() { iModel = nullptr; }
bool intersectRay(const G3D::Ray& pRay, float& pMaxDist, bool pStopAtFirstHit) const;
void intersectPoint(const G3D::Vector3& p, AreaInfo &info) const;
bool GetLocationInfo(const G3D::Vector3& p, LocationInfo &info) const;
diff --git a/src/server/collision/Models/WorldModel.cpp b/src/server/collision/Models/WorldModel.cpp
index 99f3782215d..d6b0a76f23b 100644
--- a/src/server/collision/Models/WorldModel.cpp
+++ b/src/server/collision/Models/WorldModel.cpp
@@ -108,7 +108,7 @@ namespace VMAP
iFlags = new uint8[width*height];
}
- WmoLiquid::WmoLiquid(const WmoLiquid &other): iHeight(0), iFlags(0)
+ WmoLiquid::WmoLiquid(const WmoLiquid &other): iHeight(nullptr), iFlags(nullptr)
{
*this = other; // use assignment operator...
}
@@ -135,14 +135,14 @@ namespace VMAP
memcpy(iHeight, other.iHeight, (iTilesX+1)*(iTilesY+1)*sizeof(float));
}
else
- iHeight = 0;
+ iHeight = nullptr;
if (other.iFlags)
{
iFlags = new uint8[iTilesX * iTilesY];
memcpy(iFlags, other.iFlags, iTilesX * iTilesY);
}
else
- iFlags = 0;
+ iFlags = nullptr;
return *this;
}
@@ -254,7 +254,7 @@ namespace VMAP
GroupModel::GroupModel(const GroupModel &other):
iBound(other.iBound), iMogpFlags(other.iMogpFlags), iGroupWMOID(other.iGroupWMOID),
- vertices(other.vertices), triangles(other.triangles), meshTree(other.meshTree), iLiquid(0)
+ vertices(other.vertices), triangles(other.triangles), meshTree(other.meshTree), iLiquid(nullptr)
{
if (other.iLiquid)
iLiquid = new WmoLiquid(*other.iLiquid);
diff --git a/src/server/game/AI/CoreAI/CombatAI.h b/src/server/game/AI/CoreAI/CombatAI.h
index f73daa2d720..4b6af3cbdda 100644
--- a/src/server/game/AI/CoreAI/CombatAI.h
+++ b/src/server/game/AI/CoreAI/CombatAI.h
@@ -30,7 +30,7 @@ class AggressorAI : public CreatureAI
public:
explicit AggressorAI(Creature* c) : CreatureAI(c) { }
- void UpdateAI(uint32);
+ void UpdateAI(uint32) override;
static int Permissible(const Creature*);
};
@@ -41,12 +41,12 @@ class CombatAI : public CreatureAI
public:
explicit CombatAI(Creature* c) : CreatureAI(c) { }
- void InitializeAI();
- void Reset();
- void EnterCombat(Unit* who);
- void JustDied(Unit* killer);
- void UpdateAI(uint32 diff);
- void SpellInterrupted(uint32 spellId, uint32 unTimeMs);
+ void InitializeAI() override;
+ void Reset() override;
+ void EnterCombat(Unit* who) override;
+ void JustDied(Unit* killer) override;
+ void UpdateAI(uint32 diff) override;
+ void SpellInterrupted(uint32 spellId, uint32 unTimeMs) override;
static int Permissible(Creature const* /*creature*/) { return PERMIT_BASE_NO; }
@@ -59,10 +59,10 @@ class CasterAI : public CombatAI
{
public:
explicit CasterAI(Creature* c) : CombatAI(c) { m_attackDist = MELEE_RANGE; }
- void InitializeAI();
- void AttackStart(Unit* victim) { AttackStartCaster(victim, m_attackDist); }
- void UpdateAI(uint32 diff);
- void EnterCombat(Unit* /*who*/);
+ void InitializeAI() override;
+ void AttackStart(Unit* victim) override { AttackStartCaster(victim, m_attackDist); }
+ void UpdateAI(uint32 diff) override;
+ void EnterCombat(Unit* /*who*/) override;
private:
float m_attackDist;
};
@@ -71,8 +71,8 @@ struct ArcherAI : public CreatureAI
{
public:
explicit ArcherAI(Creature* c);
- void AttackStart(Unit* who);
- void UpdateAI(uint32 diff);
+ void AttackStart(Unit* who) override;
+ void UpdateAI(uint32 diff) override;
static int Permissible(Creature const* /*creature*/) { return PERMIT_BASE_NO; }
@@ -84,9 +84,9 @@ struct TurretAI : public CreatureAI
{
public:
explicit TurretAI(Creature* c);
- bool CanAIAttack(Unit const* who) const;
- void AttackStart(Unit* who);
- void UpdateAI(uint32 diff);
+ bool CanAIAttack(Unit const* who) const override;
+ void AttackStart(Unit* who) override;
+ void UpdateAI(uint32 diff) override;
static int Permissible(Creature const* /*creature*/) { return PERMIT_BASE_NO; }
@@ -102,10 +102,10 @@ struct VehicleAI : public CreatureAI
public:
explicit VehicleAI(Creature* creature);
- void UpdateAI(uint32 diff);
- void MoveInLineOfSight(Unit*) { }
- void AttackStart(Unit*) { }
- void OnCharmed(bool apply);
+ void UpdateAI(uint32 diff) override;
+ void MoveInLineOfSight(Unit*) override { }
+ void AttackStart(Unit*) override { }
+ void OnCharmed(bool apply) override;
static int Permissible(Creature const* /*creature*/) { return PERMIT_BASE_NO; }
diff --git a/src/server/game/AI/CoreAI/GameObjectAI.h b/src/server/game/AI/CoreAI/GameObjectAI.h
index 36ca2c3253f..6e03103e269 100644
--- a/src/server/game/AI/CoreAI/GameObjectAI.h
+++ b/src/server/game/AI/CoreAI/GameObjectAI.h
@@ -68,7 +68,7 @@ class NullGameObjectAI : public GameObjectAI
public:
explicit NullGameObjectAI(GameObject* g);
- void UpdateAI(uint32 /*diff*/) { }
+ void UpdateAI(uint32 /*diff*/) override { }
static int Permissible(GameObject const* /*go*/) { return PERMIT_BASE_IDLE; }
};
diff --git a/src/server/game/AI/CoreAI/GuardAI.h b/src/server/game/AI/CoreAI/GuardAI.h
index 9af047e8906..c2b05d71e03 100644
--- a/src/server/game/AI/CoreAI/GuardAI.h
+++ b/src/server/game/AI/CoreAI/GuardAI.h
@@ -29,10 +29,10 @@ class GuardAI : public ScriptedAI
explicit GuardAI(Creature* creature);
static int Permissible(Creature const* creature);
- bool CanSeeAlways(WorldObject const* obj);
+ bool CanSeeAlways(WorldObject const* obj) override;
- void EnterEvadeMode();
- void JustDied(Unit* killer);
+ void EnterEvadeMode() override;
+ void JustDied(Unit* killer) override;
};
#endif
diff --git a/src/server/game/AI/CoreAI/PassiveAI.cpp b/src/server/game/AI/CoreAI/PassiveAI.cpp
index 07987cf8cec..3ae73636619 100644
--- a/src/server/game/AI/CoreAI/PassiveAI.cpp
+++ b/src/server/game/AI/CoreAI/PassiveAI.cpp
@@ -75,5 +75,5 @@ void CritterAI::EnterEvadeMode()
void TriggerAI::IsSummonedBy(Unit* summoner)
{
if (me->m_spells[0])
- me->CastSpell(me, me->m_spells[0], false, 0, 0, summoner->GetGUID());
+ me->CastSpell(me, me->m_spells[0], false, nullptr, nullptr, summoner->GetGUID());
}
diff --git a/src/server/game/AI/CoreAI/PassiveAI.h b/src/server/game/AI/CoreAI/PassiveAI.h
index 33bfde4f9f2..7f5ab5f29a2 100644
--- a/src/server/game/AI/CoreAI/PassiveAI.h
+++ b/src/server/game/AI/CoreAI/PassiveAI.h
@@ -26,9 +26,9 @@ class PassiveAI : public CreatureAI
public:
explicit PassiveAI(Creature* c);
- void MoveInLineOfSight(Unit*) { }
- void AttackStart(Unit*) { }
- void UpdateAI(uint32);
+ void MoveInLineOfSight(Unit*) override { }
+ void AttackStart(Unit*) override { }
+ void UpdateAI(uint32) override;
static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; }
};
@@ -38,13 +38,13 @@ class PossessedAI : public CreatureAI
public:
explicit PossessedAI(Creature* c);
- void MoveInLineOfSight(Unit*) { }
- void AttackStart(Unit* target);
- void UpdateAI(uint32);
- void EnterEvadeMode() { }
+ void MoveInLineOfSight(Unit*) override { }
+ void AttackStart(Unit* target) override;
+ void UpdateAI(uint32) override;
+ void EnterEvadeMode() override { }
- void JustDied(Unit*);
- void KilledUnit(Unit* victim);
+ void JustDied(Unit*) override;
+ void KilledUnit(Unit* victim) override;
static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; }
};
@@ -54,11 +54,11 @@ class NullCreatureAI : public CreatureAI
public:
explicit NullCreatureAI(Creature* c);
- void MoveInLineOfSight(Unit*) { }
- void AttackStart(Unit*) { }
- void UpdateAI(uint32) { }
- void EnterEvadeMode() { }
- void OnCharmed(bool /*apply*/) { }
+ void MoveInLineOfSight(Unit*) override { }
+ void AttackStart(Unit*) override { }
+ void UpdateAI(uint32) override { }
+ void EnterEvadeMode() override { }
+ void OnCharmed(bool /*apply*/) override { }
static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; }
};
@@ -68,15 +68,15 @@ class CritterAI : public PassiveAI
public:
explicit CritterAI(Creature* c) : PassiveAI(c) { }
- void DamageTaken(Unit* done_by, uint32& /*damage*/);
- void EnterEvadeMode();
+ void DamageTaken(Unit* done_by, uint32& /*damage*/) override;
+ void EnterEvadeMode() override;
};
class TriggerAI : public NullCreatureAI
{
public:
explicit TriggerAI(Creature* c) : NullCreatureAI(c) { }
- void IsSummonedBy(Unit* summoner);
+ void IsSummonedBy(Unit* summoner) override;
};
#endif
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index 8032568434f..4bce9113082 100644
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -246,8 +246,6 @@ void PetAI::UpdateAI(uint32 diff)
me->SendUpdateToPlayer(owner->ToPlayer());
}
- me->AddCreatureSpellCooldown(spell->m_spellInfo->Id);
-
spell->prepare(&targets);
}
diff --git a/src/server/game/AI/CoreAI/PetAI.h b/src/server/game/AI/CoreAI/PetAI.h
index 450f68443f0..c24bf3a0c1b 100644
--- a/src/server/game/AI/CoreAI/PetAI.h
+++ b/src/server/game/AI/CoreAI/PetAI.h
@@ -31,23 +31,23 @@ class PetAI : public CreatureAI
explicit PetAI(Creature* c);
- void UpdateAI(uint32);
+ void UpdateAI(uint32) override;
static int Permissible(const Creature*);
- void KilledUnit(Unit* /*victim*/);
- void AttackStart(Unit* target);
- void MovementInform(uint32 moveType, uint32 data);
- void OwnerAttackedBy(Unit* attacker);
- void OwnerAttacked(Unit* target);
- void AttackedBy(Unit* attacker);
- void ReceiveEmote(Player* player, uint32 textEmote);
+ void KilledUnit(Unit* /*victim*/) override;
+ void AttackStart(Unit* target) override;
+ void MovementInform(uint32 moveType, uint32 data) override;
+ void OwnerAttackedBy(Unit* attacker) override;
+ void OwnerAttacked(Unit* target) override;
+ void AttackedBy(Unit* attacker) override;
+ void ReceiveEmote(Player* player, uint32 textEmote) override;
// The following aren't used by the PetAI but need to be defined to override
// default CreatureAI functions which interfere with the PetAI
//
- void MoveInLineOfSight(Unit* /*who*/) { } // CreatureAI interferes with returning pets
+ void MoveInLineOfSight(Unit* /*who*/) override { } // CreatureAI interferes with returning pets
void MoveInLineOfSight_Safe(Unit* /*who*/) { } // CreatureAI interferes with returning pets
- void EnterEvadeMode() { } // For fleeing, pets don't use this type of Evade mechanic
+ void EnterEvadeMode() override { } // For fleeing, pets don't use this type of Evade mechanic
private:
bool _isVisible(Unit*) const;
diff --git a/src/server/game/AI/CoreAI/ReactorAI.h b/src/server/game/AI/CoreAI/ReactorAI.h
index 417944f9ba2..2fdccac802d 100644
--- a/src/server/game/AI/CoreAI/ReactorAI.h
+++ b/src/server/game/AI/CoreAI/ReactorAI.h
@@ -29,8 +29,8 @@ class ReactorAI : public CreatureAI
explicit ReactorAI(Creature* c) : CreatureAI(c) { }
- void MoveInLineOfSight(Unit*) { }
- void UpdateAI(uint32 diff);
+ void MoveInLineOfSight(Unit*) override { }
+ void UpdateAI(uint32 diff) override;
static int Permissible(const Creature*);
};
diff --git a/src/server/game/AI/CoreAI/TotemAI.h b/src/server/game/AI/CoreAI/TotemAI.h
index 4d5f03566ba..93106b91492 100644
--- a/src/server/game/AI/CoreAI/TotemAI.h
+++ b/src/server/game/AI/CoreAI/TotemAI.h
@@ -31,11 +31,11 @@ class TotemAI : public CreatureAI
explicit TotemAI(Creature* c);
- void MoveInLineOfSight(Unit* who);
- void AttackStart(Unit* victim);
- void EnterEvadeMode();
+ void MoveInLineOfSight(Unit* who) override;
+ void AttackStart(Unit* victim) override;
+ void EnterEvadeMode() override;
- void UpdateAI(uint32 diff);
+ void UpdateAI(uint32 diff) override;
static int Permissible(Creature const* creature);
private:
diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h
index 6ca79dc0a49..b6743b572cb 100644
--- a/src/server/game/AI/CoreAI/UnitAI.h
+++ b/src/server/game/AI/CoreAI/UnitAI.h
@@ -275,13 +275,13 @@ class PlayerAI : public UnitAI
public:
explicit PlayerAI(Player* player) : UnitAI((Unit*)player), me(player) { }
- void OnCharmed(bool apply);
+ void OnCharmed(bool apply) override;
};
class SimpleCharmedAI : public PlayerAI
{
public:
- void UpdateAI(uint32 diff);
+ void UpdateAI(uint32 diff) override;
SimpleCharmedAI(Player* player): PlayerAI(player) { }
};
diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h
index 209995d359d..b79dd6abbc8 100644
--- a/src/server/game/AI/CreatureAI.h
+++ b/src/server/game/AI/CreatureAI.h
@@ -127,7 +127,7 @@ class CreatureAI : public UnitAI
// Called at waypoint reached or point movement finished
virtual void MovementInform(uint32 /*type*/, uint32 /*id*/) { }
- void OnCharmed(bool apply);
+ void OnCharmed(bool apply) override;
// Called at reaching home after evade
virtual void JustReachedHome() { }
diff --git a/src/server/game/AI/CreatureAIFactory.h b/src/server/game/AI/CreatureAIFactory.h
index f2854f1a9ce..61e3cd2b240 100644
--- a/src/server/game/AI/CreatureAIFactory.h
+++ b/src/server/game/AI/CreatureAIFactory.h
@@ -34,9 +34,9 @@ struct CreatureAIFactory : public SelectableAI
{
CreatureAIFactory(const char* name) : SelectableAI(name) { }
- CreatureAI* Create(void*) const;
+ CreatureAI* Create(void*) const override;
- int Permit(const Creature* c) const { return REAL_AI::Permissible(c); }
+ int Permit(const Creature* c) const override { return REAL_AI::Permissible(c); }
};
template<class REAL_AI>
@@ -61,9 +61,9 @@ struct GameObjectAIFactory : public SelectableGameObjectAI
{
GameObjectAIFactory(const char* name) : SelectableGameObjectAI(name) { }
- GameObjectAI* Create(void*) const;
+ GameObjectAI* Create(void*) const override;
- int Permit(const GameObject* g) const { return REAL_GO_AI::Permissible(g); }
+ int Permit(const GameObject* g) const override { return REAL_GO_AI::Permissible(g); }
};
template<class REAL_GO_AI>
diff --git a/src/server/game/AI/CreatureAISelector.cpp b/src/server/game/AI/CreatureAISelector.cpp
index afbd306c184..3643bccdb6f 100644
--- a/src/server/game/AI/CreatureAISelector.cpp
+++ b/src/server/game/AI/CreatureAISelector.cpp
@@ -68,7 +68,7 @@ namespace FactorySelector
else
ai_factory = ai_registry.GetRegistryItem("NullCreatureAI");
}
- else if (creature->GetCreatureType() == CREATURE_TYPE_CRITTER && !creature->HasUnitTypeMask(UNIT_MASK_GUARDIAN))
+ else if (creature->IsCritter() && !creature->HasUnitTypeMask(UNIT_MASK_GUARDIAN))
ai_factory = ai_registry.GetRegistryItem("CritterAI");
}
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h
index 42a849354ef..788da26ea4a 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h
@@ -150,31 +150,31 @@ struct ScriptedAI : public CreatureAI
void AttackStartNoMove(Unit* target);
// Called at any Damage from any attacker (before damage apply)
- void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) { }
+ void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) override { }
//Called at World update tick
- virtual void UpdateAI(uint32 diff);
+ virtual void UpdateAI(uint32 diff) override;
//Called at creature death
- void JustDied(Unit* /*killer*/) { }
+ void JustDied(Unit* /*killer*/) override { }
//Called at creature killing another unit
- void KilledUnit(Unit* /*victim*/) { }
+ void KilledUnit(Unit* /*victim*/) override { }
// Called when the creature summon successfully other creature
- void JustSummoned(Creature* /*summon*/) { }
+ void JustSummoned(Creature* /*summon*/) override { }
// Called when a summoned creature is despawned
- void SummonedCreatureDespawn(Creature* /*summon*/) { }
+ void SummonedCreatureDespawn(Creature* /*summon*/) override { }
// Called when hit by a spell
- void SpellHit(Unit* /*caster*/, SpellInfo const* /*spell*/) { }
+ void SpellHit(Unit* /*caster*/, SpellInfo const* /*spell*/) override { }
// Called when spell hits a target
- void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spell*/) { }
+ void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spell*/) override { }
//Called at waypoint reached or PointMovement end
- void MovementInform(uint32 /*type*/, uint32 /*id*/) { }
+ void MovementInform(uint32 /*type*/, uint32 /*id*/) override { }
// Called when AI is temporarily replaced or put back when possess is applied or removed
void OnPossess(bool /*apply*/) { }
@@ -194,13 +194,13 @@ struct ScriptedAI : public CreatureAI
// *************
//Called at creature reset either by death or evade
- void Reset() { }
+ void Reset() override { }
//Called at creature aggro either by MoveInLOS or Attack Start
- void EnterCombat(Unit* /*victim*/) { }
+ void EnterCombat(Unit* /*victim*/) override { }
// Called before EnterCombat even before the creature is in combat.
- void AttackStart(Unit* /*target*/);
+ void AttackStart(Unit* /*target*/) override;
// *************
//AI Helper Functions
@@ -348,10 +348,10 @@ class BossAI : public ScriptedAI
InstanceScript* const instance;
BossBoundaryMap const* GetBoundary() const { return _boundary; }
- void JustSummoned(Creature* summon);
- void SummonedCreatureDespawn(Creature* summon);
+ void JustSummoned(Creature* summon) override;
+ void SummonedCreatureDespawn(Creature* summon) override;
- virtual void UpdateAI(uint32 diff);
+ virtual void UpdateAI(uint32 diff) override;
// Hook used to execute events scheduled into EventMap without the need
// to override UpdateAI
@@ -359,10 +359,10 @@ class BossAI : public ScriptedAI
// is supposed to run more than once
virtual void ExecuteEvent(uint32 /*eventId*/) { }
- void Reset() { _Reset(); }
- void EnterCombat(Unit* /*who*/) { _EnterCombat(); }
- void JustDied(Unit* /*killer*/) { _JustDied(); }
- void JustReachedHome() { _JustReachedHome(); }
+ void Reset() override { _Reset(); }
+ void EnterCombat(Unit* /*who*/) override { _EnterCombat(); }
+ void JustDied(Unit* /*killer*/) override { _JustDied(); }
+ void JustReachedHome() override { _JustReachedHome(); }
protected:
void _Reset();
@@ -396,10 +396,10 @@ class WorldBossAI : public ScriptedAI
WorldBossAI(Creature* creature);
virtual ~WorldBossAI() { }
- void JustSummoned(Creature* summon);
- void SummonedCreatureDespawn(Creature* summon);
+ void JustSummoned(Creature* summon) override;
+ void SummonedCreatureDespawn(Creature* summon) override;
- virtual void UpdateAI(uint32 diff);
+ virtual void UpdateAI(uint32 diff) override;
// Hook used to execute events scheduled into EventMap without the need
// to override UpdateAI
@@ -407,9 +407,9 @@ class WorldBossAI : public ScriptedAI
// is supposed to run more than once
virtual void ExecuteEvent(uint32 /*eventId*/) { }
- void Reset() { _Reset(); }
- void EnterCombat(Unit* /*who*/) { _EnterCombat(); }
- void JustDied(Unit* /*killer*/) { _JustDied(); }
+ void Reset() override { _Reset(); }
+ void EnterCombat(Unit* /*who*/) override { _EnterCombat(); }
+ void JustDied(Unit* /*killer*/) override { _JustDied(); }
protected:
void _Reset();
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h
index 177810bbbfd..b8c9ee57aeb 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h
@@ -56,22 +56,22 @@ struct npc_escortAI : public ScriptedAI
~npc_escortAI() { }
// CreatureAI functions
- void AttackStart(Unit* who);
+ void AttackStart(Unit* who) override;
- void MoveInLineOfSight(Unit* who);
+ void MoveInLineOfSight(Unit* who) override;
- void JustDied(Unit*);
+ void JustDied(Unit*) override;
- void JustRespawned();
+ void JustRespawned() override;
void ReturnToLastPoint();
- void EnterEvadeMode();
+ void EnterEvadeMode() override;
- void UpdateAI(uint32 diff); //the "internal" update, calls UpdateEscortAI()
+ void UpdateAI(uint32 diff) override; //the "internal" update, calls UpdateEscortAI()
virtual void UpdateEscortAI(uint32 const diff); //used when it's needed to add code in update (abilities, scripted events, etc)
- void MovementInform(uint32, uint32);
+ void MovementInform(uint32, uint32) override;
// EscortAI functions
void AddWaypoint(uint32 id, float x, float y, float z, uint32 waitTime = 0); // waitTime is in ms
@@ -94,7 +94,7 @@ struct npc_escortAI : public ScriptedAI
void SetEscortPaused(bool on);
bool HasEscortState(uint32 escortState) { return (m_uiEscortState & escortState) != 0; }
- virtual bool IsEscorted() { return (m_uiEscortState & STATE_ESCORT_ESCORTING); }
+ virtual bool IsEscorted() override { return (m_uiEscortState & STATE_ESCORT_ESCORTING); }
void SetMaxPlayerDistance(float newMax) { MaxPlayerDistance = newMax; }
float GetMaxPlayerDistance() { return MaxPlayerDistance; }
diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h
index af7508441b9..adb17ef76b1 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h
@@ -40,19 +40,19 @@ class FollowerAI : public ScriptedAI
//virtual void WaypointReached(uint32 uiPointId) = 0;
- void MovementInform(uint32 motionType, uint32 pointId);
+ void MovementInform(uint32 motionType, uint32 pointId) override;
- void AttackStart(Unit*);
+ void AttackStart(Unit*) override;
- void MoveInLineOfSight(Unit*);
+ void MoveInLineOfSight(Unit*) override;
- void EnterEvadeMode();
+ void EnterEvadeMode() override;
- void JustDied(Unit*);
+ void JustDied(Unit*) override;
- void JustRespawned();
+ void JustRespawned() override;
- void UpdateAI(uint32); //the "internal" update, calls UpdateFollowerAI()
+ void UpdateAI(uint32) override; //the "internal" update, calls UpdateFollowerAI()
virtual void UpdateFollowerAI(uint32); //used when it's needed to add code in update (abilities, scripted events, etc)
void StartFollow(Player* player, uint32 factionForFollower = 0, const Quest* quest = NULL);
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index af47b52f500..41f783f4289 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -931,7 +931,7 @@ class SmartTrigger : public AreaTriggerScript
SmartTrigger() : AreaTriggerScript("SmartTrigger") { }
- bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
+ bool OnTrigger(Player* player, AreaTriggerEntry const* trigger) override
{
if (!player->IsAlive())
return false;
diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h
index 4d66b976746..e674bbfdaac 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.h
+++ b/src/server/game/AI/SmartScripts/SmartAI.h
@@ -70,94 +70,94 @@ class SmartAI : public CreatureAI
bool IsEscortInvokerInRange();
// Called when creature is spawned or respawned
- void JustRespawned();
+ void JustRespawned() override;
// Called at reaching home after evade, InitializeAI(), EnterEvadeMode() for resetting variables
- void JustReachedHome();
+ void JustReachedHome() override;
// Called for reaction at enter to combat if not in combat yet (enemy can be NULL)
- void EnterCombat(Unit* enemy);
+ void EnterCombat(Unit* enemy) override;
// Called for reaction at stopping attack at no attackers or targets
- void EnterEvadeMode();
+ void EnterEvadeMode() override;
// Called when the creature is killed
- void JustDied(Unit* killer);
+ void JustDied(Unit* killer) override;
// Called when the creature kills a unit
- void KilledUnit(Unit* victim);
+ void KilledUnit(Unit* victim) override;
// Called when the creature summon successfully other creature
- void JustSummoned(Creature* creature);
+ void JustSummoned(Creature* creature) override;
// Tell creature to attack and follow the victim
- void AttackStart(Unit* who);
+ void AttackStart(Unit* who) override;
// Called if IsVisible(Unit* who) is true at each *who move, reaction at visibility zone enter
- void MoveInLineOfSight(Unit* who);
+ void MoveInLineOfSight(Unit* who) override;
// Called when hit by a spell
- void SpellHit(Unit* unit, const SpellInfo* spellInfo);
+ void SpellHit(Unit* unit, const SpellInfo* spellInfo) override;
// Called when spell hits a target
- void SpellHitTarget(Unit* target, const SpellInfo* spellInfo);
+ void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override;
// Called at any Damage from any attacker (before damage apply)
- void DamageTaken(Unit* doneBy, uint32& damage);
+ void DamageTaken(Unit* doneBy, uint32& damage) override;
// Called when the creature receives heal
- void HealReceived(Unit* doneBy, uint32& addhealth);
+ void HealReceived(Unit* doneBy, uint32& addhealth) override;
// Called at World update tick
- void UpdateAI(uint32 diff);
+ void UpdateAI(uint32 diff) override;
// Called at text emote receive from player
- void ReceiveEmote(Player* player, uint32 textEmote);
+ void ReceiveEmote(Player* player, uint32 textEmote) override;
// Called at waypoint reached or point movement finished
- void MovementInform(uint32 MovementType, uint32 Data);
+ void MovementInform(uint32 MovementType, uint32 Data) override;
// Called when creature is summoned by another unit
- void IsSummonedBy(Unit* summoner);
+ void IsSummonedBy(Unit* summoner) override;
// Called at any Damage to any victim (before damage apply)
- void DamageDealt(Unit* doneTo, uint32& damage, DamageEffectType /*damagetype*/);
+ void DamageDealt(Unit* doneTo, uint32& damage, DamageEffectType /*damagetype*/) override;
// Called when a summoned creature dissapears (UnSommoned)
- void SummonedCreatureDespawn(Creature* unit);
+ void SummonedCreatureDespawn(Creature* unit) override;
// called when the corpse of this creature gets removed
- void CorpseRemoved(uint32& respawnDelay);
+ void CorpseRemoved(uint32& respawnDelay) override;
// Called at World update tick if creature is charmed
void UpdateAIWhileCharmed(const uint32 diff);
// Called when a Player/Creature enters the creature (vehicle)
- void PassengerBoarded(Unit* who, int8 seatId, bool apply);
+ void PassengerBoarded(Unit* who, int8 seatId, bool apply) override;
// Called when gets initialized, when creature is added to world
- void InitializeAI();
+ void InitializeAI() override;
// Called when creature gets charmed by another unit
- void OnCharmed(bool apply);
+ void OnCharmed(bool apply) override;
// Called when victim is in line of sight
- bool CanAIAttack(const Unit* who) const;
+ bool CanAIAttack(const Unit* who) const override;
// Used in scripts to share variables
- void DoAction(int32 param = 0);
+ void DoAction(int32 param = 0) override;
// Used in scripts to share variables
- uint32 GetData(uint32 id = 0) const;
+ uint32 GetData(uint32 id = 0) const override;
// Used in scripts to share variables
- void SetData(uint32 id, uint32 value);
+ void SetData(uint32 id, uint32 value) override;
// Used in scripts to share variables
- void SetGUID(uint64 guid, int32 id = 0);
+ void SetGUID(uint64 guid, int32 id = 0) override;
// Used in scripts to share variables
- uint64 GetGUID(int32 id = 0) const;
+ uint64 GetGUID(int32 id = 0) const override;
//core related
static int Permissible(const Creature*);
@@ -174,15 +174,15 @@ class SmartAI : public CreatureAI
void SetInvincibilityHpLevel(uint32 level) { mInvincibilityHpLevel = level; }
- void sGossipHello(Player* player);
- void sGossipSelect(Player* player, uint32 sender, uint32 action);
- void sGossipSelectCode(Player* player, uint32 sender, uint32 action, const char* code);
- void sQuestAccept(Player* player, Quest const* quest);
+ void sGossipHello(Player* player) override;
+ void sGossipSelect(Player* player, uint32 sender, uint32 action) override;
+ void sGossipSelectCode(Player* player, uint32 sender, uint32 action, const char* code) override;
+ void sQuestAccept(Player* player, Quest const* quest) override;
//void sQuestSelect(Player* player, Quest const* quest);
//void sQuestComplete(Player* player, Quest const* quest);
- void sQuestReward(Player* player, Quest const* quest, uint32 opt);
- bool sOnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effIndex);
- void sOnGameEvent(bool start, uint16 eventId);
+ void sQuestReward(Player* player, Quest const* quest, uint32 opt) override;
+ bool sOnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effIndex) override;
+ void sOnGameEvent(bool start, uint16 eventId) override;
uint32 mEscortQuestID;
@@ -193,7 +193,7 @@ class SmartAI : public CreatureAI
}
void StartDespawn() { mDespawnState = 2; }
- void OnSpellClick(Unit* clicker, bool& result);
+ void OnSpellClick(Unit* clicker, bool& result) override;
private:
uint32 mFollowCreditType;
@@ -237,23 +237,23 @@ class SmartGameObjectAI : public GameObjectAI
SmartGameObjectAI(GameObject* g) : GameObjectAI(g) { }
~SmartGameObjectAI() { }
- void UpdateAI(uint32 diff);
- void InitializeAI();
- void Reset();
+ void UpdateAI(uint32 diff) override;
+ void InitializeAI() override;
+ void Reset() override;
SmartScript* GetScript() { return &mScript; }
static int Permissible(const GameObject* g);
- bool GossipHello(Player* player);
- bool GossipSelect(Player* player, uint32 sender, uint32 action);
- bool GossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/);
- bool QuestAccept(Player* player, Quest const* quest);
- bool QuestReward(Player* player, Quest const* quest, uint32 opt);
- void Destroyed(Player* player, uint32 eventId);
- void SetData(uint32 id, uint32 value);
+ bool GossipHello(Player* player) override;
+ bool GossipSelect(Player* player, uint32 sender, uint32 action) override;
+ bool GossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) override;
+ bool QuestAccept(Player* player, Quest const* quest) override;
+ bool QuestReward(Player* player, Quest const* quest, uint32 opt) override;
+ void Destroyed(Player* player, uint32 eventId) override;
+ void SetData(uint32 id, uint32 value) override;
void SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker);
- void OnGameEvent(bool start, uint16 eventId);
- void OnStateChanged(uint32 state, Unit* unit);
- void EventInform(uint32 eventId);
+ void OnGameEvent(bool start, uint16 eventId) override;
+ void OnStateChanged(uint32 state, Unit* unit) override;
+ void EventInform(uint32 eventId) override;
private:
SmartScript mScript;
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index b06ee8613e9..cd80c646a2d 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -3213,7 +3213,7 @@ void SmartScript::InitTimer(SmartScriptHolder& e)
void SmartScript::RecalcTimer(SmartScriptHolder& e, uint32 min, uint32 max)
{
// min/max was checked at loading!
- e.timer = urand(uint32(min), uint32(max));
+ e.timer = urand(min, max);
e.active = e.timer ? false : true;
}
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
index d4afba54498..fbcffb47b7c 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -1413,7 +1413,7 @@ class SmartWaypointMgr
{
if (waypoint_map.find(id) != waypoint_map.end())
return waypoint_map[id];
- else return 0;
+ else return nullptr;
}
private:
diff --git a/src/server/game/Accounts/RBAC.h b/src/server/game/Accounts/RBAC.h
index f2637a5febc..855ffd51bb8 100644
--- a/src/server/game/Accounts/RBAC.h
+++ b/src/server/game/Accounts/RBAC.h
@@ -427,8 +427,8 @@ enum RBACPermissions
RBAC_PERM_COMMAND_REPAIRITEMS = 521,
RBAC_PERM_COMMAND_RESPAWN = 522,
RBAC_PERM_COMMAND_REVIVE = 523,
- RBAC_PERM_COMMAND_SAVE = 524,
- RBAC_PERM_COMMAND_SAVEALL = 525,
+ RBAC_PERM_COMMAND_SAVEALL = 524,
+ RBAC_PERM_COMMAND_SAVE = 525,
RBAC_PERM_COMMAND_SETSKILL = 526,
RBAC_PERM_COMMAND_SHOWAREA = 527,
RBAC_PERM_COMMAND_SUMMON = 528,
@@ -549,10 +549,10 @@ enum RBACPermissions
RBAC_PERM_COMMAND_RELOAD_EVENT_SCRIPTS = 643,
RBAC_PERM_COMMAND_RELOAD_FISHING_LOOT_TEMPLATE = 644,
RBAC_PERM_COMMAND_RELOAD_GAME_GRAVEYARD_ZONE = 645,
- RBAC_PERM_COMMAND_RELOAD_GAMEOBJECT_QUESTENDER = 646,
- RBAC_PERM_COMMAND_RELOAD_GAMEOBJECT_QUEST_LOOT_TEMPLATE = 647,
- RBAC_PERM_COMMAND_RELOAD_GAMEOBJECT_QUESTSTARTER = 648,
- RBAC_PERM_COMMAND_RELOAD_GAME_TELE = 649,
+ RBAC_PERM_COMMAND_RELOAD_GAME_TELE = 646,
+ RBAC_PERM_COMMAND_RELOAD_GAMEOBJECT_QUESTENDER = 647,
+ RBAC_PERM_COMMAND_RELOAD_GAMEOBJECT_QUEST_LOOT_TEMPLATE = 648,
+ RBAC_PERM_COMMAND_RELOAD_GAMEOBJECT_QUESTSTARTER = 649,
RBAC_PERM_COMMAND_RELOAD_GM_TICKETS = 650,
RBAC_PERM_COMMAND_RELOAD_GOSSIP_MENU = 651,
RBAC_PERM_COMMAND_RELOAD_GOSSIP_MENU_OPTION = 652,
@@ -585,34 +585,34 @@ enum RBACPermissions
RBAC_PERM_COMMAND_RELOAD_QUEST_TEMPLATE = 679,
RBAC_PERM_COMMAND_RELOAD_RBAC = 680,
RBAC_PERM_COMMAND_RELOAD_REFERENCE_LOOT_TEMPLATE = 681,
- RBAC_PERM_COMMAND_RELOAD_REPUTATION_REWARD_RATE = 682,
- RBAC_PERM_COMMAND_RELOAD_RESERVED_NAME = 683,
- RBAC_PERM_COMMAND_RELOAD_SKILL_DISCOVERY_TEMPLATE = 684,
- RBAC_PERM_COMMAND_RELOAD_SKILL_EXTRA_ITEM_TEMPLATE = 685,
- RBAC_PERM_COMMAND_RELOAD_SKILL_FISHING_BASE_LEVEL = 686,
- RBAC_PERM_COMMAND_RELOAD_SKINNING_LOOT_TEMPLATE = 687,
- RBAC_PERM_COMMAND_RELOAD_SMART_SCRIPTS = 688,
- RBAC_PERM_COMMAND_RELOAD_SPELL_AREA = 689,
- RBAC_PERM_COMMAND_RELOAD_SPELL_BONUS_DATA = 690,
- RBAC_PERM_COMMAND_RELOAD_SPELL_GROUP = 691,
- RBAC_PERM_COMMAND_RELOAD_SPELL_GROUP_STACK_RULES = 692,
- RBAC_PERM_COMMAND_RELOAD_SPELL_LEARN_SPELL = 693,
- RBAC_PERM_COMMAND_RELOAD_SPELL_LINKED_SPELL = 694,
+ RBAC_PERM_COMMAND_RELOAD_RESERVED_NAME = 682,
+ RBAC_PERM_COMMAND_RELOAD_REPUTATION_REWARD_RATE = 683,
+ RBAC_PERM_COMMAND_RELOAD_SPILLOVER_TEMPLATE = 684,
+ RBAC_PERM_COMMAND_RELOAD_SKILL_DISCOVERY_TEMPLATE = 685,
+ RBAC_PERM_COMMAND_RELOAD_SKILL_EXTRA_ITEM_TEMPLATE = 686,
+ RBAC_PERM_COMMAND_RELOAD_SKILL_FISHING_BASE_LEVEL = 687,
+ RBAC_PERM_COMMAND_RELOAD_SKINNING_LOOT_TEMPLATE = 688,
+ RBAC_PERM_COMMAND_RELOAD_SMART_SCRIPTS = 689,
+ RBAC_PERM_COMMAND_RELOAD_SPELL_REQUIRED = 690,
+ RBAC_PERM_COMMAND_RELOAD_SPELL_AREA = 691,
+ RBAC_PERM_COMMAND_RELOAD_SPELL_BONUS_DATA = 692,
+ RBAC_PERM_COMMAND_RELOAD_SPELL_GROUP = 693,
+ RBAC_PERM_COMMAND_RELOAD_SPELL_LEARN_SPELL = 694,
RBAC_PERM_COMMAND_RELOAD_SPELL_LOOT_TEMPLATE = 695,
- RBAC_PERM_COMMAND_RELOAD_SPELL_PET_AURAS = 696,
- RBAC_PERM_COMMAND_RELOAD_SPELL_PROC = 697,
+ RBAC_PERM_COMMAND_RELOAD_SPELL_LINKED_SPELL = 696,
+ RBAC_PERM_COMMAND_RELOAD_SPELL_PET_AURAS = 697,
RBAC_PERM_COMMAND_RELOAD_SPELL_PROC_EVENT = 698,
- RBAC_PERM_COMMAND_RELOAD_SPELL_REQUIRED = 699,
+ RBAC_PERM_COMMAND_RELOAD_SPELL_PROC = 699,
RBAC_PERM_COMMAND_RELOAD_SPELL_SCRIPTS = 700,
RBAC_PERM_COMMAND_RELOAD_SPELL_TARGET_POSITION = 701,
RBAC_PERM_COMMAND_RELOAD_SPELL_THREATS = 702,
- RBAC_PERM_COMMAND_RELOAD_SPILLOVER_TEMPLATE = 703,
+ RBAC_PERM_COMMAND_RELOAD_SPELL_GROUP_STACK_RULES = 703,
RBAC_PERM_COMMAND_RELOAD_TRINITY_STRING = 704,
- RBAC_PERM_COMMAND_RELOAD_VEHICLE_ACCESORY = 705,
- RBAC_PERM_COMMAND_RELOAD_VEHICLE_TEMPLATE_ACCESSORY = 706,
- RBAC_PERM_COMMAND_RELOAD_WARDEN_ACTION = 707,
- RBAC_PERM_COMMAND_RELOAD_WAYPOINT_DATA = 708,
- RBAC_PERM_COMMAND_RELOAD_WAYPOINT_SCRIPTS = 709,
+ RBAC_PERM_COMMAND_RELOAD_WARDEN_ACTION = 705,
+ RBAC_PERM_COMMAND_RELOAD_WAYPOINT_SCRIPTS = 706,
+ RBAC_PERM_COMMAND_RELOAD_WAYPOINT_DATA = 707,
+ RBAC_PERM_COMMAND_RELOAD_VEHICLE_ACCESORY = 708,
+ RBAC_PERM_COMMAND_RELOAD_VEHICLE_TEMPLATE_ACCESSORY = 709,
RBAC_PERM_COMMAND_RESET = 710,
RBAC_PERM_COMMAND_RESET_ACHIEVEMENTS = 711,
RBAC_PERM_COMMAND_RESET_HONOR = 712,
diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp
index e38b9f352e9..547cd9a8502 100644
--- a/src/server/game/Achievements/AchievementMgr.cpp
+++ b/src/server/game/Achievements/AchievementMgr.cpp
@@ -1279,7 +1279,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
// check item level and quality via achievement_criteria_data
AchievementCriteriaDataSet const* data = sAchievementMgr->GetCriteriaDataSet(achievementCriteria);
- if (!data || !data->Meets(GetPlayer(), 0, miscValue1))
+ if (!data || !data->Meets(GetPlayer(), nullptr, miscValue1))
continue;
SetCriteriaProgress(achievementCriteria, 1);
@@ -1301,7 +1301,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
// check item level via achievement_criteria_data
AchievementCriteriaDataSet const* data = sAchievementMgr->GetCriteriaDataSet(achievementCriteria);
- if (!data || !data->Meets(GetPlayer(), 0, pProto->ItemLevel))
+ if (!data || !data->Meets(GetPlayer(), nullptr, pProto->ItemLevel))
continue;
SetCriteriaProgress(achievementCriteria, 1, PROGRESS_ACCUMULATE);
@@ -2584,7 +2584,7 @@ void AchievementGlobalMgr::LoadRewardLocales()
AchievementRewardLocale& data = m_achievementRewardLocales[entry];
- for (int i = 1; i < TOTAL_LOCALES; ++i)
+ for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
{
LocaleConstant locale = (LocaleConstant) i;
ObjectMgr::AddLocaleString(fields[1 + 2 * (i - 1)].GetString(), locale, data.subject);
@@ -2593,7 +2593,7 @@ void AchievementGlobalMgr::LoadRewardLocales()
}
while (result->NextRow());
- TC_LOG_INFO("server.loading", ">> Loaded %lu achievement reward locale strings in %u ms", (unsigned long)m_achievementRewardLocales.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u achievement reward locale strings in %u ms", uint32(m_achievementRewardLocales.size()), GetMSTimeDiffToNow(oldMSTime));
}
AchievementEntry const* AchievementGlobalMgr::GetAchievement(uint32 achievementId) const
diff --git a/src/server/game/Battlefield/Battlefield.h b/src/server/game/Battlefield/Battlefield.h
index 15498d1f045..c6bfee40cd2 100644
--- a/src/server/game/Battlefield/Battlefield.h
+++ b/src/server/game/Battlefield/Battlefield.h
@@ -245,12 +245,12 @@ class Battlefield : public ZoneScript
void HandlePlayerLeaveZone(Player* player, uint32 zone);
// All-purpose data storage 64 bit
- virtual uint64 GetData64(uint32 dataId) const { return m_Data64[dataId]; }
- virtual void SetData64(uint32 dataId, uint64 value) { m_Data64[dataId] = value; }
+ virtual uint64 GetData64(uint32 dataId) const override { return m_Data64[dataId]; }
+ virtual void SetData64(uint32 dataId, uint64 value) override { m_Data64[dataId] = value; }
// All-purpose data storage 32 bit
- virtual uint32 GetData(uint32 dataId) const { return m_Data32[dataId]; }
- virtual void SetData(uint32 dataId, uint32 value) { m_Data32[dataId] = value; }
+ virtual uint32 GetData(uint32 dataId) const override { return m_Data32[dataId]; }
+ virtual void SetData(uint32 dataId, uint32 value) override { m_Data32[dataId] = value; }
virtual void UpdateData(uint32 index, int32 pad) { m_Data32[index] += pad; }
// Battlefield - generic methods
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h
index 0ba9e816b2e..341ccdeb44c 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.h
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h
@@ -255,7 +255,7 @@ class WintergraspCapturePoint : public BfCapturePoint
void LinkToWorkshop(WGWorkshop* workshop) { m_Workshop = workshop; }
- void ChangeTeam(TeamId oldteam);
+ void ChangeTeam(TeamId oldteam) override;
TeamId GetTeam() const { return m_team; }
protected:
@@ -276,7 +276,7 @@ class BattlefieldWG : public Battlefield
* - Rebuild tower and wall
* - Invite player to war
*/
- void OnBattleStart();
+ void OnBattleStart() override;
/**
* \brief Called when battle end
@@ -287,13 +287,13 @@ class BattlefieldWG : public Battlefield
* - Remove vehicle
* \param endByTimer : true if battle ended when timer is at 00:00, false if battle ended by clicking on relic
*/
- void OnBattleEnd(bool endByTimer);
+ void OnBattleEnd(bool endByTimer) override;
/**
* \brief Called when grouping starts (15 minutes before battlestart)
* - Invite all player in zone to join queue
*/
- void OnStartGrouping();
+ void OnStartGrouping() override;
/**
* \brief Called when player accept invite to join battle
@@ -303,20 +303,20 @@ class BattlefieldWG : public Battlefield
* - Update tenacity
* \param player: Player who accepted invite
*/
- void OnPlayerJoinWar(Player* player);
+ void OnPlayerJoinWar(Player* player) override;
/**
* \brief Called when player left the battle
* - Update player aura
* \param player : Player who left the battle
*/
- void OnPlayerLeaveWar(Player* player);
+ void OnPlayerLeaveWar(Player* player) override;
/**
* \brief Called when player left the WG zone
* \param player : Player who left the zone
*/
- void OnPlayerLeaveZone(Player* player);
+ void OnPlayerLeaveZone(Player* player) override;
/**
* \brief Called when player enters in WG zone
@@ -324,7 +324,7 @@ class BattlefieldWG : public Battlefield
* - Update worldstate
* \param player : Player who enters the zone
*/
- void OnPlayerEnterZone(Player* player);
+ void OnPlayerEnterZone(Player* player) override;
/**
* \brief Called for update battlefield data
@@ -332,24 +332,24 @@ class BattlefieldWG : public Battlefield
* - Update imunity aura from graveyard
* \param diff : time elapsed since the last call (in ms)
*/
- bool Update(uint32 diff);
+ bool Update(uint32 diff) override;
/**
* \brief Called when a creature is created
* - Update vehicle count
*/
- void OnCreatureCreate(Creature* creature);
+ void OnCreatureCreate(Creature* creature) override;
/**
* \brief Called when a creature is removed
* - Update vehicle count
*/
- void OnCreatureRemove(Creature* creature);
+ void OnCreatureRemove(Creature* creature) override;
/**
* \brief Called when a gameobject is created
*/
- void OnGameObjectCreate(GameObject* go);
+ void OnGameObjectCreate(GameObject* go) override;
/**
* \brief Called when a wall/tower is broken
@@ -370,14 +370,14 @@ class BattlefieldWG : public Battlefield
*/
void UpdatedDestroyedTowerCount(TeamId team);
- void DoCompleteOrIncrementAchievement(uint32 achievement, Player* player, uint8 incrementNumber = 1);
+ void DoCompleteOrIncrementAchievement(uint32 achievement, Player* player, uint8 incrementNumber = 1) override;
void RemoveAurasFromPlayer(Player* player);
/**
* \brief Called when battlefield is setup, at server start
*/
- bool SetupBattlefield();
+ bool SetupBattlefield() override;
/// Return pointer to relic object
GameObject* GetRelic() { return GetGameObject(m_titansRelicGUID); }
@@ -395,22 +395,22 @@ class BattlefieldWG : public Battlefield
void UpdateCounterVehicle(bool init);
void SendInitWorldStatesTo(Player* player);
- void SendInitWorldStatesToAll();
- void FillInitialWorldStates(WorldPacket& data);
+ void SendInitWorldStatesToAll() override;
+ void FillInitialWorldStates(WorldPacket& data) override;
- void HandleKill(Player* killer, Unit* victim);
- void OnUnitDeath(Unit* unit);
+ void HandleKill(Player* killer, Unit* victim) override;
+ void OnUnitDeath(Unit* unit) override;
void PromotePlayer(Player* killer);
void UpdateTenacity();
- void ProcessEvent(WorldObject* obj, uint32 eventId);
+ void ProcessEvent(WorldObject* obj, uint32 eventId) override;
bool FindAndRemoveVehicleFromList(Unit* vehicle);
// returns the graveyardId in the specified area.
uint8 GetSpiritGraveyardId(uint32 areaId) const;
- uint32 GetData(uint32 data) const;
+ uint32 GetData(uint32 data) const override;
protected:
bool m_isRelicInteractible;
diff --git a/src/server/game/Battlegrounds/ArenaScore.h b/src/server/game/Battlegrounds/ArenaScore.h
index 638275b1833..bd0ea6b02e9 100644
--- a/src/server/game/Battlegrounds/ArenaScore.h
+++ b/src/server/game/Battlegrounds/ArenaScore.h
@@ -28,7 +28,7 @@ struct ArenaScore : public BattlegroundScore
protected:
ArenaScore(uint64 playerGuid, uint32 team) : BattlegroundScore(playerGuid), TeamId(team == ALLIANCE ? BG_TEAM_ALLIANCE : BG_TEAM_HORDE) { }
- void AppendToPacket(WorldPacket& data) final
+ void AppendToPacket(WorldPacket& data) final override
{
data << uint64(PlayerGuid);
@@ -40,7 +40,7 @@ struct ArenaScore : public BattlegroundScore
BuildObjectivesBlock(data);
}
- void BuildObjectivesBlock(WorldPacket& data) final
+ void BuildObjectivesBlock(WorldPacket& data) final override
{
data << uint32(0); // Objectives Count
}
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 86236cd0f2b..3a59ffa8cf9 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -844,12 +844,14 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
Player* player = ObjectAccessor::FindPlayer(guid);
- // should remove spirit of redemption
if (player)
{
+ // should remove spirit of redemption
if (player->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
player->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
+ player->RemoveAurasByType(SPELL_AURA_MOUNTED);
+
if (!player->IsAlive()) // resurrect on exit
{
player->ResurrectPlayer(1.0f);
diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.h b/src/server/game/Battlegrounds/BattlegroundQueue.h
index af283cb825f..f95e8bafd06 100644
--- a/src/server/game/Battlegrounds/BattlegroundQueue.h
+++ b/src/server/game/Battlegrounds/BattlegroundQueue.h
@@ -143,8 +143,8 @@ class BGQueueInviteEvent : public BasicEvent
{ }
virtual ~BGQueueInviteEvent() { }
- virtual bool Execute(uint64 e_time, uint32 p_time);
- virtual void Abort(uint64 e_time);
+ virtual bool Execute(uint64 e_time, uint32 p_time) override;
+ virtual void Abort(uint64 e_time) override;
private:
uint64 m_PlayerGuid;
uint32 m_BgInstanceGUID;
@@ -167,8 +167,8 @@ class BGQueueRemoveEvent : public BasicEvent
virtual ~BGQueueRemoveEvent() { }
- virtual bool Execute(uint64 e_time, uint32 p_time);
- virtual void Abort(uint64 e_time);
+ virtual bool Execute(uint64 e_time, uint32 p_time) override;
+ virtual void Abort(uint64 e_time) override;
private:
uint64 m_PlayerGuid;
uint32 m_BgInstanceGUID;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
index a6b4be10fdf..7655880117f 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
@@ -260,7 +260,7 @@ struct BattlegroundABScore final : public BattlegroundScore
}
}
- void BuildObjectivesBlock(WorldPacket& data) final
+ void BuildObjectivesBlock(WorldPacket& data) final override
{
data << uint32(2);
data << uint32(BasesAssaulted);
@@ -277,31 +277,31 @@ class BattlegroundAB : public Battleground
BattlegroundAB();
~BattlegroundAB();
- void AddPlayer(Player* player);
- void StartingEventCloseDoors();
- void StartingEventOpenDoors();
- void RemovePlayer(Player* player, uint64 guid, uint32 team);
- void HandleAreaTrigger(Player* Source, uint32 Trigger);
- bool SetupBattleground();
- void Reset();
- void EndBattleground(uint32 winner);
- WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
+ void AddPlayer(Player* player) override;
+ void StartingEventCloseDoors() override;
+ void StartingEventOpenDoors() override;
+ void RemovePlayer(Player* player, uint64 guid, uint32 team) override;
+ void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
+ bool SetupBattleground() override;
+ void Reset() override;
+ void EndBattleground(uint32 winner) override;
+ WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
/* Scorekeeping */
bool UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor = true) override;
- void FillInitialWorldStates(WorldPacket& data);
+ void FillInitialWorldStates(WorldPacket& data) override;
/* Nodes occupying */
- void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj);
+ void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
/* achievement req. */
- bool IsAllNodesControlledByTeam(uint32 team) const;
- bool CheckAchievementCriteriaMeet(uint32 /*criteriaId*/, Player const* /*player*/, Unit const* /*target*/ = NULL, uint32 /*miscvalue1*/ = 0);
+ bool IsAllNodesControlledByTeam(uint32 team) const override;
+ bool CheckAchievementCriteriaMeet(uint32 /*criteriaId*/, Player const* /*player*/, Unit const* /*target*/ = nullptr, uint32 /*miscvalue1*/ = 0) override;
- uint32 GetPrematureWinner();
+ uint32 GetPrematureWinner() override;
private:
- void PostUpdateImpl(uint32 diff);
+ void PostUpdateImpl(uint32 diff) override;
/* Gameobject spawning/despawning */
void _CreateBanner(uint8 node, uint8 type, uint8 teamIndex, bool delay);
void _DelBanner(uint8 node, uint8 type, uint8 teamIndex);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
index feb3c016e55..882d729c1e8 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
@@ -1558,7 +1558,7 @@ struct BattlegroundAVScore final : public BattlegroundScore
}
}
- void BuildObjectivesBlock(WorldPacket& data) final
+ void BuildObjectivesBlock(WorldPacket& data) final override
{
data << uint32(5); // Objectives Count
data << uint32(GraveyardsAssaulted);
@@ -1582,37 +1582,37 @@ class BattlegroundAV : public Battleground
~BattlegroundAV();
/* inherited from BattlegroundClass */
- void AddPlayer(Player* player);
- void StartingEventCloseDoors();
- void StartingEventOpenDoors();
+ void AddPlayer(Player* player) override;
+ void StartingEventCloseDoors() override;
+ void StartingEventOpenDoors() override;
- void RemovePlayer(Player* player, uint64 guid, uint32 team);
- void HandleAreaTrigger(Player* player, uint32 trigger);
- bool SetupBattleground();
- void ResetBGSubclass();
+ void RemovePlayer(Player* player, uint64 guid, uint32 team) override;
+ void HandleAreaTrigger(Player* player, uint32 trigger) override;
+ bool SetupBattleground() override;
+ void ResetBGSubclass() override;
/*general stuff*/
void UpdateScore(uint16 team, int16 points);
bool UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor = true) override;
/*handlestuff*/ //these are functions which get called from extern
- void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj);
- void HandleKillPlayer(Player* player, Player* killer);
- void HandleKillUnit(Creature* unit, Player* killer);
- void HandleQuestComplete(uint32 questid, Player* player);
- bool CanActivateGO(int32 GOId, uint32 team) const;
+ void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
+ void HandleKillPlayer(Player* player, Player* killer) override;
+ void HandleKillUnit(Creature* unit, Player* killer) override;
+ void HandleQuestComplete(uint32 questid, Player* player) override;
+ bool CanActivateGO(int32 GOId, uint32 team) const override;
- void EndBattleground(uint32 winner);
+ void EndBattleground(uint32 winner) override;
- WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
+ WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
// Achievement: Av perfection and Everything counts
- bool CheckAchievementCriteriaMeet(uint32 criteriaId, Player const* source, Unit const* target = NULL, uint32 miscvalue1 = 0);
+ bool CheckAchievementCriteriaMeet(uint32 criteriaId, Player const* source, Unit const* target = nullptr, uint32 miscvalue1 = 0) override;
- uint32 GetPrematureWinner();
+ uint32 GetPrematureWinner() override;
private:
- void PostUpdateImpl(uint32 diff);
+ void PostUpdateImpl(uint32 diff) override;
/* Nodes occupying */
void EventPlayerAssaultsPoint(Player* player, uint32 object);
@@ -1636,7 +1636,7 @@ class BattlegroundAV : public Battleground
void ChangeMineOwner(uint8 mine, uint32 team, bool initial=false);
/*worldstates*/
- void FillInitialWorldStates(WorldPacket& data);
+ void FillInitialWorldStates(WorldPacket& data) override;
uint8 GetWorldStateType(uint8 state, uint16 team);
void SendMineWorldStates(uint32 mine);
void UpdateNodeWorldState(BG_AV_Nodes node);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.h b/src/server/game/Battlegrounds/Zones/BattlegroundBE.h
index f391edbf747..6aa3e56ca13 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundBE.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundBE.h
@@ -48,11 +48,11 @@ class BattlegroundBE : public Arena
BattlegroundBE();
/* inherited from BattlegroundClass */
- void StartingEventCloseDoors();
- void StartingEventOpenDoors();
+ void StartingEventCloseDoors() override;
+ void StartingEventOpenDoors() override;
- void HandleAreaTrigger(Player* Source, uint32 Trigger);
- bool SetupBattleground();
- void FillInitialWorldStates(WorldPacket &d);
+ void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
+ bool SetupBattleground() override;
+ void FillInitialWorldStates(WorldPacket &d) override;
};
#endif
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.h b/src/server/game/Battlegrounds/Zones/BattlegroundDS.h
index 4c763316d83..7b91996ed0e 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.h
@@ -94,15 +94,15 @@ class BattlegroundDS : public Arena
BattlegroundDS();
/* inherited from BattlegroundClass */
- void StartingEventCloseDoors();
- void StartingEventOpenDoors();
+ void StartingEventCloseDoors() override;
+ void StartingEventOpenDoors() override;
- void HandleAreaTrigger(Player* Source, uint32 Trigger);
- bool SetupBattleground();
- void FillInitialWorldStates(WorldPacket &d);
+ void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
+ bool SetupBattleground() override;
+ void FillInitialWorldStates(WorldPacket &d) override;
private:
- void PostUpdateImpl(uint32 diff);
+ void PostUpdateImpl(uint32 diff) override;
EventMap _events;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
index 056deb3498b..4a146a17917 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
@@ -343,7 +343,7 @@ struct BattlegroundEYScore final : public BattlegroundScore
}
}
- void BuildObjectivesBlock(WorldPacket& data) final
+ void BuildObjectivesBlock(WorldPacket& data) final override
{
data << uint32(1); // Objectives Count
data << uint32(FlagCaptures);
@@ -359,42 +359,42 @@ class BattlegroundEY : public Battleground
~BattlegroundEY();
/* inherited from BattlegroundClass */
- void AddPlayer(Player* player);
- void StartingEventCloseDoors();
- void StartingEventOpenDoors();
+ void AddPlayer(Player* player) override;
+ void StartingEventCloseDoors() override;
+ void StartingEventOpenDoors() override;
/* BG Flags */
- uint64 GetFlagPickerGUID(int32 /*team*/ = -1) const { return m_FlagKeeper; }
+ uint64 GetFlagPickerGUID(int32 /*team*/ = -1) const override { return m_FlagKeeper; }
void SetFlagPicker(uint64 guid) { m_FlagKeeper = guid; }
bool IsFlagPickedup() const { return m_FlagKeeper != 0; }
uint8 GetFlagState() const { return m_FlagState; }
void RespawnFlag(bool send_message);
void RespawnFlagAfterDrop();
- void RemovePlayer(Player* player, uint64 guid, uint32 team);
+ void RemovePlayer(Player* player, uint64 guid, uint32 team) override;
void HandleBuffUse(uint64 buff_guid);
- void HandleAreaTrigger(Player* Source, uint32 Trigger);
- void HandleKillPlayer(Player* player, Player* killer);
- WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
- bool SetupBattleground();
- void Reset();
+ void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
+ void HandleKillPlayer(Player* player, Player* killer) override;
+ WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
+ bool SetupBattleground() override;
+ void Reset() override;
void UpdateTeamScore(uint32 Team);
- void EndBattleground(uint32 winner);
+ void EndBattleground(uint32 winner) override;
bool UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor = true) override;
- void FillInitialWorldStates(WorldPacket& data);
- void SetDroppedFlagGUID(uint64 guid, int32 /*TeamID*/ = -1) { m_DroppedFlagGUID = guid;}
+ void FillInitialWorldStates(WorldPacket& data) override;
+ void SetDroppedFlagGUID(uint64 guid, int32 /*TeamID*/ = -1) override { m_DroppedFlagGUID = guid;}
uint64 GetDroppedFlagGUID() const { return m_DroppedFlagGUID;}
/* Battleground Events */
- void EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj);
- void EventPlayerDroppedFlag(Player* Source);
+ void EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj) override;
+ void EventPlayerDroppedFlag(Player* Source) override;
/* achievement req. */
- bool IsAllNodesControlledByTeam(uint32 team) const;
+ bool IsAllNodesControlledByTeam(uint32 team) const override;
- uint32 GetPrematureWinner();
+ uint32 GetPrematureWinner() override;
private:
- void PostUpdateImpl(uint32 diff);
+ void PostUpdateImpl(uint32 diff) override;
void EventPlayerCapturedFlag(Player* Source, uint32 BgObjectType);
void EventTeamCapturedPoint(Player* Source, uint32 Point);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
index 0b317cabef3..5a9b47ec9b5 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
@@ -871,7 +871,7 @@ struct BattlegroundICScore final : public BattlegroundScore
}
}
- void BuildObjectivesBlock(WorldPacket& data) final
+ void BuildObjectivesBlock(WorldPacket& data) final override
{
data << uint32(2); // Objectives Count
data << uint32(BasesAssaulted);
@@ -889,36 +889,36 @@ class BattlegroundIC : public Battleground
~BattlegroundIC();
/* inherited from BattlegroundClass */
- void AddPlayer(Player* player);
- void StartingEventCloseDoors();
- void StartingEventOpenDoors();
- void PostUpdateImpl(uint32 diff);
-
- void RemovePlayer(Player* player, uint64 guid, uint32 team);
- void HandleAreaTrigger(Player* player, uint32 trigger);
- bool SetupBattleground();
+ void AddPlayer(Player* player) override;
+ void StartingEventCloseDoors() override;
+ void StartingEventOpenDoors() override;
+ void PostUpdateImpl(uint32 diff) override;
+
+ void RemovePlayer(Player* player, uint64 guid, uint32 team) override;
+ void HandleAreaTrigger(Player* player, uint32 trigger) override;
+ bool SetupBattleground() override;
void SpawnLeader(uint32 teamid);
- void HandleKillUnit(Creature* unit, Player* killer);
- void HandleKillPlayer(Player* player, Player* killer);
- void EndBattleground(uint32 winner);
- void EventPlayerClickedOnFlag(Player* source, GameObject* /*target_obj*/);
+ void HandleKillUnit(Creature* unit, Player* killer) override;
+ void HandleKillPlayer(Player* player, Player* killer) override;
+ void EndBattleground(uint32 winner) override;
+ void EventPlayerClickedOnFlag(Player* source, GameObject* /*target_obj*/) override;
- void DestroyGate(Player* player, GameObject* go);
+ void DestroyGate(Player* player, GameObject* go) override;
- WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
+ WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
/* Scorekeeping */
- void FillInitialWorldStates(WorldPacket& data);
+ void FillInitialWorldStates(WorldPacket& data) override;
- void DoAction(uint32 action, uint64 var);
+ void DoAction(uint32 action, uint64 var) override;
- void HandlePlayerResurrect(Player* player);
+ void HandlePlayerResurrect(Player* player) override;
uint32 GetNodeState(uint8 nodeType) const { return (uint8)nodePoint[nodeType].nodeState; }
- bool IsAllNodesControlledByTeam(uint32 team) const;
+ bool IsAllNodesControlledByTeam(uint32 team) const override;
- bool IsSpellAllowed(uint32 spellId, Player const* player) const;
+ bool IsSpellAllowed(uint32 spellId, Player const* player) const override;
private:
uint32 closeFortressDoorsTimer;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.h b/src/server/game/Battlegrounds/Zones/BattlegroundNA.h
index 2fa93a07651..17df258a0b8 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundNA.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundNA.h
@@ -47,11 +47,11 @@ class BattlegroundNA : public Arena
BattlegroundNA();
/* inherited from BattlegroundClass */
- void StartingEventCloseDoors();
- void StartingEventOpenDoors();
+ void StartingEventCloseDoors() override;
+ void StartingEventOpenDoors() override;
- void HandleAreaTrigger(Player* Source, uint32 Trigger);
- bool SetupBattleground();
- void FillInitialWorldStates(WorldPacket &d);
+ void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
+ bool SetupBattleground() override;
+ void FillInitialWorldStates(WorldPacket &d) override;
};
#endif
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.h b/src/server/game/Battlegrounds/Zones/BattlegroundRL.h
index ad4fe18a3c7..e96129b05f0 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRL.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRL.h
@@ -43,11 +43,11 @@ class BattlegroundRL : public Arena
BattlegroundRL();
/* inherited from BattlegroundClass */
- void FillInitialWorldStates(WorldPacket &d);
- void StartingEventCloseDoors();
- void StartingEventOpenDoors();
+ void FillInitialWorldStates(WorldPacket &d) override;
+ void StartingEventCloseDoors() override;
+ void StartingEventOpenDoors() override;
- void HandleAreaTrigger(Player* Source, uint32 Trigger);
- bool SetupBattleground();
+ void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
+ bool SetupBattleground() override;
};
#endif
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.h b/src/server/game/Battlegrounds/Zones/BattlegroundRV.h
index d23f6757b83..eda4bf7fa00 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.h
@@ -96,14 +96,14 @@ class BattlegroundRV : public Arena
BattlegroundRV();
/* inherited from BattlegroundClass */
- void StartingEventOpenDoors();
- void FillInitialWorldStates(WorldPacket &d);
+ void StartingEventOpenDoors() override;
+ void FillInitialWorldStates(WorldPacket &d) override;
- void HandleAreaTrigger(Player* Source, uint32 Trigger);
- bool SetupBattleground();
+ void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
+ bool SetupBattleground() override;
private:
- void PostUpdateImpl(uint32 diff);
+ void PostUpdateImpl(uint32 diff) override;
void TogglePillarCollision();
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h
index a3947334417..627c23850d2 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h
@@ -531,7 +531,7 @@ struct BattlegroundSAScore final : public BattlegroundScore
}
}
- void BuildObjectivesBlock(WorldPacket& data) final
+ void BuildObjectivesBlock(WorldPacket& data) final override
{
data << uint32(2); // Objectives Count
data << uint32(DemolishersDestroyed);
@@ -554,27 +554,27 @@ class BattlegroundSA : public Battleground
* -Update timer
* -Round switch
*/
- void PostUpdateImpl(uint32 diff);
+ void PostUpdateImpl(uint32 diff) override;
/* inherited from BattlegroundClass */
/// Called when a player join battle
- void AddPlayer(Player* player);
+ void AddPlayer(Player* player) override;
/// Called when battle start
- void StartingEventCloseDoors();
- void StartingEventOpenDoors();
+ void StartingEventCloseDoors() override;
+ void StartingEventOpenDoors() override;
/// Called for ini battleground, after that the first player be entered
- bool SetupBattleground();
- void Reset();
+ bool SetupBattleground() override;
+ void Reset() override;
/// Called for generate packet contain worldstate data
- void FillInitialWorldStates(WorldPacket& data);
+ void FillInitialWorldStates(WorldPacket& data) override;
/// Called when a player kill a unit in bg
- void HandleKillUnit(Creature* creature, Player* killer);
+ void HandleKillUnit(Creature* creature, Player* killer) override;
/// Return the nearest graveyard where player can respawn
- WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
+ WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
/// Called when someone activates an event
void ProcessEvent(WorldObject* /*obj*/, uint32 /*eventId*/, WorldObject* /*invoker*/ = NULL) override;
/// Called when a player click on flag (graveyard flag)
- void EventPlayerClickedOnFlag(Player* source, GameObject* go);
+ void EventPlayerClickedOnFlag(Player* source, GameObject* go) override;
/// Called when a player clicked on relic
void TitanRelicActivated(Player* clicker);
@@ -588,11 +588,11 @@ class BattlegroundSA : public Battleground
}
/// Called on battleground ending
- void EndBattleground(uint32 winner);
+ void EndBattleground(uint32 winner) override;
/// Called when a player leave battleground
- void RemovePlayer(Player* player, uint64 guid, uint32 team);
- void HandleAreaTrigger(Player* Source, uint32 Trigger);
+ void RemovePlayer(Player* player, uint64 guid, uint32 team) override;
+ void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
/* Scorekeeping */
@@ -630,7 +630,7 @@ class BattlegroundSA : public Battleground
* -Update worldstate
* -Delete gameobject in front of door (lighting object, with different colours for each door)
*/
- void DestroyGate(Player* player, GameObject* go);
+ void DestroyGate(Player* player, GameObject* go) override;
/// Update timer worldstate
void SendTime();
/**
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
index 3d449580fb9..d29715c982b 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
@@ -170,7 +170,7 @@ struct BattlegroundWGScore final : public BattlegroundScore
}
}
- void BuildObjectivesBlock(WorldPacket& data) final
+ void BuildObjectivesBlock(WorldPacket& data) final override
{
data << uint32(2); // Objectives Count
data << uint32(FlagCaptures);
@@ -189,12 +189,12 @@ class BattlegroundWS : public Battleground
~BattlegroundWS();
/* inherited from BattlegroundClass */
- void AddPlayer(Player* player);
- void StartingEventCloseDoors();
- void StartingEventOpenDoors();
+ void AddPlayer(Player* player) override;
+ void StartingEventCloseDoors() override;
+ void StartingEventOpenDoors() override;
/* BG Flags */
- uint64 GetFlagPickerGUID(int32 team) const
+ uint64 GetFlagPickerGUID(int32 team) const override
{
if (team == TEAM_ALLIANCE || team == TEAM_HORDE)
return m_FlagKeepers[team];
@@ -209,40 +209,40 @@ class BattlegroundWS : public Battleground
uint8 GetFlagState(uint32 team) { return _flagState[GetTeamIndexByTeamId(team)]; }
/* Battleground Events */
- void EventPlayerDroppedFlag(Player* player);
- void EventPlayerClickedOnFlag(Player* player, GameObject* target_obj);
+ void EventPlayerDroppedFlag(Player* player) override;
+ void EventPlayerClickedOnFlag(Player* player, GameObject* target_obj) override;
void EventPlayerCapturedFlag(Player* player);
- void RemovePlayer(Player* player, uint64 guid, uint32 team);
- void HandleAreaTrigger(Player* player, uint32 trigger);
- void HandleKillPlayer(Player* player, Player* killer);
- bool SetupBattleground();
- void Reset();
- void EndBattleground(uint32 winner);
- WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
+ void RemovePlayer(Player* player, uint64 guid, uint32 team) override;
+ void HandleAreaTrigger(Player* player, uint32 trigger) override;
+ void HandleKillPlayer(Player* player, Player* killer) override;
+ bool SetupBattleground() override;
+ void Reset() override;
+ void EndBattleground(uint32 winner) override;
+ WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
void UpdateFlagState(uint32 team, uint32 value);
void SetLastFlagCapture(uint32 team) { _lastFlagCaptureTeam = team; }
void UpdateTeamScore(uint32 team);
bool UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor = true) override;
- void SetDroppedFlagGUID(uint64 guid, int32 team = -1)
+ void SetDroppedFlagGUID(uint64 guid, int32 team = -1) override
{
if (team == TEAM_ALLIANCE || team == TEAM_HORDE)
m_DroppedFlagGUID[team] = guid;
}
uint64 GetDroppedFlagGUID(uint32 TeamID) { return m_DroppedFlagGUID[GetTeamIndexByTeamId(TeamID)];}
- void FillInitialWorldStates(WorldPacket& data);
+ void FillInitialWorldStates(WorldPacket& data) override;
/* Scorekeeping */
void AddPoint(uint32 TeamID, uint32 Points = 1) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] += Points; }
void SetTeamPoint(uint32 TeamID, uint32 Points = 0) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] = Points; }
void RemovePoint(uint32 TeamID, uint32 Points = 1) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] -= Points; }
- uint32 GetPrematureWinner();
+ uint32 GetPrematureWinner() override;
/* Achievements*/
- bool CheckAchievementCriteriaMeet(uint32 criteriaId, Player const* source, Unit const* target = NULL, uint32 miscvalue1 = 0);
+ bool CheckAchievementCriteriaMeet(uint32 criteriaId, Player const* source, Unit const* target = nullptr, uint32 miscvalue1 = 0) override;
private:
uint64 m_FlagKeepers[2]; // 0 - alliance, 1 - horde
@@ -260,6 +260,6 @@ class BattlegroundWS : public Battleground
uint8 _flagDebuffState; // 0 - no debuffs, 1 - focused assault, 2 - brutal assault
uint8 _minutesElapsed;
- void PostUpdateImpl(uint32 diff);
+ void PostUpdateImpl(uint32 diff) override;
};
#endif
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp
index d77ee5b7f61..50f67d4f920 100644
--- a/src/server/game/Chat/Chat.cpp
+++ b/src/server/game/Chat/Chat.cpp
@@ -966,7 +966,7 @@ static char const* const spellKeys[] =
"Henchant", // enchanting recipe spell
"Htrade", // profession/skill spell
"Hglyph", // glyph
- 0
+ nullptr
};
uint32 ChatHandler::extractSpellIdFromLink(char* text)
@@ -1050,7 +1050,7 @@ static char const* const guidKeys[] =
"Hplayer",
"Hcreature",
"Hgameobject",
- 0
+ nullptr
};
uint64 ChatHandler::extractGuidFromLink(char* text)
diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h
index a56b79077d7..32820de0fc2 100644
--- a/src/server/game/Chat/Chat.h
+++ b/src/server/game/Chat/Chat.h
@@ -147,14 +147,14 @@ class CliHandler : public ChatHandler
explicit CliHandler(void* callbackArg, Print* zprint) : m_callbackArg(callbackArg), m_print(zprint) { }
// overwrite functions
- const char *GetTrinityString(int32 entry) const;
- bool isAvailable(ChatCommand const& cmd) const;
- bool HasPermission(uint32 /*permission*/) const { return true; }
- void SendSysMessage(const char *str);
- std::string GetNameLink() const;
- bool needReportToTarget(Player* chr) const;
- LocaleConstant GetSessionDbcLocale() const;
- int GetSessionDbLocaleIndex() const;
+ const char *GetTrinityString(int32 entry) const override;
+ bool isAvailable(ChatCommand const& cmd) const override;
+ bool HasPermission(uint32 /*permission*/) const override { return true; }
+ void SendSysMessage(const char *str) override;
+ std::string GetNameLink() const override;
+ bool needReportToTarget(Player* chr) const override;
+ LocaleConstant GetSessionDbcLocale() const override;
+ int GetSessionDbLocaleIndex() const override;
private:
void* m_callbackArg;
diff --git a/src/server/game/Chat/ChatLink.h b/src/server/game/Chat/ChatLink.h
index 4cfa9c34bf7..33fb3431a84 100644
--- a/src/server/game/Chat/ChatLink.h
+++ b/src/server/game/Chat/ChatLink.h
@@ -61,8 +61,8 @@ public:
{
memset(_data, 0, sizeof(_data));
}
- virtual bool Initialize(std::istringstream& iss);
- virtual bool ValidateName(char* buffer, const char* context);
+ virtual bool Initialize(std::istringstream& iss) override;
+ virtual bool ValidateName(char* buffer, const char* context) override;
protected:
std::string FormatName(uint8 index, ItemLocale const* locale, char* const* suffixStrings) const;
@@ -77,9 +77,9 @@ protected:
class QuestChatLink : public ChatLink
{
public:
- QuestChatLink() : ChatLink(), _quest(NULL), _questLevel(0) { }
- virtual bool Initialize(std::istringstream& iss);
- virtual bool ValidateName(char* buffer, const char* context);
+ QuestChatLink() : ChatLink(), _quest(nullptr), _questLevel(0) { }
+ virtual bool Initialize(std::istringstream& iss) override;
+ virtual bool ValidateName(char* buffer, const char* context) override;
protected:
Quest const* _quest;
@@ -90,9 +90,9 @@ protected:
class SpellChatLink : public ChatLink
{
public:
- SpellChatLink() : ChatLink(), _spell(NULL) { }
- virtual bool Initialize(std::istringstream& iss);
- virtual bool ValidateName(char* buffer, const char* context);
+ SpellChatLink() : ChatLink(), _spell(nullptr) { }
+ virtual bool Initialize(std::istringstream& iss) override;
+ virtual bool ValidateName(char* buffer, const char* context) override;
protected:
SpellInfo const* _spell;
@@ -106,8 +106,8 @@ public:
{
memset(_data, 0, sizeof(_data));
}
- virtual bool Initialize(std::istringstream& iss);
- virtual bool ValidateName(char* buffer, const char* context);
+ virtual bool Initialize(std::istringstream& iss) override;
+ virtual bool ValidateName(char* buffer, const char* context) override;
protected:
uint32 _guid;
@@ -120,7 +120,7 @@ class TradeChatLink : public SpellChatLink
{
public:
TradeChatLink() : SpellChatLink(), _minSkillLevel(0), _maxSkillLevel(0), _guid(0) { }
- virtual bool Initialize(std::istringstream& iss);
+ virtual bool Initialize(std::istringstream& iss) override;
private:
int32 _minSkillLevel;
int32 _maxSkillLevel;
@@ -133,7 +133,7 @@ class TalentChatLink : public SpellChatLink
{
public:
TalentChatLink() : SpellChatLink(), _talentId(0), _rankId(0) { }
- virtual bool Initialize(std::istringstream& iss);
+ virtual bool Initialize(std::istringstream& iss) override;
private:
uint32 _talentId;
@@ -145,7 +145,7 @@ class EnchantmentChatLink : public SpellChatLink
{
public:
EnchantmentChatLink() : SpellChatLink() { }
- virtual bool Initialize(std::istringstream& iss);
+ virtual bool Initialize(std::istringstream& iss) override;
};
// GlyphChatLink - link to glyph
@@ -153,7 +153,7 @@ class GlyphChatLink : public SpellChatLink
{
public:
GlyphChatLink() : SpellChatLink(), _slotId(0), _glyph(NULL) { }
- virtual bool Initialize(std::istringstream& iss);
+ virtual bool Initialize(std::istringstream& iss) override;
private:
uint32 _slotId;
GlyphPropertiesEntry const* _glyph;
diff --git a/src/server/game/Combat/ThreatManager.h b/src/server/game/Combat/ThreatManager.h
index dd5904ae2ec..f0741f81067 100644
--- a/src/server/game/Combat/ThreatManager.h
+++ b/src/server/game/Combat/ThreatManager.h
@@ -117,13 +117,13 @@ class HostileReference : public Reference<Unit, ThreatManager>
//=================================================
// Tell our refTo (target) object that we have a link
- void targetObjectBuildLink();
+ void targetObjectBuildLink() override;
// Tell our refTo (taget) object, that the link is cut
- void targetObjectDestroyLink();
+ void targetObjectDestroyLink() override;
// Tell our refFrom (source) object, that the link is cut (Target destroyed)
- void sourceObjectDestroyLink();
+ void sourceObjectDestroyLink() override;
private:
// Inform the source, that the status of that reference was changed
void fireStatusChanged(ThreatRefStatusChangeEvent& threatRefStatusChangeEvent);
diff --git a/src/server/game/DungeonFinding/LFGScripts.h b/src/server/game/DungeonFinding/LFGScripts.h
index 1ed37bd9d05..3f1dcbb218b 100644
--- a/src/server/game/DungeonFinding/LFGScripts.h
+++ b/src/server/game/DungeonFinding/LFGScripts.h
@@ -35,9 +35,9 @@ class LFGPlayerScript : public PlayerScript
LFGPlayerScript();
// Player Hooks
- void OnLogout(Player* player);
- void OnLogin(Player* player, bool loginFirst);
- void OnMapChanged(Player* player);
+ void OnLogout(Player* player) override;
+ void OnLogin(Player* player, bool loginFirst) override;
+ void OnMapChanged(Player* player) override;
};
class LFGGroupScript : public GroupScript
@@ -46,11 +46,11 @@ class LFGGroupScript : public GroupScript
LFGGroupScript();
// Group Hooks
- void OnAddMember(Group* group, uint64 guid);
- void OnRemoveMember(Group* group, uint64 guid, RemoveMethod method, uint64 kicker, char const* reason);
- void OnDisband(Group* group);
- void OnChangeLeader(Group* group, uint64 newLeaderGuid, uint64 oldLeaderGuid);
- void OnInviteMember(Group* group, uint64 guid);
+ void OnAddMember(Group* group, uint64 guid) override;
+ void OnRemoveMember(Group* group, uint64 guid, RemoveMethod method, uint64 kicker, char const* reason) override;
+ void OnDisband(Group* group) override;
+ void OnChangeLeader(Group* group, uint64 newLeaderGuid, uint64 oldLeaderGuid) override;
+ void OnInviteMember(Group* group, uint64 guid) override;
};
} // namespace lfg
diff --git a/src/server/game/Entities/Corpse/Corpse.h b/src/server/game/Entities/Corpse/Corpse.h
index def84dd93a9..5039c85bcb9 100644
--- a/src/server/game/Entities/Corpse/Corpse.h
+++ b/src/server/game/Entities/Corpse/Corpse.h
@@ -52,8 +52,8 @@ class Corpse : public WorldObject, public GridObject<Corpse>
explicit Corpse(CorpseType type = CORPSE_BONES);
~Corpse();
- void AddToWorld();
- void RemoveFromWorld();
+ void AddToWorld() override;
+ void RemoveFromWorld() override;
bool Create(uint32 guidlow, Map* map);
bool Create(uint32 guidlow, Player* owner);
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index c9a2015dbb8..c04f2845110 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -384,9 +384,9 @@ bool Creature::UpdateEntry(uint32 entry, CreatureData const* data /*= nullptr*/)
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
- SetAttackTime(BASE_ATTACK, cInfo->baseattacktime);
- SetAttackTime(OFF_ATTACK, cInfo->baseattacktime);
- SetAttackTime(RANGED_ATTACK, cInfo->rangeattacktime);
+ SetAttackTime(BASE_ATTACK, cInfo->BaseAttackTime);
+ SetAttackTime(OFF_ATTACK, cInfo->BaseAttackTime);
+ SetAttackTime(RANGED_ATTACK, cInfo->RangeAttackTime);
SelectLevel();
@@ -815,7 +815,7 @@ bool Creature::Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 entry,
void Creature::InitializeReactState()
{
- if (IsTotem() || IsTrigger() || GetCreatureType() == CREATURE_TYPE_CRITTER || IsSpiritService())
+ if (IsTotem() || IsTrigger() || IsCritter() || IsSpiritService())
SetReactState(REACT_PASSIVE);
/*
else if (IsCivilian())
@@ -2277,7 +2277,7 @@ void Creature::AllLootRemovedFromCorpse()
if (loot.loot_type == LOOT_SKINNING)
m_corpseRemoveTime = now;
else
- m_corpseRemoveTime = now + m_corpseDelay * decayRate;
+ m_corpseRemoveTime = now + uint32(m_corpseDelay * decayRate);
m_respawnTime = m_corpseRemoveTime + m_respawnDelay;
}
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index 1154bc17d1f..9b332bb5de4 100644
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -64,12 +64,12 @@ enum CreatureFlagsExtra
CREATURE_FLAG_EXTRA_NO_SKILLGAIN | CREATURE_FLAG_EXTRA_TAUNT_DIMINISH | CREATURE_FLAG_EXTRA_ALL_DIMINISH | \
CREATURE_FLAG_EXTRA_GUARD)
-#define MAX_KILL_CREDIT 2
#define CREATURE_REGEN_INTERVAL 2 * IN_MILLISECONDS
+#define MAX_KILL_CREDIT 2
+#define MAX_CREATURE_MODELS 4
#define MAX_CREATURE_QUEST_ITEMS 6
-
-#define MAX_EQUIPMENT_ITEMS 3
+#define CREATURE_MAX_SPELLS 8
// from `creature_template` table
struct CreatureTemplate
@@ -94,13 +94,11 @@ struct CreatureTemplate
float speed_run;
float scale;
uint32 rank;
- float mindmg;
- float maxdmg;
uint32 dmgschool;
- uint32 attackpower;
- float dmg_multiplier;
- uint32 baseattacktime;
- uint32 rangeattacktime;
+ uint32 BaseAttackTime;
+ uint32 RangeAttackTime;
+ float BaseVariance;
+ float RangeVariance;
uint32 unit_class; // enum Classes. Note only 4 classes are known for creatures.
uint32 unit_flags; // enum UnitFlags mask values
uint32 unit_flags2; // enum UnitFlags2 mask values
@@ -110,9 +108,6 @@ struct CreatureTemplate
uint32 trainer_spell;
uint32 trainer_class;
uint32 trainer_race;
- float minrangedmg;
- float maxrangedmg;
- uint32 rangedattackpower;
uint32 type; // enum CreatureType values
uint32 type_flags; // enum CreatureTypeFlags mask values
uint32 lootid;
@@ -131,6 +126,8 @@ struct CreatureTemplate
float ModHealth;
float ModMana;
float ModArmor;
+ float ModDamage;
+ float ModExperience;
bool RacialLeader;
uint32 questItems[MAX_CREATURE_QUEST_ITEMS];
uint32 movementId;
@@ -237,6 +234,8 @@ struct PointOfInterestLocale
StringVector IconName;
};
+#define MAX_EQUIPMENT_ITEMS 3
+
struct EquipmentInfo
{
uint32 ItemEntry[MAX_EQUIPMENT_ITEMS];
@@ -428,11 +427,11 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
explicit Creature(bool isWorldObject = false);
virtual ~Creature();
- void AddToWorld();
- void RemoveFromWorld();
+ void AddToWorld() override;
+ void RemoveFromWorld() override;
- void SetObjectScale(float scale);
- void SetDisplayId(uint32 modelId);
+ void SetObjectScale(float scale) override;
+ void SetDisplayId(uint32 modelId) override;
void DisappearAndDie();
@@ -443,8 +442,8 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
uint32 GetDBTableGUIDLow() const { return m_DBTableGuid; }
- void Update(uint32 time); // overwrited Unit::Update
- void GetRespawnPosition(float &x, float &y, float &z, float* ori = NULL, float* dist =NULL) const;
+ void Update(uint32 time) override; // overwrited Unit::Update
+ void GetRespawnPosition(float &x, float &y, float &z, float* ori = nullptr, float* dist =nullptr) const;
void SetCorpseDelay(uint32 delay) { m_corpseDelay = delay; }
uint32 GetCorpseDelay() const { return m_corpseDelay; }
@@ -454,7 +453,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
bool IsGuard() const { return (GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_GUARD) != 0; }
bool CanWalk() const { return (GetCreatureTemplate()->InhabitType & INHABIT_GROUND) != 0; }
bool CanSwim() const { return (GetCreatureTemplate()->InhabitType & INHABIT_WATER) != 0 || IsPet(); }
- bool CanFly() const { return (GetCreatureTemplate()->InhabitType & INHABIT_AIR) != 0; }
+ bool CanFly() const override { return (GetCreatureTemplate()->InhabitType & INHABIT_AIR) != 0; }
void SetReactState(ReactStates st) { m_reactState = st; }
ReactStates GetReactState() { return m_reactState; }
@@ -465,14 +464,14 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
bool isCanInteractWithBattleMaster(Player* player, bool msg) const;
bool isCanTrainingAndResetTalentsOf(Player* player) const;
bool CanCreatureAttack(Unit const* victim, bool force = true) const;
- bool IsImmunedToSpell(SpellInfo const* spellInfo) const; // override Unit::IsImmunedToSpell
- bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const; // override Unit::IsImmunedToSpellEffect
+ bool IsImmunedToSpell(SpellInfo const* spellInfo) const override; // override Unit::IsImmunedToSpell
+ bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const override; // override Unit::IsImmunedToSpellEffect
bool isElite() const;
bool isWorldBoss() const;
bool IsDungeonBoss() const;
- uint8 getLevelForTarget(WorldObject const* target) const; // overwrite Unit::getLevelForTarget for boss level support
+ uint8 getLevelForTarget(WorldObject const* target) const override; // overwrite Unit::getLevelForTarget for boss level support
bool IsInEvadeMode() const { return HasUnitState(UNIT_STATE_EVADE); }
@@ -481,17 +480,17 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
CreatureAI* AI() const { return (CreatureAI*)i_AI; }
- bool SetWalk(bool enable);
- bool SetDisableGravity(bool disable, bool packetOnly = false);
- bool SetSwim(bool enable);
- bool SetCanFly(bool enable);
- bool SetWaterWalking(bool enable, bool packetOnly = false);
- bool SetFeatherFall(bool enable, bool packetOnly = false);
- bool SetHover(bool enable, bool packetOnly = false);
+ bool SetWalk(bool enable) override;
+ bool SetDisableGravity(bool disable, bool packetOnly = false) override;
+ bool SetSwim(bool enable) override;
+ bool SetCanFly(bool enable) override;
+ bool SetWaterWalking(bool enable, bool packetOnly = false) override;
+ bool SetFeatherFall(bool enable, bool packetOnly = false) override;
+ bool SetHover(bool enable, bool packetOnly = false) override;
- uint32 GetShieldBlockValue() const;
+ uint32 GetShieldBlockValue() const override;
- SpellSchoolMask GetMeleeDamageSchoolMask() const { return m_meleeDamageSchoolMask; }
+ SpellSchoolMask GetMeleeDamageSchoolMask() const override { return m_meleeDamageSchoolMask; }
void SetMeleeDamageSchool(SpellSchools school) { m_meleeDamageSchoolMask = SpellSchoolMask(1 << school); }
void _AddCreatureSpellCooldown(uint32 spell_id, time_t end_time);
@@ -500,21 +499,21 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
bool HasSpellCooldown(uint32 spell_id) const;
bool HasCategoryCooldown(uint32 spell_id) const;
uint32 GetCreatureSpellCooldownDelay(uint32 spellId) const;
- virtual void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs);
+ virtual void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) override;
- bool HasSpell(uint32 spellID) const;
+ bool HasSpell(uint32 spellID) const override;
bool UpdateEntry(uint32 entry, CreatureData const* data = nullptr);
void UpdateMovementFlags();
- bool UpdateStats(Stats stat);
- bool UpdateAllStats();
- void UpdateResistances(uint32 school);
- void UpdateArmor();
- void UpdateMaxHealth();
- void UpdateMaxPower(Powers power);
- void UpdateAttackPowerAndDamage(bool ranged = false);
+ bool UpdateStats(Stats stat) override;
+ bool UpdateAllStats() override;
+ void UpdateResistances(uint32 school) override;
+ void UpdateArmor() override;
+ void UpdateMaxHealth() override;
+ void UpdateMaxPower(Powers power) override;
+ void UpdateAttackPowerAndDamage(bool ranged = false) override;
void CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, float& minDamage, float& maxDamage) override;
void SetCanDualWield(bool value) override;
@@ -539,9 +538,9 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
uint32 GetScriptId() const;
// override WorldObject function for proper name localization
- std::string const& GetNameForLocaleIdx(LocaleConstant locale_idx) const;
+ std::string const& GetNameForLocaleIdx(LocaleConstant locale_idx) const override;
- void setDeathState(DeathState s); // override virtual Unit::setDeathState
+ void setDeathState(DeathState s) override; // override virtual Unit::setDeathState
bool LoadFromDB(uint32 guid, Map* map) { return LoadCreatureFromDB(guid, map, false); }
bool LoadCreatureFromDB(uint32 guid, Map* map, bool addToMap = true);
@@ -609,7 +608,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
time_t GetRespawnTimeEx() const;
void SetRespawnTime(uint32 respawn) { m_respawnTime = respawn ? time(NULL) + respawn : 0; }
void Respawn(bool force = false);
- void SaveRespawnTime();
+ void SaveRespawnTime() override;
uint32 GetRespawnDelay() const { return m_respawnDelay; }
void SetRespawnDelay(uint32 delay) { m_respawnDelay = delay; }
@@ -624,8 +623,8 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
void SetInCombatWithZone();
- bool hasQuest(uint32 quest_id) const;
- bool hasInvolvedQuest(uint32 quest_id) const;
+ bool hasQuest(uint32 quest_id) const override;
+ bool hasInvolvedQuest(uint32 quest_id) const override;
bool isRegeneratingHealth() { return m_regenHealth; }
void setRegeneratingHealth(bool regenHealth) { m_regenHealth = regenHealth; }
@@ -676,7 +675,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
bool m_isTempWorldObject; //true when possessed
// Handling caster facing during spellcast
- void SetTarget(uint64 guid);
+ void SetTarget(uint64 guid) override;
void FocusTarget(Spell const* focusSpell, WorldObject const* target);
void ReleaseFocus(Spell const* focusSpell);
@@ -728,8 +727,8 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
uint16 m_LootMode; // Bitmask (default: LOOT_MODE_DEFAULT) that determines what loot will be lootable
- bool IsInvisibleDueToDespawn() const;
- bool CanAlwaysSee(WorldObject const* obj) const;
+ bool IsInvisibleDueToDespawn() const override;
+ bool CanAlwaysSee(WorldObject const* obj) const override;
private:
void ForcedDespawn(uint32 timeMSToDespawn = 0);
@@ -750,7 +749,7 @@ class AssistDelayEvent : public BasicEvent
public:
AssistDelayEvent(uint64 victim, Unit& owner) : BasicEvent(), m_victim(victim), m_owner(owner) { }
- bool Execute(uint64 e_time, uint32 p_time);
+ bool Execute(uint64 e_time, uint32 p_time) override;
void AddAssistant(uint64 guid) { m_assistants.push_back(guid); }
private:
AssistDelayEvent();
@@ -764,7 +763,7 @@ class ForcedDespawnDelayEvent : public BasicEvent
{
public:
ForcedDespawnDelayEvent(Creature& owner) : BasicEvent(), m_owner(owner) { }
- bool Execute(uint64 e_time, uint32 p_time);
+ bool Execute(uint64 e_time, uint32 p_time) override;
private:
Creature& m_owner;
diff --git a/src/server/game/Entities/Creature/TemporarySummon.h b/src/server/game/Entities/Creature/TemporarySummon.h
index 1cee6361172..58cc6eb7d0b 100644
--- a/src/server/game/Entities/Creature/TemporarySummon.h
+++ b/src/server/game/Entities/Creature/TemporarySummon.h
@@ -42,13 +42,13 @@ class TempSummon : public Creature
public:
explicit TempSummon(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject);
virtual ~TempSummon() { }
- void Update(uint32 time);
+ void Update(uint32 time) override;
virtual void InitStats(uint32 lifetime);
virtual void InitSummon();
virtual void UnSummon(uint32 msTime = 0);
- void RemoveFromWorld();
+ void RemoveFromWorld() override;
void SetTempSummonType(TempSummonType type);
- void SaveToDB(uint32 /*mapid*/, uint8 /*spawnMask*/, uint32 /*phaseMask*/) { }
+ void SaveToDB(uint32 /*mapid*/, uint8 /*spawnMask*/, uint32 /*phaseMask*/) override { }
Unit* GetSummoner() const;
Creature* GetSummonerCreatureBase() const;
uint64 GetSummonerGUID() const { return m_summonerGUID; }
@@ -67,10 +67,10 @@ class Minion : public TempSummon
{
public:
Minion(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject);
- void InitStats(uint32 duration);
- void RemoveFromWorld();
+ void InitStats(uint32 duration) override;
+ void RemoveFromWorld() override;
Unit* GetOwner() const { return m_owner; }
- float GetFollowAngle() const { return m_followAngle; }
+ float GetFollowAngle() const override { return m_followAngle; }
void SetFollowAngle(float angle) { m_followAngle = angle; }
bool IsPetGhoul() const {return GetEntry() == 26125;} // Ghoul may be guardian or pet
bool IsSpiritWolf() const {return GetEntry() == 29264;} // Spirit wolf from feral spirits
@@ -84,17 +84,17 @@ class Guardian : public Minion
{
public:
Guardian(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject);
- void InitStats(uint32 duration);
+ void InitStats(uint32 duration) override;
bool InitStatsForLevel(uint8 level);
- void InitSummon();
+ void InitSummon() override;
- bool UpdateStats(Stats stat);
- bool UpdateAllStats();
- void UpdateResistances(uint32 school);
- void UpdateArmor();
- void UpdateMaxHealth();
- void UpdateMaxPower(Powers power);
- void UpdateAttackPowerAndDamage(bool ranged = false);
+ bool UpdateStats(Stats stat) override;
+ bool UpdateAllStats() override;
+ void UpdateResistances(uint32 school) override;
+ void UpdateArmor() override;
+ void UpdateMaxHealth() override;
+ void UpdateMaxPower(Powers power) override;
+ void UpdateAttackPowerAndDamage(bool ranged = false) override;
void UpdateDamagePhysical(WeaponAttackType attType) override;
int32 GetBonusDamage() const { return m_bonusSpellDamage; }
@@ -108,17 +108,17 @@ class Puppet : public Minion
{
public:
Puppet(SummonPropertiesEntry const* properties, Unit* owner);
- void InitStats(uint32 duration);
- void InitSummon();
- void Update(uint32 time);
- void RemoveFromWorld();
+ void InitStats(uint32 duration) override;
+ void InitSummon() override;
+ void Update(uint32 time) override;
+ void RemoveFromWorld() override;
};
class ForcedUnsummonDelayEvent : public BasicEvent
{
public:
ForcedUnsummonDelayEvent(TempSummon& owner) : BasicEvent(), m_owner(owner) { }
- bool Execute(uint64 e_time, uint32 p_time);
+ bool Execute(uint64 e_time, uint32 p_time) override;
private:
TempSummon& m_owner;
diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.h b/src/server/game/Entities/DynamicObject/DynamicObject.h
index c9fd1d29f8b..7816600b7a4 100644
--- a/src/server/game/Entities/DynamicObject/DynamicObject.h
+++ b/src/server/game/Entities/DynamicObject/DynamicObject.h
@@ -38,11 +38,11 @@ class DynamicObject : public WorldObject, public GridObject<DynamicObject>, publ
DynamicObject(bool isWorldObject);
~DynamicObject();
- void AddToWorld();
- void RemoveFromWorld();
+ void AddToWorld() override;
+ void RemoveFromWorld() override;
bool CreateDynamicObject(uint32 guidlow, Unit* caster, uint32 spellId, Position const& pos, float radius, DynamicObjectType type);
- void Update(uint32 p_time);
+ void Update(uint32 p_time) override;
void Remove();
void SetDuration(int32 newDuration);
int32 GetDuration() const;
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 0f3e68bb1ae..c8c0eaefb27 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -143,7 +143,12 @@ void GameObject::AddToWorld()
// The state can be changed after GameObject::Create but before GameObject::AddToWorld
bool toggledState = GetGoType() == GAMEOBJECT_TYPE_CHEST ? getLootState() == GO_READY : (GetGoState() == GO_STATE_READY || IsTransport());
if (m_model)
- GetMap()->InsertGameObjectModel(*m_model);
+ {
+ if (Transport* trans = ToTransport())
+ trans->SetDelayedAddModelToMap();
+ else
+ GetMap()->InsertGameObjectModel(*m_model);
+ }
EnableCollision(toggledState);
WorldObject::AddToWorld();
@@ -1791,14 +1796,14 @@ void GameObject::CastSpell(Unit* target, uint32 spellId, bool triggered /*= true
trigger->setFaction(owner->getFaction());
// needed for GO casts for proper target validation checks
trigger->SetOwnerGUID(owner->GetGUID());
- trigger->CastSpell(target ? target : trigger, spellInfo, triggered, 0, 0, owner->GetGUID());
+ trigger->CastSpell(target ? target : trigger, spellInfo, triggered, nullptr, nullptr, owner->GetGUID());
}
else
{
trigger->setFaction(14);
// Set owner guid for target if no owner available - needed by trigger auras
// - trigger gets despawned and there's no caster avalible (see AuraEffect::TriggerSpell())
- trigger->CastSpell(target ? target : trigger, spellInfo, triggered, 0, 0, target ? target->GetGUID() : 0);
+ trigger->CastSpell(target ? target : trigger, spellInfo, triggered, nullptr, nullptr, target ? target->GetGUID() : 0);
}
}
diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h
index f5074e202e9..f551ab2046c 100644
--- a/src/server/game/Entities/GameObject/GameObject.h
+++ b/src/server/game/Entities/GameObject/GameObject.h
@@ -635,14 +635,14 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
explicit GameObject();
~GameObject();
- void BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, Player* target) const;
+ void BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, Player* target) const override;
- void AddToWorld();
- void RemoveFromWorld();
- void CleanupsBeforeDelete(bool finalCleanup = true);
+ void AddToWorld() override;
+ void RemoveFromWorld() override;
+ void CleanupsBeforeDelete(bool finalCleanup = true) override;
bool Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMask, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, GOState go_state, uint32 artKit = 0);
- void Update(uint32 p_time);
+ void Update(uint32 p_time) override;
static GameObject* GetGameObject(WorldObject& object, uint64 guid);
GameObjectTemplate const* GetGOInfo() const { return m_goInfo; }
GameObjectData const* GetGOData() const { return m_goData; }
@@ -657,7 +657,7 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
void UpdateRotationFields(float rotation2 = 0.0f, float rotation3 = 0.0f);
// overwrite WorldObject function for proper name localization
- std::string const& GetNameForLocaleIdx(LocaleConstant locale_idx) const;
+ std::string const& GetNameForLocaleIdx(LocaleConstant locale_idx) const override;
void SaveToDB();
void SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask);
@@ -757,7 +757,7 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
uint32 GetUseCount() const { return m_usetimes; }
uint32 GetUniqueUseCount() const { return m_unique_users.size(); }
- void SaveRespawnTime();
+ void SaveRespawnTime() override;
Loot loot;
@@ -769,8 +769,8 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
uint32 m_groupLootTimer; // (msecs)timer used for group loot
uint32 lootingGroupLowGUID; // used to find group which is looting
- bool hasQuest(uint32 quest_id) const;
- bool hasInvolvedQuest(uint32 quest_id) const;
+ bool hasQuest(uint32 quest_id) const override;
+ bool hasInvolvedQuest(uint32 quest_id) const override;
bool ActivateToQuest(Player* target) const;
void UseDoorOrButton(uint32 time_to_restore = 0, bool alternative = false, Unit* user = NULL);
// 0 = use `gameobject`.`spawntimesecs`
@@ -780,10 +780,10 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
bool IsNeverVisible() const override;
- bool IsAlwaysVisibleFor(WorldObject const* seer) const;
- bool IsInvisibleDueToDespawn() const;
+ bool IsAlwaysVisibleFor(WorldObject const* seer) const override;
+ bool IsInvisibleDueToDespawn() const override;
- uint8 getLevelForTarget(WorldObject const* target) const
+ uint8 getLevelForTarget(WorldObject const* target) const override
{
if (Unit* owner = GetOwner())
return owner->getLevelForTarget(target);
@@ -828,10 +828,10 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
Transport* ToTransport() { if (GetGOInfo()->type == GAMEOBJECT_TYPE_MO_TRANSPORT) return reinterpret_cast<Transport*>(this); else return NULL; }
Transport const* ToTransport() const { if (GetGOInfo()->type == GAMEOBJECT_TYPE_MO_TRANSPORT) return reinterpret_cast<Transport const*>(this); else return NULL; }
- float GetStationaryX() const { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionX(); return GetPositionX(); }
- float GetStationaryY() const { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionY(); return GetPositionY(); }
- float GetStationaryZ() const { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionZ(); return GetPositionZ(); }
- float GetStationaryO() const { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetOrientation(); return GetOrientation(); }
+ float GetStationaryX() const override { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionX(); return GetPositionX(); }
+ float GetStationaryY() const override { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionY(); return GetPositionY(); }
+ float GetStationaryZ() const override { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionZ(); return GetPositionZ(); }
+ float GetStationaryO() const override { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetOrientation(); return GetOrientation(); }
float GetInteractionDistance();
@@ -873,7 +873,7 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
void SwitchDoorOrButton(bool activate, bool alternative = false);
//! Object distance/size - overridden from Object::_IsWithinDist. Needs to take in account proper GO size.
- bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool /*is3D*/) const
+ bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool /*is3D*/) const override
{
//! Following check does check 3d distance
return IsInRange(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ(), dist2compare);
diff --git a/src/server/game/Entities/Item/Container/Bag.h b/src/server/game/Entities/Item/Container/Bag.h
index 1e39e5a41ad..db0c8edf556 100644
--- a/src/server/game/Entities/Item/Container/Bag.h
+++ b/src/server/game/Entities/Item/Container/Bag.h
@@ -32,10 +32,10 @@ class Bag : public Item
Bag();
~Bag();
- void AddToWorld();
- void RemoveFromWorld();
+ void AddToWorld() override;
+ void RemoveFromWorld() override;
- bool Create(uint32 guidlow, uint32 itemid, Player const* owner);
+ bool Create(uint32 guidlow, uint32 itemid, Player const* owner) override;
void Clear();
void StoreItem(uint8 slot, Item* pItem, bool update);
@@ -52,13 +52,13 @@ class Bag : public Item
// DB operations
// overwrite virtual Item::SaveToDB
- void SaveToDB(SQLTransaction& trans);
+ void SaveToDB(SQLTransaction& trans) override;
// overwrite virtual Item::LoadFromDB
- bool LoadFromDB(uint32 guid, uint64 owner_guid, Field* fields, uint32 entry);
+ bool LoadFromDB(uint32 guid, uint64 owner_guid, Field* fields, uint32 entry) override;
// overwrite virtual Item::DeleteFromDB
- void DeleteFromDB(SQLTransaction& trans);
+ void DeleteFromDB(SQLTransaction& trans) override;
- void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const;
+ void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const override;
protected:
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index 09911fc8f57..6894dd86493 100644
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -1265,6 +1265,14 @@ void Item::ItemContainerSaveLootToDB()
// but we don't want to resave it.
if (!_li->canSave)
continue;
+ // Conditions are not checked when loot is generated, it is checked when loot is sent to a player.
+ // For items that are lootable, loot is saved to the DB immediately, that means that loot can be
+ // saved to the DB that the player never should have gotten. This check prevents that, so that only
+ // items that the player should get in loot are in the DB.
+ // IE: Horde items are not saved to the DB for Ally players.
+ Player* const guid = GetOwner();
+ if (!_li->AllowedForPlayer(guid))
+ continue;
stmt_items = CharacterDatabase.GetPreparedStatement(CHAR_INS_ITEMCONTAINER_ITEMS);
diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h
index a65579cc134..32fbe9e35fd 100644
--- a/src/server/game/Entities/Item/Item.h
+++ b/src/server/game/Entities/Item/Item.h
@@ -324,8 +324,8 @@ class Item : public Object
uState = state;
}
- bool hasQuest(uint32 quest_id) const { return GetTemplate()->StartQuest == quest_id; }
- bool hasInvolvedQuest(uint32 /*quest_id*/) const { return false; }
+ bool hasQuest(uint32 quest_id) const override { return GetTemplate()->StartQuest == quest_id; }
+ bool hasInvolvedQuest(uint32 /*quest_id*/) const override { return false; }
bool IsPotion() const { return GetTemplate()->IsPotion(); }
bool IsWeaponVellum() const { return GetTemplate()->IsWeaponVellum(); }
bool IsArmorVellum() const { return GetTemplate()->IsArmorVellum(); }
@@ -350,7 +350,7 @@ class Item : public Object
void ClearSoulboundTradeable(Player* currentOwner);
bool CheckSoulboundTradeExpire();
- void BuildUpdate(UpdateDataMapType&);
+ void BuildUpdate(UpdateDataMapType&) override;
uint32 GetScriptId() const { return GetTemplate()->ScriptId; }
private:
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index dfc0c438662..c96b6e31c61 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -119,7 +119,7 @@ Object::~Object()
}
delete [] m_uint32Values;
- m_uint32Values = 0;
+ m_uint32Values = nullptr;
}
void Object::_InitValues()
diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h
index b82ca1cb0b2..13f4dd13a83 100644
--- a/src/server/game/Entities/Object/Object.h
+++ b/src/server/game/Entities/Object/Object.h
@@ -580,7 +580,7 @@ class WorldObject : public Object, public WorldLocation
virtual void Update (uint32 /*time_diff*/) { }
void _Create(uint32 guidlow, HighGuid guidhigh, uint32 phaseMask);
- virtual void RemoveFromWorld();
+ virtual void RemoveFromWorld() override;
void GetNearPoint2D(float &x, float &y, float distance, float absAngle) const;
void GetNearPoint(WorldObject const* searcher, float &x, float &y, float &z, float searcher_size, float distance2d, float absAngle) const;
@@ -713,7 +713,7 @@ class WorldObject : public Object, public WorldLocation
void DestroyForNearbyPlayers();
virtual void UpdateObjectVisibility(bool forced = true);
- void BuildUpdate(UpdateDataMapType&);
+ void BuildUpdate(UpdateDataMapType&) override;
//relocation and visibility system functions
void AddToNotify(uint16 f) { m_notifyflags |= f;}
@@ -805,14 +805,16 @@ namespace Trinity
class ObjectDistanceOrderPred
{
public:
- ObjectDistanceOrderPred(WorldObject const* pRefObj, bool ascending = true) : m_refObj(pRefObj), m_ascending(ascending) { }
- bool operator()(WorldObject const* pLeft, WorldObject const* pRight) const
+ ObjectDistanceOrderPred(WorldObject const* refObj, bool ascending = true) : _refObj(refObj), _ascending(ascending) { }
+
+ bool operator()(WorldObject const* left, WorldObject const* right) const
{
- return m_ascending ? m_refObj->GetDistanceOrder(pLeft, pRight) : !m_refObj->GetDistanceOrder(pLeft, pRight);
+ return _refObj->GetDistanceOrder(left, right) == _ascending;
}
+
private:
- WorldObject const* m_refObj;
- const bool m_ascending;
+ WorldObject const* _refObj;
+ bool _ascending;
};
}
diff --git a/src/server/game/Entities/Object/Updates/UpdateData.cpp b/src/server/game/Entities/Object/Updates/UpdateData.cpp
index e996db52c38..f6ac0bc67cc 100644
--- a/src/server/game/Entities/Object/Updates/UpdateData.cpp
+++ b/src/server/game/Entities/Object/Updates/UpdateData.cpp
@@ -47,9 +47,9 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size)
{
z_stream c_stream;
- c_stream.zalloc = (alloc_func)0;
- c_stream.zfree = (free_func)0;
- c_stream.opaque = (voidpf)0;
+ c_stream.zalloc = (alloc_func)nullptr;
+ c_stream.zfree = (free_func)nullptr;
+ c_stream.opaque = (voidpf)nullptr;
// default Z_BEST_SPEED (1)
int z_res = deflateInit(&c_stream, sWorld->getIntConfig(CONFIG_COMPRESSION));
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index 876f35a58ce..37087663328 100644
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -182,8 +182,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c
setFaction(owner->getFaction());
SetUInt32Value(UNIT_CREATED_BY_SPELL, summonSpellId);
- CreatureTemplate const* cinfo = GetCreatureTemplate();
- if (cinfo->type == CREATURE_TYPE_CRITTER)
+ if (IsCritter())
{
float px, py, pz;
owner->GetClosePoint(px, py, pz, GetObjectSize(), PET_FOLLOW_DIST, GetFollowAngle());
@@ -1019,7 +1018,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
SetCreateHealth(30*petlevel);
// wolf attack speed is 1.5s
- SetAttackTime(BASE_ATTACK, cinfo->baseattacktime);
+ SetAttackTime(BASE_ATTACK, cinfo->BaseAttackTime);
SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float((petlevel * 4 - petlevel)));
SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float((petlevel * 4 + petlevel)));
diff --git a/src/server/game/Entities/Pet/Pet.h b/src/server/game/Entities/Pet/Pet.h
index 68465f6b8e7..7d4523be9af 100644
--- a/src/server/game/Entities/Pet/Pet.h
+++ b/src/server/game/Entities/Pet/Pet.h
@@ -43,10 +43,10 @@ class Pet : public Guardian
explicit Pet(Player* owner, PetType type = MAX_PET_TYPE);
virtual ~Pet();
- void AddToWorld();
- void RemoveFromWorld();
+ void AddToWorld() override;
+ void RemoveFromWorld() override;
- void SetDisplayId(uint32 modelId);
+ void SetDisplayId(uint32 modelId) override;
PetType getPetType() const { return m_petType; }
void setPetType(PetType type) { m_petType = type; }
@@ -60,16 +60,16 @@ class Pet : public Guardian
bool CreateBaseAtCreatureInfo(CreatureTemplate const* cinfo, Unit* owner);
bool CreateBaseAtTamed(CreatureTemplate const* cinfo, Map* map, uint32 phaseMask);
bool LoadPetFromDB(Player* owner, uint32 petentry = 0, uint32 petnumber = 0, bool current = false);
- bool isBeingLoaded() const { return m_loading;}
+ bool isBeingLoaded() const override { return m_loading;}
void SavePetToDB(PetSaveMode mode);
void Remove(PetSaveMode mode, bool returnreagent = false);
static void DeleteFromDB(uint32 guidlow);
- void setDeathState(DeathState s); // overwrite virtual Creature::setDeathState and Unit::setDeathState
- void Update(uint32 diff); // overwrite virtual Creature::Update and Unit::Update
+ void setDeathState(DeathState s) override; // overwrite virtual Creature::setDeathState and Unit::setDeathState
+ void Update(uint32 diff) override; // overwrite virtual Creature::Update and Unit::Update
- uint8 GetPetAutoSpellSize() const { return m_autospells.size(); }
- uint32 GetPetAutoSpellOnPos(uint8 pos) const
+ uint8 GetPetAutoSpellSize() const override { return m_autospells.size(); }
+ uint32 GetPetAutoSpellOnPos(uint8 pos) const override
{
if (pos >= m_autospells.size())
return 0;
@@ -100,7 +100,7 @@ class Pet : public Guardian
void ToggleAutocast(SpellInfo const* spellInfo, bool apply);
- bool HasSpell(uint32 spell) const;
+ bool HasSpell(uint32 spell) const override;
void LearnPetPassives();
void CastPetAuras(bool current);
@@ -121,7 +121,7 @@ class Pet : public Guardian
bool unlearnSpell(uint32 spell_id, bool learn_prev, bool clear_ab = true);
bool removeSpell(uint32 spell_id, bool learn_prev, bool clear_ab = true);
void CleanupActionBar();
- virtual void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs);
+ virtual void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) override;
PetSpellMap m_spells;
AutoSpellList m_autospells;
@@ -129,7 +129,7 @@ class Pet : public Guardian
void InitPetCreateSpells();
bool resetTalents();
- static void resetTalentsForAllPetsOf(Player* owner, Pet* online_pet = NULL);
+ static void resetTalentsForAllPetsOf(Player* owner, Pet* online_pet = nullptr);
void InitTalentForLevel();
uint8 GetMaxTalentPointsForLevel(uint8 level);
@@ -159,11 +159,11 @@ class Pet : public Guardian
DeclinedName *m_declinedname;
private:
- void SaveToDB(uint32, uint8, uint32) // override of Creature::SaveToDB - must not be called
+ void SaveToDB(uint32, uint8, uint32) override // override of Creature::SaveToDB - must not be called
{
ASSERT(false);
}
- void DeleteFromDB() // override of Creature::DeleteFromDB - must not be called
+ void DeleteFromDB() override // override of Creature::DeleteFromDB - must not be called
{
ASSERT(false);
}
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index fa009d94fe2..c9ac4e73374 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -13176,13 +13176,6 @@ void Player::SwapItem(uint16 src, uint16 dst)
// SRC checks
- if (pSrcItem->m_lootGenerated) // prevent swap looting item
- {
- //best error message found for attempting to swap while looting
- SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pSrcItem, NULL);
- return;
- }
-
// check unequip potability for equipped items and bank bags
if (IsEquipmentPos(src) || IsBagPos(src))
{
@@ -13213,13 +13206,6 @@ void Player::SwapItem(uint16 src, uint16 dst)
if (pDstItem)
{
- if (pDstItem->m_lootGenerated) // prevent swap looting item
- {
- //best error message found for attempting to swap while looting
- SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pDstItem, NULL);
- return;
- }
-
// check unequip potability for equipped items and bank bags
if (IsEquipmentPos(dst) || IsBagPos(dst))
{
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index 508be730a18..b1fd9d5a97f 100644
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -1101,12 +1101,12 @@ class Player : public Unit, public GridObject<Player>
explicit Player(WorldSession* session);
~Player();
- void CleanupsBeforeDelete(bool finalCleanup = true);
+ void CleanupsBeforeDelete(bool finalCleanup = true) override;
- void AddToWorld();
- void RemoveFromWorld();
+ void AddToWorld() override;
+ void RemoveFromWorld() override;
- void SetObjectScale(float scale)
+ void SetObjectScale(float scale) override
{
Unit::SetObjectScale(scale);
SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, scale * DEFAULT_WORLD_OBJECT_SIZE);
@@ -1122,14 +1122,14 @@ class Player : public Unit, public GridObject<Player>
bool Create(uint32 guidlow, CharacterCreateInfo* createInfo);
- void Update(uint32 time);
+ void Update(uint32 time) override;
static bool BuildEnumData(PreparedQueryResult result, WorldPacket* data);
void SetInWater(bool apply);
- bool IsInWater() const { return m_isInWater; }
- bool IsUnderWater() const;
+ bool IsInWater() const override { return m_isInWater; }
+ bool IsUnderWater() const override;
bool IsFalling() { return GetPositionZ() < m_lastFallZ; }
void SendInitialPacketsBeforeAddToMap();
@@ -1191,7 +1191,7 @@ class Player : public Unit, public GridObject<Player>
uint32 GetTotalPlayedTime() { return m_Played_time[PLAYED_TIME_TOTAL]; }
uint32 GetLevelPlayedTime() { return m_Played_time[PLAYED_TIME_LEVEL]; }
- void setDeathState(DeathState s); // overwrite Unit::setDeathState
+ void setDeathState(DeathState s) override; // overwrite Unit::setDeathState
void InnEnter(time_t time, uint32 mapid, float x, float y, float z);
@@ -1228,7 +1228,7 @@ class Player : public Unit, public GridObject<Player>
/*********************************************************/
void SetVirtualItemSlot(uint8 i, Item* item);
- void SetSheath(SheathState sheathed); // overwrite Unit version
+ void SetSheath(SheathState sheathed) override; // overwrite Unit version
uint8 FindEquipSlot(ItemTemplate const* proto, uint32 slot, bool swap) const;
uint32 GetItemCount(uint32 item, bool inBankAlso = false, Item* skipItem = NULL) const;
uint32 GetItemCountWithLimitCategory(uint32 limitCategory, Item* skipItem = NULL) const;
@@ -1489,7 +1489,7 @@ class Player : public Unit, public GridObject<Player>
/*********************************************************/
bool LoadFromDB(uint32 guid, SQLQueryHolder *holder);
- bool isBeingLoaded() const;
+ bool isBeingLoaded() const override;
void Initialize(uint32 guid);
static uint32 GetUInt32ValueFromArray(Tokenizer const& data, uint16 index);
@@ -1592,7 +1592,7 @@ class Player : public Unit, public GridObject<Player>
void PossessSpellInitialize();
void VehicleSpellInitialize();
void SendRemoveControlBar();
- bool HasSpell(uint32 spell) const;
+ bool HasSpell(uint32 spell) const override;
bool HasActiveSpell(uint32 spell) const; // show in spellbook
TrainerSpellState GetTrainerSpellState(TrainerSpell const* trainer_spell) const;
bool IsSpellFitByClassAndRace(uint32 spell_id) const;
@@ -1671,7 +1671,7 @@ class Player : public Unit, public GridObject<Player>
void AddSpellCooldown(uint32 spell_id, uint32 itemid, time_t end_time);
void ModifySpellCooldown(uint32 spellId, int32 cooldown);
void SendCooldownEvent(SpellInfo const* spellInfo, uint32 itemId = 0, Spell* spell = NULL, bool setCooldown = true);
- void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs);
+ void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) override;
void RemoveSpellCooldown(uint32 spell_id, bool update = false);
void RemoveSpellCategoryCooldown(uint32 cat, bool update = false);
void SendClearCooldown(uint32 spell_id, Unit* target);
@@ -1779,15 +1779,15 @@ class Player : public Unit, public GridObject<Player>
float GetHealthBonusFromStamina();
float GetManaBonusFromIntellect();
- bool UpdateStats(Stats stat);
- bool UpdateAllStats();
+ bool UpdateStats(Stats stat) override;
+ bool UpdateAllStats() override;
void ApplySpellPenetrationBonus(int32 amount, bool apply);
- void UpdateResistances(uint32 school);
- void UpdateArmor();
- void UpdateMaxHealth();
- void UpdateMaxPower(Powers power);
+ void UpdateResistances(uint32 school) override;
+ void UpdateArmor() override;
+ void UpdateMaxHealth() override;
+ void UpdateMaxPower(Powers power) override;
void ApplyFeralAPBonus(int32 amount, bool apply);
- void UpdateAttackPowerAndDamage(bool ranged = false);
+ void UpdateAttackPowerAndDamage(bool ranged = false) override;
void UpdateShieldBlockValue();
void ApplySpellPowerBonus(int32 amount, bool apply);
void UpdateSpellDamageAndHealingBonus();
@@ -1836,8 +1836,8 @@ class Player : public Unit, public GridObject<Player>
WorldSession* GetSession() const { return m_session; }
- void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const;
- void DestroyForPlayer(Player* target, bool onDeath = false) const;
+ void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const override;
+ void DestroyForPlayer(Player* target, bool onDeath = false) const override;
void SendLogXPGain(uint32 GivenXP, Unit* victim, uint32 BonusXP, bool recruitAFriend = false, float group_rate=1.0f);
// notifiers
@@ -1856,14 +1856,14 @@ class Player : public Unit, public GridObject<Player>
void SendResetInstanceFailed(uint32 reason, uint32 MapId);
void SendResetFailedNotify(uint32 mapid);
- virtual bool UpdatePosition(float x, float y, float z, float orientation, bool teleport = false);
+ virtual bool UpdatePosition(float x, float y, float z, float orientation, bool teleport = false) override;
bool UpdatePosition(const Position &pos, bool teleport = false) { return UpdatePosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teleport); }
- void UpdateUnderwaterState(Map* m, float x, float y, float z);
+ void UpdateUnderwaterState(Map* m, float x, float y, float z) override;
- void SendMessageToSet(WorldPacket* data, bool self) {SendMessageToSetInRange(data, GetVisibilityRange(), self); };// overwrite Object::SendMessageToSet
- void SendMessageToSetInRange(WorldPacket* data, float fist, bool self);// overwrite Object::SendMessageToSetInRange
+ void SendMessageToSet(WorldPacket* data, bool self) override {SendMessageToSetInRange(data, GetVisibilityRange(), self); };// overwrite Object::SendMessageToSet
+ void SendMessageToSetInRange(WorldPacket* data, float fist, bool self) override;// overwrite Object::SendMessageToSetInRange
void SendMessageToSetInRange(WorldPacket* data, float dist, bool self, bool own_team_only);
- void SendMessageToSet(WorldPacket* data, Player const* skipped_rcvr);
+ void SendMessageToSet(WorldPacket* data, Player const* skipped_rcvr) override;
void SendTeleportAckPacket();
@@ -1980,7 +1980,7 @@ class Player : public Unit, public GridObject<Player>
int32 CalculateCorpseReclaimDelay(bool load = false);
void SendCorpseReclaimDelay(uint32 delay);
- uint32 GetShieldBlockValue() const; // overwrite Unit version (virtual)
+ uint32 GetShieldBlockValue() const override; // overwrite Unit version (virtual)
bool CanParry() const { return m_canParry; }
void SetCanParry(bool value);
bool CanBlock() const { return m_canBlock; }
@@ -2169,12 +2169,12 @@ class Player : public Unit, public GridObject<Player>
bool HaveAtClient(WorldObject const* u) const;
- bool IsNeverVisible() const;
+ bool IsNeverVisible() const override;
bool IsVisibleGloballyFor(Player const* player) const;
void SendInitialVisiblePackets(Unit* target);
- void UpdateObjectVisibility(bool forced = true);
+ void UpdateObjectVisibility(bool forced = true) override;
void UpdateVisibilityForPlayer();
void UpdateVisibilityOf(WorldObject* target);
void UpdateTriggerVisibility();
@@ -2269,8 +2269,8 @@ class Player : public Unit, public GridObject<Player>
MapReference &GetMapRef() { return m_mapRef; }
// Set map to player and add reference
- void SetMap(Map* map);
- void ResetMap();
+ void SetMap(Map* map) override;
+ void ResetMap() override;
bool isAllowedToLoot(const Creature* creature);
@@ -2324,13 +2324,13 @@ class Player : public Unit, public GridObject<Player>
bool IsInWhisperWhiteList(uint64 guid);
void RemoveFromWhisperWhiteList(uint64 guid) { WhisperList.remove(guid); }
- bool SetDisableGravity(bool disable, bool packetOnly /* = false */);
- bool SetCanFly(bool apply);
- bool SetWaterWalking(bool apply, bool packetOnly = false);
- bool SetFeatherFall(bool apply, bool packetOnly = false);
- bool SetHover(bool enable, bool packetOnly = false);
+ bool SetDisableGravity(bool disable, bool packetOnly /* = false */) override;
+ bool SetCanFly(bool apply) override;
+ bool SetWaterWalking(bool apply, bool packetOnly = false) override;
+ bool SetFeatherFall(bool apply, bool packetOnly = false) override;
+ bool SetHover(bool enable, bool packetOnly = false) override;
- bool CanFly() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY); }
+ bool CanFly() const override { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY); }
//! Return collision height sent to client
float GetCollisionHeight(bool mounted) const;
@@ -2594,9 +2594,9 @@ class Player : public Unit, public GridObject<Player>
Runes *m_runes;
EquipmentSets m_EquipmentSets;
- bool CanAlwaysSee(WorldObject const* obj) const;
+ bool CanAlwaysSee(WorldObject const* obj) const override;
- bool IsAlwaysDetectableFor(WorldObject const* seer) const;
+ bool IsAlwaysDetectableFor(WorldObject const* seer) const override;
uint8 m_grantableLevels;
diff --git a/src/server/game/Entities/Totem/Totem.h b/src/server/game/Entities/Totem/Totem.h
index da0398f3a96..534e818842e 100644
--- a/src/server/game/Entities/Totem/Totem.h
+++ b/src/server/game/Entities/Totem/Totem.h
@@ -37,25 +37,25 @@ class Totem : public Minion
public:
Totem(SummonPropertiesEntry const* properties, Unit* owner);
virtual ~Totem() { }
- void Update(uint32 time);
- void InitStats(uint32 duration);
- void InitSummon();
- void UnSummon(uint32 msTime = 0);
+ void Update(uint32 time) override;
+ void InitStats(uint32 duration) override;
+ void InitSummon() override;
+ void UnSummon(uint32 msTime = 0) override;
uint32 GetSpell(uint8 slot = 0) const { return m_spells[slot]; }
uint32 GetTotemDuration() const { return m_duration; }
void SetTotemDuration(uint32 duration) { m_duration = duration; }
TotemType GetTotemType() const { return m_type; }
- bool UpdateStats(Stats /*stat*/) { return true; }
- bool UpdateAllStats() { return true; }
- void UpdateResistances(uint32 /*school*/) { }
- void UpdateArmor() { }
- void UpdateMaxHealth() { }
- void UpdateMaxPower(Powers /*power*/) { }
- void UpdateAttackPowerAndDamage(bool /*ranged*/) { }
+ bool UpdateStats(Stats /*stat*/) override { return true; }
+ bool UpdateAllStats() override { return true; }
+ void UpdateResistances(uint32 /*school*/) override { }
+ void UpdateArmor() override { }
+ void UpdateMaxHealth() override { }
+ void UpdateMaxPower(Powers /*power*/) override { }
+ void UpdateAttackPowerAndDamage(bool /*ranged*/) override { }
void UpdateDamagePhysical(WeaponAttackType /*attType*/) override { }
- bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const;
+ bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const override;
protected:
TotemType m_type;
diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
index d907274f8d1..367ccd34cdb 100644
--- a/src/server/game/Entities/Transport/Transport.cpp
+++ b/src/server/game/Entities/Transport/Transport.cpp
@@ -35,7 +35,8 @@
Transport::Transport() : GameObject(),
_transportInfo(NULL), _isMoving(true), _pendingStop(false),
- _triggeredArrivalEvent(false), _triggeredDepartureEvent(false), _passengerTeleportItr(_passengers.begin())
+ _triggeredArrivalEvent(false), _triggeredDepartureEvent(false),
+ _passengerTeleportItr(_passengers.begin()), _delayedAddModel(false)
{
m_updateFlag = UPDATEFLAG_TRANSPORT | UPDATEFLAG_LOWGUID | UPDATEFLAG_STATIONARY_POSITION | UPDATEFLAG_ROTATION;
}
@@ -186,6 +187,14 @@ void Transport::Update(uint32 diff)
return; // Update more in new map thread
}
+ // Add model to map after we are fully done with moving maps
+ if (_delayedAddModel)
+ {
+ _delayedAddModel = false;
+ if (m_model)
+ GetMap()->InsertGameObjectModel(*m_model);
+ }
+
// Set position
_positionChangeTimer.Update(diff);
if (_positionChangeTimer.Passed())
@@ -625,7 +634,6 @@ bool Transport::TeleportTransport(uint32 newMapid, float x, float y, float z, fl
}
Relocate(x, y, z, o);
- UpdateModelPosition();
GetMap()->AddToMap<Transport>(this);
return true;
}
diff --git a/src/server/game/Entities/Transport/Transport.h b/src/server/game/Entities/Transport/Transport.h
index e644417f1ac..2c924eb33ed 100644
--- a/src/server/game/Entities/Transport/Transport.h
+++ b/src/server/game/Entities/Transport/Transport.h
@@ -95,6 +95,8 @@ class Transport : public GameObject, public TransportBase
void EnableMovement(bool enabled);
+ void SetDelayedAddModelToMap() { _delayedAddModel = true; }
+
TransportTemplate const* GetTransportTemplate() const { return _transportInfo; }
private:
@@ -123,6 +125,8 @@ class Transport : public GameObject, public TransportBase
PassengerSet _passengers;
PassengerSet::iterator _passengerTeleportItr;
PassengerSet _staticPassengers;
+
+ bool _delayedAddModel;
};
#endif
diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp
index 04136221d0d..bac2a8ef856 100644
--- a/src/server/game/Entities/Unit/StatSystem.cpp
+++ b/src/server/game/Entities/Unit/StatSystem.cpp
@@ -1037,17 +1037,21 @@ void Creature::UpdateAttackPowerAndDamage(bool ranged)
void Creature::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, float& minDamage, float& maxDamage)
{
+ float variance = 1.0f;
UnitMods unitMod;
switch (attType)
{
case BASE_ATTACK:
default:
+ variance = GetCreatureTemplate()->BaseVariance;
unitMod = UNIT_MOD_DAMAGE_MAINHAND;
break;
case OFF_ATTACK:
+ variance = GetCreatureTemplate()->BaseVariance;
unitMod = UNIT_MOD_DAMAGE_OFFHAND;
break;
case RANGED_ATTACK:
+ variance = GetCreatureTemplate()->RangeVariance;
unitMod = UNIT_MOD_DAMAGE_RANGED;
break;
}
@@ -1070,11 +1074,11 @@ void Creature::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized,
float attackPower = GetTotalAttackPowerValue(attType);
float attackSpeedMulti = GetAPMultiplier(attType, normalized);
- float baseValue = GetModifierValue(unitMod, BASE_VALUE) + (attackPower / 14.0f);
+ float baseValue = GetModifierValue(unitMod, BASE_VALUE) + (attackPower / 14.0f) * variance;
float basePct = GetModifierValue(unitMod, BASE_PCT) * attackSpeedMulti;
float totalValue = GetModifierValue(unitMod, TOTAL_VALUE);
float totalPct = addTotalPct ? GetModifierValue(unitMod, TOTAL_PCT) : 1.0f;
- float dmgMultiplier = GetCreatureTemplate()->dmg_multiplier; // = dmg_multiplier * _GetDamageMod(rank);
+ float dmgMultiplier = GetCreatureTemplate()->ModDamage; // = ModDamage * _GetDamageMod(rank);
minDamage = ((weaponMinDamage + baseValue) * dmgMultiplier * basePct + totalValue) * totalPct;
maxDamage = ((weaponMaxDamage + baseValue) * dmgMultiplier * basePct + totalValue) * totalPct;
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index b5a60793d63..a42836682bb 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -12791,6 +12791,10 @@ int32 Unit::ModSpellDuration(SpellInfo const* spellProto, Unit const* target, in
if (duration < 0)
return duration;
+ // some auras are not affected by duration modifiers
+ if (spellProto->AttributesEx7 & SPELL_ATTR7_IGNORE_DURATION_MODS)
+ return duration;
+
// cut duration only of negative effects
if (!positive)
{
@@ -13994,7 +13998,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
// On melee based hit/miss/resist need update skill (for victim and attacker)
if (procExtra & (PROC_EX_NORMAL_HIT|PROC_EX_MISS|PROC_EX_RESIST))
{
- if (target->GetTypeId() != TYPEID_PLAYER && target->GetCreatureType() != CREATURE_TYPE_CRITTER)
+ if (target->GetTypeId() != TYPEID_PLAYER && !target->IsCritter())
ToPlayer()->UpdateCombatSkills(target, attType, isVictim);
}
// Update defence if player is victim and parry/dodge/block
@@ -14658,7 +14662,7 @@ Unit* Unit::SelectNearbyTarget(Unit* exclude, float dist) const
// remove not LoS targets
for (std::list<Unit*>::iterator tIter = targets.begin(); tIter != targets.end();)
{
- if (!IsWithinLOSInMap(*tIter) || (*tIter)->IsTotem() || (*tIter)->IsSpiritService() || (*tIter)->GetCreatureType() == CREATURE_TYPE_CRITTER)
+ if (!IsWithinLOSInMap(*tIter) || (*tIter)->IsTotem() || (*tIter)->IsSpiritService() || (*tIter)->IsCritter())
targets.erase(tIter++);
else
++tIter;
@@ -15279,7 +15283,7 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
if (Unit* owner = GetOwner())
owner->ProcDamageAndSpell(victim, PROC_FLAG_KILL, PROC_FLAG_NONE, PROC_EX_NONE, 0);
- if (victim->GetCreatureType() != CREATURE_TYPE_CRITTER)
+ if (!victim->IsCritter())
ProcDamageAndSpell(victim, PROC_FLAG_KILL, PROC_FLAG_KILLED, PROC_EX_NONE, 0);
// Proc auras on death - must be before aura/combat remove
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index b88ea856c77..2e8d93ec995 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -265,7 +265,6 @@ enum UnitRename
UNIT_CAN_BE_ABANDONED = 0x02
};
-#define CREATURE_MAX_SPELLS 8
#define MAX_SPELL_CHARM 4
#define MAX_SPELL_VEHICLE 6
#define MAX_SPELL_POSSESS 8
@@ -1284,8 +1283,8 @@ class Unit : public WorldObject
UnitAI* GetAI() { return i_AI; }
void SetAI(UnitAI* newAI) { i_AI = newAI; }
- void AddToWorld();
- void RemoveFromWorld();
+ void AddToWorld() override;
+ void RemoveFromWorld() override;
void CleanupBeforeRemoveFromMap(bool finalCleanup);
void CleanupsBeforeDelete(bool finalCleanup = true) override; // used in ~Creature/~Player (or before mass creature delete to remove cross-references to already deleted units)
@@ -1300,7 +1299,7 @@ class Unit : public WorldObject
float GetSpellMaxRangeForTarget(Unit const* target, SpellInfo const* spellInfo) const;
float GetSpellMinRangeForTarget(Unit const* target, SpellInfo const* spellInfo) const;
- virtual void Update(uint32 time);
+ virtual void Update(uint32 time) override;
void setAttackTimer(WeaponAttackType type, uint32 time) { m_attackTimer[type] = time; }
void resetAttackTimer(WeaponAttackType type = BASE_ATTACK);
@@ -1356,7 +1355,7 @@ class Unit : public WorldObject
bool IsVehicle() const { return (m_unitTypeMask & UNIT_MASK_VEHICLE) != 0; }
uint8 getLevel() const { return uint8(GetUInt32Value(UNIT_FIELD_LEVEL)); }
- uint8 getLevelForTarget(WorldObject const* /*target*/) const { return getLevel(); }
+ uint8 getLevelForTarget(WorldObject const* /*target*/) const override { return getLevel(); }
void SetLevel(uint8 lvl);
uint8 getRace() const { return GetByteValue(UNIT_FIELD_BYTES_0, 0); }
uint32 getRaceMask() const { return 1 << (getRace()-1); }
@@ -1528,6 +1527,7 @@ class Unit : public WorldObject
bool IsArmorer() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_REPAIR); }
bool IsServiceProvider() const;
bool IsSpiritService() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPIRITHEALER | UNIT_NPC_FLAG_SPIRITGUIDE); }
+ bool IsCritter() const { return GetCreatureType() == CREATURE_TYPE_CRITTER; }
bool IsInFlight() const { return HasUnitState(UNIT_STATE_IN_FLIGHT); }
@@ -1916,8 +1916,8 @@ class Unit : public WorldObject
void SetVisible(bool x);
// common function for visibility checks for player/creatures with detection code
- void SetPhaseMask(uint32 newPhaseMask, bool update);// overwrite WorldObject::SetPhaseMask
- void UpdateObjectVisibility(bool forced = true);
+ void SetPhaseMask(uint32 newPhaseMask, bool update) override;// overwrite WorldObject::SetPhaseMask
+ void UpdateObjectVisibility(bool forced = true) override;
SpellImmuneList m_spellImmune[MAX_SPELL_IMMUNITY];
uint32 m_lastSanctuaryTime;
@@ -2104,7 +2104,7 @@ class Unit : public WorldObject
bool IsOnVehicle(const Unit* vehicle) const;
Unit* GetVehicleBase() const;
Creature* GetVehicleCreatureBase() const;
- uint64 GetTransGUID() const;
+ uint64 GetTransGUID() const override;
/// Returns the transport this unit is on directly (if on vehicle and transport, return vehicle)
TransportBase* GetDirectTransport() const;
@@ -2160,7 +2160,7 @@ class Unit : public WorldObject
protected:
explicit Unit (bool isWorldObject);
- void BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, Player* target) const;
+ void BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, Player* target) const override;
UnitAI* i_AI, *i_disabledAI;
@@ -2229,8 +2229,8 @@ class Unit : public WorldObject
uint32 m_unitTypeMask;
LiquidTypeEntry const* _lastLiquid;
- bool IsAlwaysVisibleFor(WorldObject const* seer) const;
- bool IsAlwaysDetectableFor(WorldObject const* seer) const;
+ bool IsAlwaysVisibleFor(WorldObject const* seer) const override;
+ bool IsAlwaysDetectableFor(WorldObject const* seer) const override;
void DisableSpline();
private:
diff --git a/src/server/game/Entities/Vehicle/Vehicle.h b/src/server/game/Entities/Vehicle/Vehicle.h
index 36119fa0027..be008330f0c 100644
--- a/src/server/game/Entities/Vehicle/Vehicle.h
+++ b/src/server/game/Entities/Vehicle/Vehicle.h
@@ -89,7 +89,7 @@ class Vehicle : public TransportBase
void InitMovementInfoForBase();
/// This method transforms supplied transport offsets into global coordinates
- void CalculatePassengerPosition(float& x, float& y, float& z, float* o /*= NULL*/) const
+ void CalculatePassengerPosition(float& x, float& y, float& z, float* o /*= NULL*/) const override
{
TransportBase::CalculatePassengerPosition(x, y, z, o,
GetBase()->GetPositionX(), GetBase()->GetPositionY(),
@@ -97,7 +97,7 @@ class Vehicle : public TransportBase
}
/// This method transforms supplied global coordinates into local offsets
- void CalculatePassengerOffset(float& x, float& y, float& z, float* o /*= NULL*/) const
+ void CalculatePassengerOffset(float& x, float& y, float& z, float* o /*= NULL*/) const override
{
TransportBase::CalculatePassengerOffset(x, y, z, o,
GetBase()->GetPositionX(), GetBase()->GetPositionY(),
@@ -126,8 +126,8 @@ class VehicleJoinEvent : public BasicEvent
protected:
VehicleJoinEvent(Vehicle* v, Unit* u) : Target(v), Passenger(u), Seat(Target->Seats.end()) { }
~VehicleJoinEvent();
- bool Execute(uint64, uint32);
- void Abort(uint64);
+ bool Execute(uint64, uint32) override;
+ void Abort(uint64) override;
Vehicle* Target;
Unit* Passenger;
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index b7f2cd3dae4..944ad4d4a19 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -315,7 +315,7 @@ void ObjectMgr::LoadCreatureLocales()
CreatureLocale& data = _creatureLocaleStore[entry];
- for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
+ for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
{
LocaleConstant locale = (LocaleConstant) i;
AddLocaleString(fields[1 + 2 * (i - 1)].GetString(), locale, data.Name);
@@ -323,7 +323,7 @@ void ObjectMgr::LoadCreatureLocales()
}
} while (result->NextRow());
- TC_LOG_INFO("server.loading", ">> Loaded %lu creature locale strings in %u ms", (unsigned long)_creatureLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u creature locale strings in %u ms", uint32(_creatureLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadGossipMenuItemsLocales()
@@ -351,7 +351,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
GossipMenuItemsLocale& data = _gossipMenuItemsLocaleStore[MAKE_PAIR32(menuId, id)];
- for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
+ for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
{
LocaleConstant locale = (LocaleConstant) i;
AddLocaleString(fields[2 + 2 * (i - 1)].GetString(), locale, data.OptionText);
@@ -360,7 +360,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
}
while (result->NextRow());
- TC_LOG_INFO("server.loading", ">> Loaded %lu gossip_menu_option locale strings in %u ms", (unsigned long)_gossipMenuItemsLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u gossip_menu_option locale strings in %u ms", uint32(_gossipMenuItemsLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadPointOfInterestLocales()
@@ -382,33 +382,33 @@ void ObjectMgr::LoadPointOfInterestLocales()
PointOfInterestLocale& data = _pointOfInterestLocaleStore[entry];
- for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
+ for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.IconName);
} while (result->NextRow());
- TC_LOG_INFO("server.loading", ">> Loaded %lu points_of_interest locale strings in %u ms", (unsigned long)_pointOfInterestLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u points_of_interest locale strings in %u ms", uint32(_pointOfInterestLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadCreatureTemplates()
{
uint32 oldMSTime = getMSTime();
- // 0 1 2 3 4 5 6 7 8
+ // 0 1 2 3 4 5 6 7 8
QueryResult result = WorldDatabase.Query("SELECT entry, difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, modelid1, modelid2, modelid3, "
- // 9 10 11 12 13 14 15 16 17 18 19 20 21
+ // 9 10 11 12 13 14 15 16 17 18 19 20
"modelid4, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, exp, faction, npcflag, speed_walk, speed_run, "
- // 22 23 24 25 26 27 28 29 30 31 32 33
- "scale, rank, mindmg, maxdmg, dmgschool, attackpower, dmg_multiplier, baseattacktime, rangeattacktime, unit_class, unit_flags, unit_flags2, "
- // 34 35 36 37 38 39 40 41 42 43
- "dynamicflags, family, trainer_type, trainer_spell, trainer_class, trainer_race, minrangedmg, maxrangedmg, rangedattackpower, type, "
- // 44 45 46 47 48 49 50 51 52 53 54
+ // 21 22 23 24 25 26 27 28 29 30
+ "scale, rank, dmgschool, BaseAttackTime, RangeAttackTime, BaseVariance, RangeVariance, unit_class, unit_flags, unit_flags2, "
+ // 31 32 33 34 35 36 37
+ "dynamicflags, family, trainer_type, trainer_spell, trainer_class, trainer_race, type, "
+ // 38 39 40 41 42 43 44 45 46 47 48
"type_flags, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, "
- // 55 56 57 58 59 60 61 62 63 64 65 66 67
+ // 49 50 51 52 53 54 55 56 57 58 59 60 61
"spell2, spell3, spell4, spell5, spell6, spell7, spell8, PetSpellDataId, VehicleId, mingold, maxgold, AIName, MovementType, "
- // 68 69 70 71 72 73 74 75 76 77 78
- "InhabitType, HoverHeight, Health_mod, Mana_mod, Armor_mod, RacialLeader, questItem1, questItem2, questItem3, questItem4, questItem5, "
- // 79 80 81 82 83 84
- " questItem6, movementId, RegenHealth, mechanic_immune_mask, flags_extra, ScriptName "
+ // 62 63 64 65 66 67 68 69
+ "InhabitType, HoverHeight, HealthModifier, ManaModifier, ArmorModifier, DamageModifier, ExperienceModifier, RacialLeader, "
+ // 70 71 72 73 74 75 76 77 78 79 80
+ "questItem1, questItem2, questItem3, questItem4, questItem5, questItem6, movementId, RegenHealth, mechanic_immune_mask, flags_extra, ScriptName "
"FROM creature_template;");
if (!result)
@@ -422,90 +422,7 @@ void ObjectMgr::LoadCreatureTemplates()
do
{
Field* fields = result->Fetch();
-
- uint32 entry = fields[0].GetUInt32();
-
-
- CreatureTemplate& creatureTemplate = _creatureTemplateStore[entry];
-
- creatureTemplate.Entry = entry;
-
- for (uint8 i = 0; i < MAX_DIFFICULTY - 1; ++i)
- creatureTemplate.DifficultyEntry[i] = fields[1 + i].GetUInt32();
-
- for (uint8 i = 0; i < MAX_KILL_CREDIT; ++i)
- creatureTemplate.KillCredit[i] = fields[4 + i].GetUInt32();
-
- creatureTemplate.Modelid1 = fields[6].GetUInt32();
- creatureTemplate.Modelid2 = fields[7].GetUInt32();
- creatureTemplate.Modelid3 = fields[8].GetUInt32();
- creatureTemplate.Modelid4 = fields[9].GetUInt32();
- creatureTemplate.Name = fields[10].GetString();
- creatureTemplate.SubName = fields[11].GetString();
- creatureTemplate.IconName = fields[12].GetString();
- creatureTemplate.GossipMenuId = fields[13].GetUInt32();
- creatureTemplate.minlevel = fields[14].GetUInt8();
- creatureTemplate.maxlevel = fields[15].GetUInt8();
- creatureTemplate.expansion = uint32(fields[16].GetInt16());
- creatureTemplate.faction = uint32(fields[17].GetUInt16());
- creatureTemplate.npcflag = fields[18].GetUInt32();
- creatureTemplate.speed_walk = fields[19].GetFloat();
- creatureTemplate.speed_run = fields[20].GetFloat();
- creatureTemplate.scale = fields[21].GetFloat();
- creatureTemplate.rank = uint32(fields[22].GetUInt8());
- creatureTemplate.mindmg = fields[23].GetFloat();
- creatureTemplate.maxdmg = fields[24].GetFloat();
- creatureTemplate.dmgschool = uint32(fields[25].GetInt8());
- creatureTemplate.attackpower = fields[26].GetUInt32();
- creatureTemplate.dmg_multiplier = fields[27].GetFloat();
- creatureTemplate.baseattacktime = fields[28].GetUInt32();
- creatureTemplate.rangeattacktime = fields[29].GetUInt32();
- creatureTemplate.unit_class = uint32(fields[30].GetUInt8());
- creatureTemplate.unit_flags = fields[31].GetUInt32();
- creatureTemplate.unit_flags2 = fields[32].GetUInt32();
- creatureTemplate.dynamicflags = fields[33].GetUInt32();
- creatureTemplate.family = uint32(fields[34].GetUInt8());
- creatureTemplate.trainer_type = uint32(fields[35].GetUInt8());
- creatureTemplate.trainer_spell = fields[36].GetUInt32();
- creatureTemplate.trainer_class = uint32(fields[37].GetUInt8());
- creatureTemplate.trainer_race = uint32(fields[38].GetUInt8());
- creatureTemplate.minrangedmg = fields[39].GetFloat();
- creatureTemplate.maxrangedmg = fields[40].GetFloat();
- creatureTemplate.rangedattackpower = uint32(fields[41].GetUInt16());
- creatureTemplate.type = uint32(fields[42].GetUInt8());
- creatureTemplate.type_flags = fields[43].GetUInt32();
- creatureTemplate.lootid = fields[44].GetUInt32();
- creatureTemplate.pickpocketLootId = fields[45].GetUInt32();
- creatureTemplate.SkinLootId = fields[46].GetUInt32();
-
- for (uint8 i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
- creatureTemplate.resistance[i] = fields[47 + i -1].GetInt16();
-
- for (uint8 i = 0; i < CREATURE_MAX_SPELLS; ++i)
- creatureTemplate.spells[i] = fields[53 + i].GetUInt32();
-
- creatureTemplate.PetSpellDataId = fields[61].GetUInt32();
- creatureTemplate.VehicleId = fields[62].GetUInt32();
- creatureTemplate.mingold = fields[63].GetUInt32();
- creatureTemplate.maxgold = fields[64].GetUInt32();
- creatureTemplate.AIName = fields[65].GetString();
- creatureTemplate.MovementType = uint32(fields[66].GetUInt8());
- creatureTemplate.InhabitType = uint32(fields[67].GetUInt8());
- creatureTemplate.HoverHeight = fields[68].GetFloat();
- creatureTemplate.ModHealth = fields[69].GetFloat();
- creatureTemplate.ModMana = fields[70].GetFloat();
- creatureTemplate.ModArmor = fields[71].GetFloat();
- creatureTemplate.RacialLeader = fields[72].GetBool();
-
- for (uint8 i = 0; i < MAX_CREATURE_QUEST_ITEMS; ++i)
- creatureTemplate.questItems[i] = fields[73 + i].GetUInt32();
-
- creatureTemplate.movementId = fields[79].GetUInt32();
- creatureTemplate.RegenHealth = fields[80].GetBool();
- creatureTemplate.MechanicImmuneMask = fields[81].GetUInt32();
- creatureTemplate.flags_extra = fields[82].GetUInt32();
- creatureTemplate.ScriptID = GetScriptId(fields[83].GetCString());
-
+ LoadCreatureTemplate(fields);
++count;
}
while (result->NextRow());
@@ -517,6 +434,88 @@ void ObjectMgr::LoadCreatureTemplates()
TC_LOG_INFO("server.loading", ">> Loaded %u creature definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
+void ObjectMgr::LoadCreatureTemplate(Field* fields)
+{
+ uint32 entry = fields[0].GetUInt32();
+
+ CreatureTemplate& creatureTemplate = _creatureTemplateStore[entry];
+
+ creatureTemplate.Entry = entry;
+
+ for (uint8 i = 0; i < MAX_DIFFICULTY - 1; ++i)
+ creatureTemplate.DifficultyEntry[i] = fields[1 + i].GetUInt32();
+
+ for (uint8 i = 0; i < MAX_KILL_CREDIT; ++i)
+ creatureTemplate.KillCredit[i] = fields[4 + i].GetUInt32();
+
+ creatureTemplate.Modelid1 = fields[6].GetUInt32();
+ creatureTemplate.Modelid2 = fields[7].GetUInt32();
+ creatureTemplate.Modelid3 = fields[8].GetUInt32();
+ creatureTemplate.Modelid4 = fields[9].GetUInt32();
+ creatureTemplate.Name = fields[10].GetString();
+ creatureTemplate.SubName = fields[11].GetString();
+ creatureTemplate.IconName = fields[12].GetString();
+ creatureTemplate.GossipMenuId = fields[13].GetUInt32();
+ creatureTemplate.minlevel = fields[14].GetUInt8();
+ creatureTemplate.maxlevel = fields[15].GetUInt8();
+ creatureTemplate.expansion = uint32(fields[16].GetInt16());
+ creatureTemplate.faction = fields[17].GetUInt16();
+ creatureTemplate.npcflag = fields[18].GetUInt32();
+ creatureTemplate.speed_walk = fields[19].GetFloat();
+ creatureTemplate.speed_run = fields[20].GetFloat();
+ creatureTemplate.scale = fields[21].GetFloat();
+ creatureTemplate.rank = fields[22].GetUInt8();
+ creatureTemplate.dmgschool = uint32(fields[23].GetInt8());
+ creatureTemplate.BaseAttackTime = fields[24].GetUInt32();
+ creatureTemplate.RangeAttackTime = fields[25].GetUInt32();
+ creatureTemplate.BaseVariance = fields[26].GetFloat();
+ creatureTemplate.RangeVariance = fields[27].GetFloat();
+ creatureTemplate.unit_class = fields[28].GetUInt8();
+ creatureTemplate.unit_flags = fields[29].GetUInt32();
+ creatureTemplate.unit_flags2 = fields[30].GetUInt32();
+ creatureTemplate.dynamicflags = fields[31].GetUInt32();
+ creatureTemplate.family = fields[32].GetUInt8();
+ creatureTemplate.trainer_type = fields[33].GetUInt8();
+ creatureTemplate.trainer_spell = fields[34].GetUInt32();
+ creatureTemplate.trainer_class = fields[35].GetUInt8();
+ creatureTemplate.trainer_race = fields[36].GetUInt8();
+ creatureTemplate.type = fields[37].GetUInt8();
+ creatureTemplate.type_flags = fields[38].GetUInt32();
+ creatureTemplate.lootid = fields[39].GetUInt32();
+ creatureTemplate.pickpocketLootId = fields[40].GetUInt32();
+ creatureTemplate.SkinLootId = fields[41].GetUInt32();
+
+ for (uint8 i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
+ creatureTemplate.resistance[i] = fields[42 + i - 1].GetInt16();
+
+ for (uint8 i = 0; i < CREATURE_MAX_SPELLS; ++i)
+ creatureTemplate.spells[i] = fields[48 + i].GetUInt32();
+
+ creatureTemplate.PetSpellDataId = fields[56].GetUInt32();
+ creatureTemplate.VehicleId = fields[57].GetUInt32();
+ creatureTemplate.mingold = fields[58].GetUInt32();
+ creatureTemplate.maxgold = fields[59].GetUInt32();
+ creatureTemplate.AIName = fields[60].GetString();
+ creatureTemplate.MovementType = fields[61].GetUInt8();
+ creatureTemplate.InhabitType = fields[62].GetUInt8();
+ creatureTemplate.HoverHeight = fields[63].GetFloat();
+ creatureTemplate.ModHealth = fields[64].GetFloat();
+ creatureTemplate.ModMana = fields[65].GetFloat();
+ creatureTemplate.ModArmor = fields[66].GetFloat();
+ creatureTemplate.ModDamage = fields[67].GetFloat();
+ creatureTemplate.ModExperience = fields[68].GetFloat();
+ creatureTemplate.RacialLeader = fields[69].GetBool();
+
+ for (uint8 i = 0; i < MAX_CREATURE_QUEST_ITEMS; ++i)
+ creatureTemplate.questItems[i] = fields[70 + i].GetUInt32();
+
+ creatureTemplate.movementId = fields[76].GetUInt32();
+ creatureTemplate.RegenHealth = fields[77].GetBool();
+ creatureTemplate.MechanicImmuneMask = fields[78].GetUInt32();
+ creatureTemplate.flags_extra = fields[79].GetUInt32();
+ creatureTemplate.ScriptID = GetScriptId(fields[80].GetCString());
+}
+
void ObjectMgr::LoadCreatureTemplateAddons()
{
uint32 oldMSTime = getMSTime();
@@ -856,11 +855,11 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
const_cast<CreatureTemplate*>(cInfo)->dmgschool = SPELL_SCHOOL_NORMAL;
}
- if (cInfo->baseattacktime == 0)
- const_cast<CreatureTemplate*>(cInfo)->baseattacktime = BASE_ATTACK_TIME;
+ if (cInfo->BaseAttackTime == 0)
+ const_cast<CreatureTemplate*>(cInfo)->BaseAttackTime = BASE_ATTACK_TIME;
- if (cInfo->rangeattacktime == 0)
- const_cast<CreatureTemplate*>(cInfo)->rangeattacktime = BASE_ATTACK_TIME;
+ if (cInfo->RangeAttackTime == 0)
+ const_cast<CreatureTemplate*>(cInfo)->RangeAttackTime = BASE_ATTACK_TIME;
if ((cInfo->npcflag & UNIT_NPC_FLAG_TRAINER) && cInfo->trainer_type >= MAX_TRAINER_TYPE)
TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has wrong trainer type %u.", cInfo->Entry, cInfo->trainer_type);
@@ -955,7 +954,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
const_cast<CreatureTemplate*>(cInfo)->flags_extra &= CREATURE_FLAG_EXTRA_DB_ALLOWED;
}
- const_cast<CreatureTemplate*>(cInfo)->dmg_multiplier *= Creature::_GetDamageMod(cInfo->rank);
+ const_cast<CreatureTemplate*>(cInfo)->ModDamage *= Creature::_GetDamageMod(cInfo->rank);
}
void ObjectMgr::LoadCreatureAddons()
@@ -2199,7 +2198,7 @@ void ObjectMgr::LoadItemLocales()
ItemLocale& data = _itemLocaleStore[entry];
- for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
+ for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
{
LocaleConstant locale = (LocaleConstant) i;
AddLocaleString(fields[1 + 2 * (i - 1)].GetString(), locale, data.Name);
@@ -2207,7 +2206,7 @@ void ObjectMgr::LoadItemLocales()
}
} while (result->NextRow());
- TC_LOG_INFO("server.loading", ">> Loaded %lu Item locale strings in %u ms", (unsigned long)_itemLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u Item locale strings in %u ms", uint32(_itemLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadItemTemplates()
@@ -2841,7 +2840,7 @@ void ObjectMgr::LoadItemSetNameLocales()
ItemSetNameLocale& data = _itemSetNameLocaleStore[entry];
- for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
+ for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.Name);
} while (result->NextRow());
@@ -4523,7 +4522,7 @@ void ObjectMgr::LoadQuestLocales()
QuestLocale& data = _questLocaleStore[entry];
- for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
+ for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
{
LocaleConstant locale = (LocaleConstant) i;
@@ -4540,7 +4539,7 @@ void ObjectMgr::LoadQuestLocales()
}
} while (result->NextRow());
- TC_LOG_INFO("server.loading", ">> Loaded %lu Quest locale strings in %u ms", (unsigned long)_questLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u Quest locale strings in %u ms", uint32(_questLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadScripts(ScriptsType type)
@@ -5152,11 +5151,11 @@ void ObjectMgr::LoadPageTextLocales()
PageTextLocale& data = _pageTextLocaleStore[entry];
- for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
+ for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.Text);
} while (result->NextRow());
- TC_LOG_INFO("server.loading", ">> Loaded %lu PageText locale strings in %u ms", (unsigned long)_pageTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u PageText locale strings in %u ms", uint32(_pageTextLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadInstanceTemplate()
@@ -5400,10 +5399,10 @@ void ObjectMgr::LoadNpcTextLocales()
NpcTextLocale& data = _npcTextLocaleStore[entry];
- for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
+ for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
{
LocaleConstant locale = (LocaleConstant) i;
- for (uint8 j = 0; j < MAX_LOCALES; ++j)
+ for (uint8 j = 0; j < MAX_GOSSIP_TEXT_OPTIONS; ++j)
{
AddLocaleString(fields[1 + 8 * 2 * (i - 1) + 2 * j].GetString(), locale, data.Text_0[j]);
AddLocaleString(fields[1 + 8 * 2 * (i - 1) + 2 * j + 1].GetString(), locale, data.Text_1[j]);
@@ -5411,7 +5410,7 @@ void ObjectMgr::LoadNpcTextLocales()
}
} while (result->NextRow());
- TC_LOG_INFO("server.loading", ">> Loaded %lu NpcText locale strings in %u ms", (unsigned long)_npcTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u NpcText locale strings in %u ms", uint32(_npcTextLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime));
}
//not very fast function but it is called only once a day, or on starting-up
@@ -6435,14 +6434,14 @@ void ObjectMgr::LoadGameObjectLocales()
GameObjectLocale& data = _gameObjectLocaleStore[entry];
- for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
+ for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
+ {
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.Name);
-
- for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
AddLocaleString(fields[i + (TOTAL_LOCALES - 1)].GetString(), LocaleConstant(i), data.CastBarCaption);
+ }
} while (result->NextRow());
- TC_LOG_INFO("server.loading", ">> Loaded %lu gameobject locale strings in %u ms", (unsigned long)_gameObjectLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u gameobject locale strings in %u ms", uint32(_gameObjectLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime));
}
inline void CheckGOLockId(GameObjectTemplate const* goInfo, uint32 dataN, uint32 N)
@@ -7758,7 +7757,7 @@ bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max
data.Content.resize(1);
++count;
- for (uint8 i = 0; i < TOTAL_LOCALES; ++i)
+ for (int8 i = TOTAL_LOCALES - 1; i >= 0; --i)
AddLocaleString(fields[i + 1].GetString(), LocaleConstant(i), data.Content);
} while (result->NextRow());
@@ -8780,11 +8779,11 @@ void ObjectMgr::LoadBroadcastTextLocales()
continue;
}
- for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
+ for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
{
LocaleConstant locale = LocaleConstant(i);
- ObjectMgr::AddLocaleString(fields[1 + (i - 1)].GetString(), locale, bct->second.MaleText);
- ObjectMgr::AddLocaleString(fields[9 + (i - 1)].GetString(), locale, bct->second.FemaleText);
+ AddLocaleString(fields[1 + (i - 1)].GetString(), locale, bct->second.MaleText);
+ AddLocaleString(fields[9 + (i - 1)].GetString(), locale, bct->second.FemaleText);
}
++count;
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index 738b99778f8..56ae4a4c6d1 100644
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -961,6 +961,7 @@ class ObjectMgr
void LoadCreatureLocales();
void LoadCreatureTemplates();
void LoadCreatureTemplateAddons();
+ void LoadCreatureTemplate(Field* fields);
void CheckCreatureTemplate(CreatureTemplate const* cInfo);
void LoadTempSummons();
void LoadCreatures();
diff --git a/src/server/game/Grids/GridStates.h b/src/server/game/Grids/GridStates.h
index af11ab08d5e..330b74ec65e 100644
--- a/src/server/game/Grids/GridStates.h
+++ b/src/server/game/Grids/GridStates.h
@@ -34,24 +34,24 @@ class GridState
class InvalidState : public GridState
{
public:
- void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const;
+ void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override;
};
class ActiveState : public GridState
{
public:
- void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const;
+ void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override;
};
class IdleState : public GridState
{
public:
- void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const;
+ void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override;
};
class RemovalState : public GridState
{
public:
- void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const;
+ void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override;
};
#endif
diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h
index f0061a70621..08f91ca816a 100644
--- a/src/server/game/Groups/Group.h
+++ b/src/server/game/Groups/Group.h
@@ -129,7 +129,7 @@ class Roll : public LootValidatorRef
~Roll();
void setLoot(Loot* pLoot);
Loot* getLoot();
- void targetObjectBuildLink();
+ void targetObjectBuildLink() override;
uint64 itemGUID;
uint32 itemid;
diff --git a/src/server/game/Groups/GroupReference.h b/src/server/game/Groups/GroupReference.h
index df5683b3edf..dc8480e9463 100644
--- a/src/server/game/Groups/GroupReference.h
+++ b/src/server/game/Groups/GroupReference.h
@@ -28,9 +28,9 @@ class GroupReference : public Reference<Group, Player>
{
protected:
uint8 iSubGroup;
- void targetObjectBuildLink();
- void targetObjectDestroyLink();
- void sourceObjectDestroyLink();
+ void targetObjectBuildLink() override;
+ void targetObjectDestroyLink() override;
+ void sourceObjectDestroyLink() override;
public:
GroupReference() : Reference<Group, Player>(), iSubGroup(0) { }
~GroupReference() { unlink(); }
diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h
index ea0b2e44c53..8c7b926a700 100644
--- a/src/server/game/Guilds/Guild.h
+++ b/src/server/game/Guilds/Guild.h
@@ -394,8 +394,8 @@ private:
~EventLogEntry() { }
- void SaveToDB(SQLTransaction& trans) const;
- void WritePacket(WorldPacket& data) const;
+ void SaveToDB(SQLTransaction& trans) const override;
+ void WritePacket(WorldPacket& data) const override;
private:
GuildEventLogTypes m_eventType;
@@ -426,8 +426,8 @@ private:
~BankEventLogEntry() { }
- void SaveToDB(SQLTransaction& trans) const;
- void WritePacket(WorldPacket& data) const;
+ void SaveToDB(SQLTransaction& trans) const override;
+ void WritePacket(WorldPacket& data) const override;
private:
GuildBankEventLogTypes m_eventType;
@@ -604,13 +604,13 @@ private:
PlayerMoveItemData(Guild* guild, Player* player, uint8 container, uint8 slotId) :
MoveItemData(guild, player, container, slotId) { }
- bool IsBank() const { return false; }
- bool InitItem();
- void RemoveItem(SQLTransaction& trans, MoveItemData* pOther, uint32 splitedAmount = 0);
- Item* StoreItem(SQLTransaction& trans, Item* pItem);
- void LogBankEvent(SQLTransaction& trans, MoveItemData* pFrom, uint32 count) const;
+ bool IsBank() const override { return false; }
+ bool InitItem() override;
+ void RemoveItem(SQLTransaction& trans, MoveItemData* pOther, uint32 splitedAmount = 0) override;
+ Item* StoreItem(SQLTransaction& trans, Item* pItem) override;
+ void LogBankEvent(SQLTransaction& trans, MoveItemData* pFrom, uint32 count) const override;
protected:
- InventoryResult CanStore(Item* pItem, bool swap);
+ InventoryResult CanStore(Item* pItem, bool swap) override;
};
class BankMoveItemData : public MoveItemData
@@ -619,17 +619,17 @@ private:
BankMoveItemData(Guild* guild, Player* player, uint8 container, uint8 slotId) :
MoveItemData(guild, player, container, slotId) { }
- bool IsBank() const { return true; }
- bool InitItem();
- bool HasStoreRights(MoveItemData* pOther) const;
- bool HasWithdrawRights(MoveItemData* pOther) const;
- void RemoveItem(SQLTransaction& trans, MoveItemData* pOther, uint32 splitedAmount);
- Item* StoreItem(SQLTransaction& trans, Item* pItem);
- void LogBankEvent(SQLTransaction& trans, MoveItemData* pFrom, uint32 count) const;
- void LogAction(MoveItemData* pFrom) const;
+ bool IsBank() const override { return true; }
+ bool InitItem() override;
+ bool HasStoreRights(MoveItemData* pOther) const override;
+ bool HasWithdrawRights(MoveItemData* pOther) const override;
+ void RemoveItem(SQLTransaction& trans, MoveItemData* pOther, uint32 splitedAmount) override;
+ Item* StoreItem(SQLTransaction& trans, Item* pItem) override;
+ void LogBankEvent(SQLTransaction& trans, MoveItemData* pFrom, uint32 count) const override;
+ void LogAction(MoveItemData* pFrom) const override;
protected:
- InventoryResult CanStore(Item* pItem, bool swap);
+ InventoryResult CanStore(Item* pItem, bool swap) override;
private:
Item* _StoreItem(SQLTransaction& trans, BankTab* pTab, Item* pItem, ItemPosCount& pos, bool clone) const;
diff --git a/src/server/game/Handlers/ArenaTeamHandler.cpp b/src/server/game/Handlers/ArenaTeamHandler.cpp
index 3bb3edac500..20d89d9efb5 100644
--- a/src/server/game/Handlers/ArenaTeamHandler.cpp
+++ b/src/server/game/Handlers/ArenaTeamHandler.cpp
@@ -311,6 +311,10 @@ void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket& recvData)
SendArenaTeamCommandResult(ERR_ARENA_TEAM_QUIT_S, "", "", ERR_ARENA_TEAM_LEADER_LEAVE_S);
return;
}
+
+ // Player cannot be removed during fights
+ if (arenaTeam->IsFighting())
+ return;
arenaTeam->DelMember(member->Guid, true);
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index 4d52eab61d6..b2507877111 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -978,8 +978,8 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
{
// not blizz like, we must correctly save and load player instead...
if (pCurrChar->getRace() == RACE_NIGHTELF)
- pCurrChar->CastSpell(pCurrChar, 20584, true, 0);// auras SPELL_AURA_INCREASE_SPEED(+speed in wisp form), SPELL_AURA_INCREASE_SWIM_SPEED(+swim speed in wisp form), SPELL_AURA_TRANSFORM (to wisp form)
- pCurrChar->CastSpell(pCurrChar, 8326, true, 0); // auras SPELL_AURA_GHOST, SPELL_AURA_INCREASE_SPEED(why?), SPELL_AURA_INCREASE_SWIM_SPEED(why?)
+ pCurrChar->CastSpell(pCurrChar, 20584, true, nullptr);// auras SPELL_AURA_INCREASE_SPEED(+speed in wisp form), SPELL_AURA_INCREASE_SWIM_SPEED(+swim speed in wisp form), SPELL_AURA_TRANSFORM (to wisp form)
+ pCurrChar->CastSpell(pCurrChar, 8326, true, nullptr); // auras SPELL_AURA_GHOST, SPELL_AURA_INCREASE_SPEED(why?), SPELL_AURA_INCREASE_SWIM_SPEED(why?)
pCurrChar->SetMovement(MOVE_WATER_WALK);
}
diff --git a/src/server/game/Handlers/NPCHandler.h b/src/server/game/Handlers/NPCHandler.h
index 7210d9a53b5..855536c7d9e 100644
--- a/src/server/game/Handlers/NPCHandler.h
+++ b/src/server/game/Handlers/NPCHandler.h
@@ -51,10 +51,10 @@ struct PageTextLocale
struct NpcTextLocale
{
- NpcTextLocale() { Text_0.resize(8); Text_1.resize(8); }
+ NpcTextLocale() { }
- std::vector<StringVector> Text_0;
- std::vector<StringVector> Text_1;
+ StringVector Text_0[MAX_GOSSIP_TEXT_OPTIONS];
+ StringVector Text_1[MAX_GOSSIP_TEXT_OPTIONS];
};
#endif
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp
index ba30803e8c2..13f79fb88c5 100644
--- a/src/server/game/Handlers/SpellHandler.cpp
+++ b/src/server/game/Handlers/SpellHandler.cpp
@@ -533,7 +533,7 @@ void WorldSession::HandleSelfResOpcode(WorldPacket & /*recvData*/)
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(_player->GetUInt32Value(PLAYER_SELF_RES_SPELL));
if (spellInfo)
- _player->CastSpell(_player, spellInfo, false, 0);
+ _player->CastSpell(_player, spellInfo, false, nullptr);
_player->SetUInt32Value(PLAYER_SELF_RES_SPELL, 0);
}
diff --git a/src/server/game/Loot/LootMgr.h b/src/server/game/Loot/LootMgr.h
index 7dc89935a69..09809d50b10 100644
--- a/src/server/game/Loot/LootMgr.h
+++ b/src/server/game/Loot/LootMgr.h
@@ -280,8 +280,8 @@ class LootValidatorRef : public Reference<Loot, LootValidatorRef>
{
public:
LootValidatorRef() { }
- void targetObjectDestroyLink() { }
- void sourceObjectDestroyLink() { }
+ void targetObjectDestroyLink() override { }
+ void sourceObjectDestroyLink() override { }
};
//=====================================================
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index b0164b77f1c..47cb7504fb8 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -2216,7 +2216,7 @@ bool Map::IsOutdoors(float x, float y, float z) const
if (!GetAreaInfo(x, y, z, mogpFlags, adtId, rootId, groupId))
return true;
- AreaTableEntry const* atEntry = 0;
+ AreaTableEntry const* atEntry = nullptr;
WMOAreaTableEntry const* wmoEntry= GetWMOAreaTableEntryByTripple(rootId, adtId, groupId);
if (wmoEntry)
{
@@ -2249,8 +2249,8 @@ uint16 Map::GetAreaFlag(float x, float y, float z, bool *isOutdoors) const
{
uint32 mogpFlags;
int32 adtId, rootId, groupId;
- WMOAreaTableEntry const* wmoEntry = 0;
- AreaTableEntry const* atEntry = 0;
+ WMOAreaTableEntry const* wmoEntry = nullptr;
+ AreaTableEntry const* atEntry = nullptr;
bool haveAreaInfo = false;
if (GetAreaInfo(x, y, z, mogpFlags, adtId, rootId, groupId))
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index 70198cb20a3..fd9ec281709 100644
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -334,16 +334,16 @@ class Map : public GridRefManager<NGridType>
// can return INVALID_HEIGHT if under z+2 z coord not found height
float GetHeight(float x, float y, float z, bool checkVMap = true, float maxSearchDist = DEFAULT_HEIGHT_SEARCH) const;
- ZLiquidStatus getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData* data = 0) const;
+ ZLiquidStatus getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData* data = nullptr) const;
- uint16 GetAreaFlag(float x, float y, float z, bool *isOutdoors=0) const;
+ uint16 GetAreaFlag(float x, float y, float z, bool *isOutdoors=nullptr) const;
bool GetAreaInfo(float x, float y, float z, uint32 &mogpflags, int32 &adtId, int32 &rootId, int32 &groupId) const;
bool IsOutdoors(float x, float y, float z) const;
uint8 GetTerrainType(float x, float y) const;
float GetWaterLevel(float x, float y) const;
- bool IsInWater(float x, float y, float z, LiquidData* data = 0) const;
+ bool IsInWater(float x, float y, float z, LiquidData* data = nullptr) const;
bool IsUnderWater(float x, float y, float z) const;
static uint32 GetAreaIdByAreaFlag(uint16 areaflag, uint32 map_id);
@@ -678,23 +678,23 @@ class InstanceMap : public Map
public:
InstanceMap(uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode, Map* _parent);
~InstanceMap();
- bool AddPlayerToMap(Player*);
- void RemovePlayerFromMap(Player*, bool);
- void Update(const uint32);
+ bool AddPlayerToMap(Player*) override;
+ void RemovePlayerFromMap(Player*, bool) override;
+ void Update(const uint32) override;
void CreateInstanceData(bool load);
bool Reset(uint8 method);
uint32 GetScriptId() { return i_script_id; }
InstanceScript* GetInstanceScript() { return i_data; }
void PermBindAllPlayers(Player* source);
- void UnloadAll();
- bool CanEnter(Player* player);
+ void UnloadAll() override;
+ bool CanEnter(Player* player) override;
void SendResetWarnings(uint32 timeLeft) const;
void SetResetSchedule(bool on);
uint32 GetMaxPlayers() const;
uint32 GetMaxResetDelay() const;
- virtual void InitVisibilityDistance();
+ virtual void InitVisibilityDistance() override;
private:
bool m_resetAfterUnload;
bool m_unloadWhenEmpty;
@@ -708,14 +708,14 @@ class BattlegroundMap : public Map
BattlegroundMap(uint32 id, time_t, uint32 InstanceId, Map* _parent, uint8 spawnMode);
~BattlegroundMap();
- bool AddPlayerToMap(Player*);
- void RemovePlayerFromMap(Player*, bool);
- bool CanEnter(Player* player);
+ bool AddPlayerToMap(Player*) override;
+ void RemovePlayerFromMap(Player*, bool) override;
+ bool CanEnter(Player* player) override;
void SetUnload();
//void UnloadAll(bool pForce);
- void RemoveAllPlayers();
+ void RemoveAllPlayers() override;
- virtual void InitVisibilityDistance();
+ virtual void InitVisibilityDistance() override;
Battleground* GetBG() { return m_bg; }
void SetBG(Battleground* bg) { m_bg = bg; }
private:
diff --git a/src/server/game/Maps/MapInstanced.h b/src/server/game/Maps/MapInstanced.h
index 30aec43cc21..614764dbba3 100644
--- a/src/server/game/Maps/MapInstanced.h
+++ b/src/server/game/Maps/MapInstanced.h
@@ -33,11 +33,11 @@ class MapInstanced : public Map
~MapInstanced() { }
// functions overwrite Map versions
- void Update(const uint32);
- void DelayedUpdate(const uint32 diff);
+ void Update(const uint32) override;
+ void DelayedUpdate(const uint32 diff) override;
//void RelocationNotify();
- void UnloadAll();
- bool CanEnter(Player* player);
+ void UnloadAll() override;
+ bool CanEnter(Player* player) override;
Map* CreateInstanceForPlayer(const uint32 mapId, Player* player);
Map* FindInstanceMap(uint32 instanceId) const
@@ -61,7 +61,7 @@ class MapInstanced : public Map
}
InstancedMaps &GetInstancedMaps() { return m_InstancedMaps; }
- virtual void InitVisibilityDistance();
+ virtual void InitVisibilityDistance() override;
private:
InstanceMap* CreateInstance(uint32 InstanceId, InstanceSave* save, Difficulty difficulty);
diff --git a/src/server/game/Maps/MapReference.h b/src/server/game/Maps/MapReference.h
index fe5ceb714c5..2742902d558 100644
--- a/src/server/game/Maps/MapReference.h
+++ b/src/server/game/Maps/MapReference.h
@@ -25,18 +25,18 @@
class MapReference : public Reference<Map, Player>
{
protected:
- void targetObjectBuildLink()
+ void targetObjectBuildLink() override
{
// called from link()
getTarget()->m_mapRefManager.insertFirst(this);
getTarget()->m_mapRefManager.incSize();
}
- void targetObjectDestroyLink()
+ void targetObjectDestroyLink() override
{
// called from unlink()
if (isValid()) getTarget()->m_mapRefManager.decSize();
}
- void sourceObjectDestroyLink()
+ void sourceObjectDestroyLink() override
{
// called from invalidate()
getTarget()->m_mapRefManager.decSize();
diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h
index 8d0e97dc765..e6ff1a0b40f 100644
--- a/src/server/game/Miscellaneous/Formulas.h
+++ b/src/server/game/Miscellaneous/Formulas.h
@@ -160,27 +160,32 @@ namespace Trinity
inline uint32 Gain(Player* player, Unit* u)
{
- uint32 gain;
+ Creature* creature = u->ToCreature();
+ uint32 gain = 0;
- if (u->GetTypeId() == TYPEID_UNIT &&
- (((Creature*)u)->IsTotem() || ((Creature*)u)->IsPet() ||
- (((Creature*)u)->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_XP_AT_KILL) ||
- ((Creature*)u)->GetCreatureTemplate()->type == CREATURE_TYPE_CRITTER))
- gain = 0;
- else
+ if (!creature || (!creature->IsTotem() && !creature->IsPet() && !creature->IsCritter() &&
+ !(creature->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_XP_AT_KILL)))
{
+ float xpMod = 1.0f;
+
gain = BaseGain(player->getLevel(), u->getLevel(), GetContentLevelsForMapAndZone(u->GetMapId(), u->GetZoneId()));
- if (gain != 0 && u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->isElite())
+ if (gain && creature)
{
- // Elites in instances have a 2.75x XP bonus instead of the regular 2x world bonus.
- if (u->GetMap() && u->GetMap()->IsDungeon())
- gain = uint32(gain * 2.75);
- else
- gain *= 2;
+ if (creature->isElite())
+ {
+ // Elites in instances have a 2.75x XP bonus instead of the regular 2x world bonus.
+ if (u->GetMap() && u->GetMap()->IsDungeon())
+ xpMod *= 2.75f;
+ else
+ xpMod *= 2.0f;
+ }
+
+ xpMod *= creature->GetCreatureTemplate()->ModExperience;
}
- gain = uint32(gain * sWorld->getRate(RATE_XP_KILL));
+ xpMod *= sWorld->getRate(RATE_XP_KILL);
+ gain = uint32(gain * xpMod);
}
sScriptMgr->OnGainCalculation(gain, player, u);
diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
index ed3bb74ae9d..5309229b0fc 100644
--- a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -529,7 +529,7 @@ enum SpellAttr6
enum SpellAttr7
{
SPELL_ATTR7_UNK0 = 0x00000001, // 0 Shaman's new spells (Call of the ...), Feign Death.
- SPELL_ATTR7_UNK1 = 0x00000002, // 1 Not set in 3.2.2a.
+ SPELL_ATTR7_IGNORE_DURATION_MODS = 0x00000002, // 1 Duration is not affected by duration modifiers
SPELL_ATTR7_REACTIVATE_AT_RESURRECT = 0x00000004, // 2 Paladin's auras and 65607 only.
SPELL_ATTR7_IS_CHEAT_SPELL = 0x00000008, // 3 Cannot cast if caster doesn't have UnitFlag2 & UNIT_FLAG2_ALLOW_CHEAT_SPELLS
SPELL_ATTR7_UNK4 = 0x00000010, // 4 Only 47883 (Soulstone Resurrection) and test spell.
diff --git a/src/server/game/Movement/FollowerReference.h b/src/server/game/Movement/FollowerReference.h
index a97104ce72c..ee6901dc2d7 100644
--- a/src/server/game/Movement/FollowerReference.h
+++ b/src/server/game/Movement/FollowerReference.h
@@ -27,8 +27,8 @@ class Unit;
class FollowerReference : public Reference<Unit, TargetedMovementGeneratorBase>
{
protected:
- void targetObjectBuildLink();
- void targetObjectDestroyLink();
- void sourceObjectDestroyLink();
+ void targetObjectBuildLink() override;
+ void targetObjectDestroyLink() override;
+ void sourceObjectDestroyLink() override;
};
#endif
diff --git a/src/server/game/Movement/MovementGenerator.h b/src/server/game/Movement/MovementGenerator.h
index 12116b5505d..d87344ba089 100755
--- a/src/server/game/Movement/MovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerator.h
@@ -51,25 +51,25 @@ template<class T, class D>
class MovementGeneratorMedium : public MovementGenerator
{
public:
- void Initialize(Unit* u)
+ void Initialize(Unit* u) override
{
//u->AssertIsType<T>();
(static_cast<D*>(this))->DoInitialize(static_cast<T*>(u));
}
- void Finalize(Unit* u)
+ void Finalize(Unit* u) override
{
//u->AssertIsType<T>();
(static_cast<D*>(this))->DoFinalize(static_cast<T*>(u));
}
- void Reset(Unit* u)
+ void Reset(Unit* u) override
{
//u->AssertIsType<T>();
(static_cast<D*>(this))->DoReset(static_cast<T*>(u));
}
- bool Update(Unit* u, uint32 time_diff)
+ bool Update(Unit* u, uint32 time_diff) override
{
//u->AssertIsType<T>();
return (static_cast<D*>(this))->DoUpdate(static_cast<T*>(u), time_diff);
@@ -86,7 +86,7 @@ struct MovementGeneratorFactory : public SelectableMovement
{
MovementGeneratorFactory(MovementGeneratorType mgt) : SelectableMovement(mgt) { }
- MovementGenerator* Create(void *) const;
+ MovementGenerator* Create(void *) const override;
};
typedef FactoryHolder<MovementGenerator, MovementGeneratorType> MovementGeneratorCreator;
diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h
index ba8e228873f..c3bcfffb2a7 100755
--- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h
@@ -49,9 +49,9 @@ class TimedFleeingMovementGenerator : public FleeingMovementGenerator<Creature>
FleeingMovementGenerator<Creature>(fright),
i_totalFleeTime(time) { }
- MovementGeneratorType GetMovementGeneratorType() { return TIMED_FLEEING_MOTION_TYPE; }
- bool Update(Unit*, uint32);
- void Finalize(Unit*);
+ MovementGeneratorType GetMovementGeneratorType() override { return TIMED_FLEEING_MOTION_TYPE; }
+ bool Update(Unit*, uint32) override;
+ void Finalize(Unit*) override;
private:
TimeTracker i_totalFleeTime;
diff --git a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h
index abe97e21536..8e0b0e335c4 100644
--- a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h
@@ -38,7 +38,7 @@ class HomeMovementGenerator<Creature> : public MovementGeneratorMedium< Creature
void DoFinalize(Creature*);
void DoReset(Creature*);
bool DoUpdate(Creature*, const uint32);
- MovementGeneratorType GetMovementGeneratorType() { return HOME_MOTION_TYPE; }
+ MovementGeneratorType GetMovementGeneratorType() override { return HOME_MOTION_TYPE; }
private:
void _setTargetLocation(Creature*);
diff --git a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h
index bdf9d52b93a..0cd9b2777b4 100755
--- a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h
@@ -25,11 +25,11 @@ class IdleMovementGenerator : public MovementGenerator
{
public:
- void Initialize(Unit*);
- void Finalize(Unit*) { }
- void Reset(Unit*);
- bool Update(Unit*, uint32) { return true; }
- MovementGeneratorType GetMovementGeneratorType() { return IDLE_MOTION_TYPE; }
+ void Initialize(Unit*) override;
+ void Finalize(Unit*) override { }
+ void Reset(Unit*) override;
+ bool Update(Unit*, uint32) override { return true; }
+ MovementGeneratorType GetMovementGeneratorType() override { return IDLE_MOTION_TYPE; }
};
extern IdleMovementGenerator si_idleMovement;
@@ -39,11 +39,11 @@ class RotateMovementGenerator : public MovementGenerator
public:
explicit RotateMovementGenerator(uint32 time, RotateDirection direction) : m_duration(time), m_maxDuration(time), m_direction(direction) { }
- void Initialize(Unit*);
- void Finalize(Unit*);
- void Reset(Unit* owner) { Initialize(owner); }
- bool Update(Unit*, uint32);
- MovementGeneratorType GetMovementGeneratorType() { return ROTATE_MOTION_TYPE; }
+ void Initialize(Unit*) override;
+ void Finalize(Unit*) override;
+ void Reset(Unit* owner) override { Initialize(owner); }
+ bool Update(Unit*, uint32) override;
+ MovementGeneratorType GetMovementGeneratorType() override { return ROTATE_MOTION_TYPE; }
private:
uint32 m_duration, m_maxDuration;
@@ -55,11 +55,11 @@ class DistractMovementGenerator : public MovementGenerator
public:
explicit DistractMovementGenerator(uint32 timer) : m_timer(timer) { }
- void Initialize(Unit*);
- void Finalize(Unit*);
- void Reset(Unit* owner) { Initialize(owner); }
- bool Update(Unit*, uint32);
- MovementGeneratorType GetMovementGeneratorType() { return DISTRACT_MOTION_TYPE; }
+ void Initialize(Unit*) override;
+ void Finalize(Unit*) override;
+ void Reset(Unit* owner) override { Initialize(owner); }
+ bool Update(Unit*, uint32) override;
+ MovementGeneratorType GetMovementGeneratorType() override { return DISTRACT_MOTION_TYPE; }
private:
uint32 m_timer;
@@ -71,8 +71,8 @@ class AssistanceDistractMovementGenerator : public DistractMovementGenerator
AssistanceDistractMovementGenerator(uint32 timer) :
DistractMovementGenerator(timer) { }
- MovementGeneratorType GetMovementGeneratorType() { return ASSISTANCE_DISTRACT_MOTION_TYPE; }
- void Finalize(Unit*);
+ MovementGeneratorType GetMovementGeneratorType() override { return ASSISTANCE_DISTRACT_MOTION_TYPE; }
+ void Finalize(Unit*) override;
};
#endif
diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h
index c596b406cf3..3c5b33f3736 100644
--- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h
@@ -55,8 +55,8 @@ class AssistanceMovementGenerator : public PointMovementGenerator<Creature>
AssistanceMovementGenerator(float _x, float _y, float _z) :
PointMovementGenerator<Creature>(0, _x, _y, _z, true) { }
- MovementGeneratorType GetMovementGeneratorType() { return ASSISTANCE_MOTION_TYPE; }
- void Finalize(Unit*);
+ MovementGeneratorType GetMovementGeneratorType() override { return ASSISTANCE_MOTION_TYPE; }
+ void Finalize(Unit*) override;
};
// Does almost nothing - just doesn't allows previous movegen interrupt current effect.
@@ -64,11 +64,11 @@ class EffectMovementGenerator : public MovementGenerator
{
public:
explicit EffectMovementGenerator(uint32 Id) : m_Id(Id) { }
- void Initialize(Unit*) { }
- void Finalize(Unit*);
- void Reset(Unit*) { }
- bool Update(Unit*, uint32);
- MovementGeneratorType GetMovementGeneratorType() { return EFFECT_MOTION_TYPE; }
+ void Initialize(Unit*) override { }
+ void Finalize(Unit*) override;
+ void Reset(Unit*) override { }
+ bool Update(Unit*, uint32) override;
+ MovementGeneratorType GetMovementGeneratorType() override { return EFFECT_MOTION_TYPE; }
private:
uint32 m_Id;
};
diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h
index 9b5fe14b9d6..85c39fe0830 100755
--- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h
@@ -72,7 +72,7 @@ class WaypointMovementGenerator<Creature> : public MovementGeneratorMedium< Crea
void MovementInform(Creature*);
- MovementGeneratorType GetMovementGeneratorType() { return WAYPOINT_MOTION_TYPE; }
+ MovementGeneratorType GetMovementGeneratorType() override { return WAYPOINT_MOTION_TYPE; }
// now path movement implmementation
void LoadPath(Creature*);
@@ -126,7 +126,7 @@ class FlightPathMovementGenerator : public MovementGeneratorMedium< Player, Flig
void DoReset(Player*);
void DoFinalize(Player*);
bool DoUpdate(Player*, uint32);
- MovementGeneratorType GetMovementGeneratorType() { return FLIGHT_MOTION_TYPE; }
+ MovementGeneratorType GetMovementGeneratorType() override { return FLIGHT_MOTION_TYPE; }
TaxiPathNodeList const& GetPath() { return *i_path; }
uint32 GetPathAtMapEnd() const;
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.h b/src/server/game/OutdoorPvP/OutdoorPvP.h
index 9b1cfa71f96..4d7d818936e 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvP.h
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.h
@@ -218,9 +218,9 @@ class OutdoorPvP : public ZoneScript
// setup stuff
virtual bool SetupOutdoorPvP() {return true;}
- void OnGameObjectCreate(GameObject* go);
- void OnGameObjectRemove(GameObject* go);
- void OnCreatureCreate(Creature*) { }
+ void OnGameObjectCreate(GameObject* go) override;
+ void OnGameObjectRemove(GameObject* go) override;
+ void OnCreatureCreate(Creature*) override { }
// send world state update to all players present
void SendUpdateWorldState(uint32 field, uint32 value);
diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp
index a0185bf7709..d036d438926 100644
--- a/src/server/game/Scripting/ScriptLoader.cpp
+++ b/src/server/game/Scripting/ScriptLoader.cpp
@@ -266,7 +266,6 @@ void AddSC_blasted_lands();
void AddSC_burning_steppes();
void AddSC_duskwood();
void AddSC_eastern_plaguelands();
-void AddSC_eversong_woods();
void AddSC_ghostlands();
void AddSC_hinterlands();
void AddSC_isle_of_queldanas();
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index 0d1983ab463..fa83c4b112d 100644
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -32,6 +32,7 @@
#include "CreatureAIImpl.h"
#include "Player.h"
#include "WorldPacket.h"
+#include "WorldSession.h"
namespace
{
@@ -407,44 +408,42 @@ void ScriptMgr::OnSocketOpen(std::shared_ptr<WorldSocket> socket)
FOREACH_SCRIPT(ServerScript)->OnSocketOpen(socket);
}
-void ScriptMgr::OnSocketClose(std::shared_ptr<WorldSocket> socket, bool wasNew)
+void ScriptMgr::OnSocketClose(std::shared_ptr<WorldSocket> socket)
{
ASSERT(socket);
- FOREACH_SCRIPT(ServerScript)->OnSocketClose(socket, wasNew);
+ FOREACH_SCRIPT(ServerScript)->OnSocketClose(socket);
}
-void ScriptMgr::OnPacketReceive(std::shared_ptr<WorldSocket> socket, WorldPacket const& packet)
+void ScriptMgr::OnPacketReceive(WorldSession* session, WorldPacket const& packet)
{
- ASSERT(socket);
-
if (SCR_REG_LST(ServerScript).empty())
return;
WorldPacket copy(packet);
- FOREACH_SCRIPT(ServerScript)->OnPacketReceive(socket, copy);
+ FOREACH_SCRIPT(ServerScript)->OnPacketReceive(session, copy);
}
-void ScriptMgr::OnPacketSend(std::shared_ptr<WorldSocket> socket, WorldPacket const& packet)
+void ScriptMgr::OnPacketSend(WorldSession* session, WorldPacket const& packet)
{
- ASSERT(socket);
+ ASSERT(session);
if (SCR_REG_LST(ServerScript).empty())
return;
WorldPacket copy(packet);
- FOREACH_SCRIPT(ServerScript)->OnPacketSend(socket, copy);
+ FOREACH_SCRIPT(ServerScript)->OnPacketSend(session, copy);
}
-void ScriptMgr::OnUnknownPacketReceive(std::shared_ptr<WorldSocket> socket, WorldPacket const& packet)
+void ScriptMgr::OnUnknownPacketReceive(WorldSession* session, WorldPacket const& packet)
{
- ASSERT(socket);
+ ASSERT(session);
if (SCR_REG_LST(ServerScript).empty())
return;
WorldPacket copy(packet);
- FOREACH_SCRIPT(ServerScript)->OnUnknownPacketReceive(socket, copy);
+ FOREACH_SCRIPT(ServerScript)->OnUnknownPacketReceive(session, copy);
}
void ScriptMgr::OnOpenStateChange(bool open)
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h
index 0b5813a7f58..615b1d3bb06 100644
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -59,6 +59,7 @@ class Vehicle;
class WorldPacket;
class WorldSocket;
class WorldObject;
+class WorldSession;
struct AchievementCriteriaData;
struct AuctionEntry;
@@ -197,7 +198,7 @@ class SpellScriptLoader : public ScriptObject
public:
- bool IsDatabaseBound() const final { return true; }
+ bool IsDatabaseBound() const final override { return true; }
// Should return a fully valid SpellScript pointer.
virtual SpellScript* GetSpellScript() const { return NULL; }
@@ -225,19 +226,19 @@ class ServerScript : public ScriptObject
// Called when a socket is closed. Do not store the socket object, and do not rely on the connection
// being open; it is not.
- virtual void OnSocketClose(std::shared_ptr<WorldSocket> /*socket*/, bool /*wasNew*/) { }
+ virtual void OnSocketClose(std::shared_ptr<WorldSocket> /*socket*/) { }
// Called when a packet is sent to a client. The packet object is a copy of the original packet, so reading
// and modifying it is safe.
- virtual void OnPacketSend(std::shared_ptr<WorldSocket> /*socket*/, WorldPacket& /*packet*/) { }
+ virtual void OnPacketSend(WorldSession* /*session*/, WorldPacket& /*packet*/) { }
// Called when a (valid) packet is received by a client. The packet object is a copy of the original packet, so
- // reading and modifying it is safe.
- virtual void OnPacketReceive(std::shared_ptr<WorldSocket> /*socket*/, WorldPacket& /*packet*/) { }
+ // reading and modifying it is safe. Make sure to check WorldSession pointer before usage, it might be null in case of auth packets
+ virtual void OnPacketReceive(WorldSession* /*session*/, WorldPacket& /*packet*/) { }
// Called when an invalid (unknown opcode) packet is received by a client. The packet is a reference to the orignal
// packet; not a copy. This allows you to actually handle unknown packets (for whatever purpose).
- virtual void OnUnknownPacketReceive(std::shared_ptr<WorldSocket> /*socket*/, WorldPacket& /*packet*/) { }
+ virtual void OnUnknownPacketReceive(WorldSession* /*session*/, WorldPacket& /*packet*/) { }
};
class WorldScript : public ScriptObject
@@ -355,7 +356,7 @@ class InstanceMapScript : public ScriptObject, public MapScript<InstanceMap>
public:
- bool IsDatabaseBound() const final { return true; }
+ bool IsDatabaseBound() const final override { return true; }
// Gets an InstanceScript object for this instance.
virtual InstanceScript* GetInstanceScript(InstanceMap* /*map*/) const { return NULL; }
@@ -376,7 +377,7 @@ class ItemScript : public ScriptObject
public:
- bool IsDatabaseBound() const final { return true; }
+ bool IsDatabaseBound() const final override { return true; }
// Called when a dummy spell effect is triggered on the item.
virtual bool OnDummyEffect(Unit* /*caster*/, uint32 /*spellId*/, SpellEffIndex /*effIndex*/, Item* /*target*/) { return false; }
@@ -425,7 +426,7 @@ class CreatureScript : public UnitScript, public UpdatableScript<Creature>
public:
- bool IsDatabaseBound() const final { return true; }
+ bool IsDatabaseBound() const final override { return true; }
// Called when a dummy spell effect is triggered on the creature.
virtual bool OnDummyEffect(Unit* /*caster*/, uint32 /*spellId*/, SpellEffIndex /*effIndex*/, Creature* /*target*/) { return false; }
@@ -466,7 +467,7 @@ class GameObjectScript : public ScriptObject, public UpdatableScript<GameObject>
public:
- bool IsDatabaseBound() const final { return true; }
+ bool IsDatabaseBound() const final override { return true; }
// Called when a dummy spell effect is triggered on the gameobject.
virtual bool OnDummyEffect(Unit* /*caster*/, uint32 /*spellId*/, SpellEffIndex /*effIndex*/, GameObject* /*target*/) { return false; }
@@ -513,7 +514,7 @@ class AreaTriggerScript : public ScriptObject
public:
- bool IsDatabaseBound() const final { return true; }
+ bool IsDatabaseBound() const final override { return true; }
// Called when the area trigger is activated by a player.
virtual bool OnTrigger(Player* /*player*/, AreaTriggerEntry const* /*trigger*/) { return false; }
@@ -527,7 +528,7 @@ class BattlegroundScript : public ScriptObject
public:
- bool IsDatabaseBound() const final { return true; }
+ bool IsDatabaseBound() const final override { return true; }
// Should return a fully valid Battleground object for the type ID.
virtual Battleground* GetBattleground() const = 0;
@@ -541,7 +542,7 @@ class OutdoorPvPScript : public ScriptObject
public:
- bool IsDatabaseBound() const final { return true; }
+ bool IsDatabaseBound() const final override { return true; }
// Should return a fully valid OutdoorPvP object for the type ID.
virtual OutdoorPvP* GetOutdoorPvP() const = 0;
@@ -567,7 +568,7 @@ class WeatherScript : public ScriptObject, public UpdatableScript<Weather>
public:
- bool IsDatabaseBound() const final { return true; }
+ bool IsDatabaseBound() const final override { return true; }
// Called when the weather changes in the zone this script is associated with.
virtual void OnChange(Weather* /*weather*/, WeatherState /*state*/, float /*grade*/) { }
@@ -602,7 +603,7 @@ class ConditionScript : public ScriptObject
public:
- bool IsDatabaseBound() const final { return true; }
+ bool IsDatabaseBound() const final override { return true; }
// Called when a single condition is checked for a player.
virtual bool OnConditionCheck(Condition* /*condition*/, ConditionSourceInfo& /*sourceInfo*/) { return true; }
@@ -650,7 +651,7 @@ class TransportScript : public ScriptObject, public UpdatableScript<Transport>
public:
- bool IsDatabaseBound() const final { return true; }
+ bool IsDatabaseBound() const final override { return true; }
// Called when a player boards the transport.
virtual void OnAddPassenger(Transport* /*transport*/, Player* /*player*/) { }
@@ -673,7 +674,7 @@ class AchievementCriteriaScript : public ScriptObject
public:
- bool IsDatabaseBound() const final { return true; }
+ bool IsDatabaseBound() const final override { return true; }
// Called when an additional criteria is checked.
virtual bool OnCheck(Player* source, Unit* target) = 0;
@@ -805,7 +806,7 @@ class GuildScript : public ScriptObject
public:
- bool IsDatabaseBound() const final { return false; }
+ bool IsDatabaseBound() const final override { return false; }
// Called when a member is added to the guild.
virtual void OnAddMember(Guild* /*guild*/, Player* /*player*/, uint8& /*plRank*/) { }
@@ -848,7 +849,7 @@ class GroupScript : public ScriptObject
public:
- bool IsDatabaseBound() const final { return false; }
+ bool IsDatabaseBound() const final override { return false; }
// Called when a member is added to a group.
virtual void OnAddMember(Group* /*group*/, uint64 /*guid*/) { }
@@ -909,10 +910,10 @@ class ScriptMgr
void OnNetworkStart();
void OnNetworkStop();
void OnSocketOpen(std::shared_ptr<WorldSocket> socket);
- void OnSocketClose(std::shared_ptr<WorldSocket> socket, bool wasNew);
- void OnPacketReceive(std::shared_ptr<WorldSocket> socket, WorldPacket const& packet);
- void OnPacketSend(std::shared_ptr<WorldSocket> socket, WorldPacket const& packet);
- void OnUnknownPacketReceive(std::shared_ptr<WorldSocket> socket, WorldPacket const& packet);
+ void OnSocketClose(std::shared_ptr<WorldSocket> socket);
+ void OnPacketReceive(WorldSession* session, WorldPacket const& packet);
+ void OnPacketSend(WorldSession* session, WorldPacket const& packet);
+ void OnUnknownPacketReceive(WorldSession* session, WorldPacket const& packet);
public: /* WorldScript */
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index abb48a63ebf..445e42a7f08 100644
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
@@ -225,6 +225,8 @@ void WorldSession::SendPacket(WorldPacket* packet)
}
#endif // !TRINITY_DEBUG
+ sScriptMgr->OnPacketSend(this, *packet);
+
m_Socket->AsyncWrite(*packet);
}
@@ -288,7 +290,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
{
TC_LOG_ERROR("network.opcode", "Received non-existed opcode %s from %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str()
, GetPlayerInfo().c_str());
- sScriptMgr->OnUnknownPacketReceive(m_Socket, *packet);
+ sScriptMgr->OnUnknownPacketReceive(this, *packet);
}
else
{
@@ -318,7 +320,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
}
else if (_player->IsInWorld())
{
- sScriptMgr->OnPacketReceive(m_Socket, *packet);
+ sScriptMgr->OnPacketReceive(this, *packet);
(this->*opHandle.handler)(*packet);
LogUnprocessedTail(packet);
}
@@ -331,7 +333,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
else
{
// not expected _player or must checked in packet handler
- sScriptMgr->OnPacketReceive(m_Socket, *packet);
+ sScriptMgr->OnPacketReceive(this, *packet);
(this->*opHandle.handler)(*packet);
LogUnprocessedTail(packet);
}
@@ -343,7 +345,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
LogUnexpectedOpcode(packet, "STATUS_TRANSFER", "the player is still in world");
else
{
- sScriptMgr->OnPacketReceive(m_Socket, *packet);
+ sScriptMgr->OnPacketReceive(this, *packet);
(this->*opHandle.handler)(*packet);
LogUnprocessedTail(packet);
}
@@ -361,7 +363,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
if (packet->GetOpcode() == CMSG_CHAR_ENUM)
m_playerRecentlyLogout = false;
- sScriptMgr->OnPacketReceive(m_Socket, *packet);
+ sScriptMgr->OnPacketReceive(this, *packet);
(this->*opHandle.handler)(*packet);
LogUnprocessedTail(packet);
break;
@@ -418,7 +420,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
if (m_Socket && !m_Socket->IsOpen())
{
expireTime -= expireTime > diff ? diff : expireTime;
- if (expireTime < diff || forceExit)
+ if (expireTime < diff || forceExit || !GetPlayer())
{
m_Socket = nullptr;
}
diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h
index 5cf85596a3a..2e6a699fc7c 100644
--- a/src/server/game/Server/WorldSession.h
+++ b/src/server/game/Server/WorldSession.h
@@ -153,9 +153,9 @@ public:
explicit MapSessionFilter(WorldSession* pSession) : PacketFilter(pSession) { }
~MapSessionFilter() { }
- virtual bool Process(WorldPacket* packet);
+ virtual bool Process(WorldPacket* packet) override;
//in Map::Update() we do not process player logout!
- virtual bool ProcessLogout() const { return false; }
+ virtual bool ProcessLogout() const override { return false; }
};
//class used to filer only thread-unsafe packets from queue
@@ -166,7 +166,7 @@ public:
explicit WorldSessionFilter(WorldSession* pSession) : PacketFilter(pSession) { }
~WorldSessionFilter() { }
- virtual bool Process(WorldPacket* packet);
+ virtual bool Process(WorldPacket* packet) override;
};
// Proxy structure to contain data passed to callback function,
@@ -373,22 +373,21 @@ class WorldSession
void SetLatency(uint32 latency) { m_latency = latency; }
void ResetClientTimeDelay() { m_clientTimeDelay = 0; }
- std::atomic<time_t> m_timeOutTime;
+ std::atomic<int32> m_timeOutTime;
void UpdateTimeOutTime(uint32 diff)
{
- if (time_t(diff) > m_timeOutTime)
- m_timeOutTime = 0;
- else
- m_timeOutTime -= diff;
+ m_timeOutTime -= int32(diff);
}
+
void ResetTimeOutTime()
{
- m_timeOutTime = sWorld->getIntConfig(CONFIG_SOCKET_TIMEOUTTIME);
+ m_timeOutTime = int32(sWorld->getIntConfig(CONFIG_SOCKET_TIMEOUTTIME));
}
+
bool IsConnectionIdle() const
{
- return (m_timeOutTime <= 0 && !m_inQueue);
+ return m_timeOutTime <= 0 && !m_inQueue;
}
// Recruit-A-Friend Handling
diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp
index 65a424d5d75..5945d9fe868 100644
--- a/src/server/game/Server/WorldSocket.cpp
+++ b/src/server/game/Server/WorldSocket.cpp
@@ -16,13 +16,14 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <memory>
#include "WorldSocket.h"
#include "BigNumber.h"
#include "Opcodes.h"
+#include "Player.h"
#include "ScriptMgr.h"
#include "SHA1.h"
#include "PacketLog.h"
+#include <memory>
using boost::asio::ip::tcp;
@@ -33,6 +34,7 @@ WorldSocket::WorldSocket(tcp::socket&& socket)
void WorldSocket::Start()
{
+ sScriptMgr->OnSocketOpen(shared_from_this());
AsyncReadHeader();
HandleSendAuthSession();
}
@@ -54,93 +56,95 @@ void WorldSocket::HandleSendAuthSession()
AsyncWrite(packet);
}
-void WorldSocket::ReadHeaderHandler(boost::system::error_code error, size_t transferedBytes)
+void WorldSocket::ReadHeaderHandler()
{
- if (!error && transferedBytes == sizeof(ClientPktHeader))
- {
- _authCrypt.DecryptRecv(GetReadBuffer(), sizeof(ClientPktHeader));
+ _authCrypt.DecryptRecv(GetHeaderBuffer(), sizeof(ClientPktHeader));
- ClientPktHeader* header = reinterpret_cast<ClientPktHeader*>(GetReadBuffer());
- EndianConvertReverse(header->size);
- EndianConvert(header->cmd);
+ ClientPktHeader* header = reinterpret_cast<ClientPktHeader*>(GetHeaderBuffer());
+ EndianConvertReverse(header->size);
+ EndianConvert(header->cmd);
+
+ if (!header->IsValid())
+ {
+ if (_worldSession)
+ {
+ Player* player = _worldSession->GetPlayer();
+ TC_LOG_ERROR("network", "WorldSocket::ReadHeaderHandler(): client (account: %u, char [GUID: %u, name: %s]) sent malformed packet (size: %hu, cmd: %u)",
+ _worldSession->GetAccountId(), player ? player->GetGUIDLow() : 0, player ? player->GetName().c_str() : "<none>", header->size, header->cmd);
+ }
+ else
+ TC_LOG_ERROR("network", "WorldSocket::ReadHeaderHandler(): client %s sent malformed packet (size: %hu, cmd: %u)",
+ GetRemoteIpAddress().to_string().c_str(), header->size, header->cmd);
- AsyncReadData(header->size - sizeof(header->cmd), sizeof(ClientPktHeader));
- }
- else
CloseSocket();
+ return;
+ }
+
+ AsyncReadData(header->size - sizeof(header->cmd));
}
-void WorldSocket::ReadDataHandler(boost::system::error_code error, size_t transferedBytes)
+void WorldSocket::ReadDataHandler()
{
- ClientPktHeader* header = reinterpret_cast<ClientPktHeader*>(GetReadBuffer());
-
- if (!error && transferedBytes == (header->size - sizeof(header->cmd)))
- {
- header->size -= sizeof(header->cmd);
+ ClientPktHeader* header = reinterpret_cast<ClientPktHeader*>(GetHeaderBuffer());
- uint16 opcode = uint16(header->cmd);
+ header->size -= sizeof(header->cmd);
- std::string opcodeName = GetOpcodeNameForLogging(opcode);
+ uint16 opcode = uint16(header->cmd);
- WorldPacket packet(opcode, header->size);
+ std::string opcodeName = GetOpcodeNameForLogging(opcode);
- if (header->size > 0)
- {
- packet.resize(header->size);
+ WorldPacket packet(opcode, MoveData());
- std::memcpy(packet.contents(), &(GetReadBuffer()[sizeof(ClientPktHeader)]), header->size);
- }
-
- if (sPacketLog->CanLogPacket())
- sPacketLog->LogPacket(packet, CLIENT_TO_SERVER, GetRemoteIpAddress(), GetRemotePort());
+ if (sPacketLog->CanLogPacket())
+ sPacketLog->LogPacket(packet, CLIENT_TO_SERVER, GetRemoteIpAddress(), GetRemotePort());
- TC_LOG_TRACE("network.opcode", "C->S: %s %s", (_worldSession ? _worldSession->GetPlayerInfo() : GetRemoteIpAddress().to_string()).c_str(), GetOpcodeNameForLogging(opcode).c_str());
+ TC_LOG_TRACE("network.opcode", "C->S: %s %s", (_worldSession ? _worldSession->GetPlayerInfo() : GetRemoteIpAddress().to_string()).c_str(), opcodeName.c_str());
- switch (opcode)
- {
- case CMSG_PING:
- HandlePing(packet);
+ switch (opcode)
+ {
+ case CMSG_PING:
+ HandlePing(packet);
+ break;
+ case CMSG_AUTH_SESSION:
+ if (_worldSession)
+ {
+ TC_LOG_ERROR("network", "WorldSocket::ProcessIncoming: received duplicate CMSG_AUTH_SESSION from %s", _worldSession->GetPlayerInfo().c_str());
break;
- case CMSG_AUTH_SESSION:
- if (_worldSession)
- {
- TC_LOG_ERROR("network", "WorldSocket::ProcessIncoming: received duplicate CMSG_AUTH_SESSION from %s", _worldSession->GetPlayerInfo().c_str());
- break;
- }
+ }
- sScriptMgr->OnPacketReceive(shared_from_this(), packet);
- HandleAuthSession(packet);
- break;
- case CMSG_KEEP_ALIVE:
- TC_LOG_DEBUG("network", "%s", opcodeName.c_str());
- sScriptMgr->OnPacketReceive(shared_from_this(), packet);
- break;
- default:
+ HandleAuthSession(packet);
+ break;
+ case CMSG_KEEP_ALIVE:
+ TC_LOG_DEBUG("network", "%s", opcodeName.c_str());
+ sScriptMgr->OnPacketReceive(_worldSession, packet);
+ break;
+ default:
+ {
+ if (!_worldSession)
{
- if (!_worldSession)
- {
- TC_LOG_ERROR("network.opcode", "ProcessIncoming: Client not authed opcode = %u", uint32(opcode));
- break;
- }
+ TC_LOG_ERROR("network.opcode", "ProcessIncoming: Client not authed opcode = %u", uint32(opcode));
+ CloseSocket();
+ return;
+ }
- // Our Idle timer will reset on any non PING opcodes.
- // Catches people idling on the login screen and any lingering ingame connections.
- _worldSession->ResetTimeOutTime();
+ // Our Idle timer will reset on any non PING opcodes.
+ // Catches people idling on the login screen and any lingering ingame connections.
+ _worldSession->ResetTimeOutTime();
- // Copy the packet to the heap before enqueuing
- _worldSession->QueuePacket(new WorldPacket(packet));
- break;
- }
+ // Copy the packet to the heap before enqueuing
+ _worldSession->QueuePacket(new WorldPacket(std::move(packet)));
+ break;
}
-
- AsyncReadHeader();
}
- else
- CloseSocket();
+
+ AsyncReadHeader();
}
void WorldSocket::AsyncWrite(WorldPacket& packet)
{
+ if (!IsOpen())
+ return;
+
if (sPacketLog->CanLogPacket())
sPacketLog->LogPacket(packet, SERVER_TO_CLIENT, GetRemoteIpAddress(), GetRemotePort());
@@ -454,3 +458,10 @@ void WorldSocket::HandlePing(WorldPacket& recvPacket)
packet << ping;
return AsyncWrite(packet);
}
+
+void WorldSocket::CloseSocket()
+{
+ sScriptMgr->OnSocketClose(shared_from_this());
+
+ Socket::CloseSocket();
+}
diff --git a/src/server/game/Server/WorldSocket.h b/src/server/game/Server/WorldSocket.h
index 7275da5ff29..0667c1b090a 100644
--- a/src/server/game/Server/WorldSocket.h
+++ b/src/server/game/Server/WorldSocket.h
@@ -48,6 +48,8 @@ struct ClientPktHeader
{
uint16 size;
uint32 cmd;
+
+ bool IsValid() const { return size >= 4 && size < 10240 && cmd < NUM_MSG_TYPES; }
};
#pragma pack(pop)
@@ -104,12 +106,14 @@ public:
void Start() override;
+ void CloseSocket() override;
+
using Base::AsyncWrite;
void AsyncWrite(WorldPacket& packet);
protected:
- void ReadHeaderHandler(boost::system::error_code error, size_t transferedBytes) override;
- void ReadDataHandler(boost::system::error_code error, size_t transferedBytes) override;
+ void ReadHeaderHandler() override;
+ void ReadDataHandler() override;
private:
void HandleSendAuthSession();
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 1894776c990..c78830af43a 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -5005,7 +5005,7 @@ void AuraEffect::HandleChannelDeathItem(AuraApplication const* aurApp, uint8 mod
// Glyph of Drain Soul - chance to create an additional Soul Shard
if (AuraEffect* aur = caster->GetAuraEffect(58070, 0))
if (roll_chance_i(aur->GetMiscValue()))
- caster->CastSpell(caster, 58068, true, 0, aur); // We _could_ simply do ++count here, but Blizz does it this way :)
+ caster->CastSpell(caster, 58068, true, nullptr, aur); // We _could_ simply do ++count here, but Blizz does it this way :)
}
}
@@ -5390,7 +5390,7 @@ void AuraEffect::HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const
int32 mod = (rage < 100) ? rage : 100;
int32 points = target->CalculateSpellDamage(target, GetSpellInfo(), 1);
int32 regen = target->GetMaxHealth() * (mod * points / 10) / 1000;
- target->CastCustomSpell(target, 22845, &regen, 0, 0, true, 0, this);
+ target->CastCustomSpell(target, 22845, &regen, nullptr, nullptr, true, nullptr, this);
target->SetPower(POWER_RAGE, rage-mod);
break;
}
@@ -5428,12 +5428,12 @@ void AuraEffect::HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const
// Feeding Frenzy Rank 1
case 53511:
if (target->GetVictim() && target->EnsureVictim()->HealthBelowPct(35))
- target->CastSpell(target, 60096, true, 0, this);
+ target->CastSpell(target, 60096, true, nullptr, this);
return;
// Feeding Frenzy Rank 2
case 53512:
if (target->GetVictim() && target->EnsureVictim()->HealthBelowPct(35))
- target->CastSpell(target, 60097, true, 0, this);
+ target->CastSpell(target, 60097, true, nullptr, this);
return;
default:
break;
@@ -5709,7 +5709,7 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
case 53563:
{
// area aura owner casts the spell
- GetBase()->GetUnitOwner()->CastSpell(target, triggeredSpellInfo, true, 0, this, GetBase()->GetUnitOwner()->GetGUID());
+ GetBase()->GetUnitOwner()->CastSpell(target, triggeredSpellInfo, true, nullptr, this, GetBase()->GetUnitOwner()->GetGUID());
return;
}
// Slime Spray - temporary here until preventing default effect works again
@@ -5773,7 +5773,7 @@ void AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick(Unit* target, Unit*
if (Unit* triggerCaster = triggeredSpellInfo->NeedsToBeTriggeredByCaster(m_spellInfo) ? caster : target)
{
int32 basepoints = GetAmount();
- triggerCaster->CastCustomSpell(target, triggerSpellId, &basepoints, &basepoints, &basepoints, true, 0, this);
+ triggerCaster->CastCustomSpell(target, triggerSpellId, &basepoints, &basepoints, &basepoints, true, nullptr, this);
TC_LOG_DEBUG("spells", "AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id);
}
}
@@ -5869,11 +5869,11 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const
{
if (roll_chance_i(20))
{
- caster->CastSpell(caster, 43836, true, 0, this);
+ caster->CastSpell(caster, 43836, true, nullptr, this);
// Glyph of Drain Soul - chance to create an additional Soul Shard
if (AuraEffect* aur = caster->GetAuraEffect(58070, 0))
if (roll_chance_i(aur->GetMiscValue()))
- caster->CastSpell(caster, 58068, true, 0, aur);
+ caster->CastSpell(caster, 58068, true, nullptr, aur);
}
}
}
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index 851d992d857..348869075ee 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -1295,7 +1295,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
{
// instantly heal m_amount% of the absorb-value
int32 heal = glyph->GetAmount() * GetEffect(0)->GetAmount()/100;
- caster->CastCustomSpell(GetUnitOwner(), 56160, &heal, NULL, NULL, true, 0, GetEffect(0));
+ caster->CastCustomSpell(GetUnitOwner(), 56160, &heal, nullptr, nullptr, true, nullptr, GetEffect(0));
}
}
break;
diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h
index 19c77c2ac7e..e578c0ffc3a 100644
--- a/src/server/game/Spells/Auras/SpellAuras.h
+++ b/src/server/game/Spells/Auras/SpellAuras.h
@@ -274,12 +274,12 @@ class UnitAura : public Aura
protected:
explicit UnitAura(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID);
public:
- void _ApplyForTarget(Unit* target, Unit* caster, AuraApplication * aurApp);
- void _UnapplyForTarget(Unit* target, Unit* caster, AuraApplication * aurApp);
+ void _ApplyForTarget(Unit* target, Unit* caster, AuraApplication * aurApp) override;
+ void _UnapplyForTarget(Unit* target, Unit* caster, AuraApplication * aurApp) override;
- void Remove(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
+ void Remove(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT) override;
- void FillTargetMap(std::map<Unit*, uint8> & targets, Unit* caster);
+ void FillTargetMap(std::map<Unit*, uint8> & targets, Unit* caster) override;
// Allow Apply Aura Handler to modify and access m_AuraDRGroup
void SetDiminishGroup(DiminishingGroup group) { m_AuraDRGroup = group; }
@@ -295,8 +295,8 @@ class DynObjAura : public Aura
protected:
explicit DynObjAura(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID);
public:
- void Remove(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
+ void Remove(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT) override;
- void FillTargetMap(std::map<Unit*, uint8> & targets, Unit* caster);
+ void FillTargetMap(std::map<Unit*, uint8> & targets, Unit* caster) override;
};
#endif
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index b540fbf4fde..14cf256d98e 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2704,7 +2704,7 @@ void Spell::DoTriggersOnSpellHit(Unit* unit, uint8 effMask)
if (*i < 0)
unit->RemoveAurasDueToSpell(-(*i));
else
- unit->CastSpell(unit, *i, true, 0, 0, m_caster->GetGUID());
+ unit->CastSpell(unit, *i, true, nullptr, nullptr, m_caster->GetGUID());
}
}
}
@@ -3420,7 +3420,14 @@ void Spell::SendSpellCooldown()
{
Player* _player = m_caster->ToPlayer();
if (!_player)
+ {
+ // Handle pet cooldowns here if needed instead of in PetAI to avoid hidden cooldown restarts
+ Creature* _creature = m_caster->ToCreature();
+ if (_creature && _creature->IsPet())
+ _creature->AddCreatureSpellCooldown(m_spellInfo->Id);
+
return;
+ }
// mana/health/etc potions, disabled by client (until combat out as declarate)
if (m_CastItem && (m_CastItem->IsPotion() || m_spellInfo->IsCooldownStartedOnEvent()))
@@ -5081,7 +5088,7 @@ SpellCastResult Spell::CheckCast(bool strict)
return SPELL_FAILED_TARGET_UNSKINNABLE;
Creature* creature = m_targets.GetUnitTarget()->ToCreature();
- if (creature->GetCreatureType() != CREATURE_TYPE_CRITTER && !creature->loot.isLooted())
+ if (!creature->IsCritter() && !creature->loot.isLooted())
return SPELL_FAILED_TARGET_NOT_LOOTED;
uint32 skill = creature->GetCreatureTemplate()->GetRequiredLootSkill();
diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h
index 0299717fde6..46203f3e7bb 100644
--- a/src/server/game/Spells/Spell.h
+++ b/src/server/game/Spells/Spell.h
@@ -752,9 +752,9 @@ class SpellEvent : public BasicEvent
SpellEvent(Spell* spell);
virtual ~SpellEvent();
- virtual bool Execute(uint64 e_time, uint32 p_time);
- virtual void Abort(uint64 e_time);
- virtual bool IsDeletable() const;
+ virtual bool Execute(uint64 e_time, uint32 p_time) override;
+ virtual void Abort(uint64 e_time) override;
+ virtual bool IsDeletable() const override;
protected:
Spell* m_Spell;
};
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 0200d33211f..00b787345d4 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -478,7 +478,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
int chance = (*i)->GetSpellInfo()->Effects[EFFECT_1].CalcValue(m_caster);
if (roll_chance_i(chance))
// Mind Trauma
- m_caster->CastSpell(unitTarget, 48301, true, 0);
+ m_caster->CastSpell(unitTarget, 48301, true, nullptr);
break;
}
}
diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h
index 43d8a577fa3..756644dbd1b 100644
--- a/src/server/game/Spells/SpellScript.h
+++ b/src/server/game/Spells/SpellScript.h
@@ -187,7 +187,7 @@ class SpellScript : public _SpellScript
public:
EffectHandler(SpellEffectFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName);
std::string ToString();
- bool CheckEffect(SpellInfo const* spellInfo, uint8 effIndex);
+ bool CheckEffect(SpellInfo const* spellInfo, uint8 effIndex) override;
void Call(SpellScript* spellScript, SpellEffIndex effIndex);
private:
SpellEffectFnType pEffectHandlerScript;
@@ -206,7 +206,7 @@ class SpellScript : public _SpellScript
{
public:
TargetHook(uint8 _effectIndex, uint16 _targetType, bool _area, bool _dest);
- bool CheckEffect(SpellInfo const* spellInfo, uint8 effIndex);
+ bool CheckEffect(SpellInfo const* spellInfo, uint8 effIndex) override;
std::string ToString();
uint16 GetTarget() const { return targetType; }
protected:
@@ -253,7 +253,7 @@ class SpellScript : public _SpellScript
#define PrepareSpellScript(CLASSNAME) SPELLSCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) SPELLSCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME)
public:
- bool _Validate(SpellInfo const* entry);
+ bool _Validate(SpellInfo const* entry) override;
bool _Load(Spell* spell);
void _InitHit();
bool _IsEffectPrevented(SpellEffIndex effIndex) { return (m_hitPreventEffectMask & (1 << effIndex)) != 0; }
@@ -509,7 +509,7 @@ class AuraScript : public _SpellScript
public:
EffectBase(uint8 _effIndex, uint16 _effName);
std::string ToString();
- bool CheckEffect(SpellInfo const* spellInfo, uint8 effIndex);
+ bool CheckEffect(SpellInfo const* spellInfo, uint8 effIndex) override;
};
class EffectPeriodicHandler : public EffectBase
{
@@ -630,7 +630,7 @@ class AuraScript : public _SpellScript
public:
AuraScript() : _SpellScript(), m_aura(NULL), m_auraApplication(NULL), m_defaultActionPrevented(false)
{ }
- bool _Validate(SpellInfo const* entry);
+ bool _Validate(SpellInfo const* entry) override;
bool _Load(Aura* aura);
void _PrepareScriptCall(AuraScriptHookType hookType, AuraApplication const* aurApp = NULL);
void _FinishScriptCall();
diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp
index 8bd7a5a5e71..0412128754c 100644
--- a/src/server/game/Texts/CreatureTextMgr.cpp
+++ b/src/server/game/Texts/CreatureTextMgr.cpp
@@ -180,7 +180,7 @@ void CreatureTextMgr::LoadCreatureTextLocales()
{
Field* fields = result->Fetch();
CreatureTextLocale& loc = mLocaleTextMap[CreatureTextId(fields[0].GetUInt32(), uint32(fields[1].GetUInt8()), uint32(fields[2].GetUInt8()))];
- for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
+ for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
{
LocaleConstant locale = LocaleConstant(i);
ObjectMgr::AddLocaleString(fields[3 + i - 1].GetString(), locale, loc.Text);
diff --git a/src/server/game/Warden/WardenMac.h b/src/server/game/Warden/WardenMac.h
index 3ea509c75ef..e9ccfe55438 100644
--- a/src/server/game/Warden/WardenMac.h
+++ b/src/server/game/Warden/WardenMac.h
@@ -34,13 +34,13 @@ class WardenMac : public Warden
WardenMac();
~WardenMac();
- void Init(WorldSession* session, BigNumber* k);
- ClientWardenModule* GetModuleForClient();
- void InitializeModule();
- void RequestHash();
- void HandleHashResult(ByteBuffer& buff);
- void RequestData();
- void HandleData(ByteBuffer& buff);
+ void Init(WorldSession* session, BigNumber* k) override;
+ ClientWardenModule* GetModuleForClient() override;
+ void InitializeModule() override;
+ void RequestHash() override;
+ void HandleHashResult(ByteBuffer& buff) override;
+ void RequestData() override;
+ void HandleData(ByteBuffer& buff) override;
};
#endif
diff --git a/src/server/game/Warden/WardenWin.h b/src/server/game/Warden/WardenWin.h
index 47487ba65a2..d760d9ee981 100644
--- a/src/server/game/Warden/WardenWin.h
+++ b/src/server/game/Warden/WardenWin.h
@@ -76,13 +76,13 @@ class WardenWin : public Warden
WardenWin();
~WardenWin();
- void Init(WorldSession* session, BigNumber* K);
- ClientWardenModule* GetModuleForClient();
- void InitializeModule();
- void RequestHash();
- void HandleHashResult(ByteBuffer &buff);
- void RequestData();
- void HandleData(ByteBuffer &buff);
+ void Init(WorldSession* session, BigNumber* K) override;
+ ClientWardenModule* GetModuleForClient() override;
+ void InitializeModule() override;
+ void RequestHash() override;
+ void HandleHashResult(ByteBuffer &buff) override;
+ void RequestData() override;
+ void HandleData(ByteBuffer &buff) override;
private:
uint32 _serverTicks;
diff --git a/src/server/game/Weather/WeatherMgr.cpp b/src/server/game/Weather/WeatherMgr.cpp
index 938c91b0228..6f011ed2954 100644
--- a/src/server/game/Weather/WeatherMgr.cpp
+++ b/src/server/game/Weather/WeatherMgr.cpp
@@ -50,7 +50,7 @@ namespace
Weather* FindWeather(uint32 id)
{
WeatherMap::const_iterator itr = m_weathers.find(id);
- return (itr != m_weathers.end()) ? itr->second.get() : 0;
+ return (itr != m_weathers.end()) ? itr->second.get() : nullptr;
}
/// Remove a Weather object for the given zoneid
diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h
index 7d3c7694463..0711ead6187 100644
--- a/src/server/game/World/World.h
+++ b/src/server/game/World/World.h
@@ -623,11 +623,11 @@ class World
void SendWorldText(int32 string_id, ...);
void SendGlobalText(const char* text, WorldSession* self);
void SendGMText(int32 string_id, ...);
- void SendGlobalMessage(WorldPacket* packet, WorldSession* self = 0, uint32 team = 0);
- void SendGlobalGMMessage(WorldPacket* packet, WorldSession* self = 0, uint32 team = 0);
- bool SendZoneMessage(uint32 zone, WorldPacket* packet, WorldSession* self = 0, uint32 team = 0);
- void SendZoneText(uint32 zone, const char *text, WorldSession* self = 0, uint32 team = 0);
void SendServerMessage(ServerMessageType type, const char *text = "", Player* player = NULL);
+ void SendGlobalMessage(WorldPacket* packet, WorldSession* self = nullptr, uint32 team = 0);
+ void SendGlobalGMMessage(WorldPacket* packet, WorldSession* self = nullptr, uint32 team = 0);
+ bool SendZoneMessage(uint32 zone, WorldPacket* packet, WorldSession* self = nullptr, uint32 team = 0);
+ void SendZoneText(uint32 zone, const char *text, WorldSession* self = nullptr, uint32 team = 0);
/// Are we in the middle of a shutdown?
bool IsShuttingDown() const { return m_ShutdownTimer > 0; }
diff --git a/src/server/scripts/Commands/cs_ban.cpp b/src/server/scripts/Commands/cs_ban.cpp
index cc5c8e49c69..a90bbd69e24 100644
--- a/src/server/scripts/Commands/cs_ban.cpp
+++ b/src/server/scripts/Commands/cs_ban.cpp
@@ -109,21 +109,23 @@ public:
return false;
}
- switch (sWorld->BanCharacter(name, durationStr, reasonStr, handler->GetSession() ? handler->GetSession()->GetPlayerName().c_str() : ""))
+ std::string author = handler->GetSession() ? handler->GetSession()->GetPlayerName() : "Server";
+
+ switch (sWorld->BanCharacter(name, durationStr, reasonStr, author))
{
case BAN_SUCCESS:
{
if (atoi(durationStr) > 0)
{
if (sWorld->getBoolConfig(CONFIG_SHOW_BAN_IN_WORLD))
- sWorld->SendWorldText(LANG_BAN_CHARACTER_YOUBANNEDMESSAGE_WORLD, (handler->GetSession() ? handler->GetSession()->GetPlayerName().c_str() : "Server"), name.c_str(), secsToTimeString(TimeStringToSecs(durationStr), true).c_str(), reasonStr);
+ sWorld->SendWorldText(LANG_BAN_CHARACTER_YOUBANNEDMESSAGE_WORLD, author.c_str(), name.c_str(), secsToTimeString(TimeStringToSecs(durationStr), true).c_str(), reasonStr);
else
handler->PSendSysMessage(LANG_BAN_YOUBANNED, name.c_str(), secsToTimeString(TimeStringToSecs(durationStr), true).c_str(), reasonStr);
}
else
{
if (sWorld->getBoolConfig(CONFIG_SHOW_BAN_IN_WORLD))
- sWorld->SendWorldText(LANG_BAN_CHARACTER_YOUPERMBANNEDMESSAGE_WORLD, (handler->GetSession() ? handler->GetSession()->GetPlayerName().c_str() : "Server"), name.c_str(), reasonStr);
+ sWorld->SendWorldText(LANG_BAN_CHARACTER_YOUPERMBANNEDMESSAGE_WORLD, author.c_str(), name.c_str(), reasonStr);
else
handler->PSendSysMessage(LANG_BAN_YOUPERMBANNED, name.c_str(), reasonStr);
}
@@ -195,20 +197,22 @@ public:
break;
}
- switch (sWorld->BanAccount(mode, nameOrIP, durationStr, reasonStr, handler->GetSession() ? handler->GetSession()->GetPlayerName().c_str() : ""))
+ std::string author = handler->GetSession() ? handler->GetSession()->GetPlayerName() : "Server";
+
+ switch (sWorld->BanAccount(mode, nameOrIP, durationStr, reasonStr, author))
{
case BAN_SUCCESS:
if (atoi(durationStr) > 0)
{
if (sWorld->getBoolConfig(CONFIG_SHOW_BAN_IN_WORLD))
- sWorld->SendWorldText(LANG_BAN_ACCOUNT_YOUBANNEDMESSAGE_WORLD, (handler->GetSession() ? handler->GetSession()->GetPlayerName().c_str() : "Server"), nameOrIP.c_str(), secsToTimeString(TimeStringToSecs(durationStr), true).c_str(), reasonStr);
+ sWorld->SendWorldText(LANG_BAN_ACCOUNT_YOUBANNEDMESSAGE_WORLD, author.c_str(), nameOrIP.c_str(), secsToTimeString(TimeStringToSecs(durationStr), true).c_str(), reasonStr);
else
handler->PSendSysMessage(LANG_BAN_YOUBANNED, nameOrIP.c_str(), secsToTimeString(TimeStringToSecs(durationStr), true).c_str(), reasonStr);
}
else
{
if (sWorld->getBoolConfig(CONFIG_SHOW_BAN_IN_WORLD))
- sWorld->SendWorldText(LANG_BAN_ACCOUNT_YOUPERMBANNEDMESSAGE_WORLD, (handler->GetSession() ? handler->GetSession()->GetPlayerName().c_str() : "Server"), nameOrIP.c_str(), reasonStr);
+ sWorld->SendWorldText(LANG_BAN_ACCOUNT_YOUPERMBANNEDMESSAGE_WORLD, author.c_str(), nameOrIP.c_str(), reasonStr);
else
handler->PSendSysMessage(LANG_BAN_YOUPERMBANNED, nameOrIP.c_str(), reasonStr);
}
diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp
index ce0bee0d8c5..ed5b39e476d 100644
--- a/src/server/scripts/Commands/cs_gobject.cpp
+++ b/src/server/scripts/Commands/cs_gobject.cpp
@@ -37,7 +37,7 @@ class gobject_commandscript : public CommandScript
public:
gobject_commandscript() : CommandScript("gobject_commandscript") { }
- ChatCommand* GetCommands() const
+ ChatCommand* GetCommands() const override
{
static ChatCommand gobjectAddCommandTable[] =
{
diff --git a/src/server/scripts/Commands/cs_guild.cpp b/src/server/scripts/Commands/cs_guild.cpp
index 4627f6b022e..86213291367 100644
--- a/src/server/scripts/Commands/cs_guild.cpp
+++ b/src/server/scripts/Commands/cs_guild.cpp
@@ -34,7 +34,7 @@ class guild_commandscript : public CommandScript
public:
guild_commandscript() : CommandScript("guild_commandscript") { }
- ChatCommand* GetCommands() const
+ ChatCommand* GetCommands() const override
{
static ChatCommand guildCommandTable[] =
{
diff --git a/src/server/scripts/Commands/cs_message.cpp b/src/server/scripts/Commands/cs_message.cpp
index dd1366ac09c..f2067e6c70b 100644
--- a/src/server/scripts/Commands/cs_message.cpp
+++ b/src/server/scripts/Commands/cs_message.cpp
@@ -34,7 +34,7 @@ class message_commandscript : public CommandScript
public:
message_commandscript() : CommandScript("message_commandscript") { }
- ChatCommand* GetCommands() const
+ ChatCommand* GetCommands() const override
{
static ChatCommand channelSetCommandTable[] =
{
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp
index 179dc6cd629..a3848c00877 100644
--- a/src/server/scripts/Commands/cs_misc.cpp
+++ b/src/server/scripts/Commands/cs_misc.cpp
@@ -1459,7 +1459,6 @@ public:
std::string raceStr, classStr = "None";
uint8 gender = 0;
int8 locale = handler->GetSessionDbcLocale();
- std::string genderStr = handler->GetTrinityString(LANG_ERROR);
uint32 totalPlayerTime = 0;
uint8 level = 0;
std::string alive = handler->GetTrinityString(LANG_ERROR);
@@ -1610,16 +1609,7 @@ public:
banReason = fields[3].GetString();
}
- // Can be used to query data from World database
- stmt2 = WorldDatabase.GetPreparedStatement(WORLD_SEL_REQ_XP);
- stmt2->setUInt8(0, level);
- PreparedQueryResult result3 = WorldDatabase.Query(stmt2);
- if (result3)
- {
- Field* fields = result3->Fetch();
- xptotal = fields[0].GetUInt32();
- }
// Can be used to query data from Characters database
stmt2 = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PINFO_XP);
@@ -1631,6 +1621,7 @@ public:
Field* fields = result4->Fetch();
xp = fields[0].GetUInt32(); // Used for "current xp" output and "%u XP Left" calculation
uint32 gguid = fields[1].GetUInt32(); // We check if have a guild for the person, so we might not require to query it at all
+ xptotal = sObjectMgr->GetXPForLevel(level);
if (gguid != 0)
{
@@ -1767,10 +1758,10 @@ public:
Player* player = handler->GetSession()->GetPlayer();
// accept only explicitly selected target (not implicitly self targeting case)
- Unit* target = handler->getSelectedUnit();
- if (player->GetTarget() && target)
+ Creature* target = player->GetTarget() ? handler->getSelectedCreature() : nullptr;
+ if (target)
{
- if (target->GetTypeId() != TYPEID_UNIT || target->IsPet())
+ if (target->IsPet())
{
handler->SendSysMessage(LANG_SELECT_CREATURE);
handler->SetSentErrorMessage(true);
@@ -1778,19 +1769,13 @@ public:
}
if (target->isDead())
- target->ToCreature()->Respawn();
+ target->Respawn();
return true;
}
- CellCoord p(Trinity::ComputeCellCoord(player->GetPositionX(), player->GetPositionY()));
- Cell cell(p);
- cell.SetNoCreate();
-
Trinity::RespawnDo u_do;
Trinity::WorldObjectWorker<Trinity::RespawnDo> worker(player, u_do);
-
- TypeContainerVisitor<Trinity::WorldObjectWorker<Trinity::RespawnDo>, GridTypeMapContainer > obj_worker(worker);
- cell.Visit(p, obj_worker, *player->GetMap(), *player, player->GetGridActivationRange());
+ player->VisitNearbyGridObject(player->GetGridActivationRange(), worker);
return true;
}
@@ -1844,14 +1829,9 @@ public:
std::string nameLink = handler->playerLink(targetName);
if (sWorld->getBoolConfig(CONFIG_SHOW_MUTE_IN_WORLD))
- {
- sWorld->SendWorldText(LANG_COMMAND_MUTEMESSAGE_WORLD, (handler->GetSession() ? handler->GetSession()->GetPlayerName().c_str() : "Server"), nameLink.c_str(), notSpeakTime, muteReasonStr.c_str());
- ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, notSpeakTime, muteBy.c_str(), muteReasonStr.c_str());
- }
- else
- {
- ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, notSpeakTime, muteBy.c_str(), muteReasonStr.c_str());
- }
+ sWorld->SendWorldText(LANG_COMMAND_MUTEMESSAGE_WORLD, muteBy.c_str(), nameLink.c_str(), notSpeakTime, muteReasonStr.c_str());
+
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, notSpeakTime, muteBy.c_str(), muteReasonStr.c_str());
}
else
{
@@ -1866,10 +1846,11 @@ public:
LoginDatabase.Execute(stmt);
std::string nameLink = handler->playerLink(targetName);
- if (sWorld->getBoolConfig(CONFIG_SHOW_MUTE_IN_WORLD) && !target)
- sWorld->SendWorldText(LANG_COMMAND_MUTEMESSAGE_WORLD, handler->GetSession()->GetPlayerName().c_str(), nameLink.c_str(), notSpeakTime, muteReasonStr.c_str());
- else
- handler->PSendSysMessage(target ? LANG_YOU_DISABLE_CHAT : LANG_COMMAND_DISABLE_CHAT_DELAYED, nameLink.c_str(), notSpeakTime, muteReasonStr.c_str());
+ if (sWorld->getBoolConfig(CONFIG_SHOW_MUTE_IN_WORLD) && !target)
+ sWorld->SendWorldText(LANG_COMMAND_MUTEMESSAGE_WORLD, muteBy.c_str(), nameLink.c_str(), notSpeakTime, muteReasonStr.c_str());
+ else
+ handler->PSendSysMessage(target ? LANG_YOU_DISABLE_CHAT : LANG_COMMAND_DISABLE_CHAT_DELAYED, nameLink.c_str(), notSpeakTime, muteReasonStr.c_str());
+
return true;
}
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp
index f39dd0f0616..70aacbfc227 100644
--- a/src/server/scripts/Commands/cs_reload.cpp
+++ b/src/server/scripts/Commands/cs_reload.cpp
@@ -47,7 +47,7 @@ class reload_commandscript : public CommandScript
public:
reload_commandscript() : CommandScript("reload_commandscript") { }
- ChatCommand* GetCommands() const
+ ChatCommand* GetCommands() const override
{
static ChatCommand reloadAllCommandTable[] =
{
@@ -440,7 +440,7 @@ public:
continue;
}
- CreatureTemplate* cInfo = const_cast<CreatureTemplate*>(sObjectMgr->GetCreatureTemplate(entry));
+ CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(entry);
if (!cInfo)
{
handler->PSendSysMessage(LANG_COMMAND_CREATURESTORAGE_NOTFOUND, entry);
@@ -450,89 +450,7 @@ public:
TC_LOG_INFO("misc", "Reloading creature template entry %u", entry);
Field* fields = result->Fetch();
-
- cInfo->DifficultyEntry[0] = fields[0].GetUInt32();
- cInfo->DifficultyEntry[1] = fields[1].GetUInt32();
- cInfo->DifficultyEntry[2] = fields[2].GetUInt32();
- cInfo->KillCredit[0] = fields[3].GetUInt32();
- cInfo->KillCredit[1] = fields[4].GetUInt32();
- cInfo->Modelid1 = fields[5].GetUInt32();
- cInfo->Modelid2 = fields[6].GetUInt32();
- cInfo->Modelid3 = fields[7].GetUInt32();
- cInfo->Modelid4 = fields[8].GetUInt32();
- cInfo->Name = fields[9].GetString();
- cInfo->SubName = fields[10].GetString();
- cInfo->IconName = fields[11].GetString();
- cInfo->GossipMenuId = fields[12].GetUInt32();
- cInfo->minlevel = fields[13].GetUInt8();
- cInfo->maxlevel = fields[14].GetUInt8();
- cInfo->expansion = fields[15].GetUInt16();
- cInfo->faction = fields[16].GetUInt16();
- cInfo->npcflag = fields[17].GetUInt32();
- cInfo->speed_walk = fields[18].GetFloat();
- cInfo->speed_run = fields[19].GetFloat();
- cInfo->scale = fields[20].GetFloat();
- cInfo->rank = fields[21].GetUInt8();
- cInfo->mindmg = fields[22].GetFloat();
- cInfo->maxdmg = fields[23].GetFloat();
- cInfo->dmgschool = fields[24].GetUInt8();
- cInfo->attackpower = fields[25].GetUInt32();
- cInfo->dmg_multiplier = fields[26].GetFloat();
- cInfo->baseattacktime = fields[27].GetUInt32();
- cInfo->rangeattacktime = fields[28].GetUInt32();
- cInfo->unit_class = fields[29].GetUInt8();
- cInfo->unit_flags = fields[30].GetUInt32();
- cInfo->unit_flags2 = fields[31].GetUInt32();
- cInfo->dynamicflags = fields[32].GetUInt32();
- cInfo->family = fields[33].GetUInt8();
- cInfo->trainer_type = fields[34].GetUInt8();
- cInfo->trainer_spell = fields[35].GetUInt32();
- cInfo->trainer_class = fields[36].GetUInt8();
- cInfo->trainer_race = fields[37].GetUInt8();
- cInfo->minrangedmg = fields[38].GetFloat();
- cInfo->maxrangedmg = fields[39].GetFloat();
- cInfo->rangedattackpower = fields[40].GetUInt16();
- cInfo->type = fields[41].GetUInt8();
- cInfo->type_flags = fields[42].GetUInt32();
- cInfo->lootid = fields[43].GetUInt32();
- cInfo->pickpocketLootId = fields[44].GetUInt32();
- cInfo->SkinLootId = fields[45].GetUInt32();
-
- for (uint8 i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
- cInfo->resistance[i] = fields[46 + i -1].GetUInt16();
-
- cInfo->spells[0] = fields[52].GetUInt32();
- cInfo->spells[1] = fields[53].GetUInt32();
- cInfo->spells[2] = fields[54].GetUInt32();
- cInfo->spells[3] = fields[55].GetUInt32();
- cInfo->spells[4] = fields[56].GetUInt32();
- cInfo->spells[5] = fields[57].GetUInt32();
- cInfo->spells[6] = fields[58].GetUInt32();
- cInfo->spells[7] = fields[59].GetUInt32();
- cInfo->PetSpellDataId = fields[60].GetUInt32();
- cInfo->VehicleId = fields[61].GetUInt32();
- cInfo->mingold = fields[62].GetUInt32();
- cInfo->maxgold = fields[63].GetUInt32();
- cInfo->AIName = fields[64].GetString();
- cInfo->MovementType = fields[65].GetUInt8();
- cInfo->InhabitType = fields[66].GetUInt8();
- cInfo->HoverHeight = fields[67].GetFloat();
- cInfo->ModHealth = fields[68].GetFloat();
- cInfo->ModMana = fields[69].GetFloat();
- cInfo->ModArmor = fields[70].GetFloat();
- cInfo->RacialLeader = fields[71].GetBool();
- cInfo->questItems[0] = fields[72].GetUInt32();
- cInfo->questItems[1] = fields[73].GetUInt32();
- cInfo->questItems[2] = fields[74].GetUInt32();
- cInfo->questItems[3] = fields[75].GetUInt32();
- cInfo->questItems[4] = fields[76].GetUInt32();
- cInfo->questItems[5] = fields[77].GetUInt32();
- cInfo->movementId = fields[78].GetUInt32();
- cInfo->RegenHealth = fields[79].GetBool();
- cInfo->MechanicImmuneMask = fields[80].GetUInt32();
- cInfo->flags_extra = fields[81].GetUInt32();
- cInfo->ScriptID = sObjectMgr->GetScriptId(fields[82].GetCString());
-
+ sObjectMgr->LoadCreatureTemplate(fields);
sObjectMgr->CheckCreatureTemplate(cInfo);
}
diff --git a/src/server/scripts/Commands/cs_ticket.cpp b/src/server/scripts/Commands/cs_ticket.cpp
index 2f0b53bff68..a2f1c75106b 100644
--- a/src/server/scripts/Commands/cs_ticket.cpp
+++ b/src/server/scripts/Commands/cs_ticket.cpp
@@ -36,7 +36,7 @@ class ticket_commandscript : public CommandScript
public:
ticket_commandscript() : CommandScript("ticket_commandscript") { }
- ChatCommand* GetCommands() const
+ ChatCommand* GetCommands() const override
{
static ChatCommand ticketResponseCommandTable[] =
{
diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
index f996bcc6f70..e3021ff7a95 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
@@ -47,27 +47,20 @@ class npc_willix : public CreatureScript
public:
npc_willix() : CreatureScript("npc_willix") { }
- bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) override
- {
- if (quest->GetQuestId() == QUEST_WILLIX_THE_IMPORTER)
- {
- ENSURE_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
- creature->AI()->Talk(SAY_READY, player);
- creature->setFaction(113);
- }
-
- return true;
- }
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_willixAI(creature);
- }
-
struct npc_willixAI : public npc_escortAI
{
npc_willixAI(Creature* creature) : npc_escortAI(creature) { }
+ void sQuestAccept(Player* player, Quest const* quest) override
+ {
+ if (quest->GetQuestId() == QUEST_WILLIX_THE_IMPORTER)
+ {
+ Start(true, false, player->GetGUID());
+ Talk(SAY_READY, player);
+ me->setFaction(113);
+ }
+ }
+
void WaypointReached(uint32 waypointId) override
{
Player* player = GetPlayerForEscort();
@@ -137,6 +130,10 @@ public:
}
};
+ CreatureAI* GetAI(Creature* creature) const override
+ {
+ return new npc_willixAI(creature);
+ }
};
enum SnufflenoseGopher
@@ -147,18 +144,6 @@ enum SnufflenoseGopher
POINT_TUBBER = 0
};
-struct DistanceOrder : public std::binary_function<GameObject, GameObject, bool>
-{
- DistanceOrder(Creature* me) : me(me) { }
-
- bool operator() (GameObject* first, GameObject* second)
- {
- return me->GetDistanceOrder(first, second);
- }
-
- Creature* me;
-};
-
struct npc_snufflenose_gopher : public CreatureScript
{
public:
@@ -208,18 +193,14 @@ public:
if (tubbersInRange.empty())
return;
- tubbersInRange.sort(DistanceOrder(me));
- GameObject* nearestTubber = NULL;
-
- for (std::list<GameObject*>::const_iterator itr = tubbersInRange.begin(); itr != tubbersInRange.end(); ++itr)
+ tubbersInRange.remove_if([](GameObject* go)
{
- if (!(*itr)->isSpawned() && (*itr)->HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND))
- {
- nearestTubber = *itr;
- break;
- }
- }
+ return go->isSpawned() || !go->HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND);
+ });
+ tubbersInRange.sort(Trinity::ObjectDistanceOrderPred(me));
+
+ GameObject* nearestTubber = tubbersInRange.front();
if (!nearestTubber)
return;
@@ -259,21 +240,16 @@ class spell_snufflenose_command : public SpellScriptLoader
{
PrepareSpellScript(spell_snufflenose_commandSpellScript);
- bool Load() override
- {
- return GetCaster()->GetTypeId() == TYPEID_PLAYER;
- }
-
- void HandleAfterCast()
+ void HandleEffect(SpellEffIndex /*effIndex*/)
{
- if (Unit* target = GetCaster()->ToPlayer()->GetSelectedUnit())
+ if (Creature* target = GetHitCreature())
if (target->GetEntry() == NPC_SNUFFLENOSE_GOPHER)
- target->ToCreature()->AI()->DoAction(ACTION_FIND_NEW_TUBBER);
+ target->AI()->DoAction(ACTION_FIND_NEW_TUBBER);
}
void Register() override
{
- AfterCast += SpellCastFn(spell_snufflenose_commandSpellScript::HandleAfterCast);
+ OnEffectHitTarget += SpellEffectFn(spell_snufflenose_commandSpellScript::HandleEffect, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
index e1658e564ec..5ef84c7bb40 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
@@ -299,6 +299,12 @@ class boss_deathbringer_saurfang : public CreatureScript
_introDone = true;
+ if (GameObject* teleporter = GameObject::GetGameObject(*me, instance->GetData64(GO_SCOURGE_TRANSPORTER_DEATHBRINGER)))
+ {
+ instance->HandleGameObject(0, false, teleporter);
+ teleporter->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ }
+
Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_SUMMON_BLOOD_BEAST, 30000, 0, PHASE_COMBAT);
events.ScheduleEvent(EVENT_BERSERK, IsHeroic() ? 360000 : 480000, 0, PHASE_COMBAT);
@@ -538,12 +544,6 @@ class boss_deathbringer_saurfang : public CreatureScript
case PHASE_INTRO_A:
case PHASE_INTRO_H:
{
- if (GameObject* teleporter = GameObject::GetGameObject(*me, instance->GetData64(GO_SCOURGE_TRANSPORTER_SAURFANG)))
- {
- instance->HandleGameObject(0, false, teleporter);
- teleporter->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
- }
-
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
// controls what events will execute
events.SetPhase(uint32(action));
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
index 592c44940a4..e85ddc21dda 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
@@ -2102,7 +2102,15 @@ class at_icc_shutdown_traps : public AreaTriggerScript
bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
{
if (InstanceScript* instance = player->GetInstanceScript())
- instance->SetData(DATA_COLDFLAME_JETS, DONE);
+ {
+ instance->SetData(DATA_UPPERSPIRE_TELE_ACT, DONE);
+ uint64 teleporterGUID = instance->GetData64(GO_SCOURGE_TRANSPORTER_UPPERSPIRE);
+ if (GameObject* go = instance->instance->GetGameObject(teleporterGUID))
+ {
+ go->SetGoState(GO_STATE_ACTIVE);
+ go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ }
+ }
return true;
}
};
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
index da4a8f089cc..fbd3a715fb8 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
@@ -116,7 +116,8 @@ enum DataTypes
DATA_HIGHLORD_TIRION_FORDRING = 37,
DATA_ARTHAS_PLATFORM = 38,
DATA_TERENAS_MENETHIL = 39,
- DATA_ENEMY_GUNSHIP = 40
+ DATA_ENEMY_GUNSHIP = 40,
+ DATA_UPPERSPIRE_TELE_ACT = 41,
};
enum CreaturesIds
@@ -322,6 +323,15 @@ enum CreaturesIds
enum GameObjectsIds
{
+ // ICC Teleporters
+ GO_SCOURGE_TRANSPORTER_LICHKING = 202223,
+ GO_SCOURGE_TRANSPORTER_UPPERSPIRE = 202235,
+ GO_SCOURGE_TRANSPORTER_LIGHTSHAMMER = 202242,
+ GO_SCOURGE_TRANSPORTER_RAMPART = 202243,
+ GO_SCOURGE_TRANSPORTER_DEATHBRINGER = 202244,
+ GO_SCOURGE_TRANSPORTER_ORATORY = 202245,
+ GO_SCOURGE_TRANSPORTER_SINDRAGOSA = 202246,
+
// Lower Spire Trash
GO_SPIRIT_ALARM_1 = 201814,
GO_SPIRIT_ALARM_2 = 201815,
@@ -359,7 +369,6 @@ enum GameObjectsIds
GO_DEATHBRINGER_S_CACHE_25N = 202240,
GO_DEATHBRINGER_S_CACHE_10H = 202238,
GO_DEATHBRINGER_S_CACHE_25H = 202241,
- GO_SCOURGE_TRANSPORTER_SAURFANG = 202244,
// Professor Putricide
GO_ORANGE_PLAGUE_MONSTER_ENTRANCE = 201371,
@@ -404,7 +413,6 @@ enum GameObjectsIds
GO_SIGIL_OF_THE_FROSTWING = 202181,
// The Lich King
- GO_SCOURGE_TRANSPORTER_LK = 202223,
GO_ARTHAS_PLATFORM = 202161,
GO_ARTHAS_PRECIPICE = 202078,
GO_DOODAD_ICECROWN_THRONEFROSTYWIND01 = 202188,
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
index 537c3c7354d..469bfc1d310 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
@@ -31,19 +31,23 @@ class icecrown_citadel_teleport : public GameObjectScript
bool OnGossipHello(Player* player, GameObject* go) override
{
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to Light's Hammer.", GOSSIP_SENDER_ICC_PORT, LIGHT_S_HAMMER_TELEPORT);
if (InstanceScript* instance = go->GetInstanceScript())
{
if (instance->GetBossState(DATA_LORD_MARROWGAR) == DONE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Oratory of the Damned.", GOSSIP_SENDER_ICC_PORT, ORATORY_OF_THE_DAMNED_TELEPORT);
- if (instance->GetBossState(DATA_LADY_DEATHWHISPER) == DONE)
+ {
+ if (go->GetEntry() != GO_SCOURGE_TRANSPORTER_LIGHTSHAMMER)
+ player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to Light's Hammer.", GOSSIP_SENDER_ICC_PORT, LIGHT_S_HAMMER_TELEPORT);
+ if (go->GetEntry() != GO_SCOURGE_TRANSPORTER_ORATORY)
+ player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Oratory of the Damned.", GOSSIP_SENDER_ICC_PORT, ORATORY_OF_THE_DAMNED_TELEPORT);
+ }
+ if (instance->GetBossState(DATA_LADY_DEATHWHISPER) == DONE && go->GetEntry() != GO_SCOURGE_TRANSPORTER_RAMPART)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Rampart of Skulls.", GOSSIP_SENDER_ICC_PORT, RAMPART_OF_SKULLS_TELEPORT);
- if (instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == DONE)
+ if (instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == DONE && go->GetEntry() != GO_SCOURGE_TRANSPORTER_DEATHBRINGER)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Deathbringer's Rise.", GOSSIP_SENDER_ICC_PORT, DEATHBRINGER_S_RISE_TELEPORT);
- if (instance->GetData(DATA_COLDFLAME_JETS) == DONE)
+ if (instance->GetData(DATA_UPPERSPIRE_TELE_ACT) == DONE && go->GetEntry() != GO_SCOURGE_TRANSPORTER_UPPERSPIRE)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Upper Spire.", GOSSIP_SENDER_ICC_PORT, UPPER_SPIRE_TELEPORT);
/// @todo Gauntlet event before Sindragosa
- if (instance->GetBossState(DATA_VALITHRIA_DREAMWALKER) == DONE)
+ if (instance->GetBossState(DATA_VALITHRIA_DREAMWALKER) == DONE && go->GetEntry() != GO_SCOURGE_TRANSPORTER_SINDRAGOSA)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to Sindragosa's Lair", GOSSIP_SENDER_ICC_PORT, SINDRAGOSA_S_LAIR_TELEPORT);
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
index df5e3b795d5..f7f8e3e2489 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
@@ -127,7 +127,13 @@ class instance_icecrown_citadel : public InstanceMapScript
DeathbringerSaurfangDoorGUID = 0;
DeathbringerSaurfangEventGUID = 0;
DeathbringersCacheGUID = 0;
- SaurfangTeleportGUID = 0;
+ TeleporterLichKingGUID = 0;
+ TeleporterUpperSpireGUID = 0;
+ TeleporterLightsHammerGUID = 0;
+ TeleporterRampartsGUID = 0;
+ TeleporterDeathBringerGUID = 0;
+ TeleporterOratoryGUID = 0;
+ TeleporterSindragosaGUID = 0;
PlagueSigilGUID = 0;
BloodwingSigilGUID = 0;
FrostwingSigilGUID = 0;
@@ -164,10 +170,26 @@ class instance_icecrown_citadel : public InstanceMapScript
IsNauseaEligible = true;
IsOrbWhispererEligible = true;
ColdflameJetsState = NOT_STARTED;
+ UpperSpireTeleporterActiveState = NOT_STARTED;
BloodQuickeningState = NOT_STARTED;
BloodQuickeningMinutes = 0;
}
+ // A function to help reduce the number of lines for teleporter management.
+ void SetTeleporterState(GameObject* go, bool usable)
+ {
+ if (usable)
+ {
+ go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ go->SetGoState(GO_STATE_ACTIVE);
+ }
+ else
+ {
+ go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ go->SetGoState(GO_STATE_READY);
+ }
+ }
+
void FillInitialWorldStates(WorldPacket& data) override
{
data << uint32(WORLDSTATE_SHOW_TIMER) << uint32(BloodQuickeningState == IN_PROGRESS);
@@ -542,8 +564,37 @@ class instance_icecrown_citadel : public InstanceMapScript
case GO_DEATHBRINGER_S_CACHE_25H:
DeathbringersCacheGUID = go->GetGUID();
break;
- case GO_SCOURGE_TRANSPORTER_SAURFANG:
- SaurfangTeleportGUID = go->GetGUID();
+ case GO_SCOURGE_TRANSPORTER_LICHKING:
+ TeleporterLichKingGUID = go->GetGUID();
+ if (GetBossState(DATA_PROFESSOR_PUTRICIDE) == DONE && GetBossState(DATA_BLOOD_QUEEN_LANA_THEL) == DONE && GetBossState(DATA_SINDRAGOSA) == DONE)
+ go->SetGoState(GO_STATE_ACTIVE);
+ break;
+ case GO_SCOURGE_TRANSPORTER_UPPERSPIRE:
+ TeleporterUpperSpireGUID = go->GetGUID();
+ if (GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE || GetData(DATA_UPPERSPIRE_TELE_ACT) != DONE)
+ SetTeleporterState(go, false);
+ else
+ SetTeleporterState(go, true);
+ break;
+ case GO_SCOURGE_TRANSPORTER_LIGHTSHAMMER:
+ TeleporterLightsHammerGUID = go->GetGUID();
+ SetTeleporterState(go, GetBossState(DATA_LORD_MARROWGAR) == DONE);
+ break;
+ case GO_SCOURGE_TRANSPORTER_RAMPART:
+ TeleporterRampartsGUID = go->GetGUID();
+ SetTeleporterState(go, GetBossState(DATA_LADY_DEATHWHISPER) == DONE);
+ break;
+ case GO_SCOURGE_TRANSPORTER_DEATHBRINGER:
+ TeleporterDeathBringerGUID = go->GetGUID();
+ SetTeleporterState(go, GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == DONE);
+ break;
+ case GO_SCOURGE_TRANSPORTER_ORATORY:
+ TeleporterOratoryGUID = go->GetGUID();
+ SetTeleporterState(go, GetBossState(DATA_LORD_MARROWGAR) == DONE);
+ break;
+ case GO_SCOURGE_TRANSPORTER_SINDRAGOSA:
+ TeleporterSindragosaGUID = go->GetGUID();
+ SetTeleporterState(go, GetBossState(DATA_VALITHRIA_DREAMWALKER) == DONE);
break;
case GO_PLAGUE_SIGIL:
PlagueSigilGUID = go->GetGUID();
@@ -600,11 +651,6 @@ class instance_icecrown_citadel : public InstanceMapScript
go->SetLootRecipient(valithria->GetLootRecipient());
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN);
break;
- case GO_SCOURGE_TRANSPORTER_LK:
- TheLichKingTeleportGUID = go->GetGUID();
- if (GetBossState(DATA_PROFESSOR_PUTRICIDE) == DONE && GetBossState(DATA_BLOOD_QUEEN_LANA_THEL) == DONE && GetBossState(DATA_SINDRAGOSA) == DONE)
- go->SetGoState(GO_STATE_ACTIVE);
- break;
case GO_ARTHAS_PLATFORM:
// this enables movement at The Frozen Throne, when printed this value is 0.000000f
// however, when represented as integer client will accept only this value
@@ -694,6 +740,8 @@ class instance_icecrown_citadel : public InstanceMapScript
return RimefangTrash.size();
case DATA_COLDFLAME_JETS:
return ColdflameJetsState;
+ case DATA_UPPERSPIRE_TELE_ACT:
+ return UpperSpireTeleporterActiveState;
case DATA_TEAM_IN_INSTANCE:
return TeamInInstance;
case DATA_BLOOD_QUICKENING_STATE:
@@ -721,8 +769,20 @@ class instance_icecrown_citadel : public InstanceMapScript
return DeathbringerSaurfangEventGUID;
case GO_SAURFANG_S_DOOR:
return DeathbringerSaurfangDoorGUID;
- case GO_SCOURGE_TRANSPORTER_SAURFANG:
- return SaurfangTeleportGUID;
+ case GO_SCOURGE_TRANSPORTER_LICHKING:
+ return TeleporterLichKingGUID;
+ case GO_SCOURGE_TRANSPORTER_UPPERSPIRE:
+ return TeleporterUpperSpireGUID;
+ case GO_SCOURGE_TRANSPORTER_LIGHTSHAMMER:
+ return TeleporterLightsHammerGUID;
+ case GO_SCOURGE_TRANSPORTER_RAMPART:
+ return TeleporterRampartsGUID;
+ case GO_SCOURGE_TRANSPORTER_DEATHBRINGER:
+ return TeleporterDeathBringerGUID;
+ case GO_SCOURGE_TRANSPORTER_ORATORY:
+ return TeleporterOratoryGUID;
+ case GO_SCOURGE_TRANSPORTER_SINDRAGOSA:
+ return TeleporterSindragosaGUID;
case DATA_FESTERGUT:
return FestergutGUID;
case DATA_ROTFACE:
@@ -784,10 +844,24 @@ class instance_icecrown_citadel : public InstanceMapScript
switch (type)
{
+ case DATA_LORD_MARROWGAR:
+ {
+ if (state == DONE)
+ {
+ if (GameObject* teleporter = instance->GetGameObject(TeleporterLightsHammerGUID))
+ SetTeleporterState(teleporter, true);
+ if (GameObject* teleporter = instance->GetGameObject(TeleporterOratoryGUID))
+ SetTeleporterState(teleporter, true);
+ }
+ break;
+ }
case DATA_LADY_DEATHWHISPER:
{
if (state == DONE)
{
+ if (GameObject* teleporter = instance->GetGameObject(TeleporterRampartsGUID))
+ SetTeleporterState(teleporter, true);
+
if (GameObject* elevator = instance->GetGameObject(LadyDeathwisperElevatorGUID))
{
elevator->SetUInt32Value(GAMEOBJECT_LEVEL, 0);
@@ -801,6 +875,9 @@ class instance_icecrown_citadel : public InstanceMapScript
case DATA_ICECROWN_GUNSHIP_BATTLE:
if (state == DONE)
{
+ if (GameObject* teleporter = instance->GetGameObject(TeleporterDeathBringerGUID))
+ SetTeleporterState(teleporter, true);
+
if (GameObject* loot = instance->GetGameObject(GunshipArmoryGUID))
loot->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN);
}
@@ -811,20 +888,28 @@ class instance_icecrown_citadel : public InstanceMapScript
switch (state)
{
case DONE:
+ {
if (GameObject* loot = instance->GetGameObject(DeathbringersCacheGUID))
{
if (Creature* deathbringer = instance->GetCreature(DeathbringerSaurfangGUID))
loot->SetLootRecipient(deathbringer->GetLootRecipient());
loot->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN);
}
- // no break
+
+ if (GameObject* teleporter = instance->GetGameObject(TeleporterUpperSpireGUID))
+ SetTeleporterState(teleporter, true);
+
+ if (GameObject* teleporter = instance->GetGameObject(TeleporterDeathBringerGUID))
+ SetTeleporterState(teleporter, true);
+ break;
+ }
case NOT_STARTED:
- if (GameObject* teleporter = instance->GetGameObject(SaurfangTeleportGUID))
- {
- HandleGameObject(SaurfangTeleportGUID, true, teleporter);
- teleporter->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
- }
+ {
+ if (GameObject* teleporter = instance->GetGameObject(TeleporterDeathBringerGUID))
+ SetTeleporterState(teleporter, true);
+
break;
+ }
default:
break;
}
@@ -894,8 +979,13 @@ class instance_icecrown_citadel : public InstanceMapScript
}
break;
case DATA_VALITHRIA_DREAMWALKER:
- if (state == DONE && sPoolMgr->IsSpawnedObject<Quest>(WeeklyQuestData[8].questId[instance->GetSpawnMode() & 1]))
- instance->SummonCreature(NPC_VALITHRIA_DREAMWALKER_QUEST, ValithriaSpawnPos);
+ if (state == DONE)
+ {
+ if (sPoolMgr->IsSpawnedObject<Quest>(WeeklyQuestData[8].questId[instance->GetSpawnMode() & 1]))
+ instance->SummonCreature(NPC_VALITHRIA_DREAMWALKER_QUEST, ValithriaSpawnPos);
+ if (GameObject* teleporter = instance->GetGameObject(TeleporterSindragosaGUID))
+ SetTeleporterState(teleporter, true);
+ }
break;
case DATA_SINDRAGOSA:
HandleGameObject(FrostwingSigilGUID, state != DONE);
@@ -1029,6 +1119,11 @@ class instance_icecrown_citadel : public InstanceMapScript
SaveToDB();
break;
}
+ case DATA_UPPERSPIRE_TELE_ACT:
+ UpperSpireTeleporterActiveState = data;
+ if (UpperSpireTeleporterActiveState == DONE)
+ SaveToDB();
+ break;
default:
break;
}
@@ -1235,7 +1330,7 @@ class instance_icecrown_citadel : public InstanceMapScript
std::ostringstream saveStream;
saveStream << "I C " << GetBossSaveData() << HeroicAttempts << ' '
- << ColdflameJetsState << ' ' << BloodQuickeningState << ' ' << BloodQuickeningMinutes;
+ << ColdflameJetsState << ' ' << BloodQuickeningState << ' ' << BloodQuickeningMinutes << ' ' << UpperSpireTeleporterActiveState;
OUT_SAVE_INST_DATA_COMPLETE;
return saveStream.str();
@@ -1271,11 +1366,17 @@ class instance_icecrown_citadel : public InstanceMapScript
uint32 temp = 0;
loadStream >> temp;
- ColdflameJetsState = temp ? DONE : NOT_STARTED;
+ if (temp == IN_PROGRESS)
+ ColdflameJetsState = NOT_STARTED;
+ else
+ ColdflameJetsState = temp ? DONE : NOT_STARTED;
loadStream >> temp;
BloodQuickeningState = temp ? DONE : NOT_STARTED; // DONE means finished (not success/fail)
loadStream >> BloodQuickeningMinutes;
+
+ loadStream >> temp;
+ UpperSpireTeleporterActiveState = temp ? DONE : NOT_STARTED;
}
else
OUT_LOAD_INST_DATA_FAIL;
@@ -1416,7 +1517,13 @@ class instance_icecrown_citadel : public InstanceMapScript
uint64 DeathbringerSaurfangDoorGUID;
uint64 DeathbringerSaurfangEventGUID; // Muradin Bronzebeard or High Overlord Saurfang
uint64 DeathbringersCacheGUID;
- uint64 SaurfangTeleportGUID;
+ uint64 TeleporterLichKingGUID;
+ uint64 TeleporterUpperSpireGUID;
+ uint64 TeleporterLightsHammerGUID;
+ uint64 TeleporterRampartsGUID;
+ uint64 TeleporterDeathBringerGUID;
+ uint64 TeleporterOratoryGUID;
+ uint64 TeleporterSindragosaGUID;
uint64 PlagueSigilGUID;
uint64 BloodwingSigilGUID;
uint64 FrostwingSigilGUID;
@@ -1453,6 +1560,7 @@ class instance_icecrown_citadel : public InstanceMapScript
uint64 PillarsUnchainedGUID;
uint32 TeamInInstance;
uint32 ColdflameJetsState;
+ uint32 UpperSpireTeleporterActiveState;
std::set<uint32> FrostwyrmGUIDs;
std::set<uint32> SpinestalkerTrash;
std::set<uint32> RimefangTrash;
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
index f284aacf996..b769c7e141e 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
@@ -15,10 +15,16 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "Cell.h"
+#include "CellImpl.h"
+#include "GridNotifiers.h"
+#include "GridNotifiersImpl.h"
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "SpellScript.h"
+#include "SpellAuraEffects.h"
#include "ulduar.h"
+#include "Vehicle.h"
enum Yells
{
@@ -39,78 +45,1413 @@ enum Yells
SAY_BERSERK = 14
};
+enum ComputerYells
+{
+ SAY_SELF_DESTRUCT_INITIATED = 0,
+ SAY_SELF_DESTRUCT_TERMINATED = 1,
+ SAY_SELF_DESTRUCT_10 = 2,
+ SAY_SELF_DESTRUCT_9 = 3,
+ SAY_SELF_DESTRUCT_8 = 4,
+ SAY_SELF_DESTRUCT_7 = 5,
+ SAY_SELF_DESTRUCT_6 = 6,
+ SAY_SELF_DESTRUCT_5 = 7,
+ SAY_SELF_DESTRUCT_4 = 8,
+ SAY_SELF_DESTRUCT_3 = 9,
+ SAY_SELF_DESTRUCT_2 = 10,
+ SAY_SELF_DESTRUCT_1 = 11,
+ SAY_SELF_DESTRUCT_FINALIZED = 12
+};
+
enum Spells
{
+ // Mimiron
+ SPELL_WELD = 63339, // Idle aura.
+ SPELL_SEAT_1 = 52391, // Cast on all vehicles, Cycled on MKII
+ SPELL_SEAT_2 = 63313, // Cast on MKII and VX-001, Cycled on MKII
+ SPELL_SEAT_3 = 63314, // Cast on MKII, Cycled on MKII
+ SPELL_SEAT_5 = 63316, // Cast on MKII and VX-001, Cycled on MKII
+ SPELL_SEAT_6 = 63344, // Cast on MKII
+ SPELL_SEAT_7 = 63345, // Cast on MKII
SPELL_JETPACK = 63341,
- SPELL_EMERGENCY_MODE = 64582,
- SPELL_SELF_REPAIR = 64383,
- SPELL_MAGNETIC_CORE = 64444,
+ SPELL_DESPAWN_ASSAULT_BOTS = 64463, // only despawns assault bots... no equivalent spell for the other adds...
+ SPELL_TELEPORT_VISUAL = 41232,
+ SPELL_SLEEP_VISUAL_1 = 64393,
+ SPELL_SLEEP_VISUAL_2 = 64394,
+
// Leviathan MK II
SPELL_FLAME_SUPPRESSANT_MK = 64570,
SPELL_NAPALM_SHELL = 63666,
- SPELL_PLASMA_BLAST = 62977,
- SPELL_PROXIMITY_MINES = 63027,
+ SPELL_FORCE_CAST_NAPALM_SHELL = 64539,
+ SPELL_PLASMA_BLAST = 62997,
+ SPELL_SCRIPT_EFFECT_PLASMA_BLAST = 64542,
SPELL_SHOCK_BLAST = 63631,
- // VX 001
+ SPELL_SHOCK_BLAST_AURA = 63632, // Deprecated? It is never cast.
+
+ // VX-001
SPELL_FLAME_SUPPRESSANT_VX = 65192,
- SPELL_FROSTBOMB = 64623,
- SPELL_HAND_PULSE = 64348,
SPELL_SPINNING_UP = 63414,
- SPELL_RAPID_BURST = 63387,
- SPELL_P3WX2_LASER_BARRAGE = 63293,
- SPELL_ROCKET_STRIKE = 63041,
- SPELL_HEAT_WAVE = 63677,
+ SPELL_HEAT_WAVE_AURA = 63679,
+ SPELL_HAND_PULSE_LEFT = 64348,
+ SPELL_HAND_PULSE_RIGHT = 64352,
+ SPELL_MOUNT_MKII = 64387,
+ SPELL_TORSO_DISABLED = 64120,
+
// Aerial Command Unit
- SPELL_PLASMA_BALL = 63689,
- // Additonal spells
- SPELL_MAGNETIC_FIELD = 64668,
- SPELL_DEAFENING_SIREN = 64616,
+ SPELL_PLASMA_BALL_P1 = 63689,
+ SPELL_PLASMA_BALL_P2 = 65647,
+ SPELL_MOUNT_VX_001 = 64388,
+
+ // Proximity Mines
+ SPELL_PROXIMITY_MINES = 63027, // Cast by Leviathan MK II
+ SPELL_PROXIMITY_MINE_EXPLOSION = 66351,
+ SPELL_PROXIMITY_MINE_TRIGGER = 65346,
+ SPELL_PROXIMITY_MINE_PERIODIC_TRIGGER = 65345,
+ SPELL_PERIODIC_PROXIMITY_AURA = 65345,
+ SPELL_SUMMON_PROXIMITY_MINE = 65347,
+
+ // Rapid Burst
+ SPELL_RAPID_BURST_LEFT = 63387,
+ SPELL_RAPID_BURST_RIGHT = 64019,
+ SPELL_RAPID_BURST = 63382, // Cast by VX-001
+ SPELL_RAPID_BURST_TARGET_ME = 64841, // Cast by Burst Target
+ SPELL_SUMMON_BURST_TARGET = 64840, // Cast by VX-001
+
+ // Rocket Strike
+ SPELL_SUMMON_ROCKET_STRIKE = 63036,
+ SPELL_SCRIPT_EFFECT_ROCKET_STRIKE = 63681, // Cast by Rocket (Mimiron Visual)
+ SPELL_ROCKET_STRIKE = 64064, // Added in creature_template_addon
+ SPELL_ROCKET_STRIKE_LEFT = 64402, // Cast by VX-001
+ SPELL_ROCKET_STRIKE_BOTH = 65034, // Cast by VX-001
+
+ // Flames
+ SPELL_FLAMES_PERIODIC_TRIGGER = 64561, // Added in creature_template_addon
+ SPELL_SUMMON_FLAMES_SPREAD_TRIGGER = 64562,
+ SPELL_SUMMON_FLAMES_INITIAL = 64563,
+ SPELL_SUMMON_FLAMES_SPREAD = 64564,
+ SPELL_FLAMES = 64566,
+ SPELL_SCRIPT_EFFECT_SUMMON_FLAMES_INITIAL = 64567,
+
+ // Frost Bomb
+ SPELL_SCRIPT_EFFECT_FROST_BOMB = 64623, // Cast by VX-001
+ SPELL_FROST_BOMB_LINKED = 64624, // Added in creature_template_addon
+ SPELL_FROST_BOMB_DUMMY = 64625,
+ SPELL_SUMMON_FROST_BOMB = 64627, // Cast by VX-001
+ SPELL_FROST_BOMB_EXPLOSION = 64626,
+ SPELL_CLEAR_FIRES = 65354,
+
+ // Bots
+ SPELL_SUMMON_FIRE_BOT = 64622,
+ SPELL_SUMMON_FIRE_BOT_DUMMY = 64621,
+ SPELL_SUMMON_FIRE_BOT_TRIGGER = 64620, // Cast by Areal Command Unit
+ SPELL_DEAFENING_SIREN = 64616, // Added in creature_template_addon
+ SPELL_FIRE_SEARCH_AURA = 64617, // Added in creature_template_addon
+ SPELL_FIRE_SEARCH = 64618,
SPELL_WATER_SPRAY = 64619,
- SPELL_FROST_BOMB_HARD_MODE = 64627,
- SPELL_EXPLOSION = 66351,
- SPELL_DISARM = 1842,
- SPELL_RIDE_VEHICLE = 46598,
- SPELL_TRIGGER_MISSILE = 65347,
+
+ SPELL_SUMMON_JUNK_BOT = 63819,
+ SPELL_SUMMON_JUNK_BOT_TRIGGER = 63820, // Cast by Areal Command Unit
+ SPELL_SUMMON_JUNK_BOT_DUMMY = 64398,
+
+ SPELL_SUMMON_ASSAULT_BOT_TRIGGER = 64425, // Cast by Areal Command Unit
+ SPELL_SUMMON_ASSAULT_BOT_DUMMY = 64426,
+ SPELL_SUMMON_ASSAULT_BOT = 64427,
+ SPELL_MAGNETIC_FIELD = 64668,
+
+ SPELL_SUMMON_BOMB_BOT = 63811, // Cast by Areal Command Unit
+ SPELL_BOMB_BOT_AURA = 63767, // Added in creature_template_addon
+
+ // Miscellaneous
+ SPELL_SELF_DESTRUCTION_AURA = 64610,
+ SPELL_SELF_DESTRUCTION_VISUAL = 64613,
+ SPELL_NOT_SO_FRIENDLY_FIRE = 65040,
+ SPELL_ELEVATOR_KNOCKBACK = 65096, // Cast by worldtrigger.
+ SPELL_VEHICLE_DAMAGED = 63415,
+ SPELL_EMERGENCY_MODE = 64582, // mkii, vx001, aerial, assault, junk
+ SPELL_EMERGENCY_MODE_TURRET = 65101, // Cast by Leviathan MK II, only hits Leviathan MK II turret
+ SPELL_SELF_REPAIR = 64383,
+ SPELL_MAGNETIC_CORE = 64436,
+ SPELL_MAGNETIC_CORE_VISUAL = 64438,
+ SPELL_HALF_HEAL = 64188,
+ SPELL_CLEAR_ALL_DEBUFFS = 34098, // TODO: make use of this spell...
+ SPELL_FREEZE_ANIM_STUN = 63354, // used to prevent mkii from doing stuff?..
+ SPELL_FREEZE_ANIM = 16245 // Idle aura. Freezes animation.
};
-enum Npc
+enum Data
{
- NPC_ASSAULT_BOT = 34057,
- NPC_BOMB_BOT = 33836,
- NPC_JUNK_BOT = 33855,
- NPC_EMERGENCE_FIRE_BOT = 34147,
- NPC_FROST_BOMB = 34149,
+ DATA_SETUP_MINE,
+ DATA_SETUP_BOMB,
+ DATA_SETUP_ROCKET,
+ DATA_NOT_SO_FRIENDLY_FIRE,
+ DATA_FIREFIGHTER,
+ DATA_WATERSPRAY,
+ DATA_MOVE_NEW
};
-class spell_ulduar_proximity_mines : public SpellScriptLoader
+enum Events
+{
+ // Leviathan MK II
+ EVENT_PROXIMITY_MINE = 1,
+ EVENT_NAPALM_SHELL,
+ EVENT_PLASMA_BLAST,
+ EVENT_SHOCK_BLAST,
+ EVENT_FLAME_SUPPRESSANT_MK,
+ EVENT_MOVE_POINT_2,
+ EVENT_MOVE_POINT_3,
+ EVENT_MOVE_POINT_5,
+
+ // VX-001
+ EVENT_RAPID_BURST,
+ EVENT_SPINNING_UP,
+ EVENT_ROCKET_STRIKE,
+ EVENT_HAND_PULSE,
+ EVENT_FROST_BOMB,
+ EVENT_FLAME_SUPPRESSANT_VX,
+ EVENT_RELOAD,
+
+ // Aerial Command Unit
+ EVENT_SUMMON_FIRE_BOTS,
+ EVENT_SUMMON_JUNK_BOT,
+ EVENT_SUMMON_ASSAULT_BOT,
+ EVENT_SUMMON_BOMB_BOT,
+
+ // Mimiron
+ EVENT_SUMMON_FLAMES,
+ EVENT_INTRO_1,
+ EVENT_INTRO_2,
+ EVENT_INTRO_3,
+
+ EVENT_VX001_ACTIVATION_1,
+ EVENT_VX001_ACTIVATION_2,
+ EVENT_VX001_ACTIVATION_3,
+ EVENT_VX001_ACTIVATION_4,
+ EVENT_VX001_ACTIVATION_5,
+ EVENT_VX001_ACTIVATION_6,
+ EVENT_VX001_ACTIVATION_7,
+ EVENT_VX001_ACTIVATION_8,
+ EVENT_VX001_ACTIVATION_9,
+
+ EVENT_AERIAL_ACTIVATION_1,
+ EVENT_AERIAL_ACTIVATION_2,
+ EVENT_AERIAL_ACTIVATION_3,
+ EVENT_AERIAL_ACTIVATION_4,
+ EVENT_AERIAL_ACTIVATION_5,
+ EVENT_AERIAL_ACTIVATION_6,
+
+ EVENT_VOL7RON_ACTIVATION_1,
+ EVENT_VOL7RON_ACTIVATION_2,
+ EVENT_VOL7RON_ACTIVATION_3,
+ EVENT_VOL7RON_ACTIVATION_4,
+ EVENT_VOL7RON_ACTIVATION_5,
+ EVENT_VOL7RON_ACTIVATION_6,
+ EVENT_VOL7RON_ACTIVATION_7,
+
+ EVENT_OUTTRO_1,
+ EVENT_OUTTRO_2,
+ EVENT_OUTTRO_3,
+
+ // Computer
+ EVENT_SELF_DESTRUCT_10,
+ EVENT_SELF_DESTRUCT_9,
+ EVENT_SELF_DESTRUCT_8,
+ EVENT_SELF_DESTRUCT_7,
+ EVENT_SELF_DESTRUCT_6,
+ EVENT_SELF_DESTRUCT_5,
+ EVENT_SELF_DESTRUCT_4,
+ EVENT_SELF_DESTRUCT_3,
+ EVENT_SELF_DESTRUCT_2,
+ EVENT_SELF_DESTRUCT_1,
+ EVENT_SELF_DESTRUCT_FINALIZED,
+
+ // Misc
+ EVENT_MAGNETIC_FIELD,
+ EVENT_SPREAD_FLAMES,
+ EVENT_FROST_BOMB_EXPLOSION,
+ EVENT_FROST_BOMB_CLEAR_FIRES,
+ EVENT_PROXIMITY_MINE_ARM,
+ EVENT_PROXIMITY_MINE_DETONATION,
+ EVENT_SEARCH_FLAMES,
+ EVENT_WATER_SPRAY
+};
+
+enum Actions
+{
+ DO_START_MKII,
+ DO_HARDMODE_MKII,
+
+ DO_ACTIVATE_VX001,
+ DO_START_VX001,
+ DO_HARDMODE_VX001,
+
+ DO_ACTIVATE_AERIAL,
+ DO_START_AERIAL,
+ DO_HARDMODE_AERIAL,
+ DO_DISABLE_AERIAL,
+ DO_ENABLE_AERIAL,
+
+ DO_ACTIVATE_V0L7R0N_1,
+ DO_ACTIVATE_V0L7R0N_2,
+ DO_ASSEMBLED_COMBAT, // All 3 parts use this action, its done on purpose.
+
+ DO_ACTIVATE_HARD_MODE,
+ DO_ACTIVATE_COMPUTER,
+ DO_DEACTIVATE_COMPUTER,
+ DO_ACTIVATE_SELF_DESTRUCT,
+
+ DO_ENCOUNTER_DONE
+};
+
+enum Phases
+{
+ // Leviathan MK II
+ PHASE_LEVIATHAN_SOLO = 1,
+ PHASE_LEVIATHAN_ASSEMBLED,
+
+ // VX-001
+ PHASE_VX001_SOLO,
+ PHASE_VX001_ASSEMBLED,
+
+ // Aerial Command Unit
+ PHASE_AERIAL_SOLO,
+ PHASE_AERIAL_ASSEMBLED
+};
+
+uint32 const RepairSpells[4] =
+{
+ SPELL_SEAT_1,
+ SPELL_SEAT_2,
+ SPELL_SEAT_3,
+ SPELL_SEAT_5
+};
+
+// 63801 Bomb Bot
+class spell_mimiron_bomb_bot : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_bomb_bot() : SpellScriptLoader("spell_mimiron_bomb_bot") { }
+
+ class spell_mimiron_bomb_bot_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_bomb_bot_SpellScript);
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ if (GetHitPlayer())
+ if (InstanceScript* instance = GetCaster()->GetInstanceScript())
+ if (Creature* mkii = ObjectAccessor::GetCreature(*GetCaster(), instance->GetData64(DATA_LEVIATHAN_MK_II)))
+ mkii->AI()->SetData(DATA_SETUP_BOMB, 0);
+ }
+
+ void HandleDespawn(SpellEffIndex /*effIndex*/)
+ {
+ if (Creature* target = GetHitCreature())
+ {
+ target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED);
+ target->DespawnOrUnsummon(1000);
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_bomb_bot_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_bomb_bot_SpellScript::HandleDespawn, EFFECT_1, SPELL_EFFECT_APPLY_AURA);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_bomb_bot_SpellScript();
+ }
+};
+
+// 65192 - Flame Suppressant, 65224 - Clear Fires, 65354 - Clear Fires, 64619 - Water Spray
+class spell_mimiron_clear_fires : public SpellScriptLoader
{
public:
- spell_ulduar_proximity_mines() : SpellScriptLoader("spell_ulduar_proximity_mines") { }
+ spell_mimiron_clear_fires() : SpellScriptLoader("spell_mimiron_clear_fires") { }
- class spell_ulduar_proximity_minesSpellScript : public SpellScript
+ class spell_mimiron_clear_fires_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_ulduar_proximity_minesSpellScript);
+ PrepareSpellScript(spell_mimiron_clear_fires_SpellScript);
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ if (GetHitCreature())
+ GetHitCreature()->DespawnOrUnsummon();
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_clear_fires_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_clear_fires_SpellScript();
+ }
+};
+
+// 64463 - Despawn Assault Bots
+class spell_mimiron_despawn_assault_bots : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_despawn_assault_bots() : SpellScriptLoader("spell_mimiron_despawn_assault_bots") { }
+
+ class spell_mimiron_despawn_assault_bots_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_despawn_assault_bots_SpellScript);
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ if (GetHitCreature())
+ GetHitCreature()->DespawnOrUnsummon();
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_despawn_assault_bots_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_despawn_assault_bots_SpellScript();
+ }
+};
+
+// 64618 - Fire Search
+class spell_mimiron_fire_search : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_fire_search() : SpellScriptLoader("spell_mimiron_fire_search") { }
+
+ class spell_mimiron_fire_search_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_fire_search_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_WATER_SPRAY))
+ return false;
+ return true;
+ }
+
+ bool Load() override
+ {
+ _noTarget = false;
+ return true;
+ }
+
+ void FilterTargets(std::list<WorldObject*>& targets)
+ {
+ _noTarget = targets.empty();
+ if (_noTarget)
+ return;
+
+ WorldObject* target = Trinity::Containers::SelectRandomContainerElement(targets);
+ targets.clear();
+ targets.push_back(target);
+ }
+
+ void HandleAftercast()
+ {
+ if (_noTarget)
+ GetCaster()->GetMotionMaster()->MoveRandom(15.0f);
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+
+ if (UnitAI* ai = caster->GetAI())
+ {
+ if (caster->GetDistance2d(GetHitUnit()) <= 15.0f && ai->GetData(DATA_WATERSPRAY))
+ {
+ caster->CastSpell(GetHitUnit(), SPELL_WATER_SPRAY, true);
+ ai->SetData(DATA_WATERSPRAY, 0);
+ ai->SetData(DATA_MOVE_NEW, 1);
+ }
+ else if (caster->GetAI()->GetData(DATA_MOVE_NEW))
+ {
+ caster->GetMotionMaster()->MoveChase(GetHitUnit());
+ ai->SetData(DATA_MOVE_NEW, 0);
+ }
+ }
+ }
+
+ void Register() override
+ {
+ AfterCast += SpellCastFn(spell_mimiron_fire_search_SpellScript::HandleAftercast);
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mimiron_fire_search_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_fire_search_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+
+ private:
+ bool _noTarget;
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_fire_search_SpellScript();
+ }
+};
+
+// 64436 - Magnetic Core
+class spell_mimiron_magnetic_core : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_magnetic_core() : SpellScriptLoader("spell_mimiron_magnetic_core") { }
+
+ class spell_mimiron_magnetic_core_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_magnetic_core_SpellScript);
+
+ void FilterTargets(std::list<WorldObject*>& targets)
+ {
+ targets.remove_if([](WorldObject* obj) { return obj->ToUnit() && (obj->ToUnit()->GetVehicleBase() || obj->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)); });
+ }
+
+ void Register() override
+ {
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mimiron_magnetic_core_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ENTRY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_magnetic_core_SpellScript();
+ }
+
+ class spell_mimiron_magnetic_core_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_mimiron_magnetic_core_AuraScript);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_MAGNETIC_CORE_VISUAL))
+ return false;
+ return true;
+ }
+
+ void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (Creature* target = GetTarget()->ToCreature())
+ {
+ target->GetAI()->DoAction(DO_DISABLE_AERIAL);
+ target->CastSpell(target, SPELL_MAGNETIC_CORE_VISUAL, true);
+ }
+ }
+
+ void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (Creature* target = GetTarget()->ToCreature())
+ {
+ target->GetAI()->DoAction(DO_ENABLE_AERIAL);
+ target->RemoveAurasDueToSpell(SPELL_MAGNETIC_CORE_VISUAL);
+ }
+ }
- void HandleScript(SpellEffIndex effIndex)
+ void OnRemoveSelf(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (TempSummon* summ = GetTarget()->ToTempSummon())
+ summ->DespawnOrUnsummon();
+ }
+
+ void Register() override
+ {
+ AfterEffectApply += AuraEffectApplyFn(spell_mimiron_magnetic_core_AuraScript::OnApply, EFFECT_1, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, AURA_EFFECT_HANDLE_REAL);
+ AfterEffectRemove += AuraEffectRemoveFn(spell_mimiron_magnetic_core_AuraScript::OnRemove, EFFECT_1, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, AURA_EFFECT_HANDLE_REAL);
+ AfterEffectRemove += AuraEffectRemoveFn(spell_mimiron_magnetic_core_AuraScript::OnRemoveSelf, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const override
+ {
+ return new spell_mimiron_magnetic_core_AuraScript();
+ }
+};
+
+// 63667 - Napalm Shell
+class spell_mimiron_napalm_shell : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_napalm_shell() : SpellScriptLoader("spell_mimiron_napalm_shell") { }
+
+ class spell_mimiron_napalm_shell_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_napalm_shell_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_NAPALM_SHELL))
+ return false;
+ return true;
+ }
+
+ void FilterTargets(std::list<WorldObject*>& targets)
+ {
+ if (targets.empty())
+ return;
+
+ WorldObject* target = Trinity::Containers::SelectRandomContainerElement(targets);
+
+ targets.remove_if(Trinity::AllWorldObjectsInRange(GetCaster(), 15.0f));
+
+ if (!targets.empty())
+ target = Trinity::Containers::SelectRandomContainerElement(targets);
+
+ targets.clear();
+ targets.push_back(target);
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->CastSpell(GetHitUnit(), SPELL_NAPALM_SHELL);
+ }
+
+ void Register() override
+ {
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mimiron_napalm_shell_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_napalm_shell_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_napalm_shell_SpellScript();
+ }
+};
+
+// 63274 - P3Wx2 Laser Barrage -- HACK! Core will currently not set UNIT_FIELD_CHANNEL_OBJECT automatially if the spell targets more than a single target.
+class spell_mimiron_p3wx2_laser_barrage : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_p3wx2_laser_barrage() : SpellScriptLoader("spell_mimiron_p3wx2_laser_barrage") { }
+
+ class spell_mimiron_p3wx2_laser_barrage_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_p3wx2_laser_barrage_SpellScript);
+
+ void OnHit(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->SetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT, GetHitUnit()->GetGUID());
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_p3wx2_laser_barrage_SpellScript::OnHit, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_p3wx2_laser_barrage_SpellScript();
+ }
+};
+
+// 64542 - Plasma Blast
+class spell_mimiron_plasma_blast : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_plasma_blast() : SpellScriptLoader("spell_mimiron_plasma_blast") { }
+
+ class spell_mimiron_plasma_blast_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_plasma_blast_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_PLASMA_BLAST))
+ return false;
+ return true;
+ }
+
+ bool Load() override
+ {
+ return GetCaster()->GetVehicleKit() != nullptr;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* caster = GetCaster()->GetVehicleKit()->GetPassenger(3))
+ caster->CastSpell(GetHitUnit(), SPELL_PLASMA_BLAST);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_plasma_blast_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_plasma_blast_SpellScript();
+ }
+};
+
+// 66351 - Explosion
+class spell_mimiron_proximity_explosion : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_proximity_explosion() : SpellScriptLoader("spell_mimiron_proximity_explosion") { }
+
+ class spell_mimiron_proximity_explosion_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_proximity_explosion_SpellScript);
+
+ void OnHit(SpellEffIndex /*effIndex*/)
+ {
+ if (GetHitPlayer())
+ if (InstanceScript* instance = GetCaster()->GetInstanceScript())
+ if (Creature* mkII = ObjectAccessor::GetCreature(*GetCaster(), instance->GetData64(DATA_LEVIATHAN_MK_II)))
+ mkII->AI()->SetData(DATA_SETUP_MINE, 0);
+ }
+
+ void HandleAura(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->RemoveAurasDueToSpell(SPELL_PROXIMITY_MINE_PERIODIC_TRIGGER);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_proximity_explosion_SpellScript::OnHit, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_proximity_explosion_SpellScript::HandleAura, EFFECT_1, SPELL_EFFECT_APPLY_AURA);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_proximity_explosion_SpellScript();
+ }
+};
+
+// 63027 - Proximity Mines
+class spell_mimiron_proximity_mines : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_proximity_mines() : SpellScriptLoader("spell_mimiron_proximity_mines") { }
+
+ class spell_mimiron_proximity_mines_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_proximity_mines_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_PROXIMITY_MINE))
+ return false;
+ return true;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
{
- PreventHitDefaultEffect(effIndex);
for (uint8 i = 0; i < 10; ++i)
- GetCaster()->CastSpell(GetCaster(), SPELL_TRIGGER_MISSILE, true);
+ GetCaster()->CastSpell(GetCaster(), SPELL_SUMMON_PROXIMITY_MINE, true);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_proximity_mines_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_proximity_mines_SpellScript();
+ }
+};
+
+// 65346 - Proximity Mine
+class spell_mimiron_proximity_trigger : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_proximity_trigger() : SpellScriptLoader("spell_mimiron_proximity_trigger") { }
+
+ class spell_mimiron_proximity_trigger_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_proximity_trigger_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_PROXIMITY_MINE_EXPLOSION))
+ return false;
+ return true;
+ }
+
+ void FilterTargets(std::list<WorldObject*>& targets)
+ {
+ targets.remove(GetExplTargetWorldObject());
+
+ if (targets.empty())
+ FinishCast(SPELL_FAILED_NO_VALID_TARGETS);
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->CastSpell((Unit*)NULL, SPELL_PROXIMITY_MINE_EXPLOSION, true);
}
void Register() override
{
- OnEffectHitTarget += SpellEffectFn(spell_ulduar_proximity_minesSpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mimiron_proximity_trigger_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
+ OnEffectHit += SpellEffectFn(spell_mimiron_proximity_trigger_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
- return new spell_ulduar_proximity_minesSpellScript();
+ return new spell_mimiron_proximity_trigger_SpellScript();
+ }
+};
+
+// 63382 - Rapid Burst
+class spell_mimiron_rapid_burst : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_rapid_burst() : SpellScriptLoader("spell_mimiron_rapid_burst") { }
+
+ class spell_mimiron_rapid_burst_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_mimiron_rapid_burst_AuraScript);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_RAPID_BURST_LEFT) || !sSpellMgr->GetSpellInfo(SPELL_RAPID_BURST_RIGHT))
+ return false;
+ return true;
+ }
+
+ void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (TempSummon* summ = GetTarget()->ToTempSummon())
+ summ->DespawnOrUnsummon();
+ }
+
+ void HandleDummyTick(AuraEffect const* aurEff)
+ {
+ if (GetCaster())
+ GetCaster()->CastSpell(GetTarget(), aurEff->GetTickNumber() % 2 == 0 ? SPELL_RAPID_BURST_RIGHT : SPELL_RAPID_BURST_LEFT, true, NULL, aurEff);
+ }
+
+ void Register() override
+ {
+ AfterEffectRemove += AuraEffectApplyFn(spell_mimiron_rapid_burst_AuraScript::AfterRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_mimiron_rapid_burst_AuraScript::HandleDummyTick, EFFECT_1, SPELL_AURA_PERIODIC_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const override
+ {
+ return new spell_mimiron_rapid_burst_AuraScript();
+ }
+};
+
+// 64402 - Rocket Strike, 65034 - Rocket Strike
+class spell_mimiron_rocket_strike : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_rocket_strike() : SpellScriptLoader("spell_mimiron_rocket_strike") { }
+
+ class spell_mimiron_rocket_strike_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_rocket_strike_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SCRIPT_EFFECT_ROCKET_STRIKE))
+ return false;
+ return true;
+ }
+
+ void FilterTargets(std::list<WorldObject*>& targets)
+ {
+ if (targets.empty())
+ return;
+
+ if (m_scriptSpellId == SPELL_ROCKET_STRIKE_LEFT && GetCaster()->IsVehicle())
+ if (WorldObject* target = GetCaster()->GetVehicleKit()->GetPassenger(6))
+ {
+ targets.clear();
+ targets.push_back(target);
+ }
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ GetHitUnit()->CastSpell((Unit*)NULL, SPELL_SCRIPT_EFFECT_ROCKET_STRIKE, true, NULL, NULL, GetCaster()->GetGUID());
+ }
+
+ void Register() override
+ {
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mimiron_rocket_strike_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_rocket_strike_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_rocket_strike_SpellScript();
+ }
+};
+
+// 63041 - Rocket Strike
+class spell_mimiron_rocket_strike_damage : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_rocket_strike_damage() : SpellScriptLoader("spell_mimiron_rocket_strike_damage") { }
+
+ class spell_mimiron_rocket_strike_damage_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_rocket_strike_damage_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_NOT_SO_FRIENDLY_FIRE))
+ return false;
+ return true;
+ }
+
+ void HandleAfterCast()
+ {
+ if (TempSummon* summ = GetCaster()->ToTempSummon())
+ summ->DespawnOrUnsummon();
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ if (GetHitPlayer())
+ if (InstanceScript* instance = GetCaster()->GetInstanceScript())
+ if (Creature* mkii = ObjectAccessor::GetCreature(*GetCaster(), instance->GetData64(DATA_LEVIATHAN_MK_II)))
+ mkii->AI()->SetData(DATA_SETUP_ROCKET, 0);
+ }
+
+ void HandleFriendlyFire(SpellEffIndex /*effIndex*/)
+ {
+ GetHitUnit()->CastSpell((Unit*)NULL, SPELL_NOT_SO_FRIENDLY_FIRE, true);
+ }
+
+ void Register() override
+ {
+ AfterCast += SpellCastFn(spell_mimiron_rocket_strike_damage_SpellScript::HandleAfterCast);
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_rocket_strike_damage_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_rocket_strike_damage_SpellScript::HandleFriendlyFire, EFFECT_1, SPELL_EFFECT_SCHOOL_DAMAGE);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_rocket_strike_damage_SpellScript();
+ }
+};
+
+// 63681 - Rocket Strike
+class spell_mimiron_rocket_strike_target_select : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_rocket_strike_target_select() : SpellScriptLoader("spell_mimiron_rocket_strike_target_select") { }
+
+ class spell_mimiron_rocket_strike_target_select_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_rocket_strike_target_select_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_ROCKET_STRIKE))
+ return false;
+ return true;
+ }
+
+ void FilterTargets(std::list<WorldObject*>& targets)
+ {
+ if (targets.empty())
+ return;
+
+ WorldObject* target = Trinity::Containers::SelectRandomContainerElement(targets);
+
+ targets.remove_if(Trinity::AllWorldObjectsInRange(GetCaster(), 15.0f));
+
+ if (!targets.empty())
+ target = Trinity::Containers::SelectRandomContainerElement(targets);
+
+ targets.clear();
+ targets.push_back(target);
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ if (InstanceScript* instance = GetCaster()->GetInstanceScript())
+ GetCaster()->CastSpell(GetHitUnit(), SPELL_SUMMON_ROCKET_STRIKE, true, NULL, NULL, instance->GetData64(DATA_VX_001));
+ GetCaster()->SetDisplayId(11686);
+ }
+
+ void Register() override
+ {
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mimiron_rocket_strike_target_select_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_rocket_strike_target_select_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_rocket_strike_target_select_SpellScript();
+ }
+};
+
+// 64383 - Self Repair
+class spell_mimiron_self_repair : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_self_repair() : SpellScriptLoader("spell_mimiron_self_repair") { }
+
+ class spell_mimiron_self_repair_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_self_repair_SpellScript);
+
+ void HandleScript()
+ {
+ if (GetCaster()->GetAI())
+ GetCaster()->GetAI()->DoAction(DO_ASSEMBLED_COMBAT);
+ }
+
+ void Register() override
+ {
+ AfterHit += SpellHitFn(spell_mimiron_self_repair_SpellScript::HandleScript);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_self_repair_SpellScript();
+ }
+};
+
+// 63414 - Spinning Up -- HACK! Core will currently not set UNIT_FIELD_CHANNEL_OBJECT automatially if the spell targets more than a single target.
+// eff0 will hit both caster and target due to hack in spellmgr.cpp, it is necessary because caster will interrupt itself if aura is not active on caster.
+class spell_mimiron_spinning_up : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_spinning_up() : SpellScriptLoader("spell_mimiron_spinning_up") { }
+
+ class spell_mimiron_spinning_up_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_spinning_up_SpellScript);
+
+ void OnHit(SpellEffIndex /*effIndex*/)
+ {
+ if (GetHitUnit() != GetCaster())
+ GetCaster()->SetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT, GetHitUnit()->GetGUID());
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_spinning_up_SpellScript::OnHit, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_spinning_up_SpellScript();
+ }
+};
+
+// 64426 - Summon Scrap Bot
+class spell_mimiron_summon_assault_bot : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_summon_assault_bot() : SpellScriptLoader("spell_mimiron_summon_assault_bot") { }
+
+ class spell_mimiron_summon_assault_bot_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_mimiron_summon_assault_bot_AuraScript);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_ASSAULT_BOT))
+ return false;
+ return true;
+ }
+
+ void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
+ {
+ if (Unit* caster = GetCaster())
+ if (InstanceScript* instance = caster->GetInstanceScript())
+ if (instance->GetBossState(BOSS_MIMIRON) == IN_PROGRESS)
+ caster->CastSpell(caster, SPELL_SUMMON_ASSAULT_BOT, false, NULL, aurEff, instance->GetData64(DATA_AERIAL_COMMAND_UNIT));
+ }
+
+ void Register() override
+ {
+ OnEffectRemove += AuraEffectRemoveFn(spell_mimiron_summon_assault_bot_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const override
+ {
+ return new spell_mimiron_summon_assault_bot_AuraScript();
+ }
+};
+
+// 64425 - Summon Scrap Bot Trigger
+class spell_mimiron_summon_assault_bot_target : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_summon_assault_bot_target() : SpellScriptLoader("spell_mimiron_summon_assault_bot_target") { }
+
+ class spell_mimiron_summon_assault_bot_target_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_summon_assault_bot_target_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_ASSAULT_BOT_DUMMY))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ GetHitUnit()->CastSpell(GetHitUnit(), SPELL_SUMMON_ASSAULT_BOT_DUMMY, true);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_summon_assault_bot_target_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_summon_assault_bot_target_SpellScript();
+ }
+};
+
+// 64621 - Summon Fire Bot
+class spell_mimiron_summon_fire_bot : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_summon_fire_bot() : SpellScriptLoader("spell_mimiron_summon_fire_bot") { }
+
+ class spell_mimiron_summon_fire_bot_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_mimiron_summon_fire_bot_AuraScript);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_FIRE_BOT))
+ return false;
+
+ return true;
+ }
+
+ void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
+ {
+ if (Unit* caster = GetCaster())
+ if (InstanceScript* instance = caster->GetInstanceScript())
+ if (instance->GetBossState(BOSS_MIMIRON) == IN_PROGRESS)
+ caster->CastSpell(caster, SPELL_SUMMON_FIRE_BOT, false, NULL, aurEff, instance->GetData64(DATA_AERIAL_COMMAND_UNIT));
+ }
+
+ void Register() override
+ {
+ OnEffectRemove += AuraEffectRemoveFn(spell_mimiron_summon_fire_bot_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const override
+ {
+ return new spell_mimiron_summon_fire_bot_AuraScript();
+ }
+};
+
+// 64620 - Summon Fire Bot Trigger
+class spell_mimiron_summon_fire_bot_target : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_summon_fire_bot_target() : SpellScriptLoader("spell_mimiron_summon_fire_bot_target") { }
+
+ class spell_mimiron_summon_fire_bot_target_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_summon_fire_bot_target_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_FIRE_BOT_DUMMY))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ GetHitUnit()->CastSpell(GetHitUnit(), SPELL_SUMMON_FIRE_BOT_DUMMY, true);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_summon_fire_bot_target_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_summon_fire_bot_target_SpellScript();
+ }
+};
+
+// 64562 - Summon Flames Spread Trigger
+class spell_mimiron_summon_flames_spread : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_summon_flames_spread() : SpellScriptLoader("spell_mimiron_summon_flames_spread") { }
+
+ class spell_mimiron_summon_flames_spread_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_summon_flames_spread_SpellScript);
+
+ void FilterTargets(std::list<WorldObject*>& targets)
+ {
+ if (targets.empty())
+ return;
+
+ // Flames must chase the closest player
+ WorldObject* target = targets.front();
+
+ for (std::list<WorldObject*>::const_iterator iter = targets.begin(); iter != targets.end(); ++iter)
+ if (GetCaster()->GetDistance2d(*iter) < GetCaster()->GetDistance2d(target))
+ target = *iter;
+
+ targets.clear();
+ targets.push_back(target);
+ }
+
+ void OnHit(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->SetInFront(GetHitUnit());
+ }
+
+ void Register() override
+ {
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mimiron_summon_flames_spread_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_summon_flames_spread_SpellScript::OnHit, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_summon_flames_spread_SpellScript();
+ }
+
+ class spell_mimiron_summon_flames_spread_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_mimiron_summon_flames_spread_AuraScript);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_FLAMES_SPREAD))
+ return false;
+ return true;
+ }
+
+ void HandleTick(AuraEffect const* /*aurEff*/)
+ {
+ PreventDefaultAction();
+ if (Unit* caster = GetCaster())
+ if (caster->HasAura(SPELL_FLAMES_PERIODIC_TRIGGER))
+ caster->CastSpell(GetTarget(), SPELL_SUMMON_FLAMES_SPREAD, true);
+ }
+
+ void Register() override
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_mimiron_summon_flames_spread_AuraScript::HandleTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const override
+ {
+ return new spell_mimiron_summon_flames_spread_AuraScript();
+ }
+};
+
+// 64623 - Frost Bomb
+class spell_mimiron_summon_frost_bomb_target : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_summon_frost_bomb_target() : SpellScriptLoader("spell_mimiron_summon_frost_bomb_target") { }
+
+ class spell_mimiron_summon_frost_bomb_target_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_summon_frost_bomb_target_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_FROST_BOMB))
+ return false;
+ return true;
+ }
+
+ void FilterTargets(std::list<WorldObject*>& targets)
+ {
+ if (targets.empty())
+ return;
+
+ targets.remove_if(Trinity::AllWorldObjectsInRange(GetCaster(), 15.0f));
+
+ if (targets.empty())
+ return;
+
+ WorldObject* target = Trinity::Containers::SelectRandomContainerElement(targets);
+
+ targets.clear();
+ targets.push_back(target);
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->CastSpell(GetHitUnit(), SPELL_SUMMON_FROST_BOMB, true);
+ }
+
+ void Register() override
+ {
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mimiron_summon_frost_bomb_target_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_summon_frost_bomb_target_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_summon_frost_bomb_target_SpellScript();
+ }
+};
+
+// 64398 - Summon Scrap Bot
+class spell_mimiron_summon_junk_bot : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_summon_junk_bot() : SpellScriptLoader("spell_mimiron_summon_junk_bot") { }
+
+ class spell_mimiron_summon_junk_bot_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_mimiron_summon_junk_bot_AuraScript);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_JUNK_BOT))
+ return false;
+ return true;
+ }
+
+ void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
+ {
+ if (Unit* caster = GetCaster())
+ if (InstanceScript* instance = caster->GetInstanceScript())
+ if (instance->GetBossState(BOSS_MIMIRON) == IN_PROGRESS)
+ caster->CastSpell(caster, SPELL_SUMMON_JUNK_BOT, false, NULL, aurEff, instance->GetData64(DATA_AERIAL_COMMAND_UNIT));
+ }
+
+ void Register() override
+ {
+ OnEffectRemove += AuraEffectRemoveFn(spell_mimiron_summon_junk_bot_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const override
+ {
+ return new spell_mimiron_summon_junk_bot_AuraScript();
+ }
+};
+
+// 63820 - Summon Scrap Bot Trigger
+class spell_mimiron_summon_junk_bot_target : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_summon_junk_bot_target() : SpellScriptLoader("spell_mimiron_summon_junk_bot_target") { }
+
+ class spell_mimiron_summon_junk_bot_target_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mimiron_summon_junk_bot_target_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_JUNK_BOT_DUMMY))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ GetHitUnit()->CastSpell(GetHitUnit(), SPELL_SUMMON_JUNK_BOT_DUMMY, true);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_mimiron_summon_junk_bot_target_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_mimiron_summon_junk_bot_target_SpellScript();
+ }
+};
+
+// 63339 - Weld
+class spell_mimiron_weld : public SpellScriptLoader
+{
+ public:
+ spell_mimiron_weld() : SpellScriptLoader("spell_mimiron_weld") { }
+
+ class spell_mimiron_weld_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_mimiron_weld_AuraScript);
+
+ void HandleTick(AuraEffect const* aurEff)
+ {
+ Unit* caster = GetTarget();
+ if (Unit* vehicle = caster->GetVehicleBase())
+ {
+ if (aurEff->GetTickNumber() % 5 == 0)
+ caster->CastSpell(vehicle, RepairSpells[urand(0, 3)]);
+ caster->SetFacingToObject(vehicle);
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_mimiron_weld_AuraScript::HandleTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const override
+ {
+ return new spell_mimiron_weld_AuraScript();
}
};
void AddSC_boss_mimiron()
{
- new spell_ulduar_proximity_mines();
+ new spell_mimiron_bomb_bot();
+ new spell_mimiron_clear_fires();
+ new spell_mimiron_despawn_assault_bots();
+ new spell_mimiron_fire_search();
+ new spell_mimiron_magnetic_core();
+ new spell_mimiron_napalm_shell();
+ new spell_mimiron_p3wx2_laser_barrage();
+ new spell_mimiron_plasma_blast();
+ new spell_mimiron_proximity_explosion();
+ new spell_mimiron_proximity_mines();
+ new spell_mimiron_proximity_trigger();
+ new spell_mimiron_rapid_burst();
+ new spell_mimiron_rocket_strike();
+ new spell_mimiron_rocket_strike_damage();
+ new spell_mimiron_rocket_strike_target_select();
+ new spell_mimiron_self_repair();
+ new spell_mimiron_spinning_up();
+ new spell_mimiron_summon_assault_bot();
+ new spell_mimiron_summon_assault_bot_target();
+ new spell_mimiron_summon_fire_bot();
+ new spell_mimiron_summon_fire_bot_target();
+ new spell_mimiron_summon_flames_spread();
+ new spell_mimiron_summon_frost_bomb_target();
+ new spell_mimiron_summon_junk_bot();
+ new spell_mimiron_summon_junk_bot_target();
+ new spell_mimiron_weld();
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
index 6aa753eac98..79f9283eb40 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
@@ -15,13 +15,12 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptMgr.h"
-#include "ScriptedCreature.h"
-#include "InstanceScript.h"
+#include "ulduar.h"
#include "Player.h"
-#include "WorldPacket.h"
+#include "ScriptedCreature.h"
+#include "ScriptMgr.h"
#include "SpellScript.h"
-#include "ulduar.h"
+#include "WorldPacket.h"
static DoorData const doorData[] =
{
@@ -32,6 +31,9 @@ static DoorData const doorData[] =
{ GO_HODIR_ENTRANCE, BOSS_HODIR, DOOR_TYPE_ROOM, BOUNDARY_E },
{ GO_HODIR_DOOR, BOSS_HODIR, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
{ GO_HODIR_ICE_DOOR, BOSS_HODIR, DOOR_TYPE_PASSAGE, BOUNDARY_W },
+ { GO_MIMIRON_DOOR_1, BOSS_MIMIRON, DOOR_TYPE_ROOM, BOUNDARY_W },
+ { GO_MIMIRON_DOOR_2, BOSS_MIMIRON, DOOR_TYPE_ROOM, BOUNDARY_E },
+ { GO_MIMIRON_DOOR_3, BOSS_MIMIRON, DOOR_TYPE_ROOM, BOUNDARY_S },
{ GO_VEZAX_DOOR, BOSS_VEZAX, DOOR_TYPE_PASSAGE, BOUNDARY_E },
{ GO_YOGG_SARON_DOOR, BOSS_YOGG_SARON, DOOR_TYPE_ROOM, BOUNDARY_S },
{ GO_DOODAD_UL_SIGILDOOR_03, BOSS_ALGALON, DOOR_TYPE_ROOM, BOUNDARY_W },
@@ -70,11 +72,14 @@ class instance_ulduar : public InstanceMapScript
uint64 AssemblyGUIDs[3];
uint64 KologarnGUID;
uint64 AuriayaGUID;
- uint64 MimironGUID;
uint64 HodirGUID;
uint64 ThorimGUID;
uint64 FreyaGUID;
uint64 ElderGUIDs[3];
+ uint64 MimironGUID;
+ uint64 MimironVehicleGUIDs[3];
+ uint64 MimironComputerGUID;
+ uint64 MimironWorldTriggerGUID;
uint64 VezaxGUID;
uint64 YoggSaronGUID;
uint64 VoiceOfYoggSaronGUID;
@@ -92,6 +97,9 @@ class instance_ulduar : public InstanceMapScript
uint64 ThorimChestGUID;
uint64 HodirRareCacheGUID;
uint64 HodirChestGUID;
+ uint64 MimironTramGUID;
+ uint64 MimironElevatorGUID;
+ uint64 MimironButtonGUID;
uint64 BrainRoomDoorGUIDs[3];
uint64 AlgalonSigilDoorGUID[3];
uint64 AlgalonFloorGUID[2];
@@ -126,6 +134,8 @@ class instance_ulduar : public InstanceMapScript
KologarnGUID = 0;
AuriayaGUID = 0;
MimironGUID = 0;
+ MimironComputerGUID = 0;
+ MimironWorldTriggerGUID = 0;
HodirGUID = 0;
ThorimGUID = 0;
FreyaGUID = 0;
@@ -140,6 +150,9 @@ class instance_ulduar : public InstanceMapScript
ThorimChestGUID = 0;
HodirRareCacheGUID = 0;
HodirChestGUID = 0;
+ MimironTramGUID = 0;
+ MimironElevatorGUID = 0;
+ MimironButtonGUID = 0;
LeviathanGateGUID = 0;
AlgalonUniverseGUID = 0;
AlgalonTrapdoorGUID = 0;
@@ -166,6 +179,7 @@ class instance_ulduar : public InstanceMapScript
memset(AssemblyGUIDs, 0, sizeof(AssemblyGUIDs));
memset(RazorHarpoonGUIDs, 0, sizeof(RazorHarpoonGUIDs));
memset(ElderGUIDs, 0, sizeof(ElderGUIDs));
+ memset(MimironVehicleGUIDs, 0, sizeof(MimironVehicleGUIDs));
memset(BrainRoomDoorGUIDs, 0, sizeof(BrainRoomDoorGUIDs));
memset(KeeperGUIDs, 0, sizeof(KeeperGUIDs));
memset(_summonObservationRingKeeper, false, sizeof(_summonObservationRingKeeper));
@@ -289,9 +303,6 @@ class instance_ulduar : public InstanceMapScript
case NPC_AURIAYA:
AuriayaGUID = creature->GetGUID();
break;
- case NPC_MIMIRON:
- MimironGUID = creature->GetGUID();
- break;
// Hodir
case NPC_HODIR:
@@ -354,6 +365,26 @@ class instance_ulduar : public InstanceMapScript
creature->DespawnOrUnsummon();
break;
+ // Mimiron
+ case NPC_MIMIRON:
+ MimironGUID = creature->GetGUID();
+ break;
+ case NPC_LEVIATHAN_MKII:
+ MimironVehicleGUIDs[0] = creature->GetGUID();
+ break;
+ case NPC_VX_001:
+ MimironVehicleGUIDs[1] = creature->GetGUID();
+ break;
+ case NPC_AERIAL_COMMAND_UNIT:
+ MimironVehicleGUIDs[2] = creature->GetGUID();
+ break;
+ case NPC_COMPUTER:
+ MimironComputerGUID = creature->GetGUID();
+ break;
+ case NPC_WORLD_TRIGGER_MIMIRON:
+ MimironWorldTriggerGUID = creature->GetGUID();
+ break;
+
case NPC_VEZAX:
VezaxGUID = creature->GetGUID();
break;
@@ -470,6 +501,15 @@ class instance_ulduar : public InstanceMapScript
case GO_HODIR_CHEST:
HodirChestGUID = gameObject->GetGUID();
break;
+ case GO_MIMIRON_TRAM:
+ MimironTramGUID = gameObject->GetGUID();
+ break;
+ case GO_MIMIRON_ELEVATOR:
+ MimironElevatorGUID = gameObject->GetGUID();
+ break;
+ case GO_MIMIRON_BUTTON:
+ MimironButtonGUID = gameObject->GetGUID();
+ break;
case GO_LEVIATHAN_GATE:
LeviathanGateGUID = gameObject->GetGUID();
if (GetBossState(BOSS_LEVIATHAN) == DONE)
@@ -482,6 +522,9 @@ class instance_ulduar : public InstanceMapScript
case GO_HODIR_ENTRANCE:
case GO_HODIR_DOOR:
case GO_HODIR_ICE_DOOR:
+ case GO_MIMIRON_DOOR_1:
+ case GO_MIMIRON_DOOR_2:
+ case GO_MIMIRON_DOOR_3:
case GO_VEZAX_DOOR:
case GO_YOGG_SARON_DOOR:
AddDoor(gameObject, true);
@@ -566,6 +609,9 @@ class instance_ulduar : public InstanceMapScript
case GO_HODIR_ENTRANCE:
case GO_HODIR_DOOR:
case GO_HODIR_ICE_DOOR:
+ case GO_MIMIRON_DOOR_1:
+ case GO_MIMIRON_DOOR_2:
+ case GO_MIMIRON_DOOR_3:
case GO_VEZAX_DOOR:
case GO_YOGG_SARON_DOOR:
case GO_DOODAD_UL_SIGILDOOR_03:
@@ -774,6 +820,10 @@ class instance_ulduar : public InstanceMapScript
break;
case DATA_UNBROKEN:
Unbroken = data != 0;
+ break;
+ case DATA_MIMIRON_ELEVATOR:
+ if (GameObject* gameObject = instance->GetGameObject(MimironElevatorGUID))
+ gameObject->SetGoState((GOState)data);
break;
case DATA_ILLUSION:
illusion = data;
@@ -846,8 +896,6 @@ class instance_ulduar : public InstanceMapScript
return KologarnGUID;
case BOSS_AURIAYA:
return AuriayaGUID;
- case BOSS_MIMIRON:
- return MimironGUID;
case BOSS_HODIR:
return HodirGUID;
case BOSS_THORIM:
@@ -863,6 +911,22 @@ class instance_ulduar : public InstanceMapScript
case BOSS_STONEBARK:
return ElderGUIDs[2];
+ // Mimiron
+ case BOSS_MIMIRON:
+ return MimironGUID;
+ case DATA_LEVIATHAN_MK_II:
+ return MimironVehicleGUIDs[0];
+ case DATA_VX_001:
+ return MimironVehicleGUIDs[1];
+ case DATA_AERIAL_COMMAND_UNIT:
+ return MimironVehicleGUIDs[2];
+ case DATA_COMPUTER:
+ return MimironComputerGUID;
+ case DATA_MIMIRON_WORLD_TRIGGER:
+ return MimironWorldTriggerGUID;
+ case DATA_MIMIRON_BUTTON:
+ return MimironButtonGUID;
+
case BOSS_VEZAX:
return VezaxGUID;
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
index 3544ff3c079..81cb469318f 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
@@ -18,6 +18,7 @@
#ifndef DEF_ULDUAR_H
#define DEF_ULDUAR_H
+#include "InstanceScript.h"
#include "ObjectMgr.h"
#define UlduarScriptName "instance_ulduar"
@@ -83,6 +84,18 @@ enum UlduarNPCs
NPC_LEVIATHAN_MKII = 33432,
NPC_VX_001 = 33651,
NPC_AERIAL_COMMAND_UNIT = 33670,
+ NPC_ASSAULT_BOT = 34057,
+ NPC_BOMB_BOT = 33836,
+ NPC_JUNK_BOT = 33855,
+ NPC_EMERGENCY_FIRE_BOT = 34147,
+ NPC_FROST_BOMB = 34149,
+ NPC_BURST_TARGET = 34211,
+ NPC_FLAME = 34363,
+ NPC_FLAME_SPREAD = 34121,
+ NPC_DB_TARGET = 33576,
+ NPC_ROCKET_MIMIRON_VISUAL = 34050,
+ NPC_WORLD_TRIGGER_MIMIRON = 21252,
+ NPC_COMPUTER = 34143,
// Freya's Keepers
NPC_IRONBRANCH = 32913,
@@ -204,6 +217,18 @@ enum UlduarGameObjects
GO_THORIM_CHEST_HERO = 194315,
GO_THORIM_CHEST = 194314,
+ // Mimiron
+ GO_MIMIRON_TRAM = 194675,
+ GO_MIMIRON_ELEVATOR = 194749,
+ GO_MIMIRON_BUTTON = 194739,
+ GO_MIMIRON_DOOR_1 = 194774,
+ GO_MIMIRON_DOOR_2 = 194775,
+ GO_MIMIRON_DOOR_3 = 194776,
+ GO_CACHE_OF_INNOVATION = 194789,
+ GO_CACHE_OF_INNOVATION_FIREFIGHTER = 194957,
+ GO_CACHE_OF_INNOVATION_HERO = 194956,
+ GO_CACHE_OF_INNOVATION_FIREFIGHTER_HERO = 194958,
+
// Vezax
GO_VEZAX_DOOR = 194750,
@@ -292,6 +317,16 @@ enum UlduarData
// Hodir
DATA_HODIR_RARE_CACHE,
+ // Mimiron
+ DATA_LEVIATHAN_MK_II,
+ DATA_VX_001,
+ DATA_AERIAL_COMMAND_UNIT,
+ DATA_COMPUTER,
+ DATA_MIMIRON_WORLD_TRIGGER,
+ DATA_MIMIRON_ELEVATOR,
+ DATA_MIMIRON_TRAM,
+ DATA_MIMIRON_BUTTON,
+
// Yogg-Saron
DATA_VOICE_OF_YOGG_SARON,
DATA_SARA,
diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp
index 42be5ba8c90..f82c1f5fb58 100644
--- a/src/server/scripts/Outland/zone_netherstorm.cpp
+++ b/src/server/scripts/Outland/zone_netherstorm.cpp
@@ -19,13 +19,11 @@
/* ScriptData
SDName: Netherstorm
SD%Complete: 80
-SDComment: Quest support: 10337, 10438, 10652 (special flight paths), 10299, 10321, 10322, 10323, 10329, 10330, 10338, 10365(Shutting Down Manaforge), 10198, 10191
+SDComment: Quest support: 10337, 10438, 10652 (special flight paths), 10198, 10191
SDCategory: Netherstorm
EndScriptData */
/* ContentData
-npc_manaforge_control_console
-go_manaforge_control_console
npc_commander_dawnforge
npc_bessy
npc_maxx_a_million
@@ -39,323 +37,6 @@ EndContentData */
#include "Player.h"
/*######
-## npc_manaforge_control_console
-######*/
-
-//used by 20209, 20417, 20418, 20440, signed for 20209
-enum ManaforgeConsoleData
-{
- EMOTE_START = 0,
- EMOTE_60 = 1,
- EMOTE_30 = 2,
- EMOTE_10 = 3,
- EMOTE_COMPLETE = 4,
- EMOTE_ABORT = 5,
-
- ENTRY_BNAAR_C_CONSOLE = 20209,
- ENTRY_CORUU_C_CONSOLE = 20417,
- ENTRY_DURO_C_CONSOLE = 20418,
- ENTRY_ARA_C_CONSOLE = 20440,
-
- ENTRY_SUNFURY_TECH = 20218,
- ENTRY_SUNFURY_PROT = 20436,
-
- ENTRY_ARA_TECH = 20438,
- ENTRY_ARA_ENGI = 20439,
- ENTRY_ARA_GORKLONN = 20460,
-
- SPELL_DISABLE_VISUAL = 35031,
- SPELL_INTERRUPT_1 = 35016, //ACID mobs should cast this
- SPELL_INTERRUPT_2 = 35176, //ACID mobs should cast this (Manaforge Ara-version)
-};
-
-class npc_manaforge_control_console : public CreatureScript
-{
-public:
- npc_manaforge_control_console() : CreatureScript("npc_manaforge_control_console") { }
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_manaforge_control_consoleAI(creature);
- }
-
- struct npc_manaforge_control_consoleAI : public ScriptedAI
- {
- npc_manaforge_control_consoleAI(Creature* creature) : ScriptedAI(creature) { }
-
- uint32 Event_Timer;
- uint32 Wave_Timer;
- uint32 Phase;
- bool Wave;
- uint64 someplayer;
- uint64 goConsole;
- Creature* add;
-
- void Reset() override
- {
- Event_Timer = 3000;
- Wave_Timer = 0;
- Phase = 1;
- Wave = false;
- someplayer = 0;
- goConsole = 0;
- add = NULL;
- }
-
- void EnterCombat(Unit* /*who*/) override { }
-
- /*void SpellHit(Unit* caster, const SpellInfo* spell) override
- {
- //we have no way of telling the Creature was hit by spell -> got aura applied after 10-12 seconds
- //then no way for the mobs to actually stop the shutdown as intended.
- if (spell->Id == SPELL_INTERRUPT_1)
- DoSay("Silence! I kill you!", LANG_UNIVERSAL, NULL);
- }*/
-
- void JustDied(Unit* /*killer*/) override
- {
- Talk(EMOTE_ABORT);
-
- if (someplayer)
- {
- if (Player* player = ObjectAccessor::GetPlayer(*me, someplayer))
- {
- switch (me->GetEntry())
- {
- case ENTRY_BNAAR_C_CONSOLE:
- player->FailQuest(10299);
- player->FailQuest(10329);
- break;
- case ENTRY_CORUU_C_CONSOLE:
- player->FailQuest(10321);
- player->FailQuest(10330);
- break;
- case ENTRY_DURO_C_CONSOLE:
- player->FailQuest(10322);
- player->FailQuest(10338);
- break;
- case ENTRY_ARA_C_CONSOLE:
- player->FailQuest(10323);
- player->FailQuest(10365);
- break;
- }
- }
- }
-
- if (goConsole)
- if (GameObject* go = GameObject::GetGameObject(*me, goConsole))
- go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
- }
-
- void DoWaveSpawnForCreature(Creature* creature)
- {
- switch (creature->GetEntry())
- {
- case ENTRY_BNAAR_C_CONSOLE:
- if (rand32() % 2)
- {
- add = me->SummonCreature(ENTRY_SUNFURY_TECH, 2933.68f, 4162.55f, 164.00f, 1.60f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 2927.36f, 4212.97f, 164.00f);
- }
- else
- {
- add = me->SummonCreature(ENTRY_SUNFURY_TECH, 2927.36f, 4212.97f, 164.00f, 4.94f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 2933.68f, 4162.55f, 164.00f);
- }
- Wave_Timer = 30000;
- break;
- case ENTRY_CORUU_C_CONSOLE:
- add = me->SummonCreature(ENTRY_SUNFURY_TECH, 2445.21f, 2765.26f, 134.49f, 3.93f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 2424.21f, 2740.15f, 133.81f);
- add = me->SummonCreature(ENTRY_SUNFURY_TECH, 2429.86f, 2731.85f, 134.53f, 1.31f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 2435.37f, 2766.04f, 133.81f);
- Wave_Timer = 20000;
- break;
- case ENTRY_DURO_C_CONSOLE:
- add = me->SummonCreature(ENTRY_SUNFURY_TECH, 2986.80f, 2205.36f, 165.37f, 3.74f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 2985.15f, 2197.32f, 164.79f);
- add = me->SummonCreature(ENTRY_SUNFURY_TECH, 2952.91f, 2191.20f, 165.32f, 0.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 2060.01f, 2185.27f, 164.67f);
- Wave_Timer = 15000;
- break;
- case ENTRY_ARA_C_CONSOLE:
- if (rand32() % 2)
- {
- add = me->SummonCreature(ENTRY_ARA_TECH, 4035.11f, 4038.97f, 194.27f, 2.57f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 4003.42f, 4040.19f, 193.49f);
- add = me->SummonCreature(ENTRY_ARA_TECH, 4033.66f, 4036.79f, 194.28f, 2.57f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 4003.42f, 4040.19f, 193.49f);
- add = me->SummonCreature(ENTRY_ARA_TECH, 4037.13f, 4037.30f, 194.23f, 2.57f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 4003.42f, 4040.19f, 193.49f);
- }
- else
- {
- add = me->SummonCreature(ENTRY_ARA_TECH, 3099.59f, 4049.30f, 194.22f, 0.05f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 4028.01f, 4035.17f, 193.59f);
- add = me->SummonCreature(ENTRY_ARA_TECH, 3999.72f, 4046.75f, 194.22f, 0.05f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 4028.01f, 4035.17f, 193.59f);
- add = me->SummonCreature(ENTRY_ARA_TECH, 3996.81f, 4048.26f, 194.22f, 0.05f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 4028.01f, 4035.17f, 193.59f);
- }
- Wave_Timer = 15000;
- break;
- }
- }
- void DoFinalSpawnForCreature(Creature* creature)
- {
- switch (creature->GetEntry())
- {
- case ENTRY_BNAAR_C_CONSOLE:
- add = me->SummonCreature(ENTRY_SUNFURY_TECH, 2946.52f, 4201.42f, 163.47f, 3.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 2927.49f, 4192.81f, 163.00f);
- break;
- case ENTRY_CORUU_C_CONSOLE:
- add = me->SummonCreature(ENTRY_SUNFURY_TECH, 2453.88f, 2737.85f, 133.27f, 2.59f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 2433.96f, 2751.53f, 133.85f);
- add = me->SummonCreature(ENTRY_SUNFURY_TECH, 2441.62f, 2735.32f, 134.49f, 1.97f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 2433.96f, 2751.53f, 133.85f);
- add = me->SummonCreature(ENTRY_SUNFURY_TECH, 2450.73f, 2754.50f, 134.49f, 3.29f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 2433.96f, 2751.53f, 133.85f);
- break;
- case ENTRY_DURO_C_CONSOLE:
- add = me->SummonCreature(ENTRY_SUNFURY_TECH, 2956.18f, 2202.85f, 165.32f, 5.45f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 2972.27f, 2193.22f, 164.48f);
- add = me->SummonCreature(ENTRY_SUNFURY_TECH, 2975.30f, 2211.50f, 165.32f, 4.55f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 2972.27f, 2193.22f, 164.48f);
- add = me->SummonCreature(ENTRY_SUNFURY_PROT, 2965.02f, 2217.45f, 164.16f, 4.96f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 2972.27f, 2193.22f, 164.48f);
- break;
- case ENTRY_ARA_C_CONSOLE:
- add = me->SummonCreature(ENTRY_ARA_ENGI, 3994.51f, 4020.46f, 192.18f, 0.91f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 4008.35f, 4035.04f, 192.70f);
- add = me->SummonCreature(ENTRY_ARA_GORKLONN, 4021.56f, 4059.35f, 193.59f, 4.44f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
- if (add) add->GetMotionMaster()->MovePoint(0, 4016.62f, 4039.89f, 193.46f);
- break;
- }
- }
-
- void UpdateAI(uint32 diff) override
- {
- if (Event_Timer <= diff)
- {
- switch (Phase)
- {
- case 1:
- if (someplayer)
- {
- Unit* u = ObjectAccessor::GetUnit(*me, someplayer);
- if (u && u->GetTypeId() == TYPEID_PLAYER)
- Talk(EMOTE_START, u);
- }
- Event_Timer = 60000;
- Wave = true;
- ++Phase;
- break;
- case 2:
- Talk(EMOTE_60);
- Event_Timer = 30000;
- ++Phase;
- break;
- case 3:
- Talk(EMOTE_30);
- Event_Timer = 20000;
- DoFinalSpawnForCreature(me);
- ++Phase;
- break;
- case 4:
- Talk(EMOTE_10);
- Event_Timer = 10000;
- Wave = false;
- ++Phase;
- break;
- case 5:
- Talk(EMOTE_COMPLETE);
- if (someplayer)
- {
- if (Player* player = ObjectAccessor::GetPlayer(*me, someplayer))
- player->KilledMonsterCredit(me->GetEntry(), me->GetGUID());
- DoCast(me, SPELL_DISABLE_VISUAL);
- }
-
- if (goConsole)
- if (GameObject* go = GameObject::GetGameObject(*me, goConsole))
- go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
-
- ++Phase;
- break;
- }
- }
- else
- Event_Timer -= diff;
-
- if (Wave)
- {
- if (Wave_Timer <= diff)
- {
- DoWaveSpawnForCreature(me);
- }
- else
- Wave_Timer -= diff;
- }
- }
- };
-};
-
-/*######
-## go_manaforge_control_console
-######*/
-
-/// @todo clean up this workaround when Trinity adds support to do it properly (with gossip selections instead of instant summon)
-class go_manaforge_control_console : public GameObjectScript
-{
-public:
- go_manaforge_control_console() : GameObjectScript("go_manaforge_control_console") { }
-
- bool OnGossipHello(Player* player, GameObject* go) override
- {
- if (go->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
- {
- player->PrepareQuestMenu(go->GetGUID());
- player->SendPreparedQuest(go->GetGUID());
- }
-
- Creature* manaforge = NULL;
-
- switch (go->GetAreaId())
- {
- case 3726: //b'naar
- if ((player->GetQuestStatus(10299) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(10329) == QUEST_STATUS_INCOMPLETE) &&
- player->HasItemCount(29366))
- manaforge = player->SummonCreature(ENTRY_BNAAR_C_CONSOLE, 2918.95f, 4189.98f, 161.88f, 0.34f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 125000);
- break;
- case 3730: //coruu
- if ((player->GetQuestStatus(10321) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(10330) == QUEST_STATUS_INCOMPLETE) &&
- player->HasItemCount(29396))
- manaforge = player->SummonCreature(ENTRY_CORUU_C_CONSOLE, 2426.77f, 2750.38f, 133.24f, 2.14f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 125000);
- break;
- case 3734: //duro
- if ((player->GetQuestStatus(10322) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(10338) == QUEST_STATUS_INCOMPLETE) &&
- player->HasItemCount(29397))
- manaforge = player->SummonCreature(ENTRY_DURO_C_CONSOLE, 2976.48f, 2183.29f, 163.20f, 1.85f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 125000);
- break;
- case 3722: //ara
- if ((player->GetQuestStatus(10323) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(10365) == QUEST_STATUS_INCOMPLETE) &&
- player->HasItemCount(29411))
- manaforge = player->SummonCreature(ENTRY_ARA_C_CONSOLE, 4013.71f, 4028.76f, 192.10f, 1.25f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 125000);
- break;
- }
-
- if (manaforge)
- {
- ENSURE_AI(npc_manaforge_control_console::npc_manaforge_control_consoleAI, manaforge->AI())->someplayer = player->GetGUID();
- ENSURE_AI(npc_manaforge_control_console::npc_manaforge_control_consoleAI, manaforge->AI())->goConsole = go->GetGUID();
- go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
- }
- return true;
- }
-};
-
-/*######
## npc_commander_dawnforge
######*/
@@ -1054,8 +735,6 @@ class go_captain_tyralius_prison : public GameObjectScript
void AddSC_netherstorm()
{
- new go_manaforge_control_console();
- new npc_manaforge_control_console();
new npc_commander_dawnforge();
new at_commander_dawnforge();
new npc_professor_dabiri();
diff --git a/src/server/scripts/Pet/pet_hunter.cpp b/src/server/scripts/Pet/pet_hunter.cpp
index 7dbdc7af63f..8fd6cb54b0e 100644
--- a/src/server/scripts/Pet/pet_hunter.cpp
+++ b/src/server/scripts/Pet/pet_hunter.cpp
@@ -57,7 +57,7 @@ class npc_pet_hunter_snake_trap : public CreatureScript
me->SetMaxHealth(uint32(107 * (me->getLevel() - 40) * 0.025f));
// Add delta to make them not all hit the same time
uint32 delta = (rand32() % 7) * 100;
- me->SetAttackTime(BASE_ATTACK, Info->baseattacktime + delta);
+ me->SetAttackTime(BASE_ATTACK, Info->BaseAttackTime + delta);
//me->SetStatFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER, float(Info->attackpower));
// Start attacking attacker of owner on first ai update after spawn - move in line of sight may choose better target
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index 87c323aa22f..c43b781936c 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -991,7 +991,7 @@ class spell_item_unsated_craving : public SpellScriptLoader
return false;
Unit* target = procInfo.GetActionTarget();
- if (!target || target->GetTypeId() != TYPEID_UNIT || target->GetCreatureType() == CREATURE_TYPE_CRITTER || (target->GetEntry() != NPC_SINDRAGOSA && target->IsSummon()))
+ if (!target || target->GetTypeId() != TYPEID_UNIT || target->IsCritter() || (target->GetEntry() != NPC_SINDRAGOSA && target->IsSummon()))
return false;
return true;
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index 7076c1142c7..a128c30ad50 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -800,7 +800,7 @@ class spell_pri_shadow_word_death : public SpellScriptLoader
if (AuraEffect* aurEff = GetCaster()->GetDummyAuraEffect(SPELLFAMILY_PRIEST, PRIEST_ICON_ID_PAIN_AND_SUFFERING, EFFECT_1))
AddPct(damage, aurEff->GetAmount());
- GetCaster()->CastCustomSpell(GetCaster(), SPELL_PRIEST_SHADOW_WORD_DEATH, &damage, 0, 0, true);
+ GetCaster()->CastCustomSpell(GetCaster(), SPELL_PRIEST_SHADOW_WORD_DEATH, &damage, nullptr, nullptr, true);
}
void Register() override
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index 854bc77671b..87661710f53 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -1773,7 +1773,7 @@ class spell_q12847_summon_soul_moveto_bunny : public SpellScriptLoader
}
};
- SpellScript *GetSpellScript() const
+ SpellScript *GetSpellScript() const override
{
return new spell_q12847_summon_soul_moveto_bunny_SpellScript();
}
diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp
index 42c1f268715..a04fdba57b9 100644
--- a/src/server/scripts/Spells/spell_rogue.cpp
+++ b/src/server/scripts/Spells/spell_rogue.cpp
@@ -491,7 +491,7 @@ class spell_rog_prey_on_the_weak : public SpellScriptLoader
if (!target->HasAura(SPELL_ROGUE_PREY_ON_THE_WEAK))
{
int32 bp = GetSpellInfo()->Effects[EFFECT_0].CalcValue();
- target->CastCustomSpell(target, SPELL_ROGUE_PREY_ON_THE_WEAK, &bp, 0, 0, true);
+ target->CastCustomSpell(target, SPELL_ROGUE_PREY_ON_THE_WEAK, &bp, nullptr, nullptr, true);
}
}
else
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
index 9b30c073aad..16c2bd4b303 100644
--- a/src/server/scripts/Spells/spell_shaman.cpp
+++ b/src/server/scripts/Spells/spell_shaman.cpp
@@ -871,7 +871,7 @@ class spell_sha_mana_spring_totem : public SpellScriptLoader
if (Unit* target = GetHitUnit())
if (Unit* caster = GetCaster())
if (target->getPowerType() == POWER_MANA)
- caster->CastCustomSpell(target, SPELL_SHAMAN_MANA_SPRING_TOTEM_ENERGIZE, &damage, 0, 0, true, 0, 0, GetOriginalCaster()->GetGUID());
+ caster->CastCustomSpell(target, SPELL_SHAMAN_MANA_SPRING_TOTEM_ENERGIZE, &damage, nullptr, nullptr, true, nullptr, nullptr, GetOriginalCaster()->GetGUID());
}
void Register() override
diff --git a/src/server/shared/Common.h b/src/server/shared/Common.h
index 224ef7fb925..ab268835046 100644
--- a/src/server/shared/Common.h
+++ b/src/server/shared/Common.h
@@ -19,46 +19,6 @@
#ifndef TRINITYCORE_COMMON_H
#define TRINITYCORE_COMMON_H
-// config.h needs to be included 1st
-/// @todo this thingy looks like hack, but its not, need to
-// make separate header however, because It makes mess here.
-#ifdef HAVE_CONFIG_H
-// Remove Some things that we will define
-// This is in case including another config.h
-// before trinity config.h
-#ifdef PACKAGE
-#undef PACKAGE
-#endif //PACKAGE
-#ifdef PACKAGE_BUGREPORT
-#undef PACKAGE_BUGREPORT
-#endif //PACKAGE_BUGREPORT
-#ifdef PACKAGE_NAME
-#undef PACKAGE_NAME
-#endif //PACKAGE_NAME
-#ifdef PACKAGE_STRING
-#undef PACKAGE_STRING
-#endif //PACKAGE_STRING
-#ifdef PACKAGE_TARNAME
-#undef PACKAGE_TARNAME
-#endif //PACKAGE_TARNAME
-#ifdef PACKAGE_VERSION
-#undef PACKAGE_VERSION
-#endif //PACKAGE_VERSION
-#ifdef VERSION
-#undef VERSION
-#endif //VERSION
-
-# include "Config.h"
-
-#undef PACKAGE
-#undef PACKAGE_BUGREPORT
-#undef PACKAGE_NAME
-#undef PACKAGE_STRING
-#undef PACKAGE_TARNAME
-#undef PACKAGE_VERSION
-#undef VERSION
-#endif //HAVE_CONFIG_H
-
#include "Define.h"
#include <unordered_map>
@@ -85,6 +45,13 @@
#if PLATFORM == PLATFORM_WINDOWS
# include <ws2tcpip.h>
+
+# if defined(__INTEL_COMPILER)
+# if !defined(BOOST_ASIO_HAS_MOVE)
+# define BOOST_ASIO_HAS_MOVE
+# endif // !defined(BOOST_ASIO_HAS_MOVE)
+# endif // if defined(__INTEL_COMPILER)
+
#else
# include <sys/types.h>
# include <sys/ioctl.h>
diff --git a/src/server/shared/Database/DatabaseWorkerPool.h b/src/server/shared/Database/DatabaseWorkerPool.h
index 18797b6b12a..5548e44c925 100644
--- a/src/server/shared/Database/DatabaseWorkerPool.h
+++ b/src/server/shared/Database/DatabaseWorkerPool.h
@@ -35,7 +35,7 @@
class PingOperation : public SQLOperation
{
//! Operation for idle delaythreads
- bool Execute()
+ bool Execute() override
{
m_conn->Ping();
return true;
@@ -45,6 +45,14 @@ class PingOperation : public SQLOperation
template <class T>
class DatabaseWorkerPool
{
+ private:
+ enum InternalIndex
+ {
+ IDX_ASYNC,
+ IDX_SYNCH,
+ IDX_SIZE
+ };
+
public:
/* Activity state */
DatabaseWorkerPool() : _connectionInfo(NULL)
@@ -74,34 +82,17 @@ class DatabaseWorkerPool
TC_LOG_INFO("sql.driver", "Opening DatabasePool '%s'. Asynchronous connections: %u, synchronous connections: %u.",
GetDatabaseName(), async_threads, synch_threads);
- //! Open asynchronous connections (delayed operations)
- _connections[IDX_ASYNC].resize(async_threads);
- for (uint8 i = 0; i < async_threads; ++i)
- {
- T* t = new T(_queue, *_connectionInfo);
- res &= t->Open();
- if (res) // only check mysql version if connection is valid
- WPFatal(mysql_get_server_version(t->GetHandle()) >= MIN_MYSQL_SERVER_VERSION, "TrinityCore does not support MySQL versions below 5.1");
- _connections[IDX_ASYNC][i] = t;
- ++_connectionCount[IDX_ASYNC];
- }
+ res = OpenConnections(IDX_ASYNC, async_threads);
- //! Open synchronous connections (direct, blocking operations)
- _connections[IDX_SYNCH].resize(synch_threads);
- for (uint8 i = 0; i < synch_threads; ++i)
- {
- T* t = new T(*_connectionInfo);
- res &= t->Open();
- _connections[IDX_SYNCH][i] = t;
- ++_connectionCount[IDX_SYNCH];
- }
+ if (!res)
+ return res;
+
+ res = OpenConnections(IDX_SYNCH, synch_threads);
if (res)
TC_LOG_INFO("sql.driver", "DatabasePool '%s' opened successfully. %u total connections running.", GetDatabaseName(),
(_connectionCount[IDX_SYNCH] + _connectionCount[IDX_ASYNC]));
- else
- TC_LOG_ERROR("sql.driver", "DatabasePool %s NOT opened. There were errors opening the MySQL connections. Check your SQLDriverLogFile "
- "for specific errors. Read wiki at http://collab.kpsn.org/display/tc/TrinityCore+Home", GetDatabaseName());
+
return res;
}
@@ -112,8 +103,6 @@ class DatabaseWorkerPool
for (uint8 i = 0; i < _connectionCount[IDX_ASYNC]; ++i)
{
T* t = _connections[IDX_ASYNC][i];
- DatabaseWorker* worker = t->m_worker;
- delete worker;
t->Close(); //! Closes the actualy MySQL connection.
}
@@ -442,7 +431,7 @@ class DatabaseWorkerPool
if (str.empty())
return;
- char* buf = new char[str.size()*2+1];
+ char* buf = new char[str.size() * 2 + 1];
EscapeString(buf, str.c_str(), str.size());
str = buf;
delete[] buf;
@@ -470,6 +459,54 @@ class DatabaseWorkerPool
}
private:
+ bool OpenConnections(InternalIndex type, uint8 numConnections)
+ {
+ _connections[type].resize(numConnections);
+ for (uint8 i = 0; i < numConnections; ++i)
+ {
+ T* t;
+
+ if (type == IDX_ASYNC)
+ t = new T(_queue, *_connectionInfo);
+ else if (type == IDX_SYNCH)
+ t = new T(*_connectionInfo);
+ else
+ ASSERT(false);
+
+ _connections[type][i] = t;
+ ++_connectionCount[type];
+
+ bool res = t->Open();
+
+ if (res)
+ {
+ if (mysql_get_server_version(t->GetHandle()) < MIN_MYSQL_SERVER_VERSION)
+ {
+ TC_LOG_ERROR("sql.driver", "TrinityCore does not support MySQL versions below 5.1");
+ res = false;
+ }
+ }
+
+ // Failed to open a connection or invalid version, abort and cleanup
+ if (!res)
+ {
+ TC_LOG_ERROR("sql.driver", "DatabasePool %s NOT opened. There were errors opening the MySQL connections. Check your SQLDriverLogFile "
+ "for specific errors. Read wiki at http://collab.kpsn.org/display/tc/TrinityCore+Home", GetDatabaseName());
+
+ while (_connectionCount[type] != 0)
+ {
+ T* t = _connections[type][i--];
+ delete t;
+ --_connectionCount[type];
+ }
+
+ return false;
+ }
+ }
+
+ return true;
+ }
+
unsigned long EscapeString(char *to, const char *from, unsigned long length)
{
if (!to || !from || !length)
@@ -507,14 +544,6 @@ class DatabaseWorkerPool
return _connectionInfo->database.c_str();
}
- private:
- enum _internalIndex
- {
- IDX_ASYNC,
- IDX_SYNCH,
- IDX_SIZE
- };
-
ProducerConsumerQueue<SQLOperation*>* _queue; //! Queue shared by async worker threads.
std::vector< std::vector<T*> > _connections;
uint32 _connectionCount[2]; //! Counter of MySQL connections;
diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.h b/src/server/shared/Database/Implementation/CharacterDatabase.h
index 61167681b0b..c73f0df8d00 100644
--- a/src/server/shared/Database/Implementation/CharacterDatabase.h
+++ b/src/server/shared/Database/Implementation/CharacterDatabase.h
@@ -29,7 +29,7 @@ class CharacterDatabaseConnection : public MySQLConnection
CharacterDatabaseConnection(ProducerConsumerQueue<SQLOperation*>* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo) { }
//- Loads database type specific prepared statements
- void DoPrepareStatements();
+ void DoPrepareStatements() override;
};
typedef DatabaseWorkerPool<CharacterDatabaseConnection> CharacterDatabaseWorkerPool;
diff --git a/src/server/shared/Database/Implementation/LoginDatabase.h b/src/server/shared/Database/Implementation/LoginDatabase.h
index 7fa2ff49324..d37149c6a76 100644
--- a/src/server/shared/Database/Implementation/LoginDatabase.h
+++ b/src/server/shared/Database/Implementation/LoginDatabase.h
@@ -29,7 +29,7 @@ class LoginDatabaseConnection : public MySQLConnection
LoginDatabaseConnection(ProducerConsumerQueue<SQLOperation*>* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo) { }
//- Loads database type specific prepared statements
- void DoPrepareStatements();
+ void DoPrepareStatements() override;
};
typedef DatabaseWorkerPool<LoginDatabaseConnection> LoginDatabaseWorkerPool;
diff --git a/src/server/shared/Database/Implementation/WorldDatabase.cpp b/src/server/shared/Database/Implementation/WorldDatabase.cpp
index aa2ca4b7e2e..f5d9913bc5b 100644
--- a/src/server/shared/Database/Implementation/WorldDatabase.cpp
+++ b/src/server/shared/Database/Implementation/WorldDatabase.cpp
@@ -76,7 +76,7 @@ void WorldDatabaseConnection::DoPrepareStatements()
PrepareStatement(WORLD_SEL_WAYPOINT_SCRIPT_ID_BY_GUID, "SELECT id FROM waypoint_scripts WHERE guid = ?", CONNECTION_SYNCH);
PrepareStatement(WORLD_DEL_CREATURE, "DELETE FROM creature WHERE guid = ?", CONNECTION_ASYNC);
PrepareStatement(WORLD_SEL_COMMANDS, "SELECT name, permission, help FROM command", CONNECTION_SYNCH);
- PrepareStatement(WORLD_SEL_CREATURE_TEMPLATE, "SELECT difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, modelid1, modelid2, modelid3, modelid4, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, exp, faction, npcflag, speed_walk, speed_run, scale, rank, mindmg, maxdmg, dmgschool, attackpower, dmg_multiplier, baseattacktime, rangeattacktime, unit_class, unit_flags, unit_flags2, dynamicflags, family, trainer_type, trainer_spell, trainer_class, trainer_race, minrangedmg, maxrangedmg, rangedattackpower, type, type_flags, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, spell5, spell6, spell7, spell8, PetSpellDataId, VehicleId, mingold, maxgold, AIName, MovementType, InhabitType, HoverHeight, Health_mod, Mana_mod, Armor_mod, RacialLeader, questItem1, questItem2, questItem3, questItem4, questItem5, questItem6, movementId, RegenHealth, mechanic_immune_mask, flags_extra, ScriptName FROM creature_template WHERE entry = ?", CONNECTION_SYNCH);
+ PrepareStatement(WORLD_SEL_CREATURE_TEMPLATE, "SELECT entry, difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, modelid1, modelid2, modelid3, modelid4, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, exp, faction, npcflag, speed_walk, speed_run, scale, rank, dmgschool, BaseAttackTime, RangeAttackTime, BaseVariance, RangeVariance, unit_class, unit_flags, unit_flags2, dynamicflags, family, trainer_type, trainer_spell, trainer_class, trainer_race, type, type_flags, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, spell5, spell6, spell7, spell8, PetSpellDataId, VehicleId, mingold, maxgold, AIName, MovementType, InhabitType, HoverHeight, HealthModifier, ManaModifier, ArmorModifier, DamageModifier, ExperienceModifier, RacialLeader, questItem1, questItem2, questItem3, questItem4, questItem5, questItem6, movementId, RegenHealth, mechanic_immune_mask, flags_extra, ScriptName FROM creature_template WHERE entry = ?", CONNECTION_SYNCH);
PrepareStatement(WORLD_SEL_WAYPOINT_SCRIPT_BY_ID, "SELECT guid, delay, command, datalong, datalong2, dataint, x, y, z, o FROM waypoint_scripts WHERE id = ?", CONNECTION_SYNCH);
PrepareStatement(WORLD_SEL_ITEM_TEMPLATE_BY_NAME, "SELECT entry FROM item_template WHERE name = ?", CONNECTION_SYNCH);
PrepareStatement(WORLD_SEL_CREATURE_BY_ID, "SELECT guid FROM creature WHERE id = ?", CONNECTION_SYNCH);
@@ -89,6 +89,4 @@ void WorldDatabaseConnection::DoPrepareStatements()
PrepareStatement(WORLD_INS_DISABLES, "INSERT INTO disables (entry, sourceType, flags, comment) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC);
PrepareStatement(WORLD_SEL_DISABLES, "SELECT entry FROM disables WHERE entry = ? AND sourceType = ?", CONNECTION_SYNCH);
PrepareStatement(WORLD_DEL_DISABLES, "DELETE FROM disables WHERE entry = ? AND sourceType = ?", CONNECTION_ASYNC);
- // 0: uint8
- PrepareStatement(WORLD_SEL_REQ_XP, "SELECT xp_for_next_level FROM player_xp_for_level WHERE lvl = ?", CONNECTION_SYNCH);
}
diff --git a/src/server/shared/Database/Implementation/WorldDatabase.h b/src/server/shared/Database/Implementation/WorldDatabase.h
index c8c38d8a629..8a5bd206021 100644
--- a/src/server/shared/Database/Implementation/WorldDatabase.h
+++ b/src/server/shared/Database/Implementation/WorldDatabase.h
@@ -29,7 +29,7 @@ class WorldDatabaseConnection : public MySQLConnection
WorldDatabaseConnection(ProducerConsumerQueue<SQLOperation*>* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo) { }
//- Loads database type specific prepared statements
- void DoPrepareStatements();
+ void DoPrepareStatements() override;
};
typedef DatabaseWorkerPool<WorldDatabaseConnection> WorldDatabaseWorkerPool;
@@ -110,7 +110,6 @@ enum WorldDatabaseStatements
WORLD_SEL_DISABLES,
WORLD_INS_DISABLES,
WORLD_DEL_DISABLES,
- WORLD_SEL_REQ_XP,
MAX_WORLDDATABASE_STATEMENTS
};
diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp
index 8b24f508331..4e46ff0e3a1 100644
--- a/src/server/shared/Database/MySQLConnection.cpp
+++ b/src/server/shared/Database/MySQLConnection.cpp
@@ -57,12 +57,14 @@ m_connectionFlags(CONNECTION_ASYNC)
MySQLConnection::~MySQLConnection()
{
- ASSERT (m_Mysql); /// MySQL context must be present at this point
-
for (size_t i = 0; i < m_stmts.size(); ++i)
delete m_stmts[i];
- mysql_close(m_Mysql);
+ if (m_Mysql)
+ mysql_close(m_Mysql);
+
+ if (m_worker)
+ delete m_worker;
}
void MySQLConnection::Close()
@@ -112,7 +114,7 @@ bool MySQLConnection::Open()
else // generic case
{
port = atoi(m_connectionInfo.port_or_socket.c_str());
- unix_socket = 0;
+ unix_socket = nullptr;
}
#endif
diff --git a/src/server/shared/Database/PreparedStatement.h b/src/server/shared/Database/PreparedStatement.h
index 16f7a9141d3..5af52cde016 100644
--- a/src/server/shared/Database/PreparedStatement.h
+++ b/src/server/shared/Database/PreparedStatement.h
@@ -163,7 +163,7 @@ class PreparedStatementTask : public SQLOperation
PreparedStatementTask(PreparedStatement* stmt, bool async = false);
~PreparedStatementTask();
- bool Execute();
+ bool Execute() override;
PreparedQueryResultFuture GetFuture() { return m_result->get_future(); }
protected:
diff --git a/src/server/shared/Database/QueryHolder.cpp b/src/server/shared/Database/QueryHolder.cpp
index bd938561b50..f0dc3c96e4e 100644
--- a/src/server/shared/Database/QueryHolder.cpp
+++ b/src/server/shared/Database/QueryHolder.cpp
@@ -166,8 +166,16 @@ void SQLQueryHolder::SetSize(size_t size)
m_queries.resize(size);
}
+SQLQueryHolderTask::~SQLQueryHolderTask()
+{
+ if (!m_executed)
+ delete m_holder;
+}
+
bool SQLQueryHolderTask::Execute()
{
+ m_executed = true;
+
if (!m_holder)
return false;
diff --git a/src/server/shared/Database/QueryHolder.h b/src/server/shared/Database/QueryHolder.h
index 37e23ecd653..39e51b591c5 100644
--- a/src/server/shared/Database/QueryHolder.h
+++ b/src/server/shared/Database/QueryHolder.h
@@ -47,14 +47,16 @@ class SQLQueryHolderTask : public SQLOperation
private:
SQLQueryHolder* m_holder;
QueryResultHolderPromise m_result;
+ bool m_executed;
public:
SQLQueryHolderTask(SQLQueryHolder* holder)
- : m_holder(holder) { };
+ : m_holder(holder), m_executed(false) { }
- bool Execute();
- QueryResultHolderFuture GetFuture() { return m_result.get_future(); }
+ ~SQLQueryHolderTask();
+ bool Execute() override;
+ QueryResultHolderFuture GetFuture() { return m_result.get_future(); }
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/server/shared/Database/QueryResult.cpp b/src/server/shared/Database/QueryResult.cpp
index 06b09d43168..a7b8ec2b107 100644
--- a/src/server/shared/Database/QueryResult.cpp
+++ b/src/server/shared/Database/QueryResult.cpp
@@ -124,7 +124,7 @@ m_length(NULL)
*m_rBind[fIndex].length);
break;
default:
- m_rows[uint32(m_rowPosition)][fIndex].SetByteValue(0,
+ m_rows[uint32(m_rowPosition)][fIndex].SetByteValue(nullptr,
m_rBind[fIndex].buffer_length,
m_rBind[fIndex].buffer_type,
*m_rBind[fIndex].length);
diff --git a/src/server/shared/Database/Transaction.h b/src/server/shared/Database/Transaction.h
index c7cbbbbe712..3822c2c82c1 100644
--- a/src/server/shared/Database/Transaction.h
+++ b/src/server/shared/Database/Transaction.h
@@ -63,7 +63,7 @@ class TransactionTask : public SQLOperation
~TransactionTask(){ };
protected:
- bool Execute();
+ bool Execute() override;
SQLTransaction m_trans;
};
diff --git a/src/server/shared/Dynamic/LinkedList.h b/src/server/shared/Dynamic/LinkedList.h
index 402aaf3d40c..87bbeaac380 100644
--- a/src/server/shared/Dynamic/LinkedList.h
+++ b/src/server/shared/Dynamic/LinkedList.h
@@ -150,7 +150,7 @@ class LinkedListHead
typedef _Ty& reference;
typedef _Ty const & const_reference;
- Iterator() : _Ptr(0)
+ Iterator() : _Ptr(nullptr)
{ // construct with null node pointer
}
diff --git a/src/server/shared/Logging/AppenderConsole.h b/src/server/shared/Logging/AppenderConsole.h
index b8f15b4fa0f..5b66f86650d 100644
--- a/src/server/shared/Logging/AppenderConsole.h
+++ b/src/server/shared/Logging/AppenderConsole.h
@@ -51,7 +51,7 @@ class AppenderConsole: public Appender
private:
void SetColor(bool stdout_stream, ColorTypes color);
void ResetColor(bool stdout_stream);
- void _write(LogMessage const& message);
+ void _write(LogMessage const& message) override;
bool _colored;
ColorTypes _colors[MaxLogLevels];
};
diff --git a/src/server/shared/Logging/AppenderDB.h b/src/server/shared/Logging/AppenderDB.h
index 660992261fd..b86252d0d67 100644
--- a/src/server/shared/Logging/AppenderDB.h
+++ b/src/server/shared/Logging/AppenderDB.h
@@ -31,7 +31,7 @@ class AppenderDB: public Appender
private:
uint32 realmId;
bool enabled;
- void _write(LogMessage const& message);
+ void _write(LogMessage const& message) override;
};
#endif
diff --git a/src/server/shared/Logging/AppenderFile.h b/src/server/shared/Logging/AppenderFile.h
index a600c92d152..37ba2769e19 100644
--- a/src/server/shared/Logging/AppenderFile.h
+++ b/src/server/shared/Logging/AppenderFile.h
@@ -30,7 +30,7 @@ class AppenderFile: public Appender
private:
void CloseFile();
- void _write(LogMessage const& message);
+ void _write(LogMessage const& message) override;
FILE* logfile;
std::string filename;
std::string logDir;
diff --git a/src/server/shared/Networking/MessageBuffer.h b/src/server/shared/Networking/MessageBuffer.h
new file mode 100644
index 00000000000..c7f8ba31a71
--- /dev/null
+++ b/src/server/shared/Networking/MessageBuffer.h
@@ -0,0 +1,95 @@
+/*
+* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
+*
+* This program is free software; you can redistribute it and/or modify it
+* under the terms of the GNU General Public License as published by the
+* Free Software Foundation; either version 2 of the License, or (at your
+* option) any later version.
+*
+* This program is distributed in the hope that it will be useful, but WITHOUT
+* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+* more details.
+*
+* You should have received a copy of the GNU General Public License along
+* with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __MESSAGEBUFFER_H_
+#define __MESSAGEBUFFER_H_
+
+#include "Define.h"
+#include <vector>
+
+class MessageBuffer
+{
+ typedef std::vector<uint8>::size_type size_type;
+
+public:
+ MessageBuffer() : _wpos(0), _storage() { }
+
+ MessageBuffer(MessageBuffer const& right) : _wpos(right._wpos), _storage(right._storage) { }
+
+ MessageBuffer(MessageBuffer&& right) : _wpos(right._wpos), _storage(right.Move()) { }
+
+ void Reset()
+ {
+ _storage.clear();
+ _wpos = 0;
+ }
+
+ bool IsMessageReady() const { return _wpos == _storage.size(); }
+
+ size_type GetSize() const { return _storage.size(); }
+
+ size_type GetReadyDataSize() const { return _wpos; }
+
+ size_type GetMissingSize() const { return _storage.size() - _wpos; }
+
+ uint8* Data() { return _storage.data(); }
+
+ void Grow(size_type bytes)
+ {
+ _storage.resize(_storage.size() + bytes);
+ }
+
+ uint8* GetWritePointer() { return &_storage[_wpos]; }
+
+ void WriteCompleted(size_type bytes) { _wpos += bytes; }
+
+ void ResetWritePointer() { _wpos = 0; }
+
+ std::vector<uint8>&& Move()
+ {
+ _wpos = 0;
+ return std::move(_storage);
+ }
+
+ MessageBuffer& operator=(MessageBuffer& right)
+ {
+ if (this != &right)
+ {
+ _wpos = right._wpos;
+ _storage = right._storage;
+ }
+
+ return *this;
+ }
+
+ MessageBuffer& operator=(MessageBuffer&& right)
+ {
+ if (this != &right)
+ {
+ _wpos = right._wpos;
+ _storage = right.Move();
+ }
+
+ return *this;
+ }
+
+private:
+ size_type _wpos;
+ std::vector<uint8> _storage;
+};
+
+#endif /* __MESSAGEBUFFER_H_ */
diff --git a/src/server/shared/Networking/Socket.h b/src/server/shared/Networking/Socket.h
index 6bf67e06d9c..a13a079ff6c 100644
--- a/src/server/shared/Networking/Socket.h
+++ b/src/server/shared/Networking/Socket.h
@@ -18,8 +18,9 @@
#ifndef __SOCKET_H__
#define __SOCKET_H__
-#include "Define.h"
+#include "MessageBuffer.h"
#include "Log.h"
+#include <atomic>
#include <vector>
#include <mutex>
#include <queue>
@@ -28,19 +29,34 @@
#include <type_traits>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/write.hpp>
+#include <boost/asio/read.hpp>
using boost::asio::ip::tcp;
+#define READ_BLOCK_SIZE 4096
+
template<class T, class PacketType>
class Socket : public std::enable_shared_from_this<T>
{
typedef typename std::conditional<std::is_pointer<PacketType>::value, PacketType, PacketType const&>::type WritePacketType;
public:
- Socket(tcp::socket&& socket, std::size_t headerSize) : _socket(std::move(socket)), _headerSize(headerSize)
+ Socket(tcp::socket&& socket, std::size_t headerSize) : _socket(std::move(socket)), _remoteAddress(_socket.remote_endpoint().address()),
+ _remotePort(_socket.remote_endpoint().port()), _readHeaderBuffer(), _readDataBuffer(), _closed(false)
+ {
+ _readHeaderBuffer.Grow(headerSize);
+ }
+
+ virtual ~Socket()
{
- _remotePort = _socket.remote_endpoint().port();
- _remoteAddress = _socket.remote_endpoint().address();
+ boost::system::error_code error;
+ _socket.close(error);
+
+ while (!_writeQueue.empty())
+ {
+ DeletePacket(_writeQueue.front());
+ _writeQueue.pop();
+ }
}
virtual void Start() = 0;
@@ -57,25 +73,48 @@ public:
void AsyncReadHeader()
{
- _socket.async_read_some(boost::asio::buffer(_readBuffer, _headerSize), std::bind(&Socket<T, PacketType>::ReadHeaderHandlerInternal, this->shared_from_this(),
- std::placeholders::_1, std::placeholders::_2));
+ if (!IsOpen())
+ return;
+
+ _readHeaderBuffer.ResetWritePointer();
+ _readDataBuffer.Reset();
+
+ AsyncReadMissingHeaderData();
}
- void AsyncReadData(std::size_t size, std::size_t bufferOffset)
+ void AsyncReadData(std::size_t size)
{
- _socket.async_read_some(boost::asio::buffer(&_readBuffer[bufferOffset], size), std::bind(&Socket<T, PacketType>::ReadDataHandlerInternal, this->shared_from_this(),
- std::placeholders::_1, std::placeholders::_2));
+ if (!IsOpen())
+ return;
+
+ if (!size)
+ {
+ // if this is a packet with 0 length body just invoke handler directly
+ ReadDataHandler();
+ return;
+ }
+
+ _readDataBuffer.Grow(size);
+ AsyncReadMissingData();
}
- void ReadData(std::size_t size, std::size_t bufferOffset)
+ void ReadData(std::size_t size)
{
+ if (!IsOpen())
+ return;
+
boost::system::error_code error;
- _socket.read_some(boost::asio::buffer(&_readBuffer[bufferOffset], size), error);
+ _readDataBuffer.Grow(size);
- if (error)
+ std::size_t bytesRead = boost::asio::read(_socket, boost::asio::buffer(_readDataBuffer.GetWritePointer(), size), error);
+
+ _readDataBuffer.WriteCompleted(bytesRead);
+
+ if (error || !_readDataBuffer.IsMessageReady())
{
- TC_LOG_DEBUG("network", "Socket::ReadData: %s errored with: %i (%s)", GetRemoteIpAddress().to_string().c_str(), error.value(), error.message().c_str());
+ TC_LOG_DEBUG("network", "Socket::ReadData: %s errored with: %i (%s)", GetRemoteIpAddress().to_string().c_str(), error.value(),
+ error.message().c_str());
CloseSocket();
}
@@ -83,38 +122,93 @@ public:
void AsyncWrite(WritePacketType data)
{
- boost::asio::async_write(_socket, boost::asio::buffer(data), std::bind(&Socket<T, PacketType>::WriteHandler, this->shared_from_this(), std::placeholders::_1,
- std::placeholders::_2));
+ boost::asio::async_write(_socket, boost::asio::buffer(data), std::bind(&Socket<T, PacketType>::WriteHandler, this->shared_from_this(),
+ std::placeholders::_1, std::placeholders::_2));
}
- bool IsOpen() const { return _socket.is_open(); }
- void CloseSocket()
+ bool IsOpen() const { return !_closed; }
+
+ virtual void CloseSocket()
{
+ if (_closed.exchange(true))
+ return;
+
boost::system::error_code shutdownError;
- _socket.shutdown(boost::asio::socket_base::shutdown_both, shutdownError);
+ _socket.shutdown(boost::asio::socket_base::shutdown_send, shutdownError);
if (shutdownError)
TC_LOG_DEBUG("network", "Socket::CloseSocket: %s errored when shutting down socket: %i (%s)", GetRemoteIpAddress().to_string().c_str(),
- shutdownError.value(), shutdownError.message().c_str());
-
- boost::system::error_code error;
- _socket.close(error);
- if (error)
- TC_LOG_DEBUG("network", "Socket::CloseSocket: %s errored when closing socket: %i (%s)", GetRemoteIpAddress().to_string().c_str(),
- error.value(), error.message().c_str());
+ shutdownError.value(), shutdownError.message().c_str());
}
- uint8* GetReadBuffer() { return _readBuffer; }
+ virtual bool IsHeaderReady() const { return _readHeaderBuffer.IsMessageReady(); }
+ virtual bool IsDataReady() const { return _readDataBuffer.IsMessageReady(); }
+
+ uint8* GetHeaderBuffer() { return _readHeaderBuffer.Data(); }
+ uint8* GetDataBuffer() { return _readDataBuffer.Data(); }
+
+ size_t GetHeaderSize() const { return _readHeaderBuffer.GetReadyDataSize(); }
+ size_t GetDataSize() const { return _readDataBuffer.GetReadyDataSize(); }
+
+ MessageBuffer&& MoveHeader() { return std::move(_readHeaderBuffer); }
+ MessageBuffer&& MoveData() { return std::move(_readDataBuffer); }
protected:
- virtual void ReadHeaderHandler(boost::system::error_code error, size_t transferedBytes) = 0;
- virtual void ReadDataHandler(boost::system::error_code error, size_t transferedBytes) = 0;
+ virtual void ReadHeaderHandler() = 0;
+ virtual void ReadDataHandler() = 0;
std::mutex _writeLock;
std::queue<PacketType> _writeQueue;
private:
- void ReadHeaderHandlerInternal(boost::system::error_code error, size_t transferedBytes) { ReadHeaderHandler(error, transferedBytes); }
- void ReadDataHandlerInternal(boost::system::error_code error, size_t transferedBytes) { ReadDataHandler(error, transferedBytes); }
+ void AsyncReadMissingHeaderData()
+ {
+ _socket.async_read_some(boost::asio::buffer(_readHeaderBuffer.GetWritePointer(), std::min<std::size_t>(READ_BLOCK_SIZE, _readHeaderBuffer.GetMissingSize())),
+ std::bind(&Socket<T, PacketType>::ReadHeaderHandlerInternal, this->shared_from_this(), std::placeholders::_1, std::placeholders::_2));
+ }
+
+ void AsyncReadMissingData()
+ {
+ _socket.async_read_some(boost::asio::buffer(_readDataBuffer.GetWritePointer(), std::min<std::size_t>(READ_BLOCK_SIZE, _readDataBuffer.GetMissingSize())),
+ std::bind(&Socket<T, PacketType>::ReadDataHandlerInternal, this->shared_from_this(), std::placeholders::_1, std::placeholders::_2));
+ }
+
+ void ReadHeaderHandlerInternal(boost::system::error_code error, size_t transferredBytes)
+ {
+ if (error)
+ {
+ CloseSocket();
+ return;
+ }
+
+ _readHeaderBuffer.WriteCompleted(transferredBytes);
+ if (!IsHeaderReady())
+ {
+ // incomplete, read more
+ AsyncReadMissingHeaderData();
+ return;
+ }
+
+ ReadHeaderHandler();
+ }
+
+ void ReadDataHandlerInternal(boost::system::error_code error, size_t transferredBytes)
+ {
+ if (error)
+ {
+ CloseSocket();
+ return;
+ }
+
+ _readDataBuffer.WriteCompleted(transferredBytes);
+ if (!IsDataReady())
+ {
+ // incomplete, read more
+ AsyncReadMissingData();
+ return;
+ }
+
+ ReadDataHandler();
+ }
void WriteHandler(boost::system::error_code error, size_t /*transferedBytes*/)
{
@@ -140,12 +234,13 @@ private:
tcp::socket _socket;
- uint8 _readBuffer[4096];
-
- uint16 _remotePort;
boost::asio::ip::address _remoteAddress;
+ uint16 _remotePort;
+
+ MessageBuffer _readHeaderBuffer;
+ MessageBuffer _readDataBuffer;
- std::size_t _headerSize;
+ std::atomic<bool> _closed;
};
#endif // __SOCKET_H__
diff --git a/src/server/shared/Packets/ByteBuffer.cpp b/src/server/shared/Packets/ByteBuffer.cpp
index 86234039a4a..3785d1c29fa 100644
--- a/src/server/shared/Packets/ByteBuffer.cpp
+++ b/src/server/shared/Packets/ByteBuffer.cpp
@@ -17,11 +17,16 @@
*/
#include "ByteBuffer.h"
+#include "MessageBuffer.h"
#include "Common.h"
#include "Log.h"
#include <sstream>
+ByteBuffer::ByteBuffer(MessageBuffer&& buffer) : _rpos(0), _wpos(0), _storage(buffer.Move())
+{
+}
+
ByteBufferPositionException::ByteBufferPositionException(bool add, size_t pos,
size_t size, size_t valueSize)
{
diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h
index 9744904f0dc..456223d744d 100644
--- a/src/server/shared/Packets/ByteBuffer.h
+++ b/src/server/shared/Packets/ByteBuffer.h
@@ -34,13 +34,15 @@
#include <math.h>
#include <boost/asio/buffer.hpp>
+class MessageBuffer;
+
// Root of ByteBuffer exception hierarchy
class ByteBufferException : public std::exception
{
public:
~ByteBufferException() throw() { }
- char const* what() const throw() { return msg_.c_str(); }
+ char const* what() const throw() override { return msg_.c_str(); }
protected:
std::string & message() throw() { return msg_; }
@@ -82,14 +84,12 @@ class ByteBuffer
}
ByteBuffer(ByteBuffer&& buf) : _rpos(buf._rpos), _wpos(buf._wpos),
- _storage(std::move(buf._storage))
- {
- }
+ _storage(std::move(buf._storage)) { }
ByteBuffer(ByteBuffer const& right) : _rpos(right._rpos), _wpos(right._wpos),
- _storage(right._storage)
- {
- }
+ _storage(right._storage) { }
+
+ ByteBuffer(MessageBuffer&& buffer);
ByteBuffer& operator=(ByteBuffer const& right)
{
diff --git a/src/server/shared/Packets/WorldPacket.h b/src/server/shared/Packets/WorldPacket.h
index 8851b9f3e45..848a00739fe 100644
--- a/src/server/shared/Packets/WorldPacket.h
+++ b/src/server/shared/Packets/WorldPacket.h
@@ -51,6 +51,8 @@ class WorldPacket : public ByteBuffer
return *this;
}
+ WorldPacket(uint16 opcode, MessageBuffer&& buffer) : ByteBuffer(std::move(buffer)), m_opcode(opcode) { }
+
void Initialize(uint16 opcode, size_t newres=200)
{
clear();
diff --git a/src/server/shared/Threading/ProducerConsumerQueue.h b/src/server/shared/Threading/ProducerConsumerQueue.h
index accb0aebb11..a76b8b0b5c0 100644
--- a/src/server/shared/Threading/ProducerConsumerQueue.h
+++ b/src/server/shared/Threading/ProducerConsumerQueue.h
@@ -39,10 +39,8 @@ public:
void Push(const T& value)
{
- {
- std::lock_guard<std::mutex> lock(_queueLock);
- _queue.push(std::move(value));
- }
+ std::lock_guard<std::mutex> lock(_queueLock);
+ _queue.push(std::move(value));
_condition.notify_one();
}
@@ -72,10 +70,7 @@ public:
{
std::unique_lock<std::mutex> lock(_queueLock);
- while (_queue.empty() && !_shutdown)
- {
- _condition.wait(lock);
- }
+ _condition.wait(lock, [this]() { return !_queue.empty() || _shutdown; });
if (_queue.empty() || _shutdown)
return;
diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp
index 3afa9e84e8b..e149902af02 100644
--- a/src/server/worldserver/Main.cpp
+++ b/src/server/worldserver/Main.cpp
@@ -87,6 +87,7 @@ bool StartDB();
void StopDB();
void WorldUpdateLoop();
void ClearOnlineAccounts();
+void ShutdownThreadPool(std::vector<std::thread>& threadPool);
variables_map GetConsoleArguments(int argc, char** argv, std::string& cfg_file, std::string& cfg_service);
/// Launch the Trinity server
@@ -179,7 +180,10 @@ extern int main(int argc, char** argv)
// Start the databases
if (!StartDB())
+ {
+ ShutdownThreadPool(threadPool);
return 1;
+ }
// Set server offline (not connectable)
LoginDatabase.DirectPExecute("UPDATE realmlist SET flag = (flag & ~%u) | %u WHERE id = '%d'", REALM_FLAG_OFFLINE, REALM_FLAG_INVALID, realmID);
@@ -217,7 +221,7 @@ extern int main(int argc, char** argv)
AsyncAcceptor<WorldSocket> worldAcceptor(_ioService, worldListener, worldPort, tcpNoDelay);
- sScriptMgr->OnStartup();
+ sScriptMgr->OnNetworkStart();
// Set server online (allow connecting now)
LoginDatabase.DirectPExecute("UPDATE realmlist SET flag = flag & ~%u, population = 0 WHERE id = '%u'", REALM_FLAG_INVALID, realmID);
@@ -233,16 +237,12 @@ extern int main(int argc, char** argv)
TC_LOG_INFO("server.worldserver", "%s (worldserver-daemon) ready...", _FULLVERSION);
+ sScriptMgr->OnStartup();
+
WorldUpdateLoop();
// Shutdown starts here
-
- _ioService.stop();
-
- for (auto& thread : threadPool)
- {
- thread.join();
- }
+ ShutdownThreadPool(threadPool);
sScriptMgr->OnShutdown();
@@ -281,41 +281,7 @@ extern int main(int argc, char** argv)
if (cliThread != nullptr)
{
#ifdef _WIN32
-
- // this only way to terminate CLI thread exist at Win32 (alt. way exist only in Windows Vista API)
- //_exit(1);
- // send keyboard input to safely unblock the CLI thread
- INPUT_RECORD b[4];
- HANDLE hStdIn = GetStdHandle(STD_INPUT_HANDLE);
- b[0].EventType = KEY_EVENT;
- b[0].Event.KeyEvent.bKeyDown = TRUE;
- b[0].Event.KeyEvent.uChar.AsciiChar = 'X';
- b[0].Event.KeyEvent.wVirtualKeyCode = 'X';
- b[0].Event.KeyEvent.wRepeatCount = 1;
-
- b[1].EventType = KEY_EVENT;
- b[1].Event.KeyEvent.bKeyDown = FALSE;
- b[1].Event.KeyEvent.uChar.AsciiChar = 'X';
- b[1].Event.KeyEvent.wVirtualKeyCode = 'X';
- b[1].Event.KeyEvent.wRepeatCount = 1;
-
- b[2].EventType = KEY_EVENT;
- b[2].Event.KeyEvent.bKeyDown = TRUE;
- b[2].Event.KeyEvent.dwControlKeyState = 0;
- b[2].Event.KeyEvent.uChar.AsciiChar = '\r';
- b[2].Event.KeyEvent.wVirtualKeyCode = VK_RETURN;
- b[2].Event.KeyEvent.wRepeatCount = 1;
- b[2].Event.KeyEvent.wVirtualScanCode = 0x1c;
-
- b[3].EventType = KEY_EVENT;
- b[3].Event.KeyEvent.bKeyDown = FALSE;
- b[3].Event.KeyEvent.dwControlKeyState = 0;
- b[3].Event.KeyEvent.uChar.AsciiChar = '\r';
- b[3].Event.KeyEvent.wVirtualKeyCode = VK_RETURN;
- b[3].Event.KeyEvent.wVirtualScanCode = 0x1c;
- b[3].Event.KeyEvent.wRepeatCount = 1;
- DWORD numb;
- WriteConsoleInput(hStdIn, b, 4, &numb);
+ CancelSynchronousIo(cliThread->native_handle());
#endif
cliThread->join();
delete cliThread;
@@ -330,6 +296,17 @@ extern int main(int argc, char** argv)
return World::GetExitCode();
}
+void ShutdownThreadPool(std::vector<std::thread>& threadPool)
+{
+ sScriptMgr->OnNetworkStop();
+
+ _ioService.stop();
+
+ for (auto& thread : threadPool)
+ {
+ thread.join();
+ }
+}
void WorldUpdateLoop()
{
diff --git a/src/tools/mmaps_generator/PathGenerator.cpp b/src/tools/mmaps_generator/PathGenerator.cpp
index 3e2025dace8..c2ca184905e 100644
--- a/src/tools/mmaps_generator/PathGenerator.cpp
+++ b/src/tools/mmaps_generator/PathGenerator.cpp
@@ -276,7 +276,7 @@ int main(int argc, char** argv)
}
if (!checkDirectories(debugOutput))
- return silent ? -3 : finish("Press any key to close...", -3);
+ return silent ? -3 : finish("Press ENTER to close...", -3);
MapBuilder builder(maxAngle, skipLiquid, skipContinents, skipJunkMaps,
skipBattlegrounds, debugOutput, bigBaseUnit, offMeshInputPath);