aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaelima <kaelima@live.se>2012-12-21 00:00:16 +0100
committerkaelima <kaelima@live.se>2012-12-21 00:00:16 +0100
commit0a88787dfc747437b6278a044a425b6483e61b37 (patch)
tree65942c84524890446a79ef67fd1ea2ce622a8544
parent8f27dfda627903997b67cab9ebb4c5b365da201e (diff)
parent4116ba75e3bef999c3111943c3b389ffc195b686 (diff)
Merge git://github.com/TrinityCore/TrinityCore into mmaps
Conflicts: src/server/game/Entities/Vehicle/Vehicle.cpp src/server/game/Movement/MovementGenerator.h src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp src/server/game/Movement/MovementGenerators/PointMovementGenerator.h src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h src/server/game/Movement/Spline/MoveSpline.h
-rw-r--r--CMakeLists.txt2
-rw-r--r--cmake/compiler/clang/settings.cmake4
-rw-r--r--cmake/compiler/gcc/settings.cmake4
-rw-r--r--cmake/compiler/icc/settings.cmake5
-rw-r--r--cmake/macros/CheckPlatform.cmake2
-rw-r--r--cmake/platform/osx/settings.cmake33
-rw-r--r--cmake/platform/unix/settings.cmake2
-rw-r--r--dep/SFMT/SFMT.h4
-rw-r--r--sql/base/characters_database.sql59
-rw-r--r--sql/updates/characters/2012_12_03_00_character_character_queststatus_monthly.sql8
-rw-r--r--sql/updates/characters/2012_12_18_00_character_worldstates.sql4
-rw-r--r--sql/updates/characters/2012_12_20_00_characters_create_item_loot.sql52
-rw-r--r--sql/updates/world/2012_11_24_00_world_conditions.sql34
-rw-r--r--sql/updates/world/2012_11_24_01_world_quest_start_scripts.sql24
-rw-r--r--sql/updates/world/2012_11_24_02_world_creature_text.sql346
-rw-r--r--sql/updates/world/2012_11_24_02_world_gossip_menu_option.sql24
-rw-r--r--sql/updates/world/2012_11_24_03_world_various_fixes.sql601
-rw-r--r--sql/updates/world/2012_11_24_04_world_sai.sql25
-rw-r--r--sql/updates/world/2012_11_25_00_world_various_fixes.sql89
-rw-r--r--sql/updates/world/2012_11_25_01_world_various_fixes.sql406
-rw-r--r--sql/updates/world/2012_11_26_02_world_conditions.sql5
-rw-r--r--sql/updates/world/2012_11_26_03_world_misc.sql115
-rw-r--r--sql/updates/world/2012_11_27_00_world_misc.sql24
-rw-r--r--sql/updates/world/2012_11_27_01_world_achievement_criteria_data.sql6
-rw-r--r--sql/updates/world/2012_11_30_00_world_spell_script_names.sql4
-rw-r--r--sql/updates/world/2012_12_01_00_world_assembly_of_iron.sql44
-rw-r--r--sql/updates/world/2012_12_01_01_world_misc.sql74
-rw-r--r--sql/updates/world/2012_12_01_02_world_creature_text.sql413
-rw-r--r--sql/updates/world/2012_12_01_03_world_ulduar_creature_text.sql174
-rw-r--r--sql/updates/world/2012_12_01_04_world_spelldifficulty_dbc.sql8
-rw-r--r--sql/updates/world/2012_12_01_05_world_creature_template.sql1
-rw-r--r--sql/updates/world/2012_12_02_00_world_game_object.sql24
-rw-r--r--sql/updates/world/2012_12_02_01_world_creature_text.sql777
-rw-r--r--sql/updates/world/2012_12_02_02_world_waypoint_data.sql461
-rw-r--r--sql/updates/world/2012_12_04_00_world_creature_text.sql388
-rw-r--r--sql/updates/world/2012_12_04_01_world_quest_start_scripts.sql4
-rw-r--r--sql/updates/world/2012_12_04_02_world_reputation_reward_rate.sql2
-rw-r--r--sql/updates/world/2012_12_04_03_world_reputation_reward_rate.sql1
-rw-r--r--sql/updates/world/2012_12_04_04_world_creature_text.sql25
-rw-r--r--sql/updates/world/2012_12_04_05_world_spell_script_names.sql3
-rw-r--r--sql/updates/world/2012_12_04_06_world_spell_creature_text.sql28
-rw-r--r--sql/updates/world/2012_12_05_00_world_creature_text.sql1
-rw-r--r--sql/updates/world/2012_12_06_00_world_creature_text.sql697
-rw-r--r--sql/updates/world/2012_12_07_00_world_creature_text.sql462
-rw-r--r--sql/updates/world/2012_12_07_00_world_script_texts.sql2
-rw-r--r--sql/updates/world/2012_12_07_01_world_misc.sql73
-rw-r--r--sql/updates/world/2012_12_07_02_world_tracker_pitcrawler.sql596
-rw-r--r--sql/updates/world/2012_12_07_03_world_tracker_trista.sql218
-rw-r--r--sql/updates/world/2012_12_07_04_world_misc.sql5
-rw-r--r--sql/updates/world/2012_12_07_05_world_creature_text.sql22
-rw-r--r--sql/updates/world/2012_12_07_06_world_sai.sql35
-rw-r--r--sql/updates/world/2012_12_07_07_world_sai.sql36
-rw-r--r--sql/updates/world/2012_12_07_08_world_misc.sql7
-rw-r--r--sql/updates/world/2012_12_07_09_world_db_script_string.sql2
-rw-r--r--sql/updates/world/2012_12_08_00_world_creature_text.sql12
-rw-r--r--sql/updates/world/2012_12_08_01_world_sai.sql56
-rw-r--r--sql/updates/world/2012_12_09_00_world_conditions.sql1
-rw-r--r--sql/updates/world/2012_12_09_00_world_creature_text.sql40
-rw-r--r--sql/updates/world/2012_12_09_01_world_misc.sql2
-rw-r--r--sql/updates/world/2012_12_09_02_world_quest_template.sql1
-rw-r--r--sql/updates/world/2012_12_10_00_world_smart_scripts.sql3
-rw-r--r--sql/updates/world/2012_12_10_01_world_spell_script_names.sql4
-rw-r--r--sql/updates/world/2012_12_10_02_world_spawns_waypoints.sql605
-rw-r--r--sql/updates/world/2012_12_13_00_world.sql4
-rw-r--r--sql/updates/world/2012_12_14_00_world_conditions.sql4
-rw-r--r--sql/updates/world/2012_12_14_01_world_waypoint_data.sql188
-rw-r--r--sql/updates/world/2012_12_14_02_world_misc.sql15
-rw-r--r--sql/updates/world/2012_12_14_03_world_npc_spellclick_spells.sql1
-rw-r--r--sql/updates/world/2012_12_14_04_world_misc.sql7
-rw-r--r--sql/updates/world/2012_12_14_05_world_spell_script_names.sql10
-rw-r--r--sql/updates/world/2012_12_15_00_world_waypoint_data.sql344
-rw-r--r--sql/updates/world/2012_12_15_01_world_sai.sql95
-rw-r--r--sql/updates/world/2012_12_15_02_world_sai.sql40
-rw-r--r--sql/updates/world/2012_12_15_03_world_quest_end_scripts.sql8
-rw-r--r--sql/updates/world/2012_12_16_00_world_creature_addon.sql5
-rw-r--r--sql/updates/world/2012_12_16_01_world_npc_vendor.sql10
-rw-r--r--sql/updates/world/2012_12_16_02_world_creature_text.sql186
-rw-r--r--sql/updates/world/2012_12_16_03_world_sai.sql34
-rw-r--r--sql/updates/world/2012_12_17_00_world_creature_template.sql2
-rw-r--r--sql/updates/world/2012_12_17_00_world_song_of_wind_and_water.sql38
-rw-r--r--sql/updates/world/2012_12_17_00_world_spell_linked_spell.sql4
-rw-r--r--sql/updates/world/2012_12_18_00_world_creature_text.sql5
-rw-r--r--sql/updates/world/2012_12_18_00_world_waking_the_sleeper.sql47
-rw-r--r--sql/updates/world/2012_12_18_01_world_creature_text.sql75
-rw-r--r--sql/updates/world/2012_12_18_02_world_misc.sql14
-rw-r--r--sql/updates/world/2012_12_18_02_world_sai.sql47
-rw-r--r--sql/updates/world/2012_12_19_00_world_sai.sql106
-rw-r--r--sql/updates/world/2012_12_19_01_world_viscidus.sql11
-rw-r--r--sql/updates/world/2012_12_19_02_world_sai.sql19
-rw-r--r--sql/updates/world/2012_12_20_00_world_conditions.sql3
-rw-r--r--sql/updates/world/2012_12_20_01_world_conditions.sql3
-rw-r--r--sql/updates/world/2012_12_20_02_world_misc.sql26
-rw-r--r--sql/updates/world/2012_12_20_0_world_conditions.sql1
-rw-r--r--[-rwxr-xr-x]src/server/authserver/Authentication/AuthCodes.h0
-rw-r--r--[-rwxr-xr-x]src/server/authserver/Main.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/authserver/Realms/RealmList.cpp16
-rw-r--r--[-rwxr-xr-x]src/server/authserver/Realms/RealmList.h5
-rw-r--r--[-rwxr-xr-x]src/server/authserver/Server/AuthSocket.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/authserver/Server/AuthSocket.h0
-rw-r--r--[-rwxr-xr-x]src/server/authserver/Server/RealmAcceptor.h0
-rw-r--r--[-rwxr-xr-x]src/server/authserver/Server/RealmSocket.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/authserver/Server/RealmSocket.h0
-rw-r--r--[-rwxr-xr-x]src/server/authserver/authserver.rc0
-rw-r--r--[-rwxr-xr-x]src/server/collision/BoundingIntervalHierarchy.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/collision/BoundingIntervalHierarchy.h0
-rw-r--r--[-rwxr-xr-x]src/server/collision/Management/IVMapManager.h0
-rw-r--r--[-rwxr-xr-x]src/server/collision/Management/VMapFactory.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/collision/Management/VMapFactory.h0
-rw-r--r--[-rwxr-xr-x]src/server/collision/Management/VMapManager2.h0
-rw-r--r--[-rwxr-xr-x]src/server/collision/Maps/MapTree.h0
-rw-r--r--[-rwxr-xr-x]src/server/collision/Maps/TileAssembler.h0
-rw-r--r--[-rwxr-xr-x]src/server/collision/Models/ModelInstance.h0
-rw-r--r--[-rwxr-xr-x]src/server/collision/Models/WorldModel.h0
-rw-r--r--[-rwxr-xr-x]src/server/collision/VMapTools.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CoreAI/CombatAI.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CoreAI/CombatAI.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CoreAI/GuardAI.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CoreAI/GuardAI.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CoreAI/PassiveAI.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CoreAI/PassiveAI.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CoreAI/PetAI.cpp239
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CoreAI/PetAI.h14
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CoreAI/ReactorAI.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CoreAI/ReactorAI.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CoreAI/TotemAI.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CoreAI/TotemAI.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CoreAI/UnitAI.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CoreAI/UnitAI.h11
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CreatureAI.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CreatureAI.h4
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CreatureAIFactory.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CreatureAIImpl.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CreatureAIRegistry.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CreatureAIRegistry.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CreatureAISelector.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/CreatureAISelector.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/EventAI/CreatureEventAI.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/EventAI/CreatureEventAI.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/EventAI/CreatureEventAIMgr.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/AI/EventAI/CreatureEventAIMgr.h0
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp2
-rw-r--r--[-rwxr-xr-x]src/server/game/Accounts/AccountMgr.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Accounts/AccountMgr.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Achievements/AchievementMgr.cpp62
-rw-r--r--[-rwxr-xr-x]src/server/game/Achievements/AchievementMgr.h45
-rw-r--r--[-rwxr-xr-x]src/server/game/Addons/AddonMgr.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Addons/AddonMgr.h0
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.cpp53
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.h16
-rw-r--r--src/server/game/Battlefield/Battlefield.cpp142
-rw-r--r--src/server/game/Battlefield/Battlefield.h41
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldWG.cpp165
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldWG.h266
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/ArenaTeam.cpp4
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/ArenaTeam.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Battleground.cpp9
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Battleground.h2
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/BattlegroundMgr.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/BattlegroundMgr.h4
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/BattlegroundQueue.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/BattlegroundQueue.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp4
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundAB.h2
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp4
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundAV.h2
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundBE.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundDS.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp2
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundEY.h2
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundIC.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundNA.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundRL.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundRV.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundSA.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp4
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundWS.h2
-rw-r--r--[-rwxr-xr-x]src/server/game/Chat/Channels/Channel.cpp8
-rw-r--r--[-rwxr-xr-x]src/server/game/Chat/Channels/Channel.h2
-rw-r--r--[-rwxr-xr-x]src/server/game/Chat/Channels/ChannelMgr.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Chat/Channels/ChannelMgr.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Chat/Chat.cpp3
-rw-r--r--[-rwxr-xr-x]src/server/game/Chat/Chat.h0
-rw-r--r--src/server/game/Chat/ChatLink.cpp25
-rw-r--r--[-rwxr-xr-x]src/server/game/Combat/HostileRefManager.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Combat/HostileRefManager.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Combat/ThreatManager.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Combat/ThreatManager.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Combat/UnitEvents.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Conditions/ConditionMgr.cpp110
-rw-r--r--[-rwxr-xr-x]src/server/game/Conditions/ConditionMgr.h10
-rw-r--r--[-rwxr-xr-x]src/server/game/Conditions/DisableMgr.cpp3
-rw-r--r--[-rwxr-xr-x]src/server/game/Conditions/DisableMgr.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/DataStores/DBCEnums.h13
-rw-r--r--[-rwxr-xr-x]src/server/game/DataStores/DBCStores.cpp2
-rw-r--r--[-rwxr-xr-x]src/server/game/DataStores/DBCStores.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/DataStores/DBCStructure.h6
-rw-r--r--[-rwxr-xr-x]src/server/game/DataStores/DBCfmt.h2
-rw-r--r--[-rwxr-xr-x]src/server/game/DungeonFinding/LFG.h0
-rw-r--r--src/server/game/DungeonFinding/LFGGroupData.cpp6
-rw-r--r--[-rwxr-xr-x]src/server/game/DungeonFinding/LFGMgr.cpp125
-rw-r--r--[-rwxr-xr-x]src/server/game/DungeonFinding/LFGMgr.h2
-rw-r--r--src/server/game/DungeonFinding/LFGPlayerData.cpp18
-rw-r--r--src/server/game/DungeonFinding/LFGPlayerData.h4
-rw-r--r--src/server/game/DungeonFinding/LFGQueue.cpp7
-rw-r--r--src/server/game/DungeonFinding/LFGScripts.cpp1
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Corpse/Corpse.cpp40
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Corpse/Corpse.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Creature/Creature.cpp76
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Creature/Creature.h8
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Creature/CreatureGroups.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Creature/CreatureGroups.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Creature/GossipDef.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Creature/GossipDef.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Creature/TemporarySummon.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Creature/TemporarySummon.h2
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/DynamicObject/DynamicObject.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/DynamicObject/DynamicObject.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/GameObject/GameObject.cpp4
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/GameObject/GameObject.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Item/Container/Bag.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Item/Container/Bag.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Item/Item.cpp198
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Item/Item.h9
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Item/ItemEnchantmentMgr.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Item/ItemEnchantmentMgr.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Item/ItemPrototype.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Object/Object.cpp7
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Object/Object.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Object/ObjectDefines.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Object/ObjectPosSelector.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Object/ObjectPosSelector.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Object/Updates/UpdateData.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Object/Updates/UpdateData.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Object/Updates/UpdateFields.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Object/Updates/UpdateMask.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Pet/Pet.cpp9
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Pet/Pet.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Player/Player.cpp610
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Player/Player.h89
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Player/SocialMgr.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Player/SocialMgr.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Totem/Totem.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Totem/Totem.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Transport/Transport.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Transport/Transport.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Unit/StatSystem.cpp6
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Unit/Unit.cpp503
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Unit/Unit.h44
-rwxr-xr-xsrc/server/game/Entities/Vehicle/Vehicle.cpp8
-rw-r--r--[-rwxr-xr-x]src/server/game/Entities/Vehicle/Vehicle.h7
-rw-r--r--[-rwxr-xr-x]src/server/game/Events/GameEventMgr.cpp10
-rw-r--r--[-rwxr-xr-x]src/server/game/Events/GameEventMgr.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Globals/ObjectAccessor.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Globals/ObjectAccessor.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Globals/ObjectMgr.cpp86
-rw-r--r--[-rwxr-xr-x]src/server/game/Globals/ObjectMgr.h12
-rw-r--r--[-rwxr-xr-x]src/server/game/Grids/Cells/Cell.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Grids/Grid.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Grids/GridLoader.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Grids/GridRefManager.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Grids/GridReference.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Grids/GridStates.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Grids/GridStates.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Grids/NGrid.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Grids/Notifiers/GridNotifiers.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Grids/Notifiers/GridNotifiers.h29
-rw-r--r--[-rwxr-xr-x]src/server/game/Grids/Notifiers/GridNotifiersImpl.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Grids/ObjectGridLoader.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Grids/ObjectGridLoader.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Groups/Group.cpp27
-rw-r--r--[-rwxr-xr-x]src/server/game/Groups/Group.h2
-rw-r--r--[-rwxr-xr-x]src/server/game/Groups/GroupRefManager.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Groups/GroupReference.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Groups/GroupReference.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Guilds/Guild.cpp2
-rw-r--r--[-rwxr-xr-x]src/server/game/Guilds/Guild.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/AddonHandler.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/AddonHandler.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/ArenaTeamHandler.cpp16
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/AuctionHouseHandler.cpp78
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/AuthHandler.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/BattleGroundHandler.cpp8
-rw-r--r--src/server/game/Handlers/BattlefieldHandler.cpp (renamed from src/server/game/Battlefield/BattlefieldHandler.cpp)6
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/CalendarHandler.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/ChannelHandler.cpp0
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp122
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/ChatHandler.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/CombatHandler.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/DuelHandler.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/GroupHandler.cpp24
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/GuildHandler.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/ItemHandler.cpp45
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/LFGHandler.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/LootHandler.cpp22
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/MailHandler.cpp18
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/MiscHandler.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/MovementHandler.cpp4
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/NPCHandler.cpp44
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/NPCHandler.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/PetHandler.cpp16
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/PetitionsHandler.cpp16
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/QueryHandler.cpp10
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/QuestHandler.cpp20
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/SkillHandler.cpp4
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/SpellHandler.cpp17
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/TaxiHandler.cpp8
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/TicketHandler.cpp2
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/TradeHandler.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Handlers/VoiceChatHandler.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Instances/InstanceSaveMgr.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Instances/InstanceSaveMgr.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Instances/InstanceScript.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Instances/InstanceScript.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Loot/LootMgr.cpp41
-rw-r--r--[-rwxr-xr-x]src/server/game/Loot/LootMgr.h16
-rw-r--r--[-rwxr-xr-x]src/server/game/Mails/Mail.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Mails/Mail.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Maps/Map.cpp6
-rw-r--r--[-rwxr-xr-x]src/server/game/Maps/Map.h2
-rw-r--r--[-rwxr-xr-x]src/server/game/Maps/MapInstanced.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Maps/MapInstanced.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Maps/MapManager.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Maps/MapManager.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Maps/MapRefManager.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Maps/MapReference.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Maps/ZoneScript.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Miscellaneous/Formulas.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Miscellaneous/Language.h3
-rw-r--r--[-rwxr-xr-x]src/server/game/Miscellaneous/SharedDefines.h184
-rw-r--r--[-rwxr-xr-x]src/server/game/Movement/FollowerRefManager.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Movement/FollowerReference.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Movement/FollowerReference.h0
-rw-r--r--src/server/game/Movement/MotionMaster.cpp4
-rw-r--r--[-rwxr-xr-x]src/server/game/Movement/MotionMaster.h4
-rw-r--r--[-rwxr-xr-x]src/server/game/Movement/MovementGenerator.cpp0
-rwxr-xr-xsrc/server/game/Movement/MovementGenerator.h4
-rw-r--r--[-rwxr-xr-x]src/server/game/Movement/MovementGeneratorImpl.h0
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp6
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h2
-rw-r--r--src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp10
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h4
-rw-r--r--[-rwxr-xr-x]src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h0
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp4
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/IdleMovementGenerator.h6
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp8
-rw-r--r--src/server/game/Movement/MovementGenerators/PointMovementGenerator.h4
-rw-r--r--[-rwxr-xr-x]src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h0
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp10
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h3
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp4
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h4
-rw-r--r--src/server/game/Movement/Spline/MoveSpline.cpp6
-rw-r--r--src/server/game/Movement/Spline/MoveSpline.h29
-rw-r--r--src/server/game/Movement/Spline/MoveSplineFlag.h75
-rw-r--r--src/server/game/Movement/Spline/MovementTypedefs.h6
-rw-r--r--src/server/game/Movement/Spline/MovementUtil.cpp79
-rw-r--r--[-rwxr-xr-x]src/server/game/Movement/Waypoints/Path.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Movement/Waypoints/WaypointManager.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Movement/Waypoints/WaypointManager.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/OutdoorPvP/OutdoorPvP.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/OutdoorPvP/OutdoorPvP.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/OutdoorPvP/OutdoorPvPMgr.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Pools/PoolMgr.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Pools/PoolMgr.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Quests/QuestDef.cpp5
-rw-r--r--[-rwxr-xr-x]src/server/game/Quests/QuestDef.h8
-rw-r--r--[-rwxr-xr-x]src/server/game/Reputation/ReputationMgr.cpp21
-rw-r--r--[-rwxr-xr-x]src/server/game/Reputation/ReputationMgr.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Scripting/MapScripts.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Scripting/ScriptLoader.cpp14
-rw-r--r--src/server/game/Scripting/ScriptLoader.h1
-rw-r--r--[-rwxr-xr-x]src/server/game/Scripting/ScriptMgr.cpp107
-rw-r--r--[-rwxr-xr-x]src/server/game/Scripting/ScriptMgr.h29
-rw-r--r--[-rwxr-xr-x]src/server/game/Scripting/ScriptSystem.cpp122
-rw-r--r--src/server/game/Scripting/ScriptSystem.h24
-rw-r--r--[-rwxr-xr-x]src/server/game/Server/Protocol/Opcodes.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Server/Protocol/Opcodes.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Server/WorldSession.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Server/WorldSession.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Server/WorldSocket.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Server/WorldSocket.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Server/WorldSocketMgr.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Server/WorldSocketMgr.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Skills/SkillDiscovery.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Skills/SkillDiscovery.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Skills/SkillExtraItems.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Skills/SkillExtraItems.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Spells/Auras/SpellAuraDefines.h632
-rw-r--r--[-rwxr-xr-x]src/server/game/Spells/Auras/SpellAuraEffects.cpp121
-rw-r--r--[-rwxr-xr-x]src/server/game/Spells/Auras/SpellAuras.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Spells/Auras/SpellAuras.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Spells/Spell.cpp25
-rw-r--r--[-rwxr-xr-x]src/server/game/Spells/Spell.h2
-rw-r--r--[-rwxr-xr-x]src/server/game/Spells/SpellEffects.cpp76
-rw-r--r--src/server/game/Spells/SpellInfo.cpp11
-rw-r--r--[-rwxr-xr-x]src/server/game/Spells/SpellMgr.cpp11
-rw-r--r--[-rwxr-xr-x]src/server/game/Spells/SpellMgr.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Spells/SpellScript.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Spells/SpellScript.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Texts/CreatureTextMgr.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Texts/CreatureTextMgr.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Tickets/TicketMgr.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Tickets/TicketMgr.h0
-rw-r--r--src/server/game/Tools/CharacterDatabaseCleaner.cpp8
-rw-r--r--src/server/game/Tools/PlayerDump.cpp1
-rw-r--r--[-rwxr-xr-x]src/server/game/Tools/PlayerDump.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Weather/Weather.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Weather/Weather.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/Weather/WeatherMgr.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/game/Weather/WeatherMgr.h0
-rw-r--r--[-rwxr-xr-x]src/server/game/World/World.cpp69
-rw-r--r--src/server/game/World/World.h11
-rw-r--r--src/server/scripts/Commands/cs_account.cpp6
-rw-r--r--src/server/scripts/Commands/cs_achievement.cpp3
-rw-r--r--src/server/scripts/Commands/cs_disable.cpp5
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp22
-rw-r--r--src/server/scripts/Commands/cs_reload.cpp22
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp9
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp7
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp29
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp61
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp44
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp33
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp38
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp27
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp45
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp31
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/eversong_woods.cpp11
-rw-r--r--src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/redridge_mountains.cpp20
-rw-r--r--src/server/scripts/EasternKingdoms/silverpine_forest.cpp53
-rw-r--r--src/server/scripts/EasternKingdoms/stormwind_city.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/tirisfal_glades.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/western_plaguelands.cpp36
-rw-r--r--src/server/scripts/Events/CMakeLists.txt1
-rw-r--r--src/server/scripts/Events/event.cpp23
-rw-r--r--src/server/scripts/Examples/example_creature.cpp37
-rw-r--r--src/server/scripts/Examples/example_escort.cpp49
-rw-r--r--src/server/scripts/Examples/example_gossip_codebox.cpp16
-rw-r--r--src/server/scripts/Examples/example_misc.cpp7
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp8
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp20
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp36
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h34
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp22
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp10
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp42
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp18
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp32
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp647
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp23
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp21
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp19
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp59
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp40
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp40
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp36
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp207
-rw-r--r--src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp33
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp53
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp2
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp4
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp32
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp24
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp25
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp25
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp33
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp296
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp141
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h52
-rw-r--r--src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp93
-rw-r--r--src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp16
-rw-r--r--src/server/scripts/Kalimdor/ashenvale.cpp40
-rw-r--r--src/server/scripts/Kalimdor/azshara.cpp18
-rw-r--r--src/server/scripts/Kalimdor/azuremyst_isle.cpp124
-rw-r--r--src/server/scripts/Kalimdor/bloodmyst_isle.cpp4
-rw-r--r--src/server/scripts/Kalimdor/boss_azuregos.cpp4
-rw-r--r--src/server/scripts/Kalimdor/darkshore.cpp93
-rw-r--r--src/server/scripts/Kalimdor/desolace.cpp7
-rw-r--r--src/server/scripts/Kalimdor/durotar.cpp4
-rw-r--r--src/server/scripts/Kalimdor/dustwallow_marsh.cpp93
-rw-r--r--src/server/scripts/Kalimdor/feralas.cpp22
-rw-r--r--src/server/scripts/Kalimdor/moonglade.cpp81
-rw-r--r--src/server/scripts/Kalimdor/mulgore.cpp13
-rw-r--r--src/server/scripts/Kalimdor/silithus.cpp174
-rw-r--r--src/server/scripts/Kalimdor/stonetalon_mountains.cpp12
-rw-r--r--src/server/scripts/Kalimdor/tanaris.cpp63
-rw-r--r--src/server/scripts/Kalimdor/teldrassil.cpp8
-rw-r--r--src/server/scripts/Kalimdor/the_barrens.cpp85
-rw-r--r--src/server/scripts/Kalimdor/thousand_needles.cpp34
-rw-r--r--src/server/scripts/Kalimdor/ungoro_crater.cpp87
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp23
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp25
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp119
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp30
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp6
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp12
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h8
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp117
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp0
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp19
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp23
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp20
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp21
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp78
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp58
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp19
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp18
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp262
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp39
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp106
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp72
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp28
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp26
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp24
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp3
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp0
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp3
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp0
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp17
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp20
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp40
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp16
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp31
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp59
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_noth.cpp38
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp21
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp588
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp51
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp16
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp20
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp23
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp26
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp25
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp15
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp49
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp39
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp14
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp19
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp14
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp196
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp453
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp51
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp85
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp202
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp45
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp47
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp38
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp113
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp3
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp51
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp121
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp45
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp12
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp38
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h34
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp27
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp40
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp13
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp31
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp25
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp7
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp14
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp23
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_erekem.cpp20
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp28
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp51
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp20
-rw-r--r--src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp5
-rw-r--r--src/server/scripts/Northrend/VioletHold/violet_hold.cpp4
-rw-r--r--src/server/scripts/Northrend/borean_tundra.cpp713
-rw-r--r--src/server/scripts/Northrend/grizzly_hills.cpp77
-rw-r--r--src/server/scripts/Northrend/icecrown.cpp373
-rw-r--r--src/server/scripts/Northrend/sholazar_basin.cpp128
-rw-r--r--src/server/scripts/Northrend/storm_peaks.cpp14
-rw-r--r--src/server/scripts/Northrend/zuldrak.cpp50
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPEP.h0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPHP.h0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPNA.h0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPSI.h0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPTF.h0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPZM.h0
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp57
-rw-r--r--src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp23
-rw-r--r--src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp34
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp49
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp55
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp21
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp53
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp58
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp17
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp63
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp62
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp147
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp25
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_supremus.cpp59
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp61
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp28
-rw-r--r--src/server/scripts/Outland/BlackTemple/illidari_council.cpp158
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp129
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp92
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp89
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp104
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp68
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp30
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp37
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp38
-rw-r--r--src/server/scripts/Outland/GruulsLair/boss_gruul.cpp26
-rw-r--r--src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp88
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp4
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp23
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp21
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp26
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp35
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp27
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp50
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp51
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp100
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp15
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp30
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp97
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp19
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp24
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp22
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp26
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp31
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp18
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp4
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp18
-rw-r--r--src/server/scripts/Outland/blades_edge_mountains.cpp25
-rw-r--r--src/server/scripts/Outland/hellfire_peninsula.cpp51
-rw-r--r--src/server/scripts/Outland/nagrand.cpp40
-rw-r--r--src/server/scripts/Outland/netherstorm.cpp99
-rw-r--r--src/server/scripts/Outland/shadowmoon_valley.cpp159
-rw-r--r--src/server/scripts/Outland/shattrath_city.cpp127
-rw-r--r--src/server/scripts/Outland/terokkar_forest.cpp36
-rw-r--r--src/server/scripts/Outland/zangarmarsh.cpp89
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp235
-rw-r--r--src/server/scripts/Spells/spell_holiday.cpp234
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp31
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp14
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp2
-rw-r--r--[-rwxr-xr-x]src/server/scripts/World/achievement_scripts.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/World/chat_log.cpp0
-rw-r--r--src/server/scripts/World/guards.cpp6
-rw-r--r--src/server/scripts/World/npc_professions.cpp4
-rw-r--r--src/server/scripts/World/npcs_special.cpp165
-rw-r--r--[-rwxr-xr-x]src/server/shared/Common.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Common.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/CompilerDefs.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Configuration/Config.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Configuration/Config.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Cryptography/ARC4.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Cryptography/ARC4.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Cryptography/Authentication/AuthCrypt.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Cryptography/Authentication/AuthCrypt.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Cryptography/BigNumber.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Cryptography/BigNumber.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Cryptography/HMACSHA1.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Cryptography/HMACSHA1.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Cryptography/SHA1.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Cryptography/SHA1.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/DataStores/DBCFileLoader.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/DataStores/DBCFileLoader.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/DataStores/DBCStore.h10
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/AdhocStatement.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/AdhocStatement.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/DatabaseEnv.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/DatabaseWorker.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/DatabaseWorkerPool.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/Field.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/Field.h0
-rw-r--r--src/server/shared/Database/Implementation/CharacterDatabase.cpp15
-rw-r--r--src/server/shared/Database/Implementation/CharacterDatabase.h14
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/Implementation/LoginDatabase.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/Implementation/LoginDatabase.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/Implementation/WorldDatabase.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/Implementation/WorldDatabase.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/MySQLConnection.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/MySQLConnection.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/MySQLThreading.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/PreparedStatement.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/PreparedStatement.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/QueryHolder.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/QueryHolder.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/QueryResult.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/QueryResult.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/SQLOperation.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/Transaction.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Database/Transaction.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Debugging/Errors.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Define.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Dynamic/FactoryHolder.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Dynamic/LinkedList.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Dynamic/LinkedReference/RefManager.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Dynamic/LinkedReference/Reference.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Dynamic/ObjectRegistry.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Dynamic/TypeContainer.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Dynamic/TypeContainerFunctions.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Dynamic/TypeContainerVisitor.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Dynamic/TypeList.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Dynamic/UnorderedMap.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Logging/Log.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Logging/Log.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Packets/ByteBuffer.h4
-rw-r--r--[-rwxr-xr-x]src/server/shared/Packets/WorldPacket.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/SystemConfig.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Threading/Callback.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Threading/LockedQueue.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Threading/Threading.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Threading/Threading.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Utilities/ByteConverter.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Utilities/EventProcessor.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Utilities/EventProcessor.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Utilities/ServiceWin32.cpp2
-rw-r--r--[-rwxr-xr-x]src/server/shared/Utilities/ServiceWin32.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Utilities/SignalHandler.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Utilities/Timer.h0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Utilities/Util.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/shared/Utilities/Util.h0
-rw-r--r--src/server/worldserver/CMakeLists.txt1
-rw-r--r--[-rwxr-xr-x]src/server/worldserver/CommandLine/CliRunnable.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/worldserver/CommandLine/CliRunnable.h0
-rw-r--r--[-rwxr-xr-x]src/server/worldserver/Main.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/worldserver/Master.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/worldserver/Master.h0
-rw-r--r--[-rwxr-xr-x]src/server/worldserver/RemoteAccess/RASocket.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/worldserver/RemoteAccess/RASocket.h0
-rw-r--r--[-rwxr-xr-x]src/server/worldserver/TCSoap/TCSoap.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/worldserver/TCSoap/TCSoap.h0
-rw-r--r--[-rwxr-xr-x]src/server/worldserver/WorldThread/WorldRunnable.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/worldserver/WorldThread/WorldRunnable.h0
-rw-r--r--[-rwxr-xr-x]src/server/worldserver/worldserver.rc0
-rw-r--r--src/tools/map_extractor/dbcfile.h2
-rw-r--r--src/tools/vmap4_extractor/adtfile.h10
-rw-r--r--src/tools/vmap4_extractor/model.h22
-rw-r--r--src/tools/vmap4_extractor/vmapexport.cpp2
-rw-r--r--src/tools/vmap4_extractor/wdtfile.cpp2
-rw-r--r--src/tools/vmap4_extractor/wdtfile.h7
-rw-r--r--src/tools/vmap4_extractor/wmo.h35
779 files changed, 18362 insertions, 8839 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 49f0c31b15e..f8a97c7f553 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,7 +12,7 @@
project(TrinityCore)
# CMake policies (can not be handled elsewhere)
-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0005 OLD)
# Set RPATH-handing (CMake parameters)
diff --git a/cmake/compiler/clang/settings.cmake b/cmake/compiler/clang/settings.cmake
index add9fa8694d..ae07b1fc39b 100644
--- a/cmake/compiler/clang/settings.cmake
+++ b/cmake/compiler/clang/settings.cmake
@@ -2,9 +2,9 @@
add_definitions(-D_BUILD_DIRECTIVE='"$(CONFIGURATION)"')
if(WITH_WARNINGS)
- set(WARNING_FLAGS "-W -Wall -Wextra -Wwrite-strings -Winit-self -Woverloaded-virtual -Wfatal-errors")
+ set(WARNING_FLAGS "-W -Wall -Wextra -Winit-self -Wfatal-errors")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS}")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS} -Woverloaded-virtual")
message(STATUS "Clang: All warnings enabled")
endif()
diff --git a/cmake/compiler/gcc/settings.cmake b/cmake/compiler/gcc/settings.cmake
index d74fc39031b..25ee96c8562 100644
--- a/cmake/compiler/gcc/settings.cmake
+++ b/cmake/compiler/gcc/settings.cmake
@@ -11,9 +11,9 @@ add_definitions(-DHAVE_SSE2 -D__SSE2__)
message(STATUS "GCC: SFMT enabled, SSE2 flags forced")
if( WITH_WARNINGS )
- set(WARNING_FLAGS "-W -Wall -Wextra -Wwrite-strings -Winit-self -Woverloaded-virtual -Winvalid-pch -Wfatal-errors")
+ set(WARNING_FLAGS "-W -Wall -Wextra -Winit-self -Winvalid-pch -Wfatal-errors")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS}")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS} -Woverloaded-virtual")
message(STATUS "GCC: All warnings enabled")
endif()
diff --git a/cmake/compiler/icc/settings.cmake b/cmake/compiler/icc/settings.cmake
index b7e4cb742b3..58eb63b081d 100644
--- a/cmake/compiler/icc/settings.cmake
+++ b/cmake/compiler/icc/settings.cmake
@@ -9,10 +9,7 @@ endif()
if( WITH_WARNINGS )
add_definitions(-w1)
- message(STATUS "ICC All warnings enabled")
-else()
- add_definitions(-w)
- message(STATUS "ICC: All warnings disabled")
+ message(STATUS "ICC: All warnings enabled")
endif()
if( WITH_COREDEBUG )
diff --git a/cmake/macros/CheckPlatform.cmake b/cmake/macros/CheckPlatform.cmake
index addc619207f..e08aaed8db2 100644
--- a/cmake/macros/CheckPlatform.cmake
+++ b/cmake/macros/CheckPlatform.cmake
@@ -11,8 +11,6 @@ include("${CMAKE_SOURCE_DIR}/cmake/platform/settings.cmake")
if(WIN32)
include("${CMAKE_SOURCE_DIR}/cmake/platform/win/settings.cmake")
-elseif(APPLE)
- include("${CMAKE_SOURCE_DIR}/cmake/platform/osx/settings.cmake")
elseif(UNIX)
include("${CMAKE_SOURCE_DIR}/cmake/platform/unix/settings.cmake")
endif()
diff --git a/cmake/platform/osx/settings.cmake b/cmake/platform/osx/settings.cmake
deleted file mode 100644
index 3d232c5a1f0..00000000000
--- a/cmake/platform/osx/settings.cmake
+++ /dev/null
@@ -1,33 +0,0 @@
-set(MACOSX 1)
-
-# set default configuration directory
-if( NOT CONF_DIR )
- set(CONF_DIR ${CMAKE_INSTALL_PREFIX}/etc)
- message(STATUS "OSX: Using default configuration directory")
-endif()
-
-# set default library directory
-if( NOT LIBSDIR )
- set(LIBSDIR ${CMAKE_INSTALL_PREFIX}/lib)
- message(STATUS "OSX: Using default library directory")
-endif()
-
-# configure uninstaller
-configure_file(
- "${CMAKE_SOURCE_DIR}/cmake/platform/cmake_uninstall.in.cmake"
- "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY
-)
-message(STATUS "OSX: Configuring uninstall target")
-
-# create uninstaller target (allows for using "make uninstall")
-add_custom_target(uninstall
- "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake"
-)
-message(STATUS "OSX: Created uninstall target")
-
-if (CMAKE_COMPILER_IS_GNUCC)
- include(${CMAKE_SOURCE_DIR}/cmake/compiler/gcc/settings.cmake)
-elseif (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
- include(${CMAKE_SOURCE_DIR}/cmake/compiler/clang/settings.cmake)
-endif()
diff --git a/cmake/platform/unix/settings.cmake b/cmake/platform/unix/settings.cmake
index c79cfc4ed4f..a851c8acf7a 100644
--- a/cmake/platform/unix/settings.cmake
+++ b/cmake/platform/unix/settings.cmake
@@ -36,4 +36,6 @@ if(CMAKE_C_COMPILER MATCHES "gcc")
include(${CMAKE_SOURCE_DIR}/cmake/compiler/gcc/settings.cmake)
elseif(CMAKE_C_COMPILER MATCHES "icc")
include(${CMAKE_SOURCE_DIR}/cmake/compiler/icc/settings.cmake)
+elseif(CMAKE_C_COMPILER MATCHES "clang")
+ include(${CMAKE_SOURCE_DIR}/cmake/compiler/clang/settings.cmake)
endif()
diff --git a/dep/SFMT/SFMT.h b/dep/SFMT/SFMT.h
index 5498b9ac5fb..f1c6f72d2d6 100644
--- a/dep/SFMT/SFMT.h
+++ b/dep/SFMT/SFMT.h
@@ -123,7 +123,8 @@
#define SFMT_PARITY 0x00000001, 0x00000000, 0x00000000, 0x5986f054 // Period certification vector
#endif
-// Functions used by SFMTRand::RandomInitByArray
+// Functions used by SFMTRand::RandomInitByArray (UNUSED AND COMMENTED OUT)
+/*
static uint32_t func1(uint32_t x) {
return (x ^ (x >> 27)) * 1664525U;
}
@@ -131,6 +132,7 @@ static uint32_t func1(uint32_t x) {
static uint32_t func2(uint32_t x) {
return (x ^ (x >> 27)) * 1566083941U;
}
+*/
// Subfunction for the sfmt algorithm
static inline __m128i sfmt_recursion(__m128i const &a, __m128i const &b,
diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql
index 02efbe77101..9e16db1f381 100644
--- a/sql/base/characters_database.sql
+++ b/sql/base/characters_database.sql
@@ -935,6 +935,30 @@ LOCK TABLES `character_queststatus_seasonal` WRITE;
UNLOCK TABLES;
--
+-- Table structure for table `character_queststatus_monthly`
+--
+
+DROP TABLE IF EXISTS `character_queststatus_monthly`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `character_queststatus_monthly` (
+ `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier',
+ `quest` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Quest Identifier',
+ PRIMARY KEY (`guid`,`quest`),
+ KEY `idx_guid` (`guid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `character_queststatus_monthly`
+--
+
+LOCK TABLES `character_queststatus_monthly` WRITE;
+/*!40000 ALTER TABLE `character_queststatus_monthly` DISABLE KEYS */;
+/*!40000 ALTER TABLE `character_queststatus_monthly` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
-- Table structure for table `character_queststatus_weekly`
--
@@ -1931,6 +1955,41 @@ LOCK TABLES `item_instance` WRITE;
UNLOCK TABLES;
--
+-- Table structure for table `item_loot_items`
+--
+
+DROP TABLE IF EXISTS `item_loot_items`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `item_loot_items` (
+ `container_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'guid of container (item_instance.guid)',
+ `item_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'loot item entry (item_instance.itemEntry)',
+ `item_count` int(10) NOT NULL DEFAULT '0' COMMENT 'stack size',
+ `follow_rules` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'follow loot rules',
+ `ffa` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'free-for-all',
+ `blocked` tinyint(1) NOT NULL DEFAULT '0',
+ `counted` tinyint(1) NOT NULL DEFAULT '0',
+ `under_threshold` tinyint(1) NOT NULL DEFAULT '0',
+ `needs_quest` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'quest drop',
+ `rnd_prop` int(10) NOT NULL DEFAULT '0' COMMENT 'random enchantment added when originally rolled',
+ `rnd_suffix` int(10) NOT NULL DEFAULT '0' COMMENT 'random suffix added when originally rolled'
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `item_loot_money`
+--
+
+DROP TABLE IF EXISTS `item_loot_money`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `item_loot_money` (
+ `container_id` int(10) NOT NULL DEFAULT '0' COMMENT 'guid of container (item_instance.guid)',
+ `money` int(10) NOT NULL DEFAULT '0' COMMENT 'money loot (in copper)'
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
-- Table structure for table `item_refund_instance`
--
diff --git a/sql/updates/characters/2012_12_03_00_character_character_queststatus_monthly.sql b/sql/updates/characters/2012_12_03_00_character_character_queststatus_monthly.sql
new file mode 100644
index 00000000000..256bb1f7ad6
--- /dev/null
+++ b/sql/updates/characters/2012_12_03_00_character_character_queststatus_monthly.sql
@@ -0,0 +1,8 @@
+DROP TABLE IF EXISTS `character_queststatus_monthly`;
+
+CREATE TABLE IF NOT EXISTS `character_queststatus_monthly` (
+ `guid` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier',
+ `quest` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Quest Identifier',
+ PRIMARY KEY (`guid`,`quest`),
+ KEY `idx_guid` (`guid`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='Player System';
diff --git a/sql/updates/characters/2012_12_18_00_character_worldstates.sql b/sql/updates/characters/2012_12_18_00_character_worldstates.sql
new file mode 100644
index 00000000000..98fabde6776
--- /dev/null
+++ b/sql/updates/characters/2012_12_18_00_character_worldstates.sql
@@ -0,0 +1,4 @@
+DELETE FROM `worldstates` WHERE `entry` IN (20004,20007);
+INSERT INTO `worldstates` (`entry`, `value`, `comment`) VALUES
+(20004,0,'CleaningFlags'),
+(20007,0,'NextMonthlyQuestResetTime');
diff --git a/sql/updates/characters/2012_12_20_00_characters_create_item_loot.sql b/sql/updates/characters/2012_12_20_00_characters_create_item_loot.sql
new file mode 100644
index 00000000000..3c1529e8bdf
--- /dev/null
+++ b/sql/updates/characters/2012_12_20_00_characters_create_item_loot.sql
@@ -0,0 +1,52 @@
+/*
+SQLyog Ultimate v9.63
+MySQL - 5.5.21 : Database - characters
+*********************************************************************
+*/
+
+/*!40101 SET NAMES utf8 */;
+
+/*!40101 SET SQL_MODE=''*/;
+
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `item_loot_items`
+--
+
+DROP TABLE IF EXISTS `item_loot_items`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `item_loot_items` (
+ `container_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'guid of container (item_instance.guid)',
+ `item_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'loot item entry (item_instance.itemEntry)',
+ `item_count` int(10) NOT NULL DEFAULT '0' COMMENT 'stack size',
+ `follow_rules` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'follow loot rules',
+ `ffa` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'free-for-all',
+ `blocked` tinyint(1) NOT NULL DEFAULT '0',
+ `counted` tinyint(1) NOT NULL DEFAULT '0',
+ `under_threshold` tinyint(1) NOT NULL DEFAULT '0',
+ `needs_quest` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'quest drop',
+ `rnd_prop` int(10) NOT NULL DEFAULT '0' COMMENT 'random enchantment added when originally rolled',
+ `rnd_suffix` int(10) NOT NULL DEFAULT '0' COMMENT 'random suffix added when originally rolled'
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `item_loot_money`
+--
+
+DROP TABLE IF EXISTS `item_loot_money`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `item_loot_money` (
+ `container_id` int(10) NOT NULL DEFAULT '0' COMMENT 'guid of container (item_instance.guid)',
+ `money` int(10) NOT NULL DEFAULT '0' COMMENT 'money loot (in copper)'
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
diff --git a/sql/updates/world/2012_11_24_00_world_conditions.sql b/sql/updates/world/2012_11_24_00_world_conditions.sql
new file mode 100644
index 00000000000..1a5e5963c8e
--- /dev/null
+++ b/sql/updates/world/2012_11_24_00_world_conditions.sql
@@ -0,0 +1,34 @@
+ALTER TABLE `conditions`
+ ADD COLUMN `ErrorType` MEDIUMINT(8) UNSIGNED DEFAULT 0 NOT NULL AFTER `NegativeCondition`;
+
+/*
+ * trinity_string
+ * 63 - You can't do that right now. -> SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW = 173
+ * 64 - You cannot use that item here. -> SPELL_CUSTOM_ERROR_CANT_USE_THAT_ITEM = 56
+ * SPELL_FAILED_INCORRECT_AREA = 39
+ * SPELL_CUSTOM_ERROR_CANT_CALL_WINTERGARDE_HERE = 26
+ * SPELL_CUSTOM_ERROR_MUST_TARGET_ICE_HEART_JORMUNGAR = 21
+ * SPELL_FAILED_BAD_TARGETS = 12
+ * 65 - You must reach level 58 to use this portal. -> SPELL_CUSTOM_ERROR_REQUIRES_LEVEL_58 = 66
+ * 97 - don't exist
+ * 1334 - Requires Maiden of Winter's Breath Lake -> SPELL_CUSTOM_ERROR_MUST_BE_CLOSE_TO_MAIDEN = 61
+ * 1335 - You can't use that right now -> SPELL_FAILED_INCORRECT_AREA = 39
+ * SPELL_FAILED_TARGET_AURASTATE = 111
+ */
+
+UPDATE `conditions` SET `ErrorType`=173, `ErrorTextId`=0 WHERE `ErrorType`=0 AND `ErrorTextId`=63;
+
+UPDATE `conditions` SET `ErrorType`=172, `ErrorTextId`=26 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=48388;
+UPDATE `conditions` SET `ErrorType`= 39, `ErrorTextId`= 0 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=43209;
+UPDATE `conditions` SET `ErrorType`=172, `ErrorTextId`=21 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=47431;
+UPDATE `conditions` SET `ErrorType`= 12, `ErrorTextId`= 0 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=34367;
+
+UPDATE `conditions` SET `ErrorType`=172, `ErrorTextId`=66 WHERE `ErrorType`=0 AND `ErrorTextId`=65;
+UPDATE `conditions` SET `ErrorType`=172, `ErrorTextId`=61 WHERE `ErrorType`=0 AND `ErrorTextId`=1334;
+UPDATE `conditions` SET `ErrorType`= 39, `ErrorTextId`=0 WHERE `ErrorType`=0 AND `ErrorTextId`=1335 AND `ConditionTypeOrReference`=23;
+UPDATE `conditions` SET `ErrorType`=111, `ErrorTextId`=0 WHERE `ErrorType`=0 AND `ErrorTextId`=1335 AND `ConditionTypeOrReference`=1;
+
+UPDATE `conditions` SET `ErrorTextId`=0 WHERE `ErrorType`=0 AND `ErrorTextId`=97;
+UPDATE `conditions` SET `ErrorTextId`=0 WHERE `ErrorType`=0 AND `SourceTypeOrReferenceId`=13;
+
+DELETE FROM `trinity_string` WHERE `entry` IN (63,64,65,97,1334,1335);
diff --git a/sql/updates/world/2012_11_24_01_world_quest_start_scripts.sql b/sql/updates/world/2012_11_24_01_world_quest_start_scripts.sql
new file mode 100644
index 00000000000..0f0506206a2
--- /dev/null
+++ b/sql/updates/world/2012_11_24_01_world_quest_start_scripts.sql
@@ -0,0 +1,24 @@
+-- fix possible chaining issue, remove quest_start_script
+UPDATE `quest_template` SET `NextQuestId`=4024,`StartScript`=0 WHERE `Id`=4023;
+DELETE FROM `quest_start_scripts` WHERE `id`=4023;
+-- Already done in cpp, can be removed
+UPDATE `quest_template` SET `StartScript`=0 WHERE `Id` IN (6482,9686,11300);
+DELETE FROM `quest_start_scripts` WHERE `id` IN (6482,9686,11300);
+-- there is no need for external requirement in this case
+UPDATE `quest_template` SET `StartScript`=0 WHERE `Id`=10162;
+DELETE FROM `quest_start_scripts` WHERE `id`=10162;
+-- Change cast spell after 0s to cast on accept (same thing, different table)
+UPDATE `quest_template` SET `SourceSpellId`=25201,`StartScript`=0 WHERE `Id`=8305;
+DELETE FROM `quest_start_scripts` WHERE `id`=8305;
+-- convert quest_start_scripts into SAI;
+DELETE FROM `quest_start_scripts` WHERE `id`=2701;
+UPDATE `quest_template` SET `StartScript`=0 WHERE `Id`=2701;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=7750;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=7750 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
+(7750,0,0,0,19,0,100,0,2701,0,0,0,70,0,0,0,0,0,0,14,44732,141981,0,0,0,0,0, 'Corporal Thund Splithoof - On Quest Accept - Respawn Spectral Lockbox Particles (GO)'),
+(7750,0,1,0,19,0,100,0,2701,0,0,0,70,0,0,0,0,0,0,14,44733,141980,0,0,0,0,0, 'Corporal Thund Splithoof - On Quest Accept - Respawn Spectral Lockbox (GO)');
+-- BEWARE: THIS (TEMP) REMOVES SUPPORT FOR QUESTS 434,10985,11108,11198!
+DELETE FROM `quest_start_scripts` WHERE `id` IN (434,10985,11108,11198);
+UPDATE `quest_template` SET `StartScript`=0 WHERE `Id` IN (434,10985,11108,11198);
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000033,2000000034,2000000035,2000000036,2000000037,2000000038,2000000039,2000000040,2000000041);
diff --git a/sql/updates/world/2012_11_24_02_world_creature_text.sql b/sql/updates/world/2012_11_24_02_world_creature_text.sql
new file mode 100644
index 00000000000..8797039d967
--- /dev/null
+++ b/sql/updates/world/2012_11_24_02_world_creature_text.sql
@@ -0,0 +1,346 @@
+-- ------------------------------- --
+-- Creature text conversion part 3 --
+-- ------------------------------- --
+-- crusader
+DELETE FROM `creature_text` WHERE `entry` IN (28939,28610,28940) AND `groupid` IN (6,7,8);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+-- Scarlet Preacher
+(28939,6,0,12,0,100,"break crusader SAY_PERSUADED5","LIES! The pain you are about to endure will be talked about for years to come!"),
+(28939,7,0,12,0,100,"break crusader SAY_PERSUADED6","NO! PLEASE! There is one more thing that I forgot to mention... A courier comes soon... From Hearthglen. It..."),
+(28939,8,0,12,0,100,"player SAY_PERSUADE1","I'll tear the secrets from your soul! Tell me about the \"Crimson Dawn\" and your life may be spared!"),
+(28939,8,1,12,0,100,"player SAY_PERSUADE2","Tell me what you know about \"Crimson Dawn\" or the beatings will continue!"),
+(28939,8,2,12,0,100,"player SAY_PERSUADE3","I'm through being courteous with your kind, human! What is the \"Crimson Dawn\"?"),
+(28939,8,3,12,0,100,"player SAY_PERSUADE4","Is your life worth so little? Just tell me what I need to know about \"Crimson Dawn\" and I'll end your suffering quickly."),
+(28939,8,4,12,0,100,"player SAY_PERSUADE5","I can keep this up for a very long time, Scarlet dog! Tell me about the \"Crimson Dawn\"!"),
+(28939,8,5,12,0,100,"player SAY_PERSUADE6","What is the \"Crimson Dawn\"?"),
+(28939,8,6,12,0,100,"player SAY_PERSUADE7","\"Crimson Dawn\"! What is it! Speak!"),
+-- Scarlet Crusader
+(28940,6,0,12,0,100,"break crusader SAY_PERSUADED5","LIES! The pain you are about to endure will be talked about for years to come!"),
+(28940,7,0,12,0,100,"break crusader SAY_PERSUADED6","NO! PLEASE! There is one more thing that I forgot to mention... A courier comes soon... From Hearthglen. It..."),
+(28940,8,0,12,0,100,"player SAY_PERSUADE1","I'll tear the secrets from your soul! Tell me about the \"Crimson Dawn\" and your life may be spared!"),
+(28940,8,1,12,0,100,"player SAY_PERSUADE2","Tell me what you know about \"Crimson Dawn\" or the beatings will continue!"),
+(28940,8,2,12,0,100,"player SAY_PERSUADE3","I'm through being courteous with your kind, human! What is the \"Crimson Dawn\"?"),
+(28940,8,3,12,0,100,"player SAY_PERSUADE4","Is your life worth so little? Just tell me what I need to know about \"Crimson Dawn\" and I'll end your suffering quickly."),
+(28940,8,4,12,0,100,"player SAY_PERSUADE5","I can keep this up for a very long time, Scarlet dog! Tell me about the \"Crimson Dawn\"!"),
+(28940,8,5,12,0,100,"player SAY_PERSUADE6","What is the \"Crimson Dawn\"?"),
+(28940,8,6,12,0,100,"player SAY_PERSUADE7","\"Crimson Dawn\"! What is it! Speak!"),
+-- Scarlet Marksman
+(28610,6,0,12,0,100,"break crusader SAY_PERSUADED5","LIES! The pain you are about to endure will be talked about for years to come!"),
+(28610,7,0,12,0,100,"break crusader SAY_PERSUADED6","NO! PLEASE! There is one more thing that I forgot to mention... A courier comes soon... From Hearthglen. It..."),
+(28610,8,0,12,0,100,"player SAY_PERSUADE1","I'll tear the secrets from your soul! Tell me about the \"Crimson Dawn\" and your life may be spared!"),
+(28610,8,1,12,0,100,"player SAY_PERSUADE2","Tell me what you know about \"Crimson Dawn\" or the beatings will continue!"),
+(28610,8,2,12,0,100,"player SAY_PERSUADE3","I'm through being courteous with your kind, human! What is the \"Crimson Dawn\"?"),
+(28610,8,3,12,0,100,"player SAY_PERSUADE4","Is your life worth so little? Just tell me what I need to know about \"Crimson Dawn\" and I'll end your suffering quickly."),
+(28610,8,4,12,0,100,"player SAY_PERSUADE5","I can keep this up for a very long time, Scarlet dog! Tell me about the \"Crimson Dawn\"!"),
+(28610,8,5,12,0,100,"player SAY_PERSUADE6","What is the \"Crimson Dawn\"?"),
+(28610,8,6,12,0,100,"player SAY_PERSUADE7","\"Crimson Dawn\"! What is it! Speak!");
+
+-- unworthy initiate
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1609016 AND -1609000;
+DELETE FROM `creature_text` WHERE `entry` IN (29519,29520,29565,29566,29567);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(29519,0,0,12,0,100,"unworthy initiate SAY_EVENT_START_1","You have made a grave error, fiend!"),
+(29519,0,1,12,0,100,"unworthy initiate SAY_EVENT_START_2","I was a soldier of the Light once... Look at what I have become... "),
+(29519,0,2,12,0,100,"unworthy initiate SAY_EVENT_START_3","You are hopelessly outmatched, $R."),
+(29519,0,3,12,0,100,"unworthy initiate SAY_EVENT_START_4","They brand me unworthy? I will show them unmorthy!"),
+(29519,0,4,12,0,100,"unworthy initiate SAY_EVENT_START_5","You will allow me a weapon and armor, yes?"),
+(29519,0,5,12,0,100,"unworthy initiate SAY_EVENT_START_6","I will win my freedom and leave this cursed place!"),
+(29519,0,6,12,0,100,"unworthy initiate SAY_EVENT_START_7","I will dismantle this festering hellhole!"),
+(29519,0,7,12,0,100,"unworthy initiate SAY_EVENT_START_8","There can be only one survivor!"),
+(29519,1,0,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_1","To battle!"),
+(29519,1,1,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_2","Let your fears consume you!"),
+(29519,1,2,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_3","HAH! You can barely hold a blade! Yours will be a quick death."),
+(29519,1,3,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_4","And now you die"),
+(29519,1,4,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_5","To battle!"),
+(29519,1,5,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_6","There is no hope for our future..."),
+(29519,1,6,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_7","Sate your hunger on cold steel, $R"),
+(29519,1,7,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_8","It ends here!"),
+(29519,1,8,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_9","Death is the only cure!"),
+(29520,0,0,12,0,100,"unworthy initiate SAY_EVENT_START_1","You have made a grave error, fiend!"),
+(29520,0,1,12,0,100,"unworthy initiate SAY_EVENT_START_2","I was a soldier of the Light once... Look at what I have become... "),
+(29520,0,2,12,0,100,"unworthy initiate SAY_EVENT_START_3","You are hopelessly outmatched, $R."),
+(29520,0,3,12,0,100,"unworthy initiate SAY_EVENT_START_4","They brand me unworthy? I will show them unmorthy!"),
+(29520,0,4,12,0,100,"unworthy initiate SAY_EVENT_START_5","You will allow me a weapon and armor, yes?"),
+(29520,0,5,12,0,100,"unworthy initiate SAY_EVENT_START_6","I will win my freedom and leave this cursed place!"),
+(29520,0,6,12,0,100,"unworthy initiate SAY_EVENT_START_7","I will dismantle this festering hellhole!"),
+(29520,0,7,12,0,100,"unworthy initiate SAY_EVENT_START_8","There can be only one survivor!"),
+(29520,1,0,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_1","To battle!"),
+(29520,1,1,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_2","Let your fears consume you!"),
+(29520,1,2,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_3","HAH! You can barely hold a blade! Yours will be a quick death."),
+(29520,1,3,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_4","And now you die"),
+(29520,1,4,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_5","To battle!"),
+(29520,1,5,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_6","There is no hope for our future..."),
+(29520,1,6,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_7","Sate your hunger on cold steel, $R"),
+(29520,1,7,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_8","It ends here!"),
+(29520,1,8,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_9","Death is the only cure!"),
+(29565,0,0,12,0,100,"unworthy initiate SAY_EVENT_START_1","You have made a grave error, fiend!"),
+(29565,0,1,12,0,100,"unworthy initiate SAY_EVENT_START_2","I was a soldier of the Light once... Look at what I have become... "),
+(29565,0,2,12,0,100,"unworthy initiate SAY_EVENT_START_3","You are hopelessly outmatched, $R."),
+(29565,0,3,12,0,100,"unworthy initiate SAY_EVENT_START_4","They brand me unworthy? I will show them unmorthy!"),
+(29565,0,4,12,0,100,"unworthy initiate SAY_EVENT_START_5","You will allow me a weapon and armor, yes?"),
+(29565,0,5,12,0,100,"unworthy initiate SAY_EVENT_START_6","I will win my freedom and leave this cursed place!"),
+(29565,0,6,12,0,100,"unworthy initiate SAY_EVENT_START_7","I will dismantle this festering hellhole!"),
+(29565,0,7,12,0,100,"unworthy initiate SAY_EVENT_START_8","There can be only one survivor!"),
+(29565,1,0,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_1","To battle!"),
+(29565,1,1,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_2","Let your fears consume you!"),
+(29565,1,2,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_3","HAH! You can barely hold a blade! Yours will be a quick death."),
+(29565,1,3,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_4","And now you die"),
+(29565,1,4,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_5","To battle!"),
+(29565,1,5,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_6","There is no hope for our future..."),
+(29565,1,6,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_7","Sate your hunger on cold steel, $R"),
+(29565,1,7,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_8","It ends here!"),
+(29565,1,8,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_9","Death is the only cure!"),
+(29566,0,0,12,0,100,"unworthy initiate SAY_EVENT_START_1","You have made a grave error, fiend!"),
+(29566,0,1,12,0,100,"unworthy initiate SAY_EVENT_START_2","I was a soldier of the Light once... Look at what I have become... "),
+(29566,0,2,12,0,100,"unworthy initiate SAY_EVENT_START_3","You are hopelessly outmatched, $R."),
+(29566,0,3,12,0,100,"unworthy initiate SAY_EVENT_START_4","They brand me unworthy? I will show them unmorthy!"),
+(29566,0,4,12,0,100,"unworthy initiate SAY_EVENT_START_5","You will allow me a weapon and armor, yes?"),
+(29566,0,5,12,0,100,"unworthy initiate SAY_EVENT_START_6","I will win my freedom and leave this cursed place!"),
+(29566,0,6,12,0,100,"unworthy initiate SAY_EVENT_START_7","I will dismantle this festering hellhole!"),
+(29566,0,7,12,0,100,"unworthy initiate SAY_EVENT_START_8","There can be only one survivor!"),
+(29566,1,0,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_1","To battle!"),
+(29566,1,1,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_2","Let your fears consume you!"),
+(29566,1,2,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_3","HAH! You can barely hold a blade! Yours will be a quick death."),
+(29566,1,3,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_4","And now you die"),
+(29566,1,4,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_5","To battle!"),
+(29566,1,5,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_6","There is no hope for our future..."),
+(29566,1,6,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_7","Sate your hunger on cold steel, $R"),
+(29566,1,7,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_8","It ends here!"),
+(29566,1,8,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_9","Death is the only cure!"),
+(29567,0,0,12,0,100,"unworthy initiate SAY_EVENT_START_1","You have made a grave error, fiend!"),
+(29567,0,1,12,0,100,"unworthy initiate SAY_EVENT_START_2","I was a soldier of the Light once... Look at what I have become... "),
+(29567,0,2,12,0,100,"unworthy initiate SAY_EVENT_START_3","You are hopelessly outmatched, $R."),
+(29567,0,3,12,0,100,"unworthy initiate SAY_EVENT_START_4","They brand me unworthy? I will show them unmorthy!"),
+(29567,0,4,12,0,100,"unworthy initiate SAY_EVENT_START_5","You will allow me a weapon and armor, yes?"),
+(29567,0,5,12,0,100,"unworthy initiate SAY_EVENT_START_6","I will win my freedom and leave this cursed place!"),
+(29567,0,6,12,0,100,"unworthy initiate SAY_EVENT_START_7","I will dismantle this festering hellhole!"),
+(29567,0,7,12,0,100,"unworthy initiate SAY_EVENT_START_8","There can be only one survivor!"),
+(29567,1,0,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_1","To battle!"),
+(29567,1,1,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_2","Let your fears consume you!"),
+(29567,1,2,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_3","HAH! You can barely hold a blade! Yours will be a quick death."),
+(29567,1,3,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_4","And now you die"),
+(29567,1,4,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_5","To battle!"),
+(29567,1,5,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_6","There is no hope for our future..."),
+(29567,1,6,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_7","Sate your hunger on cold steel, $R"),
+(29567,1,7,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_8","It ends here!"),
+(29567,1,8,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_9","Death is the only cure!");
+
+-- dk initiate
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1609088 AND -1609080;
+DELETE FROM `creature_text` WHERE `entry`=28406;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(28406,0,0,12,0,100,"dk initiate SAY_DUEL_A","No potions!"),
+(28406,0,1,12,0,100,"dk initiate SAY_DUEL_B","Remember this day, $n, for it is the day that you will be thoroughly owned."),
+(28406,0,2,12,0,100,"dk initiate SAY_DUEL_C","I'm going to tear your heart out, cupcake!"),
+(28406,0,3,12,0,100,"dk initiate SAY_DUEL_D","Don't make me laugh."),
+(28406,0,4,12,0,100,"dk initiate SAY_DUEL_E","Here come the tears..."),
+(28406,0,5,12,0,100,"dk initiate SAY_DUEL_F","You have challenged death itself!"),
+(28406,0,6,12,0,100,"dk initiate SAY_DUEL_G","The Lich King will see his true champion on this day!"),
+(28406,0,7,12,0,100,"dk initiate SAY_DUEL_H","You're going down!"),
+(28406,0,8,12,0,100,"dk initiate SAY_DUEL_I","You don't stand a chance, $n");
+
+-- geddon
+DELETE FROM `script_texts` WHERE `entry`=-1409000;
+DELETE FROM `creature_text` WHERE `entry`=12056;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(12056,0,0,16,0,100,"geddon EMOTE_SERVICE","%s performs one last service for Ragnaros.");
+
+-- majordomo
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1409012 AND -1409003;
+DELETE FROM `creature_text` WHERE `entry`=12018;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(12018,0,0,14,8035,100,"majordomo SAY_AGGRO","Reckless mortals, none may challenge the sons of the living flame!"),
+(12018,1,0,14,8039,100,"majordomo SAY_SPAWN","The runes of warding have been destroyed! Hunt down the infedels my bretheren."),
+(12018,2,0,14,8037,100,"majordomo SAY_SLAY","Ashes to Ashes!"),
+(12018,3,0,14,8036,100,"majordomo SAY_SPECIAL","Burn mortals! Burn for this transgression!"),
+(12018,4,0,14,8038,100,"majordomo SAY_DEFEAT","Impossible! Stay your attack mortals! I submitt! I submitt! Brashly you have come to rest the secrets of the living flame. You will soon regret the recklessness of your quest. I go now to summon the lord whos house this is. Should you seek an audiance with him your paltry lives will surly be forfit. Nevertheless seek out his lair if you dare!"),
+(12018,5,0,14,8040,100,"majordomo SAY_SUMMON_MAJ","Behold Ragnaros, the Firelord! He who was ancient when this world was young! Bow before him, mortals! Bow before your ending!"),
+(12018,6,0,14,8041,100,"majordomo SAY_ARRIVAL2_MAJ","These mortal infidels, my lord! They have invaded your sanctum, and seek to steal your secrets!");
+
+-- magmadar
+DELETE FROM `script_texts` WHERE `entry`=-1409001;
+DELETE FROM `creature_text` WHERE `entry`=11982;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(11982,0,0,16,0,100,"magmadar EMOTE_FRENZY","%s goes into a killing frenzy!");
+
+-- calvin montague
+DELETE FROM `script_texts` WHERE `entry`=-1000431;
+DELETE FROM `creature_text` WHERE `entry`=6784;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(6784,0,0,12,0,100,"calvin montague SAY_RIN_END_6","Ugh.");
+
+-- corporal keeshan
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000468 AND -1000464;
+DELETE FROM `creature_text` WHERE `entry`=349;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(349,0,0,12,0,100,"corporal keeshan SAY_CORPORAL_1","My wounds are grave. Forgive my slow pace but my injuries won't allow me to walk any faster."),
+(349,1,0,12,0,100,"corporal keeshan SAY_CORPORAL_2","Ah,fresh air,at last! I need a moment to reset."),
+(349,2,0,12,0,100,"corporal keeshan SAY_CORPORAL_3","The Blackrock infestation is thick in these parts. I will do my best to keep the pace. Let's go!"),
+(349,3,0,12,0,100,"corporal keeshan SAY_CORPORAL_4","Marshal Marris,sir. Corporal Keeshan of the 12th Sabre Regiment returned from battle and reporting for duty!"),
+(349,4,0,12,0,100,"corporal keeshan SAY_CORPORAL_5","Brave adventurer,thank you for rescuing me! I am sure Marshal Marris will reward your kind deed.");
+
+-- anchorite truuen
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1800070 AND -1800064;
+DELETE FROM `creature_text` WHERE `entry` IN (17238,1854,17233);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17238,0,0,12,0,100,"anchorite truuen SAY_WP_0","Beware! We are attacked!"),
+(17238,1,0,12,0,100,"anchorite truuen SAY_WP_1","It must be the purity of the Mark of the Lightbringer that is drawing forth the Scourge to attack us. We must proceed with caution lest we be overwhelmed!"),
+(17238,2,0,12,0,100,"anchorite truuen SAY_WP_2","This land truly needs to be cleansed by the Light! Let us continue on to the tomb. It isn't far now..."),
+(1854,0,0,12,0,100,"anchorite truuen SAY_WP_3","Be welcome, friends!"),
+(17233,0,0,12,0,100,"anchorite truuen SAY_WP_4","Thank you for coming here in remembrance of me. Your efforts in recovering that symbol, while unnecessary, are certainly touching to an old man's heart. "),
+(17233,1,0,12,0,100,"anchorite truuen SAY_WP_5","Please, rise my friend. Keep the Blessing as a symbol of the strength of the Light and how heroes long gone might once again rise in each of us to inspire. "),
+(17233,2,0,12,0,100,"anchorite truuen SAY_WP_6","Thank you my friend for making this possible. This is a day that I shall never forget! I think I will stay a while. Please return to High Priestess MacDonnell at the camp. I know that she'll be keenly interested to know of what has transpired here.");
+
+-- hakkar
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1309023 AND -1309020;
+DELETE FROM `creature_text` WHERE `entry`=14834;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(14834,0,0,14,8414,100,"hakkar SAY_AGGRO","PRIDE HERALDS THE END OF YOUR WORLD. COME, MORTALS! FACE THE WRATH OF THE SOULFLAYER!"),
+(14834,1,0,14,0,100,"hakkar SAY_FLEEING","Fleeing will do you no good, mortals!"),
+(14834,2,0,14,0,100,"hakkar SAY_MINION_DESTROY","You dare set foot upon Hakkari holy ground? Minions of Hakkar, destroy the infidels!"),
+(14834,3,0,14,0,100,"hakkar SAY_PROTECT_ALTAR","Minions of Hakkar, hear your God. The sanctity of this temple has been compromised. Invaders encroach upon holy ground! The Altar of Blood must be protected. Kill them all!");
+
+-- thekal
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1309010 AND -1309009;
+DELETE FROM `creature_text` WHERE `entry`=14509;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(14509,0,0,14,8419,100,"thekal SAY_AGGRO","Shirvallah, fill me with your RAGE!"),
+(14509,1,0,14,8424,100,"thekal SAY_DEATH","Hakkar binds me no more! Peace at last!");
+
+-- jeklik
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1309004 AND -1309002;
+DELETE FROM `creature_text` WHERE `entry`=14517;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(14517,0,0,14,8417,100,"jeklik SAY_AGGRO","Lord Hir'eek, grant me wings of vengance!"),
+(14517,1,0,14,0,100,"jeklik SAY_RAIN_FIRE","I command you to rain fire down upon these invaders!"),
+(14517,2,0,14,8422,100,"jeklik SAY_DEATH","Finally ...death. Curse you Hakkar! Curse you!");
+
+-- arlokk
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1309013 AND -1309011;
+DELETE FROM `creature_text` WHERE `entry`=14515;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(14515,0,0,14,8416,100,"arlokk SAY_AGGRO","Bethekk, your priestess calls upon your might!"),
+(14515,1,0,14,0,100,"arlokk SAY_FEAST_PANTHER","Feast on $n, my pretties!"),
+(14515,2,0,14,8412,100,"arlokk SAY_DEATH","At last, I am free of the Soulflayer!");
+
+-- mandokir / jindo
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1309019 AND -1309014;
+DELETE FROM `creature_text` WHERE `entry` IN (11382,11380);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(11382,0,0,14,8413,100,"mandokir SAY_AGGRO","I'll feed your souls to Hakkar himself!"),
+(11382,1,0,14,0,100,"mandokir SAY_DING_KILL","DING!"),
+(11382,2,0,14,0,100,"mandokir SAY_WATCH","I'm keeping my eye on you, $N!"),
+(11382,3,0,14,0,100,"mandokir SAY_WATCH_WHISPER","Don't make me angry. You won't like it when I'm angry."),
+(11380,0,0,14,0,100,"mandokir SAY_GRATS_JINDO","GRATS!"),
+(11380,1,0,14,8425,100,"jindo SAY_AGGRO","Welcome to da great show friends! Step right up to die!");
+
+-- marli
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1309008 AND -1309005;
+DELETE FROM `creature_text` WHERE `entry`=14510;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(14510,0,0,14,8418,100,"marli SAY_AGGRO","Draw me to your web mistress Shadra. Unleash your venom!"),
+(14510,1,0,14,0,100,"marli SAY_TRANSFORM","Shadra, make of me your avatar!"),
+(14510,2,0,14,0,100,"marli SAY_SPIDER_SPAWN","Aid me my brood!"),
+(14510,3,0,14,8423,100,"marli SAY_DEATH","Bless you mortal for this release. Hakkar controls me no longer...");
+
+-- clintar
+DELETE FROM `script_texts` WHERE `entry`=-1000283;
+DELETE FROM `creature_text` WHERE `entry`=16364;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(16364,0,0,12,0,100,"clintar SAY_RELIC1","That's the first relic, but there are still two more. Follow me, $N.");
+
+-- freed soul
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1329003 AND -1329000;
+DELETE FROM `creature_text` WHERE `entry`=11136;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(11136,0,0,12,0,100,"freed soul SAY_ZAPPED0","Thanks to Egan"),
+(11136,0,1,12,0,100,"freed soul SAY_ZAPPED1","Rivendare must die"),
+(11136,0,2,12,0,100,"freed soul SAY_ZAPPED2","Who you gonna call?"),
+(11136,0,3,12,0,100,"freed soul SAY_ZAPPED3","Don't cross those beams!");
+
+-- erland
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000317 AND -1000306;
+DELETE FROM `creature_text` WHERE `entry` IN (1978,1950,1951);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(1978,0,0,12,0,100,"erland SAY_QUESTACCEPT","Let's get to the others, and keep an eye open for those wolves cutside..."),
+(1978,1,0,12,0,100,"erland SAY_START","Be careful, $N. Those wolves like to hide among the trees."),
+(1978,2,0,12,0,100,"erland SAY_AGGRO_1","A $C attacks!"),
+(1978,2,1,12,0,100,"erland SAY_AGGRO_2","Beware! I am under attack!"),
+(1978,2,2,12,0,100,"erland SAY_AGGRO_3","Oh no! A $C is upon us!"),
+(1978,3,0,12,0,100,"erland SAY_PROGRESS","We're almost there!"),
+(1978,4,0,12,0,100,"erland SAY_LAST","We made it! Thanks, $N. I couldn't have gotten without you."),
+(1950,0,0,12,0,100,"erland SAY_RANE","It's good to see you again, Erland. What is your report?"),
+(1978,5,0,12,0,100,"erland SAY_RANE_ANSWER","Masses of wolves are to the east, and whoever lived at Malden's Orchard is gone."),
+(1978,6,0,12,0,100,"erland SAY_MOVE_QUINN","If I am excused, then I'd like to check on Quinn..."),
+(1978,7,0,12,0,100,"erland SAY_QUINN","Hello, Quinn. How are you faring?"),
+(1951,0,0,12,0,100,"erland SAY_QUINN_ANSWER","I've been better. Ivar the Foul got the better of me..."),
+(1978,8,0,12,0,100,"erland SAY_BYE","Try to take better care of yourself, Quinn. You were lucky this time.");
+
+-- converted sentry
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000189 AND -1000188;
+DELETE FROM `creature_text` WHERE `entry`=24981;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(24981,0,0,12,0,100,"converted sentry SAY_CONVERTED_1","Deployment sucessful. Trespassers will be neutralized."),
+(24981,0,1,12,0,100,"converted sentry SAY_CONVERTED_2","Objective acquired. Initiating security routines.");
+
+-- example creature
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1999910 AND -1999900;
+
+-- example escort
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1999921 AND -1999910;
+
+-- example gossip codebox
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1999924 AND -1999922;
+
+-- azuregos
+DELETE FROM `script_texts` WHERE `entry`=-1000100;
+DELETE FROM `creature_text` WHERE `entry`=6109;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(6109,0,0,14,0,100,"azuregos SAY_TELEPORT","Come, little ones. Face me!");
+
+-- ame
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000522 AND -1000517;
+DELETE FROM `creature_text` WHERE `entry`=9623;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(9623,0,0,12,0,100,"ame SAY_READY","A-Me good. Good, A-Me. Follow... follow A-Me. Home. A-Me go home."),
+(9623,1,0,12,0,100,"ame SAY_AGGRO1","$c, no hurt A-Me. A-Me good."),
+(9623,2,0,12,0,100,"ame SAY_SEARCH","Good... good, A-Me. A-Me good. Home. Find home."),
+(9623,3,0,12,0,100,"ame SAY_AGGRO2","Danger. Danger! $c try hurt A-Me."),
+(9623,4,0,12,0,100,"ame SAY_AGGRO3","Bad, $c. $c, bad!"),
+(9623,5,0,12,0,100,"ame SAY_FINISH","A-Me home! A-Me good! Good A-Me. Home. Home. Home.");
+
+-- ringo
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000433 AND -1000416;
+DELETE FROM `creature_text` WHERE `entry` IN (9999,9997);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(9999,0,0,12,0,100,"ringo SAY_RIN_START_1","Well, I'm not sure how far I'll make it in this state... I'm feeling kind of faint..."),
+(9999,0,1,12,0,100,"ringo SAY_RIN_START_2","Remember, if I faint again, the water that Spraggle gave you will revive me."),
+(9999,1,0,12,0,100,"ringo SAY_FAINT_1","The heat... I can't take it..."),
+(9999,1,1,12,0,100,"ringo SAY_FAINT_2","Maybe... you could carry me?"),
+(9999,1,2,12,0,100,"ringo SAY_FAINT_3","Uuuuuuggggghhhhh...."),
+(9999,1,3,12,0,100,"ringo SAY_FAINT_4","I'm not feeling so well..."),
+(9999,2,0,12,0,100,"ringo SAY_WAKE_1","Where... Where am I?"),
+(9999,2,1,12,0,100,"ringo SAY_WAKE_2","I am feeling a little better now, thank you."),
+(9999,2,2,12,0,100,"ringo SAY_WAKE_3","Yes, I must go on."),
+(9999,2,3,12,0,100,"ringo SAY_WAKE_4","How am I feeling? Quite soaked, thank you."),
+(9999,3,0,12,0,100,"ringo SAY_RIN_END_1","Spraggle! I didn't think I'd make it back!"),
+(9997,0,0,12,0,100,"ringo SAY_SPR_END_2","Ringo! You're okay!"),
+(9999,4,0,12,0,100,"ringo SAY_RIN_END_3","Oh... I'm feeling faint..."),
+(9999,5,0,16,0,100,"ringo EMOTE_RIN_END_4","%s collapses onto the ground."),
+(9999,6,0,16,0,100,"ringo EMOTE_RIN_END_5","%s stands up after a short pause."),
+(9999,7,0,12,0,100,"ringo SAY_RIN_END_6","Ugh."),
+(9997,1,0,12,0,100,"ringo SAY_SPR_END_7","Ringo? Wake up! Don't worry, I'll take care of you."),
+(9999,8,0,16,0,100,"ringo EMOTE_RIN_END_8","%s fades away after a long pause.");
+
+-- Corrections
+DELETE FROM `creature_text` WHERE `entry`=3850;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`language`,`emote`,`comment`,`text`) VALUES
+(3850,0,0,14,0,100,7,1,"prisoner ashcrombe SAY_FREE_AS","Follow me and I'll open the courtyard door for you."),
+(3850,1,0,14,0,100,7,1,"prisoner ashcrombe SAY_OPEN_DOOR_AS","I have just the spell to get this door open. Too bad the cell doors weren't locked so haphazardly."),
+(3850,2,0,14,0,100,7,1,"prisoner ashcrombe SAY_POST_DOOR_AS","There it is! Wide open. Good luck to you conquering what lies beyond. I must report back to the Kirin Tor at once!"),
+(3850,3,0,12,0,100,7,1,"prisoner ashcrombe SAY_BOSS_DIE_AS","For once I agree with you... scum.");
+
+DELETE FROM `creature_text` WHERE `entry`=7766;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(7766,0,0,12,0,100,"tyrion spybot SAY_TYRION_1","Wait here. Spybot will make Lescovar come out as soon as possible. Be ready! Attack only after you've overheard their conversation."),
+(7766,1,0,14,0,100,"lord gregor lescovar SAY_TYRION_2","That's it! That's what you were waiting for! KILL THEM!");
diff --git a/sql/updates/world/2012_11_24_02_world_gossip_menu_option.sql b/sql/updates/world/2012_11_24_02_world_gossip_menu_option.sql
new file mode 100644
index 00000000000..e6f9ab551d3
--- /dev/null
+++ b/sql/updates/world/2012_11_24_02_world_gossip_menu_option.sql
@@ -0,0 +1,24 @@
+-- Darnassus Sentinel
+UPDATE `creature_template` SET `gossip_menu_id`=2352 WHERE `entry`=4262;
+
+-- Creature Gossip_menu insert from sniff
+DELETE FROM `gossip_menu` WHERE `entry`=2352 AND `text_id`=3016;
+DELETE FROM `gossip_menu` WHERE `entry`=2323 AND `text_id`=3018;
+INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES
+(2352, 3016),(2323, 3018);
+
+-- Creature Gossip_menu_option
+DELETE FROM `gossip_menu_option` WHERE (`menu_id`=2352 AND `id`=0) OR (`menu_id`=2352 AND `id`=1) OR (`menu_id`=2352 AND `id`=2) OR (`menu_id`=2352 AND `id`=3) OR (`menu_id`=2352 AND `id`=4) OR (`menu_id`=2352 AND `id`=5) OR (`menu_id`=2352 AND `id`=6) OR (`menu_id`=2352 AND `id`=7) OR (`menu_id`=2352 AND `id`=8) OR (`menu_id`=2352 AND `id`=9) OR (`menu_id`=2352 AND `id`=10) OR (`menu_id`=2352 AND `id`=11);
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`) VALUES
+(2352, 0, 0, 'Auction House', 1, 1, 3101, 89, 0, 0, ''),
+(2352, 1, 0, 'The Bank', 1, 1, 2322, 90, 0, 0, ''),
+(2352, 2, 0, 'Hippogryph Master', 1, 1, 2323, 91, 0, 0, ''),
+(2352, 3, 0, 'Guild Master', 1, 1, 2324, 92, 0, 0, ''),
+(2352, 4, 0, 'The Inn', 1, 1, 2325, 93, 0, 0, ''),
+(2352, 5, 0, 'Mailbox', 1, 1, 2326, 94, 0, 0, ''),
+(2352, 6, 0, 'Stable Master', 1, 1, 4921, 95, 0, 0, ''),
+(2352, 7, 0, 'Weapons Trainer', 1, 1, 3722, 96, 0, 0, ''),
+(2352, 8, 0, 'Battlemaster', 1, 1, 8221, 97, 0, 0, ''),
+(2352, 9, 0, 'Class Trainer', 1, 1, 2343, 0, 0, 0, ''),
+(2352, 10, 0, 'Profession Trainer', 1, 1, 2351, 0, 0, 0, ''),
+(2352, 11, 0, 'Lexicon of Power', 1, 1, 10205, 107, 0, 0, '');
diff --git a/sql/updates/world/2012_11_24_03_world_various_fixes.sql b/sql/updates/world/2012_11_24_03_world_various_fixes.sql
new file mode 100644
index 00000000000..dfa2d277564
--- /dev/null
+++ b/sql/updates/world/2012_11_24_03_world_various_fixes.sql
@@ -0,0 +1,601 @@
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 1421: Morridune is hostile for Alliance.
+-- Morridune data from sniffs
+UPDATE `creature_template` SET `gossip_menu_id`=321, `faction_A`=80, `faction_H`=80, `npcflag`=1, `speed_walk`=1.142857, `speed_run`=1, `baseattacktime`=2000, `rangeattacktime`=2000, `unit_flags`=32768, `dynamicflags`=0 WHERE `entry`=6729;
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 1426: Attack on Camp Narache
+UPDATE `quest_template` SET `OfferRewardText`='This is quite alarming indeed! But with this information we can call on our brethren from Bloodhoof Village to help thwart the attack. You have saved the lives of many $r, $N.', `RequestItemsText`='You have a look of concern about you,$N. What news do you bring?',`RequiredRaces`=690 WHERE `Id`=24857;
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 1518: Eramas Brightblaze's attack type
+-- Set proper damage school type for Eramas Brightblaze
+UPDATE `creature_template` SET `dmgschool`=0 WHERE `entry` IN (24554,25550);
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 1520: Banish the Demons
+DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (19973,22327,22201,22195,22204,22392,20557,22291,23322);
+UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry` IN (19973,22327,22201,22195,22204,22392,20557,22291,23322);
+UPDATE `creature_template` SET `flags_extra`=130, `unit_flags`=33554432 WHERE `entry` IN (23322,23327);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (19973,22327,22201,22195,22204,22392,20557,22291,23322);
+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
+(19973,0,0,0,8,0,100,1,40825,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'On spell hit - Set phase 1'),
+(19973,0,1,0,6,1,100,0,0,0,0,0,33,23327,0,0,0,0,0,16,0,0,0,0,0,0,0, 'On death in phase 1 - give quest credit'),
+(20557,0,0,0,8,0,100,1,40825,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'On spell hit - Set phase 1'),
+(20557,0,1,0,6,1,100,0,0,0,0,0,33,23327,0,0,0,0,0,16,0,0,0,0,0,0,0, 'On death in phase 1 - give quest credit'),
+(20557,0,2,0,4,0,100,0,0,0,0,0,11,22911,0,0,0,0,0,2,0,0,0,0,0,0,0, 'On aggro - cast charge'),
+(20557,0,3,0,0,0,100,0,5000,11000,20000,27000,11,36406,0,0,0,0,0,2,0,0,0,0,0,0,0,'In combat - cast breath'),
+(22195,0,0,0,8,0,100,1,40825,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'On spell hit - Set phase 1'),
+(22195,0,1,0,6,1,100,0,0,0,0,0,33,23327,0,0,0,0,0,16,0,0,0,0,0,0,0, 'On death in phase 1 - give quest credit'),
+(22195,0,2,0,0,0,75,0,2500,7500,14000,18000,11,34017,0,0,0,0,0,2,0,0,0,0,0,0,0, 'In combat - cast rain of chaos'),
+(22195,0,3,0,0,0,100,0,10100,14100,122000,130000,11,11980,0,0,0,0,0,5,0,0,0,0,0,0,0, 'In combat - cast curse of weakness'),
+(22201,0,0,0,8,0,100,1,40825,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'On spell hit - Set phase 1'),
+(22201,0,1,0,6,1,100,0,0,0,0,0,33,23327,0,0,0,0,0,16,0,0,0,0,0,0,0, 'On death in phase 1 - give quest credit'),
+(22204,0,0,0,8,0,100,1,40825,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'On spell hit - Set phase 1'),
+(22204,0,1,0,6,1,100,0,0,0,0,0,33,23327,0,0,0,0,0,16,0,0,0,0,0,0,0, 'On death in phase 1 - give quest credit'),
+(22291,0,0,0,8,0,100,1,40825,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'On spell hit - Set phase 1'),
+(22291,0,1,0,6,1,100,0,0,0,0,0,33,23327,0,0,0,0,0,16,0,0,0,0,0,0,0, 'On death in phase 1 - give quest credit'),
+(22291,0,2,0,0,0,100,0,6300,12800,6300,12800,11,32736,0,0,0,0,0,2,0,0,0,0,0,0,0, 'In combat - cast mortal strike'),
+(22327,0,0,0,8,0,100,1,40825,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'On spell hit - Set phase 1'),
+(22327,0,1,0,6,1,100,0,0,0,0,0,33,23327,0,0,0,0,0,16,0,0,0,0,0,0,0, 'On death in phase 1 - give quest credit'),
+(22392,0,0,0,8,0,100,1,40825,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'On spell hit - Set phase 1'),
+(22392,0,1,0,6,1,100,0,0,0,0,0,33,23327,0,0,0,0,0,16,0,0,0,0,0,0,0, 'On death in phase 1 - give quest credit'),
+(23322,0,0,1,54,0,100,0,0,0,0,0,11,40849,0,0,0,0,0,1,0,0,0,0,0,0,0, 'On spawn - cast portal'),
+(23322,0,1,0,61,0,100,0,0,0,0,0,11,40857,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Link with 0 - cast aura');
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 1843: Old Crystalbark
+UPDATE `creature_template` SET `faction_A`=16,`faction_H`=16 WHERE `entry`=32357;
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 1881: The Honored Dead
+SET @GUARD := 25342;
+SET @WORKER := 25343;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=45474 AND `ConditionTypeOrReference`=36;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (@GUARD,@WORKER) AND `id` IN (2,3);
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@GUARD,0,2,3,8,0,100,0,45474,0,0,0,33,@GUARD,0,0,0,0,0,7,0,0,0,0,0,0,0,'Dead Caravan Guard - On Spellhit - Give Quest Credit'),
+(@GUARD,0,3,0,61,0,100,0,0,0,0,0,41,500,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dead Caravan Guard - On Spellhit - Despawn'),
+(@WORKER,0,2,3,8,0,100,0,45474,0,0,0,33,@GUARD,0,0,0,0,0,7,0,0,0,0,0,0,0,'Dead Caravan Worker - On Spellhit - Give Quest Credit'),
+(@WORKER,0,3,0,61,0,100,0,0,0,0,0,41,500,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dead Caravan Worker - On Spellhit - Despawn');
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 2075: Bring Down Those Shields
+UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry`=24464;
+DELETE FROM `smart_scripts` WHERE `entryorguid` =24464 AND `id`=1;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(24464,0,1,0,8,0,100,0,50133,0,0,0,28,43874,3,0,0,0,0,1,0,0,0,0,0,0,0,'Scourging Crystal - On Spellhit Scourging Crystal Controller - Remove Scourge Mur''gul Camp: Force Shield Arcane Purple x3 on self');
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 2077
+SET @OGUID := 6024; -- Set by TDB
+DELETE FROM gameobject WHERE id IN (190284,190283,186814,186813);
+INSERT INTO gameobject (guid,id,map,spawnMask,phaseMask,position_x,position_y,position_z,orientation,rotation0,rotation1,rotation2,rotation3,spawntimesecs,animprogress,state) VALUES
+(@OGUID,190284,571,1,1,1595.69,-3905.33,79.7439,0.610864,0,0,0,0,5,0,1),
+(@OGUID+1,190283,571,1,1,1597.4,-3903.79,79.702,0,0,0,0,0,60,100,1),
+(@OGUID+2,186814,571,1,1,1597.4,-3903.79,79.702,0,0,0,0,0,60,100,1),
+(@OGUID+3,186813,571,1,1,1596.3,-3904.79,79.5351,-2.67035,0,0,0,0,5,0,1);
+-- SmartAI for nest and creature
+UPDATE creature_template SET AIName='SmartAI' WHERE entry=24518;
+UPDATE gameobject_template SET AIName='SmartGameObjectAI' WHERE `entry` IN (186814,190283);
+DELETE FROM `smart_scripts` WHERE `entryorguid`=24518 AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (186814,190283) AND `source_type`=1;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+-- Talonshrike
+(24518,0,0,0,38,0,100,0,0,1,0,0,69,0,0,0,0,0,0,8,0,0,0,1597.4,-3903.79,79.702,0.0,'Talonshrike - On notification - fly to nest'),
+(24518,0,1,0,0,0,100,0,5000,5000,10000,12000,11,49865,0,0,0,0,0,2,0,0,0,0.0,0.0,0.0,0.0,' Talonshrike - In Combat - 5 seconds - Cast Eye Peck'),
+(24518,0,2,0,0,0,100,0,3000,3000,5000,7000,11,32909,0,0,0,0,0,2,0,0,0,0.0,0.0,0.0,0.0,' Talonshrike - In Combat - 3 seonds - Cast Talon Strike'),
+-- Talonshrike's Egg
+(186814,1,0,0,70,0,100,0,2,0,0,0,45,0,1,0,0,0,0,11,24518,500,0,0.0,0.0,0.0,0.0,'Talonshrikes Egg - On use - Notify Talonshrike'),
+(190283,1,0,0,70,0,100,0,2,0,0,0,45,0,1,0,0,0,0,11,24518,500,0,0.0,0.0,0.0,0.0,'Talonshrikes Egg - On use - Notify Talonshrike');
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 2324: Battered Hilt
+SET @HC5MANREF=35073;
+-- Update loot ids for(Ymirjar Deathbringer,Ymirjar Flamebearer,Ymirjar Skycaller,Ymirjar Wrathbringer,Stonespine Gargoyle) - Same as other ICC 5man hc trash
+UPDATE `creature_template` SET `lootid`=100001 WHERE `entry` IN (37641,37642,37643,37644,37622);
+DELETE FROM `creature_loot_template` WHERE `entry` IN (37641,37642,37643,37644,37622);
+-- Add new ref to ICC 5man hc Trash Ref (0.08 percent is average of values on wowhead 4.16/52)
+DELETE FROM `reference_loot_template` WHERE `entry`=@HC5MANREF AND `item` IN(50379,50380);
+INSERT INTO `reference_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
+(@HC5MANREF,50379,0.08,1,0,1,1), -- Alliance Battered Hilt
+(@HC5MANREF,50380,0.08,1,0,1,1); -- Horde Battered Hilt
+-- Conditions for Batterd hilt drop
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=10 AND `SourceGroup`=@HC5MANREF;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(10,@HC5MANREF,50379,0,0,6,0,469,0,0,0,0, '', 'Battered Hilt Must Be Alliance'),
+(10,@HC5MANREF,50380,0,0,6,0,67, 0,0,0,0, '', 'Battered Hilt Must Be Horde');
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 4363: Crashin' Thrashin' Racer
+UPDATE `creature_template` SET `spell1`=49297 WHERE `entry` IN (27664,40281);
+UPDATE `creature_template_addon` SET `auras`='49384' WHERE `entry`=27664;
+UPDATE `creature_template_addon` SET `auras`='75110' WHERE `entry`=40281;
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 5320: Fields of Grief
+UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=375;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=375 AND `source_type`=1;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(375,1,0,0,70,0,100,0,2,0,0,0,70,120,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'Tirisfal Pumpkin - On Use - Respawn/restock after 120s');
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8408: ICC Trash Mobs Damage
+-- Mobs before Sindragosa
+UPDATE `creature_template` SET `mindmg`=422, `maxdmg`=586, `attackpower`=642, `dmg_multiplier`=10 WHERE `entry`=37532;
+UPDATE `creature_template` SET `mindmg`=422, `maxdmg`=586, `attackpower`=642, `dmg_multiplier`=25 WHERE `entry`=37531;
+UPDATE `creature_template` SET `mindmg`=422, `maxdmg`=586, `attackpower`=642, `dmg_multiplier`=20 WHERE `entry`=38151;
+UPDATE `creature_template` SET `mindmg`=422, `maxdmg`=586, `attackpower`=642, `dmg_multiplier`=50 WHERE `entry`=38139;
+-- Mobs before Dreamwalker
+UPDATE `creature_template` SET `dmg_multiplier`=25 WHERE `entry` IN (37133,37134,38125,37132);
+UPDATE `creature_template` SET `dmg_multiplier`=50 WHERE `entry` IN (38130,38131,38132,38133);
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8401: Anatoly will talk
+SET @SASHA := 26935;
+SET @ANATOLY := 26971;
+SET @HORSE := 27626;
+SET @TATJANA := 27627;
+SET @SPELL_SHOOT := 48815;
+SET @SPELL_DART := 49134;
+SET @SPELL_PING := 49135;
+SET @SPELL_MOUNT_HORSE := 49138;
+DELETE FROM `creature` WHERE `guid` IN (118152,118160);
+DELETE FROM `creature_text` WHERE `entry` IN (@SASHA,@ANATOLY);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@SASHA,0,0,'I''m old enough to shoot beasts like you right between the eyes... at twice this distance.',12,0,100,0,0,0,'Sasha'),
+(@SASHA,1,0,'Don''t you dare talk about my father, monster. He was twice the man you''ll ever be.',12,0,100,0,0,0,'Sasha'),
+(@SASHA,2,0,'I''d rather be dead than be one of you! You think you''re still human? You''re... animals!',12,0,100,0,0,0,'Sasha'),
+(@SASHA,3,0,'Surprise, you scum! You''re going to tell me where my sister is or I''ll put a bucketful of truesilver bullets through your wife''s heart.',12,0,100,0,0,0,'Sasha'),
+(@SASHA,4,0,'Where is Anya?',12,0,100,0,0,0,'Sasha'),
+(@SASHA,5,0,'There is one last thing. I need to know where Arugal is.',12,0,100,0,0,0,'Sasha'),
+(@ANATOLY,0,0,'How old are you, lass?',12,0,100,0,0,0,'Anatoly'),
+(@ANATOLY,1,0,'You won''t get away with this, you know? You''re just a kid.',12,0,100,0,0,0,'Anatoly'),
+(@ANATOLY,2,0,'Your father was weak, Sasha... he didn''t have the guts to do what had to be done.',12,0,100,0,0,0,'Anatoly'),
+(@ANATOLY,3,0,'We''ll all end up serving the Lich King, kid. Better this way than becoming a rotten corpse.',12,0,100,0,0,0,'Anatoly'),
+(@ANATOLY,4,0,'Stop! Do not shoot! Do not hurt Tatjana!',12,0,100,0,0,0,'Anatoly'),
+(@ANATOLY,5,0,'The brat''s held prisoner in the wolf den on the other side of the mountain. She was to be taken to Arugal. Are we free to go now?',12,0,100,0,0,0,'Anatoly'),
+(@ANATOLY,6,0,'Forgive me, Tatjana... ',12,0,100,0,0,0,'Anatoly'),
+(@ANATOLY,7,0,'Nothing you can do can compare to what Arugal can do to us! I will tear you apart myself!',12,0,100,0,0,0,'Anatoly');
+DELETE FROM `vehicle_template_accessory` WHERE `entry`=@HORSE;
+INSERT INTO `vehicle_template_accessory` (`entry`,`accessory_entry`,`seat_id`,`minion`,`description`,`summontype`,`summontimer`) VALUES
+(@HORSE,@TATJANA,0,0,'Tatjana''s Horse',8,30000);
+DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=@HORSE;
+INSERT INTO `npc_spellclick_spells` (`npc_entry`,`spell_id`,`cast_flags`,`user_type`) VALUES
+(@HORSE,@SPELL_MOUNT_HORSE,1,0);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (@SPELL_DART,@SPELL_PING);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=@SPELL_SHOOT;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(17,0,@SPELL_SHOOT,0,0,31,0,3,@ANATOLY,0,0,0,'','Spell Shoot targets Anatoly'),
+(13,1,@SPELL_DART,0,0,31,0,3,@TATJANA,0,0,0,'','Spell Tranquilizer Dart targets Tatjana'),
+(13,1,@SPELL_PING,0,0,31,0,3,@HORSE,0,0,0,'','Spell Tatjana Ping effect0 targets Tatjana''s Horse');
+UPDATE `creature` SET `spawntimesecs`=60 WHERE `id`=@ANATOLY;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@SASHA,@ANATOLY,@TATJANA);
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@TATJANA;
+UPDATE `creature_template` SET `speed_run`=1.28571, `AIName`='SmartAI' WHERE `entry`=@HORSE;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@SASHA,@ANATOLY,@HORSE,@TATJANA) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@SASHA*100,@ANATOLY*100,@ANATOLY*100+1,@ANATOLY*100+2,@ANATOLY*100+3,@ANATOLY*100+4,@HORSE*100) AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@SASHA,0,0,3,38,1,100,0,0,1,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sasha - On data set 0 1 (phase 1) - Say line'),
+(@SASHA,0,1,3,38,1,100,0,0,2,0,0,1,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sasha - On data set 0 2 (phase 1) - Say line'),
+(@SASHA,0,2,3,38,1,100,0,0,3,0,0,1,2,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sasha - On data set 0 3 (phase 1) - Say line'),
+(@SASHA,0,3,0,61,1,100,0,0,0,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - Linked with events 0,1,2 (phase 1) - Set data 0 0'),
+(@SASHA,0,4,5,38,0,100,0,0,4,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - On data set 0 4 - Set event phase 0'),
+(@SASHA,0,5,0,61,0,100,0,0,0,0,0,80,@SASHA*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - On data set 0 4 - Run script'),
+(@SASHA,0,6,0,25,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - On reset - Set event phase 1'),
+(@ANATOLY,0,0,0,1,1,100,0,10000,20000,45000,60000,87,@ANATOLY*100+1,@ANATOLY*100+2,@ANATOLY*100+3,@ANATOLY*100+4,0,0,1,0,0,0,0,0,0,0,'Anatoly - On update OOC (phase 1) - Run random script'),
+(@ANATOLY,0,1,2,38,0,100,0,0,1,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Anatoly - On data set 0 1 - Set event phase 0'),
+(@ANATOLY,0,2,3,61,0,100,0,0,1,0,0,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Anatoly - On data set 0 1 - Set run'),
+(@ANATOLY,0,3,0,61,0,100,0,0,0,0,0,69,1,0,0,0,0,0,8,0,0,0,4057.442,-4140.824,211.1911,0,'Anatoly - On data set 0 1 - Move to position'),
+(@ANATOLY,0,4,5,34,0,100,0,0,1,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Anatoly - On movement inform - Set unit_field_bytes1 (kneel)'),
+(@ANATOLY,0,5,0,61,0,100,0,0,0,0,0,80,@ANATOLY*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Anatoly - On movement inform - Run script'),
+(@ANATOLY,0,6,0,25,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Anatoly - On reset - Set event phase 1'),
+(@HORSE,0,0,0,11,0,100,0,0,0,0,0,28,@SPELL_MOUNT_HORSE,0,0,0,0,0,1,0,0,0,0,0,0,0,'Tatjana''s Horse - On spawn - Remove aura Mount Tatjana''s Horse'),
+(@HORSE,0,1,2,8,0,100,0,@SPELL_PING,0,0,0,2,1812,0,0,0,0,0,1,0,0,0,0,0,0,0,'Tatjana''s Horse - On spellhit Tatjana Ping - Set faction'),
+(@HORSE,0,2,3,61,0,100,0,0,0,0,0,20,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Tatjana''s Horse - On spellhit Tatjana Ping - Stop autoattack'),
+(@HORSE,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,'Tatjana''s Horse - On spellhit Tatjana Ping - Set eventphase 1'),
+(@HORSE,0,4,0,8,1,100,0,@SPELL_MOUNT_HORSE,0,0,0,80,@HORSE*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Tatjana''s Horse - On spellhit Mount Tatjana''s Horse (phase 1) - Run script'),
+(@HORSE,0,5,6,40,0,100,0,19,0,0,0,28,@SPELL_MOUNT_HORSE,0,0,0,0,0,1,0,0,0,0,0,0,0,'Tatjana''s Horse - On WP 19 reached - Remove aura Mount Tatjana''s Horse'),
+(@HORSE,0,6,7,61,0,100,0,0,0,0,0,15,12330,0,0,0,0,0,21,2,0,0,0,0,0,0,'Tatjana''s Horse - On WP 19 reached - Quest credit'),
+(@HORSE,0,7,8,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,9,@ANATOLY,0,30,0,0,0,0,'Tatjana''s Horse - On WP 19 reached - Set data 0 1'),
+(@HORSE,0,8,0,61,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Tatjana''s Horse - On WP 19 reached - Despawn'),
+(@TATJANA,0,0,0,11,0,100,0,0,0,0,0,11,43671,0,0,0,0,0,9,@HORSE,0,5,0,0,0,0,'Tatjana - On respawn - Spellcast Ride Vehicle'),
+(@TATJANA,0,1,2,8,0,100,0,@SPELL_DART,0,0,0,11,@SPELL_PING,2,0,0,0,0,1,0,0,0,0,0,0,0,'Tatjana - On spellhit Tranquilizer Dart - Spellcast Tatjana Ping'),
+(@TATJANA,0,2,3,61,0,100,0,0,0,0,0,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'Tatjana - On spellhit Tranquilizer Dart - Set faction'),
+(@TATJANA,0,3,0,61,0,100,0,0,0,0,0,18,33024,0,0,0,0,0,1,0,0,0,0,0,0,0,'Tatjana - On spellhit Tranquilizer Dart - Set unit_flags'),
+(@TATJANA,0,4,0,0,0,100,0,2000,6000,9000,12000,11,32009,0,0,0,0,0,2,0,0,0,0,0,0,0,'Tatjana - On update IC - Spellcast Cutdown'),
+(@TATJANA,0,5,0,38,0,100,0,0,1,0,0,41,15000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Tatjana - On data set 0 1 - Despawn after 15 seconds'),
+(@SASHA*100,9,0,0,0,0,100,0,0,0,0,0,1,3,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sasha script - Say line'),
+(@SASHA*100,9,1,0,0,0,100,0,17000,17000,0,0,1,4,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sasha script - Say line'),
+(@SASHA*100,9,2,0,0,0,100,0,16700,16700,0,0,1,5,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sasha script - Say line'),
+(@SASHA*100,9,3,0,0,0,100,0,10700,10700,0,0,11,@SPELL_SHOOT,0,0,0,0,0,9,@ANATOLY,0,30,0,0,0,0,'Sasha script - Say line'),
+(@SASHA*100,9,4,0,0,0,100,0,60000,60000,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha script - Set event phase 1'),
+(@SASHA*100,9,5,0,0,0,100,0,0,0,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha script - Set data 0 0'),
+(@ANATOLY*100,9,0,0,0,0,100,0,2400,2400,0,0,45,0,4,0,0,0,0,9,@SASHA,0,30,0,0,0,0,'Anatoly script 0 - Set data 0 4'),
+(@ANATOLY*100,9,1,0,0,0,100,0,5000,5000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,'Anatoly script 0 - Say line'),
+(@ANATOLY*100,9,2,0,0,0,100,0,16800,16800,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0,'Anatoly script 0 - Say line'),
+(@ANATOLY*100,9,3,0,0,0,100,0,16800,16800,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0,'Anatoly script 0 - Say line'),
+(@ANATOLY*100,9,4,0,0,0,100,0,5000,5000,0,0,11,47457,0,0,0,0,0,1,0,0,0,0,0,0,0,'Anatoly script 0 - Spellcast Worgen Transform - Male'),
+(@ANATOLY*100,9,5,0,0,0,100,0,0,0,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Anatoly script 0 - Reset unit_field_bytes1'),
+(@ANATOLY*100,9,6,0,0,0,100,0,500,500,0,0,5,53,0,0,0,0,0,1,0,0,0,0,0,0,0,'Anatoly script 0 - Play emote'),
+(@ANATOLY*100,9,7,0,0,0,100,0,150,150,0,0,1,7,0,0,0,0,0,1,0,0,0,0,0,0,0,'Anatoly script 0 - Say line'),
+(@ANATOLY*100,9,8,0,0,0,100,0,0,0,0,0,45,0,1,0,0,0,0,9,@TATJANA,0,10,0,0,0,0,'Anatoly script 0 - Set data 0 1'),
+(@ANATOLY*100,9,9,0,0,0,100,0,1200,1200,0,0,69,0,0,0,0,0,0,8,0,0,0,4069.991,-4130.805,211.464,0,'Anatoly script 0 - Move to position'),
+(@ANATOLY*100,9,10,0,0,0,100,0,15000,15000,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Anatoly script 0 - Despawn'),
+(@ANATOLY*100+1,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,'Anatoly script 1 - Say line'),
+(@ANATOLY*100+1,9,1,0,0,0,100,0,2000,2000,0,0,45,0,1,0,0,0,0,9,@SASHA,0,20,0,0,0,0,'Anatoly script 1 - Set data 0 1'),
+(@ANATOLY*100+2,9,0,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Anatoly script 2 - Say line'),
+(@ANATOLY*100+2,9,1,0,0,0,100,0,3500,3500,0,0,45,0,1,0,0,0,0,9,@SASHA,0,20,0,0,0,0,'Anatoly script 2 - Set data 0 1'),
+(@ANATOLY*100+3,9,0,0,0,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Anatoly script 3 - Say line'),
+(@ANATOLY*100+3,9,1,0,0,0,100,0,5000,5000,0,0,45,0,2,0,0,0,0,9,@SASHA,0,20,0,0,0,0,'Anatoly script 3 - Set data 0 1'),
+(@ANATOLY*100+4,9,0,0,0,0,100,0,0,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Anatoly script 4 - Say line'),
+(@ANATOLY*100+4,9,1,0,0,0,100,0,5000,5000,0,0,45,0,3,0,0,0,0,9,@SASHA,0,20,0,0,0,0,'Anatoly script 4 - Set data 0 1'),
+(@HORSE*100,9,0,0,0,0,100,0,500,500,0,0,53,1,@HORSE,0,0,0,0,1,0,0,0,0,0,0,0,'Tatjana''s Horse script - Start WP movement');
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8405: A Sister's Pledge and Hour Of The Worg
+SET @SASHA := 26935;
+SET @ANYA := 27646;
+SET @CAGE := 189977;
+DELETE FROM `creature_text` WHERE `entry`=@SASHA AND `groupid` IN (6,7,8);
+DELETE FROM `creature_text` WHERE `entry`=@ANYA;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@SASHA,6,0,'Anya!! You''re all right!',12,0,100,0,0,0,'Sasha'),
+(@SASHA,7,0,'Badmoon? You mean Bloodmoon?',12,0,100,0,0,0,'Sasha'),
+(@SASHA,8,0,'Don''t worry, sister... no one can hurt you now.',12,0,100,0,0,0,'Sasha'),
+(@ANYA,0,0,'You won''t eat me, will you?',12,0,100,0,0,0,'Anya'),
+(@ANYA,1,0,'Sister! The mean men were going to take me to Badmoon Isle. They wanted to turn me into one of them.',12,0,100,0,0,0,'Anya'),
+(@ANYA,2,0,'That''s what I said! Badmoon! Sasha... don''t ever leave me again! First they took papa, then they took you... I don''t want to be alone with them!',12,0,100,0,0,0,'Anya');
+
+DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (@ANYA,@SASHA);
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`IN(@ANYA,@SASHA);
+UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=189977;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@SASHA,@ANYA) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@CAGE AND `source_type`=1;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@CAGE*100,@SASHA*100+1,@ANYA*100) AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+-- Anya
+(@ANYA,0,0,1,20,0,100,0,12411,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Anya - On quest A Sister''s Pledge rewarded - Say line'),
+(@ANYA,0,1,2,61,0,100,0,0,0,0,0,9,0,0,0,0,0,0,13,189977,0,5,0,0,0,0,'Anya - On quest Anatoly will talk rewarded - Activate GO'),
+(@ANYA,0,2,3,61,0,100,0,0,0,0,0,12,@SASHA,3,120000,0,0,0,8,0,0,0,4001.751,-4555.144,196.4673,1.719485,'Anya - On quest Anatoly will talk rewarded - Summon Sasha'),
+(@ANYA,0,3,0,61,0,100,0,0,0,0,0,80,@ANYA*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Anya - On quest Anatoly will talk rewarded - Run script'),
+-- Sasha
+(@SASHA,0,7,0,54,0,100,0,0,0,0,0,53,1,@SASHA,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - Just summoned - Start WP movement'),
+(@SASHA,0,8,9,40,0,100,0,4,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - On WP 4 reached - Set unit_field_bytes1 (kneel)'),
+(@SASHA,0,9,0,61,0,100,0,0,0,0,0,80,@SASHA*100+1,2,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - On WP 4 reached - Run script'),
+-- Cage
+(@CAGE,1,0,0,70,0,100,0,0,0,0,0,80,@CAGE*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Cage - On GO activated - Run script'),
+-- CageScripts
+(@CAGE*100,9,0,0,0,0,100,0,10000,10000,0,0,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cage script - Reset GO'),
+-- SashaScripts
+(@SASHA*100+1,9,0,0,0,0,100,0,1000,1000,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - On WP 4 reached - Say line'),
+(@SASHA*100+1,9,1,0,0,0,100,0,16800,16800,0,0,1,7,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - On WP 4 reached - Say line'),
+(@SASHA*100+1,9,2,0,0,0,100,0,16900,16900,0,0,1,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - On WP 4 reached - Say line'),
+-- AnyaScripts
+(@ANYA*100,9,0,0,0,0,100,0,1700,1700,0,0,69,0,0,0,0,0,0,8,0,0,0,3996.337,-4516.717,196.3168,0,'Anya script - Move to position'),
+(@ANYA*100,9,1,0,0,0,100,0,13300,13300,0,0,1,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Anya script - Say line'),
+(@ANYA*100,9,2,0,0,0,100,0,16800,16800,0,0,1,2,0,0,0,0,0,7,0,0,0,0,0,0,0,'Anya script - Say line'),
+(@ANYA*100,9,3,0,0,0,100,0,88000,88000,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Anya script - Despawn');
+DELETE FROM `waypoints` WHERE `entry`=26935;
+INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
+(26935,1,4002.467,-4556.807,196.4988,''),
+(26935,2,4001.879,-4555.998,196.4988,''),
+(26935,3,3997.248,-4525.081,195.3569,''),
+(26935,4,3996.828,-4519.888,195.6831,'');
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8404: An Experienced Guide
+-- Spawn Drom Frostgrip (29751)
+DELETE FROM `creature` WHERE `id`=29751;
+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
+(42889,29751,571,1,1,26497,0,6951.327,46.35645,795.0692,2.670354,300,0,0,0,0,0,2,537165888,8);
+DELETE FROM `creature_template_addon` WHERE `entry`=29751;
+INSERT INTO `creature_template_addon` (`entry`,`bytes2`,`auras`) VALUES
+(29751,1,'51329');
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8382: Agmar's Hammer missing gossips
+UPDATE `creature_template` SET `gossip_menu_id`=9493 WHERE `entry`=25257; -- Saurfang the Younger
+UPDATE `creature_template` SET `gossip_menu_id`=9317 WHERE `entry`=26181; -- Emissary Brighthoof <Tauren Emissary>
+UPDATE `creature_template` SET `gossip_menu_id`=9318 WHERE `entry`=26485; -- Orphan Matron Twinbreeze
+UPDATE `creature_template` SET `gossip_menu_id`=9437 WHERE `entry`=26504; -- Soar Hawkfury <Stable Master>
+UPDATE `creature_template` SET `gossip_menu_id`=9661 WHERE `entry`=26505; -- Doctor Sintar Malefious <Grand Apothecary>
+UPDATE `creature_template` SET `gossip_menu_id`=9459 WHERE `entry`=26564; -- Borus Ironbender <Blacksmithing Trainer>
+UPDATE `creature_template` SET `gossip_menu_id`=9456, `AIName`='SmartAI' WHERE `entry`=26581; -- Koltira Deathweaver
+UPDATE `creature_template` SET `gossip_menu_id`=9432 WHERE `entry`=26618; -- Captain Gort <Kor'kron Guard Captain>
+UPDATE `creature_template` SET `gossip_menu_id`=9433 WHERE `entry`=26854; -- Earthwarden Grife
+UPDATE `creature_template` SET `gossip_menu_id`=9434 WHERE `entry`=26859; -- Rokhan
+UPDATE `creature_template` SET `gossip_menu_id`=9465 WHERE `entry`=26979; -- Kontokanis
+UPDATE `creature_template` SET `gossip_menu_id`=9487 WHERE `entry`=27267; -- Quartermaster Bartlett <Blacksmithing Supplies>
+UPDATE `creature_template` SET `gossip_menu_id`=9501 WHERE `entry`=27350; -- Agent Skully <Onslaught Caretaker>
+UPDATE `creature_template` SET `gossip_menu_id`=9507 WHERE `entry`=27376; -- Deathguard Schneider
+UPDATE `creature_template` SET `gossip_menu_id`=9508 WHERE `entry`=27378; -- Senior Scrivener Barriga
+UPDATE `creature_template` SET `gossip_menu_id`=9509 WHERE `entry`=27379; -- Engineer Burke
+UPDATE `creature_template` SET `gossip_menu_id`=9510 WHERE `entry`=27381; -- Chancellor Amai
+UPDATE `creature_template` SET `gossip_menu_id`=9598 WHERE `entry`=27804; -- Golluck Rockfist <Horde Ambassador>
+UPDATE `creature_template` SET `gossip_menu_id`=9607, `AIName`='SmartAI' WHERE `entry`=27846; -- Junior Apothecary Lawrence
+UPDATE `creature_template` SET `gossip_menu_id`=9821 WHERE `entry`=28057; -- Garmin Herzog <Stable Master>
+UPDATE `creature_template` SET `gossip_menu_id`=9950 WHERE `entry`=30373; -- Elder Skywarden
+UPDATE `creature_template` SET `gossip_menu_id`=10207 WHERE `entry`=32599; -- Surveyor Hansen
+DELETE FROM `gossip_menu` WHERE `entry`=9317 AND `text_id`=12627;
+DELETE FROM `gossip_menu` WHERE `entry`=9318 AND `text_id`=12628;
+DELETE FROM `gossip_menu` WHERE `entry`=9432 AND `text_id`=12698;
+DELETE FROM `gossip_menu` WHERE `entry`=9433 AND `text_id`=12699;
+DELETE FROM `gossip_menu` WHERE `entry`=9434 AND `text_id`=12701;
+DELETE FROM `gossip_menu` WHERE `entry`=9437 AND `text_id`=12703;
+DELETE FROM `gossip_menu` WHERE `entry`=9456 AND `text_id`=12715;
+DELETE FROM `gossip_menu` WHERE `entry`=9459 AND `text_id`=12718;
+DELETE FROM `gossip_menu` WHERE `entry`=9465 AND `text_id`=12725;
+DELETE FROM `gossip_menu` WHERE `entry`=9487 AND `text_id`=12759;
+DELETE FROM `gossip_menu` WHERE `entry`=9493 AND `text_id`=12777;
+DELETE FROM `gossip_menu` WHERE `entry`=9501 AND `text_id`=12795;
+DELETE FROM `gossip_menu` WHERE `entry`=9507 AND `text_id`=12804;
+DELETE FROM `gossip_menu` WHERE `entry`=9508 AND `text_id`=12805;
+DELETE FROM `gossip_menu` WHERE `entry`=9509 AND `text_id`=12806;
+DELETE FROM `gossip_menu` WHERE `entry`=9510 AND `text_id`=12808;
+DELETE FROM `gossip_menu` WHERE `entry`=9598 AND `text_id`=12954;
+DELETE FROM `gossip_menu` WHERE `entry`=9606 AND `text_id`=12978;
+DELETE FROM `gossip_menu` WHERE `entry`=9607 AND `text_id`=12977;
+DELETE FROM `gossip_menu` WHERE `entry`=9661 AND `text_id`=13089;
+DELETE FROM `gossip_menu` WHERE `entry`=9950 AND `text_id`=7935;
+DELETE FROM `gossip_menu` WHERE `entry`=10207 AND `text_id`=14177;
+DELETE FROM `gossip_menu` WHERE `entry`=21054; -- existing value not from sniff
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+(9317,12627),
+(9318,12628),
+(9432,12698),
+(9433,12699),
+(9434,12701),
+(9437,12703),
+(9456,12715),
+(9459,12718),
+(9465,12725),
+(9487,12759),
+(9493,12777),
+(9501,12795),
+(9507,12804),
+(9508,12805),
+(9509,12806),
+(9510,12808),
+(9598,12954),
+(9606,12978),
+(9607,12977),
+(9661,13089),
+(9950,7935),
+(10207,14177);
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9437,9456,9459,9487,9607) AND `id`=0;
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES
+(9437,0,0,'I wish to make use of the stables.',14,4194304,0,0,0,0,''),
+(9456,0,0,'I should return to the world of shades, Koltira. Send me back.',1,1,0,0,0,0,''),
+(9459,0,3,'Train me.',5,16,0,0,0,0,''),
+(9487,0,1,'Let me browse your goods.',5,16,0,0,0,0,''),
+(9607,0,0,'All right, I''ll take this mixture of yours.',1,1,9606,0,0,0,'');
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9456;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(15,9456,0,0,0,9,0,12132,0,0,0,0,'','Koltira Deathweaver show gossip option if player has quest 12132'),
+(15,9456,0,0,0,1,0,47740,0,0,1,0,'','Koltira Deathweaver show gossip option if player has not aura World of Shadows');
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (26581,27846) AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(26581,0,1,0,62,0,100,0,9456,0,0,0,11,47740,0,0,0,0,0,7,0,0,0,0,0,0,0,'Koltira Deathweaver - On gossip option select - Spellcast World of Shadows'),
+(26581,0,0,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Koltira Deathweaver - On gossip option select - Close gossip'),
+(27846,0,0,0,62,0,100,0,9607,0,0,0,85,49747,0,0,0,0,0,7,0,0,0,0,0,0,0,'Junior Apothecary Lawrence - On gossip option select - Invoker spellcast Create Experimental Mixture');
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8032: Destroying the Altars
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceGroup`=1 AND `SourceEntry`=57853;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,1,57853,0,0,31,0,3,30742,0,0,0,'',"Master Summoner's Staff spell implicit target First Summoning Altar"),
+(13,1,57853,0,1,31,0,3,30744,0,0,0,'',"Master Summoner's Staff spell implicit target Second Summoning Altar"),
+(13,1,57853,0,2,31,0,3,30745,0,0,0,'',"Master Summoner's Staff spell implicit target Third Summoning Altar"),
+(13,1,57853,0,3,31,0,3,30950,0,0,0,'',"Master Summoner's Staff spell implicit target Fourth Summoning Altar");
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 7996: Set Required races for some Argent Tournament quests
+UPDATE `quest_template` SET `RequiredClasses`=32 WHERE `Id` IN(13812,13788,13863,13864,13814,13793,13813,13791,13795); -- Death Knight Only
+UPDATE `quest_template` SET `RequiredClasses`=1503 WHERE `Id` IN(13809,13682,13862,13861,13811,13790,13810,13789,13794); -- non Death Knight
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 7969: Pyroblast Cinnamon Ball (37582), G.N.E.R.D.S. (37583), Soothing Spearmint Candy (37584) & Chewy Fel Taffy (37585) duration fix
+UPDATE `item_template` SET `flagsCustom` = 1 WHERE `entry` IN (37582,37583,37584,37585);
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 7964: Hyperspeed Acceleration
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceGroup`=0 AND `SourceEntry`=54758;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(17,0,54758,0,0,7,0,202,375,0,0,0,'','Hyperspeed Acceleration requires 375 Engineering skill');
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 7824: Missing Brewfest Vendors
+-- Horde Vendor (Blix Fixwidget <Token Redeemer>) http://www.old.wowhead.com/npc=24495
+DELETE FROM `npc_vendor` WHERE `entry` = 24495 AND `item` IN (37737,46707,33863,33862);
+INSERT INTO `npc_vendor` (`entry`, `slot`, `item`, `maxcount`, `incrtime`, `ExtendedCost`) VALUES
+(24495,0,37737,0,0,2397), -- "Brew of the Month" Club Membership Form (Horde) (200 Brewfest Tokens) http://www.old.wowhead.com/item=37737
+(24495,0,46707,0,0,2275), -- Pint-Sized Pink Pachyderm (100 Brewfest Tokens) http://www.old.wowhead.com/item=46707
+(24495,0,33863,0,0,2276), -- Brewfest Dress (200 Brewfest Tokens) http://www.old.wowhead.com/item=33863
+(24495,0,33862,0,0,2276); -- Brewfest Regalia (200 Brewfest Tokens) http://www.old.wowhead.com/item=33862
+-- Alliance Vendor (Belbi Quikswitch <Token Redeemer>) http://www.old.wowhead.com/npc=23710
+DELETE FROM `npc_vendor` WHERE `entry` = 23710 AND `item` IN (46707,32233);
+INSERT INTO `npc_vendor` (`entry`, `slot`, `item`, `maxcount`, `incrtime`, `ExtendedCost`) VALUES
+(23710,0,46707,0,0,2275), -- Pint-Sized Pink Pachyderm (100 Brewfest Tokens) http://www.old.wowhead.com/item=46707
+(23710,0,32233,0,0,0); -- Wolpertinger's Tankard http://www.old.wowhead.com/item=32233
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 7823: This One Time, When I Was Drunk... Alliance quest giver fix
+UPDATE `gameobject_questrelation` SET `id`=189989 WHERE `quest`=12020;
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 7416: Twilight of the Dawn Runner
+UPDATE `smart_scripts` SET `event_type`=62, `event_param1`=7371, `comment`='Ithania - On gossip select - run timed action list' WHERE (`entryorguid`=17119 AND `source_type`=0 AND `id`=0);
+UPDATE `creature_template` SET `gossip_menu_id` = 7371 WHERE `entry` = 17119;
+DELETE FROM `gossip_menu` WHERE `entry`=7371 AND `text_id`=8808;
+INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES(7371,8808);
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=7371 AND `id`=0;
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`) VALUES
+(7371,0,0,'Balandar sent me to get you out of here and pick up his cargo. He is waiting for you in the Brackenwall.',1,1,0,0,0,0,NULL);
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 7301:
+DELETE FROM game_graveyard_zone WHERE ghost_zone = 719;
+INSERT INTO game_graveyard_zone (id, ghost_zone, faction) VALUES
+(469, 719, 0);
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 7219: The Ashenvale Hunt
+UPDATE `creature_template` SET `gossip_menu_id`=4346 WHERE `entry`=12696;
+DELETE FROM `gossip_menu` WHERE `entry`=4346 AND `text_id`=5529;
+DELETE FROM `gossip_menu` WHERE `entry`=4381 AND `text_id`=5593;
+DELETE FROM `gossip_menu` WHERE `entry`=4382 AND `text_id`=5595;
+DELETE FROM `gossip_menu` WHERE `entry`=4383 AND `text_id`=5594;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+(4346,5529),
+(4381,5593),
+(4382,5595),
+(4383,5594);
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=4346 AND `id` IN (0,1,2);
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES
+(4346,0,0,"What can you tell to me about the bear - Ursangous?",1,1,4381,0,0,0,NULL),
+(4346,1,0,"What can you tell to me about the nightsaber cat - Shadumbra?",1,1,4383,0,0,0,NULL),
+(4346,2,0,"What can you tell to me about the hippogryph - Sharptalon?",1,1,4382,0,0,0,NULL);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=4346;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `SourceGroup`=0 AND `SourceEntry`=247;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,4346,0,0,0,8,0,6383,0,0,0,0,'',"Show gossip only if The Ashenvale Hunt (6383) quest is rewarded"),
+(15,4346,0,0,0,8,0,23,0,0,1,0,'',"Show gossip only if Ursangous's Paw (23) quest is not rewarded"),
+(15,4346,1,0,0,8,0,6383,0,0,0,0,'',"Show gossip only if The Ashenvale Hunt (6383) quest is rewarded"),
+(15,4346,1,0,0,8,0,24,0,0,1,0,'',"Show gossip only if Shadumbra's Head (24) quest is not rewarded"),
+(15,4346,2,0,0,8,0,6383,0,0,0,0,'',"Show gossip only if The Ashenvale Hunt (6383) quest is rewarded"),
+(15,4346,2,0,0,8,0,2,0,0,1,0,'',"Show gossip only if Sharptalon's Claw (2) quest is not rewarded"),
+-- Quest The Hunt Completed (247) should only be available once Sharptalon's Claw (2), Ursangous's Paw (23) and Shadumbra's Head (24) quests are rewarded.
+(19,0,247,0,1,8,0,2,0,0,0,0,'',"Show quest only if Sharptalon's Claw (2) quest is rewarded AND"),
+(19,0,247,0,1,8,0,23,0,0,0,0,'',"Show quest only if Ursangous's Paw (23) quest is rewarded AND"),
+(19,0,247,0,1,8,0,24,0,0,0,0,'',"Show quest only if Shadumbra's Head (24) quest is rewarded AND");
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 7079: Corporal Thund Splithoof
+DELETE FROM `gossip_menu_option` WHERE (`menu_id`=840 AND `id`=2);
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`) VALUES
+(840, 2, 0, 'Hero, I have urgent business with Corporal Splithoof.', 1, 3, 0, 0, 0, 0, ''); -- 7572
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 7155: Aleric Hawkins
+DELETE FROM `creature` WHERE `id`=36517;
+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
+(43466,36517,0,1,1,0,0,1283,338.9167,-59.9998,0.2443461,120,0,0,1,0,0,0,0,0);
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 7011: Inactive Fel Reaver
+DELETE FROM `creature_ai_scripts` WHERE (`creature_id`=22293);
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 22293;
+DELETE FROM `smart_scripts` WHERE (`entryorguid`=22293 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
+(22293,0,0,0,11,0,100,1,0,0,0,0,11,38757,0,0,0,0,0,1,0,0,0,0,0,0,0,'Inactive Fel Reaver Cast - Fel Reaver Freeze on Self');
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 6959: There Is No Hope
+UPDATE `quest_template` SET `Flags`=262282,`RewardItemId1`=28168,`RewardItemCount1`=1,`RewardChoiceItemId1`=28173,`RewardChoiceItemId2`=28169,`RewardChoiceItemId3`=28172,`RewardChoiceItemId4`=28175,`RewardChoiceItemCount1`=1,`RewardChoiceItemCount2`=1,`RewardChoiceItemCount3`=1,`RewardChoiceItemCount4`=1 WHERE `Id`=10172;
+-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 6212: Merciful Freedom
+UPDATE `gameobject_template` SET AIName='SmartGameObjectAI', data2=0, ScriptName='' WHERE `entry` BETWEEN 187854 AND 187868;
+UPDATE `gameobject_template` SET AIName='SmartGameObjectAI', data2=0, ScriptName='' WHERE `entry` BETWEEN 187870 AND 187874;
+SET @Scourge_Cage :=187854;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` BETWEEN 187854 AND 187868;
+DELETE FROM `smart_scripts` WHERE `entryorguid` BETWEEN 187870 AND 187874;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (18785400,18785500,18785600,18785700,18785800,18785900,18786000,18786100,18786200,18786300,18786400,18786500,18786600,18786700,18786800,18787000,18787100,18787200,18787300,18787400);
+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
+-- 187854
+(@Scourge_Cage,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage,1,2,0,61,0,100,0,0,0,0,0,80,@Scourge_Cage*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+(@Scourge_Cage*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject'),
+-- 187855
+(@Scourge_Cage+1,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage+1,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage+1,1,2,0,61,0,100,0,0,0,0,0,80,(@Scourge_Cage+1)*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+((@Scourge_Cage+1)*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject'),
+-- 187856
+(@Scourge_Cage+2,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage+2,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage+2,1,2,0,61,0,100,0,0,0,0,0,80,(@Scourge_Cage+2)*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+((@Scourge_Cage+2)*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject'),
+-- 187857
+(@Scourge_Cage+3,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage+3,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage+3,1,2,0,61,0,100,0,0,0,0,0,80,(@Scourge_Cage+3)*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+((@Scourge_Cage+3)*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject'),
+-- 187858
+(@Scourge_Cage+4,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage+4,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage+4,1,2,0,61,0,100,0,0,0,0,0,80,(@Scourge_Cage+4)*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+((@Scourge_Cage+4)*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject'),
+-- 187859
+(@Scourge_Cage+5,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage+5,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage+5,1,2,0,61,0,100,0,0,0,0,0,80,(@Scourge_Cage+5)*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+((@Scourge_Cage+5)*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject'),
+-- 187860
+(@Scourge_Cage+6,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage+6,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage+6,1,2,0,61,0,100,0,0,0,0,0,80,(@Scourge_Cage+6)*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+((@Scourge_Cage+6)*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject'),
+-- 187861
+(@Scourge_Cage+7,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage+7,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage+7,1,2,0,61,0,100,0,0,0,0,0,80,(@Scourge_Cage+7)*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+((@Scourge_Cage+7)*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject'),
+-- 187862
+(@Scourge_Cage+8,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage+8,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage+8,1,2,0,61,0,100,0,0,0,0,0,80,(@Scourge_Cage+8)*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+((@Scourge_Cage+8)*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject'),
+-- 187863
+(@Scourge_Cage+9,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage+9,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage+9,1,2,0,61,0,100,0,0,0,0,0,80,(@Scourge_Cage+9)*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+((@Scourge_Cage+9)*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject'),
+-- 187864
+(@Scourge_Cage+10,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage+10,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage+10,1,2,0,61,0,100,0,0,0,0,0,80,(@Scourge_Cage+10)*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+((@Scourge_Cage+10)*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject'),
+-- 187865
+(@Scourge_Cage+11,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage+11,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage+11,1,2,0,61,0,100,0,0,0,0,0,80,(@Scourge_Cage+11)*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+((@Scourge_Cage+11)*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject'),
+-- 187866
+(@Scourge_Cage+12,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage+12,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage+12,1,2,0,61,0,100,0,0,0,0,0,80,(@Scourge_Cage+12)*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+((@Scourge_Cage+12)*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject'),
+-- 187867
+(@Scourge_Cage+13,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage+13,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage+13,1,2,0,61,0,100,0,0,0,0,0,80,(@Scourge_Cage+13)*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+((@Scourge_Cage+13)*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject'),
+-- 187868
+(@Scourge_Cage+14,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage+14,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage+14,1,2,0,61,0,100,0,0,0,0,0,80,(@Scourge_Cage+14)*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+((@Scourge_Cage+14)*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject'),
+-- 187870
+(@Scourge_Cage+16,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage+16,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage+16,1,2,0,61,0,100,0,0,0,0,0,80,(@Scourge_Cage+16)*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+((@Scourge_Cage+16)*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject'),
+-- 187871
+(@Scourge_Cage+17,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage+17,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage+17,1,2,0,61,0,100,0,0,0,0,0,80,(@Scourge_Cage+17)*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+((@Scourge_Cage+17)*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject'),
+-- 187872
+(@Scourge_Cage+18,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage+18,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage+18,1,2,0,61,0,100,0,0,0,0,0,80,(@Scourge_Cage+18)*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+((@Scourge_Cage+18)*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject'),
+-- 187873
+(@Scourge_Cage+19,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage+19,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage+19,1,2,0,61,0,100,0,0,0,0,0,80,(@Scourge_Cage+19)*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+((@Scourge_Cage+19)*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject'),
+-- 187874
+(@Scourge_Cage+20,1,0,1,70,0,100,0,2,0,0,0,33,25610,0,0,0,0,0,7,0,0,0,0,0,0,0,'Scourge Cage - Activated - Credit'),
+(@Scourge_Cage+20,1,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,25610,5,0,0,0,0,0,'Scourge Cage - Linked - Set Data To Scourge Prisoner'),
+(@Scourge_Cage+20,1,2,0,61,0,100,0,0,0,0,0,80,(@Scourge_Cage+20)*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Linked - Run Script'),
+((@Scourge_Cage+20)*100,9,0,0,0,0,100,0,65000,65000,65000,65000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Cage - Script - Reset GameObject');
+UPDATE `creature` SET spawntimesecs=0 WHERE id IN(25610);
+UPDATE `creature_template` SET AIName='SmartAI', ScriptName='', unit_flags=768 WHERE entry IN(25610);
+DELETE FROM `smart_scripts` WHERE entryorguid IN(25610);
+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
+(25610,0,0,0,10,0,100,0,1,15,15000,30000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Prisoner - Range - Say 0'),
+(25610,0,1,0,38,0,100,0,1,1,0,0,1,1,5000,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Prisoner - Data Set - Say 1'),
+(25610,0,2,3,52,0,100,0,1,25610,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Prisoner - Data Set - Unseen'),
+(25610,0,3,0,61,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Scourge Prisoner - Linked - Desapwn');
+DELETE FROM `conditions` WHERE SourceTypeOrReferenceId=22 AND SourceEntry=25610;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(22, 1, 25610, 0, 0, 9, 0, 11676, 0, 0, 1, 0, '', 'SAI - Help Text Only if Player in Range Have No Quest');
+DELETE FROM `creature_text` WHERE entry IN(25610);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+(25610, 0, 0, "Don't let them turn me into one of those aberrations!", 12, 0, 100, 1, 0, 0, 'Scourge Prisoner'),
+(25610, 0, 1, "Kill me... Kill me now!", 12, 0, 100, 1, 0, 0, 'Scourge Prisoner'),
+(25610, 0, 2, "Somebody please... Help...", 12, 0, 100, 1, 0, 0, 'Scourge Prisoner'),
+(25610, 0, 3, "Don't let them turn me into one of those aberrations!", 12, 0, 100, 1, 0, 0, 'Scourge Prisoner'),
+(25610, 1, 0, "Freedom at last! I must return to Warsong Hold at once!", 12, 0, 100, 1, 0, 0, 'Scourge Prisoner'),
+(25610, 1, 1, "I am forever indebted to you, friend.", 12, 0, 100, 1, 0, 0, 'Scourge Prisoner'),
+(25610, 1, 2, "Thank you, friend.", 12, 0, 100, 1, 0, 0, 'Scourge Prisoner'),
+(25610, 1, 3, "You have my thanks, stranger.", 12, 0, 100, 1, 0, 0, 'Scourge Prisoner');
+-- STARTUP FIXES:
+DELETE FROM `creature_addon` WHERE `guid`=113585;
+UPDATE `creature` SET `spawndist`=0 WHERE `guid`=109406;
diff --git a/sql/updates/world/2012_11_24_04_world_sai.sql b/sql/updates/world/2012_11_24_04_world_sai.sql
new file mode 100644
index 00000000000..76cf4c18963
--- /dev/null
+++ b/sql/updates/world/2012_11_24_04_world_sai.sql
@@ -0,0 +1,25 @@
+-- Add creature_text entry for the shout
+DELETE FROM `creature_text` WHERE `entry`=23905;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(23905,0,0,'Keep Moving!',14,7,100,0,0,0, 'Major Mills');
+-- Add Smart AI for the quest.
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (23905) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (2390500) 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
+(23905,0,0,0,19,1,100,0,11198,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'Major Mills - On Quest Accept - Say text'),
+(23905,0,1,0,19,1,100,0,11198,0,0,0,80,2390500,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Major Mills: On quest accept call main script'),
+-- After 5 seconds: Summon Guards
+(2390500,9,0,0,1,0,100,0,5000,5000,0,0,12,23900,1,900000,0,0,0,8,0,0,0,-3904.77,-4635.09,9.62735,5.49334, 'Take Down Tethyr: Summon Theramore Marksman'),
+(2390500,9,1,0,1,0,100,0,5000,5000,0,0,12,23900,1,900000,0,0,0,8,0,0,0,-3856.59,-4622.45,9.24753,3.87856, 'Take Down Tethyr: Summon Theramore Marksman'),
+(2390500,9,2,0,1,0,100,0,5000,5000,0,0,12,23900,1,900000,0,0,0,8,0,0,0,-3917.6,-4648.53,9.32604,5.56795, 'Take Down Tethyr: Summon Theramore Marksman'),
+(2390500,9,3,0,1,0,100,0,5000,5000,0,0,12,23900,1,900000,0,0,0,8,0,0,0,-3890.48,-4620.7,9.55527,4.99383, 'Take Down Tethyr: Summon Theramore Marksman'),
+(2390500,9,4,0,1,0,100,0,5000,5000,0,0,12,23900,1,900000,0,0,0,8,0,0,0,-3865.94,-4617.2,9.26262,4.16523, 'Take Down Tethyr: Summon Theramore Marksman'),
+(2390500,9,5,0,1,0,100,0,5000,5000,0,0,12,23900,1,900000,0,0,0,8,0,0,0,-3834.8,-4645.41,9.25827,3.61152, 'Take Down Tethyr: Summon Theramore Marksman'),
+(2390500,9,6,0,1,0,100,0,5000,5000,0,0,12,23900,1,900000,0,0,0,8,0,0,0,-3826.61,-4655.32,9.21484,3.13243, 'Take Down Tethyr: Summon Theramore Marksman'),
+(2390500,9,7,0,1,0,100,0,5000,5000,0,0,12,23900,1,900000,0,0,0,8,0,0,0,-3830.76,-4673.74,9.50962,2.70832, 'Take Down Tethyr: Summon Theramore Marksman'),
+(2390500,9,8,0,1,0,100,0,5000,5000,0,0,12,23900,1,900000,0,0,0,8,0,0,0,-3843.65,-4687.59,9.6436,2.43735, 'Take Down Tethyr: Summon Theramore Marksman'),
+(2390500,9,9,0,1,0,100,0,5000,5000,0,0,12,23900,1,900000,0,0,0,8,0,0,0,-3858.49,-4703.49,9.17411,2.33525, 'Take Down Tethyr: Summon Theramore Marksman'),
+(2390500,9,10,0,1,0,100,0,5000,5000,0,0,12,23900,1,900000,0,0,0,8,0,0,0,-3851.97,-4697.24,9.36834,2.33525, 'Take Down Tethyr: Summon Theramore Marksman'),
+(2390500,9,11,0,1,0,100,0,5000,5000,0,0,12,23900,1,900000,0,0,0,8,0,0,0,-3924.35,-4656.55,9.15409,5.80749, 'Take Down Tethyr: Summon Theramore Marksman'),
+ -- After 8 seconds Summon Tethyr
+(2390500,9,12,0,1,0,100,0,8000,8000,0,0,12,23900,1,900000,0,0,0,8,0,0,0,-3891.03,-4671.17,-1.52,0.74, 'Take Down Tethyr: Summon Tethyr');
diff --git a/sql/updates/world/2012_11_25_00_world_various_fixes.sql b/sql/updates/world/2012_11_25_00_world_various_fixes.sql
new file mode 100644
index 00000000000..3aabc755dde
--- /dev/null
+++ b/sql/updates/world/2012_11_25_00_world_various_fixes.sql
@@ -0,0 +1,89 @@
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Startup Fixes
+DELETE FROM `npc_text` WHERE `ID`=12628;
+INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `prob0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`, `text1_0`, `text1_1`, `lang1`, `prob1`, `em1_0`, `em1_1`, `em1_2`, `em1_3`, `em1_4`, `em1_5`, `text2_0`, `text2_1`, `lang2`, `prob2`, `em2_0`, `em2_1`, `em2_2`, `em2_3`, `em2_4`, `em2_5`, `text3_0`, `text3_1`, `lang3`, `prob3`, `em3_0`, `em3_1`, `em3_2`, `em3_3`, `em3_4`, `em3_5`, `text4_0`, `text4_1`, `lang4`, `prob4`, `em4_0`, `em4_1`, `em4_2`, `em4_3`, `em4_4`, `em4_5`, `text5_0`, `text5_1`, `lang5`, `prob5`, `em5_0`, `em5_1`, `em5_2`, `em5_3`, `em5_4`, `em5_5`, `text6_0`, `text6_1`, `lang6`, `prob6`, `em6_0`, `em6_1`, `em6_2`, `em6_3`, `em6_4`, `em6_5`, `text7_0`, `text7_1`, `lang7`, `prob7`, `em7_0`, `em7_1`, `em7_2`, `em7_3`, `em7_4`, `em7_5`, `WDBVerified`) VALUES
+(12628, '', 'These infants will live. With love and affection they will grow to be strong members of the Horde, and with time the horrible reminders of their shattered lives will fade.', 0, 1, 396, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 12340);
+UPDATE `conditions` SET `ConditionTarget`=0, `ConditionValue1`=47740, `ConditionValue3`=0, `NegativeCondition`=1 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9456 AND `ConditionTypeOrReference`=1;
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 373: The Binding
+UPDATE `creature_template` SET `unit_flags`=`unit_flags`|512 WHERE `entry` IN (5676,5677);
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 1682: Glyph Chasing
+DELETE FROM `gossip_menu` WHERE entry IN (6559,6560,6561);
+INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES
+(6559,7770),
+(6560,7770),
+(6561,7770);
+DELETE FROM `gossip_menu_option` WHERE menu_id IN (6559,6560,6561);
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`) VALUES
+(6559,0,0, '<Use the transcription device to gather a rubbing.>',1,1,0,0,0,0,NULL),
+(6560,0,0, '<Use the transcription device to gather a rubbing.>',1,1,0,0,0,0,NULL),
+(6561,0,0, '<Use the transcription device to gather a rubbing.>',1,1,0,0,0,0,NULL);
+-- Object SAI
+UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry` IN (180453,180454,180455);
+DELETE FROM `smart_scripts` WHERE entryorguid IN (180453,180454,180455) AND `source_type`=1;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`COMMENT`) VALUES
+(180453,1,0,1,62,0,100,0,6561,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'close gossip'),
+(180453,1,1,0,61,0,100,1,0,0,0,0,56,20456,1,0,0,0,0,7,0,0,0,0,0,0,0,'additem 20456'),
+(180454,1,0,1,62,0,100,0,6560,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'close gossip'),
+(180454,1,1,0,61,0,100,1,0,0,0,0,56,20455,1,0,0,0,0,7,0,0,0,0,0,0,0,'additem 20455'),
+(180455,1,0,1,62,0,100,0,6559,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'close gossip'),
+(180455,1,1,0,61,0,100,1,0,0,0,0,56,20454,1,0,0,0,0,7,0,0,0,0,0,0,0,'additem 20454');
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 3068: On Ruby Wings
+-- This will add flying and the abilities to the action bar so the quest is completable using fireball to kill ghouls.
+UPDATE `creature_template` SET `spell1`=50430, `spell2`=55987, `spell3`=50348, `InhabitType`=5 WHERE `entry`=27996;
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 3232: Vengeful Souls
+-- Spawns based on Sniffed Data:
+SET @GUID := 43486;
+DELETE FROM `creature` WHERE `id`=21636;
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+(@GUID+0,21636,530,1,1,0,0,-2898.17,4497.223,-42.86146,2.9147,600,0,0,5914,0,0),
+(@GUID+1,21636,530,1,1,0,0,-3013.516,4510.811,-42.86374,5.009095,600,0,0,5914,0,0),
+(@GUID+2,21636,530,1,1,0,0,-2974.286,4441.98,-47.21168,1.43117,600,0,0,5914,0,0);
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 3608: Seal of Ascension
+-- TODO: The creature skills appear at first 5 slots instead at 1st, 4th, 5th, 6th and 7th as seen in the videos.
+DELETE FROM `conditions` WHERE `SourceEntry`=16053;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,1,16053,0,0,31,0, 3,10321,0,0,0,'','Dominion Of Soul can only target Emberstrife'),
+(17,0,16053,0,0,38,1,10,4,0,0,0,'','Emberstrife''s HP must be 10% or less');
+-- http://old.wowhead.com/npc=10321#abilities
+UPDATE `creature_template` SET `spell1`=0, `spell2`=0, `spell3`=0, `spell4`=16054, `spell5`=9573, `spell6`=8269, `spell7`=40504, `spell8`=0 WHERE `entry`=10321;
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 3656: Hungry Nether Rays
+SET @NPC := 23219;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@NPC;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@NPC;
+DELETE FROM `smart_scripts` WHERE (`entryorguid`=@NPC 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
+(@NPC,0,1,0,25,0,100,1,0,530,0,0,11,32942,2,0,0,0,0,1,0,0,0,0,0,0,0,'Blackwind Warp Chaser - Respawn - Cast Phasing Invisibility'),
+(@NPC,0,2,0,4,0,100,0,0,0,0,0,28,32942,0,0,0,0,0,1,0,0,0,0,0,0,0,'Blackwind Warp Chaser - Aggro - Remove Phasing Invisibility'),
+(@NPC,0,3,0,0,0,100,0,3000,6000,4000,7000,11,32739,0,0,0,0,0,5,0,0,0,0,0,0,0,'Blackwind Warp Chaser - Combat - Cast Venomous Bite'),
+(@NPC,0,4,0,0,0,100,0,12000,15000,20000,40000,11,32920,0,0,0,0,0,2,0,0,0,0,0,0,0,'Blackwind Warp Chaser - Combat - Cast Warp'),
+(@NPC,0,5,0,4,0,100,0,2000,5000,7000,15000,11,37417,1,0,0,0,0,5,0,0,0,0,0,0,0,'Blackwind Warp Chaser - Aggro - Cast Warp Charge'),
+(@NPC,0,6,0,6,0,100,0,0,0,0,0,33,23438,0,0,0,0,0,7,0,0,0,0,0,0,0,'Blackwind Warp Chaser - Death - Credit');
+DELETE FROM `conditions` WHERE SourceTypeOrReferenceId=22 AND SourceEntry IN(@NPC);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(22,7,@NPC,0,0,29,0,23439,15,0,0,0, '', 'SAI Trigger Only If Hungry Nether Ray is near the creature when it dies ');
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 3853: The Restless Dead
+-- Change condition to target right entry of Reanimated Crusader
+UPDATE conditions SET ConditionValue2=30202 WHERE SourceTypeOrReferenceId=13 AND SourceEntry=57806 AND ConditionTypeOrReference=31;
+-- Reanimated Crusader SAI
+SET @Reanimated_Crusader := 30202;
+SET @CreditSpell := 57808;
+SET @HolyWater := 57806;
+-- ?dd SAI for Reanimated Crusader
+UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@Reanimated_Crusader;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Reanimated_Crusader;
+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
+(@Reanimated_Crusader,0,0,1,8,0,100,1,@HolyWater,0,0,0,11,@CreditSpell,0,0,0,0,0,7,0,0,0,0,0,0,0,'Reanimated Crusader - On hit by spell Holy Water - cast Freed Crusader Soul'),
+(@Reanimated_Crusader,0,1,0,61,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Reanimated Crusader - link - force despawn'),
+(@Reanimated_Crusader,0,2,0,0,0,100,0,1000,5000,6500,12000,11,32674,0,0,0,0,0,2,0,0,0,0,0,0,0,'Reanimated Crusader - IC - Cast Avenger"s Shield'),
+(@Reanimated_Crusader,0,3,0,0,0,100,0,5000,10000,8500,20000,11,58154,0,0,0,0,0,2,0,0,0,0,0,0,0,'Reanimated Crusader - IC - Hammer of Injustice'),
+(@Reanimated_Crusader,0,4,0,2,0,100,0,10,90,7000,15000,11,58153,0,0,0,0,0,1,0,0,0,0,0,0,0,'Reanimated Crusader - On health percentage - Cast Unholy Light on self after Hammer of Injustice'),
+(@Reanimated_Crusader,0,5,0,14,0,100,0,1000,20,8000,20000,11,58153,0,0,0,0,0,7,0,0,0,0,0,0,0,'Reanimated Crusader - On friendly HP deficit - Cast Unholy Light on allies');
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
diff --git a/sql/updates/world/2012_11_25_01_world_various_fixes.sql b/sql/updates/world/2012_11_25_01_world_various_fixes.sql
new file mode 100644
index 00000000000..6114451174a
--- /dev/null
+++ b/sql/updates/world/2012_11_25_01_world_various_fixes.sql
@@ -0,0 +1,406 @@
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 4149: Not on my watch / [NPC] Lump
+UPDATE `smart_scripts` SET `event_param2`=3 WHERE `entryorguid`=18351 AND `event_type`=62;
+UPDATE `smart_scripts` SET `event_type`=25 WHERE `entryorguid`=18351 AND `id`=0;
+UPDATE `creature_template` SET `unit_flags`=528 WHERE `entry`=18351;
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 4206: Eliminate the Competition
+SET @NPC_SIGRID := 30086; -- Sigrid Iceborn
+SET @MENUID_SIGRID := 9870;
+SET @NPC_EFREM := 30081; -- Efrem the Faithful
+SET @MENUID_EFREM := 9869;
+SET @NPC_ONUZUN := 30180; -- Onu'zun
+SET @MENUID_ONUZUN := 9878;
+SET @NPC_TINKY := 30162; -- Tinky Wickwhistle
+SET @MENUID_TINKY := 9875;
+UPDATE `creature_template` SET `npcflag`=1,`unit_flags`=33024,`AIName`='SmartAI' WHERE `entry` IN (@NPC_SIGRID,@NPC_EFREM,@NPC_ONUZUN,@NPC_TINKY);
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (@NPC_SIGRID,@NPC_EFREM,@NPC_ONUZUN,@NPC_TINKY);
+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
+-- Sigrid Iceborn
+(@NPC_SIGRID,0,0,0,4,0,100,1,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Set Phase 1 on Aggro'),
+(@NPC_SIGRID,0,1,0,4,1,100,1,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving on Aggro'),
+(@NPC_SIGRID,0,2,0,4,1,100,1,0,0,0,0,11,61168,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Throw on Aggro'),
+(@NPC_SIGRID,0,3,0,9,1,100,0,5,30,3500,4100,11,61168,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Throw'),
+(@NPC_SIGRID,0,4,0,9,1,100,0,30,100,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Start Moving when not in Throw Range'),
+(@NPC_SIGRID,0,5,0,9,1,100,0,9,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving at 15 Yards'),
+(@NPC_SIGRID,0,6,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Start Moving when not in Throw Range'),
+(@NPC_SIGRID,0,7,0,9,1,100,0,5,30,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving when in Throw Range'),
+(@NPC_SIGRID,0,8,0,0,1,100,0,3000,7000,13000,16700,11,61164,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Impale'),
+(@NPC_SIGRID,0,9,0,13,1,100,0,12000,18000,0,0,11,57635,0,0,0,0,0,6,1,0,0,0,0,0,0,'Cast Disengage on Target Spellcast'),
+(@NPC_SIGRID,0,10,0,1,0,100,0,500,1000,600000,600000,11,61165,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Frostbite Weapon on Spawn'),
+(@NPC_SIGRID,0,11,12,62,0,100,0,@MENUID_SIGRID,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'On gossip select - Close gossip'),
+(@NPC_SIGRID,0,12,13,61,0,100,0,0,0,0,0,42,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Set invincible'),
+(@NPC_SIGRID,0,13,14,61,0,100,0,0,0,0,0,19,768,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Remove flags 256+512'),
+(@NPC_SIGRID,0,14,15,61,0,100,0,0,0,0,0,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Set faction hostile'),
+(@NPC_SIGRID,0,15,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Talk'),
+(@NPC_SIGRID,0,16,17,2,0,100,0,0,1,0,0,33,@NPC_SIGRID,0,0,0,0,0,7,0,0,0,0,0,0,0,'On 1 hp - Give killcredit'),
+(@NPC_SIGRID,0,17,18,61,0,100,0,0,0,0,0,2,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Restore faction'),
+(@NPC_SIGRID,0,18,19,61,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Talk'),
+(@NPC_SIGRID,0,19,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Evade'),
+-- Efrem the Faithful
+(@NPC_EFREM,0,0,0,1,0,100,0,500,1000,600000,600000,11,17232,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Devotion Aura on Spawn'),
+(@NPC_EFREM,0,1,0,2,0,100,1,0,50,0,0,11,17233,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Lay on Hands at 50% HP'),
+(@NPC_EFREM,0,2,0,0,0,100,0,3300,5500,16000,17600,11,14518,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Crusader Strike'),
+(@NPC_EFREM,0,3,0,0,0,80,0,9900,9900,21000,32000,11,13005,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Hammer of Justice'),
+(@NPC_EFREM,0,4,5,62,0,100,0,@MENUID_EFREM,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'On gossip select - Close gossip'),
+(@NPC_EFREM,0,5,6,61,0,100,0,0,0,0,0,42,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Set invincible'),
+(@NPC_EFREM,0,6,7,61,0,100,0,0,0,0,0,19,768,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Remove flags 256+512'),
+(@NPC_EFREM,0,7,8,61,0,100,0,0,0,0,0,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Set faction hostile'),
+(@NPC_EFREM,0,8,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Talk'),
+(@NPC_EFREM,0,9,10,2,0,100,0,0,1,0,0,33,@NPC_EFREM,0,0,0,0,0,7,0,0,0,0,0,0,0,'On 1 hp - Give killcredit'),
+(@NPC_EFREM,0,10,11,61,0,100,0,0,0,0,0,2,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Restore faction'),
+(@NPC_EFREM,0,11,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Evade'),
+-- Onu'zun
+(@NPC_ONUZUN,0,0,0,4,0,100,1,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Set Phase 1 on Aggro'),
+(@NPC_ONUZUN,0,1,0,4,1,100,1,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving on Aggro'),
+(@NPC_ONUZUN,0,2,0,4,1,100,1,0,0,0,0,11,15242,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast bolt on Aggro'),
+(@NPC_ONUZUN,0,3,0,9,1,100,0,0,40,3400,4700,11,15242,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast bolt'),
+(@NPC_ONUZUN,0,4,0,9,1,100,0,40,100,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Start Moving when not in bolt Range'),
+(@NPC_ONUZUN,0,5,0,9,1,100,0,10,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving at 15 Yards'),
+(@NPC_ONUZUN,0,6,0,9,1,100,0,0,40,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving when in bolt Range'),
+(@NPC_ONUZUN,0,7,0,3,1,100,0,0,15,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Set Phase 2 at 15% Mana'),
+(@NPC_ONUZUN,0,8,0,3,2,100,0,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Start Moving at 15% Mana'),
+(@NPC_ONUZUN,0,9,0,3,2,100,0,30,100,100,100,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Set Phase 1 When Mana is above 30%'),
+(@NPC_ONUZUN,0,10,0,1,0,100,0,500,1000,600000,600000,11,18100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Frost Armor on Spawn'),
+(@NPC_ONUZUN,0,11,0,13,0,100,0,12000,18000,0,0,11,15122,0,0,0,0,0,6,1,0,0,0,0,0,0,'Cast Counterspell on Target Spellcast'),
+(@NPC_ONUZUN,0,12,0,0,1,100,0,5000,5000,14500,17800,11,15244,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Cone of Cold'),
+(@NPC_ONUZUN,0,13,14,62,0,100,0,@MENUID_ONUZUN,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'On gossip select - Close gossip'),
+(@NPC_ONUZUN,0,14,15,61,0,100,0,0,0,0,0,42,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Set invincible'),
+(@NPC_ONUZUN,0,15,16,61,0,100,0,0,0,0,0,19,768,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Remove flags 256+512'),
+(@NPC_ONUZUN,0,16,17,61,0,100,0,0,0,0,0,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Set faction hostile'),
+(@NPC_ONUZUN,0,17,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Talk'),
+(@NPC_ONUZUN,0,18,19,2,0,100,0,0,1,0,0,33,@NPC_ONUZUN,0,0,0,0,0,7,0,0,0,0,0,0,0,'On 1 hp - Give killcredit'),
+(@NPC_ONUZUN,0,19,20,61,0,100,0,0,0,0,0,2,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Restore faction'),
+(@NPC_ONUZUN,0,20,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Evade'),
+-- Tinky Wickwhistle
+(@NPC_TINKY,0,0,0,0,0,100,0,7000,8000,15600,17800,11,61552,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Wrench Strike'),
+(@NPC_TINKY,0,1,0,0,0,100,0,13000,14000,21300,23400,11,37666,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Heavy Dynamite'),
+(@NPC_TINKY,0,2,3,62,0,100,0,@MENUID_TINKY,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'On gossip select - Close gossip'),
+(@NPC_TINKY,0,3,4,61,0,100,0,0,0,0,0,42,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Set invincible'),
+(@NPC_TINKY,0,4,5,61,0,100,0,0,0,0,0,19,768,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Remove flags 256+512'),
+(@NPC_TINKY,0,5,6,61,0,100,0,0,0,0,0,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Set faction hostile'),
+(@NPC_TINKY,0,6,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Talk'),
+(@NPC_TINKY,0,7,8,2,0,100,0,0,1,0,0,33,@NPC_TINKY,0,0,0,0,0,7,0,0,0,0,0,0,0,'On 1 hp - Give killcredit'),
+(@NPC_TINKY,0,8,9,61,0,100,0,0,0,0,0,2,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Restore faction'),
+(@NPC_TINKY,0,9,10,61,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Talk'),
+(@NPC_TINKY,0,10,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Evade');
+DELETE FROM `creature_text` WHERE `entry` IN (@NPC_SIGRID,@NPC_EFREM,@NPC_ONUZUN,@NPC_TINKY);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@NPC_SIGRID,0,0,'Taste my steel, little $g boy : girl;!',12,0,100,0,0,0,'say'),
+(@NPC_SIGRID,1,0,'You fight well, little one. I am bested for now. We will meet again I assure you. When we do I will be better prepared!',12,0,100,66,0,0,'say'),
+(@NPC_EFREM,0,0,'You dare to touch ME?! You won''t keep me from proving myself to the Lich King!',12,0,100,0,0,0,'say'),
+(@NPC_ONUZUN,0,0,'Onu''zun gonna kill you dead!',12,0,100,0,0,0,'say'),
+(@NPC_TINKY,0,0,'Grrrrrrrr! I''ll kneecap ya!',12,0,100,0,0,0,'say'),
+(@NPC_TINKY,1,0,'WHEE!!!',12,0,100,0,0,0,'say');
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 4252: Bringing Down the Iron Thane
+SET @Thane := 26405;
+SET @Anvil := 26406;
+SET @Guid := 43467;
+SET @Script := 2640600;
+SET @Golem := 29005;
+-- Add missing spawns
+DELETE FROM `creature` WHERE `id`=@Thane;
+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
+(@Guid,@Thane ,571,1,1,0,1419,3317.76,-5112.08,300.462,1.78269,300,0,0,12762,3561,0,0,0,0); -- spawn NPC if there isn't, GUID is random
+-- SAI for Thane
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@Thane;
+UPDATE `creature_template` SET `AIName`='SmartAI',`faction_A`=1954,`faction_H`=1954 WHERE `entry`=@Thane ;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@Thane,@Script);
+INSERT INTO `smart_scripts` VALUES
+(@Thane,0,0,0,38,0,100,0,0,1,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'Thane - On data set 0 1 - Run timed action list'),
+(@Thane,0,1,0,1,0,100,0,0,0,20000,20000,75,47922,0,0,0,0,0,1,0,0,0,0,0,0,0,'Iron Thane - OOC - Add Aura'),
+(@Thane,0,2,0,0,0,100,0,5000,9000,10000,14000,11,61575,0,0,0,0,0,2,0,0,0,0,0,0,0,'Iron Thane - IC - Cast Furyhammer'),
+(@Thane,0,3,0,6,0,100,0,0,0,0,0,28,47923,0,0,0,0,0,19,@Anvil,30,0,0,0,0,0,'Thane - Script action 3 - Remove stun aura from Avil'),
+-- Script 0 for Thane
+(@Script,9,0,0,0,0,100,0,0,0,0,0,75,47923,0,0,0,0,0,19,@Anvil,30,0,0,0,0,0,'Thane - Script action 0 - Add aura stunned to Anvil'),
+(@Script,9,1,0,0,0,100,0,500,500,0,0,28,47922,0,0,0,0,0,1,0,0,0,0,0,0,0,'Thane - Script action 1 - Remove inurnable aura from self'),
+(@Script,9,2,0,0,0,100,0,0,0,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Thane - Script action 2 - Data set 0 0'),
+(@Script,9,3,0,0,0,100,0,14500,14500,0,0,28,47923,0,0,0,0,0,19,@Anvil,30,0,0,0,0,0,'Thane - Script action 3 - Remove stun aura from Avil');
+-- Add SAI for Anvil
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@Anvil;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Anvil;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Anvil;
+INSERT INTO `smart_scripts` VALUES
+(@Anvil,0,0,0,8,0,100,0,47911,0,0,0,45,0,1,0,0,0,0,19,@Thane,30,0,0,0,0,0,'Anvil - on Spell hit - Data set 0 1 on Thane'),
+(@Anvil,0,1,0,0,0,100,0,5000,7500,1200,14500,11,61577,0,0,0,0,0,2,0,0,0,0,0,0,0,'Anvil - IC - Cast Molten Blast');
+-- Add npc_spellclick_spells
+UPDATE `creature_template` SET `VehicleId`=149,`spell1`=61380,`spell2`=47911 WHERE `entry`=@Golem;
+DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=@Golem;
+INSERT INTO `npc_spellclick_spells` (`npc_entry`,`spell_id`,`cast_flags`,`user_type`) VALUES
+(@Golem,60944,1,0);
+-- Add conditions for npc_spellclick_spells
+DELETE FROM `conditions` WHERE `SourceGroup`=@Golem AND `SourceTypeOrReferenceId`=18;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(18,@Golem,60944,0,1,9,0,12199,0,0,0,0,'', 'Player must be on quest 12199'),
+(18,@Golem,60944,0,2,9,0,12153,0,0,0,0,'', 'Player must be on quest 12153');
+-- Add conditions EMP to hit Anvil /for new condition system/
+DELETE FROM `conditions` WHERE `SourceEntry`=47911 AND `SourceTypeOrReferenceId`=13;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,1,47911,0,0,31,0,3,@Anvil,0,0,0,'', 'EMP can hit only Anvil /rewritten condition/');
+-- Add conditions EMP to cast only, if in 10 yards to anvil
+DELETE FROM `conditions` WHERE `SourceEntry`=47911 AND `SourceTypeOrReferenceId`=17;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(17,0,47911,0,0,29,0,@Anvil,10,0,0,0,'', 'EMP can cast, if in 10 yards of Anvil');
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 4888: Event after finishing The Dragonforged Hilt quest chain
+SET @NPC_MYRALION_SUNBLAZE := 36642;
+SET @NPC_CALADIS_BRIGHTSPEAR := 36624;
+SET @NPC_SUNREAVER_WAR_MAGE := 36657;
+SET @NPC_SILVER_COVENANT_SENTINEL := 36656;
+SET @NPC_IMAGE_OF_ALEXTRASZA := 37829;
+SET @NPC_IMAGE_OF_ANASTERIAN := 37844;
+SET @NPC_IMAGE_OF_THALORIEN := 37828;
+SET @NPC_IMAGE_OF_MORLEN := 37845;
+SET @NPC_BLOOD_QUEEN_LANA_THEL := 37846;
+SET @NPC_QUELDELAR_DUMMY := 37852;
+SET @SPELL_FREEZE_GUARDS := 71365;
+SET @SPELL_ICY_TOUCH_TRIGGER := 70589;
+SET @SPELL_ICY_TOUCH_EFFECT := 70592;
+SET @SPELL_THROW_SWORD := 70586;
+SET @SPELL_EXPLOSION_DUMMY := 70000; -- Not OK!!
+SET @EMOTE_TALK := 1;
+SET @EMOTE_BOW := 2;
+SET @EMOTE_QUESTION := 6;
+SET @EMOTE_KNEE := 16;
+SET @EMOTE_POINT := 25;
+SET @EMOTE_STAND := 26;
+SET @EMOTE_YES := 273;
+SET @EMOTE_1H := 375;
+SET @EMOTE_2H := 425;
+SET @ITEM_QUELDELAR := 49767;
+SET @DATA_CUSTOM_ACTION := 50;
+SET @DATA_DESPAWN_ACTION := 41;
+SET @WP_MYRALION := @NPC_MYRALION_SUNBLAZE;
+SET @WP_CALADIS := @NPC_CALADIS_BRIGHTSPEAR;
+SET @WP_THALORIEN := @NPC_IMAGE_OF_THALORIEN;
+SET @WP_MORLEN := @NPC_IMAGE_OF_MORLEN;
+SET @WP_BLOOD_QUEEN_1 := @NPC_BLOOD_QUEEN_LANA_THEL*100;
+SET @WP_BLOOD_QUEEN_2 := @NPC_BLOOD_QUEEN_LANA_THEL*100+1;
+SET @WP_GUARD_A_1 := @NPC_SILVER_COVENANT_SENTINEL*100;
+SET @WP_GUARD_A_2 := @NPC_SILVER_COVENANT_SENTINEL*100+1;
+SET @WP_GUARD_H_1 := @NPC_SUNREAVER_WAR_MAGE*100;
+SET @WP_GUARD_H_2 := @NPC_SUNREAVER_WAR_MAGE*100+1;
+SET @QUEST_RETURN_CALADIS_BRIGHTSPEAR := 24454;
+SET @QUEST_RETURN_MYRALION_SUNBLAZE := 24558;
+-- Set images as non-selectables
+UPDATE `creature_template` SET `unit_flags`=`unit_flags`|33554432 WHERE `entry` IN (@NPC_IMAGE_OF_ALEXTRASZA,@NPC_IMAGE_OF_ANASTERIAN,@NPC_IMAGE_OF_THALORIEN,@NPC_IMAGE_OF_MORLEN);
+-- Set Lana'thel as enemy and set OOC_NON_ATTACKABLE
+UPDATE `creature_template` SET `faction_A`=16,`faction_H`=16,`unit_flags`=`unit_flags`|256 WHERE `entry`=@NPC_BLOOD_QUEEN_LANA_THEL;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=@SPELL_THROW_SWORD;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(17,0,@SPELL_THROW_SWORD,0,18,1,@NPC_QUELDELAR_DUMMY,0,0,'', "Throw Quel'delar on Quel'delar skull");
+-- Set Morlen Coldgrip mount
+DELETE FROM `creature_template_addon` WHERE (`entry`=@NPC_IMAGE_OF_MORLEN);
+INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@NPC_IMAGE_OF_MORLEN,0,25280,0,0,0,"");
+-- Set AInames
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@NPC_CALADIS_BRIGHTSPEAR,@NPC_MYRALION_SUNBLAZE,@NPC_SILVER_COVENANT_SENTINEL,@NPC_SUNREAVER_WAR_MAGE,@NPC_IMAGE_OF_ALEXTRASZA,@NPC_IMAGE_OF_ANASTERIAN,@NPC_IMAGE_OF_THALORIEN,@NPC_IMAGE_OF_MORLEN,@NPC_BLOOD_QUEEN_LANA_THEL,@NPC_QUELDELAR_DUMMY);
+DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (@NPC_MYRALION_SUNBLAZE,@NPC_CALADIS_BRIGHTSPEAR,@NPC_IMAGE_OF_ALEXTRASZA,@NPC_IMAGE_OF_ANASTERIAN,@NPC_IMAGE_OF_THALORIEN,@NPC_IMAGE_OF_MORLEN,@NPC_BLOOD_QUEEN_LANA_THEL,@NPC_QUELDELAR_DUMMY) AND `source_type`=0);
+DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (@NPC_MYRALION_SUNBLAZE*100,@NPC_SILVER_COVENANT_SENTINEL*100,@NPC_BLOOD_QUEEN_LANA_THEL*100,@NPC_BLOOD_QUEEN_LANA_THEL*100+1) AND `source_type`=9);
+DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (-202775,-202776,-202777,-202778) 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
+-- Image of Alextrasza
+(@NPC_IMAGE_OF_ALEXTRASZA,0,0,0,38,0,100,0,@EMOTE_TALK,0,0,0,5,@EMOTE_TALK,0,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Alexstrasza (at Quel'delar rest) - Emote Talk on Data Set"),
+(@NPC_IMAGE_OF_ALEXTRASZA,0,1,0,38,0,100,0,@EMOTE_POINT,0,0,0,5,@EMOTE_POINT,0,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Alexstrasza (at Quel'delar rest) - Emote Point on Data Set"),
+(@NPC_IMAGE_OF_ALEXTRASZA,0,2,0,38,0,100,0,@DATA_CUSTOM_ACTION ,0,0,0,66,0,0,0,0,0,0,19,@NPC_IMAGE_OF_THALORIEN,0,0,0,0,0,0,"Image of Alexstrasza (at Quel'delar rest) - Set Orientation on Data Set"),
+(@NPC_IMAGE_OF_ALEXTRASZA,0,3,0,38,0,100,0,@DATA_DESPAWN_ACTION,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Alexstrasza (at Quel'delar rest) - Despawn on Data Set"),
+-- Image of Anasterian
+(@NPC_IMAGE_OF_ANASTERIAN,0,0,0,38,0,100,0,@EMOTE_TALK,0,0,0,5,@EMOTE_TALK,0,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Anasterian (at Quel'delar rest) - Emote talk on Data Set"),
+(@NPC_IMAGE_OF_ANASTERIAN,0,1,0,38,0,100,0,@EMOTE_BOW,0,0,0,5,@EMOTE_BOW,0,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Anasterian (at Quel'delar rest) - Emote bow on Data Set"),
+(@NPC_IMAGE_OF_ANASTERIAN,0,2,0,38,0,100,0,@EMOTE_POINT,0,0,0,5,@EMOTE_POINT,0,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Anasterian (at Quel'delar rest) - Emote point on Data Set"),
+(@NPC_IMAGE_OF_ANASTERIAN,0,3,0,38,0,100,0,@EMOTE_YES,0,0,0,5,@EMOTE_YES,0,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Anasterian (at Quel'delar rest) - Emote yes on Data Set"),
+(@NPC_IMAGE_OF_ANASTERIAN,0,4,0,38,0,100,0,@DATA_CUSTOM_ACTION ,0,0,0,66,0,0,0,0,0,0,19,@NPC_IMAGE_OF_THALORIEN,0,0,0,0,0,0,"Image of Anasterian (at Quel'delar rest) - Set Orientation"),
+(@NPC_IMAGE_OF_ANASTERIAN,0,5,0,38,0,100,0,@DATA_DESPAWN_ACTION,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Anasterian (at Quel'delar rest) - Despawn on data set"),
+-- Image of Thalorien Dawnseeker
+(@NPC_IMAGE_OF_THALORIEN,0,0,0,38,0,100,1,@DATA_CUSTOM_ACTION,0,0,0,53,0,@WP_THALORIEN,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Thalorien Dawnseeker (at Quel'Delar rest) - Move to position on Data set"),
+(@NPC_IMAGE_OF_THALORIEN,0,1,0,38,0,100,1,@EMOTE_BOW,0,0,0,5,@EMOTE_BOW,0,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Thalorien Dawnseeker (at Quel'Delar rest) - Emote Bow on Data Set"),
+(@NPC_IMAGE_OF_THALORIEN,0,2,0,38,0,100,1,@EMOTE_KNEE,0,0,0,5,@EMOTE_KNEE,0,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Thalorien Dawnseeker (at Quel'Delar rest) - Emote Knee on Data Set"),
+(@NPC_IMAGE_OF_THALORIEN,0,3,4,38,0,100,1,@EMOTE_1H,0,0,0,71,0,0,@ITEM_QUELDELAR,0,0,0,1,0,0,0,0,0,0,0,"Image of Thalorien Dawnseeker (at Quel'Delar rest) - Equip Sword Data Set"),
+(@NPC_IMAGE_OF_THALORIEN,0,4,0,61,0,100,1,0,0,0,0,17,@EMOTE_1H,0,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Thalorien Dawnseeker (at Quel'Delar rest) - EmoteState 2H on Data Set"),
+(@NPC_IMAGE_OF_THALORIEN,0,5,0,38,0,100,1,@DATA_DESPAWN_ACTION,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Thalorien Dawnseeker (at Quel'Delar rest) - Desapwn at data set"),
+(@NPC_IMAGE_OF_THALORIEN,0,6,0,38,0,100,1,@DATA_CUSTOM_ACTION+1,0,0,0,71,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Thalorien Dawnseeker (at Quel'Delar rest) - Show now weapon"),
+-- Image of Morlen Coldgrip
+(@NPC_IMAGE_OF_MORLEN,0,0,0,34,0,100,1,0,1,0,0,54,4000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Morlen Coldgrip - Pause WP on 1st point"),
+(@NPC_IMAGE_OF_MORLEN,0,1,0,34,0,100,1,0,2,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Morlen Coldgrip - Despawn on last WP"),
+(@NPC_IMAGE_OF_MORLEN,0,2,0,54,0,100,1,0,2,0,0,53,0,@WP_MORLEN,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Morlen Coldgrip - Start WP on spawn"),
+-- Blood-Queen Lana'thel
+(@NPC_BLOOD_QUEEN_LANA_THEL,0,0,0,54,0,100,1,0,0,0,0,53,0,@WP_BLOOD_QUEEN_1,0,0,0,0,1,0,0,0,0,0,0,0,"Blood Quen Lana'thel (at Quel'delar rest) - Start WP on spawn"),
+(@NPC_BLOOD_QUEEN_LANA_THEL,0,1,2,40,0,100,1,1,@WP_BLOOD_QUEEN_1,0,0,80,@NPC_BLOOD_QUEEN_LANA_THEL*100+0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Blood Quen Lana'thel (at Quel'delar rest) - Start first part of timed event when reached first point"),
+(@NPC_BLOOD_QUEEN_LANA_THEL,0,2,0,61,0,100,0,0,0,0,0,66,0,0,0,0,0,0,19,@NPC_QUELDELAR_DUMMY,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Face to invisible dummy"),
+(@NPC_BLOOD_QUEEN_LANA_THEL,0,3,0,40,0,100,1,2,@WP_BLOOD_QUEEN_2,0,0,80,@NPC_BLOOD_QUEEN_LANA_THEL*100+1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Blood Quen Lana'thel (at Quel'delar rest) - Start second timed event when reached second point"),
+(@NPC_QUELDELAR_DUMMY,0,1,0,8,0,100,0,@SPELL_THROW_SWORD,0,0,0,11,@SPELL_EXPLOSION_DUMMY,1,0,0,0,0,1,0,0,0,0,0,0,0,"Quel'delar dummy (at Quel'delar rest) - Cast shadow explosion when hitten by sword"),
+-- Blood-Queen Lana'thel 1st action list
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,0,0,0,0,100,1,3000,3000,0,0,45,@DATA_CUSTOM_ACTION,0,0,0,0,0,9,@NPC_SILVER_COVENANT_SENTINEL,0,20,0,0,0,0,"Blood Quen Lana'thel (at Quel'Delar rest) - Make guards attack her"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,1,0,0,0,100,1,0,0,0,0,45,@DATA_CUSTOM_ACTION,0,0,0,0,0,9,@NPC_SUNREAVER_WAR_MAGE,0,20,0,0,0,0,"Blood Quen Lana'thel (at Quel'Delar rest) - Make guards attack her"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,2,0,0,0,100,1,3000,3000,0,0,1,1,0,0,0,0,0,1,0,0,20,0,0,0,0,"Blood Quen Lana'thel (at Quel'Delar rest) - Say 1"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,3,0,0,0,100,1,3000,3000,0,0,11,@SPELL_FREEZE_GUARDS,0,0,0,0,0,1,0,0,20,0,0,0,0,"Blood Quen Lana'thel (at Quel'Delar rest) - Cast Freeze Guards"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,4,0,0,0,100,1,0,0,0,0,45,@DATA_CUSTOM_ACTION+1,0,0,0,0,0,9,@NPC_SILVER_COVENANT_SENTINEL,0,20,0,0,0,0,"Blood Quen Lana'thel (at Quel'Delar rest) - Freeze guards"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,5,0,0,0,100,1,0,0,0,0,45,@DATA_CUSTOM_ACTION+1,0,0,0,0,0,9,@NPC_SUNREAVER_WAR_MAGE,0,20,0,0,0,0,"Blood Quen Lana'thel (at Quel'Delar rest) - Freeze guards"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,6,0,0,0,100,1,500,500,0,0,1,2,0,0,0,0,0,1,0,0,20,0,0,0,0,"Blood Quen Lana'thel (at Quel'Delar rest) - Say 2"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,7,0,0,0,100,1,4000,4000,0,0,1,3,0,0,0,0,0,1,0,0,20,0,0,0,0,"Blood Quen Lana'thel (at Quel'Delar rest) - Say 3"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,8,0,0,0,100,1,0,0,0,0,12,@NPC_IMAGE_OF_ALEXTRASZA,8,0,0,0,0,8,0,0,0,8120.65,780.068,481.87,6.14516,"Blood Queen Lana'thel (at Quel'Delar rest) - Summon Alextrasza"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,9,0,0,0,100,1,0,0,0,0,12,@NPC_IMAGE_OF_ANASTERIAN,8,0,0,0,0,8,0,0,0,8123.63,780.044,482.066,3.10017,"Blood Queen Lana'thel (at Quel'Delar rest) - Summon Anasterian"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,10,0,0,0,100,1,500,500,0,0,45,@EMOTE_POINT,0,0,0,0,0,19,@NPC_IMAGE_OF_ALEXTRASZA,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Call point talk on Alextrasza"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,11,0,0,0,100,1,100,100,0,0,45,@EMOTE_TALK,0,0,0,0,0,19,@NPC_IMAGE_OF_ALEXTRASZA,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Call emote talk on Alextrasza"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,12,0,0,0,100,1,4000,4000,0,0,5,@EMOTE_POINT,0,0,0,0,0,1,0,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Emote Point"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,13,0,0,0,100,1,0,0,0,0,45,@EMOTE_BOW,0,0,0,0,0,19,@NPC_IMAGE_OF_ANASTERIAN,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Call emote bow on Anasterian"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,14,0,0,0,100,1,2000,2000,0,0,45,@EMOTE_TALK,0,0,0,0,0,19,@NPC_IMAGE_OF_ALEXTRASZA,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Call emote talk on Alextrasza"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,15,0,0,0,100,1,2000,2000,0,0,45,@EMOTE_YES,0,0,0,0,0,19,@NPC_IMAGE_OF_ANASTERIAN,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Call emote yes on Anasterian"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,16,0,0,0,100,1,2000,2000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Say 4"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,17,0,0,0,100,1,0,0,0,0,12,@NPC_IMAGE_OF_THALORIEN,8,0,0,0,0,8,0,0,0,8125.07,773.643,482.395,1.72804,"Blood Queen Lana'thel (at Quel'Delar rest) - Summon Thalorien"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,18,0,0,0,100,1,500,500,0,0,45,@DATA_CUSTOM_ACTION,0,0,0,0,0,19,@NPC_IMAGE_OF_ALEXTRASZA,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Call set facing to Thalorien on Alextrasza"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,19,0,0,0,100,1,0,0,0,0,45,@DATA_CUSTOM_ACTION,0,0,0,0,0,19,@NPC_IMAGE_OF_ANASTERIAN,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Call set facing to Thalorien on Anasterian"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,20,0,0,0,100,1,1000,1000,0,0,45,@DATA_CUSTOM_ACTION,0,0,0,0,0,19,@NPC_IMAGE_OF_THALORIEN,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Call Thalorien Move"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,21,0,0,0,100,1,3000,3000,0,0,45,@EMOTE_TALK,0,0,0,0,0,19,@NPC_IMAGE_OF_ANASTERIAN,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Call Emote Talk on Anastarian"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,22,0,0,0,100,1,1000,1000,0,0,45,@EMOTE_BOW,0,0,0,0,0,19,@NPC_IMAGE_OF_THALORIEN,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Call Emote Bow on Thalorien"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,23,0,0,0,100,1,1000,1000,0,0,45,@EMOTE_POINT,0,0,0,0,0,19,@NPC_IMAGE_OF_ANASTERIAN,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Call Emote point on Anastarian"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,24,0,0,0,100,1,1000,1000,0,0,45,@EMOTE_KNEE,0,0,0,0,0,19,@NPC_IMAGE_OF_THALORIEN,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Call Emote Knee on Thalorien"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,25,0,0,0,100,1,1000,1000,0,0,45,@DATA_DESPAWN_ACTION,0,0,0,0,0,19,@NPC_IMAGE_OF_ALEXTRASZA,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Despawn Alextrasza"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,26,0,0,0,100,1,1000,1000,0,0,45,@DATA_DESPAWN_ACTION,0,0,0,0,0,19,@NPC_IMAGE_OF_ANASTERIAN,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Despawn Anastarian"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,27,0,0,0,100,1,1000,1000,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Say 5"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,28,0,0,0,100,1,3000,3000,0,0,45,@EMOTE_1H,0,0,0,0,0,19,@NPC_IMAGE_OF_THALORIEN,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Call emote 2h on Thalorien"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,29,0,0,0,100,1,4000,4000,0,0,12,@NPC_IMAGE_OF_MORLEN,8,0,0,0,0,8,0,0,0,8119.94,787.208,481.39,5.00233,"Blood Queen Lana'thel (at Quel'Delar rest) - Summon Morlen Coldgrip"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,30,0,0,0,100,1,2000,2000,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Say 6"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,31,0,0,0,100,1,2000,2000,0,0,86,@SPELL_ICY_TOUCH_TRIGGER,0,19,@NPC_IMAGE_OF_MORLEN,0,0,1,0,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Call cast of Morlen Coldgrip on Thalorien (dummy)"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,32,0,0,0,100,1,1000,1000,0,0,86,@SPELL_ICY_TOUCH_EFFECT,0,19,@NPC_IMAGE_OF_THALORIEN,0,0,1,0,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Call cast of Thalorien (insta self kill)"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+0,9,33,0,0,0,100,1,4000,4000,0,0,53,0,@WP_BLOOD_QUEEN_2,0,0,0,0,1,0,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Move to next event point"),
+-- Blood-Queen Lana'thel 2nd action list
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+1,9,0,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,19,@NPC_IMAGE_OF_THALORIEN,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Set facing to Thalorien"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+1,9,1,0,0,0,100,0,2000,2000,0,0,1,7,0,0,0,0,0,1,0,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Say 7"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+1,9,2,0,0,0,100,0,1000,1000,0,0,71,0,0,@ITEM_QUELDELAR,0,0,0,1,0,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Equip Sword"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+1,9,3,0,0,0,100,0,0,0,0,0,45,@DATA_CUSTOM_ACTION+1,0,0,0,0,0,19,@NPC_IMAGE_OF_THALORIEN,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Set no weapon visible on Thalorien"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+1,9,4,0,0,0,100,0,7000,7000,0,0,40,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Set no weapon visible"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+1,9,5,0,0,0,100,0,0,0,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Emote Talk"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+1,9,6,0,0,0,100,0,6000,6000,0,0,1,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Say 8"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+1,9,7,0,0,0,100,0,8000,8000,0,0,1,9,0,0,0,0,0,1,0,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Say 9"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+1,9,8,0,0,0,100,0,8000,8000,0,0,1,10,0,0,0,0,0,1,0,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Say 10"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+1,9,9,0,0,0,100,0,5000,5000,0,0,11,@SPELL_THROW_SWORD,0,0,0,0,0,19,@NPC_QUELDELAR_DUMMY,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Cast some spell on invisible dummy"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+1,9,10,0,0,0,100,0,4000,4000,0,0,1,11,0,0,0,0,0,1,0,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Say 11"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+1,9,11,0,0,0,100,0,5000,5000,0,0,45,@DATA_CUSTOM_ACTION,0,0,0,0,0,7,0,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Call reset on the summoner"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+1,9,12,0,0,0,100,1,0,0,0,0,45,@DATA_CUSTOM_ACTION+2,0,0,0,0,0,9,@NPC_SILVER_COVENANT_SENTINEL,0,20,0,0,0,0,"Blood Quen Lana'thel (at Quel'Delar rest) - Unfreeze guards"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+1,9,13,0,0,0,100,1,0,0,0,0,45,@DATA_CUSTOM_ACTION+2,0,0,0,0,0,9,@NPC_SUNREAVER_WAR_MAGE,0,20,0,0,0,0,"Blood Quen Lana'thel (at Quel'Delar rest) - Unfreeze guards"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+1,9,14,0,0,0,100,0,0,0,0,0,45,@DATA_DESPAWN_ACTION,0,0,0,0,0,19,@NPC_IMAGE_OF_THALORIEN,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'elar rest) - Call despawn on Thalorien"),
+(@NPC_BLOOD_QUEEN_LANA_THEL*100+1,9,15,0,0,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Blood Queen Lana'thel (at Quel'Delar rest) - Despawn self"),
+-- Silver Covenant Guards
+(-202776,0,0,1,38,0,100,0,@DATA_CUSTOM_ACTION,0,0,0,53,1,@WP_GUARD_A_1,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Start movement on data set"),
+(-202776,0,1,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Set phase 1"),
+(-202776,0,2,3,40,1,100,0,1,0,0,0,66,0,0,0,0,0,0,19,@NPC_BLOOD_QUEEN_LANA_THEL,0,0,0,0,0,0,"Silver Covenant Sentinel - Set facing to Lana'thel on reach point"),
+(-202776,0,3,4,61,1,100,0,0,0,0,0,17,@EMOTE_2H,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Set attack state"),
+(-202776,0,4,5,61,1,100,0,0,0,0,0,55,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Stop WP"),
+(-202776,0,5,12,61,1,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Set Phase 2"),
+(-202776,0,6,0,38,0,100,0,@DATA_CUSTOM_ACTION+1,0,0,0,75,@SPELL_FREEZE_GUARDS,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Freeze self on Data Set"),
+(-202776,0,7,8,38,0,100,0,@DATA_CUSTOM_ACTION+2,0,0,0,28,@SPELL_FREEZE_GUARDS,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Unfreeze self on Data Set"),
+(-202776,0,8,0,61,0,100,0,0,0,0,0,80,@NPC_SILVER_COVENANT_SENTINEL*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Create timed event based on action list"),
+(-202776,0,9,0,38,0,100,0,@DATA_CUSTOM_ACTION+3,0,0,0,53,0,@WP_GUARD_A_1,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Start movement back on timed event (called from action list)"),
+(-202776,0,10,11,40,0,100,0,2,0,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - restore home orientation on reach point"),
+(-202776,0,11,0,61,0,100,0,0,0,0,0,17,@EMOTE_STAND,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - restore stand state"),
+(-202776,0,12,0,61,1,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Say to Lana'thel"),
+(-202775,0,0,1,38,0,100,0,@DATA_CUSTOM_ACTION,0,0,0,53,1,@WP_GUARD_A_2,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Start movement on data set"),
+(-202775,0,1,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Set phase 1"),
+(-202775,0,2,3,40,1,100,0,1,0,0,0,66,0,0,0,0,0,0,19,@NPC_BLOOD_QUEEN_LANA_THEL,0,0,0,0,0,0,"Silver Covenant Sentinel - Set facing to Lana'thel on reach point"),
+(-202775,0,3,4,61,1,100,0,0,0,0,0,17,@EMOTE_2H,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Set attack state"),
+(-202775,0,4,5,61,1,100,0,0,0,0,0,55,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Stop WP"),
+(-202775,0,5,0,61,1,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Set Phase 2"),
+(-202775,0,6,0,38,0,100,0,@DATA_CUSTOM_ACTION+1,0,0,0,75,@SPELL_FREEZE_GUARDS,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Freeze self on Data Set"),
+(-202775,0,7,8,38,0,100,0,@DATA_CUSTOM_ACTION+2,0,0,0,28,@SPELL_FREEZE_GUARDS,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Unfreeze self on Data Set"),
+(-202775,0,8,0,61,0,100,0,0,0,0,0,80,@NPC_SILVER_COVENANT_SENTINEL*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Create timed event based on action list"),
+(-202775,0,9,0,38,0,100,0,@DATA_CUSTOM_ACTION+3,0,0,0,53,0,@WP_GUARD_A_2,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Start movement back on timed event (called from action list)"),
+(-202775,0,10,11,40,0,100,0,2,0,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - restore home orientation on reach point"),
+(-202775,0,11,0,61,0,100,0,0,0,0,0,17,@EMOTE_STAND,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - restore stand state"),
+-- Sunreaver Guards
+(-202777,0,0,1,38,0,100,0,@DATA_CUSTOM_ACTION,0,0,0,53,1,@WP_GUARD_H_1,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Start movement on data set"),
+(-202777,0,1,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Set phase 1"),
+(-202777,0,2,3,40,1,100,0,1,0,0,0,66,0,0,0,0,0,0,19,@NPC_BLOOD_QUEEN_LANA_THEL,0,0,0,0,0,0,"Silver Covenant Sentinel - Set facing to Lana'thel on reach point"),
+(-202777,0,3,4,61,1,100,0,0,0,0,0,17,@EMOTE_2H,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Set attack state"),
+(-202777,0,4,5,61,1,100,0,0,0,0,0,55,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Stop WP"),
+(-202777,0,5,0,61,1,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Set Phase 2"),
+(-202777,0,6,0,38,0,100,0,@DATA_CUSTOM_ACTION+1,0,0,0,75,@SPELL_FREEZE_GUARDS,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Freeze self on Data Set"),
+(-202777,0,7,8,38,0,100,0,@DATA_CUSTOM_ACTION+2,0,0,0,28,@SPELL_FREEZE_GUARDS,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Unfreeze self on Data Set"),
+(-202777,0,8,0,61,0,100,0,0,0,0,0,80,@NPC_SILVER_COVENANT_SENTINEL*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Create timed event based on action list"),
+(-202777,0,9,0,38,0,100,0,@DATA_CUSTOM_ACTION+3,0,0,0,53,0,@WP_GUARD_H_1,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Start movement back on timed event (called from action list)"),
+(-202777,0,10,11,40,0,100,0,2,0,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - restore home orientation on reach point"),
+(-202777,0,11,0,61,0,100,0,0,0,0,0,17,@EMOTE_STAND,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - restore stand state"),
+(-202778,0,0,1,38,0,100,0,@DATA_CUSTOM_ACTION,0,0,0,53,1,@WP_GUARD_H_2,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Start movement on data set"),
+(-202778,0,1,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Set phase 1"),
+(-202778,0,2,3,40,1,100,0,1,0,0,0,66,0,0,0,0,0,0,19,@NPC_BLOOD_QUEEN_LANA_THEL,0,0,0,0,0,0,"Silver Covenant Sentinel - Set facing to Lana'thel on reach point"),
+(-202778,0,3,4,61,1,100,0,0,0,0,0,17,@EMOTE_2H,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Set attack state"),
+(-202778,0,4,5,61,1,100,0,0,0,0,0,55,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Stop WP"),
+(-202778,0,5,0,61,1,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Set Phase 2"),
+(-202778,0,6,0,38,0,100,0,@DATA_CUSTOM_ACTION+1,0,0,0,75,@SPELL_FREEZE_GUARDS,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Freeze self on Data Set"),
+(-202778,0,7,8,38,0,100,0,@DATA_CUSTOM_ACTION+2,0,0,0,28,@SPELL_FREEZE_GUARDS,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Unfreeze self on Data Set"),
+(-202778,0,8,0,61,0,100,0,0,0,0,0,80,@NPC_SILVER_COVENANT_SENTINEL*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Create timed event based on action list"),
+(-202778,0,9,0,38,0,100,0,@DATA_CUSTOM_ACTION+3,0,0,0,53,0,@WP_GUARD_H_2,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - Start movement back on timed event (called from action list)"),
+(-202778,0,10,11,40,0,100,0,2,0,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - restore home orientation on reach point"),
+(-202778,0,11,0,61,0,100,0,0,0,0,0,17,@EMOTE_STAND,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Sentinel - restore stand state"),
+-- Timed event for guards
+(@NPC_SILVER_COVENANT_SENTINEL*100,9,0,0,0,0,100,0,1000,1000,0,0,45,@DATA_CUSTOM_ACTION+3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Quel'Delar rest - Guards timed return"),
+-- Myralion Sunblaze
+(@NPC_MYRALION_SUNBLAZE,0,0,1,20,0,100,0,@QUEST_RETURN_MYRALION_SUNBLAZE,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Myralion Sunblaze - remove gossip and qg flag on quest complete"),
+(@NPC_MYRALION_SUNBLAZE,0,1,2,61,0,100,0,0,0,0,0,53,0,@WP_MYRALION,0,0,0,0,1,0,0,0,0,0,0,0,"Myralion Sunblaze - Start WP on quest complete"),
+(@NPC_MYRALION_SUNBLAZE,0,2,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Myralion Sunblaze - Set phase 1"),
+(@NPC_MYRALION_SUNBLAZE,0,3,4,40,1,100,0,1,0,0,0,55,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Myralion Sunblaze - Stop WP on point reached"),
+(@NPC_MYRALION_SUNBLAZE,0,4,0,61,1,100,0,0,0,0,0,80,@NPC_MYRALION_SUNBLAZE*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Myralion Sunblaze - Start timed event on point reached"),
+(@NPC_MYRALION_SUNBLAZE,0,6,7,38,0,100,0,@DATA_CUSTOM_ACTION,0,0,0,53,0,@WP_MYRALION,0,0,0,0,1,0,0,0,0,0,0,0,"Myralion Sunblaze - WP event on data set"),
+(@NPC_MYRALION_SUNBLAZE,0,7,11,61,0,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Myralion Sunblaze - Set phase on data set"),
+(@NPC_MYRALION_SUNBLAZE,0,8,9,40,0,100,0,2,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Myralion Sunblaze - Say 3 event on home reached"),
+(@NPC_MYRALION_SUNBLAZE,0,9,10,61,0,100,0,0,0,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Myralion Sunblaze - restore orientation event on home reached"),
+(@NPC_MYRALION_SUNBLAZE,0,10,0,61,0,100,0,0,0,0,0,81,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Myralion Sunblaze - restore npc flags event on home reached"),
+(@NPC_MYRALION_SUNBLAZE,0,11,0,61,0,100,0,0,0,0,0,43,0,28889,0,0,0,0,1,0,0,0,0,0,0,0,"Myralion Sunblaze - Mount on data set"),
+-- Caladis Brightspear
+(@NPC_CALADIS_BRIGHTSPEAR,0,0,1,20,0,100,0,@QUEST_RETURN_CALADIS_BRIGHTSPEAR,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Caladis Brightspear - remove gossip and qg flag on quest complete"),
+(@NPC_CALADIS_BRIGHTSPEAR,0,1,2,61,0,100,0,0,0,0,0,53,0,@WP_CALADIS,0,0,0,0,1,0,0,0,0,0,0,0,"Caladis Brightspear - Start WP on quest complete"),
+(@NPC_CALADIS_BRIGHTSPEAR,0,2,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Caladis Brightspear - Set phase 1"),
+(@NPC_CALADIS_BRIGHTSPEAR,0,3,4,40,1,100,0,1,0,0,0,55,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Caladis Brightspear - Stop WP on point reached"),
+(@NPC_CALADIS_BRIGHTSPEAR,0,4,0,61,1,100,0,0,0,0,0,80,@NPC_MYRALION_SUNBLAZE*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Caladis Brightspear - Start timed event on point reached"),
+(@NPC_CALADIS_BRIGHTSPEAR,0,6,7,38,0,100,0,@DATA_CUSTOM_ACTION,0,0,0,53,0,@WP_CALADIS,0,0,0,0,1,0,0,0,0,0,0,0,"Caladis Brightspear - WP event on data set"),
+(@NPC_CALADIS_BRIGHTSPEAR,0,7,11,61,0,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Caladis Brightspear - Set phase on data set"),
+(@NPC_CALADIS_BRIGHTSPEAR,0,8,9,40,0,100,0,2,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Caladis Brightspear - Say 3 event on home reached"),
+(@NPC_CALADIS_BRIGHTSPEAR,0,9,10,61,0,100,0,0,0,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Caladis Brightspear - restore orientation event on home reached"),
+(@NPC_CALADIS_BRIGHTSPEAR,0,10,0,61,0,100,0,0,0,0,0,81,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Caladis Brightspear - restore npc flags event on home reached"),
+(@NPC_CALADIS_BRIGHTSPEAR,0,11,0,61,0,100,0,0,0,0,0,43,0,28888,0,0,0,0,1,0,0,0,0,0,0,0,"Caladis Brightspear - Mount on data set"),
+-- Timed event for faction heralds
+(@NPC_MYRALION_SUNBLAZE*100,9,0,0,0,0,100,1,1000,1000,0,0,43,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Quel'delar rest faction Herald - Dismount"),
+(@NPC_MYRALION_SUNBLAZE*100,9,1,0,0,0,100,1,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Quel'delar rest faction Herald - Say 1"),
+(@NPC_MYRALION_SUNBLAZE*100,9,2,0,0,0,100,1,0,0,0,0,12,@NPC_BLOOD_QUEEN_LANA_THEL,8,0,0,0,0,8,0,0,0,8102.33,785.112,481.025,5.99244,"Quel'delar rest faction Herald - Summon Lana'thel"),
+(@NPC_MYRALION_SUNBLAZE*100,9,3,0,0,0,100,1,8000,8000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Quel'delar rest faction Herald - Say 2");
+DELETE FROM `waypoints` WHERE `entry` IN (@WP_MYRALION,@WP_CALADIS,@WP_THALORIEN,@WP_MORLEN,@WP_BLOOD_QUEEN_1,@WP_BLOOD_QUEEN_2,@WP_GUARD_A_1,@WP_GUARD_A_2,@WP_GUARD_H_1,@WP_GUARD_H_2);
+INSERT INTO `waypoints`(`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
+(@WP_MYRALION,1,8121.94,776.030,482.114,"Myralion Sunblaze - WP 1"),
+(@WP_MYRALION,2,8127.26,766.402,482.579,"Myralion Sunblaze - Home Position"),
+(@WP_CALADIS,1,8119.73,783.416,481.623,"Caladis Brightspear - WP 1"),
+(@WP_CALADIS,2,8117.69,795.523,481.184,"Caladis Brightspear - Home Position"),
+(@WP_THALORIEN,1,8122.35,778.496,482.034,"Image of Thalorien Dawnseeker - WP 1"),
+(@WP_MORLEN,1,8121.75,781.096,481.905,"Image of Morlen Coldgrip - WP 1"),
+(@WP_MORLEN,2,8124.83,774.881,482.328,"Image of Morlen Coldgrip - WP 2"),
+(@WP_BLOOD_QUEEN_1,1,8115.65,780.131,481.611,"Lana'thel Quel'delar rest - WP 1.1"),
+(@WP_BLOOD_QUEEN_2,1,8119.96,775.924,482.029,"Lana'thel Quel'delar rest - WP 2.1"),
+(@WP_BLOOD_QUEEN_2,2,8124.342,778.9861,482.0804,"Lana'thel Quel'delar rest - WP 2.2"),
+(@WP_GUARD_A_1,1,8118.80,783.843,481.567,"Quel'Delar rest guard 2 (GUID: 202776)- WP 1"),
+(@WP_GUARD_A_1,2,8123.66,793.745,481.434,"Quel'Delar rest guard 2 (GUID: 202776)- Home Position"),
+(@WP_GUARD_A_2,1,8113.40,783.385,481.416,"Quel'Delar rest guard 1 (GUID: 202775)- WP 1"),
+(@WP_GUARD_A_2,2,8111.31,794.347,481.059,"Quel'Delar rest guard 1 (GUID: 202775)- Home Position"),
+(@WP_GUARD_H_1,1,8112.35,775.095,481.583,"Quel'Delar rest guard 1 (GUID: 202777)- WP 1"),
+(@WP_GUARD_H_1,2,8120.10,765.363,482.266,"Quel'Delar rest guard 1 (GUID: 202777)- Home Position"),
+(@WP_GUARD_H_2,1,8118.65,775.747,481.973,"Quel'Delar rest guard 2 (GUID: 202778)- WP 1"),
+(@WP_GUARD_H_2,2,8130.01,772.465,482.629,"Quel'Delar rest guard 2 (GUID: 202778)- Home Position");
+DELETE FROM `creature_text` WHERE `entry` IN (@NPC_MYRALION_SUNBLAZE,@NPC_CALADIS_BRIGHTSPEAR,@NPC_SILVER_COVENANT_SENTINEL,@NPC_BLOOD_QUEEN_LANA_THEL);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@NPC_MYRALION_SUNBLAZE,1,0,"The style of this blade and its markings hinted that it might be a dragonforged sword. At last, we will have our answer.",12,0,100,@EMOTE_TALK,0,16745,"Myralion Sunblaze - Say 1"),
+(@NPC_MYRALION_SUNBLAZE,2,0,"After all these years, can it really be --",12,0,100,@EMOTE_QUESTION,0,16746,"Myralion Sunblaze - Say 2"),
+(@NPC_MYRALION_SUNBLAZE,3,0,"It falls to us to see Quel'Delar restored for the Sunreavers.",12,0,100,0,0,0,"Myralion Sunblaze - Say 3"),
+(@NPC_CALADIS_BRIGHTSPEAR,1,0,"I knew this was a dragonforged blade when I first laid eyes on it.",12,0,100,@EMOTE_TALK,0,16604,"Caladis Brightspear - Say 1"),
+(@NPC_CALADIS_BRIGHTSPEAR,2,0,"But can it be? Is this really --",12,0,100,@EMOTE_QUESTION,0,16605,"Caladis Brightspear - Say 2"),
+(@NPC_CALADIS_BRIGHTSPEAR,3,0,"I vow that the Silver Covenant will see Quel'Delar restored.",12,0,100,0,0,0,"Caladis Brightspear - Say 3"),
+(@NPC_SILVER_COVENANT_SENTINEL,1,0,"You are not welcome here, minion of the Lich King!",12,0,100,0,0,0,"Silver Covenant Sentinel - Say 1"),
+(@NPC_BLOOD_QUEEN_LANA_THEL,1,0,"Quel'Delar.",12,0,100,@EMOTE_TALK,0,16808,"Blood Queen Lana'thel - Say 1"),
+(@NPC_BLOOD_QUEEN_LANA_THEL,2,0,"Quiet, fools. If I had wished to kill you, you'd already be dead.",12,0,100,0,0,0,"Blood Queen Lana'thel - Say 2"),
+(@NPC_BLOOD_QUEEN_LANA_THEL,3,0,"As Quel'Serrar was forged by the dragons and given to the kaldorei, its twin,Quel'Delar was given to my people.",12,0,100,@EMOTE_TALK,0,16809,"Blood Queen Lana'thel - Say 3"),
+(@NPC_BLOOD_QUEEN_LANA_THEL,4,0,"The king bestowed the blade upon my friend, Thalorien Dawnseeker.",12,0,100,@EMOTE_TALK,0,16800,"Blood Queen Lana'thel - Say 4"),
+(@NPC_BLOOD_QUEEN_LANA_THEL,5,0,"But even Thalorien's skill and Quel'Delar's magic could not save Silvermoon from the might of the Scourge.",12,0,100,@EMOTE_TALK,0,16801,"Blood Queen Lana'thel - Say 5"),
+(@NPC_BLOOD_QUEEN_LANA_THEL,6,0,"Thalorien fell before the gates of the Sunwell, buying time for others to escape.",12,0,100,@EMOTE_TALK,0,16802,"Blood Queen Lana'thel - Say 6"),
+(@NPC_BLOOD_QUEEN_LANA_THEL,7,0,"After the battle, I recovered the sword from the field. I bore it to Northrend in the service of my prince, seeking to avenge our people's defeat.",12,0,100,@EMOTE_KNEE,0,16803,"Blood Queen Lana'thel - Say 7"),
+(@NPC_BLOOD_QUEEN_LANA_THEL,8,0,"Arthas shattered our forces and took the most powerful of us into his service as the San'layn.",12,0,100,@EMOTE_TALK,0,16804,"Blood Queen Lana'thel - Say 8"),
+(@NPC_BLOOD_QUEEN_LANA_THEL,9,0,"My memories of Thalorien went cold and so did his blade.",12,0,100,@EMOTE_TALK,0,16805,"Blood Queen Lana'thel - Say 9"),
+(@NPC_BLOOD_QUEEN_LANA_THEL,10,0,"It was I who brought Quel'Delar here,to return it to its makers. In breaking the weapon, so did I break its power.",12,0,100,@EMOTE_POINT,0,16806,"Blood Queen Lana'thel - Say 10"),
+(@NPC_BLOOD_QUEEN_LANA_THEL,11,0,"Quel'Delar will never serve another!",12,0,100,5,0,16807,"Blood Queen Lana'thel - Say 11");
diff --git a/sql/updates/world/2012_11_26_02_world_conditions.sql b/sql/updates/world/2012_11_26_02_world_conditions.sql
new file mode 100644
index 00000000000..861e999236d
--- /dev/null
+++ b/sql/updates/world/2012_11_26_02_world_conditions.sql
@@ -0,0 +1,5 @@
+UPDATE `conditions` SET `ErrorType`=97,`ErrorTextId`=0 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=56765;
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=56765;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13,2,56765,0,0,31,0,3,30446,0,0,0,'','Plant Chieftain''s Totem - Frostfloe Rift');
diff --git a/sql/updates/world/2012_11_26_03_world_misc.sql b/sql/updates/world/2012_11_26_03_world_misc.sql
new file mode 100644
index 00000000000..5a6140e6bf3
--- /dev/null
+++ b/sql/updates/world/2012_11_26_03_world_misc.sql
@@ -0,0 +1,115 @@
+-- The Battle For Crusaders' Pinnacle (13141)
+
+SET @SPELL_ITEM_BANNER := 58013; -- Plant Blessed Banner
+SET @SPELL_TORCH := 58121;
+SET @SPELL_TORCH_EFFECT := 58125;
+
+SET @NPC_BLESSED_BANNER := 30891; -- Blessed Banner of the Crusade
+SET @NPC_CRUSADER_DALFORS := 31003; -- Crusader Lord Dalfors
+SET @NPC_BATTLE_PRIEST := 30919; -- Argent Battle-priest
+SET @NPC_MASON := 30900; -- Argent Mason
+SET @NPC_TORCH_DUMMY := 31004; -- (Wave 0) Torch Dummy
+SET @NPC_LK := 31013; -- The Lich King
+SET @NPC_CAPTAIN := 30986;
+SET @NPC_DRUDGE := 30984;
+SET @NPC_PLAGEBRINGER := 30987;
+SET @NPC_HALOF := 30989;
+
+SET @EVENT_SCRIPT := 20082;
+
+DELETE FROM `spell_target_position` WHERE `id`=@SPELL_ITEM_BANNER;
+INSERT INTO `spell_target_position` (`id`,`target_map`,`target_position_x`,`target_position_y`,`target_position_z`,`target_orientation`) VALUES
+(@SPELL_ITEM_BANNER,571,6418.42,422.97,511.11,0);
+
+UPDATE `creature_template` SET `faction_A`=2140,`faction_H`=2140,`ScriptName`='npc_blessed_banner' WHERE `entry`=@NPC_BLESSED_BANNER;
+UPDATE `creature_template` SET `faction_A`=2131,`faction_H`=2131,`AIName`='SmartAI',`unit_flags`=32768,`equipment_id`=@NPC_CRUSADER_DALFORS WHERE `entry`=@NPC_CRUSADER_DALFORS;
+UPDATE `creature_template` SET `faction_A`=2131,`faction_H`=2131,`AIName`='SmartAI',`unit_flags`=32768,`equipment_id`=@NPC_BATTLE_PRIEST WHERE `entry`=@NPC_BATTLE_PRIEST;
+UPDATE `creature_template` SET `faction_A`=2070,`faction_H`=2070,`unit_flags`=32768,`AIName`='SmartAI',`equipment_id`=@NPC_MASON WHERE `entry`=@NPC_MASON;
+UPDATE `creature_template` SET `unit_flags`=33554432,`InhabitType`=4,`AIName`='SmartAI',`flags_extra`=128 WHERE `entry`=@NPC_TORCH_DUMMY;
+UPDATE `creature_template` SET `unit_flags`=33554432,`flags_extra`=128 WHERE `entry`=@NPC_LK;
+UPDATE `creature_template` SET `faction_A`=2068,`faction_H`=2068,`unit_flags`=32768,`AIName`='SmartAI' WHERE `entry`=@NPC_CAPTAIN;
+UPDATE `creature_template` SET `faction_A`=2068,`faction_H`=2068,`unit_flags`=32768,`AIName`='SmartAI' WHERE `entry`=@NPC_DRUDGE;
+UPDATE `creature_template` SET `faction_A`=2068,`faction_H`=2068,`unit_flags`=32768,`AIName`='SmartAI' WHERE `entry`=@NPC_PLAGEBRINGER;
+UPDATE `creature_template` SET `faction_A`=2068,`faction_H`=2068,`unit_flags`=32768 WHERE `entry`=@NPC_HALOF;
+
+DELETE FROM `creature_template_addon` WHERE `entry` IN (@NPC_BLESSED_BANNER,@NPC_CRUSADER_DALFORS,@NPC_BATTLE_PRIEST,@NPC_MASON);
+INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES
+(@NPC_BLESSED_BANNER, 0, 0x0, 0x1, '58026'), -- Blessing of the Crusade
+(@NPC_CRUSADER_DALFORS,2786,0x0,0x1,'58110'), -- Threat Pulse
+(@NPC_BATTLE_PRIEST,0,0x0,0x1,'58110'), -- Threat Pulse
+(@NPC_MASON,0,0x0,0x1,'');
+
+DELETE FROM `creature_equip_template` WHERE `entry` IN (@NPC_CRUSADER_DALFORS,@NPC_BATTLE_PRIEST,@NPC_MASON);
+INSERT INTO `creature_equip_template` (`entry`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES
+(@NPC_CRUSADER_DALFORS,39290,40596,0),
+(@NPC_BATTLE_PRIEST,42544,42543,0),
+(@NPC_MASON,1906,2081,0);
+
+DELETE FROM `creature_text` WHERE `entry` IN (@NPC_BLESSED_BANNER,@NPC_CRUSADER_DALFORS,@NPC_LK);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@NPC_BLESSED_BANNER,0,0,'The Blessed Banner of the Crusade has been planted.\n Defend the banner from all attackers!',41,0,100,0,0,0,'Blessed Banner of the Crusade'),
+(@NPC_CRUSADER_DALFORS,0,0,'BY THE LIGHT! Those damned monsters! Look at what they''ve done to our people!',12,0,100,5,0,0,'Crusader Lord Dalfors'),
+(@NPC_CRUSADER_DALFORS,1,0,'Burn it down, boys. Burn it all down.',12,0,100,1,0,0,'Crusader Lord Dalfors'),
+(@NPC_CRUSADER_DALFORS,2,0,'Let ''em come. They''ll pay for what they''ve done!',12,0,100,1,0,0,'Crusader Lord Dalfors'),
+(@NPC_CRUSADER_DALFORS,3,0,'We''ve done it, lads! We''ve taken the pinnacle from the Scourge! Report to Father Gustav at once and tell him the good news! We''re gonna get to buildin'' and settin'' up! Go!',14,0,100,71,0,0,'Crusader Lord Dalfors'),
+(@NPC_LK,0,0,'Leave no survivors!',14,0,100,0,0,14793,'The Lich King'),
+(@NPC_LK,1,0,'Cower before my terrible creations!',14,0,100,0,0,14800,'The Lich King'),
+(@NPC_LK,2,0,'Feast my children! Feast upon the flesh of the living!',14,0,100,0,0,14801,'The Lich King'),
+(@NPC_LK,3,0,'Lay down your arms and surrender your souls!',14,0,100,0,0,14802,'The Lich King');
+
+DELETE FROM `event_scripts` WHERE `id`=@EVENT_SCRIPT;
+INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `x`, `y`, `z`, `o`) VALUES
+(@EVENT_SCRIPT,0,10,@NPC_BLESSED_BANNER,600000,6418.422,422.9706,511.1964,5.8119);
+
+SET @CGUID := 85714; -- need 18 (85714<->85731)
+DELETE FROM `creature` WHERE `id` IN (@NPC_TORCH_DUMMY,@NPC_LK);
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`MovementType`) VALUES
+(@CGUID+0,@NPC_TORCH_DUMMY,571,1,128,6405.316,431.9516,518.2324,0.296706,120,0,0),
+(@CGUID+1,@NPC_TORCH_DUMMY,571,1,128,6408.057,424.2077,511.3653,1.256637,120,0,0),
+(@CGUID+2,@NPC_TORCH_DUMMY,571,1,128,6371.181,452.4539,513.5053,1.204277,120,0,0),
+(@CGUID+3,@NPC_TORCH_DUMMY,571,1,128,6391.331,460.3002,511.3657,1.745329,120,0,0),
+(@CGUID+4,@NPC_TORCH_DUMMY,571,1,128,6393.723,427.9692,538.7354,1.692969,120,0,0),
+(@CGUID+5,@NPC_TORCH_DUMMY,571,1,128,6374.808,445.4873,517.7629,4.031711,120,0,0),
+(@CGUID+6,@NPC_TORCH_DUMMY,571,1,128,6382.271,451.9008,537.9304,1.32645,120,0,0),
+(@CGUID+7,@NPC_TORCH_DUMMY,571,1,128,6366.836,459.1225,530.3361,0.7330383,120,0,0),
+(@CGUID+8,@NPC_TORCH_DUMMY,571,1,128,6372.479,447.4598,511.3725,0.2443461,120,0,0),
+(@CGUID+9,@NPC_TORCH_DUMMY,571,1,128,6394.698,427.4731,523.7177,1.850049,120,0,0),
+(@CGUID+10,@NPC_TORCH_DUMMY,571,1,128,6367.246,459.7583,518.8009,3.857178,120,0,0),
+(@CGUID+11,@NPC_TORCH_DUMMY,571,1,128,6396.961,432.8676,533.744,3.176499,120,0,0),
+(@CGUID+12,@NPC_TORCH_DUMMY,571,1,128,6403.202,464.2955,535.6572,3.857178,120,0,0),
+(@CGUID+13,@NPC_TORCH_DUMMY,571,1,128,6401.721,464.4387,543.1727,2.199115,120,0,0),
+(@CGUID+14,@NPC_TORCH_DUMMY,571,1,128,6392.169,475.7449,512.7209,0.6283185,120,0,0),
+(@CGUID+15,@NPC_TORCH_DUMMY,571,1,128,6397.238,475.2313,529.652,4.328416,120,0,0),
+(@CGUID+16,@NPC_TORCH_DUMMY,571,1,128,6389.221,474.0008,511.365,1.553343,120,0,0),
+(@CGUID+17,@NPC_LK,571,1,128,6389.73,451.2743,513.3198,1.32645,120,0,0);
+
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (@NPC_TORCH_DUMMY,@NPC_MASON);
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@NPC_TORCH_DUMMY,0,0,0,8,0,100,0,@SPELL_TORCH,0,0,0,11,@SPELL_TORCH_EFFECT,0,0,0,0,0,1,0,0,0,0,0,0,0,'On spellhit - Cast Torch Visual'),
+(@NPC_MASON,0,0,0,38,0,100,0,1,1,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'On data - Set phase 1'),
+(@NPC_MASON,0,1,0,60,1,100,0,0,10000,10000,20000,11,@SPELL_TORCH,0,0,0,0,0,1,0,0,0,0,0,0,0,'On update - Cast spell Torch');
+
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SPELL_TORCH) OR (`SourceTypeOrReferenceId`=17 AND `SourceEntry`=@SPELL_ITEM_BANNER);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,1,@SPELL_TORCH,0,0,31,0,3,@NPC_TORCH_DUMMY,0,0,0,'','Spell Torch targets Torch Dummy'),
+(17,0,@SPELL_ITEM_BANNER,0,0,29,0,@NPC_BLESSED_BANNER,10,0,1,0,'','Cast Plant Blessed Banner if no banner is already spawned.');
+
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (@NPC_CRUSADER_DALFORS,@NPC_BATTLE_PRIEST,@NPC_CAPTAIN,@NPC_DRUDGE,@NPC_PLAGEBRINGER);
+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
+-- Crusader Lord Dalfors
+(@NPC_CRUSADER_DALFORS,0,0,0,2,0,100,1,0,50,0,0,11,58053,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Holy Light at 50% HP'),
+(@NPC_CRUSADER_DALFORS,0,1,0,0,0,100,0,5000,8000,23000,29000,11,37554,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Shield'),
+-- Argent Battle-priest
+(@NPC_BATTLE_PRIEST,0,0,0,1,0,100,0,500,1000,600000,600000,11,58054,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Blessing of Kings on Spawn'),
+(@NPC_BATTLE_PRIEST,0,1,0,2,0,100,1,0,50,0,0,11,58053,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Holy Light at 50% HP'),
+(@NPC_BATTLE_PRIEST,0,2,0,14,0,100,0,50000,10,20000,30000,11,58053,0,0,0,0,0,7,0,0,0,0,0,0,0,'Cast Holy Light on Friendlies'),
+-- Reanimated Captain
+(@NPC_CAPTAIN,0,0,0,4,0,100,1,0,0,0,0,11,32674,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Avenger''s Shield on Aggro'),
+(@NPC_CAPTAIN,0,1,0,0,0,100,0,5000,5000,17800,19800,11,58154,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Hammer of Injustice'),
+(@NPC_CAPTAIN,0,2,0,2,0,100,1,0,45,0,0,11,58153,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Unholy Light at 45% HP'),
+(@NPC_CAPTAIN,0,3,0,14,0,100,0,4000,10,20000,30000,11,58153,0,0,0,0,0,7,0,0,0,0,0,0,0,'Cast Unholy Light on Friendlies'),
+-- Scourge Drudge
+(@NPC_DRUDGE,0,0,0,0,0,100,0,5000,5000,11300,14500,11,51917,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Cleave'),
+(@NPC_DRUDGE,0,1,0,0,0,100,0,7000,9000,17800,20200,11,49678,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Flesh Rot'),
+-- Hideous Plaguebringer
+(@NPC_PLAGEBRINGER,0,0,0,0,0,100,0,3400,4600,11400,16500,11,38761,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Arcing Smash');
diff --git a/sql/updates/world/2012_11_27_00_world_misc.sql b/sql/updates/world/2012_11_27_00_world_misc.sql
new file mode 100644
index 00000000000..8c815a856fd
--- /dev/null
+++ b/sql/updates/world/2012_11_27_00_world_misc.sql
@@ -0,0 +1,24 @@
+DELETE FROM `disables` WHERE `sourceType`=4 AND `entry` IN (7567,7568);
+
+DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (7567,7568);
+INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`) VALUES
+(7567,11,0,0,'achievement_the_hundred_club'),
+(7567,12,0,0,''),
+(7568,11,0,0,'achievement_the_hundred_club'),
+(7568,12,1,0,'');
+
+DELETE FROM `script_texts` WHERE `entry` IN (-1533082,-1533083);
+
+DELETE FROM `creature_text` WHERE `entry`=15989;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(15989,0,0,'Sapphiron lifts off into the air!',41,0,100,254,0,0,'Sapphiron'),
+(15989,1,0,'Sapphiron resumes his attacks!',41,0,100,0,0,0,'Sapphiron'),
+(15989,2,0,'%s takes a deep breath.',41,7,100,0,0,0,'Sapphiron'),
+(15989,3,0,'%s enrages!',41,0,100,0,0,0,'Sapphiron');
+
+DELETE FROM `spelldifficulty_dbc` WHERE `id` IN (28531,55697,28542,28547) OR `spellid0` IN (28531,55697,28542,28547);
+INSERT INTO `spelldifficulty_dbc`(`id`,`spellid0`,`spellid1`) VALUES
+(28531,28531,55799), -- Frost Aura
+(55697,55697,55696), -- Tail Sweep
+(28542,28542,55665), -- Life Drain
+(28547,28547,55699); -- Chill
diff --git a/sql/updates/world/2012_11_27_01_world_achievement_criteria_data.sql b/sql/updates/world/2012_11_27_01_world_achievement_criteria_data.sql
new file mode 100644
index 00000000000..65cfced17f3
--- /dev/null
+++ b/sql/updates/world/2012_11_27_01_world_achievement_criteria_data.sql
@@ -0,0 +1,6 @@
+DELETE FROM `disables` WHERE `sourceType`=4 AND `entry`=7321;
+
+DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=7321;
+INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`) VALUES
+(7321,11,0,0,'achievement_shatter_resistant'),
+(7321,12,1,0,'');
diff --git a/sql/updates/world/2012_11_30_00_world_spell_script_names.sql b/sql/updates/world/2012_11_30_00_world_spell_script_names.sql
new file mode 100644
index 00000000000..cedee2fe51d
--- /dev/null
+++ b/sql/updates/world/2012_11_30_00_world_spell_script_names.sql
@@ -0,0 +1,4 @@
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (57669,61782);
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(57669,'spell_gen_replenishment'),
+(61782,'spell_gen_replenishment');
diff --git a/sql/updates/world/2012_12_01_00_world_assembly_of_iron.sql b/sql/updates/world/2012_12_01_00_world_assembly_of_iron.sql
new file mode 100644
index 00000000000..090780d2bd4
--- /dev/null
+++ b/sql/updates/world/2012_12_01_00_world_assembly_of_iron.sql
@@ -0,0 +1,44 @@
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1603047 AND -1603020;
+DELETE FROM `creature_text` WHERE `entry` IN (32867,32927,32857);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+(32867,0,0,'You will not defeat the Assembly of Iron so easily, invaders!',14,0,100,0,0,15674,'Steelbreaker - Aggro'),
+(32867,1,0,'So fragile and weak!',14,0,100,0,0,15675,'Steelbreaker - Slay 1'),
+(32867,1,1,'Flesh... such a hindrance.',14,0,100,0,0,15676,'Steelbreaker - Slay 2'),
+(32867,2,0,'You seek the secrets of Ulduar? Then take them!',14,0,100,0,0,15677,'Steelbreaker - Power'),
+(32867,3,0,'My death only serves to hasten your demise.',14,0,100,0,0,15678,'Steelbreaker - Death'),
+(32867,4,0,'Impossible...',14,0,100,0,0,15679,'Steelbreaker - Encounter defeated'),
+(32867,5,0,'This meeting of the Assembly of Iron is adjourned!',14,0,100,0,0,15680,'Steelbreaker - Berserk'),
+
+(32927,0,0,'Nothing short of total decimation will suffice.',14,0,100,0,0,15657,'Runemaster Molgeim - Aggro'),
+(32927,1,0,'The world suffers yet another insignificant loss.',14,0,100,0,0,15658,'Runemaster Molgeim - Slay 1'),
+(32927,1,1,'Death is the price of your arrogance.',14,0,100,0,0,15659,'Runemaster Molgeim - Slay 2'),
+(32927,2,0,'Decipher this!',14,0,100,0,0,15660,'Runemaster Molgeim - Rune of Death'),
+(32927,3,0,'Face the lightning surge!',14,0,100,0,0,15661,'Runemaster Molgeim - Rune of Summon'),
+(32927,4,0,'The legacy of storms shall not be undone.',14,0,100,0,0,15662,'Runemaster Molgeim - Death'),
+(32927,5,0,'What have you gained from my defeat? You are no less doomed, mortals!',14,0,100,0,0,15663,'Runemaster Molgeim - Encounter defeated'),
+(32927,6,0,'This meeting of the Assembly of Iron is adjourned!',14,0,100,0,0,15664,'Runemaster Molgeim - Berserk'),
+
+(32857,0,0,'Whether the world''s greatest gnats or the world''s greatest heroes, you''re still only mortal!',14,0,100,0,0,15684,'Brundir - Aggro'),
+(32857,1,0,'A merciful kill!',14,0,100,0,0,15685,'Brundir Slay 1'),
+(32857,1,1,'HAH!',14,0,100,0,0,15686,'Brundir - Slay 2'),
+(32857,2,0,'Stand still and stare into the light!',14,0,100,0,0,15687,'Brundir - Special'),
+(32857,3,0,'Let the storm clouds rise and rain down death from above!',14,0,100,0,0,15688,'Brundir - Flight'),
+(32857,4,0,'The power of the storm lives on...',14,0,100,0,0,15689,'Brundir - Death'),
+(32857,5,0,'You rush headlong into the maw of madness!',14,0,100,0,0,15690,'Brundir - Encounter defeated'),
+(32857,6,0,'This meeting of the Assembly of Iron is adjourned!',14,0,100,0,0,15691,'Brundir - Berserk'),
+(32857,7,0,'%s begins to Overload!',41,0,100,0,0,0,'Brundir - Overload');
+
+UPDATE `creature_template` SET `flags_extra`=128, `ScriptName`='' WHERE `entry`=33705; -- Rune of Power
+UPDATE `creature_template` SET `flags_extra`=128, `ScriptName`='' WHERE `entry`=33051; -- Rune of Summoning
+UPDATE `creature_template` SET `ScriptName`='' WHERE `entry`=32958; -- Lightning Elemental
+
+DELETE FROM `creature_template_addon` WHERE `entry` IN (33051,32958,33689,33705);
+INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(33051,0,0,0,0,0,'62019'), -- Rune of Summoning
+(32958,0,0,0,0,0,'62052'), -- Lightning Elemental
+(33689,0,0,0,0,0,'62052'), -- Lightning Elemental
+(33705,0,0,0,0,0,'61974'); -- Rune of Power
+
+DELETE FROM `spell_script_names` WHERE `spell_id`=62019; -- Rune of Summoning
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(62019 ,'spell_assembly_rune_of_summoning');
diff --git a/sql/updates/world/2012_12_01_01_world_misc.sql b/sql/updates/world/2012_12_01_01_world_misc.sql
new file mode 100644
index 00000000000..7523484d179
--- /dev/null
+++ b/sql/updates/world/2012_12_01_01_world_misc.sql
@@ -0,0 +1,74 @@
+-- The Sons of Hodir
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=23 AND `SourceEntry` IN (44133,50335,44134,50336,44136,50337,44135,50338);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(23,32540,44133,0,0,5,0,1119,128,0,0,0,0,'','Greater Inscription of the Axe - when The Sons of Hodir exalted'),
+(23,32540,50335,0,0,5,0,1119,127,0,0,0,0,'','Greater Inscription of the Axe - when The Sons of Hodir not exalted'),
+(23,32540,44134,0,0,5,0,1119,128,0,0,0,0,'','Greater Inscription of the Crag - when The Sons of Hodir exalted'),
+(23,32540,50336,0,0,5,0,1119,127,0,0,0,0,'','Greater Inscription of the Crag - when The Sons of Hodir not exalted'),
+(23,32540,44136,0,0,5,0,1119,128,0,0,0,0,'','Greater Inscription of the Pinnacle - when The Sons of Hodir exalted'),
+(23,32540,50337,0,0,5,0,1119,127,0,0,0,0,'','Greater Inscription of the Pinnacle - when The Sons of Hodir not exalted'),
+(23,32540,44135,0,0,5,0,1119,128,0,0,0,0,'','Greater Inscription of the Storm - when The Sons of Hodir exalted'),
+(23,32540,50338,0,0,5,0,1119,127,0,0,0,0,'','Greater Inscription of the Storm - when The Sons of Hodir not exalted');
+
+DELETE FROM `npc_vendor` WHERE `entry`=32540 AND `item` IN (50335,50336,50337,50338);
+INSERT INTO `npc_vendor` (`entry`,`slot`,`item`,`maxcount`,`incrtime`,`ExtendedCost`) VALUES
+(32540,0,50335,0,0,0), -- Greater Inscription of the Axe
+(32540,0,50336,0,0,0), -- Greater Inscription of the Crag
+(32540,0,50337,0,0,0), -- Greater Inscription of the Pinnacle
+(32540,0,50338,0,0,0); -- Greater Inscription of the Storm
+
+-- Knights of the Ebon Blade
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=23 AND `SourceEntry` IN (44149,50367);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(23,32538,44149,0,0,5,0,1098,192,0,0,0,0,'','Arcanum of Torment - when Knights of the Ebon Blade revered/exalted'),
+(23,32538,50367,0,0,5,0,1098,63,0,0,0,0,'','Arcanum of Torment - when Knights of the Ebon Blade not revered/exalted');
+
+DELETE FROM `npc_vendor` WHERE `entry`=32538 AND `item`=50367;
+INSERT INTO `npc_vendor` (`entry`,`slot`,`item`,`maxcount`,`incrtime`,`ExtendedCost`) VALUES
+(32538,0,50367,0,0,0); -- Arcanum of Torment
+
+-- Kirin Tor
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=23 AND `SourceEntry` IN (44159,50368);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(23,32287,44159,0,0,5,0,1090,192,0,0,0,0,'','Arcanum of Burning Mysteries - when Kirin Tor revered/exalted'),
+(23,32287,50368,0,0,5,0,1090,63,0,0,0,0,'','Arcanum of Burning Mysteries - when Kirin Tor not revered/exalted');
+
+DELETE FROM `npc_vendor` WHERE `entry`=32287 AND `item`=50368;
+INSERT INTO `npc_vendor` (`entry`,`slot`,`item`,`maxcount`,`incrtime`,`ExtendedCost`) VALUES
+(32287,0,50368,0,0,0); -- Arcanum of Burning Mysteries
+
+-- The Wyrmrest Accord
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=23 AND `SourceEntry` IN (44152,50370);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(23,32533,44152,0,0,5,0,1091,192,0,0,0,0,'','Arcanum of Blissful Mending - when The Wyrmrest Accord revered/exalted'),
+(23,32533,50370,0,0,5,0,1091,63,0,0,0,0,'','Arcanum of Blissful Mending - when The Wyrmrest Accord not revered/exalted');
+
+DELETE FROM `npc_vendor` WHERE `entry`=32533 AND `item`=50370;
+INSERT INTO `npc_vendor` (`entry`,`slot`,`item`,`maxcount`,`incrtime`,`ExtendedCost`) VALUES
+(32533,0,50370,0,0,0); -- Arcanum of Blissful Mending
+
+-- Horde Expedition
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=23 AND `SourceEntry` IN (44702,50373);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(23,32774,44702,0,0,5,0,1052,128,0,0,0,0,'','Arcanum of the Savage Gladiator - when Horde Expedition exalted'),
+(23,32774,50373,0,0,5,0,1052,127,0,0,0,0,'','Arcanum of the Savage Gladiator - when Horde Expedition not exalted'),
+(23,32565,44702,0,0,5,0,1052,128,0,0,0,0,'','Arcanum of the Savage Gladiator - when Horde Expeditione exalted'),
+(23,32565,50373,0,0,5,0,1052,127,0,0,0,0,'','Arcanum of the Savage Gladiator - when Horde Expedition not exalted');
+
+DELETE FROM `npc_vendor` WHERE `entry` IN (32565,32774) AND `item`=50373;
+INSERT INTO `npc_vendor` (`entry`,`slot`,`item`,`maxcount`,`incrtime`,`ExtendedCost`) VALUES
+(32565,0,50373,0,0,0), -- Arcanum of the Savage Gladiator
+(32774,0,50373,0,0,0); -- Arcanum of the Savage Gladiator
+
+-- Alliance Vanguard
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=23 AND `SourceEntry` IN (44701,50372);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(23,32564,44701,0,0,5,0,1037,128,0,0,0,0,'','Arcanum of the Savage Gladiator - when Alliance Vanguard rexalted'),
+(23,32564,50372,0,0,5,0,1037,127,0,0,0,0,'','Arcanum of the Savage Gladiator - when Alliance Vanguard not exalted'),
+(23,32773,44701,0,0,5,0,1037,128,0,0,0,0,'','Arcanum of the Savage Gladiator - when Alliance Vanguard exalted'),
+(23,32773,50372,0,0,5,0,1037,127,0,0,0,0,'','Arcanum of the Savage Gladiator - when Alliance Vanguard not exalted');
+
+DELETE FROM `npc_vendor` WHERE `entry` IN (32773,32564) AND `item`=50372;
+INSERT INTO `npc_vendor` (`entry`,`slot`,`item`,`maxcount`,`incrtime`,`ExtendedCost`) VALUES
+(32564,0,50372,0,0,0), -- Arcanum of the Savage Gladiator
+(32773,0,50372,0,0,0); -- Arcanum of the Savage Gladiator
diff --git a/sql/updates/world/2012_12_01_02_world_creature_text.sql b/sql/updates/world/2012_12_01_02_world_creature_text.sql
new file mode 100644
index 00000000000..6d4b50b9e88
--- /dev/null
+++ b/sql/updates/world/2012_12_01_02_world_creature_text.sql
@@ -0,0 +1,413 @@
+-- ------------------------------- --
+-- Creature text conversion part 4 --
+-- ------------------------------- --
+
+-- kodo round
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000350 AND -1000348;
+DELETE FROM `creature_text` WHERE `entry`=11596;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(11596,0,0,12,0,100,"kodo round SAY_SMEED_HOME_1","Ah...the wondrous sound of kodos. I love the way they make the ground shake... inspect the beast for me."),
+(11596,0,1,12,0,100,"kodo round SAY_SMEED_HOME_2","Hey, look out with that kodo! You had better inspect that beast before I give you credit!"),
+(11596,0,2,12,0,100,"kodo round SAY_SMEED_HOME_3","That kodo sure is a beauty. Wait a minute, where are my bifocals? Perhaps you should inspect the beast for me.");
+
+-- lazy peon
+DELETE FROM `script_texts` WHERE `entry`=-1000600;
+DELETE FROM `creature_text` WHERE `entry`=10556;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(10556,0,0,12,0,100,"lazy peon SAY_WP_0","Ow! OK, I'll get back to work, $N!");
+
+-- amnennar
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1129004 AND -1129000;
+DELETE FROM `creature_text` WHERE `entry`=7358;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(7358,0,0,14,5825,100,"amnennar SAY_AGGRO","You'll never leave this place... alive."),
+(7358,1,0,14,5828,100,"amnennar SAY_SUMMON60","To me, my servants!"),
+(7358,2,0,14,5829,100,"amnennar SAY_SUMMON30","Come, spirits, attend your master!"),
+(7358,3,0,14,5827,100,"amnennar SAY_HP","I am the hand of the Lich King!"),
+(7358,4,0,14,5826,100,"amnennar SAY_KILL","Too...easy!");
+
+-- clintar
+DELETE FROM `script_texts` WHERE `entry`=-1000286;
+DELETE FROM `creature_text` WHERE `entry`=22916;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(22916,0,0,12,0,100,"clintar SAY_END","Lurosa, I am entrusting the Relics of Aviana to $N, who will take them to Morthis Whisperwing. I must return completely to the Emerald Dream now. Do not let $N fail!");
+
+-- gilthares
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000380 AND -1000370;
+DELETE FROM `creature_text` WHERE `entry`=3465;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(3465,0,0,12,0,100,"gilthares SAY_GIL_START","Stay close, $n. I'll need all the help I can get to break out of here. Let's go!"),
+(3465,1,0,12,0,100,"gilthares SAY_GIL_AT_LAST","At last! Free from Northwatch Hold! I need a moment to catch my breath..."),
+(3465,2,0,12,0,100,"gilthares SAY_GIL_PROCEED","Now I feel better. Let's get back to Ratchet. Come on, $n."),
+(3465,3,0,12,0,100,"gilthares SAY_GIL_FREEBOOTERS","Looks like the Southsea Freeboters are heavily entrenched on the coast. This could get rough."),
+(3465,4,0,12,0,100,"gilthares SAY_GIL_AGGRO_1","Help! $C attacking!"),
+(3465,4,1,12,0,100,"gilthares SAY_GIL_AGGRO_2","$C heading this way fast! Time for revenge!"),
+(3465,4,2,12,0,100,"gilthares SAY_GIL_AGGRO_3","$C coming right at us!"),
+(3465,4,3,12,0,100,"gilthares SAY_GIL_AGGRO_4","Get this $C off of me!"),
+(3465,5,0,12,0,100,"gilthares SAY_GIL_ALMOST","Almost back to Ratchet! Let's keep up the pace..."),
+(3465,6,0,12,0,100,"gilthares SAY_GIL_SWEET","Ah, the sweet salt air of Ratchet."),
+(3465,7,0,12,0,100,"gilthares SAY_GIL_FREED","Captain Brightsun, $N here has freed me! $N, I am certain the Captain will reward your bravery.");
+
+-- twiggy
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000380 AND -1000370;
+DELETE FROM `creature_text` WHERE `entry` IN (6238,6248);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(6238,0,0,12,0,100,"big will SAY_BIG_WILL_READY","Ready when you are, $c."),
+(6248,0,0,12,0,100,"twiggy SAY_TWIGGY_BEGIN","The Affray has begun. $n, get ready to fight!"),
+(6248,1,0,12,0,100,"twiggy SAY_TWIGGY_FRAY","You! Enter the fray!"),
+(6248,2,0,12,0,100,"twiggy SAY_TWIGGY_DOWN","Challenger is down!"),
+(6248,3,0,12,0,100,"twiggy SAY_TWIGGY_OVER","The Affray is over.");
+
+-- wizzlecrank
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000305 AND -1000298;
+DELETE FROM `creature_text` WHERE `entry` IN (3282,3439);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(3439,0,0,12,0,100,"wizzlecrank SAY_START","Alright, alright I think I can figure out how to operate this thing..."),
+(3439,1,0,12,0,100,"wizzlecrank SAY_STARTUP1","Arrrgh! This isn't right!"),
+(3439,2,0,12,0,100,"wizzlecrank SAY_STARTUP2","Okay, I think I've got it, now. Follow me, $n!"),
+(3282,0,0,14,0,100,"wizzlecrank SAY_MERCENARY","There's the stolen shredder! Stop it or Lugwizzle will have our hides!"),
+(3439,3,0,12,0,100,"wizzlecrank SAY_PROGRESS_1","Looks like we're out of woods, eh? Wonder what this does..."),
+(3439,4,0,12,0,100,"wizzlecrank SAY_PROGRESS_2","Come on, don't break down on me now!"),
+(3439,5,0,12,0,100,"wizzlecrank SAY_PROGRESS_3","That was a close one! Well, let's get going, it's still a ways to Ratchet!"),
+(3439,6,0,12,0,100,"wizzlecrank SAY_END","Hmm... I don't think this blinking red light is a good thing...");
+
+-- muglash
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1800063 AND -1800054;
+DELETE FROM `creature_text` WHERE `entry`=12717;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(12717,0,0,12,0,100,"muglash SAY_MUG_START1","Are you sure that you are ready? If we do not have a group of your allies to aid us, we will surely fail."),
+(12717,1,0,12,0,100,"muglash SAY_MUG_START2","This will be a though fight, $N. Follow me closely."),
+(12717,2,0,12,0,100,"muglash SAY_MUG_BRAZIER","This is the brazier, $N. Put it out. Vorsha is a beast, worthy of praise from no one!"),
+(12717,3,0,12,0,100,"muglash SAY_MUG_BRAZIER_WAIT","Now we must wait. It won't be long before the naga realize what we have done."),
+(12717,4,0,12,0,100,"muglash SAY_MUG_ON_GUARD","Be on your guard, $N!"),
+(12717,5,0,12,0,100,"muglash SAY_MUG_REST","Perhaps we will get a moment to rest. But I will not give up until we have faced off against Vorsha!"),
+(12717,6,0,12,0,100,"muglash SAY_MUG_DONE","We have done it!"),
+(12717,7,0,12,0,100,"muglash SAY_MUG_GRATITUDE","You have my deepest gratitude. I thank you."),
+(12717,8,0,12,0,100,"muglash SAY_MUG_PATROL","I am going to patrol the area for a while longer and ensure that things are truly safe."),
+(12717,9,0,12,0,100,"muglash SAY_MUG_RETURN","Please return to Zoram'gar and report our success to the Warsong runner.");
+
+-- jaina hyjal
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1534008 AND -1534000;
+DELETE FROM `creature_text` WHERE `entry`=17772;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17772,0,0,14,11007,100,"jaina hyjal ATTACKED 1","I'm in jeopardy, help me if you can!"),
+(17772,0,1,14,11049,100,"jaina hyjal ATTACKED 2","They've broken through!"),
+(17772,1,0,14,11006,100,"jaina hyjal BEGIN","Don't give up! We must prevail!"),
+(17772,2,0,14,11008,100,"jaina hyjal INCOMING","Stay alert! Another wave approaches."),
+(17772,3,0,14,11050,100,"jaina hyjal RALLY 1","Hold them back as long as possible."),
+(17772,3,1,14,11051,100,"jaina hyjal RALLY 2","We must hold strong!"),
+(17772,4,0,14,11009,100,"jaina hyjal FAILURE","We are lost. Fall back!"),
+(17772,5,0,14,11011,100,"jaina hyjal SUCCESS","We have won valuable time. Now we must pull back!"),
+(17772,6,0,14,11010,100,"jaina hyjal DEATH","I did... my best.");
+
+-- thrall hyjal
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1534017 AND -1534009;
+DELETE FROM `creature_text` WHERE `entry`=17852;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17852,0,0,14,11031,100,"thrall hyjal ATTACKED 1","I will lie down for no one!"),
+(17852,0,1,14,11061,100,"thrall hyjal ATTACKED 2","Bring the fight to me and pay with your lives!"),
+(17852,1,0,14,11030,100,"thrall hyjal BEGIN","Hold them back! Do not falter!"),
+(17852,2,0,14,11032,100,"thrall hyjal INCOMING","Make ready for another wave! LOK-TAR OGAR!"),
+(17852,3,0,14,11059,100,"thrall hyjal RALLY 1","Victory or death!"),
+(17852,3,1,14,11060,100,"thrall hyjal RALLY 2","Do not give an inch of ground!"),
+(17852,4,0,14,11033,100,"thrall hyjal FAILURE","It is over. Withdraw! We have failed."),
+(17852,5,0,14,11035,100,"thrall hyjal SUCCESS","We have played our part and done well. It is up to the others now."),
+(17852,6,0,14,11034,100,"thrall hyjal DEATH","Uraaa...");
+
+-- lieutenant drake
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1560012 AND -1560006;
+DELETE FROM `creature_text` WHERE `entry`=17848;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17848,0,0,14,10428,100,"lieutenant drake SAY_ENTER","You there, fetch water quickly! Get these flames out before they spread to the rest of the keep! Hurry, damn you!"),
+(17848,1,0,14,10429,100,"lieutenant drake SAY_AGGRO","I know what you're up to, and I mean to put an end to it, permanently!"),
+(17848,2,0,14,10432,100,"lieutenant drake SAY_SLAY1","No more middling for you."),
+(17848,2,1,14,10433,100,"lieutenant drake SAY_SLAY2","You will not interfere!"),
+(17848,3,0,14,10430,100,"lieutenant drake SAY_MORTAL","Time to bleed!"),
+(17848,4,0,14,10431,100,"lieutenant drake SAY_SHOUT","Run, you blasted cowards!"),
+(17848,5,0,14,10434,100,"lieutenant drake SAY_DEATH","Thrall... must not... go free.");
+
+-- thrall hillsbrad
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1560049 AND -1560023;
+DELETE FROM `creature_text` WHERE `entry` IN (17876,18887);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17876,0,0,14,10465,100,"thrall hillsbrad SAY_TH_START_EVENT_PART1","Very well then. Let's go!"),
+(17876,1,0,12,0,100,"thrall hillsbrad SAY_TH_ARMORY","As long as we're going with a new plan, I may aswell pick up a weapon and some armor."),
+(17876,2,0,12,10466,100,"thrall hillsbrad SAY_TH_SKARLOC_MEET","A rider approaches!"),
+(17876,3,0,14,10467,100,"thrall hillsbrad SAY_TH_SKARLOC_TAUNT","I'll never be chained again!"),
+(17876,4,0,14,10468,100,"thrall hillsbrad SAY_TH_START_EVENT_PART2","Very well. Tarren Mill lies just west of here. Since time is of the essence..."),
+(17876,5,0,12,10469,100,"thrall hillsbrad SAY_TH_MOUNTS_UP","Let's ride!"),
+(17876,6,0,12,0,100,"thrall hillsbrad SAY_TH_CHURCH_END","Taretha must be in the inn. Let's go."),
+(17876,7,0,12,0,100,"thrall hillsbrad SAY_TH_MEET_TARETHA","Taretha! What foul magic is this?"),
+(17876,8,0,14,10470,100,"thrall hillsbrad SAY_TH_EPOCH_WONDER","Who or what was that?"),
+(17876,9,0,14,10471,100,"thrall hillsbrad SAY_TH_EPOCH_KILL_TARETHA","No!"),
+(17876,10,0,14,10472,100,"thrall hillsbrad SAY_TH_EVENT_COMPLETE","Goodbye, Taretha. I will never forget your kindness."),
+(17876,11,0,14,10458,100,"thrall hillsbrad SAY_TH_RANDOM_LOW_HP1","Things are looking grim..."),
+(17876,11,1,14,10459,100,"thrall hillsbrad SAY_TH_RANDOM_LOW_HP2","I will fight to the last!"),
+(17876,12,0,14,10460,100,"thrall hillsbrad SAY_TH_RANDOM_DIE1","Taretha..."),
+(17876,12,1,14,10461,100,"thrall hillsbrad SAY_TH_RANDOM_DIE2","A good day...to die..."),
+(17876,13,0,14,10448,100,"thrall hillsbrad SAY_TH_RANDOM_AGGRO1","I have earned my freedom!"),
+(17876,13,1,14,10449,100,"thrall hillsbrad SAY_TH_RANDOM_AGGRO2","This day is long overdue. Out of my way!"),
+(17876,13,2,14,10450,100,"thrall hillsbrad SAY_TH_RANDOM_AGGRO3","I am a slave no longer!"),
+(17876,13,3,14,10451,100,"thrall hillsbrad SAY_TH_RANDOM_AGGRO4","Blackmoore has much to answer for!"),
+(17876,14,0,14,10452,100,"thrall hillsbrad SAY_TH_RANDOM_KILL1","You have forced my hand!"),
+(17876,14,1,14,10453,100,"thrall hillsbrad SAY_TH_RANDOM_KILL2","It should not have come to this!"),
+(17876,14,2,14,10454,100,"thrall hillsbrad SAY_TH_RANDOM_KILL3","I did not ask for this!"),
+(17876,15,0,14,10455,100,"thrall hillsbrad SAY_TH_LEAVE_COMBAT1","I am truly in your debt, strangers."),
+(17876,15,1,14,10456,100,"thrall hillsbrad SAY_TH_LEAVE_COMBAT2","Thank you, strangers. You have given me hope."),
+(17876,15,2,14,10457,100,"thrall hillsbrad SAY_TH_LEAVE_COMBAT3","I will not waste this chance. I will seek out my destiny."),
+(18887,0,0,12,0,100,"taretha SAY_TA_FREE","I'm free! Thank you all!"),
+(18887,1,0,12,0,100,"taretha SAY_TA_ESCAPED","Thrall, you escaped!");
+
+-- skarloc
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1560005 AND -1560000;
+DELETE FROM `creature_text` WHERE `entry`=17862;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17862,0,0,14,10406,100,"skarloc SAY_ENTER","Thrall! You didn't really think you would escape did you? You and your allies shall answer to Blackmoore - after I've had my fun!"),
+(17862,1,0,14,10407,100,"skarloc SAY_TAUNT1","You're a slave. That's all you'll ever be."),
+(17862,2,0,14,10408,100,"skarloc SAY_TAUNT2","I don't know what Blackmoore sees in you. For my money, you're just another ignorant savage!"),
+(17862,3,0,14,10409,100,"skarloc SAY_SLAY1","Thrall will never be free!"),
+(17862,3,1,14,10410,100,"skarloc SAY_SLAY2","Did you really think you would leave here alive?"),
+(17862,4,0,14,10411,100,"skarloc SAY_DEATH","Guards! Urgh..Guards..!");
+
+-- epoch hunter
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1560022 AND -1560013;
+DELETE FROM `creature_text` WHERE `entry`=18096;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(18096,0,0,14,10418,100,"epoch hunter SAY_ENTER1","Thrall! Come outside and face your fate!"),
+(18096,0,1,14,10419,100,"epoch hunter SAY_ENTER2","Taretha's life hangs in the balance. Surely you care for her. Surely you wish to save her..."),
+(18096,0,2,14,10420,100,"epoch hunter SAY_ENTER3","Ah, there you are. I had hoped to accomplish this with a bit of subtlety, but I suppose direct confrontation was inevitable. Your future, Thrall, must not come to pass and so...you and your troublesome friends must die!"),
+(18096,1,0,14,10421,100,"epoch hunter SAY_AGGRO1","Enough! I will erase your very existence!"),
+(18096,1,1,14,10422,100,"epoch hunter SAY_AGGRO2","You cannot fight fate!"),
+(18096,2,0,14,10425,100,"epoch hunter SAY_SLAY1","You are...irrelevant."),
+(18096,2,1,14,10426,100,"epoch hunter SAY_SLAY2","Thrall will remain a slave. Taretha will die. You have failed."),
+(18096,3,0,14,10423,100,"epoch hunter SAY_BREATH1","Not so fast!"),
+(18096,3,1,14,10424,100,"epoch hunter SAY_BREATH2","Struggle as much as you like!"),
+(18096,4,0,14,10427,100,"epoch hunter SAY_DEATH","No!...The master... will not... be pleased.");
+
+-- meathook
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1595031 AND -1595026;
+DELETE FROM `creature_text` WHERE `entry`=26529;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(26529,0,0,14,13428,100,"meathook SAY_AGGRO","Play time!"),
+(26529,1,0,14,13430,100,"meathook SAY_SLAY_1","Boring..."),
+(26529,1,1,14,13431,100,"meathook SAY_SLAY_2","Why you stop moving?"),
+(26529,1,2,14,13432,100,"meathook SAY_SLAY_3","Get up! Me not done!"),
+(26529,2,0,14,13429,100,"meathook SAY_SPAWN","New toys!"),
+(26529,3,0,14,13433,100,"meathook SAY_DEATH","This... not fun...");
+
+-- epoch
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1595008 AND -1595000;
+DELETE FROM `creature_text` WHERE `entry`=26532;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(26532,0,0,14,13408,100,"epoch SAY_INTRO | culling SAY_PHASE314","Prince Arthas Menethil, on this day, a powerful darkness has taken hold of your soul. The death you are destined to visit upon others will this day be your own."),
+(26532,1,0,14,13409,100,"epoch SAY_AGGRO","We'll see about that, young prince."),
+(26532,2,0,14,13410,100,"epoch SAY_TIME_WARP_1","Tick tock, tick tock..."),
+(26532,2,1,14,13411,100,"epoch SAY_TIME_WARP_2","Not quick enough!"),
+(26532,2,2,14,13412,100,"epoch SAY_TIME_WARP_3","Let's get this over with. "),
+(26532,3,0,14,13413,100,"epoch SAY_SLAY_1","There is no future for you."),
+(26532,3,1,14,13414,100,"epoch SAY_SLAY_2","This is the hour of our greatest triumph!"),
+(26532,3,2,14,13415,100,"epoch SAY_SLAY_3","You were destined to fail."),
+(26532,4,0,12,13416,100,"epoch SAY_DEATH","");
+
+-- salramm
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1595044 AND -1595032;
+DELETE FROM `creature_text` WHERE `entry`=26530;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(26530,0,0,14,13472,100,"salramm SAY_AGGRO","Ah, the entertainment has arrived!"),
+(26530,1,0,14,13471,100,"salramm SAY_SPAWN","You are too late, champion of Lordaeron. The dead shall have their day."),
+(26530,2,0,14,13473,100,"salramm SAY_SLAY_1","The fun is just beginning!"),
+(26530,2,1,14,13474,100,"salramm SAY_SLAY_2","Aah, quality materials!"),
+(26530,2,2,14,13475,100,"salramm SAY_SLAY_3","Don't worry, I'll make good use of you."),
+(26530,3,0,14,13483,100,"salramm SAY_DEATH","You only advance... the master's plan..."),
+(26530,4,0,14,13478,100,"salramm SAY_EXPLODE_GHOUL_1","BOOM! Hahahahah..."),
+(26530,4,1,14,13479,100,"salramm SAY_EXPLODE_GHOUL_2","Blood... destruction... EXHILARATING!"),
+(26530,5,0,14,13480,100,"salramm SAY_STEAL_FLESH_1","I want a sample..."),
+(26530,5,1,14,13481,100,"salramm SAY_STEAL_FLESH_2","Such strength... it must be mine!"),
+(26530,5,2,14,13482,100,"salramm SAY_STEAL_FLESH_3","Your flesh betrays you."),
+(26530,6,0,14,13476,100,"salramm SAY_SUMMON_GHOULS_1","Say hello to some friends of mine."),
+(26530,6,1,14,13477,100,"salramm SAY_SUMMON_GHOULS_2","Come, citizen of Stratholme! Meet your saviors.");
+
+-- culling of stratholme
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1595120 AND -1595070;
+DELETE FROM `creature_text` WHERE `entry` IN (26499,26528,31126,28169,28167,26497);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+-- 26499
+(26499,0,0,12,12828,100,"culling SAY_PHASE101","Glad you could make it, Uther."),
+(26499,1,0,12,12829,100,"culling SAY_PHASE103","As if I could forget. Listen, Uther, there's something about the plague you should know..."),
+(26499,2,0,12,12830,100,"culling SAY_PHASE104","Oh, no. We're too late. These people have all been infected! They may look fine now, but it's just a matter of time before they turn into the undead!"),
+(26499,3,0,12,12831,100,"culling SAY_PHASE106","This entire city must be purged."),
+(26499,4,0,12,12832,100,"culling SAY_PHASE108","Damn it, Uther! As your future king, I order you to purge this city!"),
+(26499,5,0,12,12833,100,"culling SAY_PHASE110","Then I must consider this an act of treason."),
+(26499,6,0,12,12834,100,"culling SAY_PHASE112","Have I? Lord Uther, by my right of succession and the sovereignty of my crown, I hereby relieve you of your command and suspend your paladins from service."),
+(26499,7,0,12,12835,100,"culling SAY_PHASE114","It's done! Those of you who have the will to save this land, follow me! The rest of you... get out of my sight!"),
+(26499,8,0,12,12836,100,"culling SAY_PHASE116","Jaina?"),
+(26499,9,0,14,14327,100,"culling SAY_PHASE118","Take position here, and I will lead a small force inside Stratholme to begin the culling. We must contain and purge the infected for the sake of all of Lordaeron!"),
+(26499,10,0,12,14293,100,"culling SAY_PHASE201","Everyone looks ready. Remember, these people are all infected with the plague and will die soon. We must purge Stratholme to protect the remainder of Lordaeron from the Scourge. Let's go."),
+(26499,11,0,12,14294,100,"culling SAY_PHASE203","I can only help you with a clean death."),
+(26499,12,0,12,14295,100,"culling SAY_PHASE205","That was just the beginning."),
+(26499,13,0,14,14296,100,"culling SAY_PHASE208","I won't allow it, Mal'Ganis! Better that these people die by my hand than serve as your slaves in death!"),
+(26499,14,0,14,14885,100,"culling SAY_PHASE209","Mal'ganis will send out some of his Scourge minions to interfere with us. Those of you with the strongest steel and magic shall go forth and destroy them. I will lead the rest of my forces in purging Stratholme of the infected."),
+(26499,15,0,14,14297,100,"culling SAY_PHASE210","Champions, meet me at the Town Hall at once. We must take the fight to Mal'Ganis."),
+(26499,16,0,12,14298,100,"culling SAY_PHASE301","Follow me, I know the way through."),
+(26499,17,0,12,14299,100,"culling SAY_PHASE303","Yes, I'm glad I could get to you before the plague."),
+(26499,18,0,12,14300,100,"culling SAY_PHASE304","What is this sorcery?"),
+(26499,19,0,12,14301,100,"culling SAY_PHASE306. NEEDS VERIFICATION","Mal'Ganis appears to have more than scourge in his arsenal. We should make haste."),
+(26499,20,0,12,14302,100,"culling SAY_PHASE307","More vile sorcery! Be ready for anything!"),
+(26499,21,0,12,14303,100,"culling SAY_PHASE308","Let's move on."),
+(26499,22,0,12,14304,100,"culling SAY_PHASE309","Watch your backs: they have us surrounded in this hall."),
+(26499,23,0,12,0,100,"culling SAY_PHASE310. NEEDS VERIFICATION","One less obstacle to deal with."),
+(26499,24,0,12,14305,100,"culling SAY_PHASE311","Mal'Ganis is not making this easy."),
+(26499,25,0,12,14306,100,"culling SAY_PHASE312","They're very persistent."),
+(26499,26,0,12,14307,100,"culling SAY_PHASE313","What else can he put in my way?"),
+(26499,27,0,12,14309,100,"culling SAY_PHASE315","I do what I must for Lordaeron, and neither your words nor your actions will stop me."),
+(26499,28,0,12,14308,100,"culling SAY_PHASE401","The quickest path to Mal'Ganis lies behind that bookshelf ahead."),
+(26499,29,0,12,14310,100,"culling SAY_PHASE402","This will only take a moment."),
+(26499,30,0,12,14311,100,"culling SAY_PHASE403","I'm relieved this secret passage still works."),
+(26499,31,0,12,14312,100,"culling SAY_PHASE404","Let's move through here as quickly as possible. If the undead don't kill us, the fires might."),
+(26499,32,0,12,14313,100,"culling SAY_PHASE405","Rest a moment and clear your lungs, but we must move again soon."),
+(26499,33,0,12,14314,100,"culling SAY_PHASE406","That's enough; we must move again. Mal'Ganis awaits."),
+(26499,34,0,12,14315,100,"culling SAY_PHASE407","At last some good luck. Market Row has not caught fire yet. Mal'Ganis is supposed to be in Crusaders' Square, which is just ahead. Tell me when you're ready to move forward."),
+(26499,35,0,12,14316,100,"culling SAY_PHASE501","Justice will be done."),
+(26499,36,0,12,14317,100,"culling SAY_PHASE502","We're going to finish this right now, Mal'Ganis. Just you... and me."),
+(26499,37,0,12,14318,100,"culling SAY_PHASE503","I'll hunt you to the ends of the earth if I have to! Do you hear me? To the ends of the earth!"),
+(26499,38,0,12,14319,100,"culling SAY_PHASE504","You performed well this day. Anything that Mal'Ganis has left behind is yours. Take it as your reward. I must now begin plans for an expedition to Northrend."),
+-- 26528
+(26528,0,0,12,12839,100,"culling SAY_PHASE102","Watch your tone with me, boy. You may be the prince, but I'm still your superior as a paladin!"),
+(26528,1,0,12,12840,100,"culling SAY_PHASE105","What?"),
+(26528,2,0,12,12841,100,"culling SAY_PHASE107","How can you even consider that? There's got to be some other way."),
+(26528,3,0,12,12842,100,"culling SAY_PHASE109","You are not my king yet, boy! Nor would I obey that command even if you were!"),
+(26528,4,0,12,12843,100,"culling SAY_PHASE111","Treason? Have you lost your mind, Arthas?"),
+(26528,5,0,12,12844,100,"culling SAY_PHASE115","You've just crossed a terrible threshold, Arthas."),
+-- 26497
+(26497,0,0,12,12837,100,"culling SAY_PHASE113","Arthas! You can't just--"),
+(26497,1,0,12,12838,100,"culling SAY_PHASE117","I'm sorry, Arthas. I can't watch you do this."),
+-- 28167
+(28167,0,0,12,0,100,"culling SAY_PHASE202","Prince Arthas, may the light be praised! Many people in the town have begun to fall seriously ill, can you help us?"),
+-- 28169
+(28169,0,0,12,0,100,"culling SAY_PHASE204","What? This can't be!"),
+-- 31126
+(31126,0,0,12,0,100,"culling SAY_PHASE302","Ah, you've finally arrived Prince Arthas. You're here just in the nick of time."),
+(31126,1,0,12,0,100,"culling SAY_PHASE305","There's no need for you to understand, Arthas. All you need to do is die.");
+
+-- malganis
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1595025 AND -1595009;
+DELETE FROM `creature_text` WHERE `entry`=26533;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(26533,0,0,14,14410,100,"malganis SAY_INTRO_1 | culling SAY_PHASE206","Yes, this is the beginning. I've been waiting for you, young prince. I am Mal'Ganis."),
+(26533,1,0,14,14411,100,"malganis SAY_INTRO_2 | culling SAY_PHASE207","As you can see, your people are now mine. I will now turn this city household by household, until the flame of life has been snuffed out... forever."),
+(26533,2,0,14,14413,100,"malganis SAY_AGGRO","This will be a fine test...Prince Arthas..."),
+(26533,3,0,14,14416,100,"malganis SAY_KILL_1","All too easy..."),
+(26533,3,1,14,14417,100,"malganis SAY_KILL_2","The dark lord is displeased with your interference..."),
+(26533,3,2,14,14418,100,"malganis SAY_KILL_3","It is Prince Arthas I want... not you..."),
+(26533,4,0,14,14422,100,"malganis SAY_SLAY_1","Anak'Keri..."),
+(26533,4,1,14,14423,100,"malganis SAY_SLAY_2","My onslaught will wash over the Lich King's forces..."),
+(26533,4,2,14,14424,100,"malganis SAY_SLAY_3","Your death is in vain, tiny mortal..."),
+(26533,4,3,14,14425,100,"malganis SAY_SLAY_4","Your time has come to an end!"),
+(26533,5,0,14,14414,100,"malganis SAY_SLEEP_1","Time out..."),
+(26533,5,1,14,14415,100,"malganis SAY_SLEEP_2","You seem...tired..."),
+(26533,6,0,14,14426,100,"malganis SAY_30HEALTH","I spent too much time in that weak little shell..."),
+(26533,7,0,14,14427,100,"malganis SAY_15HEALTH","(Eredun) I AM MAL'GANIS! I AM ETERNAL!"),
+(26533,8,0,14,14428,100,"malganis SAY_ESCAPE_SPEECH_1","ENOUGH! I waste my time here...I must gather my strength on the home world..."),
+(26533,9,0,14,14429,100,"malganis SAY_ESCAPE_SPEECH_2","You'll never defeat the Lich King without my forces! I'll have my revenge...on him, AND you..."),
+(26533,10,0,14,14412,100,"malganis SAY_OUTRO","Your journey has just begun, young prince. Gather your forces and meet me in the artic land of Northrend. It is there that we shall settle the score between us. It is there that your true destiny will unfold.");
+
+-- chrono lord deja
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1269011 AND -1269006;
+DELETE FROM `creature_text` WHERE `entry`=17879;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17879,0,0,14,10412,100,"chrono lord deja SAY_ENTER","Why do you aid the Magus? Just think of how many lives could be saved if the portal is never opened, if the resulting wars could be erased ..."),
+(17879,1,0,14,10414,100,"chrono lord deja SAY_AGGRO","If you will not cease this foolish quest, then you will die!"),
+(17879,2,0,14,10413,100,"chrono lord deja SAY_BANISH","You have outstayed your welcome, Timekeeper. Begone!"),
+(17879,3,0,14,10415,100,"chrono lord deja SAY_SLAY1","I told you it was a fool's quest!"),
+(17879,3,1,14,10416,100,"chrono lord deja SAY_SLAY2","Leaving so soon?"),
+(17879,4,0,14,10417,100,"chrono lord deja SAY_DEATH","Time ... is on our side.");
+
+-- aeonus
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1269018 AND -1269012;
+DELETE FROM `creature_text` WHERE `entry`=17881;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17881,0,0,14,10400,100,"aeonus SAY_ENTER","The time has come to shatter this clockwork universe forever! Let us no longer be slaves of the hourglass! I warn you: those who do not embrace the greater path shall become victims of its passing!"),
+(17881,1,0,14,10402,100,"aeonus SAY_AGGRO","Let us see what fate lays in store..."),
+(17881,2,0,14,10401,100,"aeonus SAY_BANISH","Your time is up, slave of the past!"),
+(17881,3,0,14,10403,100,"aeonus SAY_SLAY1","One less obstacle in our way!"),
+(17881,3,1,14,10404,100,"aeonus SAY_SLAY2","No one can stop us! No one!"),
+(17881,4,0,14,10405,100,"aeonus SAY_DEATH","It is only a matter...of time."),
+(17881,5,0,16,0,100,"aeonus EMOTE_FRENZY","goes into a frenzy!");
+
+-- medivh
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1269028 AND -1269020;
+DELETE FROM `creature_text` WHERE `entry`=15608;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(15608,0,0,14,10435,100,"medivh SAY_ENTER","The time has come! Gul'dan, order your warlocks to double their efforts! Moments from now the gateway will open, and your Horde will be released upon this ripe, unsuspecting world!"),
+(15608,1,0,14,10436,100,"medivh SAY_INTRO","What is this? Champions, coming to my aid? I sense the hand of the dark one in this. Truly this sacred event bears his blessing?"),
+(15608,2,0,14,10437,100,"medivh SAY_WEAK75","Champions, my shield grows weak!"),
+(15608,3,0,14,10438,100,"medivh SAY_WEAK50","My powers must be concentrated on the portal! I do not have time to hold the shield!"),
+(15608,4,0,14,10439,100,"medivh SAY_WEAK25","The shield is nearly gone! All that I have worked for is in danger!"),
+(15608,5,0,14,10441,100,"medivh SAY_DEATH","No... damn this feeble mortal coil..."),
+(15608,6,0,14,10440,100,"medivh SAY_WIN","I am grateful for your aid, champions. Now, Gul'dan's Horde will sweep across this world, like a locust swarm, and all my designs, all my carefully laid plans will at last fall into place."),
+(15608,7,0,14,0,100,"medivh SAY_ORCS_ENTER","Orcs of the Horde! This portalis the gateway to your new destiny! Azeroth lies before you, ripe for the taking!"),
+(15608,8,0,14,0,100,"medivh SAY_ORCS_ANSWER","Gul'dan speaks the truth! We should return at once to tell our brothers of the news! Retreat back trought the portal!");
+
+-- temporus
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1269005 AND -1269000;
+DELETE FROM `creature_text` WHERE `entry`=17880;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17880,0,0,14,10442,100,"temporus SAY_ENTER","Why do you persist? Surely you can see the futility of it all. It is not too late! You may still leave with your lives ..."),
+(17880,1,0,14,10444,100,"temporus SAY_AGGRO","So be it ... you have been warned."),
+(17880,2,0,14,10443,100,"temporus SAY_BANISH","Time... sands of time is run out for you."),
+(17880,3,0,14,10445,100,"temporus SAY_SLAY1","You should have left when you had the chance."),
+(17880,3,1,14,10446,100,"temporus SAY_SLAY2","Your days are done."),
+(17880,4,0,14,10447,100,"temporus SAY_DEATH","My death means ... little.");
+
+-- sprysprocket
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000356 AND -1000351;
+DELETE FROM `creature_text` WHERE `entry`=23002;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(23002,0,0,14,0,100,"sprysprocket SAY_START","You, there! Hand over that moonstone and nobody gets hurt!"),
+(23002,1,0,15,0,100,"sprysprocket SAY_WHISPER_CHILL","Just chill!"),
+(23002,2,0,14,0,100,"sprysprocket SAY_END","All right, you win! I surrender! Just don't hurt me!"),
+(23002,3,0,41,0,100,"sprysprocket EMOTE_START","%s takes the Southfury moonstone and escapes into the river. Follow her!");
+
+
+-- mist
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000324 AND -1000323;
+DELETE FROM `creature_text` WHERE `entry`=3568;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(3568,0,0,12,0,100,"mist SAY_AT_HOME","Mist! I feared I would never see you again! Yes, I am well, do not worry for me. You must rest and recover your health."),
+(3568,1,0,16,0,100,"mist EMOTE_AT_HOME","%s growls in acknowledgement before straightening and making her way off into the forest.");
+
+-- anachronos the ancient
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1350030 AND -1350000;
+DELETE FROM `creature_text` WHERE `entry` IN (15381,15382,15379,15380,15378);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(15381,0,0,12,0,100,"anachronos the ancient ANACHRONOS_SAY_1","We must act quickly or all shall be lost!"),
+(15381,1,0,12,0,100,"anachronos the ancient ANACHRONOS_SAY_2","NOW, STAGHELM! WE GO NOW! Prepare your magic!"),
+(15381,2,0,12,0,100,"anachronos the ancient ANACHRONOS_SAY_3","Stay close..."),
+(15381,3,0,12,0,100,"anachronos the ancient ANACHRONOS_SAY_4","The sands of time will halt, but only for a moment! I will now conjure the barrier."),
+(15381,4,0,12,0,100,"anachronos the ancient ANACHRONOS_SAY_5","FINISH THE SPELL STAGHELM! I CANNOT HOLD THE GLYPHS OF WARDING IN PLACE MUCH LONGER! CALL FORTH THE ROOTS!"),
+(15381,5,0,12,0,100,"anachronos the ancient ANACHRONOS_SAY_6","It... It is over, Lord Staghelm. We are victorious. Albeit the cost for this victory was great."),
+(15381,6,0,12,0,100,"anachronos the ancient ANACHRONOS_SAY_7","There is but one duty that remains..."),
+(15381,7,0,12,0,100,"anachronos the ancient ANACHRONOS_SAY_8","Before I leave this place, I make one final offreing to you, Lord Staghelm. Should a time arise in which you must gain entry to this accursed fortress, use the Scepter of the Shifting Sands on the sacred gong. The magic holding the barrier together will dissipate and the horrors of Ahn'Qiraj will be unleashed upon the world once more."),
+(15381,8,0,12,0,100,"anachronos the ancient ANACHRONOS_SAY_9","Lord Staghelm, where are you going? You would shatter our bond for the sake of pride?"),
+(15381,9,0,12,0,100,"anachronos the ancient ANACHRONOS_SAY_10","And now you know all that there is to know, mortal..."),
+(15381,10,0,16,0,100,"anachronos the ancient ANACHRONOS_EMOTE_1","hands the Scepter of the Shifting Sands to Fandral Staghelm."),
+(15381,11,0,16,0,100,"anachronos the ancient ANACHRONOS_EMOTE_2","shakes his head in dissapointment."),
+(15381,12,0,16,0,100,"anachronos the ancient ANACHRONOS_EMOTE_3","kneels down to pick up the fragments of the shattered scepter."),
+(15382,0,0,12,0,100,"anachronos the ancient FANDRAL_SAY_1","My forces cannot overcome the Qiraji defenses. We will not be able to get close enough to place your precious barrier, dragon."),
+(15382,1,0,12,0,100,"anachronos the ancient FANDRAL_SAY_2","It is done dragon. Lead the way..."),
+(15382,2,0,12,0,100,"anachronos the ancient FANDRAL_SAY_3","Ancient ones guide my hand... Wake from your slumber! WAKE AND SEAL THIS CURSED PLACE!"),
+(15382,3,0,12,0,100,"anachronos the ancient FANDRAL_SAY_4","After the savagery that my people have witnessed and felt, you expect me to accept another burden, dragon? Surely you are mad."),
+(15382,4,0,12,0,100,"anachronos the ancient FANDRAL_SAY_5","I want nothing to do with Silithus, the Qiraji and least of all, any damned dragons!"),
+(15382,5,0,12,0,100,"anachronos the ancient FANDRAL_SAY_6","My son's soul will find no comfort in this hollow victory, dragon. I will have him back.Thought it takes a millennia, I WILL have my son back!"),
+(15382,6,0,16,0,100,"anachronos the ancient FANDRAL_EMOTE_1","falls to one knee - exhausted."),
+(15382,7,0,16,0,100,"anachronos the ancient FANDRAL_EMOTE_2","hurls the Scepter of the Shifting Sands into the barrier, shattering it."),
+(15379,0,0,12,0,100,"anachronos the ancient CAELESTRASZ_SAY_1","Aye, Fandral, remember these words: Let not your grief guide your faith. These thoughts you hold... dark places you go, night elf. Absolution cannot be had through misguided vengeance."),
+(15379,1,0,12,0,100,"anachronos the ancient CAELESTRASZ_SAY_2","Do not forget the sacrifices made on this day, night elf. We have all suffered immensely at the hands of these beasts."),
+(15379,2,0,14,0,100,"anachronos the ancient CAELESTRASZ_YELL_1","Alexstrasza grant me the resolve to drive our enemies back!"),
+(15380,0,0,12,0,100,"anachronos the ancient ARYGOS_SAY_1","This distraction will give you and the young druid time enough to seal the gate. Do not falter. Now, let us see how they deal with chaotic magic."),
+(15380,1,0,14,0,100,"anachronos the ancient ARYGOS_YELL_1","Let them feel the wrath of the Blue Flight! May Malygos protect me!"),
+(15380,2,0,16,0,100,"anachronos the ancient ARYGOS_EMOTE_1","nods knowingly."),
+(15378,0,0,12,0,100,"anachronos the ancient MERITHRA_SAY_1","There is a way..."),
+(15378,1,0,12,0,100,"anachronos the ancient MERITHRA_SAY_2","We will push them back, Anachronos. This I vow. Uphold the end of this task. Let not your hands falter as you seal our fates behind the barrier."),
+(15378,2,0,14,0,100,"anachronos the ancient MERITHRA_YELL_1","Succumb to the endless dream, little ones. Let it consume you!"),
+(15378,3,0,16,0,100,"anachronos the ancient MERITHRA_EMOTE_1","glances at her compatriots.");
diff --git a/sql/updates/world/2012_12_01_03_world_ulduar_creature_text.sql b/sql/updates/world/2012_12_01_03_world_ulduar_creature_text.sql
new file mode 100644
index 00000000000..82d93d7b7ae
--- /dev/null
+++ b/sql/updates/world/2012_12_01_03_world_ulduar_creature_text.sql
@@ -0,0 +1,174 @@
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1603341 AND -1603050;
+DELETE FROM `creature_text` WHERE `entry`=33350 AND `groupid`=15;
+DELETE FROM `creature_text` WHERE `entry` IN (
+33515, -- Auriaya
+33113, -- Flame Leviathan
+32906, -- Freya
+32913, -- Elder Ironbranch
+32914, -- Elder Stonebark
+32915, -- Elder Brightleaf
+32845, -- Hodir
+33118, -- Ignis
+32930, -- Kologarn
+33210, -- Expedition Commander
+33287, -- Expedition Engineer
+33186, -- Razorscale
+33233, -- Razorscale Controller
+33271, -- General Vezax
+33488, -- Saronite Vapor
+33293, -- XT-002 Deconstructor
+32865 -- Thorim
+);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Auriaya
+(33515,0,0,'Some things are better left alone!',14,0,100,0,0,15473,'Auriaya SAY_AGGRO'),
+(33515,1,1,'The secret dies with you!',14,0,100,0,0,15474,'Auriaya SAY_SLAY_1'),
+(33515,1,2,'There is no escape!',14,0,100,0,0,15475,'Auriaya SAY_SLAY_2'),
+(33515,2,0,'Auriaya screams in agony.',16,0,100,0,0,15476,'Auriaya SAY_DEATH'),
+(33515,3,0,'You waste my time!',14,0,100,0,0,15477,'Auriaya SAY_BERSERK'),
+(33515,4,0,'%s begins to cast Terrifying Screech.',41,0,100,0,0,0,'Auriaya EMOTE_FEAR'),
+(33515,5,0,'%s begins to activate the Feral Defender!',41,0,100,0,0,0,'Auriaya EMOTE_DEFENDER'),
+-- Flame Leviathan
+(33113, 0,0,'Hostile entities detected. Threat assessment protocol active. Primary target engaged. Time minus 30 seconds to re-evaluation.',14,0,100,0,0,15506,'Flame Leviathan SAY_AGGRO'),
+(33113, 1,0,'Threat assessment routine modified. Current target threat level: 0. Acquiring new target.',14,0,100,0,0,15521,'Flame Leviathan SAY_SLAY'),
+(33113, 2,0,'Total systems failure. Defense protocols breached. Leviathan unit shutting down.',14,0,100,0,0,15520,'Flame Leviathan SAY_DEATH'),
+(33113, 3,0,'Threat re-evaluated. Target assessment complete. Changing course.',14,0,100,0,0,15507,'Flame Leviathan SAY_TARGET_1'),
+(33113, 3,1,'Pursuit objective modified. Changing course.',14,0,100,0,0,15508,'Flame Leviathan SAY_TARGET_2'),
+(33113, 3,2,'Hostile entity stratagem predicted. Rerouting battle function. Changing course.',14,0,100,0,0,15509,'Flame Leviathan SAY_TARGET_3'),
+(33113, 4,0,'Orbital countermeasures enabled.',14,0,100,0,0,15510,'Flame Leviathan SAY_HARDMODE'),
+(33113, 5,0,'Alert! Static defense system failure. Orbital countermeasures disabled.',14,0,100,0,0,15511,'Flame Leviathan SAY_TOWER_NONE'),
+(33113, 6,0,'Hodir''s Fury online. Acquiring target.',14,0,100,0,0,15512,'Flame Leviathan SAY_TOWER_FROST'),
+(33113, 7,0,'Mimiron''s Inferno online. Acquiring target.',14,0,100,0,0,15513,'Flame Leviathan SAY_TOWER_FLAME'),
+(33113, 8,0,'Freya''s Ward online. Acquiring target.',14,0,100,0,0,15514,'Flame Leviathan SAY_TOWER_NATURE'),
+(33113, 9,0,'Thorim''s Hammer online. Acquiring target.',14,0,100,0,0,15515,'Flame Leviathan SAY_TOWER_STORM'),
+(33113,10,0,'Unauthorized entity attempting circuit overload. Activating anti-personnel countermeasures.',14,0,100,0,0,15516,'Flame Leviathan SAY_PLAYER_RIDING'),
+(33113,11,0,'System malfunction. Diverting power to support systems.',14,0,100,0,0,15517,'Flame Leviathan SAY_OVERLOAD_1'),
+(33113,11,1,'Combat matrix overload. Powering do-o-o-own...',14,0,100,0,0,15518,'Flame Leviathan SAY_OVERLOAD_2'),
+(33113,11,2,'System restart required. Deactivating weapon systems.',14,0,100,0,0,15519,'Flame Leviathan SAY_OVERLOAD_3'),
+(33113,12,0,'%s pursues $n.',41,0,100,0,0,0,'Flame Leviathan EMOTE_PURSUE'),
+(33113,13,0,'%s''s circuits overloaded.',41,0,100,0,0,0,'Flame Leviathan EMOTE_OVERLOAD'),
+(33113,14,0,'Automatic repair sequence initiated.',41,0,100,0,0,0,'Flame Leviathan EMOTE_REPAIR'),
+-- Freya
+(32906, 0,0,'The Conservatory must be protected!',14,0,100,0,0,15526,'Freya SAY_AGGRO'),
+(32906, 1,0,'Elders grant me your strength!',14,0,100,0,0,15527,'Freya SAY_AGGRO_WITH_ELDER'),
+(32906, 2,0,'Forgive me.',14,0,100,0,0,15529,'Freya SAY_SLAY_1'),
+(32906, 2,1,'From your death springs life anew!',14,0,100,0,0,15530,'Freya SAY_SLAY_2'),
+(32906, 3,0,'His hold on me dissipates. I can see clearly once more. Thank you, heroes.',14,0,100,0,0,15531,'Freya SAY_DEATH'),
+(32906, 4,0,'You have strayed too far, wasted too much time!',14,0,100,0,0,15532,'Freya SAY_BERSERK'),
+(32906, 5,0,'Eonar, your servant requires aid!',14,0,100,0,0,15528,'Freya SAY_SUMMON_CONSERVATOR'),
+(32906, 6,0,'Children, assist me!',14,0,100,0,0,15533,'Freya SAY_SUMMON_TRIO'),
+(32906, 7,0,'The swarm of the elements shall overtake you!',14,0,100,0,0,15534,'Freya SAY_SUMMON_LASHERS'),
+(32906, 8,0,'A |cFF00FFFFLifebinder''s Gift|r begins to grow!',41,0,100,0,0,0,'Freya EMOTE_LIFEBINDERS_GIFT'),
+(32906, 9,0,'Allies of Nature have appeared!',41,0,100,0,0,0,'Freya EMOTE_ALLIES_OF_NATURE'),
+(32906,10,0,'Freya begins to cast |cFFFF0000Ground Tremor!|r',41,0,100,0,0,0,'Freya EMOTE_GROUND_TREMOR'),
+(32906,11,0,'Freya casts |cFF00FF00Strengthened Iron Roots!|r',41,0,100,0,0,0,'Freya EMOTE_IRON_ROOTS'),
+-- Elder Ironbranch
+(32913,0,0,'Mortals have no place here!',14,0,100,0,0,15493,'Elder Ironbranch SAY_AGGRO'),
+(32913,1,0,'I return you whence you came!',14,0,100,0,0,15494,'Elder Ironbranch SAY_SLAY_1'),
+(32913,1,1,'BEGONE!',14,0,100,0,0,15495,'Elder Ironbranch SAY_SLAY_2'),
+(32913,2,0,'Freya! They come for you.',14,0,100,0,0,15496,'Elder Ironbranch SAY_DEATH'),
+-- Elder Stonebark
+(32914,0,0,'This place will serve as your graveyard.',14,0,100,0,0,15500,'Elder Stonebark SAY_AGGRO'),
+(32914,1,0,'<Angry roar>',14,0,100,0,0,15501,'Elder Stonebark SAY_SLAY_1'),
+(32914,1,1,'Such a waste.',14,0,100,0,0,15502,'Elder Stonebark SAY_SLAY_2'),
+(32914,2,0,'Matron, flee! They are ruthless....',14,0,100,0,0,15503,'Elder Stonebark SAY_DEATH'),
+-- Elder Brightleaf
+(32915,0,0,'Matron, the Conservatory has been breached!',14,0,100,0,0,15483,'Elder Brightleaf SAY_AGGRO'),
+(32915,1,0,'Fertilizer.',14,0,100,0,0,15485,'Elder Brightleaf SAY_SLAY_1'),
+(32915,1,1,'Your corpse will nourish the soil!',14,0,100,0,0,15486,'Elder Brightleaf SAY_SLAY_2'),
+(32915,2,0,'Matron, one has fallen!',14,0,100,0,0,15487,'Elder Brightleaf SAY_DEATH'),
+-- Hodir
+(32845,0,0,'You will suffer for this trespass!',14,0,100,0,0,15552,'Hodir SAY_AGGRO'),
+(32845,1,0,'Tragic. To come so far, only to fail.',14,0,100,0,0,15553,'Hodir SAY_SLAY_1'),
+(32845,1,1,'Welcome to the endless winter.',14,0,100,0,0,15554,'Hodir SAY_SLAY_2'),
+(32845,2,0,'Winds of the north consume you!',14,0,100,0,0,15555,'Hodir SAY_FLASH_FREEZE'),
+(32845,3,0,'%s roars furious.',16,0,100,0,0,15556,'Hodir SAY_STALACTITE'),
+(32845,4,0,'I... I am released from his grasp... at last.',14,0,100,0,0,15557,'Hodir SAY_DEATH'),
+(32845,5,0,'ENOUGH! This ends now!',14,0,100,0,0,15558,'Hodir SAY_BERSERK'),
+(32845,6,0,'%s shatters the Rare Cache of Hodir!',16,0,100,0,0,0,'Hodir SAY_HARD_MODE_MISSED'),
+(32845,7,0,'%s begins to cast Flash Freeze!',41,0,100,0,0,0,'Hodir - EMOTE_FREEZE'),
+(32845,8,0,'%s gains Frozen Blows!',41,0,100,0,0,0,'Hodir - EMOTE_BLOW'),
+-- Ignis
+(33118,0,0,'Insolent whelps! Your blood will temper the weapons used to reclaim this world!',14,0,100,0,0,15564,'Ignis SAY_AGGRO'),
+(33118,1,0,'Arise, soldiers of the iron crucible! The Makers'' will be done!',14,0,100,0,0,15565,'Ignis SAY_SUMMON'),
+(33118,2,0,'I will burn away your impurities!',14,0,100,0,0,15566,'Ignis SAY_SLAG_POT'),
+(33118,3,0,'Let the inferno consume you!',14,0,100,0,0,15567,'Ignis SAY_SCORCH_1'),
+(33118,3,1,'BURN! Burn in the Maker''s fire!',14,0,100,0,0,15568,'Ignis SAY_SCORCH_2'),
+(33118,4,0,'More scraps for the scrapheap!',14,0,100,0,0,15569,'Ignis SAY_SLAY_1'),
+(33118,4,1,'Your bones will serve as kindling!',14,0,100,0,0,15570,'Ignis SAY_SLAY_2'),
+(33118,5,0,'Let it be finished!',14,0,100,0,0,15571,'Ignis SAY_BERSERK'),
+(33118,6,0,'I. Have. Failed.',14,0,100,0,0,15572,'Ignis SAY_DEATH'),
+(33118,7,0,'%s begins to cast Flame Jets!',41,0,100,0,0,0,'Ignis EMOTE_JETS'),
+-- Kologarn
+(32930,0,0,'None shall pass!',14,0,100,0,0,15586,'Kologarn SAY_AGGRO'),
+(32930,1,0,'KOL-THARISH!',14,0,100,0,0,15587,'Kologarn SAY_SLAY_1'),
+(32930,1,1,'YOU FAIL!',14,0,100,0,0,15588,'Kologarn SAY_SLAY_2'),
+(32930,2,0,'Just a scratch!',14,0,100,0,0,15589,'Kologarn SAY_LEFT_ARM_GONE'),
+(32930,3,0,'Only a flesh wound!',14,0,100,0,0,15590,'Kologarn SAY_RIGHT_ARM_GONE'),
+(32930,4,0,'OBLIVION!',14,0,100,0,0,15591,'Kologarn SAY_SHOCKWAVE'),
+(32930,5,0,'I will squeeze the life from you!',14,0,100,0,0,15592,'Kologarn SAY_GRAB_PLAYER'),
+(32930,6,0,'Master, they come....',14,0,100,0,0,15593,'Kologarn SAY_DEATH'),
+(32930,7,0,'I am invincible!',14,0,100,0,0,15594,'Kologarn SAY_BERSERK'),
+(32930,8,0,'Kologarn casts Stone Grip!',41,0,100,0,0,15592,'Kologarn EMOTE_STONE_GRIP'),
+-- Expedition Commander
+(33210,0,0,'Welcome, champions! All of our attempts at grounding her have failed. We could use a hand in bring her down with these harpoon guns.',12,0,100,0,0,15647,'Expedition Commander SAY_INTRO'),
+(33210,1,0,'Move quickly! She won''t remain grounded for long!',14,0,100,0,0,15648,'Expedition Commander SAY_GROUND_PHASE'),
+(33210,2,0,'Be on the lookout! Mole machines will be surfacing soon with those nasty Iron dwarves aboard!',14,0,100,0,0,0,'Expedition Commander SAY_AGGRO_2'),
+-- Expedition Engineer
+(33287,0,0,'Give us a moment to prepare to build the turrets.',14,0,100,0,0,0,'Expedition Engineer SAY_AGGRO_1'),
+(33287,1,0,'Ready to move out, keep those dwarves off of our backs!',14,0,100,0,0,0,'Expedition Engineer SAY_AGGRO_3'),
+(33287,2,0,'Fires out! Let''s rebuild those turrets!',14,0,100,0,0,0,'SAY_TURRETS'),
+-- Razorscale
+(33186,0,0,'%s is grounded permanently!',41,0,100,0,0,0,'Razorscale EMOTE_PERMA'),
+(33186,1,0,'%s takes a deep breath...',41,0,100,0,0,0,'Razorscale EMOTE_BREATH'),
+-- Razorscale Controller
+(33233,0,0,'Harpoon Turret is ready for use!',41,0,100,0,0,0,'Razorscale Controller EMOTE_HARPOON'),
+-- General Vezax
+(33271,0,0,'Your destruction will herald a new age of suffering!',14,0,100,0,0,15542,'General Vezax SAY_AGGRO'),
+(33271,1,0,'You thought to stand before the legions of death... and survive?',14,0,100,0,0,15543,'General Vezax SAY_SLAY_1'),
+(33271,1,1,'Defiance... a flaw of mortality.',14,0,100,0,0,15544,'General Vezax SAY_SLAY_2'),
+(33271,2,0,'The black blood of Yogg-Saron courses through me! I. AM. UNSTOPPABLE!',14,0,100,0,0,15545,'General Vezax SAY_SURGE_OF_DARKNESS'),
+(33271,3,0,'Oh, what horrors await....',14,0,100,0,0,15546,'General Vezax SAY_DEATH'),
+(33271,4,0,'Your defeat was inevitable!',14,0,100,0,0,15547,'General Vezax SAY_BERSERK'),
+(33271,5,0,'Behold, now! Terror, absolute!',14,0,100,0,0,15548,'General Vezax SAY_HARDMODE'),
+(33271,6,0,'The saronite vapors mass and swirl violently, merging into a monstrous form!',41,0,100,0,0,0,'General Vezax - EMOTE_ANIMUS'),
+(33271,7,0,'A saronite barrier appears around General Vezax!',41,0,100,0,0,0,'General Vezax - EMOTE_BARRIER'),
+(33271,8,0,'%s roars and surges with dark might!',41,0,100,0,0,0,'General Vezax - EMOTE_SURGE_OF_DARKNESS'),
+-- Saronite Vapor
+(33488,0,0,'A cloud of saronite vapors coalesces nearby!',41,0,100,0,0,0,'Saronite Vapor - EMOTE_VAPORS'),
+-- XT-002 Deconstructor
+(33293, 0,0,'New toys? For me? I promise I won''t break them this time!',14,0,100,0,0,15724,'XT-002 Deconstructor SAY_AGGRO'),
+(33293, 1,0,'So tired. I will rest for just a moment!',14,0,100,0,0,15725,'XT-002 Deconstructor SAY_HEART_OPENED'),
+(33293, 2,0,'I''m ready to play!',14,0,100,0,0,15726,'XT-002 Deconstructor SAY_HEART_CLOSED'),
+(33293, 3,0,'NO! NO! NO! NO! NO!',14,0,100,0,0,15727,'XT-002 Deconstructor SAY_TYMPANIC_TANTRUM'),
+(33293, 4,0,'I... I think I broke it.',14,0,100,0,0,15728,'XT-002 Deconstructor SAY_SLAY_1'),
+(33293, 4,1,'I guess it doesn''t bend that way.',14,0,100,0,0,15729,'XT-002 Deconstructor SAY_SLAY_2'),
+(33293, 5,0,'I''m tired of these toys. I don''t want to play anymore!',14,0,100,0,0,15730,'XT-002 Deconstructor SAY_BERSERK'),
+(33293, 6,0, 'You are bad... Toys... Very... Baaaaad ',14,0,100,0,0,15731,'XT-002 Deconstructor SAY_DEATH'),
+(33293, 7,0,'Time for a new game! My old toys will fight my new toys!',14,0,100,0,0,15732,'XT-002 Deconstructor SAY_SUMMON'),
+(33293, 8,0,'%s''s heart is exposed and leaking energy.',41,0,100,0,0,0,'XT-002 Deconstructor EMOTE_HEART_OPENED'),
+(33293, 9,0,'%s''s heart is severed from his body.',41,0,100,0,0,0,'XT-002 Deconstructor EMOTE_HEART_CLOSED'),
+(33293,10,0,'%s begins to cause the earth to quake.',41,0,100,0,0,0,'XT-002 Deconstructor EMOTE_TYMPANIC_TANTRUM'),
+(33293,11,0,'%s consumes a scrap bot to repair himself!',41,0,100,0,0,0,'XT-002 Deconstructor EMOTE_SCRAPBOT'),
+-- Thorim
+(32865, 0,0,'Interlopers! You mortals who dare to interfere with my sport will pay... Wait--you...',14,0,100,0,0,15733,'Thorim SAY_AGGRO_1'),
+(32865, 0,1,'I remember you... In the mountains... But you... what is this? Where am--',14,0,100,0,0,15734,'Thorim SAY_AGGRO_2'),
+(32865, 1,0,'Behold the power of the storms and despair!',14,0,100,0,0,15735,'Thorim SAY_SPECIAL_1'),
+(32865, 2,0,'Do not hold back! Destroy them!',14,0,100,0,0,15736,'Thorim SAY_SPECIAL_2'),
+(32865, 3,0,'Have you begun to regret your intrusion?',14,0,100,0,0,15737,'Thorim SAY_SPECIAL_3'),
+(32865, 4,0,'Impertinent whelps, you dare challenge me atop my pedestal? I will crush you myself!',14,0,100,0,0,15738,'Thorim SAY_JUMPDOWN'),
+(32865, 5,0,'Can''t you at least put up a fight!?',14,0,100,0,0,15739,'Thorim SAY_SLAY_1'),
+(32865, 5,1,'Pathetic.',14,0,100,0,0,15740,'Thorim SAY_SLAY_2'),
+(32865, 6,0,'My patience has reached its limit!',14,0,100,0,0,15741,'Thorim SAY_BERSERK'),
+(32865, 7,0,'Failures! Weaklings!',14,0,100,0,0,15742,'Thorim SAY_WIPE'),
+(32865, 8,0,'Stay your arms! I yield!',14,0,100,0,0,15743,'Thorim SAY_DEATH'),
+(32865, 9,0,'I feel as though I am awakening from a nightmare, but the shadows in this place yet linger.',14,0,100,0,0,15744,'Thorim SAY_END_NORMAL_1'),
+(32865,10,0,'Sif... was Sif here? Impossible--she died by my brother''s hand. A dark nightmare indeed....',14,0,100,0,0,15745,'Thorim SAY_END_NORMAL_2'),
+(32865,11,0,'I need time to reflect.... I will aid your cause if you should require it. I owe you at least that much. Farewell.',14,0,100,0,0,15746,'Thorim SAY_END_NORMAL_3'),
+(32865,12,0,'You! Fiend! You are not my beloved! Be gone!',14,0,100,0,0,15747,'Thorim SAY_END_HARD_1'),
+(32865,13,0,'Behold the hand behind all the evil that has befallen Ulduar, left my kingdom in ruins, corrupted my brother, and slain my wife.',14,0,100,0,0,15748,'Thorim SAY_END_HARD_2'),
+(32865,14,0,'And now it falls to you, champions, to avenge us all. The task before you is great, but I will lend you my aid as I am able. You must prevail.',14,0,100,0,0,15749,'Thorim SAY_END_HARD_3');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=64604;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13,1,64604,0,0,31,0,4,0,0,0,0,0,'','Freya - Nature Bomb');
diff --git a/sql/updates/world/2012_12_01_04_world_spelldifficulty_dbc.sql b/sql/updates/world/2012_12_01_04_world_spelldifficulty_dbc.sql
new file mode 100644
index 00000000000..fe5df812c71
--- /dev/null
+++ b/sql/updates/world/2012_12_01_04_world_spelldifficulty_dbc.sql
@@ -0,0 +1,8 @@
+DELETE FROM `spelldifficulty_dbc` WHERE `id` IN (63573,63766,63716,62030,62166,63347) OR `spellid0` IN (63573,63766,63716,62030,62166,63347);
+INSERT INTO `spelldifficulty_dbc`(`id`,`spellid0`,`spellid1`) VALUES
+(63573,63573,64006), -- One-Armed Overhead Smash
+(63766,63766,63983), -- Arm Sweep
+(63716,63716,64005), -- Stone Shout
+(62030,62030,63980), -- Petrifying Breath
+(62166,62166,64005), -- Stone Grip
+(63347,63347,63977); -- Focused Eyebeam Periodic
diff --git a/sql/updates/world/2012_12_01_05_world_creature_template.sql b/sql/updates/world/2012_12_01_05_world_creature_template.sql
new file mode 100644
index 00000000000..aa2c6ebb898
--- /dev/null
+++ b/sql/updates/world/2012_12_01_05_world_creature_template.sql
@@ -0,0 +1 @@
+UPDATE `creature_template` SET `faction_A`=1885,`faction_H`=1885 WHERE `entry`=30884; -- Iskalder <The Ancient Hero>
diff --git a/sql/updates/world/2012_12_02_00_world_game_object.sql b/sql/updates/world/2012_12_02_00_world_game_object.sql
new file mode 100644
index 00000000000..3205159a703
--- /dev/null
+++ b/sql/updates/world/2012_12_02_00_world_game_object.sql
@@ -0,0 +1,24 @@
+-- Some Spell focus corrections
+-- Signal Fire
+SET @GUID :=99716;
+DELETE FROM `gameobject` WHERE `guid`=@GUID;
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+(@GUID,194151,571,1,1,4061.978,7109.135,170.0001,0,0,0,0,1,120,255,1);
+
+DELETE FROM `gameobject_template` WHERE `entry`=300242;
+
+-- Shrine Of Remulos
+UPDATE `gameobject` SET `id`=15885 WHERE `id`=300142;
+DELETE FROM `gameobject_template` WHERE `entry`=300142;
+
+-- Witherbark Village
+UPDATE `gameobject` SET `id`=142698 WHERE `id`=300016;
+DELETE FROM `gameobject_template` WHERE `entry`=300016;
+
+-- Maraudon Portal
+UPDATE `gameobject` SET `id`=178400 WHERE `id`=300037;
+DELETE FROM `gameobject_template` WHERE `entry`=300037;
+
+-- Scorched Grove Runeston
+UPDATE `gameobject` SET `id`=181260 WHERE `id`=300086;
+DELETE FROM `gameobject_template` WHERE `entry`=300086;
diff --git a/sql/updates/world/2012_12_02_01_world_creature_text.sql b/sql/updates/world/2012_12_02_01_world_creature_text.sql
new file mode 100644
index 00000000000..bd98fc8527c
--- /dev/null
+++ b/sql/updates/world/2012_12_02_01_world_creature_text.sql
@@ -0,0 +1,777 @@
+-- ------------------------------- --
+-- Creature text conversion part 5 --
+-- ------------------------------- --
+
+-- draenei survivor
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000183 AND -1000176;
+DELETE FROM `creature_text` WHERE `entry`=16483;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(16483,0,0,12,0,100,"draenei survivor SAY_HEAL1","The last thing I remember is the ship falling and us getting into the pods. I'll go see how I can help. Thank you!"),
+(16483,0,1,12,0,100,"draenei survivor SAY_HEAL2","$C, Where am I? Who are you? Oh no! What happened to the ship?"),
+(16483,0,2,12,0,100,"draenei survivor SAY_HEAL3","$C You saved me! I owe you a debt that I can never repay. I'll go see if I can help the others."),
+(16483,0,3,12,0,100,"draenei survivor SAY_HEAL4","Ugh... what is this place? Is that all that's left of the ship over there?"),
+(16483,1,0,12,0,100,"draenei survivor SAY_HELP1","Oh, the pain..."),
+(16483,1,1,12,0,100,"draenei survivor SAY_HELP2","Everything hurts, Please make it stop..."),
+(16483,1,2,12,0,100,"draenei survivor SAY_HELP3","Ughhh... I hurt. Can you help me?"),
+(16483,1,3,12,0,100,"draenei survivor SAY_HELP4","I don't know if I can make it, please help me...");
+
+-- engineer spark
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000186 AND -1000184;
+DELETE FROM `creature_text` WHERE `entry`=17243;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17243,0,0,12,0,100,"engineer spark SAY_TEXT","Yes Master, all goes along as planned."),
+(17243,1,0,16,0,100,"engineer spark EMOTE_SHELL","%s puts the shell to his ear."),
+(17243,2,0,14,0,100,"engineer spark SAY_ATTACK","Now I cut you!");
+
+-- magwin
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000116 AND -1000111;
+DELETE FROM `creature_text` WHERE `entry`=17312;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17312,0,0,12,0,100,"magwin SAY_START","Our house is this way, through the thicket."),
+(17312,1,0,12,0,100,"magwin SAY_AGGRO","Help me!"),
+(17312,2,0,12,0,100,"magwin SAY_PROGRESS","My poor family. Everything has been destroyed."),
+(17312,3,0,12,0,100,"magwin SAY_END1","Father! Father! You're alive!"),
+(17312,4,0,12,0,100,"magwin SAY_END2","You can thank $N for getting me back here safely, father."),
+(17312,5,0,16,0,100,"magwin EMOTE_HUG","%s hugs her father.");
+
+-- geezle
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000636 AND -1000629;
+DELETE FROM `creature_text` WHERE `entry` IN (17243,17318);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17318,0,0,12,0,100,"geezle GEEZLE_SAY_1","What's the big idea, Spark?"),
+(17243,0,0,12,0,100,"geezle SPARK_SAY_2","What's the big idea? You nearly blew my cover, idiot! I told you to put the compass and navigation maps somewhere safe - not out in the open for any fool to discover."),
+(17243,1,0,12,0,100,"geezle SPARK_SAY_3","The Master has gone to great lengths to secure information about the whereabouts of the Exodar. You could have blown the entire operation, including the cover of our spy on the inside."),
+(17318,1,0,12,0,100,"geezle GEEZLE_SAY_4","Relax, Spark! I have it all under control. We'll strip mine the Exodar right out from under 'em - making both you and I very, very rich in the process."),
+(17243,2,0,12,0,100,"geezle SPARK_SAY_5","Relax? Do you know what Kael'thas does to those that fail him, Geezle? Eternal suffering and pain... Do NOT screw this up, fool."),
+(17243,3,0,12,0,100,"geezle SPARK_SAY_6","Our Bloodmyst scouts have located our contact. The fool, Velen, will soon leave himself open and defenseless -- long enough for us to strike! Now get out of my sight before I vaporize you..."),
+(17318,2,0,12,0,100,"geezle GEEZLE_SAY_7","Yes, sir. It won't happen again..."),
+(17243,4,0,16,0,100,"geezle EMOTE_SPARK","picks up the naga flag.");
+
+-- stillpine capitive
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000476 AND -1000474;
+DELETE FROM `creature_text` WHERE `entry`=17375;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17375,0,0,12,0,100,"stillpine capitive CAPITIVE_SAY_1","[Fulborg] The Stillpine furbolgs will not soon forget your bravery!"),
+(17375,0,1,12,0,100,"stillpine capitive CAPITIVE_SAY_2","[Fulborg] Thank you, $N"),
+(17375,0,2,12,0,100,"stillpine capitive CAPITIVE_SAY_3","[Fulborg] Those remaining at Stillpine Hold will welcome you as a hero!");
+
+-- morridune
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1048004 AND -1048003;
+DELETE FROM `creature_text` WHERE `entry`=6729;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(6729,0,0,14,0,100,"morridune SAY_MORRIDUNE_1","Aku'mai is dead! At last,I can leave this wretched place."),
+(6729,1,0,12,0,100,"morridune SAY_MORRIDUNE_2","Speak with me to hear my tale");
+
+-- princess stillpine
+DELETE FROM `script_texts` WHERE `entry`=1800074;
+DELETE FROM `creature_text` WHERE `entry`=17682;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17682,0,0,12,0,100,"princess stillpine SAY_DIRECTION","Go to the west");
+
+-- kerlonian
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000444 AND -1000434;
+DELETE FROM `creature_text` WHERE `entry`=11218;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(11218,0,0,12,0,100,"kerlonian SAY_KER_START","Liladris has been waiting for me at Maestra's Post, so we should make haste, $N."),
+(11218,1,0,16,0,100,"kerlonian EMOTE_KER_SLEEP_1","%s looks very sleepy..."),
+(11218,1,1,16,0,100,"kerlonian EMOTE_KER_SLEEP_2","%s suddenly falls asleep"),
+(11218,1,2,16,0,100,"kerlonian EMOTE_KER_SLEEP_3","%s begins to drift off..."),
+(11218,2,0,12,0,100,"kerlonian SAY_KER_SLEEP_1","This looks like the perfect place for a nap..."),
+(11218,2,1,12,0,100,"kerlonian SAY_KER_SLEEP_2","Yaaaaawwwwwnnnn..."),
+(11218,2,2,12,0,100,"kerlonian SAY_KER_SLEEP_3","Oh, I am so tired..."),
+(11218,2,3,12,0,100,"kerlonian SAY_KER_SLEEP_4","You don't mind if I stop here for a moment, do you?"),
+(11218,3,0,12,0,100,"kerlonian SAY_KER_ALERT_1","Be on the alert! The Blackwood furbolgs are numerous in the area..."),
+(11218,3,1,12,0,100,"kerlonian SAY_KER_ALERT_2","It's quiet... Too quiet..."),
+(11218,4,0,12,0,100,"kerlonian SAY_KER_END","Oh, I can see Liladris from here... Tell her I'm here, won't you?"),
+(11218,5,0,16,0,100,"kerlonian EMOTE_KER_AWAKEN","%s wakes up!");
+
+-- remtravel
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000339 AND -1000327;
+DELETE FROM `creature_text` WHERE `entry`=2917;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(2917,0,0,12,0,100,"remtravel SAY_REM_START","Ok, $n, let's go find where I left that mysterious fossil. Follow me!"),
+(2917,1,0,12,0,100,"remtravel SAY_REM_RAMP1_1","Now where did I put that mysterious fossil? Ah, maybe up there..."),
+(2917,2,0,12,0,100,"remtravel SAY_REM_RAMP1_2","Hrm, nothing up here."),
+(2917,3,0,12,0,100,"remtravel SAY_REM_BOOK","No mysterious fossil here... Ah, but my copy of Green Hills of Stranglethorn. What a good book!"),
+(2917,4,0,12,0,100,"remtravel SAY_REM_TENT1_1","I bet you I left it in the tent!"),
+(2917,5,0,12,0,100,"remtravel SAY_REM_TENT1_2","Oh wait, that's Hollee's tent... and it's empty."),
+(2917,6,0,12,0,100,"remtravel SAY_REM_MOSS","Interesting... I hadn't noticed this earlier..."),
+(2917,7,0,16,0,100,"remtravel EMOTE_REM_MOSS","%s inspects the ancient, mossy stone."),
+(2917,8,0,12,0,100,"remtravel SAY_REM_MOSS_PROGRESS","Oh wait! I'm supposed to be looking for that mysterious fossil!"),
+(2917,9,0,12,0,100,"remtravel SAY_REM_PROGRESS","Nope. didn't leave the fossil back here!"),
+(2917,10,0,12,0,100,"remtravel SAY_REM_REMEMBER","Ah. I remember now! I gave the mysterious fossil to Hollee! Check with her."),
+(2917,11,0,16,0,100,"remtravel EMOTE_REM_END","%s goes back to work, oblivious to everything around him."),
+(2917,12,0,12,0,100,"remtravel SAY_REM_AGGRO","Something tells me this $r wants the mysterious fossil too. Help!");
+
+-- hendel
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000415 AND -1000411;
+DELETE FROM `creature_text` WHERE `entry`=4966;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(4966,0,0,12,0,100,"hendel SAY_PROGRESS_1_TER","Why don't we deal with you now, Hendel? Lady Proudmoore will speak for you back in the tower."),
+(4966,1,0,12,0,100,"hendel SAY_PROGRESS_2_HEN","Please... please... Miss Proudmore. I didn't mean to..."),
+(4966,2,0,12,0,100,"hendel SAY_PROGRESS_3_TER","I apologize for taking so long to get here. I wanted Lady Proudmoore to be present also."),
+(4966,3,0,12,0,100,"hendel SAY_PROGRESS_4_TER","We can only stay a few moments before returning to the tower. If you wish to speak to us more you may find us there."),
+(4966,4,0,16,0,100,"hendel EMOTE_SURRENDER","%s, too injured, gives up the chase.");
+
+-- zelfrax
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000473 AND -1000472;
+DELETE FROM `creature_text` WHERE `entry`=23864;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(23864,0,0,14,0,100,"zelfrax SAY_ZELFRAX1","This land was mine long before your wretched kind set foot here."),
+(23864,1,0,14,0,100,"zelfrax SAY_ZELFRAX2","All who venture here belong to me,including you!");
+
+-- oox
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000292 AND -1000287;
+DELETE FROM `creature_text` WHERE `entry`=7807;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(7807,0,0,12,0,100,"oox SAY_OOX_START","Emergency power activated! Initializing ambulanory motor! CLUCK!"),
+(7807,1,0,12,0,100,"oox SAY_OOX_AGGRO1","Physical threat detected! Evasive action! CLUCK!"),
+(7807,1,1,12,0,100,"oox SAY_OOX_AGGRO2","Thread analyzed! Activating combat plan beta! CLUCK!"),
+(7807,2,0,12,0,100,"oox SAY_OOX_AMBUSH","CLUCK! Sensors detect spatial anomaly - danger imminent! CLUCK!"),
+(7807,3,0,12,0,100,"oox SAY_OOX_END","Cloaking systems online! CLUCK! Engaging cloak for transport to Booty Bay!");
+
+-- kyle
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000342 AND -1000340;
+DELETE FROM `creature_text` WHERE `entry`=23616;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(23616,0,0,16,0,100,"kyle EMOTE_SEE_LUNCH","%s howls in delight at the sight of his lunch!"),
+(23616,1,0,16,0,100,"kyle EMOTE_EAT_LUNCH","%s eats his lunch."),
+(23616,2,0,16,0,100,"kyle EMOTE_DANCE","%s thanks you with a special dance.");
+
+-- willix
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1047010 AND -1047000;
+DELETE FROM `creature_text` WHERE `entry`=4508;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(4508,0,0,12,0,100,"willix SAY_READY","Phew! Finally, out here. However, it will not become easy. Detain your eyes after annoyance."),
+(4508,1,0,12,0,100,"willix SAY_POINT","There on top resides Charlga Razorflank. The damned old Crone."),
+(4508,2,0,12,0,100,"willix SAY_AGGRO1","Help! Get this Raging Agam'ar from me!"),
+(4508,3,0,12,0,100,"willix SAY_BLUELEAF","In this ditch there are Blueleaf Tuber! As if the gold waited only to be dug out, I say it you!"),
+(4508,4,0,12,0,100,"willix SAY_DANGER","Danger is behind every corner."),
+(4508,5,0,12,0,100,"willix SAY_BAD","I do not understand how these disgusting animals can live at such a place.... puh as this stinks!"),
+(4508,6,0,12,0,100,"willix SAY_THINK","I think, I see a way how we come out of this damned thorn tangle."),
+(4508,7,0,12,0,100,"willix SAY_SOON","I am glad that we are out again from this damned ditch. However, up here it is not much better!"),
+(4508,8,0,12,0,100,"willix SAY_FINALY","Finally! I am glad that I come, finally out here."),
+(4508,9,0,12,0,100,"willix SAY_WIN","I will rather rest a moment and come again to breath, before I return to Ratchet."),
+(4508,10,0,12,0,100,"willix SAY_END","Many thanks for your help.");
+
+-- threshwackonator
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000326 AND -1000325;
+DELETE FROM `creature_text` WHERE `entry`=6669;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(6669,0,0,16,0,100,"threshwackonator EMOTE_START","\"Threshwackonator First Mate unit prepared to follow\""),
+(6669,1,0,12,0,100,"threshwackonator SAY_AT_CLOSE","YARRR! Swabie, what have ye done?! He's gone mad! Baton him down the hatches! Hoist the mast! ARRRR! Every man for hi'self!");
+
+-- kodo round
+DELETE FROM `script_texts` WHERE `entry`=-1000350;
+DELETE FROM `creature_text` WHERE `entry`=9453;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(9453,0,0,12,0,100,"kodo round SAY_SMEED_HOME_3","That kodo sure is a beauty. Wait a minute, where are my bifocals? Perhaps you should inspect the beast for me.");
+
+-- oox
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000292 AND -1000287;
+DELETE FROM `creature_text` WHERE `entry` IN (7784,7805);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(7784,0,0,12,0,100,"oox SAY_OOX_START","Emergency power activated! Initializing ambulanory motor! CLUCK!"),
+(7784,1,0,12,0,100,"oox SAY_OOX_AGGRO1","Physical threat detected! Evasive action! CLUCK!"),
+(7784,1,1,12,0,100,"oox SAY_OOX_AGGRO2","Thread analyzed! Activating combat plan beta! CLUCK!"),
+(7784,2,0,12,0,100,"oox SAY_OOX_AMBUSH","CLUCK! Sensors detect spatial anomaly - danger imminent! CLUCK!"),
+(7805,0,0,12,0,100,"oox SAY_OOX17_AMBUSH_REPLY","No one challanges the Wastewander nomads - not even robotic chickens! ATTACK!"),
+(7784,3,0,12,0,100,"oox SAY_OOX_END","Cloaking systems online! CLUCK! Engaging cloak for transport to Booty Bay!");
+
+-- tooga
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000398 AND -1000391;
+DELETE FROM `creature_text` WHERE `entry` IN (5955,6015);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(5955,0,0,12,0,100,"tooga SAY_TOOG_THIRST","I'm Thirsty."),
+(5955,0,1,12,0,100,"tooga SAY_TOOG_WORRIED","Torta must be so worried."),
+(5955,1,0,12,0,100,"tooga SAY_TOOG_POST_1","Torta, my love! I have returned at long last."),
+(6015,0,0,12,0,100,"tooga SAY_TORT_POST_2","You have any idea how long I've been waiting here? And where's dinner? All that time gone and nothing to show for it?"),
+(5955,2,0,12,0,100,"tooga SAY_TOOG_POST_3","My dearest Torta. I have been gone for so long. Finally we are reunited. At long last our love can blossom again."),
+(6015,1,0,12,0,100,"tooga SAY_TORT_POST_4","Enough with the rambling. I am starving! Now, get your dusty shell into that ocean and bring momma some grub."),
+(5955,3,0,12,0,100,"tooga SAY_TOOG_POST_5","Yes Torta. Whatever your heart desires..."),
+(6015,2,0,12,0,100,"tooga SAY_TORT_POST_6","And try not to get lost this time...");
+
+-- cthun
+DELETE FROM `script_texts` WHERE `entry`=-1531011;
+DELETE FROM `creature_text` WHERE `entry`=15727;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(15727,0,0,16,0,100,"cthun EMOTE_WEAKENED","%s is weakened!");
+
+-- huhuran
+DELETE FROM `creature_text` WHERE `entry`=15509;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(15509,0,0,16,0,100,"huhuran EMOTE_FRENZY_KILL","%s goes into a killing frenzy!"),
+(15509,1,0,16,0,100,"huhuran EMOTE_BERSERK","%s goes into a berserker rage!");
+
+-- sartura
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1531010 AND -1531008;
+DELETE FROM `creature_text` WHERE `entry`=15516;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(15516,0,0,14,8646,100,"sartura SAY_AGGRO","You will be judged for defiling these sacred grounds! The laws of the Ancients will not be challenged! Trespassers will be annihilated!"),
+(15516,1,0,14,8647,100,"sartura SAY_SLAY","I sentence you to death!"),
+(15516,2,0,14,8648,100,"sartura SAY_DEATH","I serve to the last!");
+
+-- skeram
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1531007 AND -1531000;
+DELETE FROM `creature_text` WHERE `entry`=15263;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(15263,0,0,14,8615,100,"skeram SAY_AGGRO1","Are you so eager to die? I would be happy to accomodate you."),
+(15263,0,1,14,8616,100,"skeram SAY_AGGRO2","Cower mortals! The age of darkness is at hand."),
+(15263,0,2,14,8621,100,"skeram SAY_AGGRO3","Tremble! The end is upon you."),
+(15263,1,0,14,8617,100,"skeram SAY_SLAY1","Let your death serve as an example!"),
+(15263,1,1,14,8619,100,"skeram SAY_SLAY2","Spineless wretches! You will drown in rivers of blood!"),
+(15263,1,2,14,8620,100,"skeram SAY_SLAY3","The screams of the dying will fill the air. A symphony of terror is about to begin!"),
+(15263,2,0,14,8618,100,"skeram SAY_SPLIT","Prepare for the return of the ancient ones!"),
+(15263,3,0,14,8622,100,"skeram SAY_DEATH","You only delay... the inevetable.");
+
+-- kanati
+DELETE FROM `script_texts` WHERE `entry`=-1000410;
+DELETE FROM `creature_text` WHERE `entry`=10638;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(10638,0,0,12,0,100,"kanati SAY_KAN_START","Here they come! Defend yourself!");
+
+-- lakota
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000369 AND -1000365;
+DELETE FROM `creature_text` WHERE `entry`=10646;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(10646,0,0,12,0,100,"lakota SAY_LAKO_START","Be on guard... Arnak has some strange power over the Grimtotem... they will not be happy to see me escape."),
+(10646,1,0,12,0,100,"lakota SAY_LAKO_LOOK_OUT","Look out, the Grimtotem are upon us!"),
+(10646,2,0,12,0,100,"lakota SAY_LAKO_HERE_COME","Here they come."),
+(10646,3,0,12,0,100,"lakota SAY_LAKO_MORE","More Grimtotems are coming this way!"),
+(10646,4,0,12,0,100,"lakota SAY_LAKO_END","Finally, free at last... I must be going now, thanks for helping me escape. I can get back to Freewind Post by myself.");
+
+-- paoka
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000364 AND -1000362;
+DELETE FROM `creature_text` WHERE `entry`=10427;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(10427,0,0,12,0,100,"paoka SAY_START","Let's go $N. I am ready to reach Whitereach Post."),
+(10427,1,0,12,0,100,"paoka SAY_WYVERN","Now this looks familiar. If we keep heading east, I think we can... Ahh, Wyvern on the attack!"),
+(10427,2,0,12,0,100,"paoka SAY_COMPLETE","Thanks a bunch... I can find my way back to Whitereach Post from here. Be sure to talk with Motega Firemane; perhaps you can keep him from sending me home.");
+
+-- disciple
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1043017 AND -1043000;
+DELETE FROM `creature_text` WHERE `entry` IN (3679,3678);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(3678,0,0,14,0,100,"disciple SAY_AT_LAST","At last! Naralex can be awakened! Come aid me, brave adventurers!"),
+(3678,1,0,12,0,100,"disciple SAY_MAKE_PREPARATIONS","I must make the necessary preparations before the awakening ritual can begin. You must protect me!"),
+(3678,2,0,12,0,100,"disciple SAY_TEMPLE_OF_PROMISE","These caverns were once a temple of promise for regrowth in the Barrens. Now, they are the halls of nightmares."),
+(3678,3,0,12,0,100,"disciple SAY_MUST_CONTINUE","Come. We must continue. There is much to be done before we can pull Naralex from his nightmare."),
+(3678,4,0,12,0,100,"disciple SAY_BANISH_THE_SPIRITS","Within this circle of fire I must cast the spell to banish the spirits of the slain Fanglords."),
+(3678,5,0,12,0,100,"disciple SAY_CAVERNS_PURIFIED","The caverns have been purified. To Naralex's chamber we go!"),
+(3678,6,0,12,0,100,"disciple SAY_BEYOND_THIS_CORRIDOR","Beyond this corridor, Naralex lies in fitful sleep. Let us go awaken him before it is too late."),
+(3678,7,0,12,0,100,"disciple SAY_EMERALD_DREAM","Protect me brave souls as I delve into this Emerald Dream to rescue Naralex and put an end to this corruption!"),
+(3678,8,0,16,0,100,"disciple EMOTE_AWAKENING_RITUAL","%s begins to perform the awakening ritual on Naralex."),
+(3679,0,0,16,0,100,"naralex EMOTE_TROUBLED_SLEEP","%s tosses fitfully in troubled sleep."),
+(3679,1,0,16,0,100,"naralex EMOTE_WRITHE_IN_AGONY","%s writhes in agony. The Disciple seems to be breaking through."),
+(3679,2,0,16,0,100,"naralex EMOTE_HORRENDOUS_VISION","%s dreams up a horrendous vision. Something stirs beneath the murky waters."),
+(3678,9,0,12,0,100,"disciple SAY_MUTANUS_THE_DEVOURER","This Mutanus the Devourer is a minion from Naralex's nightmare no doubt!"),
+(3679,3,0,14,0,100,"naralex SAY_I_AM_AWAKE","I AM AWAKE, AT LAST!"),
+(3678,10,0,12,0,100,"disciple SAY_NARALEX_AWAKES","At last! Naralex awakes from the nightmare."),
+(3679,4,0,12,0,100,"naralex SAY_THANK_YOU","Ah, to be pulled from the dreaded nightmare! I thank you, my loyal Disciple, along with your brave companions."),
+(3679,5,0,12,0,100,"naralex SAY_FAREWELL","We must go and gather with the other Disciples. There is much work to be done before I can make another attempt to restore the Barrens. Farewell, brave souls!"),
+(3678,11,0,12,0,100,"disciple SAY_ATTACKED","Attacked! Help get this $N off of me!");
+
+-- weegli blastfuse
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1209001 AND -1209000;
+DELETE FROM `creature_text` WHERE `entry`=7607;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(7607,0,0,12,0,100,"weegli blastfuse SAY_WEEGLI_OHNO","Oh no! Here they come!"),
+(7607,1,0,12,0,100,"weegli blastfuse SAY_WEEGLI_OK_I_GO","OK. Here I go.");
+
+-- anub arak
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1601010 AND -1601000;
+DELETE FROM `creature_text` WHERE `entry`=29120;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(29120,0,0,14,14054,100,"anub arak SAY_AGGRO","Eternal aggony awaits you!"),
+(29120,1,0,14,14057,100,"anub arak SAY_SLAY_1","Soon, the Master's voice will call to you."),
+(29120,1,1,14,14056,100,"anub arak SAY_SLAY_2","You have made your choice."),
+(29120,1,2,14,14055,100,"anub arak SAY_SLAY_3","You shall experience my torment, first-hand!"),
+(29120,2,0,14,14069,100,"anub arak SAY_DEATH","Ahhh... RAAAAAGH! Never thought... I would be free of him..."),
+(29120,3,0,14,14060,100,"anub arak SAY_LOCUST_1","Your armor is useless againts my locusts."),
+(29120,3,1,14,14067,100,"anub arak SAY_LOCUST_2","Uunak-hissss tik-k-k-k-k!"),
+(29120,3,2,14,14068,100,"anub arak SAY_LOCUST_3","The pestilence upon you!"),
+(29120,4,0,14,14058,100,"anub arak SAY_SUBMERGE_1","Auum na-l ak-k-k-k, isshhh."),
+(29120,4,1,14,14059,100,"anub arak SAY_SUBMERGE_2","Come forth my brethren! Feast on their flesh."),
+(29120,5,0,14,14053,100,"anub arak SAY_INTRO","I was king of this empire once, long ago. In life I stood as champion. In death I returned as conqueror. Now I protect the kingdom once more. Ironic, yes? ");
+
+-- krik thir
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1601022 AND -1601011;
+DELETE FROM `creature_text` WHERE `entry`=28684;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(28684,0,0,14,14075,100,"krik thir SAY_AGGRO","This kingdom belongs to the Scourge! Only the dead may enter."),
+(28684,1,0,14,14077,100,"krik thir SAY_SLAY_1","You were foolish to come."),
+(28684,1,1,14,14078,100,"krik thir SAY_SLAY_2","As Anub'Arak commands!"),
+(28684,2,0,14,14087,100,"krik thir SAY_DEATH","I should be grateful. But I long ago lost the capacity."),
+(28684,3,0,14,14085,100,"krik thir SAY_SWARM_1","They hunger."),
+(28684,3,1,14,14086,100,"krik thir SAY_SWARM_2","Dinner time, my pets."),
+(28684,4,0,14,14082,100,"krik thir SAY_PREFIGHT_1","Keep an eye on the tunnel. We must not let anyone through!"),
+(28684,4,1,14,14083,100,"krik thir SAY_PREFIGHT_2","I hear footsteps. Be on your guard."),
+(28684,4,2,14,14084,100,"krik thir SAY_PREFIGHT_3","I sense the living. Be ready."),
+(28684,5,0,14,14079,100,"krik thir SAY_SEND_GROUP_1","We are besieged. Strike out and bring back their corpses!"),
+(28684,5,1,14,14080,100,"krik thir SAY_SEND_GROUP_2","We must hold the gate. Attack! Tear them limb from limb!"),
+(28684,5,2,14,14081,100,"krik thir SAY_SEND_GROUP_3","The gate must be protected at all costs. Rip them to shreds!");
+
+-- thassarian
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1571023 AND -1571004;
+DELETE FROM `creature_text` WHERE `entry` IN (25301,26203,26170,25250,25251);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+-- talbot
+(25301,0,0,12,0,100,"thassarian SAY_TALBOT_1","My liege, the infiltration and control of the Alliance power structure by our cultists is well underway."),
+(25301,1,0,12,0,100,"thassarian SAY_TALBOT_2","The power you've bestowed upon me has allowed me great mental influence over human minds. I bear these offerings as proof of my progress."),
+(25301,2,0,12,0,100,"thassarian SAY_TALBOT_3","Allow me to take care of the intruders, lord. I will feed their entrails to the maggots."),
+(25301,3,0,12,0,100,"thassarian SAY_TALBOT_4","Yes, my lord!"),
+-- arthas
+(26203,0,0,12,0,100,"thassarian SAY_LICH_1","Your progress in this region has been impressive, Blood Prince. I am pleased..."),
+(26203,1,0,12,0,100,"thassarian SAY_LICH_2","Now this is a surprise, Thassarian. I hadn't heard from Mograine or the other death knights for months. You've come to rejoin the Scourge, I take it?"),
+(26203,2,0,12,0,100,"thassarian SAY_LICH_3","Do not fail me, San'layn. Return to Icecrown with this fool's head or do not bother to return."),
+-- thassarian
+(26170,0,0,14,0,100,"thassarian SAY_THASSARIAN_1","Leryssa!"),
+(26170,1,0,14,0,100,"thassarian SAY_THASSARIAN_2","What have you done to my sister, you motherless elf scum!?"),
+(26170,2,0,12,0,100,"thassarian SAY_THASSARIAN_3","I would sooner slit my own throat. You will pay for what you did to your own men, Arthas... for what you did to me! I swear it."),
+(26170,3,0,12,0,100,"thassarian SAY_THASSARIAN_4","Leryssa... you... you're all right!"),
+(26170,4,0,12,0,100,"thassarian SAY_THASSARIAN_5","I cannot return home with you just yet, Leryssa. I am not quite done with the Scourge."),
+(26170,5,0,12,0,100,"thassarian SAY_THASSARIAN_6","You might be right, sister. My obligations to my land and King have been fulfilled. But there is still something that I owe to myself."),
+(26170,6,0,12,0,100,"thassarian SAY_THASSARIAN_7","Do not worry, Leryssa. I will come back to you when I'm done. Nothing in the world will stop me from coming home to the only family that I have left."),
+-- arlos
+(25250,0,0,12,0,100,"thassarian SAY_ARLOS_1","What... what happened to me?"),
+(25250,1,0,12,0,100,"thassarian SAY_ARLOS_2","Ugh! My head won't stop spinning..."),
+-- leryssa
+(25251,0,0,14,0,100,"thassarian SAY_LERYSSA_1","Thassarian, you're alive!"),
+(25251,1,0,12,0,100,"thassarian SAY_LERYSSA_2","I thought... I thought you were... dead."),
+(25251,2,0,12,0,100,"thassarian SAY_LERYSSA_3","Don't leave me again! You want to fight for your country, but they don't even want you! They sent you here to die!"),
+(25251,3,0,12,0,100,"thassarian SAY_LERYSSA_4","I know that look in your eye... I'm not going to be able to talk you out of this. If you die on me again...");
+
+-- mootoo the younger
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1750044 AND -1750040;
+DELETE FROM `creature_text` WHERE `entry`=25504;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(25504,0,0,12,0,100,"mootoo the younger SAY_1","My father's aura is quite strong,he cannot be far. Could you be a doll and fight off the monsters wandering throught the mist?"),
+(25504,1,0,12,0,100,"mootoo the younger SAY_2","Watch out for the monsters!Which way should we go first? Let's try this way..."),
+(25504,2,0,12,0,100,"mootoo the younger SAY_3","What could this be?"),
+(25504,3,0,12,0,100,"mootoo the younger SAY_4","There's no sign of it ending! Where could my father be?"),
+(25504,4,0,12,0,100,"mootoo the younger SAY_5","Father! You're safe!");
+
+-- imprisoned beryl sorcerer
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1571030 AND -1571024;
+DELETE FROM `creature_text` WHERE `entry`=25478;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(25478,0,0,12,0,100,"imprisoned beryl sorcerer SAY_IMPRISIONED_BERYL_1","Pathetic fool! A servant of Malygos would sooner die than aid an enemy..."),
+(25478,1,0,12,0,100,"imprisoned beryl sorcerer SAY_IMPRISIONED_BERYL_2","Aargh! Do your worst, $C ! I'll tell you NOTHING!"),
+(25478,2,0,12,0,100,"imprisoned beryl sorcerer SAY_IMPRISIONED_BERYL_3","Aahhhh! Release me! I am of no use to you. I swear it!"),
+(25478,3,0,12,0,100,"imprisoned beryl sorcerer SAY_IMPRISIONED_BERYL_4","Stop! I beg you, please stop. Please..."),
+(25478,4,0,12,0,100,"imprisoned beryl sorcerer SAY_IMPRISIONED_BERYL_5","Alright! I am beaten. Your previous archmage is held in a prison, elevated and sealed. Even if you manage to reach her, Salrand herself holds the key. Your mission is folly!"),
+(25478,5,0,12,0,100,"imprisoned beryl sorcerer SAY_IMPRISIONED_BERYL_6","I've given you the information, $C ! You're wasting your time...."),
+(25478,6,0,12,0,100,"imprisoned beryl sorcerer SAY_IMPRISIONED_BERYL_7","Noooo! This torture is inhumane! You have what you want... why don't you just kill me?");
+
+-- bonker togglevolt
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1700003 AND -1700002;
+DELETE FROM `creature_text` WHERE `entry`=25589;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(25589,0,0,12,0,100,"bonker togglevolt","I AM NOT AN APPETIZER!"),
+(25589,1,0,12,0,100,"bonker togglevolt","I'll make you a deal: If you get me out of here alive,you'll get a reward larger than you can imagine!");
+
+-- hidden cultist
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1571047 AND -1571044;
+DELETE FROM `creature_text` WHERE `entry` IN (25827,25248,25828);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(25827,0,0,12,0,100,"hidden cultist SAY_HIDDEN_CULTIST_1","Well..."),
+(25827,1,0,12,0,100,"hidden cultist SAY_HIDDEN_CULTIST_2","Finally! This charade is over... Arthas give me strength!"),
+(25827,2,0,12,0,100,"hidden cultist SAY_HIDDEN_CULTIST_3","You don't know who you're messing with! Death beckons!"),
+(25827,3,0,12,0,100,"hidden cultist SAY_HIDDEN_CULTIST_4","I suppose this is it, then? I won't go down quietly!"),
+(25248,0,0,12,0,100,"hidden cultist SAY_HIDDEN_CULTIST_1","Well..."),
+(25248,1,0,12,0,100,"hidden cultist SAY_HIDDEN_CULTIST_2","Finally! This charade is over... Arthas give me strength!"),
+(25248,2,0,12,0,100,"hidden cultist SAY_HIDDEN_CULTIST_3","You don't know who you're messing with! Death beckons!"),
+(25248,3,0,12,0,100,"hidden cultist SAY_HIDDEN_CULTIST_4","I suppose this is it, then? I won't go down quietly!"),
+(25828,0,0,12,0,100,"hidden cultist SAY_HIDDEN_CULTIST_1","Well..."),
+(25828,1,0,12,0,100,"hidden cultist SAY_HIDDEN_CULTIST_2","Finally! This charade is over... Arthas give me strength!"),
+(25828,2,0,12,0,100,"hidden cultist SAY_HIDDEN_CULTIST_3","You don't know who you're messing with! Death beckons!"),
+(25828,3,0,12,0,100,"hidden cultist SAY_HIDDEN_CULTIST_4","I suppose this is it, then? I won't go down quietly!");
+
+-- lord kelriss
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1048002 AND -1048000;
+DELETE FROM `creature_text` WHERE `entry`=4832;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(4832,0,0,14,5803,100,"lord kelriss SAY_AGRRO","Just...Dust..."),
+(4832,1,0,14,5804,100,"lord kelriss SAY_SLEEP","Sleep..."),
+(4832,2,0,14,5802,100,"lord kelriss SAY_DEATH","Who dares disturb my meditation!");
+
+-- theramore guard
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000649 AND -1000641;
+DELETE FROM `creature_text` WHERE `entry`=4979;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(4979,0,0,12,0,100,"theramore guard SAY_QUEST1","Hey, thanks."),
+(4979,1,0,12,0,100,"theramore guard SAY_QUEST2","...receive 50 percent off deserter undergarments? What is this garbage?"),
+(4979,1,1,12,0,100,"theramore guard SAY_QUEST2","...to establish a fund for the purchase of hair gel? I like my hair the way it is, thanks!"),
+(4979,1,2,12,0,100,"theramore guard SAY_QUEST2","...the deserters seek a Theramore where citizens will be free to juggle at all hours of the day? What is this nonsense?"),
+(4979,1,3,12,0,100,"theramore guard SAY_QUEST2","...to establish the chicken as the official symbol of Theramore?! These guys are nuts!"),
+(4979,1,4,12,0,100,"theramore guard SAY_QUEST2","...as a deserter, you'll enjoy activities like tethered swimming and dog grooming? How ridiculous!"),
+(4979,2,0,12,0,100,"theramore guard SAY_QUEST3","This... this is a joke, right?"),
+(4979,2,1,12,0,100,"theramore guard SAY_QUEST3","I'd never join anything like this. Better keep this, though. It'll come in handy in the privy..."),
+(4979,2,2,12,0,100,"theramore guard SAY_QUEST3","What a bunch of lunatics! You actually believe this stuff?");
+
+-- sartharion
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1615031 AND -1615018;
+DELETE FROM `creature_text` WHERE `entry`=28860;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(28860,0,0,14,14093,100,"sartharion SAY_SARTHARION_AGGRO","It is my charge to watch over these eggs. I will see you burn before any harm comes to them!"),
+(28860,1,0,14,14103,100,"sartharion SAY_SARTHARION_BERSERK","This pathetic siege ends NOW!"),
+(28860,2,0,14,14098,100,"sartharion SAY_SARTHARION_BREATH","Burn, you miserable wretches!"),
+(28860,3,0,14,14105,100,"sartharion SAY_SARTHARION_CALL_SHADRON","Shadron! Come to me, all is at risk!"),
+(28860,4,0,14,14106,100,"sartharion SAY_SARTHARION_CALL_TENEBRON","Tenebron! The eggs are yours to protect as well!"),
+(28860,5,0,14,14104,100,"sartharion SAY_SARTHARION_CALL_VESPERON","Vesperon! The clutch is in danger! Assist me!"),
+(28860,6,0,14,14107,100,"sartharion SAY_SARTHARION_DEATH","Such is the price... of failure..."),
+(28860,7,0,14,14099,100,"sartharion SAY_SARTHARION_SPECIAL_1","Such flammable little insects...."),
+(28860,7,1,14,14100,100,"sartharion SAY_SARTHARION_SPECIAL_2","Your charred bones will litter the floor!"),
+(28860,7,2,14,14101,100,"sartharion SAY_SARTHARION_SPECIAL_3","How much heat can you take?"),
+(28860,7,3,14,14102,100,"sartharion SAY_SARTHARION_SPECIAL_4","All will be reduced to ash!"),
+(28860,8,0,14,14094,100,"sartharion SAY_SARTHARION_SLAY_1","You will make a fine meal for the hatchlings."),
+(28860,8,1,14,14096,100,"sartharion SAY_SARTHARION_SLAY_2","You are the grave disadvantage."),
+(28860,8,2,14,14097,100,"sartharion SAY_SARTHARION_SLAY_3","This is why we call you lesser beeings."),
+(28860,9,0,42,0,100,"sartharion WHISPER_LAVA_CHURN","The lava surrounding %s churns!");
+
+-- tenebron
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1615016 AND -1615009;
+DELETE FROM `creature_text` WHERE `entry`=30452;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(30452,0,0,14,14122,100,"tenebron SAY_TENEBRON_AGGRO","You have no place here. Your place is among the departed."),
+(30452,1,0,14,14123,100,"tenebron SAY_TENEBRON_SLAY_1","No contest."),
+(30452,1,1,14,14124,100,"tenebron SAY_TENEBRON_SLAY_2","Typical... Just as I was having fun."),
+(30452,2,0,14,14129,100,"tenebron SAY_TENEBRON_DEATH","I should not... have held back..."),
+(30452,3,0,14,14125,100,"tenebron SAY_TENEBRON_BREATH","To darkness I condemn you..."),
+(30452,4,0,14,14128,100,"tenebron SAY_TENEBRON_RESPOND","It is amusing to watch you struggle. Very well, witness how it is done."),
+(30452,5,0,14,14126,100,"tenebron SAY_TENEBRON_SPECIAL_1","Arrogant little creatures! To challenge powers you do not yet understand..."),
+(30452,5,1,14,14127,100,"tenebron SAY_TENEBRON_SPECIAL_2","I am no mere dragon! You will find I am much, much, more..."),
+(30452,6,0,42,0,100,"tenebron WHISPER_HATCH_EGGS","%s begins to hatch eggs in the twilight!");
+
+-- shadron
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1615007 AND -1615000;
+DELETE FROM `creature_text` WHERE `entry`=30451;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(30451,0,0,14,14111,100,"shadron SAY_SHADRON_AGGRO","I fear nothing! Least of all you!"),
+(30451,1,0,14,14112,100,"shadron SAY_SHADRON_SLAY_1","You are insignificant!"),
+(30451,1,1,14,14113,100,"shadron SAY_SHADRON_SLAY_2","Such mediocre resistance!"),
+(30451,2,0,14,14118,100,"shadron SAY_SHADRON_DEATH","We...are superior! How could this...be..."),
+(30451,3,0,14,14114,100,"shadron SAY_SHADRON_BREATH","You are easily bested! "),
+(30451,4,0,14,14117,100,"shadron SAY_SHADRON_RESPOND","I will take pity on you Sartharion, just this once."),
+(30451,5,0,14,14115,100,"shadron SAY_SHADRON_SPECIAL_1","Father tought me well!"),
+(30451,5,1,14,14116,100,"shadron SAY_SHADRON_SPECIAL_2","On your knees!"),
+(30451,6,0,42,0,100,"shadron WHISPER_OPEN_PORTAL","%s begins to open a Twilight Portal!");
+
+-- vesperon
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1615040 AND -1615033;
+DELETE FROM `creature_text` WHERE `entry`=30449;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(30449,0,0,14,14133,100,"vesperon SAY_VESPERON_AGGRO","You pose no threat, lesser beings...give me your worst!"),
+(30449,1,0,14,14134,100,"vesperon SAY_VESPERON_SLAY_1","The least you could do is put up a fight..."),
+(30449,1,1,14,14135,100,"vesperon SAY_VESPERON_SLAY_2","Was that the best you can do?"),
+(30449,2,0,14,14140,100,"vesperon SAY_VESPERON_DEATH","I still have some...fight..in...me..."),
+(30449,3,0,14,14136,100,"vesperon SAY_VESPERON_BREATH","I will pick my teeth with your bones!"),
+(30449,4,0,14,14139,100,"vesperon SAY_VESPERON_RESPOND","Father was right about you, Sartharion...You are a weakling!"),
+(30449,5,0,14,14137,100,"vesperon SAY_VESPERON_SPECIAL_1","Aren't you tricky...I have a few tricks of my own..."),
+(30449,5,1,14,14138,100,"vesperon SAY_VESPERON_SPECIAL_2","Unlike, I have many talents."),
+(30449,6,0,42,0,100,"vesperon WHISPER_OPEN_PORTAL","%s begins to open a Twilight Portal!");
+
+-- novos
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1600005 AND -1600000;
+DELETE FROM `creature_text` WHERE `entry`=26631;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(26631,0,0,14,13173,100,"novos SAY_AGGRO","The chill that you feel is the herald of your doom!"),
+(26631,1,0,14,13175,100,"novos SAY_KILL","Such is the fate of all who oppose the Lich King."),
+(26631,2,0,14,13174,100,"novos SAY_DEATH","Your efforts... are in vain."),
+(26631,3,0,14,13176,100,"novos SAY_NECRO_ADD","Bolster my defenses! Hurry, curse you!"),
+(26631,4,0,14,13177,100,"novos SAY_REUBBLE_1","Surely you can see the futility of it all!"),
+(26631,4,1,14,13178,100,"novos SAY_REUBBLE_2","Just give up and die already!");
+
+-- tharon ja
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1600018 AND -1600011;
+DELETE FROM `creature_text` WHERE `entry`=26632;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(26632,0,0,14,13862,100,"tharon ja SAY_AGGRO","Tharon'ja sees all! The work of mortals shall not end the eternal dynasty!"),
+(26632,1,0,14,13863,100,"tharon ja SAY_KILL_1","As Tharon'ja predicted."),
+(26632,1,1,14,13864,100,"tharon ja SAY_KILL_2","As it was written."),
+(26632,2,0,14,13865,100,"tharon ja SAY_FLESH_1","Your flesh serves Tharon'ja now!"),
+(26632,2,1,14,13866,100,"tharon ja SAY_FLESH_2","Tharon'ja has a use for your mortal shell!"),
+(26632,3,0,14,13867,100,"tharon ja SAY_SKELETON_1","No! A taste... all too brief!"),
+(26632,3,1,14,13868,100,"tharon ja SAY_SKELETON_2","Tharon'ja will have more!"),
+(26632,4,0,14,13869,100,"tharon ja SAY_DEATH","I'm... impossible! Tharon'ja is eternal! Tharon'ja... is...");
+
+-- trollgore
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1600010 AND -1600006;
+DELETE FROM `creature_text` WHERE `entry`=26630;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(26630,0,0,14,13181,100,"trollgore SAY_AGGRO","More grunts, more glands, more FOOD!"),
+(26630,1,0,14,13185,100,"trollgore SAY_KILL","You have gone, me gonna eat you!"),
+(26630,2,0,14,13182,100,"trollgore SAY_CONSUME","So hungry! Must feed!"),
+(26630,3,0,14,13184,100,"trollgore SAY_EXPLODE","Corpse go boom!"),
+(26630,4,0,14,13183,100,"trollgore SAY_DEATH","Aaaargh...");
+
+-- bronjham
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1632006 AND -1632001;
+DELETE FROM `creature_text` WHERE `entry`=36497;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(36497,0,0,14,16595,100,"bronjham SAY_AGGRO","Finally...a captive audience!"),
+(36497,1,0,14,16596,100,"bronjham SAY_SLAY_1","Fodder for the engine!"),
+(36497,1,1,14,16597,100,"bronjham SAY_SLAY_2","Another soul to strengthen the host!"),
+(36497,2,0,14,16598,100,"bronjham SAY_DEATH",""),
+(36497,3,0,14,16599,100,"bronjham SAY_SOUL_STORM","The vortex of the harvested calls to you!"),
+(36497,4,0,14,16600,100,"bronjham SAY_CORRUPT_SOUL","I will sever the soul from your body!");
+
+-- devoureur
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1632030 AND -1632010;
+DELETE FROM `creature_text` WHERE `entry` IN (36502,38160,38161);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(36502,0,0,14,16884,100,"devoureur SAY_FACE_ANGER_AGGRO","You dare look upon the host of souls? I SHALL DEVOUR YOU WHOLE!"),
+(36502,0,1,14,16890,100,"devoureur SAY_FACE_DESIRE_AGGRO","You dare look upon the host of souls? I SHALL DEVOUR YOU WHOLE!"),
+(36502,1,0,14,16885,100,"devoureur SAY_FACE_ANGER_SLAY_1","Damnation!"),
+(36502,1,1,14,16886,100,"devoureur SAY_FACE_ANGER_SLAY_2","Doomed for eternity!"),
+(36502,2,0,14,16896,100,"devoureur SAY_FACE_SORROW_SLAY_1","Damnation!"),
+(36502,2,1,14,16897,100,"devoureur SAY_FACE_SORROW_SLAY_2","Doomed for eternity!"),
+(36502,3,0,14,16891,100,"devoureur SAY_FACE_DESIRE_SLAY_1","Damnation!"),
+(36502,3,1,14,16892,100,"devoureur SAY_FACE_DESIRE_SLAY_2","Doomed for eternity!"),
+(36502,4,0,14,16887,100,"devoureur SAY_FACE_ANGER_DEATH","The swell of souls will not be abated! You only delay the inevitable!"),
+(36502,4,1,14,16898,100,"devoureur SAY_FACE_SORROW_DEATH","The swell of souls will not be abated! You only delay the inevitable!"),
+(36502,4,2,14,16893,100,"devoureur SAY_FACE_DESIRE_DEATH","The swell of souls will not be abated! You only delay the inevitable!"),
+(36502,5,0,41,0,100,"devoureur EMOTE_MIRRORED_SOUL","Devourer of Souls begins to cast Mirrored Soul!"),
+(36502,6,0,41,0,100,"devoureur EMOTE_UNLEASH_SOUL","Devourer of Souls begins to Unleash Souls!"),
+(36502,7,0,14,16888,100,"devoureur SAY_FACE_ANGER_UNLEASH_SOUL","SUFFERING! ANGUISH! CHAOS! RISE AND FEED!"),
+(36502,7,1,14,16899,100,"devoureur SAY_FACE_SORROW_UNLEASH_SOUL","SUFFERING! ANGUISH! CHAOS! RISE AND FEED!"),
+(36502,7,2,14,16894,100,"devoureur SAY_FACE_DESIRE_UNLEASH_SOUL","SUFFERING! ANGUISH! CHAOS! RISE AND FEED!"),
+(36502,8,0,41,0,100,"devoureur EMOTE_WAILING_SOUL","Devourer of Souls begins to cast Wailing Souls!"),
+(36502,9,0,14,16889,100,"devoureur SAY_FACE_ANGER_WAILING_SOUL","Stare into the abyss, and see your end!"),
+(36502,9,1,14,16895,100,"devoureur SAY_FACE_DESIRE_WAILING_SOUL","Stare into the abyss, and see your end!"),
+(38160,0,0,14,16625,100,"jaina SAY_JAINA_OUTRO","Excellent work, champions! We shall set up our base camp in these chambers. My mages will get the Scourge transport device working shortly. Step inside it when you're ready for your next mission. I will meet you on the other side."),
+(38161,0,0,14,17044,100,"sylvanas SAY_SYLVANAS_OUTRO","Excellent work, champions! We shall set up our base camp in these chambers. My mages will get the Scourge transport device working shortly. Step inside when you are ready for your next mission. I will meet you on the other side.");
+
+-- lurgglbr
+DELETE FROM `creature_text` WHERE `entry`=25208;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(25208,0,0,12,0,100,"lurgglbr SAY_START_1","Together we will fight our way out of here. Are you ready?"),
+(25208,1,0,12,0,100,"lurgglbr SAY_START_2","Then we leave."),
+(25208,2,0,12,0,100,"lurgglbr SAY_END_1","This is far enough. I can make it on my own from here."),
+(25208,3,0,12,0,100,"lurgglbr SAY_END_2","Thank you for helping me $r. Please tell the king I am back.");
+
+-- jaina
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1632047 AND -1632040;
+DELETE FROM `creature_text` WHERE `entry`=37597;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(37597,0,0,12,16617,100,"jaina SAY_INTRO_1","Thank the light for seeing you here safely. We have much work to do if we are to defeat the Lich King and put an end to the Scourge."),
+(37597,1,0,12,16618,100,"jaina SAY_INTRO_2","Our allies within the Argent Crusade and the Knights of the Ebon Blade have broken through the front gate of Icecrown and are attempting to establish a foothold within the Citadel."),
+(37597,2,0,12,16619,100,"jaina SAY_INTRO_3","Their success hinges upon what we discover in these cursed halls. Although our mission is a wrought with peril, we must persevere!"),
+(37597,3,0,12,16620,100,"jaina SAY_INTRO_4","With the attention of the Lich King drawn toward the front gate, we will be working our way through the side in search of information that will enable us to defeat the Scourge - once and for all."),
+(37597,4,0,12,16621,100,"jaina SAY_INTRO_5","King Varian's SI7 agents have gathered information about a private sanctum of the Lich King's deep within a place called the Halls of Reflection."),
+(37597,5,0,12,16622,100,"jaina SAY_INTRO_6","We will carve a path through this wretched place and find a way to enter the Halls of Reflection. I sense powerful magic hidden away within those walls... Magic that could be the key to destroy the Scourge."),
+(37597,6,0,12,16623,100,"jaina SAY_INTRO_7","Your first mission is to destroy the machines of death within this malevolent engine of souls, and clear a path for our soldiers."),
+(37597,7,0,12,16624,100,"jaina SAY_INTRO_8","Make haste, champions! I will prepare the troops to fall in behind you.");
+
+-- sylvanas
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1632055 AND -1632050;
+DELETE FROM `creature_text` WHERE `entry`=37596;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(37596,0,0,12,17038,100,"sylvanas SAY_INTRO_1","The Argent Crusade and the Knights of the Ebon Blade have assaulted the gates of Icecrown Citadel and are preparing for a massive attack upon the Scourge. Our missition is a bit more subtle, but equally as important."),
+(37596,1,0,12,17039,100,"sylvanas SAY_INTRO_2","With the attention of the Lich King turned towards the front gate, we'll be working our way through the side in search of information that will enable us to defeat the Lich King - once and for all."),
+(37596,2,0,12,17040,100,"sylvanas SAY_INTRO_3","Our scouts have reported that the Lich King has a private chamber, outside of the Frozen Throne, deep within a place called the Halls of Reflection. That is our target, champions."),
+(37596,3,0,12,17041,100,"sylvanas SAY_INTRO_4","We will cut a swath of destruction through this cursed place and find a way to enter the Halls of Reflection. If there is anything of value to be found here, it will be found in the Halls."),
+(37596,4,0,12,17042,100,"sylvanas SAY_INTRO_5","Your first mission is to destroy the machines of death within this wretched engine of souls, and clear a path for our soldiers."),
+(37596,5,0,12,17043,100,"sylvanas SAY_INTRO_6","The Dark Lady watches over you. Make haste!");
+
+-- falric
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1668055 AND -1668050;
+DELETE FROM `creature_text` WHERE `entry`=38112;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(38112,0,0,14,16710,100,"falric SAY_AGGRO","Men, women and children... None were spared the master's wrath. Your death will be no different."),
+(38112,1,0,14,16711,100,"falric SAY_SLAY_1","Sniveling maggot!"),
+(38112,1,1,14,16712,100,"falric SAY_SLAY_2","The children of Stratholme fought with more ferocity!"),
+(38112,2,0,14,16713,100,"falric SAY_DEATH","Marwyn, finish them..."),
+(38112,3,0,14,16715,100,"falric SAY_IMPENDING_DESPAIR","Despair... so delicious..."),
+(38112,4,0,14,16716,100,"falric SAY_DEFILING_HORROR","Fear... so exhilarating...");
+
+-- marwyn
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1668065 AND -1668060;
+DELETE FROM `creature_text` WHERE `entry`=38113;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(38113,0,0,14,16734,100,"marwyn SAY_AGGRO","Death is all that you will find here!"),
+(38113,1,0,14,16735,100,"marwyn SAY_SLAY_1","I saw the same look in his eyes when he died. Terenas could hardly believe it. Hahahaha!"),
+(38113,1,1,14,16736,100,"marwyn SAY_SLAY_2","Choke on your suffering!"),
+(38113,2,0,14,16737,100,"marwyn SAY_DEATH","Yes... Run... Run to meet your destiny... Its bitter, cold embrace, awaits you."),
+(38113,3,0,14,16739,100,"marwyn SAY_CORRUPTED_FLESH_1","Your flesh has decayed before your very eyes!"),
+(38113,3,1,14,16740,100,"marwyn SAY_CORRUPTED_FLESH_2","Waste away into nothingness!");
+
+-- jaina or sylvanas halls of reflection
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1668043 AND -1668001;
+DELETE FROM `creature_text` WHERE `entry` IN (37221,37225,37223,37226,38113) OR (`entry`=38112 AND `groupid` IN (5,6));
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+-- Jaina
+(37221,0,0,14,16631,100,"Jaina SAY_JAINA_INTRO_1","The chill of this place... Brr... I can feel my blood freezing."),
+(37221,1,0,14,16632,100,"Jaina SAY_JAINA_INTRO_2","What is that? Up ahead! Could it be... ? Heroes at my side!"),
+(37221,2,0,14,16633,100,"Jaina SAY_JAINA_INTRO_3","Frostmourne! The blade that destroyed our kingdom..."),
+(37221,3,0,14,16634,100,"Jaina SAY_JAINA_INTRO_4","Stand back! Touch that blade and your soul will be scarred for all eternity! I must attempt to commune with the spirits locked away within Frostmourne. Give me space, back up please!"),
+(37221,4,0,12,16635,100,"Jaina SAY_JAINA_INTRO_5","Uther! Dear Uther! ... I... I'm so sorry."),
+(37221,5,0,12,16636,100,"Jaina SAY_JAINA_INTRO_6","Arthas is here? Maybe I..."),
+(37221,6,0,12,16637,100,"Jaina SAY_JAINA_INTRO_7","But Uther, if there's any hope of reaching Arthas. I... I must try."),
+(37221,7,0,12,16638,100,"Jaina SAY_JAINA_INTRO_8","Tell me how, Uther? How do I destroy my prince? My..."),
+(37221,8,0,12,16639,100,"Jaina SAY_JAINA_INTRO_9","You're right, Uther. Forgive me. I... I don't know what got a hold of me. We will deliver this information to the King and the knights that battle the Scourge within Icecrown Citadel."),
+(37221,9,0,12,16640,100,"Jaina SAY_JAINA_INTRO_10","Who could bear such a burden?"),
+(37221,10,0,12,16641,100,"Jaina SAY_JAINA_INTRO_11","Then maybe there is still hope..."),
+(37221,11,0,14,16642,100,"Jaina SAY_JAINA_INTRO_END","You won't deny me this Arthas! I must know! I must find out!"),
+-- Lich King
+(37226,0,0,14,17225,100,"Lich King SAY_LK_INTRO_1","SILENCE, PALADIN!"),
+(37226,1,0,14,17226,100,"Lich King SAY_LK_INTRO_2","So you wish to commune with the dead? You shall have your wish."),
+(37226,2,0,14,17227,100,"Lich King SAY_LK_INTRO_3","Falric. Marwyn. Bring their corpses to my chamber when you are through."),
+-- Marwyn
+(38113,0,0,14,16741,100,"Marwyn SAY_MARWYN_INTRO_1","As you wish, my lord."),
+-- Falric
+(38112,5,0,14,16717,100,"Falric SAY_FALRIC_INTRO_1","As you wish, my lord."),
+(38112,6,0,14,16714,100,"Falric SAY_FALRIC_INTRO_2","Soldiers of Lordaeron, rise to meet your master's call!"),
+-- Sylvanas
+(37223,0,0,14,17049,100,"Sylvanas SAY_SYLVANAS_INTRO_1","I... I don't believe it! Frostmourne stands before us, unguarded! Just as the Gnome claimed. Come, heroes!"),
+(37223,1,0,14,17050,100,"Sylvanas SAY_SYLVANAS_INTRO_2","Standing this close to the blade that ended my life... The pain... It is renewed."),
+(37223,2,0,14,17051,100,"Sylvanas SAY_SYLVANAS_INTRO_3","I dare not touch it. Stand back! Stand back as I attempt to commune with the blade! Perhaps our salvation lies within..."),
+(37223,3,0,12,17052,100,"Sylvanas SAY_SYLVANAS_INTRO_4","Uther...Uther the Lightbringer. How..."),
+(37223,4,0,12,17053,100,"Sylvanas SAY_SYLVANAS_INTRO_5","The Lich King is here? Then my destiny shall be fulfilled today!"),
+(37223,5,0,12,17054,100,"Sylvanas SAY_SYLVANAS_INTRO_6","There must be a way... "),
+(37223,6,0,12,17055,100,"Sylvanas SAY_SYLVANAS_INTRO_7","Who could bear such a burden?"),
+(37223,7,0,12,17056,100,"Sylvanas SAY_SYLVANAS_INTRO_8","The Frozen Throne..."),
+(37223,8,0,14,17057,100,"Sylvanas SAY_SYLVANAS_INTRO_END","You will not escape me that easily, Arthas! I will have my vengeance!"),
+-- Uther
+(37225,0,0,14,16666,100,"Uther SAY_UTHER_INTRO_A2_1","Jaina! Could it truly be you?"),
+(37225,1,0,12,16667,100,"Uther SAY_UTHER_INTRO_A2_2","Jaina you haven't much time. The Lich King sees what the sword sees. He will be here shortly!"),
+(37225,2,0,12,16668,100,"Uther SAY_UTHER_INTRO_A2_3","No, girl. Arthas is not here. Arthas is merely a presence within the Lich King's mind. A dwindling presence..."),
+(37225,3,0,12,16669,100,"Uther SAY_UTHER_INTRO_A2_4","Jaina, listen to me. You must destroy the Lich King. You cannot reason with him. He will kill you and your allies and raise you all as powerful soldiers of the Scourge."),
+(37225,4,0,12,16670,100,"Uther SAY_UTHER_INTRO_A2_5","Snap out of it, girl. You must destroy the Lich King at the place where he merged with Ner'zhul - atop the spire, at the Frozen Throne. It is the only way."),
+(37225,5,0,12,16671,100,"Uther SAY_UTHER_INTRO_A2_6","There is... something else that you should know about the Lich King. Control over the Scourge must never be lost. Even if you were to strike down the Lich King, another would have to take his place. For without the control of its master, the Scourge would run rampant across the world - destroying all living things."),
+(37225,6,0,12,16672,100,"Uther SAY_UTHER_INTRO_A2_7","A grand sacrifice by a noble soul..."),
+(37225,7,0,12,16673,100,"Uther SAY_UTHER_INTRO_A2_8","I do not know, Jaina. I suspect that the piece of Arthas that might be left inside the Lich King is all that holds the Scourge from annihilating Azeroth."),
+(37225,8,0,12,16674,100,"Uther SAY_UTHER_INTRO_A2_9","No, Jaina! Aargh! He... He is coming! You... You must..."),
+(37225,9,0,12,16659,100,"Uther SAY_UTHER_INTRO_H2_1","Careful, girl. I've heard talk of that cursed blade saving us before. Look around you and see what has been born of Frostmourne."),
+(37225,10,0,12,16660,100,"Uther SAY_UTHER_INTRO_H2_2","You haven't much time. The Lich King sees what the sword sees. He will be here shortly."),
+(37225,11,0,12,16661,100,"Uther SAY_UTHER_INTRO_H2_3","You cannot defeat the Lich King. Not here. You would be a fool to try. He will kill those who follow you and raise them as powerful servants of the Scourge. But for you, Sylvanas, his reward for you would be worse than the last."),
+(37225,12,0,12,16662,100,"Uther SAY_UTHER_INTRO_H2_4","Perhaps, but know this: there must always be a Lich King. Even if you were to strike down Arthas, another would have to take his place, for without the control of the Lich King, the Scourge would wash over this world like locusts, destroying all that they touched."),
+(37225,13,0,12,16663,100,"Uther SAY_UTHER_INTRO_H2_5","I do not know, Banshee Queen. I suspect that the piece of Arthas that might be left inside the Lich King is all that holds the Scourge from annihilating Azeroth."),
+(37225,14,0,12,16664,100,"Uther SAY_UTHER_INTRO_H2_6","Alas, the only way to defeat the Lich King is to destroy him at the place he was created."),
+(37225,15,0,12,16665,100,"Uther SAY_UTHER_INTRO_H2_7","I... Aargh... He... He is coming... You... You must...");
+
+-- Some deletions for halls of reflection
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1658041 AND -1658030;
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1658018 AND -1658010;
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1658021 AND -1658020;
+DELETE FROM `script_texts` WHERE `entry`=-1658007;
+
+-- Krick
+DELETE FROM `creature_text` WHERE `entry`=36477;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(36477,0,0,14,16926,100,"Krick SAY_AGGRO","Our work must not be interrupted! Ick! Take care of them!"),
+(36477,1,0,14,16927,100,"Krick SAY_SLAY_1","Ooh...We could probably use these parts!"),
+(36477,1,1,14,16928,100,"Krick SAY_SLAY_2","Arms and legs are in short supply...Thanks for your contribution!"),
+(36477,2,0,14,16929,100,"Krick SAY_BARRAGE_1","Enough moving around! Hold still while I blow them all up!"),
+(36477,3,0,41,0,100,"Krick SAY_BARRAGE_2","Krick begins rapidly conjuring explosive mines!"),
+(36477,4,0,14,16930,100,"Krick SAY_POISON_NOVA","Quickly! Poison them all while they're still close!"),
+(36477,5,0,14,16931,100,"Krick SAY_CHASE_1","No! That one! That one! Get that one!"),
+(36477,5,1,14,16932,100,"Krick SAY_CHASE_2","I've changed my mind...go get that one instead!"),
+(36477,5,2,14,16933,100,"Krick SAY_CHASE_3","What are you attacking him for? The dangerous one is over there,fool!"),
+(36477,6,0,14,16934,100,"Krick SAY_KRICK_OUTRO_1","Wait! Stop! Don't kill me, please! I'll tell you everything!"),
+(36477,7,0,14,16935,100,"Krick SAY_KRICK_OUTRO_3","What you seek is in the master's lair, but you must destroy Tyrannus to gain entry. Within the Halls of Reflection you will find Frostmourne. It... it holds the truth."),
+(36477,8,0,14,16936,100,"Krick SAY_KRICK_OUTRO_5","I swear it is true! Please, don't kill me!!"),
+(36477,9,0,14,16937,100,"Krick SAY_KRICK_OUTRO_8","Urg... no!!");
+
+-- Ick
+DELETE FROM `creature_text` WHERE `entry`=36476;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(36476,0,0,41,0,100,"Ick SAY_ICK_POISON_NOVA","Ick begins to unleash a toxic poison cloud!"),
+(36476,1,0,41,0,100,"Ick SAY_ICK_CHASE_1","Ick is chasing you!");
+
+-- Tyrannus
+DELETE FROM `creature_text` WHERE `entry`=36658;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(36658,0,0,14,16752,100,"Tyrannus SAY_TYRANNUS_DEATH","Another shall take his place. You waste your time."),
+(36658,1,0,14,16753,100,"Tyrannus SAY_TYRANNUS_OUTRO_7","Worthless gnat! Death is all that awaits you!"),
+(36658,2,0,14,16754,100,"Tyrannus SAY_TYRANNUS_OUTRO_9","Do not think that I shall permit you entry into my master's sanctum so easily. Pursue me if you dare."),
+(36658,3,0,14,16755,100,"Tyrannus SAY_AMBUSH_1","Your pursuit shall be in vain, adventurers, for the Lich King has placed an army of undead at my command! Behold!"),
+(36658,4,0,14,16756,100,"Tyrannus SAY_AMBUSH_2","Persistent whelps! You will not reach the entrance of my lord's lair! Soldiers, destroy them!"),
+(36658,5,0,14,16757,100,"Tyrannus SAY_GAUNTLET_START","Rimefang! Trap them within the tunnel! Bury them alive!"),
+(36658,6,0,14,16758,100,"Tyrannus SAY_TYRANNUS_INTRO_1","Alas, brave, brave adventurers, your meddling has reached its end. Do you hear the clatter of bone and steel coming up the tunnel behind you? That is the sound of your impending demise."),
+(36658,7,0,14,16759,100,"Tyrannus SAY_TYRANNUS_INTRO_3","Ha, such an amusing gesture from the rabble. When I have finished with you, my master's blade will feast upon your souls. Die!"),
+(36658,8,0,14,16760,100,"Tyrannus SAY_AGGRO","I shall not fail The Lich King! Come and meet your end!"),
+(36658,9,0,14,16761,100,"Tyrannus SAY_SLAY_1","Such a shameful display... You are better off dead!"),
+(36658,9,1,14,16762,100,"Tyrannus SAY_SLAY_2","Perhaps you should have stayed in the mountains!"),
+(36658,10,0,14,16763,100,"Tyrannus SAY_DEATH","Impossible! Rimefang... Warn..."),
+(36658,11,0,14,16764,100,"Tyrannus SAY_MARK_RIMEFANG_1","Rimefang, destroy this fool!"),
+(36658,12,0,41,0,100,"Tyrannus SAY_MARK_RIMEFANG_2","The frostwyrm Rimefang gazes at $N and readies an icy attack!"),
+(36658,13,0,14,16765,100,"Tyrannus SAY_DARK_MIGHT_1","Power... overwhelming!"),
+(36658,14,0,41,0,100,"Tyrannus SAY_DARK_MIGHT_2","Scourgelord Tyrannus roars and swells with dark might!");
+
+-- Gorkun
+DELETE FROM `creature_text` WHERE `entry`=37592;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(37592,0,0,14,17150,100,"Gorkun SAY_GORKUN_INTRO_2","Heroes! We will hold off the undead as long as we can, even to our dying breath. Deal with the Scourgelord!"),
+(37592,1,0,14,0,100,"Gorkun SAY_GORKUN_OUTRO_1","Brave champions, we owe you our lives, our freedom... Though it be a tiny gesture in the face of this enormous debt, I pledge that from this day forth, all will know of your deeds, and the blazing path of light you cut through the shadow of this dark citadel."),
+(37592,2,0,14,0,100,"Gorkun SAY_GORKUN_OUTRO_2","This day will stand as a testament not only to your valor, but to the fact that no foe, not even the Lich King himself, can stand when Alliance and Horde set aside their differences and ---");
+
+-- Jaina
+DELETE FROM `creature_text` WHERE `entry`=36993;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(36993,0,0,14,16611,100,"Jaina SAY_JAINA_OUTRO_2","I'm not so naive as to believe your appeal for clemency, but I will listen."),
+(36993,1,0,14,16612,100,"Jaina SAY_JAINA_OUTRO_4","Frostmourne lies unguarded? Impossible!"),
+(36993,2,0,14,16613,100,"Jaina SAY_JAINA_OUTRO_10","What a cruel end. Come, heroes. We must see if the gnome's story is true. If we can separate Arthas from Frostmourne, we might have a chance at stopping him."),
+(36993,3,0,14,16614,100,"Jaina SAY_JAYNA_OUTRO_3","Heroes, to me!"),
+(36993,4,0,12,16615,100,"Jaina SAY_JAYNA_OUTRO_4","The Frost Queen is gone. We must keep moving - our objective is near."),
+(36993,5,0,12,16616,100,"Jaina SAY_JAYNA_OUTRO_5","I... I could not save them... Damn you, Arthas! DAMN YOU!");
+
+-- Sylvanas
+DELETE FROM `creature_text` WHERE `entry`=36990;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(36990,0,0,14,17033,100,"Sylvanas SAY_SYLVANAS_OUTRO_2","Why should the Banshee Queen spare your miserable life?"),
+(36990,1,0,14,17034,100,"Sylvanas SAY_SYLVANAS_OUTRO_4","Frostmourne? The Lich King is never without his blade! If you are lying to me..."),
+(36990,2,0,14,17035,100,"Sylvanas SAY_SYLVANAS_OUTRO_10","A fitting end for a traitor. Come, we must free the slaves and see what is within the Lich King's chamber for ourselves."),
+(36990,3,0,14,17037,100,"Sylvanas SAY_SYLVANAS_OUTRO_3","Take cover behind me! Quickly!"),
+(36990,4,0,12,17036,100,"Sylvanas SAY_SYLVANAS_OUTRO_4","I thought he'd never shut up. At last, Sindragosa silenced that long-winded fool. To the Halls of Reflection, champions! Our objective is near... I can sense it.");
+
+-- emily
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1800013 AND -1800001;
+DELETE FROM `creature_text` WHERE `entry`=26588;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(26588,0,0,12,0,100,"emily SAY_WORGHAGGRO1","Um... I think one of those wolves is back..."),
+(26588,1,0,12,0,100,"emily SAY_WORGHAGGRO2","He's going for Mr. Floppy! "),
+(26588,2,0,12,0,100,"emily SAY_WORGRAGGRO3","Oh, no! Look, it's another wolf, and it's a biiiiiig one!"),
+(26588,3,0,12,0,100,"emily SAY_WORGRAGGRO4","He's gonna eat Mr. Floppy! You gotta help Mr. Floppy! You just gotta!"),
+(26588,4,0,12,0,100,"emily SAY_RANDOMAGGRO","There's a big meanie attacking Mr. Floppy! Help! "),
+(26588,5,0,12,0,100,"emily SAY_VICTORY1","Let's get out of here before more wolves find us!"),
+(26588,6,0,12,0,100,"emily SAY_VICTORY2","Don't go toward the light, Mr. Floppy!"),
+(26588,7,0,12,0,100,"emily SAY_VICTORY3","Mr. Floppy, you're ok! Thank you so much for saving Mr. Floppy!"),
+(26588,8,0,12,0,100,"emily SAY_VICTORY4","I think I see the camp! We're almost home, Mr. Floppy! Let's go!"),
+(26588,9,0,15,0,100,"emily TEXT_EMOTE_WP1","Mr. Floppy revives"),
+(26588,10,0,15,0,100,"emily TEXT_EMOTE_AGGRO","The Ravenous Worg chomps down on Mr. Floppy"),
+(26588,11,0,12,0,100,"emily SAY_QUEST_ACCEPT","Are you ready, Mr. Floppy? Stay close to me and watch out for those wolves!"),
+(26588,12,0,12,0,100,"emily SAY_QUEST_COMPLETE","Thank you for helping me get back to the camp. Go tell Walter that I'm safe now!");
+
+-- venture co straggler
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1603539 AND -1603535;
+DELETE FROM `creature_text` WHERE `entry`=27570;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(27570,0,0,12,0,100,"venture co straggler SAY1","We're all gonna die!"),
+(27570,0,1,12,0,100,"venture co straggler SAY2","Gotta get out of here!"),
+(27570,0,2,12,0,100,"venture co straggler SAY3","No way I'm stickin' around!"),
+(27570,0,3,12,0,100,"venture co straggler SAY4","Forget this! I'm going home!"),
+(27570,0,4,12,0,100,"venture co straggler SAY5","I didn't sign up for this!");
+
+-- wounded skirmisher
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1800046 AND -1800044;
+DELETE FROM `creature_text` WHERE `entry`=27463;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(27463,0,0,12,0,100,"wounded skirmisher RANDOM_SAY_1","Ahh..better.."),
+(27463,0,1,12,0,100,"wounded skirmisher RANDOM_SAY_2","Whoa.. i nearly died there. Thank you, $Race!"),
+(27463,0,2,12,0,100,"wounded skirmisher RANDOM_SAY_3","Thank you. $Class!");
+
+-- Gal'darah
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1604009 AND -1604000;
+DELETE FROM `creature_text` WHERE `entry`=29306;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(29306,0,0,12,0,100,"Gal'darah SAY_AGGRO","I'm gonna spill your guts, mon!"),
+(29306,1,0,12,0,100,"Gal'darah SAY_SLAY_1","What a rush!"),
+(29306,1,1,12,0,100,"Gal'darah SAY_SLAY_2","Who needs gods, when WE ARE GODS!"),
+(29306,1,2,12,0,100,"Gal'darah SAY_SLAY_3","I told ya so!"),
+(29306,2,0,12,0,100,"Gal'darah SAY_DEATH","Even the mighty... can fall."),
+(29306,3,0,12,0,100,"Gal'darah SAY_SUMMON_RHINO_1","Gut them! Impale them!"),
+(29306,3,1,12,0,100,"Gal'darah SAY_SUMMON_RHINO_2","KILL THEM ALL!"),
+(29306,3,2,12,0,100,"Gal'darah SAY_SUMMON_RHINO_3","Say hello to my BIG friend!"),
+(29306,4,0,12,0,100,"Gal'darah SAY_TRANSFORM_1","Ain't gonna be nottin' left after this!"),
+(29306,5,0,12,0,100,"Gal'darah SAY_TRANSFORM_2","You wanna see power? I'm gonna show you power!");
diff --git a/sql/updates/world/2012_12_02_02_world_waypoint_data.sql b/sql/updates/world/2012_12_02_02_world_waypoint_data.sql
new file mode 100644
index 00000000000..6413ad00b62
--- /dev/null
+++ b/sql/updates/world/2012_12_02_02_world_waypoint_data.sql
@@ -0,0 +1,461 @@
+-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8528: Path for Gnarl Leafbrother in Feralas
+UPDATE `creature` SET `MovementType`=2,`position_x`=-5022.191895,`position_y`=629.696777,`position_z`=33.835888,`currentwaypoint`=1 WHERE `guid`=51842;
+DELETE FROM `creature_addon` WHERE `guid`=51842;
+INSERT INTO `creature_addon` (`guid`,`path_id`) VALUES (51842,518420);
+DELETE FROM `waypoint_data` WHERE `id`=518420;
+-- waypoint data
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(518420,1,-5022.191895,629.696777,33.835888,0,0,0,0,100,0),
+(518420,2,-5043.059082,619.917847,31.750885,0,0,0,0,100,0),
+(518420,3,-5054.034668,613.626709,30.798603,0,0,0,0,100,0),
+(518420,4,-5071.428223,601.871948,32.057613,0,0,0,0,100,0),
+(518420,5,-5089.617676,591.378662,28.951130,0,0,0,0,100,0),
+(518420,6,-5105.091309,579.887695,30.504873,0,0,0,0,100,0),
+(518420,7,-5116.354980,576.741211,32.764660,0,0,0,0,100,0),
+(518420,8,-5136.212891,566.893005,31.577913,0,0,0,0,100,0),
+(518420,9,-5150.280273,553.107849,30.944555,0,0,0,0,100,0),
+(518420,10,-5158.920410,542.095581,35.801292,0,0,0,0,100,0),
+(518420,11,-5167.158203,522.274170,38.600380,0,0,0,0,100,0),
+(518420,12,-5166.315430,510.923157,38.586903,0,0,0,0,100,0),
+(518420,13,-5158.101074,492.401123,33.991638,0,0,0,0,100,0),
+(518420,14,-5147.333984,474.398682,30.235893,0,0,0,0,100,0),
+(518420,15,-5134.918945,457.462006,26.081539,0,0,0,0,100,0),
+(518420,16,-5122.419434,440.587341,21.583317,0,0,0,0,100,0),
+(518420,17,-5109.219727,424.297028,16.553629,0,0,0,0,100,0),
+(518420,18,-5094.229004,409.595154,11.296940,0,0,0,0,100,0),
+(518420,19,-5080.246582,393.952423,10.345637,0,0,0,0,100,0),
+(518420,20,-5070.758789,379.525574,13.711313,0,0,0,0,100,0),
+(518420,21,-5063.307617,359.270874,18.122873,0,0,0,0,100,0),
+(518420,22,-5063.429688,338.487732,24.411358,0,0,0,0,100,0),
+(518420,23,-5059.106445,312.620605,24.147429,0,0,0,0,100,0),
+(518420,24,-5054.877441,292.802917,29.383863,0,0,0,0,100,0),
+(518420,25,-5054.420898,273.845673,34.572777,0,0,0,0,100,0),
+(518420,26,-5070.981445,257.048950,38.070614,0,0,0,0,100,0),
+(518420,27,-5087.886230,264.231934,40.363678,0,0,0,0,100,0),
+(518420,28,-5090.106934,281.698639,35.716690,0,0,0,0,100,0),
+(518420,29,-5081.804688,296.339905,31.364048,0,0,0,0,100,0),
+(518420,30,-5068.381836,313.534424,24.323677,0,0,0,0,100,0),
+(518420,31,-5063.646484,332.752380,25.158432,0,0,0,0,100,0),
+(518420,32,-5060.014648,353.435455,20.394775,0,0,0,0,100,0),
+(518420,33,-5056.827148,373.164917,13.297603,0,0,0,0,100,0),
+(518420,34,-5051.156250,389.049103,12.191339,0,0,0,0,100,0),
+(518420,35,-5053.750977,410.560486,11.438949,0,0,0,0,100,0),
+(518420,36,-5053.371582,435.000610,12.668456,0,0,0,0,100,0),
+(518420,37,-5047.556152,449.830597,12.962356,0,0,0,0,100,0),
+(518420,38,-5041.587891,465.987549,9.927107,0,0,0,0,100,0),
+(518420,39,-5031.068848,492.358582,14.380741,0,0,0,0,100,0),
+(518420,40,-5017.889648,502.309723,13.949232,0,0,0,0,100,0),
+(518420,41,-5016.621094,521.594666,14.870961,0,0,0,0,100,0),
+(518420,42,-5014.022949,548.411804,22.151962,0,0,0,0,100,0),
+(518420,43,-5006.894043,566.593445,27.215111,0,0,0,0,100,0),
+(518420,44,-5005.978516,584.286316,27.214222,0,0,0,0,100,0),
+(518420,45,-5006.477539,605.231934,30.056322,0,0,0,0,100,0);
+-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8525: Path for Antilus the Soarer in Feralas
+UPDATE `creature_template` SET `InhabitType`=5 WHERE `entry`=5347;
+UPDATE `creature` SET `MovementType`=2,`position_x`=-5750.381348,`position_y`=1687.031372,`position_z`=102.642807,`currentwaypoint`=1 WHERE `guid`=51840;
+DELETE FROM `creature_addon` WHERE `guid`=51840;
+INSERT INTO `creature_addon` (`guid`,`path_id`) VALUES (51840,518400);
+-- waypoint data
+DELETE FROM `waypoint_data` WHERE `id`=518400;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(518400,1,-5750.381348,1687.031372,102.642807,0,0,0,0,100,0),
+(518400,2,-5763.852539,1659.998779,100.206543,0,0,0,0,100,0),
+(518400,3,-5769.635742,1631.257935,97.278107,0,0,0,0,100,0),
+(518400,4,-5769.966797,1586.222778,95.639244,0,0,0,0,100,0),
+(518400,5,-5747.220215,1555.375977,91.316254,0,0,0,0,100,0),
+(518400,6,-5711.871582,1560.672729,92.667946,0,0,0,0,100,0),
+(518400,7,-5683.442871,1576.397583,93.477570,0,0,0,0,100,0),
+(518400,8,-5661.568359,1610.616699,95.784607,0,0,0,0,100,0),
+(518400,9,-5667.140137,1638.335815,99.210922,0,0,0,0,100,0),
+(518400,10,-5687.900879,1671.338013,102.927925,0,0,0,0,100,0);
+-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8524: GUARDS and PATH for Achellios the Banished
+-- he paths around 1K Needles with 3 Hyena guards. All the guids exist on the TDB,but are not moving or joined in a formation
+DELETE FROM `creature_formations` where `memberGUID` in (21388,21677,21678,21679);
+INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`) VALUES
+(21388,21388,0,0,2),
+(21388,21677,3,90,2),
+(21388,21678,6,0,2),
+(21388,21679,3,270,2);
+-- initial position for achellious and guards
+UPDATE `creature` SET `MovementType`=2,`position_x`=-5065.414551,`position_y`=-1433.431885,`position_z`=-52.054058,`currentwaypoint`=1 WHERE `guid`=21388;
+UPDATE `creature` SET `MovementType`=0,`position_x`=-5065.414551,`position_y`=-1433.431885,`position_z`=-52.054058 WHERE `guid` IN (21677,21678,21679);
+UPDATE `creature_addon` SET `path_id`=213880 WHERE `guid`=21388;
+-- waypoint data
+DELETE FROM `waypoint_data` WHERE `id`=213880;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(213880,1,-5065.414551,-1433.431885,-52.054058,0,0,0,0,100,0),
+(213880,2,-5080.285156,-1409.718994,-52.203053,0,0,0,0,100,0),
+(213880,3,-5096.495605,-1378.726807,-51.724346,0,0,0,0,100,0),
+(213880,4,-5104.196289,-1358.002808,-50.824722,0,0,0,0,100,0),
+(213880,5,-5112.802734,-1324.146851,-50.094719,0,0,0,0,100,0),
+(213880,6,-5111.580078,-1301.388672,-49.267933,0,0,0,0,100,0),
+(213880,7,-5107.584473,-1280.802734,-48.943916,0,0,0,0,100,0),
+(213880,8,-5096.659180,-1257.089233,-48.471100,0,0,0,0,100,0),
+(213880,9,-5082.086914,-1233.186279,-50.992100,0,0,0,0,100,0),
+(213880,10,-5065.160156,-1214.561768,-54.094868,0,0,0,0,100,0),
+(213880,11,-5048.077148,-1208.920410,-54.393391,0,0,0,0,100,0),
+(213880,12,-5025.265625,-1212.702515,-53.574635,0,0,0,0,100,0),
+(213880,13,-5007.475098,-1223.781250,-50.797726,0,0,0,0,100,0),
+(213880,14,-4988.770508,-1237.379517,-47.942184,0,0,0,0,100,0),
+(213880,15,-4965.532227,-1252.931885,-46.213470,0,0,0,0,100,0),
+(213880,16,-4945.341309,-1262.725708,-48.321907,0,0,0,0,100,0),
+(213880,17,-4957.100098,-1257.528564,-47.172382,0,0,0,0,100,0),
+(213880,18,-4974.348145,-1245.551147,-46.548256,0,0,0,0,100,0),
+(213880,19,-4997.272949,-1229.474365,-49.777657,0,0,0,0,100,0),
+(213880,20,-5014.469727,-1217.421753,-52.319622,0,0,0,0,100,0),
+(213880,21,-5032.637695,-1209.560913,-54.186928,0,0,0,0,100,0),
+(213880,22,-5056.286133,-1214.395996,-54.073860,0,0,0,0,100,0),
+(213880,23,-5073.804199,-1225.945801,-52.395935,0,0,0,0,100,0),
+(213880,24,-5089.777344,-1243.745728,-49.314560,0,0,0,0,100,0),
+(213880,25,-5098.031250,-1259.230591,-48.500839,0,0,0,0,100,0),
+(213880,26,-5106.213379,-1282.815308,-48.529831,0,0,0,0,100,0),
+(213880,27,-5109.097656,-1303.605347,-48.834938,0,0,0,0,100,0),
+(213880,28,-5108.130859,-1322.882935,-49.570202,0,0,0,0,100,0),
+(213880,29,-5104.601074,-1343.582642,-50.142941,0,0,0,0,100,0),
+(213880,30,-5101.294922,-1364.320801,-50.986908,0,0,0,0,100,0),
+(213880,31,-5092.989258,-1385.642334,-52.071144,0,0,0,0,100,0),
+(213880,32,-5081.424316,-1403.168579,-52.366920,0,0,0,0,100,0);
+-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8513: PATH for Galak Messenger
+UPDATE `creature` SET `MovementType`=2,`position_x`=-5128.149902,`position_y`=-2080.696045,`position_z`=-37.428406,`currentwaypoint`=1 WHERE `guid`=21580;
+UPDATE `creature_addon` SET `path_id`=215800 WHERE `guid`=21580;
+DELETE FROM `waypoint_data` WHERE `id`=215800;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(215800,1,-5128.149902,-2080.696045,-37.428406,0,0,1,0,100,0),
+(215800,2,-5144.749512,-2055.663330,-46.166458,0,0,1,0,100,0),
+(215800,3,-5160.793457,-2041.713501,-54.724445,0,0,1,0,100,0),
+(215800,4,-5184.251465,-2033.325317,-58.405655,0,0,1,0,100,0),
+(215800,5,-5201.125488,-2008.868042,-59.341610,0,0,1,0,100,0),
+(215800,6,-5213.592285,-1976.838135,-62.579338,0,0,1,0,100,0),
+(215800,7,-5217.537598,-1953.069336,-63.412289,0,0,1,0,100,0),
+(215800,8,-5222.407227,-1918.432617,-64.084473,0,0,1,0,100,0),
+(215800,9,-5227.438965,-1890.931396,-64.298187,0,0,1,0,100,0),
+(215800,10,-5237.295410,-1857.382202,-63.312351,0,0,1,0,100,0),
+(215800,11,-5240.198242,-1831.000977,-62.605770,0,0,1,0,100,0),
+(215800,12,-5232.751953,-1803.313843,-61.801113,0,0,1,0,100,0),
+(215800,13,-5220.500488,-1781.184692,-61.136387,0,0,1,0,100,0),
+(215800,14,-5207.737793,-1765.522705,-61.406212,0,0,1,0,100,0),
+(215800,15,-5183.208984,-1749.964600,-63.147694,0,0,1,0,100,0),
+(215800,16,-5155.251465,-1748.128174,-64.991013,0,0,1,0,100,0),
+(215800,17,-5127.433105,-1751.266235,-66.970360,0,0,1,0,100,0),
+(215800,18,-5099.635254,-1754.598633,-66.299957,0,0,1,0,100,0),
+(215800,19,-5077.771973,-1756.719604,-66.374535,0,0,1,0,100,0),
+(215800,20,-5035.874023,-1759.257813,-65.924889,0,0,1,0,100,0),
+(215800,21,-5003.504395,-1755.737061,-64.941254,0,0,1,0,100,0),
+(215800,22,-4983.328613,-1736.512451,-63.698681,0,0,1,0,100,0),
+(215800,23,-4964.090820,-1716.174316,-61.579193,0,0,1,0,100,0),
+(215800,24,-4951.019043,-1689.857910,-57.429195,0,0,1,0,100,0),
+(215800,25,-4951.841797,-1666.268433,-51.589535,0,0,1,0,100,0),
+(215800,26,-4960.942871,-1639.823608,-46.855881,0,0,1,0,100,0),
+(215800,27,-4966.779297,-1612.737427,-43.381424,0,0,1,0,100,0),
+(215800,28,-4969.742676,-1589.195190,-43.398708,0,0,1,0,100,0),
+(215800,29,-4970.269043,-1554.236694,-46.741776,0,0,1,0,100,0),
+(215800,30,-4965.645996,-1536.527954,-47.020432,0,0,1,0,100,0),
+(215800,31,-4947.948242,-1518.798950,-48.846462,0,0,1,0,100,0),
+(215800,32,-4921.585938,-1495.780884,-48.689701,0,0,1,0,100,0),
+(215800,33,-4903.989746,-1476.149902,-49.428204,0,0,1,0,100,0),
+(215800,34,-4890.350098,-1454.333618,-51.238930,0,0,1,0,100,0),
+(215800,35,-4879.882324,-1428.382568,-50.201576,0,0,1,0,100,0),
+(215800,36,-4861.081055,-1406.409302,-52.779129,0,0,1,0,100,0),
+(215800,37,-4840.355957,-1387.582764,-53.201244,0,0,1,0,100,0),
+(215800,38,-4816.097168,-1368.694336,-54.406181,0,0,1,0,100,0),
+(215800,39,-4803.630371,-1359.654663,-54.182922,0,0,1,0,100,0),
+(215800,40,-4785.889648,-1338.234375,-52.060898,0,0,1,0,100,0),
+(215800,41,-4773.799316,-1313.738037,-49.219383,0,0,1,0,100,0),
+(215800,42,-4758.390137,-1290.399536,-48.736355,0,0,1,0,100,0),
+(215800,43,-4737.998047,-1266.390625,-53.017822,0,0,1,0,100,0),
+(215800,44,-4711.256836,-1256.681030,-52.615559,0,0,1,0,100,0),
+(215800,45,-4679.181152,-1252.814209,-51.463142,0,0,1,0,100,0),
+(215800,46,-4651.669922,-1247.886230,-52.659782,0,0,1,0,100,0),
+(215800,47,-4623.778320,-1245.656006,-52.973877,0,0,0,0,100,0),
+(215800,48,-4607.115234,-1243.643433,-53.064377,0,0,0,0,100,0),
+(215800,49,-4587.437500,-1247.870361,-53.855892,0,0,0,0,100,0),
+(215800,50,-4585.422852,-1249.448975,-53.857651,0,0,0,0,100,0),
+(215800,51,-4598.802246,-1245.325928,-53.565094,0,0,0,0,100,0),
+(215800,52,-4614.470703,-1243.162109,-52.968750,0,0,1,0,100,0),
+(215800,53,-4628.971680,-1251.457642,-52.753529,0,0,1,0,100,0),
+(215800,54,-4645.428223,-1247.659546,-52.638180,0,0,1,0,100,0),
+(215800,55,-4661.278320,-1248.203979,-52.803345,0,0,1,0,100,0),
+(215800,56,-4681.649902,-1253.290405,-51.342243,0,0,1,0,100,0),
+(215800,57,-4715.111816,-1257.436401,-52.791569,0,0,1,0,100,0),
+(215800,58,-4747.491211,-1264.123169,-53.191650,0,0,1,0,100,0),
+(215800,59,-4759.030273,-1286.646851,-49.020157,0,0,1,0,100,0),
+(215800,60,-4774.152344,-1310.650635,-48.968861,0,0,1,0,100,0),
+(215800,61,-4784.423340,-1342.359375,-53.125374,0,0,1,0,100,0),
+(215800,62,-4809.395508,-1362.980469,-54.185860,0,0,1,0,100,0),
+(215800,63,-4837.885254,-1383.289795,-53.668198,0,0,1,0,100,0),
+(215800,64,-4867.006836,-1404.410400,-53.336357,0,0,1,0,100,0),
+(215800,65,-4887.808105,-1414.729858,-52.435139,0,0,1,0,100,0),
+(215800,66,-4895.424316,-1429.204102,-50.844917,0,0,1,0,100,0),
+(215800,67,-4896.184570,-1457.176392,-50.691010,0,0,1,0,100,0),
+(215800,68,-4904.700684,-1480.074097,-49.529816,0,0,1,0,100,0),
+(215800,69,-4919.068359,-1495.049683,-48.906162,0,0,1,0,100,0),
+(215800,70,-4966.222168,-1533.183350,-47.460865,0,0,1,0,100,0),
+(215800,71,-4976.059570,-1543.898804,-47.982384,0,0,1,0,100,0),
+(215800,72,-4977.478027,-1556.967163,-47.390457,0,0,1,0,100,0),
+(215800,73,-4969.218262,-1596.886963,-42.604176,0,0,1,0,100,0),
+(215800,74,-4965.557617,-1625.019775,-44.356102,0,0,1,0,100,0),
+(215800,75,-4960.265137,-1644.879883,-47.910450,0,0,1,0,100,0),
+(215800,76,-4949.774902,-1671.032593,-52.508038,0,0,1,0,100,0),
+(215800,77,-4947.920410,-1689.247437,-57.222298,0,0,1,0,100,0),
+(215800,78,-4956.675293,-1709.576660,-60.879921,0,0,1,0,100,0),
+(215800,79,-4963.580078,-1727.992676,-61.527287,0,0,1,0,100,0),
+(215800,80,-4951.212891,-1744.922241,-58.623901,0,0,1,0,100,0),
+(215800,81,-4937.354492,-1760.683716,-54.702461,0,0,1,0,100,0),
+(215800,82,-4914.461426,-1782.888306,-39.879925,0,0,1,0,100,0),
+(215800,83,-4896.937500,-1794.455566,-35.221378,0,0,1,0,100,0),
+(215800,84,-4880.451172,-1807.454590,-40.863453,0,0,1,0,100,0),
+(215800,85,-4863.387207,-1822.359985,-50.164097,0,0,1,0,100,0),
+(215800,86,-4862.391113,-1836.323608,-50.317734,0,0,1,0,100,0),
+(215800,87,-4861.693848,-1862.064575,-52.851486,0,0,1,0,100,0),
+(215800,88,-4872.836426,-1883.313110,-52.659794,0,0,1,0,100,0),
+(215800,89,-4870.795898,-1892.231201,-52.494869,0,0,1,0,100,0),
+(215800,90,-4849.780762,-1918.967407,-48.753052,0,0,1,0,100,0),
+(215800,91,-4830.531738,-1939.242310,-45.041187,0,0,1,0,100,0),
+(215800,92,-4811.462402,-1962.676147,-50.805752,0,0,1,0,100,0),
+(215800,93,-4803.708984,-1987.761475,-57.812279,0,0,1,0,100,0),
+(215800,94,-4807.741211,-2007.688599,-56.595051,0,0,1,0,100,0),
+(215800,95,-4818.894531,-2033.343628,-46.855431,0,0,1,0,100,0),
+(215800,96,-4830.502930,-2059.523926,-39.165230,0,0,1,0,100,0),
+(215800,97,-4830.697754,-2073.522705,-35.956047,0,0,1,0,100,0),
+(215800,98,-4836.328613,-2090.582764,-31.344126,0,0,1,0,100,0),
+(215800,99,-4849.243652,-2105.089600,-32.308865,0,0,1,0,100,0),
+(215800,100,-4860.978516,-2112.724609,-36.231457,0,0,1,0,100,0),
+(215800,101,-4887.553711,-2130.225098,-46.567883,0,0,1,0,100,0),
+(215800,102,-4903.914551,-2142.859863,-52.826328,0,0,1,0,100,0),
+(215800,103,-4925.906250,-2157.612549,-56.605095,0,0,1,0,100,0),
+(215800,104,-4951.915527,-2172.731934,-54.968418,0,0,1,0,100,0),
+(215800,105,-4968.645996,-2184.287109,-53.815079,0,0,1,0,100,0),
+(215800,106,-4986.170898,-2202.175049,-53.769779,0,0,1,0,100,0),
+(215800,107,-5006.877441,-2230.390625,-53.176605,0,0,1,0,100,0),
+(215800,108,-5027.830566,-2247.915283,-52.767597,0,0,1,0,100,0),
+(215800,109,-5042.617676,-2243.480469,-53.246635,0,0,1,0,100,0),
+(215800,110,-5049.044434,-2230.145020,-53.927814,0,0,0,0,100,0),
+(215800,111,-5047.357910,-2223.671631,-54.098183,0,0,0,0,100,0),
+(215800,112,-5039.557129,-2203.820313,-54.500809,0,0,0,0,100,0),
+(215800,113,-5042.728027,-2213.820068,-54.411404,0,0,0,0,100,0),
+(215800,114,-5049.869629,-2229.956055,-53.964584,0,0,0,0,100,0),
+(215800,115,-5062.334961,-2216.283447,-54.635983,0,0,1,0,100,0),
+(215800,116,-5065.966309,-2193.272949,-55.662319,0,0,1,0,100,0),
+(215800,117,-5068.202148,-2158.396240,-53.611042,0,0,1,0,100,0),
+(215800,118,-5074.131836,-2135.689697,-47.028843,0,0,1,0,100,0);
+-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8512: PATH for XT-9 in Stonetalon Mountains
+UPDATE `creature` SET `MovementType`=2,`position_x`=1222.276978,`position_y`=199.114410,`position_z`=5.525987,`currentwaypoint`=1 WHERE `guid`=32296;
+UPDATE `creature_addon` SET `path_id`=322960 WHERE `guid`=32296;
+DELETE FROM `waypoint_data` WHERE `id`=322960;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(322960,1,1222.276978,199.114410,5.525987,0,0,0,0,100,0),
+(322960,2,1209.336914,203.459274,5.948678,0,0,0,0,100,0),
+(322960,3,1192.071899,209.217392,5.244399,0,0,0,0,100,0),
+(322960,4,1179.189941,213.726425,5.674247,0,0,0,0,100,0),
+(322960,5,1164.158936,220.785812,4.382747,0,0,0,0,100,0),
+(322960,6,1147.991821,229.042755,3.532074,0,0,0,0,100,0),
+(322960,7,1132.148071,231.524780,7.357968,0,0,0,0,100,0),
+(322960,8,1118.510132,231.104340,9.255224,0,0,0,0,100,0),
+(322960,9,1100.385498,229.453033,11.308514,0,0,0,0,100,0),
+(322960,10,1087.943970,226.725204,10.917646,0,0,0,0,100,0),
+(322960,11,1080.088501,214.416534,10.396996,0,0,0,0,100,0),
+(322960,12,1080.622314,198.052307,9.542740,0,0,0,0,100,0),
+(322960,13,1084.607544,185.012192,8.583089,0,0,0,0,100,0),
+(322960,14,1093.251343,171.689758,4.980580,0,0,0,0,100,0),
+(322960,15,1092.938721,164.037949,4.320332,0,0,0,0,100,0),
+(322960,16,1088.528442,156.011032,4.629877,0,0,0,0,100,0),
+(322960,17,1080.081177,140.358978,4.004388,0,0,0,0,100,0),
+(322960,18,1085.399170,127.790977,1.792864,0,0,0,0,100,0),
+(322960,19,1096.183960,118.597023,0.878709,0,0,0,0,100,0),
+(322960,20,1099.510010,109.012466,0.827630,0,0,0,0,100,0),
+(322960,21,1098.441162,95.011284,-0.082417,0,0,0,0,100,0),
+(322960,22,1098.891724,82.300453,-1.118887,0,0,0,0,100,0),
+(322960,23,1102.501099,69.463821,-2.654820,0,0,0,0,100,0),
+(322960,24,1096.981812,57.157135,-0.905613,0,0,0,0,100,0),
+(322960,25,1091.626831,44.614517,1.431422,0,0,0,0,100,0),
+(322960,26,1086.331299,32.963169,3.482675,0,0,0,0,100,0),
+(322960,27,1085.050171,20.679634,4.132904,0,0,0,0,100,0),
+(322960,28,1092.919678,7.784930,3.964831,0,0,0,0,100,0),
+(322960,29,1103.300659,1.748433,3.811355,0,0,0,0,100,0),
+(322960,30,1108.904541,6.663838,1.965487,0,0,0,0,100,0),
+(322960,31,1119.753784,17.255640,2.577073,0,0,0,0,100,0),
+(322960,32,1126.567993,33.555817,4.283827,0,0,0,0,100,0),
+(322960,33,1125.516357,48.321960,2.388851,0,0,0,0,100,0),
+(322960,34,1129.901855,61.247665,0.658247,0,0,0,0,100,0),
+(322960,35,1132.704956,73.019661,-0.850287,0,0,0,0,100,0),
+(322960,36,1136.619019,88.970215,-5.982680,0,0,0,0,100,0),
+(322960,37,1137.549072,99.014374,-5.729230,0,0,0,0,100,0),
+(322960,38,1134.350220,114.686874,-1.268749,0,0,0,0,100,0),
+(322960,39,1130.803467,132.522125,0.171318,0,0,0,0,100,0),
+(322960,40,1128.713135,146.011124,1.776255,0,0,0,0,100,0),
+(322960,41,1126.625732,159.500565,-0.202374,0,0,0,0,100,0),
+(322960,42,1128.083984,177.528091,1.144017,0,0,0,0,100,0),
+(322960,43,1132.362427,188.766861,2.936989,0,0,0,0,100,0),
+(322960,44,1141.536377,204.471161,2.415991,0,0,0,0,100,0),
+(322960,45,1149.883301,215.242752,2.582333,0,0,0,0,100,0),
+(322960,46,1161.778809,225.302536,3.651462,0,0,0,0,100,0),
+(322960,47,1172.943726,233.153442,5.679798,0,0,0,0,100,0),
+(322960,48,1189.031982,229.718399,8.996441,0,0,0,0,100,0),
+(322960,49,1196.270386,219.675781,6.686813,0,0,0,0,100,0),
+(322960,50,1207.258911,211.584717,6.367443,0,0,0,0,100,0),
+(322960,51,1218.403931,203.703522,6.202962,0,0,0,0,100,0),
+(322960,52,1229.438110,193.180573,4.627266,0,0,0,0,100,0);
+-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8502: PATHING FOR URUSON
+UPDATE `creature` SET `MovementType`=2,`position_x`=9816.841797,`position_y`=355.442474,`position_z`=1308.459351,`currentwaypoint`=1 WHERE `guid`=46350;
+UPDATE `creature_addon` SET `path_id`=463500 WHERE `guid`=46350;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(463500,1,9816.841797,355.442474,1308.459351,0,0,0,0,100,0),
+(463500,2,9812.415039,362.828094,1308.752197,0,0,0,0,100,0),
+(463500,3,9813.471680,371.201080,1307.603882,0,0,0,0,100,0),
+(463500,4,9817.410156,378.589417,1307.885742,0,0,0,0,100,0),
+(463500,5,9825.732422,384.063232,1307.750610,0,0,0,0,100,0),
+(463500,6,9834.477539,389.443268,1307.568115,0,0,0,0,100,0),
+(463500,7,9841.236328,395.250305,1307.572998,0,0,0,0,100,0),
+(463500,8,9848.033203,401.213165,1306.638672,0,0,0,0,100,0),
+(463500,9,9859.214844,406.416229,1305.993896,0,0,0,0,100,0),
+(463500,10,9869.071289,406.038055,1306.539917,0,0,0,0,100,0),
+(463500,11,9878.757813,405.102966,1307.240845,0,0,0,0,100,0),
+(463500,12,9885.528320,403.787720,1307.657715,0,0,0,0,100,0),
+(463500,13,9889.619141,397.835724,1308.962280,0,0,0,0,100,0),
+(463500,14,9893.748047,390.061859,1309.997925,0,0,0,0,100,0),
+(463500,15,9896.480469,384.763855,1309.682861,0,0,0,0,100,0),
+(463500,16,9893.901367,389.335175,1309.996948,0,0,0,0,100,0),
+(463500,17,9891.625977,394.618530,1309.802979,0,0,0,0,100,0),
+(463500,18,9889.411133,401.266754,1308.383423,0,0,0,0,100,0),
+(463500,19,9889.074219,410.169098,1306.578735,0,0,0,0,100,0),
+(463500,20,9889.352539,418.270325,1305.849609,0,0,0,0,100,0),
+(463500,21,9889.537109,426.961700,1305.150146,0,0,0,0,100,0),
+(463500,22,9886.551758,436.957245,1304.242920,0,0,0,0,100,0),
+(463500,23,9880.396484,443.821472,1303.310303,0,0,0,0,100,0),
+(463500,24,9870.833008,446.340790,1303.197144,0,0,0,0,100,0),
+(463500,25,9862.344727,445.663116,1305.028198,0,0,0,0,100,0),
+(463500,26,9853.178711,443.624847,1306.194458,0,0,0,0,100,0),
+(463500,27,9846.104492,441.481476,1307.793701,0,0,0,0,100,0),
+(463500,28,9837.686523,438.918671,1307.793701,0,0,0,0,100,0),
+(463500,29,9844.111328,440.791779,1307.793701,0,0,0,0,100,0),
+(463500,30,9851.247070,442.721130,1306.898926,0,0,0,0,100,0),
+(463500,31,9859.722656,444.624786,1305.261841,0,0,0,0,100,0),
+(463500,32,9868.759766,446.034027,1303.592163,0,0,0,0,100,0),
+(463500,33,9876.381836,446.370392,1302.643555,0,0,0,0,100,0),
+(463500,34,9882.995117,443.218323,1303.420654,0,0,0,0,100,0),
+(463500,35,9886.392578,436.599731,1304.326904,0,0,0,0,100,0),
+(463500,36,9888.699219,427.984589,1305.102173,0,0,0,0,100,0),
+(463500,37,9888.677734,420.184723,1305.806763,0,0,0,0,100,0),
+(463500,38,9886.924805,411.696075,1306.650635,0,0,0,0,100,0),
+(463500,39,9881.045898,406.513794,1307.236572,0,0,0,0,100,0),
+(463500,40,9872.117188,405.889221,1306.774536,0,0,0,0,100,0),
+(463500,41,9863.948242,407.544800,1306.226685,0,0,0,0,100,0),
+(463500,42,9857.266602,406.285339,1306.106934,0,0,0,0,100,0),
+(463500,43,9850.121094,401.789185,1306.542236,0,0,0,0,100,0),
+(463500,44,9843.356445,396.552856,1307.546021,0,0,0,0,100,0),
+(463500,45,9836.401367,390.980865,1307.567749,0,0,0,0,100,0),
+(463500,46,9828.750977,386.198456,1307.593384,0,0,0,0,100,0),
+(463500,47,9820.420898,380.808014,1307.936279,0,0,0,0,100,0),
+(463500,48,9814.184570,374.616272,1307.687866,0,0,0,0,100,0),
+(463500,49,9812.975586,367.559235,1307.733276,0,0,0,0,100,0),
+(463500,50,9812.920898,362.307007,1308.749512,0,0,0,0,100,0);
+-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8501: SET up path and formation for snake pet vendor
+DELETE FROM `creature_formations` WHERE `leaderGUID`=3476;
+INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`) VALUES
+(3476,3476,0,0,2),
+(3476,3477,3,45,0),
+(3476,3560,3,0,0),
+(3476,3571,3,315,0);
+UPDATE `creature` SET `MovementType`=2,`position_x`=1527.534058,`position_y`=-4154.753418,`position_z`=40.633469,`currentwaypoint`=1 WHERE `guid` IN (3476,3477,3560,3571);
+-- point to new waypoint
+UPDATE `creature_addon` SET `path_id`=34760 WHERE `guid` IN(3476,3477,3560,3571);
+-- create waypoint data
+DELETE FROM `waypoint_data` WHERE `id`=34760;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(34760,1,1527.534058,-4154.753418,40.633469,0,0,0,0,100,0),
+(34760,1,1538.660889,-4155.732910,40.592560,0,0,0,0,100,0),
+(34760,1,1544.449585,-4165.091797,40.235329,0,0,0,0,100,0),
+(34760,1,1549.555054,-4182.306152,40.612457,0,0,0,0,100,0),
+(34760,1,1546.198364,-4195.886719,41.639046,0,0,0,0,100,0),
+(34760,1,1546.507202,-4208.074219,42.972824,0,0,0,0,100,0),
+(34760,1,1563.277588,-4208.397949,43.588390,0,0,0,0,100,0),
+(34760,1,1580.304932,-4204.166992,42.040199,0,0,0,0,100,0),
+(34760,1,1579.333008,-4190.097656,40.364456,0,0,0,0,100,0),
+(34760,1,1578.215454,-4169.156250,36.905151,0,0,0,0,100,0),
+(34760,1,1583.998901,-4151.174316,34.014111,0,0,0,0,100,0),
+(34760,1,1598.492920,-4127.300293,30.541750,0,0,0,0,100,0),
+(34760,1,1617.180908,-4113.645508,29.638874,0,0,0,0,100,0),
+(34760,1,1636.737183,-4106.015625,30.359407,0,0,0,0,100,0),
+(34760,1,1656.451660,-4098.783691,33.361252,0,0,0,0,100,0),
+(34760,1,1682.917603,-4089.642822,37.421402,0,0,0,0,100,0),
+(34760,1,1703.152954,-4084.039551,40.476315,0,0,0,0,100,0),
+(34760,1,1726.875488,-4072.490234,43.763309,0,0,0,0,100,0),
+(34760,1,1731.973511,-4067.927002,44.831135,0,0,0,0,100,0),
+(34760,1,1741.482544,-4049.207031,44.283241,0,0,0,0,100,0),
+(34760,1,1745.628418,-4030.451172,45.169521,0,0,0,0,100,0),
+(34760,1,1745.231323,-4016.597412,45.969612,0,0,0,0,100,0),
+(34760,1,1740.649658,-3996.140625,46.610088,0,0,0,0,100,0),
+(34760,1,1729.449951,-3971.255615,48.347816,0,0,0,0,100,0),
+(34760,1,1723.011841,-3958.823730,49.068924,0,0,0,0,100,0),
+(34760,1,1708.968994,-3932.853760,50.349556,0,0,0,0,100,0),
+(34760,1,1721.805054,-3957.727295,49.226501,0,0,0,0,100,0),
+(34760,1,1734.530396,-3982.660156,47.613869,0,0,0,0,100,0),
+(34760,1,1740.518555,-4002.613770,46.854977,0,0,0,0,100,0),
+(34760,1,1743.422241,-4023.412109,46.146847,0,0,0,0,100,0),
+(34760,1,1742.478638,-4043.433350,44.345577,0,0,0,0,100,0),
+(34760,1,1735.912354,-4059.685303,44.504650,0,0,0,0,100,0),
+(34760,1,1729.070313,-4071.194092,44.119446,0,0,0,0,100,0),
+(34760,1,1714.267700,-4082.427490,40.937172,0,0,0,0,100,0),
+(34760,1,1696.915161,-4087.865967,38.582226,0,0,0,0,100,0),
+(34760,1,1676.688477,-4093.507080,36.173759,0,0,0,0,100,0),
+(34760,1,1656.776611,-4100.146484,33.436935,0,0,0,0,100,0),
+(34760,1,1637.123169,-4107.544922,30.447823,0,0,0,0,100,0),
+(34760,1,1617.755859,-4115.625000,29.678862,0,0,0,0,100,0),
+(34760,1,1597.177124,-4130.714844,31.122652,0,0,0,0,100,0),
+(34760,1,1590.612183,-4140.921875,32.565376,0,0,0,0,100,0),
+(34760,1,1578.348389,-4166.501953,36.404202,0,0,0,0,100,0),
+(34760,1,1578.059326,-4183.750488,39.244587,0,0,0,0,100,0),
+(34760,1,1578.675171,-4204.605957,42.405655,0,0,0,0,100,0),
+(34760,1,1569.681030,-4206.293457,43.517696,0,0,0,0,100,0),
+(34760,1,1548.253662,-4208.393555,43.110550,0,0,0,0,100,0),
+(34760,1,1544.526123,-4201.686035,42.132000,0,0,0,0,100,0),
+(34760,1,1549.644531,-4176.722656,40.245403,0,0,0,0,100,0),
+(34760,1,1547.767822,-4167.392578,39.779228,0,0,0,0,100,0),
+(34760,1,1541.973145,-4159.893555,40.252274,0,0,0,0,100,0);
+-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8497: Proper pathing for Threggil (rare in Teldrassil - Fel Rock)
+UPDATE `creature` SET `MovementType`=2,`position_x`=10115.946289,`position_y`=1167.518799,`position_z`=1314.169800,`currentwaypoint`=1 WHERE `guid`=46354;
+UPDATE `creature_addon` SET `path_id`=463540 WHERE `guid`=46354;
+DELETE FROM `waypoint_data` WHERE `id`=463540;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) values
+(463540,1,10115.946289,1167.518799,1314.169800,0,0,0,0,100,0),
+(463540,2,10116.369141,1180.527344,1314.797729,0,0,0,0,100,0),
+(463540,3,10115.022461,1189.806763,1313.652832,0,0,0,0,100,0),
+(463540,4,10110.606445,1199.469116,1311.572510,0,0,0,0,100,0),
+(463540,5,10103.337891,1203.544067,1311.799561,0,0,0,0,100,0),
+(463540,6,10096.462891,1201.196289,1312.748047,0,0,0,0,100,0),
+(463540,7,10088.860352,1196.343018,1315.411377,0,0,0,0,100,0),
+(463540,8,10082.796875,1189.643555,1316.328369,0,0,0,0,100,0),
+(463540,9,10076.649414,1182.240234,1316.167480,0,0,0,0,100,0),
+(463540,10,10072.209961,1176.473511,1316.686768,0,0,0,0,100,0),
+(463540,11,10068.778320,1169.667603,1318.986328,0,0,0,0,100,0),
+(463540,12,10063.398438,1163.494019,1319.416260,0,0,0,0,100,0),
+(463540,13,10057.836914,1157.816895,1319.428955,0,0,0,0,100,0),
+(463540,14,10055.192383,1151.090576,1320.125732,0,0,0,0,100,0),
+(463540,15,10057.836914,1157.816895,1319.428955,0,0,0,0,100,0),
+(463540,16,10063.398438,1163.494019,1319.416260,0,0,0,0,100,0),
+(463540,17,10068.778320,1169.667603,1318.986328,0,0,0,0,100,0),
+(463540,18,10072.209961,1176.473511,1316.686768,0,0,0,0,100,0),
+(463540,19,10076.649414,1182.240234,1316.167480,0,0,0,0,100,0),
+(463540,20,10082.796875,1189.643555,1316.328369,0,0,0,0,100,0),
+(463540,21,10088.860352,1196.343018,1315.411377,0,0,0,0,100,0),
+(463540,22,10096.462891,1201.196289,1312.748047,0,0,0,0,100,0),
+(463540,23,10103.337891,1203.544067,1311.799561,0,0,0,0,100,0),
+(463540,24,10110.606445,1199.469116,1311.572510,0,0,0,0,100,0),
+(463540,25,10115.022461,1189.806763,1313.652832,0,0,0,0,100,0),
+(463540,26,10116.369141,1180.527344,1314.797729,0,0,0,0,100,0);
+-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Steelsnap's (guid 21698) guards (guids 21660,21661) should be in formation rather than set up with identical waypoints. This corrects pathing problems
+UPDATE `creature` SET `MovementType`=0 WHERE guid IN (21661, 21660);
+DELETE FROM `creature_formations` WHERE `memberGUID` IN (21698,21661,21660);
+INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`) VALUES
+(21698,21698,0,0,2),
+(21698,21661,6,0,2),
+(21698,21660,12,0,2);
diff --git a/sql/updates/world/2012_12_04_00_world_creature_text.sql b/sql/updates/world/2012_12_04_00_world_creature_text.sql
new file mode 100644
index 00000000000..654ed11de4f
--- /dev/null
+++ b/sql/updates/world/2012_12_04_00_world_creature_text.sql
@@ -0,0 +1,388 @@
+-- ------------------------------- --
+-- Creature text conversion part 6 --
+-- ------------------------------- --
+-- moorabi
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1604017 AND -1604010;
+DELETE FROM `creature_text` WHERE `entry`=29305;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(29305,0,0,14,0,100,"moorabi SAY_AGGRO","We fought back da Scourge. What chance joo be thinkin' JOO got?"),
+(29305,1,0,14,0,100,"moorabi SAY_SLAY_1","Who gonna stop me; you? "),
+(29305,1,1,14,0,100,"moorabi SAY_SLAY_2","Not so tough now."),
+(29305,2,0,14,0,100,"moorabi SAY_DEATH","If our gods can die... den so can we... "),
+(29305,3,0,14,0,100,"moorabi SAY_TRANSFORM","Get ready for somethin'... much... BIGGAH! "),
+(29305,4,0,14,0,100,"moorabi SAY_QUAKE","Da ground gonna swallow you up"),
+(29305,5,0,41,0,100,"moorabi EMOTE_TRANSFORM","%s begins to transform!");
+
+-- Slad'ran
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1604023 AND -1604017;
+DELETE FROM `creature_text` WHERE `entry`=29304;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(29304,0,0,41,0,100,"Slad'ran EMOTE_TRANSFORM","%s begins to transform!"),
+(29304,1,0,12,0,100,"Slad'ran SAY_SLAY_1","Ye not breathin'! Good."),
+(29304,1,1,12,0,100,"Slad'ran SAY_SLAY_2","You ssscared now?"),
+(29304,1,2,12,0,100,"Slad'ran SAY_SLAY_3","I'll eat you next, mon!"),
+(29304,2,0,12,0,100,"Slad'ran SAY_DEATH","I sssee now... Ssscourge wasss not... our greatessst enemy..."),
+(29304,3,0,12,0,100,"Slad'ran SAY_SUMMON_SNAKES","Minionsss of the scale, heed my call!"),
+(29304,4,0,12,0,100,"Slad'ran SAY_SUMMON_CONSTRICTORS","A thousssand fangs gonna rend your flesh!");
+
+-- blood queen lana thel
+DELETE FROM `creature_text` WHERE `entry`=37955 AND `groupid`=12;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(37955,12,0,41,0,100,"blood queen lana thel EMOTE_BERSERK_RAID","%s goes into a berserker rage!");
+
+-- sindragosa
+DELETE FROM `creature_text` WHERE `entry`=36853 AND `groupid`=11;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(36853,11,0,41,0,100,"sindragosa EMOTE_BERSERK_RAID","%s goes into a berserker rage!");
+
+-- anubrekhan
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1533008 AND -1533000;
+DELETE FROM `creature_text` WHERE `entry`=15956;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(15956,0,0,14,8785,100,"anubrekhan SAY_AGGRO1","Just a little taste..."),
+(15956,0,1,14,8786,100,"anubrekhan SAY_AGGRO2","There is no way out."),
+(15956,0,2,14,8787,100,"anubrekhan SAY_AGGRO3","Yes, Run! It makes the blood pump faster!"),
+(15956,1,0,14,8788,100,"anubrekhan SAY_GREET1","Ahh... welcome to my parlor."),
+(15956,1,1,14,8790,100,"anubrekhan SAY_GREET2","I hear little hearts beating. Yesss... beating faster now. Soon the beating will stop."),
+(15956,1,2,14,8791,100,"anubrekhan SAY_GREET3","Where to go? What to do? So many choices that all end in pain, end in death."),
+(15956,1,3,14,8792,100,"anubrekhan SAY_GREET4","Which one shall I eat first? So difficult to choose... the all smell so delicious."),
+(15956,1,4,14,8793,100,"anubrekhan SAY_GREET5","Closer now... tasty morsels. I've been too long without food. Without blood to drink."),
+(15956,2,0,14,8789,100,"anubrekhan SAY_SLAY","Shh... it will all be over soon.");
+
+-- faerlina
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1533016 AND -1533009;
+DELETE FROM `creature_text` WHERE `entry`=15953;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(15953,0,0,14,8799,100,"faerlina SAY_GREET","Your old lives, your mortal desires, mean nothing. You are acolytes of the master now, and you will serve the cause without question! The greatest glory is to die in the master's service!"),
+(15953,1,0,14,8794,100,"faerlina SAY_AGGRO1","Slay them in the master's name!"),
+(15953,1,1,14,8795,100,"faerlina SAY_AGGRO2","You cannot hide from me!"),
+(15953,1,2,14,8796,100,"faerlina SAY_AGGRO3","Kneel before me, worm!"),
+(15953,1,3,14,8797,100,"faerlina SAY_AGGRO4","Run while you still can!"),
+(15953,2,0,14,8800,100,"faerlina SAY_SLAY1","You have failed!"),
+(15953,2,1,14,8801,100,"faerlina SAY_SLAY2","Pathetic wretch!"),
+(15953,3,0,14,8798,100,"faerlina SAY_DEATH","The master... will avenge me!");
+
+-- korthazz
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1533057 AND -1533051;
+DELETE FROM `creature_text` WHERE `entry`=16064;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(16064,0,0,14,8899,100,"korthazz SAY_KORT_AGGRO","Come out and fight, ye wee ninny!"),
+(16064,1,0,14,8903,100,"korthazz SAY_KORT_TAUNT1","To arms, ye roustabouts! We've got company!"),
+(16064,1,1,14,8904,100,"korthazz SAY_KORT_TAUNT2","I heard about enough of yer sniveling. Shut yer fly trap 'afore I shut it for ye!"),
+(16064,1,2,14,8905,100,"korthazz SAY_KORT_TAUNT3","I'm gonna enjoy killin' these slack-jawed daffodils!"),
+(16064,2,0,14,8902,100,"korthazz SAY_KORT_SPECIAl","I like my meat extra crispy!"),
+(16064,3,0,14,8901,100,"korthazz SAY_KORT_SLAY","Next time, bring more friends!"),
+(16064,4,0,14,8900,100,"korthazz SAY_KORT_DEATH","What a bloody waste this is!");
+
+-- blaumeux
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1533050 AND -1533044;
+DELETE FROM `creature_text` WHERE `entry`=16065;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(16065,0,0,14,8892,100,"blaumeux SAY_BLAU_AGGRO","Defend youself!"),
+(16065,1,0,14,8896,100,"blaumeux SAY_BLAU_TAUNT1","Come, Zeliek, do not drive them out. Not before we've had our fun."),
+(16065,1,1,14,8897,100,"blaumeux SAY_BLAU_TAUNT2","I do hope they stay alive long enough for me to... introduce myself."),
+(16065,1,2,14,8898,100,"blaumeux SAY_BLAU_TAUNT3","The first kill goes to me! Anyone care to wager?"),
+(16065,2,0,14,8895,100,"blaumeux SAY_BLAU_SPECIAL","Your life is mine!"),
+(16065,3,0,14,8894,100,"blaumeux SAY_BLAU_SLAY","Who's next?"),
+(16065,4,0,14,8893,100,"blaumeux SAY_BLAU_DEATH","Tou... che!");
+
+-- rivendare
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1533074 AND -1533065;
+DELETE FROM `creature_text` WHERE `entry`=30549;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(30549,0,0,14,14571,100,"rivendare SAY_RIVE_AGGRO1","You seek death?"),
+(30549,0,1,14,14572,100,"rivendare SAY_RIVE_AGGRO2","None shall pass!"),
+(30549,0,2,14,14573,100,"rivendare SAY_RIVE_AGGRO3","Be still!"),
+(30549,1,0,14,14577,100,"rivendare SAY_RIVE_TAUNT1","Enough prattling. Let them come! We shall grind their bones to dust."),
+(30549,1,1,14,14578,100,"rivendare SAY_RIVE_TAUNT2","Conserve your anger! Harness your rage! You will all have outlets for your frustration soon enough."),
+(30549,1,2,14,14579,100,"rivendare SAY_RIVE_TAUNT3","Life is meaningless. It is in death that we are truly tested."),
+(30549,2,0,14,14576,100,"rivendare SAY_RIVE_SPECIAL","Bow to the might of the scourge!"),
+(30549,3,0,14,14574,100,"rivendare SAY_RIVE_SLAY1","You will find no peace in death."),
+(30549,3,1,14,14575,100,"rivendare SAY_RIVE_SLAY2","The master's will is done."),
+(30549,4,0,14,14580,100,"rivendare SAY_RIVE_DEATH","Death... will not stop me...");
+
+-- zeliek
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1533064 AND -1533058;
+DELETE FROM `creature_text` WHERE `entry`=16063;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(16063,0,0,14,8913,100,"zeliek SAY_ZELI_AGGRO","Flee, before it's too late!"),
+(16063,1,0,14,8917,100,"zeliek SAY_ZELI_TAUNT1","Invaders, cease this foolish venture at once! Turn away while you still can!"),
+(16063,1,1,14,8918,100,"zeliek SAY_ZELI_TAUNT2","Perhaps they will come to their senses, and run away as fast as they can!"),
+(16063,1,2,14,8919,100,"zeliek SAY_ZELI_TAUNT3","Do not continue! Turn back while there's still time!"),
+(16063,2,0,14,8916,100,"zeliek SAY_ZELI_SPECIAL","I- I have no choice but to obey!"),
+(16063,3,0,14,8915,100,"zeliek SAY_ZELI_SLAY","Forgive me!"),
+(16063,4,0,14,8914,100,"zeliek SAY_ZELI_DEATH","It is... as it should be.");
+
+-- gothik
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1533043 AND -1533040;
+DELETE FROM `creature_text` WHERE `entry`=16060;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(16060,0,0,14,8807,100,"gothik SAY_SPEECH","Foolishly you have sought your own demise. Brazenly you have disregarded powers beyond your understanding. You have fought hard to invade the realm of the harvester. Now there is only one way out - to walk the lonely path of the damned."),
+(16060,1,0,14,8806,100,"gothik SAY_KILL","Death is the only escape."),
+(16060,2,0,14,8805,100,"gothik SAY_DEATH","I... am... undone!"),
+(16060,3,0,14,8808,100,"gothik SAY_TELEPORT","I have waited long enough! Now, you face the harvester of souls!");
+
+-- heigan
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1533118 AND -1533109;
+DELETE FROM `creature_text` WHERE `entry`=15936;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(15936,0,0,14,8825,100,"heigan SAY_AGGRO1","You are mine now!"),
+(15936,0,1,14,8826,100,"heigan SAY_AGGRO2","I see you!"),
+(15936,0,2,14,8827,100,"heigan SAY_AGGRO3","You...are next!"),
+(15936,1,0,14,8829,100,"heigan SAY_SLAY","Close your eyes... sleep!"),
+(15936,2,0,14,8830,100,"heigan SAY_TAUNT1","The races of the world will perish. It is only a matter of time."),
+(15936,2,1,14,8831,100,"heigan SAY_TAUNT2","I see endless suffering, I see torment, I see rage. I see... everything!"),
+(15936,2,2,14,8832,100,"heigan SAY_TAUNT3","Soon... the world will tremble!"),
+(15936,2,3,14,8833,100,"heigan SAY_TAUNT4","The end is upon you."),
+(15936,2,4,14,8834,100,"heigan SAY_TAUNT5","Hungry worms will feast on your rotten flesh!"),
+(15936,3,0,14,8828,100,"heigan SAY_DEATH","Noo... o...");
+
+-- noth
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1533081 AND -1533075;
+DELETE FROM `creature_text` WHERE `entry`=15954;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(15954,0,0,14,8845,100,"noth SAY_AGGRO1","Glory to the master!"),
+(15954,0,1,14,8846,100,"noth SAY_AGGRO2","Your life is forfeit!"),
+(15954,0,2,14,8847,100,"noth SAY_AGGRO3","Die, trespasser!"),
+(15954,1,0,14,8851,100,"noth SAY_SUMMON","Rise, my soldiers! Rise and fight once more!"),
+(15954,2,0,14,8849,100,"noth SAY_SLAY1","My task is done!"),
+(15954,2,1,14,8850,100,"noth SAY_SLAY2","Breathe no more!"),
+(15954,3,0,14,8848,100,"noth SAY_DEATH","I will serve the master... in... death!");
+
+-- patchwerk
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1533022 AND -1533017;
+DELETE FROM `creature_text` WHERE `entry`=16028;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(16028,0,0,14,8909,100,"patchwerk SAY_AGGRO1","Patchwerk want to play!"),
+(16028,0,1,14,8910,100,"patchwerk SAY_AGGRO2","Kel'Thuzad make Patchwerk his Avatar of War!"),
+(16028,1,0,14,8912,100,"patchwerk SAY_SLAY","No more play?"),
+(16028,2,0,14,8911,100,"patchwerk SAY_DEATH","What happened to... Patch..."),
+(16028,3,0,16,0,100,"patchwerk EMOTE_BERSERK","goes into a berserker rage!"),
+(16028,4,0,16,0,100,"patchwerk EMOTE_ENRAGE","%s becomes enraged!");
+
+-- stalagg
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1533025 AND -1533023;
+DELETE FROM `creature_text` WHERE `entry`=15929;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(15929,0,0,14,8864,100,"stalagg SAY_STAL_AGGRO","Stalagg crush you!"),
+(15929,1,0,14,8866,100,"stalagg SAY_STAL_SLAY","Stalagg kill!"),
+(15929,2,0,14,8865,100,"stalagg SAY_STAL_DEATH","Master save me...");
+
+-- feugen
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1533028 AND -1533026;
+DELETE FROM `creature_text` WHERE `entry`=15930;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(15930,0,0,14,8802,100,"feugen SAY_FEUG_AGGRO","Feed you to master!"),
+(15930,1,0,14,8804,100,"feugen SAY_FEUG_SLAY","Feugen make master happy!"),
+(15930,2,0,14,8803,100,"feugen SAY_FEUG_DEATH","No... more... Feugen...");
+
+-- thaddius
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1533039 AND -1533029;
+DELETE FROM `creature_text` WHERE `entry`=15928;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(15928,0,0,14,8872,100,"thaddius SAY_GREET","You are too late... I... must... OBEY!"),
+(15928,1,0,14,8867,100,"thaddius SAY_AGGRO1","KILL!"),
+(15928,1,1,14,8868,100,"thaddius SAY_AGGRO2","EAT YOUR BONES!"),
+(15928,1,2,14,8869,100,"thaddius SAY_AGGRO3","BREAK YOU!"),
+(15928,2,0,14,8877,100,"thaddius SAY_SLAY","You die now!"),
+(15928,3,0,14,8871,100,"thaddius SAY_ELECT","Now YOU feel pain!"),
+(15928,4,0,14,8870,100,"thaddius SAY_DEATH","Thank... you..."),
+(15928,5,0,14,8873,100,"thaddius SAY_SCREAM1","Pleeease!"),
+(15928,5,1,14,8874,100,"thaddius SAY_SCREAM2","Stop, make it stop!"),
+(15928,5,2,14,8875,100,"thaddius SAY_SCREAM3","Help me! Save me!"),
+(15928,5,3,14,8876,100,"thaddius SAY_SCREAM4","Please, nooo!");
+
+-- anomalus
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1576013 AND -1576010;
+DELETE FROM `creature_text` WHERE `entry`=26763;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(26763,0,0,14,13186,100,"anomalus SAY_AGGRO","Chaos beckons."),
+(26763,1,0,14,13187,100,"anomalus SAY_DEATH","Of course."),
+(26763,2,0,14,13188,100,"anomalus SAY_RIFT","Reality... unwoven."),
+(26763,3,0,14,13189,100,"anomalus SAY_SHIELD","Indestructible.");
+
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1576044 AND -1576040;
+DELETE FROM `creature_text` WHERE `entry`=26723;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(26723,0,0,14,13450,100,"keristrasza SAY_AGGRO","Preserve? Why? There's no truth in it. No no no... only in the taking! I see that now!"),
+(26723,1,0,14,13453,100,"keristrasza SAY_SLAY","Now we've come to the truth!"),
+(26723,2,0,14,13452,100,"keristrasza SAY_ENRAGE","Finish it! FINISH IT! Kill me, or I swear by the Dragonqueen you'll never see daylight again!"),
+(26723,3,0,14,13454,100,"keristrasza SAY_DEATH","Dragonqueen... Life-Binder... preserve... me."),
+(26723,4,0,14,13451,100,"keristrasza SAY_CRYSTAL_NOVA","Stay. Enjoy your final moments.");
+
+-- grand magus telestra
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1576005 AND -1576000;
+DELETE FROM `creature_text` WHERE `entry`=26731;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(26731,0,0,14,13319,100,"grand magus telestra SAY_AGGRO","You know what they say about curiosity."),
+(26731,1,0,14,13324,100,"grand magus telestra SAY_KILL","Death becomes you!"),
+(26731,2,0,14,13320,100,"grand magus telestra SAY_DEATH","Damn the... luck."),
+(26731,3,0,14,13323,100,"grand magus telestra SAY_MERGE","Now to finish the job!"),
+(26731,4,0,14,13321,100,"grand magus telestra SAY_SPLIT_1","There's plenty of me to go around."),
+(26731,4,1,14,13322,100,"grand magus telestra SAY_SPLIT_2","I'll give you more than you can handle.");
+
+-- drakos
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1578016 AND -1578005;
+DELETE FROM `creature_text` WHERE `entry`=27654;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(27654,0,0,14,13594,100,"drakos SAY_AGGRO","The prisoners shall not go free! The word of Malygos is law!"),
+(27654,1,0,14,13602,100,"drakos SAY_KILL_1","A fitting punishment!"),
+(27654,1,1,14,13603,100,"drakos SAY_KILL_2","Sentence: executed!"),
+(27654,1,2,14,13604,100,"drakos SAY_KILL_3","Another casualty of war!"),
+(27654,2,0,14,13605,100,"drakos SAY_DEATH","The war... goes on."),
+(27654,3,0,14,13598,100,"drakos SAY_PULL_1","It is too late to run!"),
+(27654,3,1,14,13599,100,"drakos SAY_PULL_2","Gather 'round...."),
+(27654,3,2,14,13600,100,"drakos SAY_PULL_3","None shall escape!"),
+(27654,3,3,14,13601,100,"drakos SAY_PULL_4","I condemn you to death!"),
+(27654,4,0,14,13595,100,"drakos SAY_STOMP_1","Tremble, worms!"),
+(27654,4,1,14,13596,100,"drakos SAY_STOMP_2","I will crush you!"),
+(27654,4,2,14,13597,100,"drakos SAY_STOMP_3","Can you fly?");
+
+-- urom
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1578004 AND -1578000;
+DELETE FROM `creature_text` WHERE `entry`=27655;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(27655,0,0,14,0,100,"urom SAY_AGGRO_1","What do we have here... those that would defy the Spell-Weaver? Those without foresight our understanding. How can i make you see? Malygos is saving the world from itself! Bah! You are hardly worth my time!"),
+(27655,1,0,14,0,100,"urom SAY_AGGRO_2","Clearly my pets failed. Perhaps another demonstration is in order."),
+(27655,2,0,14,0,100,"urom SAY_AGGRO_3","Still you fight. Still you cling to misguided principles. If you survive, you'll find me in the center ring."),
+(27655,3,0,14,0,100,"urom SAY_AGGRO_4","Poor blind fools!"),
+(27655,4,0,14,0,100,"urom SAY_TELEPORT","A taste... just a small taste... of the Spell-Weaver's power!");
+
+-- injured rainspeaker oracle
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1571002 AND -1571000;
+DELETE FROM `creature_text` WHERE `entry`=28217;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(28217,0,0,12,0,100,"injured rainspeaker oracle SAY_END_IRO","You save me! We thank you. We going to go back to village now. You come too... you can stay with us! Puppy-men kind of mean anyway. "),
+(28217,1,0,12,0,100,"injured rainspeaker oracle SAY_QUEST_ACCEPT_IRO ","Let me know when you ready to go, okay?"),
+(28217,2,0,12,0,100,"injured rainspeaker oracle SAY_START_IRO","Home time!");
+
+-- vekjik
+DELETE FROM `script_texts` WHERE `entry`=-1000208;
+DELETE FROM `creature_text` WHERE `entry`=28315;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(28315,0,0,12,0,100,"vekjik SAY_TEXTID_VEKJIK1","Frenzyheart kill you if you come back. You no welcome here no more!");
+
+-- engineer helice
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1800053 AND -1800047;
+DELETE FROM `creature_text` WHERE `entry`=28787;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(28787,0,0,12,0,100,"engineer helice SAY_WP_1","We made it! Thank you for getting me out of that hell hole. Tell Hemet to expect me!"),
+(28787,1,0,12,0,100,"engineer helice SAY_WP_2","You really shouldn't play with this stuff. Someone could get hurt."),
+(28787,2,0,12,0,100,"engineer helice SAY_WP_3","Oh, look, it's another cartload of explosives! Let's help them dispose of it."),
+(28787,3,0,12,0,100,"engineer helice SAY_WP_4","It's getting a little hot over here. Shall we move on?"),
+(28787,4,0,12,0,100,"engineer helice SAY_WP_5","Or THIS is what you get."),
+(28787,5,0,12,0,100,"engineer helice SAY_WP_6","Listen up, Venture Company goons! Rule #1: Never keep the prisoner near the explosives."),
+(28787,6,0,12,0,100,"engineer helice SAY_WP_7","Let's get the hell out of here");
+
+-- adventurous dwarf
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1571043 AND -1571042;
+DELETE FROM `creature_text` WHERE `entry`=28604;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(28604,0,0,12,0,100,"adventurous dwarf SAY_DWARF_OUCH","Ouch! Watch where you're tugging!"),
+(28604,1,0,12,0,100,"adventurous dwarf SAY_DWARF_HELP","Glad I could help!");
+
+-- agnetta
+DELETE FROM `script_texts` WHERE `entry`=-1571003;
+DELETE FROM `creature_text` WHERE `entry`=30154;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(30154,0,0,12,0,100,"agnetta SAY_AGGRO","I'm not afraid of anything -- bring it on!");
+
+-- injured goblin
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1800043 AND -1800042;
+DELETE FROM `creature_text` WHERE `entry`=29434;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(29434,0,0,12,0,100,"injured goblin SAY_QUEST_START","Let me know when you're ready. I'd prefer sooner than later... what with the slowly dying from poison and all."),
+(29434,1,0,12,0,100,"injured goblin SAY_END_WP_REACHED","I'm going to bring the venom sack to Ricket... and then... you know... collapse. Thank you for helping me!");
+
+-- krystallus
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1599010 AND -1599007;
+DELETE FROM `creature_text` WHERE `entry`=27977;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(27977,0,0,14,14176,100,"krystallus SAY_AGGRO","Crush...."),
+(27977,1,0,14,14177,100,"krystallus SAY_KILL","Ha...ha...ha...ha..."),
+(27977,2,0,14,14179,100,"krystallus SAY_DEATH","Uuuuhhhhhhhhhh......"),
+(27977,3,0,14,14178,100,"krystallus SAY_SHATTER","Break.... you....");
+
+-- maiden of grief
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1599006 AND -1599000;
+DELETE FROM `creature_text` WHERE `entry`=27975;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(27975,0,0,14,13487,100,"maiden of grief SAY_AGGRO","You shouldn't have come...now you will die!"),
+(27975,1,0,14,13488,100,"maiden of grief SAY_SLAY_1","Why must it be this way?"),
+(27975,1,1,14,13489,100,"maiden of grief SAY_SLAY_2","You had it coming!"),
+(27975,1,2,14,13490,100,"maiden of grief SAY_SLAY_3","My burden grows heavier."),
+(27975,1,3,14,13491,100,"maiden of grief SAY_SLAY_4","This is your own fault!"),
+(27975,2,0,14,13493,100,"maiden of grief SAY_DEATH","I hope you all rot! I never...wanted...this."),
+(27975,3,0,14,13492,100,"maiden of grief SAY_STUN","So much lost time... that you'll never get back!");
+
+-- Sjonnir
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1599006 AND -1599000;
+DELETE FROM `creature_text` WHERE `entry`=27978;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(27978,0,0,14,14180,100,"Sjonnir SAY_AGGRO","Soft, vulnerable shells. Brief, fragile lives. You can not escape the curse of flesh!"),
+(27978,1,0,14,14182,100,"Sjonnir SAY_SLAY_1","Flesh is no match for iron!"),
+(27978,1,1,14,14183,100,"Sjonnir SAY_SLAY_2","Armies of iron will smother the world!"),
+(27978,1,2,12,0,100,"Sjonnir SAY_SLAY_3","Folvynn buul hrom onn!"),
+(27978,2,0,14,14184,100,"Sjonnir SAY_DEATH","Loken will not rest, until the forge is retaken. You changed nothing!");
+
+-- halls of stone
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1599068 AND -1599016;
+DELETE FROM `creature_text` WHERE `entry` IN (30898,30899,30897,28070);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+-- brann
+(28070,0,0,14,14244,100,"brann SAY_KILL_1","Now that's owning your supper!"),
+(28070,0,1,14,14245,100,"brann SAY_KILL_2","Press on, that's the way!"),
+(28070,0,2,14,14246,100,"brann SAY_KILL_3","Keep it up now. Plenty of death-dealing for everyone!"),
+(28070,1,0,14,14257,100,"brann SAY_LOW_HEALTH","I'm all kinds of busted up. Might not... make it..."),
+(28070,2,0,14,14258,100,"brann SAY_DEATH","Not yet, not... yet-"),
+(28070,3,0,14,14260,100,"brann SAY_PLAYER_DEATH_1","I'm doing everything I can!"),
+(28070,3,1,14,14261,100,"brann SAY_PLAYER_DEATH_2","Light preserve you!"),
+(28070,3,2,14,14262,100,"brann SAY_PLAYER_DEATH_3","I hope this is all worth it!"),
+(28070,4,0,14,14259,100,"brann SAY_ESCORT_START","Time to get some answers! Let's get this show on the road!"),
+(28070,5,0,14,14274,100,"brann SAY_SPAWN_DWARF","Don't worry. Old Brann has got your back. Keep that metal monstrosity busy and I'll see if I can sweet talk this machine into helping you."),
+(28070,6,0,14,14275,100,"brann SAY_SPAWN_TROGG","This is a wee bit trickier that before... Oh, bloody--incomin'!"),
+(28070,7,0,14,14276,100,"brann SAY_SPAWN_OOZE","What in the name o' Madoran did THAT do? Oh! Wait: I just about got it..."),
+(28070,8,0,14,14277,100,"brann SAY_SPAWN_EARTHEN","Ha, that did it. Help's a-coming. Take this you glow-eying brute!"),
+(28070,9,0,14,14247,100,"brann SAY_EVENT_INTRO_1","Take a moment and relish this with me! Soon all will be revealed! Okay then, let's do this!"),
+(28070,10,0,14,14248,100,"brann SAY_EVENT_INTRO_2","Now keep an eye out! I'll have this licked in two shakes of a--"),
+(28070,11,0,14,14249,100,"brann SAY_EVENT_A_1","Oh, that doesn't sound good. We might have a complication or two..."),
+(28070,12,0,14,14250,100,"brann SAY_EVENT_A_3","Ah, you want to play hardball, eh? That's just my game!"),
+(28070,13,0,14,14251,100,"brann SAY_EVENT_B_1","Couple more minutes and I'll--"),
+(28070,14,0,14,14252,100,"brann SAY_EVENT_B_3","Heightened? What's the good news?"),
+(28070,15,0,14,14253,100,"brann SAY_EVENT_C_1","So that was the problem? Now I'm makin' progress..."),
+(28070,16,0,14,14254,100,"brann SAY_EVENT_C_3","Hang on! Nobody's gonna' be sanitized as long as I have a say in it!"),
+(28070,17,0,14,14255,100,"brann SAY_EVENT_D_1","Ha! The old magic fingers finally won through! Now let's get down to-"),
+(28070,18,0,14,14256,100,"brann SAY_EVENT_D_3","Purge? No no no no no! Where did I-- Aha, this should do the trick..."),
+(28070,19,0,14,14263,100,"brann SAY_EVENT_END_01","Query? What do you think I'm here for? Tea and biscuits? Spill the beans already!"),
+(28070,20,0,14,14264,100,"brann SAY_EVENT_END_02","Tell me how that dwarfs came to be! And start at the beginning!"),
+(28070,21,0,14,14265,100,"brann SAY_EVENT_END_04","Right, right! I know that the Earthen were made of stone to shape the deep reaches of the world but what about the anomalies? Matrix non-stabilizing and whatnot."),
+(28070,22,0,14,14266,100,"brann SAY_EVENT_END_06","Necro-what? Speak bloody common will ya?"),
+(28070,23,0,14,14267,100,"brann SAY_EVENT_END_08","Old Gods eh? So they zapped the Earthen with this Curse of Flesh. And then what?"),
+(28070,24,0,14,14268,100,"brann SAY_EVENT_END_10","If they killed the Old Gods Azeroth would have been destroyed."),
+(28070,25,0,14,14269,100,"brann SAY_EVENT_END_12","What protectors?"),
+(28070,26,0,14,14270,100,"brann SAY_EVENT_END_14","Aesir and Vanir. Okay. So the Forge of Wills started to make new Earthen. But what happened to the old ones?"),
+(28070,27,0,14,14271,100,"brann SAY_EVENT_END_16","Hold everything! The Aesir and Vanir went to war? Why?"),
+(28070,28,0,14,14272,100,"brann SAY_EVENT_END_18","This Loken sounds like a nasty character. Glad we don't have to worry about the likes of him anymore. So if I'm understanding you lads the original Earthen eventually woke up from this statis. And by that time this destabily-whatever had turned them into our brother dwarfs. Or at least dwarf ancestors. Hm?"),
+(28070,29,0,14,14273,100,"brann SAY_EVENT_END_20","Well now. That's a lot to digest. I'm gonna need some time to take all of this in. Thank you!"),
+(28070,30,0,14,14278,100,"brann SAY_VICTORY_SJONNIR_1","Loken?! That's downright bothersome... We might've neutralized the iron dwarves, but I'd lay odds there's another machine somewhere else churnin' out a whole mess o' these iron vrykul!"),
+(28070,31,0,14,14279,100,"brann SAY_VICTORY_SJONNIR_2","I'll use the forge to make badtches o' earthen to stand guard... But our greatest challenge still remains: find and stop Loken!"),
+(28070,32,0,14,0,100,"brann SAY_ENTRANCE_MEET","I think it's time to see what's behind the door near the entrance. I'm going to sneak over there, nice and quiet. Meet me at the door and I'll get us in."),
+-- marnak
+(30897,0,0,14,13761,100,"brann SAY_EVENT_B_2_MARN","Threat index threshold exceeded. Celestial archive aborted. Security level heightened."),
+(30897,1,0,14,13762,100,"brann SAY_EVENT_END_15_MARN","Additional background is relevant to your query. Following global combat between-"),
+(30897,2,0,14,13763,100,"brann SAY_EVENT_END_17_MARN","Unknown. Data suggests that impetus for global combat originated with prime designate Loken who neutralized all remaining Aesir and Vanir affecting termination of conflict. Prime designate Loken then initiated stasis of several seed races including Earthen, Giant and Vrykul at designated holding facilities."),
+(30897,3,0,14,13764,100,"brann SAY_EVENT_END_19_MARN","Essentially that is correct."),
+-- kaddrak
+(30898,0,0,14,13756,100,"brann SAY_EVENT_A_2_KADD","Security breach in progress. Analysis of historical archives transferred to lower priority queue. Countermeasures engaged."),
+(30898,1,0,14,13757,100,"brann SAY_EVENT_END_09_KADD","Accessing. Creators arrived to extirpate symbiotic infection. Assessment revealed that Old God infestation had grown malignant. Excising parasites would result in loss of host."),
+(30898,2,0,14,13758,100,"brann SAY_EVENT_END_11_KADD","Correct. Creators neutralized parasitic threat and contained it within the host. Forge of Wills and other systems were instituted to create new Earthen. Safeguards were implemented and protectors were appointed."),
+(30898,3,0,14,13759,100,"brann SAY_EVENT_END_13_KADD","Designations: Aesir and Vanir or in common nomenclator Storm and Earth Giants. Sentinel Loken designated supreme. Dragon Aspects appointed to monitor evolution of Azeroth."),
+-- abedneum
+(30899,0,0,14,13765,100,"brann SAY_EVENT_INTRO_3_ABED","Warning! Life form pattern not recognized. Archival processing terminated. Continued interference will result in targeted response."),
+(30899,1,0,14,13767,100,"brann SAY_EVENT_C_2_ABED","Critical threat index. Void analysis diverted. Initiating sanitization protocol."),
+(30899,2,0,14,13768,100,"brann SAY_EVENT_D_2_ABED","Alert! Security fail safes deactivated. Beginning memory purge..."),
+(30899,3,0,14,13769,100,"brann SAY_EVENT_D_4_ABED","System online. Life form pattern recognized. Welcome Branbronzan. Query?"),
+(30899,4,0,14,13770,100,"brann SAY_EVENT_END_03_ABED","Accessing prehistoric data. Retrieved. In the beginning Earthen were created to-"),
+(30899,5,0,14,13771,100,"brann SAY_EVENT_END_05_ABED","Accessing. In the early stages of its development cycle Azeroth suffered infection by parasitic, necrophotic symbiotes."),
+(30899,6,0,14,13772,100,"brann SAY_EVENT_END_07_ABED","Designation: Old Gods. Old Gods rendered all systems, including Earthen defenseless in order to facilitate assimilation. This matrix destabilization has been termed the Curse of Flesh. Effects of destabilization increased over time."),
+(30899,7,0,14,13773,100,"brann SAY_EVENT_END_21_ABED","Acknowledged Branbronzan. Session terminated.");
diff --git a/sql/updates/world/2012_12_04_01_world_quest_start_scripts.sql b/sql/updates/world/2012_12_04_01_world_quest_start_scripts.sql
new file mode 100644
index 00000000000..f2ac40c7880
--- /dev/null
+++ b/sql/updates/world/2012_12_04_01_world_quest_start_scripts.sql
@@ -0,0 +1,4 @@
+ALTER TABLE `quest_template` DROP `StartScript`;
+DROP TABLE quest_start_scripts;
+
+DELETE FROM `command` WHERE `name`='reload quest_start_scripts';
diff --git a/sql/updates/world/2012_12_04_02_world_reputation_reward_rate.sql b/sql/updates/world/2012_12_04_02_world_reputation_reward_rate.sql
new file mode 100644
index 00000000000..a6b58583532
--- /dev/null
+++ b/sql/updates/world/2012_12_04_02_world_reputation_reward_rate.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `reputation_reward_rate` ADD `quest_daily_rate` FLOAT NOT NULL DEFAULT '1' AFTER `quest_rate`;
+ALTER TABLE `reputation_reward_rate` ADD `quest_weekly_rate` FLOAT NOT NULL DEFAULT '1' AFTER `quest_daily_rate`;
diff --git a/sql/updates/world/2012_12_04_03_world_reputation_reward_rate.sql b/sql/updates/world/2012_12_04_03_world_reputation_reward_rate.sql
new file mode 100644
index 00000000000..9f8341ea464
--- /dev/null
+++ b/sql/updates/world/2012_12_04_03_world_reputation_reward_rate.sql
@@ -0,0 +1 @@
+ALTER TABLE `reputation_reward_rate` ADD `quest_monthly_rate` FLOAT NOT NULL DEFAULT '1' AFTER `quest_weekly_rate`;
diff --git a/sql/updates/world/2012_12_04_04_world_creature_text.sql b/sql/updates/world/2012_12_04_04_world_creature_text.sql
new file mode 100644
index 00000000000..1cf52a1417f
--- /dev/null
+++ b/sql/updates/world/2012_12_04_04_world_creature_text.sql
@@ -0,0 +1,25 @@
+-- Slad'ran
+DELETE FROM `creature_text` WHERE `entry`=29304 AND `groupid`=5;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+(29304, 5, 0, '%s begins to cast Poison Nova!', 41, 0, 100, 0, 0, 0, 'Slad''ran - EMOTE_NOVA');
+
+-- Mage-Lord Urom
+DELETE FROM `creature_text` WHERE `entry`=27655;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+(27655, 0, 0, 'What do we have here... those that would defy the Spell-Weaver? Those without foresight or understanding. How can I make you see? Malygos is saving the world from itself! Bah! You are hardly worth my time!', 14, 0, 100, 1, 0, 13635, 'Mage-Lord Urom - SAY_SUMMON_1'),
+(27655, 1, 0, 'Clearly my pets failed. Perhaps another demonstration is in order.', 14, 0, 100, 1, 0, 13636, 'Mage-Lord Urom - SAY_SUMMON_2'),
+(27655, 2, 0, 'Still you fight. Still you cling to misguided principles. If you survive, you''ll find me in the center ring.', 14, 0, 100, 1, 0, 13637, 'Mage-Lord Urom - SAY_SUMMON_3'),
+(27655, 3, 0, 'Poor blind fools!', 14, 0, 100, 0, 0, 13638, 'Mage-Lord Urom - SAY_AGGRO'),
+(27655, 4, 0, '%s begins to cast Empowered Arcane Explosion!', 41, 0, 100, 0, 0, 0, 'Mage-Lord Urom - EMOTE_ARCANE_EXPLOSION'),
+(27655, 5, 0, 'A taste... just a small taste... of the Spell-Weaver''s power!', 14, 0, 100, 0, 0, 13639, 'Mage-Lord Urom - SAY_ARCANE_EXPLOSION'),
+(27655, 5, 1, 'So much unstable energy... but worth the risk to destroy you!', 14, 0, 100, 0, 0, 13640, 'Mage-Lord Urom - SAY_ARCANE_EXPLOSION'),
+(27655, 6, 0, 'Everything I have done... has been for Azeroth....', 14, 0, 100, 0, 0, 13644, 'Mage-Lord Urom - SAY_DEATH'),
+(27655, 7, 0, 'If only you understood!', 14, 0, 100, 0, 0, 13641, 'Mage-Lord Urom - SAY_PLAYER_KILL'),
+(27655, 7, 1, 'Now do you see? Do you?!', 14, 0, 100, 0, 0, 13642, 'Mage-Lord Urom - SAY_PLAYER_KILL'),
+(27655, 7, 2, 'Everything I\'ve done... has been for Azeroth...', 14, 0, 100, 0, 0, 13643, 'Mage-Lord Urom - SAY_PLAYER_KILL');
+
+-- Shadron / Vesperon
+DELETE FROM `creature_text` WHERE `entry`IN (30451,30449) AND `groupid`=7;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+(30451, 7, 0, 'A Shadron Disciple appears in the Twilight!', 41, 0, 100, 0, 0, 0, 'Shadron - WHISPER_SHADRON_DICIPLE'),
+(30449, 7, 0, 'A Vesperon Disciple appears in the Twilight!', 41, 0, 100, 0, 0, 0, 'Vesperon - WHISPER_SHADRON_DICIPLE');
diff --git a/sql/updates/world/2012_12_04_05_world_spell_script_names.sql b/sql/updates/world/2012_12_04_05_world_spell_script_names.sql
new file mode 100644
index 00000000000..f325ac731d4
--- /dev/null
+++ b/sql/updates/world/2012_12_04_05_world_spell_script_names.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=-24604;
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(-24604,'spell_hun_furious_howl');
diff --git a/sql/updates/world/2012_12_04_06_world_spell_creature_text.sql b/sql/updates/world/2012_12_04_06_world_spell_creature_text.sql
new file mode 100644
index 00000000000..04f10fa494f
--- /dev/null
+++ b/sql/updates/world/2012_12_04_06_world_spell_creature_text.sql
@@ -0,0 +1,28 @@
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1533108 AND -1533084;
+DELETE FROM `creature_text` WHERE `entry`=15990;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(15990,0,0,14,14467,100,"kelthuzad SAY_SAPP_DIALOG1","Our preparations continue as planned, master."),
+(15990,1,0,14,8881,100,"kelthuzad SAY_SAPP_DIALOG2_LICH","It is good that you serve me so faithfully. Soon, all will serve the Lich King and in the end, you shall be rewarded...so long as you do not falter."),
+(15990,2,0,14,14468,100,"kelthuzad SAY_SAPP_DIALOG3","I see no complications... Wait... What is this?"),
+(15990,3,0,14,8882,100,"kelthuzad SAY_SAPP_DIALOG4_LICH","Your security measures have failed! See to this interruption immediately!"),
+(15990,4,0,14,14469,100,"kelthuzad SAY_SAPP_DIALOG5","Yes, master!"),
+(15990,5,0,14,14484,100,"kelthuzad SAY_CAT_DIED","No!!! A curse upon you, interlopers! The armies of the Lich King will hunt you down. You will not escape your fate..."),
+(15990,6,0,14,14463,100,"kelthuzad SAY_TAUNT1","Who dares violate the sanctity of my domain? Be warned, all who trespass here are doomed."),
+(15990,6,1,14,14464,100,"kelthuzad SAY_TAUNT2","Fools, you think yourselves triumphant? You have only taken one step closer to the abyss! "),
+(15990,6,2,14,14465,100,"kelthuzad SAY_TAUNT3","I grow tired of these games. Proceed, and I will banish your souls to oblivion!"),
+(15990,6,3,14,14466,100,"kelthuzad SAY_TAUNT4","You have no idea what horrors lie ahead. You have seen nothing! The frozen heart of Naxxramas awaits you!"),
+(15990,7,0,14,14475,100,"kelthuzad SAY_AGGRO1","Pray for mercy!"),
+(15990,7,1,14,14476,100,"kelthuzad SAY_AGGRO2","Scream your dying breath!"),
+(15990,7,2,14,14477,100,"kelthuzad SAY_AGGRO3","The end is upon you!"),
+(15990,8,0,14,14478,100,"kelthuzad SAY_SLAY1","The dark void awaits you!"),
+(15990,8,1,14,14479,100,"kelthuzad SAY_SLAY2","<Kel'Thuzad cackles maniacally!>"),
+(15990,9,0,14,14480,100,"kelthuzad SAY_DEATH","AAAAGHHH!... Do not rejoice... your victory is a hollow one... for I shall return with powers beyond your imagining!"),
+(15990,10,0,14,14472,100,"kelthuzad SAY_CHAIN1","Your soul, is bound to me now!"),
+(15990,10,1,14,14473,100,"kelthuzad SAY_CHAIN2","There will be no escape!"),
+(15990,11,0,14,14474,100,"kelthuzad SAY_FROST_BLAST","I will freeze the blood in your veins!"),
+(15990,12,0,14,14470,100,"kelthuzad SAY_REQUEST_AID","Master! I require aid! "),
+(15990,13,0,14,0,100,"kelthuzad SAY_ANSWER_REQUEST","Very well... warriors of the frozen wastes, rise up! I command you to fight, kill, and die for your master. Let none survive..."),
+(15990,14,0,14,14471,100,"kelthuzad SAY_SUMMON_MINIONS","Minions, servants, soldiers of the cold dark, obey the call of Kel'Thuzad!"),
+(15990,15,0,14,14481,100,"kelthuzad SAY_SPECIAL1_MANA_DET","Your petty magics are no challenge to the might of the Scourge! "),
+(15990,15,1,14,14483,100,"kelthuzad SAY_SPECIAL3_MANA_DET","Enough! I grow tired of these distractions! "),
+(15990,15,2,14,14482,100,"kelthuzad SAY_SPECIAL2_DISPELL","Fools, you have spread your powers too thin. Be free, my minions!");
diff --git a/sql/updates/world/2012_12_05_00_world_creature_text.sql b/sql/updates/world/2012_12_05_00_world_creature_text.sql
new file mode 100644
index 00000000000..b3b382e46e2
--- /dev/null
+++ b/sql/updates/world/2012_12_05_00_world_creature_text.sql
@@ -0,0 +1 @@
+UPDATE `creature_text` SET `text`='Unfortunate, but necessary.' WHERE `entry`=27655 AND `groupid`=7 AND `id`=2;
diff --git a/sql/updates/world/2012_12_06_00_world_creature_text.sql b/sql/updates/world/2012_12_06_00_world_creature_text.sql
new file mode 100644
index 00000000000..c0fec8e041e
--- /dev/null
+++ b/sql/updates/world/2012_12_06_00_world_creature_text.sql
@@ -0,0 +1,697 @@
+-- ------------------------------- --
+-- Creature text conversion part 7 --
+-- ------------------------------- --
+-- ingvar
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1574010 AND -1574005;
+DELETE FROM `creature_text` WHERE `entry`=23954;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(23954,0,0,14,13207,100,"ingvar SAY_AGGRO_FIRST","I'll paint my face with your blood!"),
+(23954,1,0,14,13209,100,"ingvar SAY_AGGRO_SECOND","I return! A second chance to carve out your skull!"),
+(23954,2,0,14,13213,100,"ingvar SAY_DEATH_FIRST","My life for the... death god!"),
+(23954,3,0,14,13211,100,"ingvar SAY_DEATH_SECOND","No! I can do... better! I can..."),
+(23954,4,0,14,13212,100,"ingvar SAY_KILL_FIRST","Mjul orm agn gjor!"),
+(23954,5,0,14,13214,100,"ingvar SAY_KILL_SECOND","I am a warrior born!");
+
+-- skarvald and dalronn
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1574020 AND -1574011;
+DELETE FROM `creature_text` WHERE `entry` IN (24200,27390,24201,27389);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(24200,0,0,14,13229,100,"skarvald YELL_SKARVALD_AGGRO","Dalronn! See if you can muster the nerve to join my attack!"),
+(24200,1,0,14,13230,100,"skarvald YELL_SKARVALD_DAL_DIED","Not... over... yet."),
+(24200,2,0,14,13231,100,"skarvald YELL_SKARVALD_SKA_DIEDFIRST","A warrior's death."),
+(24200,3,0,14,13232,100,"skarvald YELL_SKARVALD_KILL","???"),
+(24200,4,0,14,13233,100,"skarvald YELL_SKARVALD_DAL_DIEDFIRST","Pagh! What sort of necromancer lets death stop him? I knew you were worthless!"),
+(27390,0,0,14,13229,100,"skarvald YELL_SKARVALD_AGGRO","Dalronn! See if you can muster the nerve to join my attack!"),
+(27390,1,0,14,13230,100,"skarvald YELL_SKARVALD_DAL_DIED","Not... over... yet."),
+(27390,2,0,14,13231,100,"skarvald YELL_SKARVALD_SKA_DIEDFIRST","A warrior's death."),
+(27390,3,0,14,13232,100,"skarvald YELL_SKARVALD_KILL","???"),
+(27390,4,0,14,13233,100,"skarvald YELL_SKARVALD_DAL_DIEDFIRST","Pagh! What sort of necromancer lets death stop him? I knew you were worthless!"),
+(24201,0,0,14,13199,100,"dalronn YELL_DALRONN_AGGRO","By all means, don't assess the situation, you halfwit! Just jump into the fray!"),
+(24201,1,0,14,13200,100,"dalronn YELL_DALRONN_SKA_DIED","See... you... soon."),
+(24201,2,0,14,13201,100,"dalronn YELL_DALRONN_DAL_DIEDFIRST","There's no... greater... glory."),
+(24201,3,0,14,13202,100,"dalronn YELL_DALRONN_KILL","You may serve me yet."),
+(24201,4,0,14,13203,100,"dalronn YELL_DALRONN_SKA_DIEDFIRST","Skarvald, you incompetent slug! Return and make yourself useful!"),
+(27389,0,0,14,13199,100,"dalronn YELL_DALRONN_AGGRO","By all means, don't assess the situation, you halfwit! Just jump into the fray!"),
+(27389,1,0,14,13200,100,"dalronn YELL_DALRONN_SKA_DIED","See... you... soon."),
+(27389,2,0,14,13201,100,"dalronn YELL_DALRONN_DAL_DIEDFIRST","There's no... greater... glory."),
+(27389,3,0,14,13202,100,"dalronn YELL_DALRONN_KILL","You may serve me yet."),
+(27389,4,0,14,13203,100,"dalronn YELL_DALRONN_SKA_DIEDFIRST","Skarvald, you incompetent slug! Return and make yourself useful!");
+
+-- Gortok Palehoof
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1575003 AND -1575000;
+DELETE FROM `creature_text` WHERE `entry`=26687;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(26687,0,0,12,0,100,"Gortok Palehoof SAY_AGGRO","What this place? I will destroy you!"),
+(26687,1,0,12,0,100,"Gortok Palehoof SAY_SLAY_1","You die! That what master wants!"),
+(26687,1,1,12,0,100,"Gortok Palehoof SAY_SLAY_2","An easy task!");
+
+-- skadi
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1575013 AND -1575004;
+DELETE FROM `creature_text` WHERE `entry`=26693;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(26693,0,0,14,13497,100,"skadi SAY_AGGRO","What mongrels dare intrude here? Look alive, my brothers! A feast for the one that brings me their heads!"),
+(26693,1,0,14,13504,100,"skadi SAY_KILL_1","Not so brash now, are you?"),
+(26693,1,1,14,13505,100,"skadi SAY_KILL_2","I'll mount your skull from the highest tower!"),
+(26693,2,0,41,0,100,"skadi EMOTE_RANGE","%s in within range of the harpoon launchers!"),
+(26693,3,0,14,13506,100,"skadi SAY_DEATH","ARGH! You call that... an attack? I'll... show... aghhhh..."),
+(26693,4,0,41,0,100,"skadi EMOTE_RANGE","%s in within range of the harpoon launchers!"),
+(26693,5,0,14,13507,100,"skadi SAY_DRAKE_DEATH","You motherless knaves! Your corpses will make fine morsels for my new drake!"),
+(26693,6,0,14,13498,100,"skadi SAY_DRAKE_BREATH_1","Sear them to the bone!"),
+(26693,6,1,14,13499,100,"skadi SAY_DRAKE_BREATH_2","Go now! Leave nothing but ash in your wake!"),
+(26693,6,2,14,13500,100,"skadi SAY_DRAKE_BREATH_3","Cleanse our sacred halls with flame!");
+
+-- King Ymirom
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1575037 AND -1575028;
+DELETE FROM `creature_text` WHERE `entry`=26861;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(26861,0,0,14,13609,100,"King Ymirom SAY_AGGRO","You invade my home and then dare to challenge me? I will tear the hearts from your chests and offer them as gifts to the death god! Rualg nja gaborr!"),
+(26861,1,0,14,13614,100,"King Ymirom SAY_SLAY_1","Your death is only the beginning!"),
+(26861,1,1,14,13615,100,"King Ymirom SAY_SLAY_2","You have failed your people!"),
+(26861,1,2,14,13616,100,"King Ymirom SAY_SLAY_3","There is a reason I am king!"),
+(26861,1,3,14,13617,100,"King Ymirom SAY_SLAY_4","Bleed no more!"),
+(26861,2,0,14,13618,100,"King Ymirom SAY_DEATH","What... awaits me... now?"),
+(26861,3,0,14,13610,100,"King Ymirom SAY_SUMMON_BJORN","Bjorn of the Black Storm! Honor me now with your presence!"),
+(26861,4,0,14,13611,100,"King Ymirom SAY_SUMMON_HALDOR","Haldor of the Rocky Cliffs, grant me your strength!"),
+(26861,5,0,14,13612,100,"King Ymirom SAY_SUMMON_RANULF","Ranulf of the Screaming Abyss, snuff these maggots with darkest night! "),
+(26861,6,0,14,13613,100,"King Ymirom SAY_SUMMON_TORGYN","Tor of the Brutal Siege! Bestow your might upon me!");
+
+-- archavon
+DELETE FROM `script_texts` WHERE `entry`=-1590002;
+DELETE FROM `creature_text` WHERE `entry`=31125;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(31125,0,0,16,0,100,"archavon EMOTE_BERSERK","Archavon the Stone Watcher goes into a berserker rage!");
+
+-- emalon
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1590002 AND -1590000;
+DELETE FROM `creature_text` WHERE `entry`=33993;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(33993,0,0,41,0,100,"emalon EMOTE_OVERCHARGE_TEMPEST_MINION","Emalon the Storm Watcher overcharges a Tempest Minion!"),
+(33993,1,0,41,0,100,"emalon EMOTE_MINION_RESPAWN","A Tempest Minion appears to defend Emalon!"),
+(33993,2,0,16,0,100,"emalon EMOTE_BERSERK","Emalon the Storm Watcher goes into a berserker rage!");
+
+-- cyanigosa
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1608009 AND -1608000;
+DELETE FROM `creature_text` WHERE `entry`=31134;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(31134,0,0,14,13947,100,"cyanigosa SAY_AGGRO","We finish this now, champions of Kirin Tor!"),
+(31134,1,0,14,13952,100,"cyanigosa SAY_SLAY_1","I will end the Kirin Tor!"),
+(31134,1,1,14,13953,100,"cyanigosa SAY_SLAY_2","Dalaran will fall!"),
+(31134,1,2,14,13954,100,"cyanigosa SAY_SLAY_3","So ends your defiance of the Spell-Weaver!"),
+(31134,2,0,14,13955,100,"cyanigosa SAY_DEATH","Perhaps... we have... underestimated... you."),
+(31134,3,0,14,13946,100,"cyanigosa SAY_SPAWN","A valiant defense, but this city must be razed. I will fulfill Malygos's wishes myself!"),
+(31134,4,0,14,13951,100,"cyanigosa SAY_DISRUPTION","Am I interrupting?"),
+(31134,5,0,14,13948,100,"cyanigosa SAY_BREATH_ATTACK","Shiver and die!"),
+(31134,6,0,14,13949,100,"cyanigosa SAY_SPECIAL_ATTACK_1","The world has forgotten what true magic is! Let this be a reminder!"),
+(31134,6,1,14,13950,100,"cyanigosa SAY_SPECIAL_ATTACK_2","Who among you can withstand my power?");
+
+-- erekem
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1608017 AND -1608010;
+DELETE FROM `creature_text` WHERE `entry`=29315;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(29315,0,0,14,14219,100,"erekem SAY_AGGRO","Not--caww--get in way of--rrak-rrak--flee!"),
+(29315,1,0,14,14222,100,"erekem SAY_SLAY_1","Ya ya ya yaaaa"),
+(29315,1,1,14,14223,100,"erekem SAY_SLAY_2","Preeciouuss life---Ra-aak---Wasted!"),
+(29315,1,2,14,14224,100,"erekem SAY_SLAY_3","Only the strong---Ra-aak---Survive!"),
+(29315,2,0,14,14225,100,"erekem SAY_DEATH","No--kaw, kaw--flee..."),
+(29315,3,0,14,14218,100,"erekem SAY_SPAWN","Free to--mm--fly now. Ra-aak... Not find us--ekh-ekh! Escape!"),
+(29315,4,0,14,14220,100,"erekem SAY_ADD_KILLED","My---raaak--favorite! Awk awk awk! Raa-kaa!"),
+(29315,5,0,14,14221,100,"erekem SAY_BOTH_ADDS_KILLED","Nasty little...A-ak, kaw! Kill! Yes, kill you!");
+
+-- ichoron
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1608026 AND -1608018;
+DELETE FROM `creature_text` WHERE `entry`=29313;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(29313,0,0,14,14230,100,"ichoron SAY_AGGRO","Stand aside, mortals!"),
+(29313,1,0,14,14234,100,"ichoron SAY_SLAY_1","I am a force of nature!"),
+(29313,1,1,14,14235,100,"ichoron SAY_SLAY_2","I shall pass!"),
+(29313,1,2,14,14236,100,"ichoron SAY_SLAY_3","You can not stop the tide!"),
+(29313,2,0,14,14237,100,"ichoron SAY_DEATH","I... recede."),
+(29313,3,0,14,14229,100,"ichoron SAY_SPAWN","I... am fury... unrestrained!"),
+(29313,4,0,14,14231,100,"ichoron SAY_ENRAGE","I shall consume, decimate, devastate, and destroy! Yield now to the wrath of the pounding sea!"),
+(29313,5,0,14,14233,100,"ichoron SAY_SHATTER","I will not be contained! Ngyah!!"),
+(29313,6,0,14,14232,100,"ichoron SAY_BUBBLE","Water can hold any form, take any shape... overcome any obstacle.");
+
+-- Xevozz
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1608036 AND -1608027;
+DELETE FROM `creature_text` WHERE `entry`=29266;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(29266,0,0,14,14498,100,"Xevozz SAY_AGGRO","It seems my freedom must be bought with blood..."),
+(29266,1,0,14,14504,100,"Xevozz SAY_SLAY_1","Nothing personal."),
+(29266,1,1,14,14505,100,"Xevozz SAY_SLAY_2","Business concluded."),
+(29266,1,2,14,14506,100,"Xevozz SAY_SLAY_3","Profit!"),
+(29266,2,0,14,14507,100,"Xevozz SAY_DEATH","This is an... unrecoverable... loss."),
+(29266,3,0,14,14498,100,"Xevozz SAY_SPAWN","Back in business! Now to execute an exit strategy."),
+(29266,4,0,14,14503,100,"Xevozz SAY_CHARGED","It would seem that a renegotiation is in order."),
+(29266,5,0,14,14501,100,"Xevozz SAY_REPEAT_SUMMON_1","The air teems with latent energy... quite the harvest!"),
+(29266,5,1,14,14502,100,"Xevozz SAY_REPEAT_SUMMON_2","Plentiful, exploitable resources... primed for acquisition!"),
+(29266,6,0,14,14500,100,"Xevozz SAY_SUMMON_ENERGY","Intriguing... a high quantity of arcane energy is near. Time for some prospecting...");
+
+-- zuramat
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1608044 AND -1608037;
+DELETE FROM `creature_text` WHERE `entry`=29314;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(29314,0,0,14,13996,100,"zuramat SAY_AGGRO","Eradicate."),
+(29314,1,0,14,13999,100,"zuramat SAY_SLAY_1","More... energy."),
+(29314,1,1,14,14000,100,"zuramat SAY_SLAY_2","Relinquish."),
+(29314,1,2,14,14001,100,"zuramat SAY_SLAY_3","Fall... to shadow."),
+(29314,2,0,14,14002,100,"zuramat SAY_DEATH","Disperse."),
+(29314,3,0,14,13995,100,"zuramat SAY_SPAWN","I am... renewed."),
+(29314,4,0,14,13997,100,"zuramat SAY_SHIELD","Know... my... pain."),
+(29314,5,0,14,13998,100,"zuramat SAY_WHISPER","Gaze... into the void.");
+
+-- cyanigosa
+DELETE FROM `script_texts` WHERE `entry`=-1608005;
+DELETE FROM `creature_text` WHERE `entry`=31134;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(31134,0,0,14,13946,100,"cyanigosa SAY_SPAWN","A valiant defense, but this city must be razed. I will fulfill Malygos's wishes myself!");
+
+-- sinclari
+DELETE FROM `script_texts` WHERE `entry`=-1608045;
+DELETE FROM `creature_text` WHERE `entry`=30658;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(30658,0,0,14,0,100,"sinclari SAY_SINCLARI_1","Prison guards, we are leaving! These adventurers are taking over! Go go go");
+
+-- orinoko, gurgthock, crusade recruit, stinkbeard
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1571041 AND -1571031;
+DELETE FROM `creature_text` WHERE `entry` IN (30020,30007,28090,30017);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(30020,0,0,14,0,100,"orinoko SAY_CALL_FOR_HELP","Whisker! Where are you? Assist me!"),
+(30007,0,0,14,13363,100,"gurgthock SAY_QUEST_ACCEPT_TUSKARRMAGEDON","This battle must be seen to be believed! Once a mild-mannered tuskarr fisherman, our next fighter turned to the life of a soulless mercenary when his entire family was wiped out by a vicious pack of lion seals and III-tempered penguins! Now he's just In It for the gold! Ladies and gentlemen, ORINOKO TUSKBREAKER!!"),
+(30007,1,0,12,0,100,"gurgthock SAY_QUEST_ACCEPT_KORRAK_1","The champion of the Winterax trolls has challenged you, Treeofdoom! I hope you're ready!"),
+(30007,2,0,14,13363,100,"gurgthock SAY_QUEST_ACCEPT_KORRAK_2","Hailling from the distant mountains of Alterac, one of the fiercest competitors this arena has ever seen: KORRAK THE BLOODRAGER!!!"),
+(30007,3,0,14,13363,100,"gurgthock SAY_QUEST_ACCEPT_MAGNATAUR","The battle is about to begin! Am I reading this card right It... It's the nefarious magnataur lord, STINKBEARD! Yes, folks, STINKBEARD! Chitchat dosen't stand a chance!"),
+(30007,4,0,41,0,100,"gurgthock EMOTE_YGGDRAS_SPAWN","Yggdras emerges!"),
+(30017,5,0,14,0,100,"gurgthock SAY_STINKBEARD_SPAWN","Stinkbeard comin' for you, little ones!"),
+(30007,6,0,14,0,100,"gurgthock SAY_GURGTHOCK_ELEMENTAL_SPAWN","Do you fell that folks? The air is cracking with energy! Than can only mean one thing..."),
+(28090,0,0,12,0,100,"crusade recruit SAY_RECRUIT_1","We'll cleanse this place! Arthas beware!"),
+(28090,0,1,12,0,100,"crusade recruit SAY_RECRUIT_2","Your're right! We can do this!"),
+(28090,0,2,12,0,100,"crusade recruit SAY_RECRUIT_3","Your're right! What was I thinking? Bring on the Scourge!");
+
+-- maladaar
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1558009 AND -1558000;
+DELETE FROM `creature_text` WHERE `entry`=18373;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(18373,0,0,14,10509,100,"maladaar SAY_INTRO","You have defiled the resting place of our ancestors. For this offense, there can be but one punishment. It is fitting that you have come to a place of the dead... for you will soon be joining them."),
+(18373,1,0,14,10512,100,"maladaar SAY_SUMMON","Rise my fallen brothers. Take form and fight!"),
+(18373,2,0,14,10513,100,"maladaar SAY_AGGRO_1","You will pay with your life!"),
+(18373,2,1,14,10514,100,"maladaar SAY_AGGRO_2","There's no turning back now!"),
+(18373,2,2,14,10515,100,"maladaar SAY_AGGRO_3","Serve your penitence!"),
+(18373,3,0,14,10510,100,"maladaar SAY_ROAR","Let your mind be clouded."),
+(18373,3,1,14,10511,100,"maladaar SAY_SOUL_CLEAVE","Stare into the darkness of your soul."),
+(18373,4,0,14,10516,100,"maladaar SAY_SLAY_1","These walls will be your doom."),
+(18373,4,1,14,10517,100,"maladaar SAY_SLAY_2","<laugh> Now, you'll stay for eternity!"),
+(18373,5,0,14,10518,100,"maladaar SAY_DEATH","This is... where.. I belong...");
+
+-- shaffar
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1557007 AND -1557000;
+DELETE FROM `creature_text` WHERE `entry`=18344;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(18344,0,0,14,10539,100,"shaffar SAY_INTRO","What is this? You must forgive me, but I was not expecting company. As you can see, we are somewhat preoccupied right now. But no matter. As I am a gracious host, I will tend to you... personally."),
+(18344,1,0,14,10541,100,"shaffar SAY_AGGRO_1","We have not yet been properly introduced."),
+(18344,1,1,14,10542,100,"shaffar SAY_AGGRO_2","An epic battle. How exciting!"),
+(18344,1,2,14,10543,100,"shaffar SAY_AGGRO_3","I have longed for a good adventure."),
+(18344,2,0,14,10544,100,"shaffar SAY_SLAY_1","It has been... entertaining."),
+(18344,2,1,14,10545,100,"shaffar SAY_SLAY_2","And now we part company."),
+(18344,3,0,14,10540,100,"shaffar SAY_SUMMON","I have such fascinating things to show you."),
+(18344,4,0,14,10546,100,"shaffar SAY_DEAD","I must bid you... farewell.");
+
+-- pandemonius
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1557014 AND -1557008;
+DELETE FROM `creature_text` WHERE `entry`=18341;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(18341,0,0,14,10561,100,"pandemonius SAY_AGGRO_1","I will feed on your soul."),
+(18341,0,1,14,10562,100,"pandemonius SAY_AGGRO_2","So... full of life!"),
+(18341,0,2,14,10563,100,"pandemonius SAY_AGGRO_3","Do not... resist."),
+(18341,1,0,14,10564,100,"pandemonius SAY_KILL_1","Yes! I am... empowered!"),
+(18341,1,1,14,10565,100,"pandemonius SAY_KILL_2","More... I must have more!"),
+(18341,2,0,14,10566,100,"pandemonius SAY_DEATH","To the void... once... more.."),
+(18341,3,0,41,0,100,"pandemonius EMOTE_DARK_SHELL","shifts into the void...");
+
+-- syth
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1556006 AND -1556000;
+DELETE FROM `creature_text` WHERE `entry`=18472;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(18472,0,0,14,10502,100,"syth SAY_SUMMON","I have pets..<squawk>..of my own!"),
+(18472,1,0,14,10503,100,"syth SAY_AGGRO_1","Hrrmm.. Time to.. hrrm.. make my move."),
+(18472,1,1,14,10504,100,"syth SAY_AGGRO_2","Nice pets..hrm.. Yes! <squawking>"),
+(18472,1,2,14,10505,100,"syth SAY_AGGRO_3","Nice pets have.. weapons. Not so..<squawk>..nice."),
+(18472,2,0,14,10506,100,"syth SAY_SLAY_1","Death.. meeting life is.. <squawking>"),
+(18472,2,1,14,10507,100,"syth SAY_SLAY_2","Uhn.. Be free..<squawk>"),
+(18472,3,0,14,10508,100,"syth SAY_DEATH","No more life..hrm. No more pain. <squawks weakly>");
+
+-- ikiss
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1556015 AND -1556007;
+DELETE FROM `creature_text` WHERE `entry`=18473;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(18473,0,0,14,10557,100,"ikiss SAY_INTRO","<squawk>..Trinkets yes pretty Trinkets..<squawk>..power, great power. <squawk>..power in Trinkets..<squawk>"),
+(18473,1,0,14,10554,100,"ikiss SAY_AGGRO_1","You make war on Ikiss?..<squawk>"),
+(18473,1,1,14,10555,100,"ikiss SAY_AGGRO_2","Ikiss cut you pretty..<squawk>..slice you. Yes!"),
+(18473,1,2,14,10556,100,"ikiss SAY_AGGRO_3","No escape for..<squawk>..for you"),
+(18473,2,0,14,10558,100,"ikiss SAY_SLAY_1","You die..<squawk>..stay away from Trinkets"),
+(18473,2,1,14,10559,100,"ikiss SAY_SLAY_2","<squawk>"),
+(18473,3,0,14,10560,100,"ikiss SAY_DEATH","Ikiss will not..<squawk>..die"),
+(18473,4,0,41,0,100,"ikiss EMOTE_ARCANE_EXP","begins to channel arcane energy...");
+
+-- hellmaw
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1555007 AND -1555000;
+DELETE FROM `creature_text` WHERE `entry`=18731;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(18731,0,0,14,10473,100,"hellmaw SAY_INTRO","Infidels have invaded the sanctuary! Sniveling pests...You have yet to learn the true meaning of agony!"),
+(18731,1,0,14,10475,100,"hellmaw SAY_AGGRO1","Pathetic mortals! You will pay dearly!"),
+(18731,1,1,14,10476,100,"hellmaw SAY_AGGRO2","I will break you!"),
+(18731,1,2,14,10477,100,"hellmaw SAY_AGGRO3","Finally! Something to relieve the tedium!"),
+(18731,2,0,14,10474,100,"hellmaw SAY_HELP","Aid me, you fools, before it's too late!"),
+(18731,3,0,14,10478,100,"hellmaw SAY_SLAY1","Do you fear death?"),
+(18731,3,1,14,10479,100,"hellmaw SAY_SLAY2","This is the part I enjoy most."),
+(18731,4,0,14,10480,100,"hellmaw SAY_DEATH","Do not...grow...overconfident, mortal.");
+
+-- blackhearth
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1555027 AND -1555008;
+DELETE FROM `creature_text` WHERE `entry`=18667;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(18667,0,0,14,10482,100,"blackhearth SAY_INTRO1","All flesh must burn."),
+(18667,0,1,14,10483,100,"blackhearth SAY_INTRO2","All creation must be unmade!"),
+(18667,0,2,14,10484,100,"blackhearth SAY_INTRO3","Power will be yours!"),
+(18667,1,0,14,10486,100,"blackhearth SAY_AGGRO1","You'll be sorry!"),
+(18667,1,1,14,10487,100,"blackhearth SAY_AGGRO2","Time for fun!"),
+(18667,1,2,14,10488,100,"blackhearth SAY_AGGRO3","I see dead people!"),
+(18667,2,0,14,10489,100,"blackhearth SAY_SLAY1","No comin' back for you!"),
+(18667,2,1,14,10490,100,"blackhearth SAY_SLAY2","Nice try!"),
+(18667,3,0,14,10485,100,"blackhearth SAY_HELP","Help us, hurry!"),
+(18667,4,0,14,10491,100,"blackhearth SAY_DEATH","This... no... good..."),
+(18667,5,0,14,10492,100,"blackhearth SAY2_INTRO1","Be ready for Dark One's return."),
+(18667,5,1,14,10493,100,"blackhearth SAY2_INTRO2","So we have place in new universe."),
+(18667,5,2,14,10494,100,"blackhearth SAY2_INTRO3","Dark one promise!"),
+(18667,6,0,14,10496,100,"blackhearth SAY2_AGGRO1","You'll be sorry!"),
+(18667,6,1,14,10497,100,"blackhearth SAY2_AGGRO2","Time to kill!"),
+(18667,6,2,14,10498,100,"blackhearth SAY2_AGGRO3","You be dead people!"),
+(18667,7,0,14,10499,100,"blackhearth SAY2_SLAY1","Now you gone for good."),
+(18667,7,1,14,10500,100,"blackhearth SAY2_SLAY2","You failed, haha haha"),
+(18667,8,0,14,10495,100,"blackhearth SAY2_HELP","Help us, hurry!"),
+(18667,9,0,14,10501,100,"blackhearth SAY2_DEATH","Arrgh, aah...ahhh");
+
+-- vorpil
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1555035 AND -1555028;
+DELETE FROM `creature_text` WHERE `entry`=18732;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(18732,0,0,14,10522,100,"vorpil SAY_INTRO","Keep your minds focused for the days of reckoning are close at hand. Soon, the destroyer of worlds will return to make good on his promise. Soon the destruction of all that is will begin!"),
+(18732,1,0,14,10524,100,"vorpil SAY_AGGRO1","I'll make an offering of your blood!"),
+(18732,1,1,14,10525,100,"vorpil SAY_AGGRO2","You'll be a fine example, for the others."),
+(18732,1,2,14,10526,100,"vorpil SAY_AGGRO3","Good, a worthy sacrifice."),
+(18732,2,0,14,10523,100,"vorpil SAY_HELP","Come to my aid, heed your master now!"),
+(18732,3,0,14,10527,100,"vorpil SAY_SLAY1","I serve with pride."),
+(18732,3,1,14,10528,100,"vorpil SAY_SLAY2","Your death is for the greater cause!"),
+(18732,4,0,14,10529,100,"vorpil SAY_DEATH","I give my life... Gladly.");
+
+-- murmur
+DELETE FROM `script_texts` WHERE `entry`=-1555036;
+DELETE FROM `creature_text` WHERE `entry`=18708;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(18708,0,0,16,0,100,"murmur EMOTE_SONIC_BOOM","draws energy from the air.");
+
+-- bloodboil
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1564036 AND -1564029;
+DELETE FROM `creature_text` WHERE `entry`=22948;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(22948,0,0,14,11432,100,"bloodboil SOUND_AGGRO","Horde will... crush you."),
+(22948,1,0,14,11433,100,"bloodboil SAY_SLAY1","Time to feast!"),
+(22948,1,1,14,11434,100,"bloodboil SAY_SLAY2","More! I want more!"),
+(22948,2,0,14,11435,100,"bloodboil SAY_SPECIAL1","Drink your blood! Eat your flesh!"),
+(22948,2,1,14,11436,100,"bloodboil SAY_SPECIAL2","I hunger!"),
+(22948,3,0,14,11437,100,"bloodboil SAY_ENRAGE1","<babbling>"),
+(22948,3,1,14,11438,100,"bloodboil SAY_ENRAGE2","I'll rip the meat from your bones!"),
+(22948,4,0,14,11439,100,"bloodboil SAY_DEATH","Aaaahrg...");
+
+-- shahraz
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1564028 AND -1564018;
+DELETE FROM `creature_text` WHERE `entry`=22947;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(22947,0,0,14,11501,100,"shahraz SAY_TAUNT1","You play, you pay."),
+(22947,0,1,14,11502,100,"shahraz SAY_TAUNT2","I'm not impressed."),
+(22947,0,2,14,11503,100,"shahraz SAY_TAUNT3","Enjoying yourselves?"),
+(22947,1,0,14,11504,100,"shahraz SAY_AGGRO","So... business or pleasure?"),
+(22947,2,0,14,11505,100,"shahraz SAY_SPELL1","You seem a little tense."),
+(22947,2,1,14,11506,100,"shahraz SAY_SPELL2","Don't be shy."),
+(22947,2,2,14,11507,100,"shahraz SAY_SPELL3","I'm all... yours."),
+(22947,3,0,14,11508,100,"shahraz SAY_SLAY1","Easy come, easy go."),
+(22947,3,1,14,11509,100,"shahraz SAY_SLAY2","So much for a happy ending."),
+(22947,4,0,14,11510,100,"shahraz SAY_ENRAGE","Stop toying with my emotions!"),
+(22947,5,0,14,11511,100,"shahraz SAY_DEATH","I wasn't... finished.");
+
+-- essence
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1564068 AND -1564047;
+DELETE FROM `creature_text` WHERE `entry` IN (23418,23419,23420);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(23418,0,0,14,11415,100,"essence SUFF_SAY_FREED","Pain and suffering are all that await you!"),
+(23418,1,0,14,11416,100,"essence SUFF_SAY_AGGRO","Don't leave me alone!"),
+(23418,2,0,14,11417,100,"essence SUFF_SAY_SLAY1","Look at what you make me do!"),
+(23418,2,1,14,11418,100,"essence SUFF_SAY_SLAY2","I didn't ask for this!"),
+(23418,2,2,14,11419,100,"essence SUFF_SAY_SLAY3","The pain is only beginning!"),
+(23418,3,0,14,11420,100,"essence SUFF_SAY_RECAP","I don't want to go back!"),
+(23418,4,0,14,11421,100,"essence SUFF_SAY_AFTER","Now what do I do?"),
+(23418,5,0,41,0,100,"essence SUFF_EMOTE_ENRAGE","%s becomes enraged!"),
+(23419,0,0,14,11408,100,"essence DESI_SAY_FREED","You can have anything you desire... for a price."),
+(23419,1,0,14,11409,100,"essence DESI_SAY_SLAY1","Fulfilment is at hand!"),
+(23419,1,1,14,11410,100,"essence DESI_SAY_SLAY2","Yes... you'll stay with us now..."),
+(23419,1,2,14,11412,100,"essence DESI_SAY_SLAY3","Your reach exceeds your grasp."),
+(23419,2,0,14,11411,100,"essence DESI_SAY_SPEC","Be careful what you wish for..."),
+(23419,3,0,14,11413,100,"essence DESI_SAY_RECAP","I'll be waiting..."),
+(23419,4,0,14,11414,100,"essence DESI_SAY_AFTER","I won't be far..."),
+(23420,0,0,14,11399,100,"essence ANGER_SAY_FREED","Beware: I live!"),
+(23420,0,1,14,11400,100,"essence ANGER_SAY_FREED2","So... foolish."),
+(23420,1,0,14,11401,100,"essence ANGER_SAY_SLAY1","<maniacal cackle>"),
+(23420,1,1,14,11402,100,"essence ANGER_SAY_SLAY2","Enough. No more."),
+(23420,2,0,14,11403,100,"essence ANGER_SAY_SPEC","On your knees!"),
+(23420,3,0,14,11405,100,"essence ANGER_SAY_BEFORE","Beware, coward."),
+(23420,4,0,14,11404,100,"essence ANGER_SAY_DEATH","I won't... be... ignored.");
+
+-- akama shade
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1564017 AND -1564013;
+DELETE FROM `creature_text` WHERE `entry` IN (22990,23319);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(22990,0,0,14,11385,100,"akama shade SAY_LOW_HEALTH","No! Not yet..."),
+(22990,1,0,14,11386,100,"akama shade SAY_DEATH","I will not last much longer..."),
+(22990,2,0,14,0,100,"akama shade SAY_FREE","Come out from the shadows! I've returned to lead you against our true enemy! Shed your chains and raise your weapons against your Illidari masters!"),
+(23319,0,0,14,0,100,"akama shade broken SAY_BROKEN_FREE_01","Hail our leader! Hail Akama!"),
+(23319,1,0,14,0,100,"akama shade broken SAY_BROKEN_FREE_02","Hail Akama!");
+
+-- supremus
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1564012 AND -1564010;
+DELETE FROM `creature_text` WHERE `entry`=22898;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(22898,0,0,41,0,100,"supremus EMOTE_NEW_TARGET","%s acquires a new target!"),
+(22898,1,0,41,0,100,"supremus EMOTE_PUNCH_GROUND","%s punches the ground in anger!"),
+(22898,2,0,41,0,100,"supremus EMOTE_GROUND_CRACK","The ground begins to crack open!");
+
+-- teron
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1564046 AND -1564037;
+DELETE FROM `creature_text` WHERE `entry`=22871;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(22871,0,0,14,11512,100,"teron SAY_INTRO","I was the first, you know. For me, the wheel of death has spun many times. <laughs> So much time has passed. I have a lot of catching up to do..."),
+(22871,1,0,14,11513,100,"teron SAY_AGGRO","Vengeance is mine!"),
+(22871,2,0,14,11514,100,"teron SAY_SLAY1","I have use for you!"),
+(22871,2,1,14,11515,100,"teron SAY_SLAY2","It gets worse..."),
+(22871,3,0,14,11517,100,"teron SAY_SPELL1","What are you afraid of?"),
+(22871,3,1,14,11516,100,"teron SAY_SPELL2","Death... really isn't so bad."),
+(22871,4,0,14,11518,100,"teron SAY_SPECIAL1","Give in!"),
+(22871,4,1,14,11519,100,"teron SAY_SPECIAL2","I have something for you..."),
+(22871,5,0,14,11520,100,"teron SAY_ENRAGE","YOU WILL SHOW THE PROPER RESPECT!"),
+(22871,6,0,14,11521,100,"teron SAY_DEATH","The wheel...spins...again....");
+
+-- najentus
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1564009 AND -1564000;
+DELETE FROM `creature_text` WHERE `entry`=22887;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(22887,0,0,14,11450,100,"najentus SAY_AGGRO","You will die in the name of Lady Vashj!"),
+(22887,1,0,14,11451,100,"najentus SAY_NEEDLE1","Stick around!"),
+(22887,1,1,14,11452,100,"najentus SAY_NEEDLE2","I'll deal with you later!"),
+(22887,2,0,14,11455,100,"najentus SAY_SLAY1","Your success was short lived!"),
+(22887,2,1,14,11456,100,"najentus SAY_SLAY2","Time for you to go!"),
+(22887,3,0,14,11453,100,"najentus SAY_SPECIAL1","Bel'anen dal'lorei!"),
+(22887,3,1,14,11454,100,"najentus SAY_SPECIAL2","Blood will flow!"),
+(22887,4,0,14,11457,100,"najentus SAY_ENRAGE1","Bal'amer ch'itah!"),
+(22887,5,0,14,11458,100,"najentus SAY_ENRAGE2","My patience has ran out! Die, DIE!"),
+(22887,6,0,14,11459,100,"najentus SAY_DEATH","Lord Illidan will... crush you.");
+
+-- illidari council
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1564096 AND -1564069;
+DELETE FROM `creature_text` WHERE `entry` IN (22952,22949,22951,22950);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(22952,0,0,14,11524,100,"council vera AGGRO","You wish to test me?"),
+(22952,1,0,14,11530,100,"council vera ENRAGE","You wish to kill me? Hahaha, you first!"),
+(22952,2,0,14,11528,100,"council vera SPECIAL1","You're not caught up for this!"),
+(22952,3,0,14,11529,100,"council vera SPECIAL2","Anar'alah belore!"),
+(22952,4,0,14,11525,100,"council vera SLAY","Valiant effort!"),
+(22952,5,0,14,11526,100,"council vera SLAY_COMT","A glorious kill!"),
+(22952,6,0,14,11527,100,"council vera DEATH","You got lucky!"),
+(22949,0,0,14,11422,100,"council gath AGGRO","I have better things to do..."),
+(22949,1,0,14,11428,100,"council gath ENRAGE","Enough games!"),
+(22949,2,0,14,11426,100,"council gath SPECIAL1","Enjoy your final moments!"),
+(22949,3,0,14,11427,100,"council gath SPECIAL2","You are mine!"),
+(22949,4,0,14,11423,100,"council gath SLAY","Selama am'oronor!"),
+(22949,5,0,14,11424,100,"council gath SLAY_COMT","Well done!"),
+(22949,6,0,14,11425,100,"council gath DEATH","Lord Illidan... I..."),
+(22951,0,0,14,11482,100,"council mala AGGRO","Flee or die!"),
+(22951,1,0,14,11488,100,"council mala ENRAGE","For Quel'Thalas! For the Sunwell!"),
+(22951,2,0,14,11486,100,"council mala SPECIAL1","No second chances!"),
+(22951,3,0,14,11487,100,"council mala SPECIAL2","I'm full of surprises!"),
+(22951,4,0,14,11483,100,"council mala SLAY","My work is done."),
+(22951,5,0,14,11484,100,"council mala SLAY_COMT","As it should be!"),
+(22951,6,0,14,11485,100,"council mala DEATH","Destiny... awaits."),
+(22950,0,0,14,11440,100,"council zere AGGRO","Common... such a crude language. Bandal!"),
+(22950,1,0,14,11446,100,"council zere ENRAGE","Sha'amoor sine menoor!"),
+(22950,2,0,14,11444,100,"council zere SPECIAL1","Diel fin'al"),
+(22950,3,0,14,11445,100,"council zere SPECIAL2","Sha'amoor ara mashal?"),
+(22950,4,0,14,11441,100,"council zere SLAY","Shorel'aran."),
+(22950,5,0,14,11442,100,"council zere SLAY_COMT","Belesa menoor!"),
+(22950,6,0,14,11443,100,"council zere DEATH","Diel ma'ahn... oreindel'o");
+
+-- daranelle
+DELETE FROM `script_texts` WHERE `entry`=-1000174;
+DELETE FROM `creature_text` WHERE `entry`=21469;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(21469,0,0,12,0,100,"daranelle SAY_SPELL_INFLUENCE","Good $N, you are under the spell's influence. I must analyze it quickly, then we can talk.");
+
+-- karathress
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1548029 AND -1548021;
+DELETE FROM `creature_text` WHERE `entry`=21214;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(21214,0,0,14,11277,100,"karathress SAY_AGGRO","Guards, attention! We have visitors..."),
+(21214,1,0,14,11278,100,"karathress SAY_GAIN_BLESSING","Your overconfidence will be your undoing! Guards, lend me your strength!"),
+(21214,2,0,14,11279,100,"karathress SAY_GAIN_ABILITY1","Go on, kill them! I'll be the better for it!"),
+(21214,2,1,14,11280,100,"karathress SAY_GAIN_ABILITY2","I am more powerful than ever!"),
+(21214,2,2,14,11281,100,"karathress SAY_GAIN_ABILITY3","More knowledge, more power!"),
+(21214,3,0,14,11282,100,"karathress SAY_SLAY1","Land-dwelling scum!"),
+(21214,3,1,14,11283,100,"karathress SAY_SLAY2","Alana be'lendor!"),
+(21214,3,2,14,11284,100,"karathress SAY_SLAY3","I am rid of you."),
+(21214,4,0,14,11285,100,"karathress SAY_DEATH","Her ... excellency ... awaits!");
+
+-- hydross
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1548008 AND -1548000;
+DELETE FROM `creature_text` WHERE `entry`=21216;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(21216,0,0,14,11289,100,"hydross SAY_AGGRO","I cannot allow you to interfere!"),
+(21216,1,0,14,11290,100,"hydross SAY_SWITCH_TO_CLEAN","Better, much better."),
+(21216,2,0,14,11291,100,"hydross SAY_CLEAN_SLAY1","They have forced me to this..."),
+(21216,2,1,14,11292,100,"hydross SAY_CLEAN_SLAY2","I have no choice."),
+(21216,3,0,14,11293,100,"hydross SAY_CLEAN_DEATH","I am... released..."),
+(21216,4,0,14,11297,100,"hydross SAY_SWITCH_TO_CORRUPT","Aaghh, the poison..."),
+(21216,5,0,14,11298,100,"hydross SAY_CORRUPT_SLAY1","I will purge you from this place."),
+(21216,5,1,14,11299,100,"hydross SAY_CORRUPT_SLAY2","You are no better than they!"),
+(21216,6,0,14,11300,100,"hydross SAY_CORRUPT_DEATH","You are the disease, not I");
+
+-- vashj
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1548055 AND -1548042;
+DELETE FROM `creature_text` WHERE `entry`=21212;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(21212,0,0,14,11531,100,"vashj SAY_INTRO","Water is life. It has become a rare commodity here in Outland. A commodity that we alone shall control. We are the Highborne, and the time has come at last for us to retake our rightful place in the world!"),
+(21212,1,0,14,11532,100,"vashj SAY_AGGRO1","I'll split you from stem to stern!"),
+(21212,1,1,14,11533,100,"vashj SAY_AGGRO2","Victory to Lord Illidan!"),
+(21212,1,2,14,11534,100,"vashj SAY_AGGRO3","I spit on you, surface filth!"),
+(21212,1,3,14,11535,100,"vashj SAY_AGGRO4","Death to the outsiders!"),
+(21212,2,0,14,11538,100,"vashj SAY_PHASE1","I did not wish to lower myself by engaging your kind, but you leave me little choice!"),
+(21212,3,0,14,11539,100,"vashj SAY_PHASE2","The time is now! Leave none standing!"),
+(21212,4,0,14,11540,100,"vashj SAY_PHASE3","You may want to take cover."),
+(21212,5,0,14,11536,100,"vashj SAY_BOWSHOT1","Straight to the heart!"),
+(21212,5,1,14,11537,100,"vashj SAY_BOWSHOT2","Seek your mark!"),
+(21212,6,0,14,11541,100,"vashj SAY_SLAY1","Your time ends now!"),
+(21212,6,1,14,11542,100,"vashj SAY_SLAY2","You have failed!"),
+(21212,6,2,14,11543,100,"vashj SAY_SLAY3","Be'lamere an'delay"),
+(21212,7,0,14,11544,100,"vashj SAY_DEATH","Lord Illidan, I... I am... sorry.");
+
+-- leotheras
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1548020 AND -1548009;
+DELETE FROM `creature_text` WHERE `entry`=21215;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(21215,0,0,14,11312,100,"leotheras SAY_AGGRO","Finally, my banishment ends!"),
+(21215,1,0,14,11304,100,"leotheras SAY_SWITCH_TO_DEMON","Be gone, trifling elf. I am in control now!"),
+(21215,2,0,14,11305,100,"leotheras SAY_INNER_DEMONS","We all have our demons..."),
+(21215,3,0,14,11306,100,"leotheras SAY_DEMON_SLAY1","I have no equal."),
+(21215,3,1,14,11307,100,"leotheras SAY_DEMON_SLAY2","Perish, mortal."),
+(21215,3,2,14,11308,100,"leotheras SAY_DEMON_SLAY3","Yes, YES! Ahahah!"),
+(21215,4,0,14,11314,100,"leotheras SAY_NIGHTELF_SLAY1","Kill! KILL!"),
+(21215,4,1,14,11315,100,"leotheras SAY_NIGHTELF_SLAY2","That's right! Yes!"),
+(21215,4,2,14,11316,100,"leotheras SAY_NIGHTELF_SLAY3","Who's the master now?"),
+(21215,5,0,14,11313,100,"leotheras SAY_FINAL_FORM","No... no! What have you done? I am the master! Do you hear me? I am... aaggh! Can't... contain him..."),
+(21215,6,0,14,11309,100,"leotheras SAY_FREE","At last I am liberated. It has been too long since I have tasted true freedom!"),
+(21215,7,0,14,11317,100,"leotheras SAY_DEATH","You cannot kill me! Fools, I'll be back! I'll... aarghh...");
+
+-- morogrim
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1548041 AND -1548030;
+DELETE FROM `creature_text` WHERE `entry`=21213;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(21213,0,0,14,11321,100,"morogrim SAY_AGGRO","Flood of the deep, take you!"),
+(21213,1,0,14,11322,100,"morogrim SAY_SUMMON1","By the Tides, kill them at once!"),
+(21213,1,1,14,11323,100,"morogrim SAY_SUMMON2","Destroy them my subjects!"),
+(21213,2,0,14,11324,100,"morogrim SAY_SUMMON_BUBL1","There is nowhere to hide!"),
+(21213,2,1,14,11325,100,"morogrim SAY_SUMMON_BUBL2","Soon it will be finished!"),
+(21213,3,0,14,11326,100,"morogrim SAY_SLAY1","It is done!"),
+(21213,3,1,14,11327,100,"morogrim SAY_SLAY2","Strugging only makes it worse."),
+(21213,3,2,14,11328,100,"morogrim SAY_SLAY3","Only the strong survive."),
+(21213,4,0,14,11329,100,"morogrim SAY_DEATH","Great... currents of... Ageon."),
+(21213,5,0,16,0,100,"morogrim EMOTE_WATERY_GRAVE","sends his enemies to their watery graves!"),
+(21213,6,0,41,0,100,"morogrim EMOTE_EARTHQUAKE","The violent earthquake has alerted nearby murlocs!"),
+(21213,7,0,16,0,100,"morogrim EMOTE_WATERY_GLOBULES","summons Watery Globules!");
+
+-- thespia
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1545006 AND -1545000;
+DELETE FROM `creature_text` WHERE `entry`=17797;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17797,0,0,14,10360,100,"thespia SAY_SUMMON","Surge forth my pets!"),
+(17797,1,0,14,10361,100,"thespia SAY_AGGRO_1","The depths will consume you!"),
+(17797,1,1,14,10362,100,"thespia SAY_AGGRO_2","Meet your doom, surface dwellers!"),
+(17797,1,2,14,10363,100,"thespia SAY_AGGRO_3","You will drown in blood!"),
+(17797,2,0,14,10364,100,"thespia SAY_SLAY_1","To the depths of oblivion with you!"),
+(17797,2,1,14,10365,100,"thespia SAY_SLAY_2","For my lady and master!"),
+(17797,3,0,14,10366,100,"thespia SAY_DEAD","Our matron will be.. the end of.. you..");
+
+-- mekgineer
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1545015 AND -1545007;
+DELETE FROM `creature_text` WHERE `entry`=17796;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17796,0,0,14,10367,100,"mekgineer SAY_MECHANICS","I'm bringin' the pain!"),
+(17796,1,0,14,10368,100,"mekgineer SAY_AGGRO_1","You're in for a world of hurt!"),
+(17796,1,1,14,10369,100,"mekgineer SAY_AGGRO_2","Eat hot metal, scumbag!"),
+(17796,1,2,14,10370,100,"mekgineer SAY_AGGRO_3","I'll come over there!"),
+(17796,1,3,14,10371,100,"mekgineer SAY_AGGRO_4","I'm bringin' the pain!"),
+(17796,2,0,14,10372,100,"mekgineer SOUND_SLAY_1","You just got served, punk!"),
+(17796,2,1,14,10373,100,"mekgineer SOUND_SLAY_2","I own you!"),
+(17796,2,2,14,10374,100,"mekgineer SOUND_SLAY_3","Have fun dyin', cupcake!"),
+(17796,3,0,14,10375,100,"mekgineer SAY_DEATH","Mommy!");
+
+-- kalithresh
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1545023 AND -1545016;
+DELETE FROM `creature_text` WHERE `entry`=17798;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17798,0,0,14,10390,100,"kalithresh SAY_INTRO","You deem yourselves worthy simply because you bested my guards? Our work here will not be compromised!"),
+(17798,1,0,14,10391,100,"kalithresh SAY_REGEN","This is not nearly over..."),
+(17798,2,0,14,10392,100,"kalithresh SAY_AGGRO1","Your head will roll!"),
+(17798,2,1,14,10393,100,"kalithresh SAY_AGGRO2","I despise all of your kind!"),
+(17798,2,2,14,10394,100,"kalithresh SAY_AGGRO3","Ba'ahntha sol'dorei!"),
+(17798,3,0,14,10395,100,"kalithresh SAY_SLAY1","Scram, surface filth!"),
+(17798,3,1,14,10396,100,"kalithresh SAY_SLAY2","Ah ha ha ha ha ha ha!"),
+(17798,4,0,14,10397,100,"kalithresh SAY_DEATH","For her Excellency... for... Vashj!");
+
+-- gruul
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1565019 AND -1565010;
+DELETE FROM `creature_text` WHERE `entry`=19044;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(19044,0,0,14,11355,100,"gruul SAY_AGGRO","Come... and die."),
+(19044,1,0,14,11356,100,"gruul SAY_SLAM1","Scurry"),
+(19044,1,1,14,11357,100,"gruul SAY_SLAM2","No escape"),
+(19044,2,0,14,11358,100,"gruul SAY_SHATTER1","Stay"),
+(19044,2,1,14,11359,100,"gruul SAY_SHATTER2","Beg... for life"),
+(19044,3,0,14,11360,100,"gruul SAY_SLAY1","No more"),
+(19044,3,1,14,11361,100,"gruul SAY_SLAY2","Unworthy"),
+(19044,3,2,14,11362,100,"gruul SAY_SLAY3","Die"),
+(19044,4,0,14,11363,100,"gruul SAY_DEATH","Aaargh..."),
+(19044,5,0,16,0,100,"gruul EMOTE_GROW","%s grows in size!");
+
+-- maulgar
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1565009 AND -1565000;
+DELETE FROM `creature_text` WHERE `entry`=18831;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(18831,0,0,14,11367,100,"maulgar SAY_AGGRO","Gronn are the real power in outland."),
+(18831,1,0,14,11368,100,"maulgar SAY_ENRAGE","You will not defeat the hand of Gruul!"),
+(18831,2,0,14,11369,100,"maulgar SAY_OGRE_DEATH1","You won't kill next one so easy!"),
+(18831,2,1,14,11370,100,"maulgar SAY_OGRE_DEATH2","Pah! Does not prove anything!"),
+(18831,2,2,14,11371,100,"maulgar SAY_OGRE_DEATH3","I'm not afraid of you."),
+(18831,2,3,14,11372,100,"maulgar SAY_OGRE_DEATH4","Good, now you fight me!"),
+(18831,3,0,14,11373,100,"maulgar SAY_SLAY1","You not so tough afterall!"),
+(18831,3,1,14,11374,100,"maulgar SAY_SLAY2","Aha-ha ha ha!"),
+(18831,3,2,14,11375,100,"maulgar SAY_SLAY3","Mulgar is king!"),
+(18831,4,0,14,11376,100,"maulgar SAY_DEATH","Gruul... will crush you...");
+
+-- broggok
+DELETE FROM `script_texts` WHERE `entry`=-1542008;
+DELETE FROM `creature_text` WHERE `entry`=17380;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17380,0,0,14,0,100,"broggok SAY_AGGRO","Come intruders....");
+
+-- kelidan
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1542007 AND -1542000;
+DELETE FROM `creature_text` WHERE `entry`=17377;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17377,0,0,14,10164,100,"kelidan SAY_WAKE","Who dares interrupt... What is this? What have you done? You ruin everything!"),
+(17377,1,0,14,10166,100,"kelidan SAY_ADD_AGGRO_1","You mustn't let him loose!"),
+(17377,1,1,14,10167,100,"kelidan SAY_ADD_AGGRO_2","Ignorant whelps!"),
+(17377,1,2,14,10168,100,"kelidan SAY_ADD_AGGRO_3","You fools! He'll kill us all!"),
+(17377,2,0,14,10169,100,"kelidan SAY_KILL_1","Just as you deserve!"),
+(17377,2,1,14,10170,100,"kelidan SAY_KILL_2","Your friends will soon be joining you."),
+(17377,3,0,14,10165,100,"kelidan SAY_NOVA","Closer... Come closer.. and burn!"),
+(17377,4,0,14,10171,100,"kelidan SAY_DIE","Good luck... you'll need it..");
+
+-- the maker
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1542014 AND -1542009;
+DELETE FROM `creature_text` WHERE `entry`=17381;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17381,0,0,14,10286,100,"the maker SAY_AGGRO_1","My work must not be interrupted."),
+(17381,0,1,14,10287,100,"the maker SAY_AGGRO_2","Perhaps I can find a use for you."),
+(17381,0,2,14,10288,100,"the maker SAY_AGGRO_3","Anger... Hate... These are tools I can use."),
+(17381,1,0,14,10289,100,"the maker SAY_KILL_1","Let's see what I can make of you."),
+(17381,1,1,14,10290,100,"the maker SAY_KILL_2","It is pointless to resist."),
+(17381,2,0,14,10291,100,"the maker SAY_DIE","Stay away from... me.");
+
+-- omor
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1543016 AND -1543009;
+DELETE FROM `creature_text` WHERE `entry`=17308;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17308,0,0,14,10280,100,"omor SAY_AGGRO_1","You dare stand against me?!"),
+(17308,0,1,14,10279,100,"omor SAY_AGGRO_2","I will not be defeated!"),
+(17308,0,2,14,10281,100,"omor SAY_AGGRO_3","Your insolence will be your death."),
+(17308,1,0,14,10277,100,"omor SAY_SUMMON","Achor-she-ki! Feast my pet! Eat your fill!"),
+(17308,2,0,14,10278,100,"omor SAY_CURSE","A-Kreesh!"),
+(17308,3,0,14,10282,100,"omor SAY_KILL_1","Die, weakling!"),
+(17308,4,0,14,10284,100,"omor SAY_DIE","It is... not over."),
+(17308,5,0,14,10283,100,"omor SAY_WIPE","I am victorious!");
+
+-- vazruden
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1543025 AND -1543017;
+DELETE FROM `creature_text` WHERE `entry`=17537;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17537,0,0,14,10292,100,"vazruden SAY_INTRO","You have faced many challenges, pity they were all in vain. Soon your people will kneel to my lord!"),
+(17537,1,0,14,10293,100,"vazruden SAY_WIPE","Is there no one left to test me?"),
+(17537,2,0,14,10294,100,"vazruden SAY_AGGRO_1","Your time is running out!"),
+(17537,2,1,14,10295,100,"vazruden SAY_AGGRO_2","You are nothing, I answer a higher call!"),
+(17537,2,2,14,10296,100,"vazruden SAY_AGGRO_3","The Dark Lord laughs at you!"),
+(17537,3,0,14,10297,100,"vazruden SAY_KILL_1","It is over. Finished!"),
+(17537,3,1,14,10298,100,"vazruden SAY_KILL_2","Your days are done!"),
+(17537,4,0,14,10299,100,"vazruden SAY_DIE","My lord will be the end you all..."),
+(17537,5,0,41,0,100,"vazruden EMOTE","descends from the sky");
+
+-- gargolmar
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1543008 AND -1543000;
+DELETE FROM `creature_text` WHERE `entry`=17306;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17306,0,0,14,0,100,"gargolmar SAY_TAUNT","Do you smell that? Fresh meat has somehow breached our citadel. Be wary of any intruders."),
+(17306,1,0,14,10329,100,"gargolmar SAY_HEAL","Heal me! QUICKLY!"),
+(17306,2,0,14,10330,100,"gargolmar SAY_SURGE","Back off, pup!"),
+(17306,3,0,14,10331,100,"gargolmar SAY_AGGRO_1","What have we here...?"),
+(17306,3,1,14,10332,100,"gargolmar SAY_AGGRO_2","Heh... this may hurt a little."),
+(17306,3,2,14,10333,100,"gargolmar SAY_AGGRO_3","I'm gonna enjoy this."),
+(17306,4,0,14,10334,100,"gargolmar SAY_KILL_1","Say farewell!"),
+(17306,4,1,14,10335,100,"gargolmar SAY_KILL_2","Much too easy..."),
+(17306,5,0,14,10336,100,"gargolmar SAY_DIE","Hahah.. <cough> ..argh!");
+
+-- nethekurse
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1540017 AND -1540000;
+DELETE FROM `creature_text` WHERE `entry`=16807;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(16807,0,0,14,10262,100,"nethekurse SAY_INTRO","You wish to fight us all at once? This should be amusing!"),
+(16807,1,0,14,10263,100,"nethekurse PEON_ATTACK_1","You can have that one. I no longer need him."),
+(16807,1,1,14,10264,100,"nethekurse PEON_ATTACK_2","Yes, beat him mercilessly. His skull is a thick as an ogres."),
+(16807,1,2,14,10265,100,"nethekurse PEON_ATTACK_3","Don't waste your time on that one. He's weak!"),
+(16807,1,3,14,10266,100,"nethekurse PEON_ATTACK_4","You want him? Very well, take him!"),
+(16807,2,0,14,10267,100,"nethekurse PEON_DIE_1","One pitiful wretch down. Go on, take another one."),
+(16807,2,1,14,10268,100,"nethekurse PEON_DIE_2","Ahh, what a waste... Next!"),
+(16807,2,2,14,10269,100,"nethekurse PEON_DIE_3","I was going to kill him anyway!"),
+(16807,2,3,14,10270,100,"nethekurse PEON_DIE_4","Thank you for saving me the trouble! Now it's my turn to have some fun..."),
+(16807,3,0,14,10259,100,"nethekurse SAY_TAUNT_1","Beg for your pittyfull life!"),
+(16807,3,1,14,10260,100,"nethekurse SAY_TAUNT_2","Run covad, ruun!"),
+(16807,3,2,14,10261,100,"nethekurse SAY_TAUNT_3","Your pain amuses me."),
+(16807,4,0,14,10271,100,"nethekurse SAY_AGGRO_1","I'm already bored."),
+(16807,4,1,14,10272,100,"nethekurse SAY_AGGRO_2","Come on! ... Show me a real fight."),
+(16807,4,2,14,10273,100,"nethekurse SAY_AGGRO_3","I had more fun torturing the peons."),
+(16807,5,0,14,10274,100,"nethekurse SAY_SLAY_1","You Loose."),
+(16807,5,1,14,10275,100,"nethekurse SAY_SLAY_2","Ohh! Just die."),
+(16807,6,0,14,10276,100,"nethekurse SAY_DIE","What a ... a shame.");
diff --git a/sql/updates/world/2012_12_07_00_world_creature_text.sql b/sql/updates/world/2012_12_07_00_world_creature_text.sql
new file mode 100644
index 00000000000..6763834d668
--- /dev/null
+++ b/sql/updates/world/2012_12_07_00_world_creature_text.sql
@@ -0,0 +1,462 @@
+-- ------------------------------- --
+-- Creature text conversion part 8 --
+-- ------------------------------- --
+-- omrogg
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1540017 AND -1540000;
+DELETE FROM `creature_text` WHERE `entry` IN (19523,19524,16809);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(19523,0,0,14,10306,100,"omrogg GoCombat_1","Smash!"),
+(19523,1,0,14,10308,100,"omrogg GoCombat_2","If you nice me let you live."),
+(19523,2,0,14,10309,100,"omrogg GoCombat_3","Me hungry!"),
+(19524,0,0,14,10317,100,"omrogg GoCombatDelay_1","Why don't you let me do the talking?"),
+(19524,1,0,14,10318,100,"omrogg GoCombatDelay_2","No, we will NOT let you live!"),
+(19524,2,0,14,10319,100,"omrogg GoCombatDelay_3","You always hungry. That why we so fat!"),
+(19523,3,0,14,10303,100,"omrogg Threat_1","You stay here. Me go kill someone else!"),
+(19524,3,0,14,10315,100,"omrogg Threat_2","What are you doing!"),
+(19523,4,0,14,10302,100,"omrogg Threat_3","Me kill someone else..."),
+(19523,5,0,14,10300,100,"omrogg Threat_4","Me not like this one..."),
+(19524,4,0,14,10314,100,"omrogg ThreatDelay1_1","That's not funny!"),
+(19523,6,0,14,10305,100,"omrogg ThreatDelay1_2","Me get bored..."),
+(19524,5,0,14,10313,100,"omrogg ThreatDelay1_3","I'm not done yet, idiot!"),
+(19524,6,0,14,10312,100,"omrogg ThreatDelay1_4","Hey you numbskull!"),
+(19523,7,0,14,10304,100,"omrogg ThreatDelay2_1","Ha ha ha."),
+(19524,7,0,14,10316,100,"omrogg ThreatDelay2_2","Whhy! He almost dead!"),
+(19523,8,0,14,10307,100,"omrogg ThreatDelay2_3","H'ey..."),
+(19523,9,0,14,10301,100,"omrogg ThreatDelay2_4","We kill his friend!"),
+(19523,10,0,14,10310,100,"omrogg Killing_1","This one die easy!"),
+(19524,8,0,14,10320,100,"omrogg Killing_2","I'm tired. You kill next one!"),
+(19524,9,0,14,10321,100,"omrogg KillingDelay_1","That's because I do all the hard work!"),
+(19523,11,0,14,10321,100,"omrogg KillingDelay_2","That's because I do all the hard work!"),
+(16809,0,0,14,10311,100,"omrogg YELL_DIE_L","This all...your fault!"),
+(16809,1,0,14,10322,100,"omrogg YELL_DIE_R","I...hate...you..."),
+(16809,2,0,16,0,100,"omrogg EMOTE_ENRAGE","%s enrages");
+
+-- kargath
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1540047 AND -1540042;
+DELETE FROM `creature_text` WHERE `entry`=16808;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(16808,0,0,14,10323,100,"kargath SAY_AGGRO1","Ours is the true Horde! The only Horde!"),
+(16808,0,1,14,10324,100,"kargath SAY_AGGRO2","I'll carve the meat from your bones!"),
+(16808,0,2,14,10325,100,"kargath SAY_AGGRO3","I am called Bladefist for a reason, as you will see!"),
+(16808,1,0,14,10326,100,"kargath SAY_SLAY1","For the real Horde!"),
+(16808,1,1,14,10327,100,"kargath SAY_SLAY2","I am the only Warchief!"),
+(16808,2,0,14,10328,100,"kargath SAY_DEATH","The true Horde... will.. prevail...");
+
+-- aeranas
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000139 AND -1000138;
+DELETE FROM `creature_text` WHERE `entry`=17085;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17085,0,0,12,0,100,"aeranas SAY_SUMMON","Avruu's magic... it still controls me. You must fight me, mortal. It's the only way to break the spell!"),
+(17085,1,0,12,0,100,"aeranas SAY_FREE","Avruu's magic is broken! I'm free once again!");
+
+-- ancestral wolf
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000498 AND -1000496;
+DELETE FROM `creature_text` WHERE `entry` IN (17077,17023);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17077,0,0,16,0,100,"ancestral wolf EMOTE_WOLF_LIFT_HEAD","%s lifts its head into the air, as if listening for something."),
+(17077,1,0,16,0,100,"ancestral wolf EMOTE_WOLF_HOWL","%s lets out a howl that rings across the mountains to the north and motions for you to follow."),
+(17023,0,0,12,0,100,"ancestral wolf SAY_WOLF_WELCOME","Welcome, kind spirit. What has brought you to us?");
+
+-- wounded elf
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000122 AND -1000117;
+DELETE FROM `creature_text` WHERE `entry`=16993;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(16993,0,0,12,0,100,"wounded elf SAY_ELF_START","Thank you for agreeing to help. Now, let's get out of here $N."),
+(16993,1,0,12,0,100,"wounded elf SAY_ELF_SUMMON1","Over there! They're following us!"),
+(16993,2,0,12,0,100,"wounded elf SAY_ELF_RESTING","Allow me a moment to rest. The journey taxes what little strength I have."),
+(16993,3,0,12,0,100,"wounded elf SAY_ELF_SUMMON2","Did you hear something?"),
+(16993,4,0,12,0,100,"wounded elf SAY_ELF_COMPLETE","Falcon Watch, at last! Now, where's my... Oh no! My pack, it's missing! Where has -"),
+(16993,5,0,12,0,100,"wounded elf SAY_ELF_AGGRO","You won't keep me from getting to Falcon Watch!");
+
+-- maghar
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000488 AND -1000482;
+DELETE FROM `creature_text` WHERE `entry` IN (18210,18202,18211);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(18210,0,0,12,0,100,"maghar captive SAY_MAG_START","Look out!"),
+(18211,0,0,12,0,100,"maghar captive SAY_MAG_NO_ESCAPE","Don't let them escape! Kill the strong one first!"),
+(18210,1,0,12,0,100,"maghar captive SAY_MAG_MORE","More of them coming! Watch out!"),
+(18202,0,0,12,0,100,"maghar captive SAY_MAG_MORE_REPLY","Where do you think you're going? Kill them all!"),
+(18210,2,0,12,0,100,"maghar captive SAY_MAG_LIGHTNING","Ride the lightning, filth!"),
+(18210,3,0,12,0,100,"maghar captive SAY_MAG_SHOCK","FROST SHOCK!!!"),
+(18210,4,0,12,0,100,"maghar captive SAY_MAG_COMPLETE","It is best that we split up now, in case they send more after us. Hopefully one of us will make it back to Garrosh. Farewell stranger.");
+
+-- corki
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1800073 AND -1800071;
+DELETE FROM `creature_text` WHERE `entry` IN (18445,20812,18369);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(18445,0,0,12,0,100,"corki NPC_CORKI","Thanks, $C! I'm sure my dad will reward you greatly! Bye!"),
+(20812,0,0,12,0,100,"corki NPC_CORKI_2","This is the last time I get caught!I promise! Bye!"),
+(18369,0,0,12,0,100,"corki NPC_CORKI_3","Thank you for saving me again!");
+
+-- manaforge_control
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000216 AND -1000211;
+DELETE FROM `creature_text` WHERE `entry` IN (20209,20417,20418,20440);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(20209,0,0,16,0,100,"manaforge_control EMOTE_START","Warning! %s emergency shutdown process initiated by $N. Shutdown will complete in two minutes."),
+(20209,1,0,16,0,100,"manaforge_control EMOTE_60","Emergency shutdown will complete in one minute."),
+(20209,2,0,16,0,100,"manaforge_control EMOTE_30","Emergency shutdown will complete in thirty seconds."),
+(20209,3,0,16,0,100,"manaforge_control EMOTE_10","Emergency shutdown will complete in ten seconds."),
+(20209,4,0,16,0,100,"manaforge_control EMOTE_COMPLETE","Emergency shutdown complete."),
+(20209,5,0,16,0,100,"manaforge_control EMOTE_ABORT","Emergency shutdown aborted."),
+(20417,0,0,16,0,100,"manaforge_control EMOTE_START","Warning! %s emergency shutdown process initiated by $N. Shutdown will complete in two minutes."),
+(20417,1,0,16,0,100,"manaforge_control EMOTE_60","Emergency shutdown will complete in one minute."),
+(20417,2,0,16,0,100,"manaforge_control EMOTE_30","Emergency shutdown will complete in thirty seconds."),
+(20417,3,0,16,0,100,"manaforge_control EMOTE_10","Emergency shutdown will complete in ten seconds."),
+(20417,4,0,16,0,100,"manaforge_control EMOTE_COMPLETE","Emergency shutdown complete."),
+(20417,5,0,16,0,100,"manaforge_control EMOTE_ABORT","Emergency shutdown aborted."),
+(20418,0,0,16,0,100,"manaforge_control EMOTE_START","Warning! %s emergency shutdown process initiated by $N. Shutdown will complete in two minutes."),
+(20418,1,0,16,0,100,"manaforge_control EMOTE_60","Emergency shutdown will complete in one minute."),
+(20418,2,0,16,0,100,"manaforge_control EMOTE_30","Emergency shutdown will complete in thirty seconds."),
+(20418,3,0,16,0,100,"manaforge_control EMOTE_10","Emergency shutdown will complete in ten seconds."),
+(20418,4,0,16,0,100,"manaforge_control EMOTE_COMPLETE","Emergency shutdown complete."),
+(20418,5,0,16,0,100,"manaforge_control EMOTE_ABORT","Emergency shutdown aborted."),
+(20440,0,0,16,0,100,"manaforge_control EMOTE_START","Warning! %s emergency shutdown process initiated by $N. Shutdown will complete in two minutes."),
+(20440,1,0,16,0,100,"manaforge_control EMOTE_60","Emergency shutdown will complete in one minute."),
+(20440,2,0,16,0,100,"manaforge_control EMOTE_30","Emergency shutdown will complete in thirty seconds."),
+(20440,3,0,16,0,100,"manaforge_control EMOTE_10","Emergency shutdown will complete in ten seconds."),
+(20440,4,0,16,0,100,"manaforge_control EMOTE_COMPLETE","Emergency shutdown complete."),
+(20440,5,0,16,0,100,"manaforge_control EMOTE_ABORT","Emergency shutdown aborted.");
+
+-- dawnforge
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000137 AND -1000128;
+DELETE FROM `creature_text` WHERE `entry` IN (19830,21504,19831);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(19830,0,0,12,0,100,"dawnforge SAY_ARCANIST_ARDONIS_1","You cannot be serious! We are severely understaffed and can barely keep this manaforge functional!"),
+(19830,1,0,12,0,100,"dawnforge SAY_ARCANIST_ARDONIS_2","Yes, my lord."),
+(21504,0,0,12,0,100,"dawnforge SAY_PATHALEON_CULATOR_IMAGE_1","Indeed, it is not a request."),
+(21504,1,0,12,0,100,"dawnforge SAY_PATHALEON_CULATOR_IMAGE_2","Duro will be reinforced! Ultris was a complete disaster. I will NOT have that mistake repeated!"),
+(21504,2,0,12,0,100,"dawnforge SAY_PATHALEON_CULATOR_IMAGE_2_1","We've had too many setbacks along the way: Hellfire Citadel, Fallen Sky Ridge, Firewing Point... Prince Kael'thas will tolerate no further delays. I will tolerate nothing other than complete success!"),
+(21504,3,0,12,0,100,"dawnforge SAY_PATHALEON_CULATOR_IMAGE_2_2","I am returning to Tempest Keep. See to it that I do not have reason to return!"),
+(19831,0,0,12,0,100,"dawnforge SAY_COMMANDER_DAWNFORGE_1","We need you to send reinforcements to Manaforge Duro, Ardonis. This is not a request, it's an order."),
+(19831,1,0,12,0,100,"dawnforge SAY_COMMANDER_DAWNFORGE_2","You will do as ordered. Manaforge Duro has come under heavy attack by mana creatures and the situation is out of control. Failure to comply will not be tolerated!"),
+(19831,2,0,12,0,100,"dawnforge SAY_COMMANDER_DAWNFORGE_3","My lord!"),
+(19831,3,0,12,0,100,"dawnforge SAY_COMMANDER_DAWNFORGE_4","Yes, my lord."),
+(19831,4,0,12,0,100,"dawnforge SAY_COMMANDER_DAWNFORGE_5","See to it, Ardonis!");
+
+-- bessy
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000525 AND -1000524;
+DELETE FROM `creature_text` WHERE `entry`=20415;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(20415,0,0,12,0,100,"bessy SAY_THADELL_1","Bessy, is that you?"),
+(20415,1,0,12,0,100,"bessy SAY_THADELL_2","Thank you for bringing back my Bessy, $N. I couldn't live without her!");
+
+-- mature netherwing drake
+DELETE FROM `script_texts` WHERE `entry`=-1000175;
+DELETE FROM `creature_text` WHERE `entry`=21648;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(21648,0,0,12,0,100,"mature netherwing drake SAY_JUST_EATEN","Thank you, mortal.");
+
+-- overlord morghor
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000621 AND -1000606;
+DELETE FROM `creature_text` WHERE `entry` IN (23139,22083,23141);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(23139,0,0,12,0,100,"overlord morghor OVERLORD_SAY_1","Come, $N. Lord Stormrage awaits."),
+(23139,1,0,12,0,100,"overlord morghor OVERLORD_SAY_2","Lord Illidan will be here shortly."),
+(23139,3,0,12,0,100,"overlord morghor OVERLORD_SAY_4","But... My lord, I do not understand. $N... He is the orc that has..."),
+(23139,4,0,12,0,100,"overlord morghor OVERLORD_SAY_5","It will be done, my lord."),
+(23139,5,0,12,0,100,"overlord morghor OVERLORD_SAY_6","So you thought to make a fool of Mor'ghor, eh? Before you are delivered to Lord Illidan, you will feel pain that you could not know to exist. I will take pleasure in exacting my own vengeance."),
+(23139,6,0,14,0,100,"overlord morghor OVERLORD_YELL_1","Warriors of Dragonmaw, gather 'round! One among you has attained the rank of highlord! Bow your heads in reverence! Show your respect and allegiance to Highlord $N!"),
+(23139,7,0,14,0,100,"overlord morghor OVERLORD_YELL_2","All hail Lord Illidan!"),
+(22083,0,0,12,0,100,"overlord morghor LORD_ILLIDAN_SAY_1","What is the meaning of this, Mor'ghor?"),
+(22083,1,0,12,0,100,"overlord morghor LORD_ILLIDAN_SAY_2","SILENCE!"),
+(22083,2,0,12,0,100,"overlord morghor LORD_ILLIDAN_SAY_3","Blathering idiot. You incomprehensibly incompetent buffoon..."),
+(22083,3,0,12,0,100,"overlord morghor LORD_ILLIDAN_SAY_4","THIS is your hero?"),
+(22083,4,0,12,0,100,"overlord morghor LORD_ILLIDAN_SAY_5","You have been deceived, imbecile."),
+(22083,5,0,12,0,100,"overlord morghor LORD_ILLIDAN_SAY_6","This... whole... operation... HAS BEEN COMPROMISED!"),
+(22083,6,0,12,0,100,"overlord morghor LORD_ILLIDAN_SAY_7","I expect to see this insect's carcass in pieces in my lair within the hour. Fail and you will suffer a fate so much worse than death."),
+(23141,0,0,12,0,100,"overlord morghor YARZILL_THE_MERC_SAY","You will not harm the boy, Mor'ghor! Quickly, $N, climb on my back!");
+
+-- wilda
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000390 AND -1000381;
+DELETE FROM `creature_text` WHERE `entry`=21027;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(21027,0,0,12,0,100,"wilda SAY_WIL_START","I sense the tortured spirits, $n. They are this way, come quickly!"),
+(21027,1,0,12,0,100,"wilda SAY_WIL_AGGRO1","Watch out!"),
+(21027,1,1,12,0,100,"wilda SAY_WIL_AGGRO2","Naga attackers! Defend yourself!"),
+(21027,2,0,12,0,100,"wilda SAY_WIL_PROGRESS1","Grant me protection $n, I must break trough their foul magic!"),
+(21027,3,0,12,0,100,"wilda SAY_WIL_PROGRESS2","The naga of Coilskar are exceptionally cruel to their prisoners. It is a miracle that I survived inside that watery prison for as long as I did. Earthmother be praised."),
+(21027,3,1,12,0,100,"wilda SAY_WIL_PROGRESS4","Lady Vashj must answer for these atrocities. She must be brought to justice!"),
+(21027,3,2,12,0,100,"wilda SAY_WIL_PROGRESS5","The tumultuous nature of the great waterways of Azeroth and Draenor are a direct result of tormented water spirits."),
+(21027,4,0,12,0,100,"wilda SAY_WIL_FIND_EXIT","Now we must find the exit."),
+(21027,5,0,12,0,100,"wilda SAY_WIL_JUST_AHEAD","It shouldn't be much further, $n. The exit is just up ahead."),
+(21027,6,0,12,0,100,"wilda SAY_WIL_END","Thank you, $n. Please return to my brethren at the Altar of Damnation, near the Hand of Gul'dan, and tell them that Wilda is safe. May the Earthmother watch over you...");
+
+-- kservant
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000255 AND -1000234;
+DELETE FROM `creature_text` WHERE `entry`=19685;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(19685,0,0,12,0,100,"kservant SAY_KHAD_SERV_0","Follow me, stranger. This won't take long."),
+(19685,1,0,15,0,100,"kservant SAY_KHAD_SERV_1","Shattrath was once the draenei capital of this world. Its name means \"dwelling of light.\""),
+(19685,2,0,15,0,100,"kservant SAY_KHAD_SERV_2","When the Burning Legion turned the orcs against the draenei, the fiercest battle was fought here. The draenei fought tooth and nail, but in the end the city fell."),
+(19685,3,0,15,0,100,"kservant SAY_KHAD_SERV_3","The city was left in ruins and darkness... until the Sha'tar arrived."),
+(19685,4,0,15,0,100,"kservant SAY_KHAD_SERV_4","Let us go into the Lower City. I will warn you that as one of the only safe havens in Outland, Shattrath has attracted droves of refugees from all wars, current and past."),
+(19685,5,0,15,0,100,"kservant SAY_KHAD_SERV_5","The Sha'tar, or \"born from light\" are the naaru that came to Outland to fight the demons of the Burning Legion."),
+(19685,6,0,15,0,100,"kservant SAY_KHAD_SERV_6","They were drawn to the ruins of Shattrath City where a small remnant of the draenei priesthood conducted its rites inside a ruined temple on this very spot."),
+(19685,7,0,15,0,100,"kservant SAY_KHAD_SERV_7","The priesthood, known as the Aldor, quickly regained its strength as word spread that the naaru had returned and reconstruction soon began. The ruined temple is now used as an infirmary for injured refugees."),
+(19685,8,0,15,0,100,"kservant SAY_KHAD_SERV_8","It wouldn't be long, however, before the city came under attack once again. This time, the attack came from Illidan's armies. A large regiment of blood elves had been sent by Illidan's ally, Kael'thas Sunstrider, to lay waste to the city."),
+(19685,9,0,15,0,100,"kservant SAY_KHAD_SERV_9","As the regiment of blood elves crossed this very bridge, the Aldor's exarchs and vindicators lined up to defend the Terrace of Light. But then the unexpected happened."),
+(19685,10,0,15,0,100,"kservant SAY_KHAD_SERV_10","The blood elves laid down their weapons in front of the city's defenders; their leader, a blood elf elder known as Voren'thal, stormed into the Terrace of Light and demanded to speak to A'dal."),
+(19685,11,0,15,0,100,"kservant SAY_KHAD_SERV_11","As the naaru approached him, Voren'thal kneeled before him and uttered the following words: \"I've seen you in a vision, naaru. My race's only hope for survival lies with you. My followers and I are here to serve you.\""),
+(19685,12,0,15,0,100,"kservant SAY_KHAD_SERV_12","The defection of Voren'thal and his followers was the largest loss ever incurred by Kael's forces. And these weren't just any blood elves. Many of the best and brightest amongst Kael's scholars and magisters had been swayed by Voren'thal's influence."),
+(19685,13,0,15,0,100,"kservant SAY_KHAD_SERV_13","The naaru accepted the defectors, who would become known as the Scryers; their dwelling lies in the platform above. Only those initiated with the Scryers are allowed there."),
+(19685,14,0,15,0,100,"kservant SAY_KHAD_SERV_14","The Aldor are followers of the Light and forgiveness and redemption are values they understand. However, they found hard to forget the deeds of the blood elves while under Kael's command."),
+(19685,15,0,15,0,100,"kservant SAY_KHAD_SERV_15","Many of the priesthood had been slain by the same magisters who now vowed to serve the naaru. They were not happy to share the city with their former enemies."),
+(19685,16,0,15,0,100,"kservant SAY_KHAD_SERV_16","The Aldor's most holy temple and its surrounding dwellings lie on the terrace above. As a holy site, only the initiated are welcome inside."),
+(19685,17,0,15,0,100,"kservant SAY_KHAD_SERV_17","The attacks against Shattrath continued, but the city did not fall, as you can see. On the contrary, the naaru known as Xi'ri led a successful incursion into Shadowmoon Valley - Illidan's doorstep."),
+(19685,18,0,15,0,100,"kservant SAY_KHAD_SERV_18","There he continues to wage war on Illidan with the assistance of the Aldor and the Scryers. The two factions have not given up on their old feuds, though."),
+(19685,19,0,15,0,100,"kservant SAY_KHAD_SERV_19","Such is their animosity that they vie for the honor of being sent to assist the naaru there. Each day, that decision is made here by A'dal. The armies gather here to receive A'dal's blessing before heading to Shadowmoon."),
+(19685,20,0,15,0,100,"kservant SAY_KHAD_SERV_20","Khadgar should be ready to see you again. Just remember that to serve the Sha'tar you will most likely have to ally with the Aldor or the Scryers. And seeking the favor of one group will cause the others' dislike."),
+(19685,21,0,15,0,100,"kservant SAY_KHAD_SERV_21","Good luck stranger, and welcome to Shattrath City.");
+
+-- larry
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000279 AND -1000274;
+DELETE FROM `creature_text` WHERE `entry`=19720;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(19720,0,0,12,0,100,"larry SAY_START","Time to teach you a lesson in manners, little $Gboy:girl;!"),
+(19720,1,0,12,0,100,"larry SAY_COUNT","Now I'm gonna give you to the count of '3' to get out of here before I sick the dogs on you."),
+(19720,2,0,12,0,100,"larry SAY_COUNT_1","1..."),
+(19720,3,0,12,0,100,"larry SAY_COUNT_2","2..."),
+(19720,4,0,12,0,100,"larry SAY_ATTACK_5","Time to meet your maker!"),
+(19720,5,0,12,0,100,"larry SAY_GIVEUP","Alright, we give up! Don't hurt us!");
+
+-- skyriss
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1552009 AND -1552000;
+DELETE FROM `creature_text` WHERE `entry`=20912;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(20912,0,0,14,11122,100,"skyriss SAY_INTRO","It is a small matter to control the mind of the weak... for I bear allegiance to powers untouched by time, unmoved by fate. No force on this world or beyond harbors the strength to bend our knee... not even the mighty Legion!"),
+(20912,1,0,14,11123,100,"skyriss SAY_AGGRO","Bear witness to the agent of your demise!"),
+(20912,2,0,14,11124,100,"skyriss SAY_KILL_1","Your fate is written!"),
+(20912,2,1,14,11125,100,"skyriss SAY_KILL_2","The chaos I have sown here is but a taste..."),
+(20912,3,0,14,11127,100,"skyriss SAY_MIND_1","You will do my bidding, weakling."),
+(20912,3,1,14,11128,100,"skyriss SAY_MIND_2","Your will is no longer your own."),
+(20912,4,0,14,11129,100,"skyriss SAY_FEAR_1","Flee in terror!"),
+(20912,4,1,14,11130,100,"skyriss SAY_FEAR_2","I will show you horrors undreamed of!"),
+(20912,5,0,14,11131,100,"skyriss SAY_IMAGE","We span the universe, as countless as the stars!"),
+(20912,6,0,14,11126,100,"skyriss SAY_DEATH","I am merely one of... infinite multitudes.");
+
+-- freywinn
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1553005 AND -1553000;
+DELETE FROM `creature_text` WHERE `entry`=17975;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17975,0,0,14,11144,100,"freywinn SAY_AGGRO","What are you doing? These specimens are very delicate!"),
+(17975,1,0,14,11145,100,"freywinn SAY_KILL_1","Your life cycle is now concluded!"),
+(17975,1,1,14,11146,100,"freywinn SAY_KILL_2","You will feed the worms."),
+(17975,2,0,14,11147,100,"freywinn SAY_TREE_1","Endorel aluminor!"),
+(17975,2,1,14,11148,100,"freywinn SAY_TREE_2","Nature bends to my will!"),
+(17975,3,0,14,11149,100,"freywinn SAY_DEATH","The specimens...must be preserved.");
+
+-- laj
+DELETE FROM `script_texts` WHERE `entry`=-1553006;
+DELETE FROM `creature_text` WHERE `entry`=17980;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17980,0,0,16,0,100,"laj EMOTE_SUMMON","emits a strange noise.");
+
+-- warp
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1553012 AND -1553007;
+DELETE FROM `creature_text` WHERE `entry`=17977;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17977,0,0,14,11230,100,"warp SAY_AGGRO","Who disturbs this sanctuary?"),
+(17977,1,0,14,11231,100,"warp SAY_SLAY_1","You must die! But wait: this does not-- No, no... you must die!"),
+(17977,1,1,14,11232,100,"warp SAY_SLAY_2","What am I doing? Why do I..."),
+(17977,2,0,14,11233,100,"warp SAY_SUMMON_1","Children, come to me!"),
+(17977,2,1,14,11234,100,"warp SAY_SUMMON_2","Maybe this is not-- No, we fight! Come to my aid."),
+(17977,3,0,14,11235,100,"warp SAY_DEATH","So... confused. Do not... belong here!");
+
+-- solarian
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1550015 AND -1550007;
+DELETE FROM `creature_text` WHERE `entry`=18805;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(18805,0,0,14,11134,100,"solarian SAY_AGGRO","Tal anu'men no Sin'dorei!"),
+(18805,1,0,14,11139,100,"solarian SAY_SUMMON1","Ha ha ha! You are hopelessly outmatched!"),
+(18805,2,0,14,11140,100,"solarian SAY_SUMMON2","I will crush your delusions of grandeur!"),
+(18805,3,0,14,11136,100,"solarian SAY_KILL1","Your soul belongs to the Abyss!"),
+(18805,3,1,14,11137,100,"solarian SAY_KILL2","By the blood of the Highborne!"),
+(18805,3,2,14,11138,100,"solarian SAY_KILL3","For the Sunwell!"),
+(18805,4,0,14,11135,100,"solarian SAY_DEATH","The warmth of the sun... awaits."),
+(18805,5,0,14,0,100,"solarian SAY_VOIDA","Enough of this! Now I call upon the fury of the cosmos itself."),
+(18805,6,0,14,0,100,"solarian SAY_VOIDB","I become ONE... with the VOID!");
+
+-- kaelthas
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1550043 AND -1550016;
+DELETE FROM `creature_text` WHERE `entry` IN (19622,20064,20060,20062,20063);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(19622,0,0,14,11256,100,"kaelthas SAY_INTRO","Energy. Power. My people are addicted to it... a dependence made manifest after the Sunwell was destroyed. Welcome... to the future. A pity you are too late to stop it. No one can stop me now! Selama ashal'anore!"),
+(19622,1,0,14,11257,100,"kaelthas SAY_INTRO_CAPERNIAN","Capernian will see to it that your stay here is a short one."),
+(19622,2,0,14,11258,100,"kaelthas SAY_INTRO_TELONICUS","Well done, you have proven worthy to test your skills against my master engineer, Telonicus."),
+(19622,3,0,14,11259,100,"kaelthas SAY_INTRO_THALADRED","Let us see how your nerves hold up against the Darkener, Thaladred."),
+(19622,4,0,14,11260,100,"kaelthas SAY_INTRO_SANGUINAR","You have persevered against some of my best advisors... but none can withstand the might of the Blood Hammer. Behold, Lord Sanguinar!"),
+(19622,5,0,14,11261,100,"kaelthas SAY_PHASE2_WEAPON","As you see, I have many weapons in my arsenal..."),
+(19622,6,0,14,11262,100,"kaelthas SAY_PHASE3_ADVANCE","Perhaps I underestimated you. It would be unfair to make you fight all four advisors at once, but... fair treatment was never shown to my people. I'm just returning the favor."),
+(19622,7,0,14,11263,100,"kaelthas SAY_PHASE4_INTRO2","Alas, sometimes one must take matters into one's own hands. Balamore shanal!"),
+(19622,8,0,14,11273,100,"kaelthas SAY_PHASE5_NUTS","I have not come this far to be stopped! The future I have planned will not be jeopardized! Now you will taste true power!!"),
+(19622,9,0,14,11270,100,"kaelthas SAY_SLAY1","You will not prevail."),
+(19622,9,1,14,11271,100,"kaelthas SAY_SLAY2","You gambled...and lost."),
+(19622,9,2,14,11272,100,"kaelthas SAY_SLAY3","This was Child's play."),
+(19622,10,0,14,11268,100,"kaelthas SAY_MINDCONTROL1","Obey me."),
+(19622,10,1,14,11269,100,"kaelthas SAY_MINDCONTROL2","Bow to my will."),
+(19622,11,0,14,11264,100,"kaelthas SAY_GRAVITYLAPSE1","Let us see how you fare when your world is turned upside down."),
+(19622,11,1,14,11265,100,"kaelthas SAY_GRAVITYLAPSE2","Having trouble staying grounded?"),
+(19622,12,0,14,11267,100,"kaelthas SAY_SUMMON_PHOENIX1","Anara'nel belore!"),
+(19622,12,1,14,11266,100,"kaelthas SAY_SUMMON_PHOENIX2","By the power of the sun!"),
+(19622,13,0,14,11274,100,"kaelthas SAY_DEATH","For...Quel...thalas!"),
+(20064,0,0,14,11203,100,"thaladred SAY_THALADRED_AGGRO","Prepare yourselves!"),
+(20064,1,0,14,11204,100,"thaladred SAY_THALADRED_DEATH","Forgive me, my prince! I have... failed."),
+(20064,2,0,16,0,100,"thaladred EMOTE_THALADRED_GAZE","sets his gaze on $N!"),
+(20060,0,0,14,11152,100,"sanguinar SAY_SANGUINAR_AGGRO","Blood for blood!"),
+(20060,1,0,14,11153,100,"sanguinar SAY_SANGUINAR_DEATH","NO! I ...will... not..."),
+(20062,0,0,14,11117,100,"capernian SAY_CAPERNIAN_AGGRO","The sin'dore reign supreme!"),
+(20062,1,0,14,11118,100,"capernian SAY_CAPERNIAN_DEATH","This is not over!"),
+(20063,0,0,14,11157,100,"telonicus SAY_TELONICUS_AGGRO","Anar'alah belore!"),
+(20063,1,0,14,11158,100,"telonicus SAY_TELONICUS_DEATH","More perils... await");
+
+-- voidreaver
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1550006 AND -1550000;
+DELETE FROM `creature_text` WHERE `entry`=19516;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(19516,0,0,14,11213,100,"voidreaver SAY_AGGRO","Alert, you are marked for extermination!"),
+(19516,1,0,14,11215,100,"voidreaver SAY_SLAY1","Extermination, successful."),
+(19516,1,1,14,11216,100,"voidreaver SAY_SLAY2","Imbecile life form, no longer functional."),
+(19516,1,2,14,11217,100,"voidreaver SAY_SLAY3","Threat neutralized."),
+(19516,2,0,14,11214,100,"voidreaver SAY_DEATH","Systems... shutting... down..."),
+(19516,3,0,14,11218,100,"voidreaver SAY_POUNDING1","Alternative measure commencing..."),
+(19516,3,1,14,11219,100,"voidreaver SAY_POUNDING2","Calculating force parameters...");
+
+-- ironhand
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1554012 AND -1554006;
+DELETE FROM `creature_text` WHERE `entry`=19710;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(19710,0,0,14,11109,100,"ironhand SAY_AGGRO_1","You have approximately five seconds to live."),
+(19710,1,0,14,11112,100,"ironhand SAY_HAMMER_1","With the precise angle and velocity..."),
+(19710,1,1,14,11113,100,"ironhand SAY_HAMMER_2","Low tech yet quiet effective!"),
+(19710,2,0,14,11110,100,"ironhand SAY_SLAY_1","A foregone conclusion."),
+(19710,2,1,14,11111,100,"ironhand SAY_SLAY_2","The processing will continue a schedule!"),
+(19710,3,0,14,11114,100,"ironhand SAY_DEATH_1","My calculations did not..."),
+(19710,4,0,41,0,100,"ironhand EMOTE_HAMMER","raises his hammer menacingly...");
+
+-- sepethrea
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1554019 AND -1554013;
+DELETE FROM `creature_text` WHERE `entry`=19221;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(19221,0,0,14,11186,100,"sepethrea SAY_AGGRO","Don't value your life very much, do you?"),
+(19221,1,0,14,11191,100,"sepethrea SAY_SUMMON","I am not alone."),
+(19221,2,0,14,11189,100,"sepethrea SAY_DRAGONS_BREATH_1","Think you can take the heat?"),
+(19221,2,1,14,11190,100,"sepethrea SAY_DRAGONS_BREATH_2","Anar'endal dracon!"),
+(19221,3,0,14,11187,100,"sepethrea SAY_SLAY1","And don't come back!"),
+(19221,3,1,14,11188,100,"sepethrea SAY_SLAY2","En'dala finel el'dal"),
+(19221,4,0,14,11192,100,"sepethrea SAY_DEATH","Anu... bala belore...alon.");
+
+-- pathaleon
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1554027 AND -1554020;
+DELETE FROM `creature_text` WHERE `entry`=19220;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(19220,0,0,14,11193,100,"pathaleon SAY_AGGRO","We are on a strict timetable. You will not interfere!"),
+(19220,1,0,14,11197,100,"pathaleon SAY_DOMINATION_1","I'm looking for a team player..."),
+(19220,1,1,14,11198,100,"pathaleon SAY_DOMINATION_2","You work for me now!"),
+(19220,2,0,14,11196,100,"pathaleon SAY_SUMMON","Time to supplement my work force."),
+(19220,3,0,14,11199,100,"pathaleon SAY_ENRAGE","I prefeer to be hands-on..."),
+(19220,4,0,14,11194,100,"pathaleon SAY_SLAY_1","A minor inconvenience."),
+(19220,4,1,14,11195,100,"pathaleon SAY_SLAY_2","Looks like you lose."),
+(19220,5,0,14,11200,100,"pathaleon SAY_DEATH","The project will... continue.");
+
+-- unkor
+DELETE FROM `script_texts` WHERE `entry`=-1000194;
+DELETE FROM `creature_text` WHERE `entry`=18262;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(18262,0,0,12,0,100,"unkor SAY_SUBMIT","I give up! Please don't kill me!");
+
+-- floon
+DELETE FROM `script_texts` WHERE `entry`=-1000195;
+DELETE FROM `creature_text` WHERE `entry`=18588;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(18588,0,0,12,0,100,"floon SAY_FLOON_ATTACK","I choose the third option: KILLING YOU!");
+
+-- isla starmane
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000574 AND -1000571;
+DELETE FROM `creature_text` WHERE `entry`=18760;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(18760,0,0,12,0,100,"isla starmane SAY_PROGRESS_1","Ok let's get out of here!"),
+(18760,1,0,12,0,100,"isla starmane SAY_PROGRESS_2","You sure you're ready? Take a moment."),
+(18760,2,0,12,0,100,"isla starmane SAY_PROGRESS_3","Alright, let's do this!"),
+(18760,3,0,12,0,100,"isla starmane SAY_PROGRESS_4","Ok, I think I can make it on my own from here. Thank you so much for breaking me out of there!");
+
+-- guards
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1070003 AND -1070001;
+DELETE FROM `creature_text` WHERE `entry` IN (68,1976,3218,3296,3502,4624,9460,11190,15184);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(68,0,0,12,0,100,"SAY_GUARD_SIL_AGGRO1","Taste blade, mongrel!"),
+(68,0,1,12,0,100,"SAY_GUARD_SIL_AGGRO2","Please tell me that you didn't just do what I think you just did. Please tell me that I'm not going to have to hurt you..."),
+(68,0,2,12,0,100,"SAY_GUARD_SIL_AGGRO3","As if we don't have enough problems, you go and create more!"),
+(1976,0,0,12,0,100,"SAY_GUARD_SIL_AGGRO1","Taste blade, mongrel!"),
+(1976,0,1,12,0,100,"SAY_GUARD_SIL_AGGRO2","Please tell me that you didn't just do what I think you just did. Please tell me that I'm not going to have to hurt you..."),
+(1976,0,2,12,0,100,"SAY_GUARD_SIL_AGGRO3","As if we don't have enough problems, you go and create more!"),
+(3218,0,0,12,0,100,"SAY_GUARD_SIL_AGGRO1","Taste blade, mongrel!"),
+(3218,0,1,12,0,100,"SAY_GUARD_SIL_AGGRO2","Please tell me that you didn't just do what I think you just did. Please tell me that I'm not going to have to hurt you..."),
+(3218,0,2,12,0,100,"SAY_GUARD_SIL_AGGRO3","As if we don't have enough problems, you go and create more!"),
+(3296,0,0,12,0,100,"SAY_GUARD_SIL_AGGRO1","Taste blade, mongrel!"),
+(3296,0,1,12,0,100,"SAY_GUARD_SIL_AGGRO2","Please tell me that you didn't just do what I think you just did. Please tell me that I'm not going to have to hurt you..."),
+(3296,0,2,12,0,100,"SAY_GUARD_SIL_AGGRO3","As if we don't have enough problems, you go and create more!"),
+(3502,0,0,12,0,100,"SAY_GUARD_SIL_AGGRO1","Taste blade, mongrel!"),
+(3502,0,1,12,0,100,"SAY_GUARD_SIL_AGGRO2","Please tell me that you didn't just do what I think you just did. Please tell me that I'm not going to have to hurt you..."),
+(3502,0,2,12,0,100,"SAY_GUARD_SIL_AGGRO3","As if we don't have enough problems, you go and create more!"),
+(4624,0,0,12,0,100,"SAY_GUARD_SIL_AGGRO1","Taste blade, mongrel!"),
+(4624,0,1,12,0,100,"SAY_GUARD_SIL_AGGRO2","Please tell me that you didn't just do what I think you just did. Please tell me that I'm not going to have to hurt you..."),
+(4624,0,2,12,0,100,"SAY_GUARD_SIL_AGGRO3","As if we don't have enough problems, you go and create more!"),
+(9460,0,0,12,0,100,"SAY_GUARD_SIL_AGGRO1","Taste blade, mongrel!"),
+(9460,0,1,12,0,100,"SAY_GUARD_SIL_AGGRO2","Please tell me that you didn't just do what I think you just did. Please tell me that I'm not going to have to hurt you..."),
+(9460,0,2,12,0,100,"SAY_GUARD_SIL_AGGRO3","As if we don't have enough problems, you go and create more!"),
+(11190,0,0,12,0,100,"SAY_GUARD_SIL_AGGRO1","Taste blade, mongrel!"),
+(11190,0,1,12,0,100,"SAY_GUARD_SIL_AGGRO2","Please tell me that you didn't just do what I think you just did. Please tell me that I'm not going to have to hurt you..."),
+(11190,0,2,12,0,100,"SAY_GUARD_SIL_AGGRO3","As if we don't have enough problems, you go and create more!"),
+(15184,0,0,12,0,100,"SAY_GUARD_SIL_AGGRO1","Taste blade, mongrel!"),
+(15184,0,1,12,0,100,"SAY_GUARD_SIL_AGGRO2","Please tell me that you didn't just do what I think you just did. Please tell me that I'm not going to have to hurt you..."),
+(15184,0,2,12,0,100,"SAY_GUARD_SIL_AGGRO3","As if we don't have enough problems, you go and create more!");
+
+-- cluck
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1070006 AND -1070004;
+DELETE FROM `creature_text` WHERE `entry`=620;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(620,0,0,16,0,100,"cluck EMOTE_A_HELLO","looks up at you quizzically. Maybe you should inspect it?"),
+(620,1,0,16,0,100,"cluck EMOTE_H_HELLO","looks at you unexpectadly."),
+(620,2,0,16,0,100,"cluck EMOTE_CLUCK_TEXT2","starts pecking at the feed.");
+
+-- injured_patient
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000203 AND -1000201;
+DELETE FROM `creature_text` WHERE `entry` IN (12920,12939);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(12920,0,0,12,0,100,"injured_patient SAY_DOC1","I'm saved! Thank you, doctor!"),
+(12920,0,1,12,0,100,"injured_patient SAY_DOC2","HOORAY! I AM SAVED!"),
+(12920,0,2,12,0,100,"injured_patient SAY_DOC3","Sweet, sweet embrace... take me..."),
+(12939,0,0,12,0,100,"injured_patient SAY_DOC1","I'm saved! Thank you, doctor!"),
+(12939,0,1,12,0,100,"injured_patient SAY_DOC2","HOORAY! I AM SAVED!"),
+(12939,0,2,12,0,100,"injured_patient SAY_DOC3","Sweet, sweet embrace... take me...");
+
+-- kayra
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000347 AND -1000343;
+DELETE FROM `creature_text` WHERE `entry`=17969;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17969,0,0,12,0,100,"kayra SAY_START","Is the way clear? Let's get out while we can, $N."),
+(17969,1,0,12,0,100,"kayra SAY_AMBUSH1","Looks like we won't get away so easy. Get ready!"),
+(17969,2,0,12,0,100,"kayra SAY_PROGRESS","Let's keep moving. We're not safe here!"),
+(17969,3,0,12,0,100,"kayra SAY_AMBUSH2","Look out, $N! Enemies ahead!"),
+(17969,4,0,12,0,100,"kayra SAY_END","We're almost to the refuge! Let's go.");
+
+-- ashyen and keleth
+DELETE FROM `script_texts` WHERE `entry`=-1000359;
+DELETE FROM `creature_text` WHERE `entry` IN (17900,17901);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17900,0,0,12,0,100,"ashyen and keleth GOSSIP_REWARD_BLESS","Thank you for helping me. I know my way back from here."),
+(17901,0,0,12,0,100,"ashyen and keleth GOSSIP_REWARD_BLESS","Thank you for helping me. I know my way back from here.");
+
+-- cyanigosa - fix mistake in previous commit
+DELETE FROM `creature_text` WHERE `entry`=31134;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(31134,0,0,14,13947,100,"cyanigosa SAY_AGGRO","We finish this now, champions of Kirin Tor!"),
+(31134,1,0,14,13952,100,"cyanigosa SAY_SLAY_1","I will end the Kirin Tor!"),
+(31134,1,1,14,13953,100,"cyanigosa SAY_SLAY_2","Dalaran will fall!"),
+(31134,1,2,14,13954,100,"cyanigosa SAY_SLAY_3","So ends your defiance of the Spell-Weaver!"),
+(31134,2,0,14,13955,100,"cyanigosa SAY_DEATH","Perhaps... we have... underestimated... you."),
+(31134,3,0,14,13946,100,"cyanigosa SAY_SPAWN","A valiant defense, but this city must be razed. I will fulfill Malygos's wishes myself!"),
+(31134,4,0,14,13951,100,"cyanigosa SAY_DISRUPTION","Am I interrupting?"),
+(31134,5,0,14,13948,100,"cyanigosa SAY_BREATH_ATTACK","Shiver and die!"),
+(31134,6,0,14,13949,100,"cyanigosa SAY_SPECIAL_ATTACK_1","The world has forgotten what true magic is! Let this be a reminder!"),
+(31134,6,1,14,13950,100,"cyanigosa SAY_SPECIAL_ATTACK_2","Who among you can withstand my power?");
diff --git a/sql/updates/world/2012_12_07_00_world_script_texts.sql b/sql/updates/world/2012_12_07_00_world_script_texts.sql
new file mode 100644
index 00000000000..b1362aac796
--- /dev/null
+++ b/sql/updates/world/2012_12_07_00_world_script_texts.sql
@@ -0,0 +1,2 @@
+DROP TABLE IF EXISTS `script_texts`;
+DROP TABLE IF EXISTS `custom_texts`;
diff --git a/sql/updates/world/2012_12_07_01_world_misc.sql b/sql/updates/world/2012_12_07_01_world_misc.sql
new file mode 100644
index 00000000000..aaee366bfce
--- /dev/null
+++ b/sql/updates/world/2012_12_07_01_world_misc.sql
@@ -0,0 +1,73 @@
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8054: wintergrasp Tower Cannon
+UPDATE `creature_template` SET `unit_flags`=32772 WHERE `entry`=28366;
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 7983: Priest Shadowfiend's Mana leech procs on absorb
+DELETE FROM `spell_proc_event` WHERE `entry`=28305;
+INSERT INTO `spell_proc_event` VALUES (28305,0,0,0,0,0,0,65536,0,0,0);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8276: Kings and Sanctuary
+SET @GUID = 1038;
+DELETE FROM `spell_group_stack_rules` WHERE `group_id`=@GUID;
+INSERT INTO `spell_group_stack_rules`(`group_id`,`stack_rule`) VALUES (@GUID,1);
+DELETE FROM `spell_group` WHERE `id`=@GUID;
+INSERT INTO `spell_group`(`id`,`spell_id`) VALUES
+(@GUID,25899),
+(@GUID,20911),
+(@GUID,25898);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8364: Prepping the Speech
+-- Remove event flag "1" that was preventing events to trigger from spell more than once
+UPDATE `smart_scripts` SET `event_flags`=0 WHERE `entryorguid` IN (1268,7955,6119) AND `id`=0;
+-- Remove flag that gives immunity to other NPCs, was blocking SAI and it has no point in it when has extra civilian already, if it was set to prevent killing mobs led by low levels
+UPDATE `creature_template` SET `unit_flags`=unit_flags&~512 WHERE `entry` IN (6119,7955,1268);
+-- Add conditions to target only the specific NPCs
+DELETE FROM `conditions` WHERE `SourceEntry`=74222 AND `SourceTypeOrReferenceId`=17;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(17,0,74222,0,1,31,1,3,1268,0,0,173,'','Gnomish Playback Device can target only Ozzie Togglevolt'),
+(17,0,74222,0,2,31,1,3,7955,0,0,173,'','Gnomish Playback Device can target only Milli Featherwhistle'),
+(17,0,74222,0,3,31,1,3,6119,0,0,173,'','Gnomish Playback Device can target only Tog Rustsprocket');
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8495: Sludge Beast - correct spawn point
+UPDATE creature SET position_x=1071.40, position_y=-3135.26, position_z=67.39 WHERE guid=51809;
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8504: Cycle of Rebirth
+-- Issue 7253: Cycle of Rebirth
+UPDATE quest_template SET RequestItemsText='The continuous destruction caused by war and those that seek a profit from lumber pains me deeply. To aid the cycle of rebirth and replenish the lands, I need Gaea seeds. Do you have them, $C?',OfferRewardText='Ah, $N, you have the Gaea seeds. Watch and see how the blessing of the Earthmother can cause even these small kernels of life to bloom and flourish.$b$b<Tammra begins to chant.>' WHERE id = 6301;
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8506: No Rest for the Wicked
+-- Fix typo in SAI that was blocking "No Rest for the Wicked"
+UPDATE `smart_scripts` SET `link`=0, `action_param6`=0, `target_type`=8 WHERE `entryorguid`=32347 AND `id`=0;
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8547: Fix Looting of Dr. Terrible's "Building a Better Flesh Giant"
+-- Update quest loot template so item does not require player to be on a quest for item to drop
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=100 WHERE `entry`=30409 AND `item`=42772;
+-- Conditions so item will only drop if player is on or has completed (13042) Deep in the Bowels of The Underhalls
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=1 AND `SourceGroup`=30409 AND `SourceEntry`=42772;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(1, 30409, 42772, 0, 0, 8, 13042, 0, 0, 0, '', 'Dr. Terribles "Building a Better Flesh Giant" only drops if player has completed Deep in the Bowels of The Underhalls OR'),
+(1, 30409, 42772, 0, 1, 9, 13042, 0, 0, 0, '', 'Dr. Terribles "Building a Better Flesh Giant" only drops if player has taken Deep in the Bowels of The Underhalls');
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+DELETE FROM `creature_text` WHERE `entry`IN (234,3142,5888,19255);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(234 ,0,0, 'The People of Westfall salute $N, a brave and valiant defender of freedom.',12,7,100,0,0,0,'Marshal Gryan Stoutmantle'),
+(3142,0,0, 'We will suffer no demon''s servant in our lands!',12,1,100,0,0,0,'Orgnil Soulscar'),
+(5888,0,0, 'Peace and patience be with you, $N. Remain strong always.',12,1,100,0,0,0,'Seer Ravenfeather'),
+(19255,0,0, '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,0,0,0,'Seer Ravenfeather');
+UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN (234,3142,5888,3594,14347,19255,22231);
+UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry` IN (61,3643);
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (234,3142,5888,3594,14347,19255,22231);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (3643,61) AND `source_type`=1;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (234,3142,5888,3594,14347,19255,22231) 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
+(3643 ,1,0,1,20,0,100,0, 67,0,0,0,12,2044 ,2,300000,0,0,0,7,0,0,0,0,0,0,0,'Old Footlocker - On quest The Legend of Stalvan rewarded - Summon creature'),
+(234 ,0,0,1,20,0,100,0, 166,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Marshal Gryan Stoutmantle - On quest The Defias Brotherhood rewarded - Say line'),
+(61 ,1,0,1,20,0,100,0, 231,0,0,0,12,3301 ,1,10000 ,0,0,0,7,0,0,0,0,0,0,0,'A Weathered Grave - On quest A Daughter''s Love rewarded - Summon creature'),
+(3142 ,0,0,1,20,0,100,0, 806,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Orgnil Soulscar - On quest Dark Storms rewarded - Say line'),
+(5888 ,0,0,1,20,0,100,0, 1521,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Seer Ravenfeather - On quest Call of Earth rewarded - Say line'),
+(3594 ,0,0,1,20,0,100,0, 3118,0,0,0,5,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Frahun Shadewhisper - On quest Encrypted Sigil rewarded - Emote ONESHOT_TALK(DNR)'),
+(14347,0,0,1,20,0,100,0, 7786,0,0,0,12,14435,2,180000,0,0,0,7,0,0,0,0,0,0,0,'Highlord Demitrian - On quest Thunderaan the Windseeker rewarded - Summon creature'),
+(19255,0,0,1,20,0,100,0,10289,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'General Krakork - On quest Journey to Thrallmar rewarded - Say line'),
+(22231,0,0,1,20,0,100,0,10813,0,0,0,28,38495,0,0,0,0,0,7,0,0,0,0,0,0,0,'Zezzak - On quest The Eyes of Grillok rewarded - Remove Aura');
+DELETE FROM `quest_end_scripts` WHERE `id` IN (234,3142,5888,3594,14347,19255,22231,61,3643);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/sql/updates/world/2012_12_07_02_world_tracker_pitcrawler.sql b/sql/updates/world/2012_12_07_02_world_tracker_pitcrawler.sql
new file mode 100644
index 00000000000..345a61cb7f5
--- /dev/null
+++ b/sql/updates/world/2012_12_07_02_world_tracker_pitcrawler.sql
@@ -0,0 +1,596 @@
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 4787: Quests 11984, 12255, 12259
+SET @NPC_BUDD := 26422;
+SET @NPC_FLAMEBRINGER := 27292;
+SET @NPC_FLAMEBRINGERS_CHAIN := 27297;
+SET @NPC_THANE_TORVALD := 27377;
+SET @NPC_BUDD_PET := 32663;
+SET @GUID := 43489; -- Need 2
+-- Creature Spawns
+UPDATE `creature` SET `spawndist`=0, `MovementType`=0 WHERE `id`=27377; -- Thane Torvald
+DELETE FROM `creature` WHERE `id`=@NPC_FLAMEBRINGERS_CHAIN;
+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
+(@GUID+0,@NPC_FLAMEBRINGERS_CHAIN,571,1,1,17188,0,2786.589,-2483.958,49.05502,4.171337,120,0,0,42,0,0,0,33555200,8),
+(@GUID+1,@NPC_FLAMEBRINGERS_CHAIN,571,1,1,17188,0,2802.708,-2520.483,52.75195,2.443461,120,0,0,42,0,0,0,33555200,8);
+-- Creature Templates
+UPDATE `creature_template` SET `InhabitType`=`InhabitType`|4, `spell1`=48619, `spell2`=48620, `spell3`=52812 WHERE `entry`=@NPC_FLAMEBRINGER;
+UPDATE `creature_template` SET `spell1`=47031 WHERE `entry`=@NPC_BUDD_PET;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@NPC_BUDD,@NPC_FLAMEBRINGER,@NPC_FLAMEBRINGERS_CHAIN,@NPC_BUDD_PET);
+UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=@NPC_FLAMEBRINGERS_CHAIN;
+-- Modelinfo
+UPDATE `creature_model_info` SET `combat_reach`=1.95 WHERE `modelid`=134;
+UPDATE `creature_model_info` SET `bounding_radius`=0.62, `combat_reach`=4 WHERE `modelid`=22657;
+-- SmartScripts for them
+UPDATE `smart_scripts` SET `event_param1`=9615 WHERE `entryorguid`=26423; -- Drakuru correct gossip_menu from sniff
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_BUDD,@NPC_FLAMEBRINGER,@NPC_FLAMEBRINGERS_CHAIN,@NPC_BUDD_PET) 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
+(@NPC_BUDD,0,0,1,62,0,100,0,9301,0,0,0,11,61545,0,0,0,0,0,7,0,0,0,0,0,0,0,'Budd - On gossip select - Spellcast'),
+(@NPC_BUDD,0,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Budd - On gossip select - Close gossip'),
+(@NPC_FLAMEBRINGER,0,0,1,62,0,100,0,9512,0,0,0,11,48606,0,0,0,0,0,7,0,0,0,0,0,0,0,'Flamebringer - On gossip select - Spellcast'),
+(@NPC_FLAMEBRINGER,0,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Flamebringer - On gossip select - Close gossip'),
+(@NPC_FLAMEBRINGER,0,2,3,54,0,100,0,0,0,0,0,83,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Flamebringer - On summon - Remove npcflag'),
+(@NPC_FLAMEBRINGER,0,3,4,61,0,100,0,0,0,0,0,11,48602,0,0,0,0,0,1,0,0,0,0,0,0,0,'Flamebringer - On summon - Spellcast'),
+(@NPC_FLAMEBRINGER,0,4,0,61,0,100,0,0,0,0,0,85,46598,0,0,0,0,0,1,0,0,0,0,0,0,0,'Flamebringer - On summon - Spellcast'), -- actually cast 48598 on invoker but the linked spell 48600 doesn't work maybe because of effect 1: Dummy (4207) which means this spell works in area Voldrune only and will be removed if the area is left
+(@NPC_FLAMEBRINGER,0,5,0,28,0,100,0,0,0,0,0,41,500,0,0,0,0,0,1,0,0,0,0,0,0,0,'Flamebringer - On passenger removed - Despawn'), -- not working
+(@NPC_FLAMEBRINGERS_CHAIN,0,0,0,11,0,100,0,0,0,0,0,11,48293,0,30,0,0,0,10,110538,0,0,0,0,0,0,'Flamebringer''s Chain - On update - Spellcast'),
+(@NPC_BUDD_PET,0,0,1,54,0,100,0,0,0,0,0,11,47014,0,0,0,0,0,7,0,0,0,0,0,0,0,'Budd pet - On summon - Spellcast'),
+(@NPC_BUDD_PET,0,1,2,61,0,100,0,0,0,0,0,11,47025,0,0,0,0,0,1,0,0,0,0,0,0,0,'Budd pet - On summon - Spellcast'),
+(@NPC_BUDD_PET,0,2,3,61,0,100,0,0,0,0,0,8,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Budd pet - On summon - Set react defensive'),
+(@NPC_BUDD_PET,0,3,0,61,0,100,0,0,0,0,0,29,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Budd pet - On summon - Follow'),
+(@NPC_BUDD_PET,0,4,0,60,0,100,0,5000,5000,15000,15000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Budd pet - Frequently - Say random line');
+-- Insert creature_text from sniff
+DELETE FROM `creature_text` WHERE `entry`=@NPC_BUDD_PET;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@NPC_BUDD_PET,0,0,'You sure we be goin'' da right way, mon?',12,0,10,0,0,0,'Budd'),
+(@NPC_BUDD_PET,0,1,'Nuttin'' says luvin'' like a little tap on da noggin.',12,0,10,0,0,0,'Budd'),
+(@NPC_BUDD_PET,0,2,'You be it now, brudda!',12,0,10,0,0,0,'Budd'),
+(@NPC_BUDD_PET,0,3,'Hee hee hee! Dis gunna be some fun, mon!',12,0,10,0,0,0,'Budd'),
+(@NPC_BUDD_PET,0,4,'My troll bruddas be in for some real fun today, mon!',12,0,10,0,0,0,'Budd'),
+(@NPC_BUDD_PET,0,5,'Time to play some troll tag, mon!',12,0,10,0,0,0,'Budd'),
+(@NPC_BUDD_PET,0,6,'<sniff, sniff> I can smell ''em, mon.',12,0,10,0,0,0,'Budd'),
+(@NPC_BUDD_PET,0,7,'No, no, mon. Dere be no trolls here....',12,0,10,0,0,0,'Budd'),
+(@NPC_BUDD_PET,0,8,'Ok, mon. Tell me when we be close to mah troll bruddas.',12,0,10,0,0,0,'Budd'),
+(@NPC_BUDD_PET,0,9,'Ey, mon! Take me to mah troll bruddas!',12,0,10,0,0,0, 'Budd');
+-- Conditions
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=48293;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=47042;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,1,48293,0,0,31,0,3,27292,0,0,0,'','Spell Flamebringer''s Chain targets Flamebringer'),
+(17,0,47042,0,0,31,1,3,26425,0,0,0,'','Spell Assemble Cage can only be cast on Drakkari Warrior'),
+(17,0,47042,0,1,31,1,3,26447,0,0,0,'','Spell Assemble Cage can only be cast on Drakkari Shaman');
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8577: Quests: Seeking the Windserpent Godess, Setting the Stage
+SET @GUID := 136095; -- need 83 set by TDB team
+SET @OGUID := 71445; -- need 51 set by TDB team
+SET @NPC_MATERIAL_YOU := 28473;
+SET @NPC_QUETZLUN := 28030;
+SET @NPC_SOUL_FONT_VOID_ZONE := 28719;
+SET @NPC_SOUL_FONT_BUNNY := 28724;
+SET @NPC_QUTEZLUN_WORSHIPPER := 28747;
+SET @NPC_SERPENTTOUCHED_BERSERKER := 28748;
+SET @NPC_HIGH_PRIEST_MUFUNU := 28752;
+SET @NPC_HIGH_PRIESTESS_TUATUA := 28754;
+SET @NPC_HIGH_PRIEST_HAWINNI := 28756;
+SET @SPELL_GHOSTLY := 51671;
+SET @SPELL_MATERIAL_YOU_MIRROR_IMAGE := 51719;
+SET @SPELL_QUETZLUN_JUDGMENT := 53096;
+-- Creature Spawns
+UPDATE `creature` SET `phaseMask`=3 WHERE `guid`=101830;
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID+0 AND @GUID+82;
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`MovementType`) VALUES
+(@GUID+0,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5636.122,-4146.7,351.608,3.089233,300,0,0),
+(@GUID+1,@NPC_SOUL_FONT_BUNNY,571,1,2,13069,5664.044,-4147.331,352.7899,1.553343,300,0,0),
+(@GUID+2,@NPC_SOUL_FONT_VOID_ZONE,571,1,2,0,5664.018,-4147.648,351.4565,2.548181,300,0,0),
+(@GUID+3,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5675.395,-4137.262,351.502,3.787364,300,0,0),
+(@GUID+4,@NPC_SOUL_FONT_BUNNY,571,1,2,13069,5664.217,-4085.715,353.6724,4.764749,300,0,0),
+(@GUID+5,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5635.908,-4084.476,352.2891,3.228859,300,0,0),
+(@GUID+6,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5613.329,-4115.911,353.2454,3.089233,300,0,0),
+(@GUID+7,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5674.509,-4074.528,354.1718,3.944444,300,0,0),
+(@GUID+8,@NPC_SOUL_FONT_VOID_ZONE,571,1,2,0,5664.241,-4085.23,352.2626,3.647738,300,0,0),
+(@GUID+9,@NPC_SERPENTTOUCHED_BERSERKER,571,1,2,0,5639.341,-4053.244,353.2463,2.876765,300,0,0),
+(@GUID+10,@NPC_SERPENTTOUCHED_BERSERKER,571,1,2,0,5622.78,-4115.903,353.1671,3.138673,300,0,2),
+(@GUID+11,@NPC_SOUL_FONT_VOID_ZONE,571,1,2,0,5716.746,-4227.831,362.8311,3.769911,300,0,0),
+(@GUID+12,@NPC_SOUL_FONT_BUNNY,571,1,2,13069,5716.862,-4227.003,363.9283,1.448623,300,0,0),
+(@GUID+13,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5675.243,-4215.884,362.8769,2.487047,300,10,1),
+(@GUID+14,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5672.002,-4169.415,353.3519,1.175808,300,10,1),
+(@GUID+15,@NPC_SERPENTTOUCHED_BERSERKER,571,1,2,0,5629.758,-4220.245,363.0638,0.003776325,300,0,2),
+(@GUID+16,@NPC_SOUL_FONT_VOID_ZONE,571,1,2,0,5769.077,-4148.809,352.1679,1.239184,300,0,0),
+(@GUID+17,@NPC_SOUL_FONT_BUNNY,571,1,2,13069,5769.101,-4148.125,353.5637,1.570796,300,0,0),
+(@GUID+18,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5754.831,-4147.796,352.168,6.248279,300,0,0),
+(@GUID+19,@NPC_SERPENTTOUCHED_BERSERKER,571,1,2,0,5736.187,-4221.563,362.641,3.203449,300,0,2),
+(@GUID+20,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5754.225,-4091.116,352.1982,0.3839724,300,0,0),
+(@GUID+21,@NPC_SOUL_FONT_BUNNY,571,1,2,13069,5689.841,-4294.694,375.4998,4.625123,300,0,0),
+(@GUID+22,@NPC_SOUL_FONT_VOID_ZONE,571,1,2,0,5689.859,-4293.607,374.0815,2.96706,300,0,0),
+(@GUID+23,@NPC_HIGH_PRIESTESS_TUATUA,571,1,2,0,5645.158,-4272.998,375.6752,5.8294,300,0,0),
+(@GUID+24,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5688.647,-4271.216,375.4739,1.64061,300,0,0),
+(@GUID+25,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5665.319,-4285.886,374.0784,1.797689,300,0,0),
+(@GUID+26,@NPC_SERPENTTOUCHED_BERSERKER,571,1,2,0,5606.6504,-4317.5366,373.995,6.254433,300,0,2),
+(@GUID+27,@NPC_SOUL_FONT_BUNNY,571,1,2,13069,5742.73,-4293.231,375.2595,4.625123,300,0,0),
+(@GUID+28,@NPC_SOUL_FONT_VOID_ZONE,571,1,2,0,5742.742,-4292.647,374.0793,3.630285,300,0,0),
+(@GUID+29,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5745.571,-4271.291,375.4861,1.570796,300,0,0),
+(@GUID+30,@NPC_SOUL_FONT_BUNNY,571,1,2,13069,5820.372,-4211.103,363.6525,4.660029,300,0,0),
+(@GUID+31,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5778.949,-4177.473,354.4064,5.271958,300,10,1),
+(@GUID+32,@NPC_SOUL_FONT_VOID_ZONE,571,1,2,0,5820.291,-4210.607,362.4237,3.124139,300,0,0),
+(@GUID+33,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5777.957,-4234.875,360.5455,5.426627,300,10,1),
+(@GUID+34,@NPC_SERPENTTOUCHED_BERSERKER,571,1,2,0,5812.099,-4175.637,353.3968,6.254186,300,0,2),
+(@GUID+35,@NPC_QUETZLUN,571,1,2,0,5717.112,-4364.71,385.8849,1.570796,300,0,0),
+(@GUID+36,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5650.962,-4311.059,374.12,0.1213555,300,10,1),
+(@GUID+37,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5689.269,-4377.144,385.8853,0.3490658,300,0,0),
+(@GUID+38,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5672.371,-4325.267,374.9322,4.607669,300,0,0),
+(@GUID+39,@NPC_SOUL_FONT_VOID_ZONE,571,1,2,0,5826.438,-4297.896,374.0838,5.026548,300,0,0),
+(@GUID+40,@NPC_SOUL_FONT_BUNNY,571,1,2,13069,5826.199,-4297.682,375.6247,3.211406,300,0,0),
+(@GUID+41,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5813.962,-4295.513,374.6385,6.126106,300,0,0),
+(@GUID+42,@NPC_HIGH_PRIEST_MUFUNU,571,1,2,0,5757.949,-4321.796,374.0786,1.762783,300,0,0),
+(@GUID+43,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5717.151,-4417.467,390.0197,1.553343,300,0,0),
+(@GUID+44,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5717.597,-4465.906,394.4915,4.8708,300,10,1),
+(@GUID+45,@NPC_SOUL_FONT_BUNNY,571,1,2,13069,5784.318,-4450.26,387.2599,1.58825,300,0,0),
+(@GUID+46,@NPC_SOUL_FONT_VOID_ZONE,571,1,2,0,5784.426,-4450.768,385.8849,6.073746,300,0,0),
+(@GUID+47,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5789.287,-4409.731,386.4334,1.280781,300,10,1),
+(@GUID+48,@NPC_SERPENTTOUCHED_BERSERKER,571,1,2,0,5647.668,-4377.963,386.065,3.499769,300,0,2),
+(@GUID+49,@NPC_SOUL_FONT_VOID_ZONE,571,1,2,0,5649.861,-4449.003,385.8849,3.124139,300,0,0),
+(@GUID+50,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5642.891,-4441.074,385.8849,5.462881,300,0,0),
+(@GUID+51,@NPC_SOUL_FONT_BUNNY,571,1,2,13069,5649.906,-4448.593,387.246,1.570796,300,0,0),
+(@GUID+52,@NPC_SERPENTTOUCHED_BERSERKER,571,1,2,0,5591.124,-4345.021,374.4803,1.396263,300,0,0),
+(@GUID+53,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5616.43,-4299.668,374.1321,1.832596,300,0,0),
+(@GUID+54,@NPC_SOUL_FONT_VOID_ZONE,571,1,2,0,5581.104,-4435.173,374.0819,1.553343,300,0,0),
+(@GUID+55,@NPC_SOUL_FONT_BUNNY,571,1,2,13069,5581.708,-4435.312,375.6412,6.265732,300,0,0),
+(@GUID+56,@NPC_SERPENTTOUCHED_BERSERKER,571,1,2,0,5591.341,-4395.804,374.0577,1.312582,300,0,2),
+(@GUID+57,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5595.193,-4432.799,374.0784,3.316126,300,0,0),
+(@GUID+58,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5643.719,-4486.458,385.8680,3.330791,300,10,1),
+(@GUID+59,@NPC_SOUL_FONT_BUNNY,571,1,2,13069,5613.822,-4286.389,375.3737,5.044002,300,0,0),
+(@GUID+60,@NPC_SOUL_FONT_VOID_ZONE,571,1,2,0,5613.496,-4285.685,374.0294,5.986479,300,0,0),
+(@GUID+61,@NPC_SOUL_FONT_VOID_ZONE,571,1,2,0,5616.248,-4237.393,363.7526,0.1919862,300,0,0),
+(@GUID+62,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5616.471,-4223.491,363.7719,4.694936,300,0,0),
+(@GUID+63,@NPC_SOUL_FONT_BUNNY,571,1,2,13069,5616.134,-4236.797,365.063,1.58825,300,0,0),
+(@GUID+64,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5746.81,-4376.404,386.2263,2.949606,300,0,0),
+(@GUID+65,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5819.418,-4267.652,370.2367,5.992916,300,10,1),
+(@GUID+66,@NPC_SERPENTTOUCHED_BERSERKER,571,1,2,0,5840.336,-4347.718,374.0784,1.623156,300,0,0),
+(@GUID+67,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5827.608,-4221.192,362.5218,2.216568,300,0,0),
+(@GUID+68,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5798.308,-4147.533,352.1857,6.230825,300,0,0),
+(@GUID+69,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5818.01,-4117.077,353.2626,0.01745329,300,0,0),
+(@GUID+70,@NPC_SOUL_FONT_VOID_ZONE,571,1,2,0,5769.03,-4084.954,352.1702,3.560472,300,0,0),
+(@GUID+71,@NPC_SOUL_FONT_BUNNY,571,1,2,13069,5769.066,-4085.207,353.5035,4.764749,300,0,0),
+(@GUID+72,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5798.5,-4085.708,352.4719,0.03490658,300,0,0),
+(@GUID+73,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5779.8,-4054.32,353.9052,0.0102175,300,10,1),
+(@GUID+74,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5831.308,-4381.716,374.6486,1.259763,300,10,1),
+(@GUID+75,@NPC_SOUL_FONT_BUNNY,571,1,2,13069,5848.862,-4433.827,375.502,3.159046,300,0,0),
+(@GUID+76,@NPC_SOUL_FONT_VOID_ZONE,571,1,2,0,5849.88,-4433.882,374.0784,1.466077,300,0,0),
+(@GUID+77,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5842.898,-4440.752,374.0784,0.8377581,300,0,0),
+(@GUID+78,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5795.062,-4456.038,385.8848,2.6529,300,0,0),
+(@GUID+79,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5831.405,-4489.442,376.4616,2.929957,300,10,1),
+(@GUID+80,@NPC_HIGH_PRIEST_HAWINNI,571,1,2,0,5841.862,-4383.027,374.0503,1.571773,300,0,2),
+(@GUID+81,@NPC_SERPENTTOUCHED_BERSERKER,571,1,2,0,5793.181,-4386.617,387.4278,2.263534,300,0,2),
+(@GUID+82,@NPC_QUTEZLUN_WORSHIPPER,571,1,2,0,5784.907,-4313.739,374.0784,0.9090425,300,10,1);
+-- Gameobject Spawns
+UPDATE `gameobject_template` SET `flags`=4 WHERE `entry` IN (190717,190718,190719);
+DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+50;
+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,190719,571,1,2,5597.872,-4155.729,362.6012,0.8726639,0,0,0,1,300,100,1),
+(@OGUID+1,190719,571,1,2,5632.151,-4150.096,352.3025,4.380776,0,0,0,1,300,100,1),
+(@OGUID+2,190717,571,1,2,5707.645,-4061.914,354.3174,3.001947,0,0,0,1,300,100,1),
+(@OGUID+3,190719,571,1,2,5610.382,-4115.927,353.4982,1.06465,0,0,0,1,300,100,1),
+(@OGUID+4,190717,571,1,2,5742.388,-4150.106,352.4384,1.134463,0,0,0,1,300,100,1),
+(@OGUID+5,190719,571,1,2,5726.853,-4062.069,354.3002,1.431168,0,0,0,1,300,100,1),
+(@OGUID+6,190719,571,1,2,5768.683,-4106.524,352.6742,5.148723,0,0,0,1,300,100,1),
+(@OGUID+7,190719,571,1,2,5797.803,-4286.921,378.6772,4.171338,0,0,0,1,300,100,1),
+(@OGUID+8,190718,571,1,2,5680.476,-4381.055,386.0848,4.886924,0,0,0,1,300,100,1),
+(@OGUID+9,190718,571,1,2,5676.559,-4325.772,375.9498,3.560473,0,0,0,1,300,100,1),
+(@OGUID+10,190717,571,1,2,5706.948,-4324.307,376.862,5.026549,0,0,0,1,300,100,1),
+(@OGUID+11,190719,571,1,2,5636.998,-4287.619,378.2026,5.794494,0,0,0,1,300,100,1),
+(@OGUID+12,190717,571,1,2,5755.16,-4375.944,386.6035,5.759588,0,0,0,1,300,100,1),
+(@OGUID+13,190717,571,1,2,5669.412,-4445.692,385.9232,4.66003,0,0,0,1,300,100,1),
+(@OGUID+14,190719,571,1,2,5765.822,-4451.795,386.1481,3.403396,0,0,0,1,300,100,1),
+(@OGUID+15,190719,571,1,2,5800.226,-4396.256,388.1242,5.148723,0,0,0,1,300,100,1),
+(@OGUID+16,190719,571,1,2,5598.75,-4345.661,377.5887,4.939284,0,0,0,1,300,100,1),
+(@OGUID+17,190718,571,1,2,5591.678,-4510.597,377.5719,3.717554,0,0,0,1,300,100,1),
+(@OGUID+18,190719,571,1,2,5644.191,-4501.064,387.4688,3.717554,0,0,0,1,300,100,1),
+(@OGUID+19,190717,571,1,2,5583.782,-4344.892,377.9865,4.677484,0,0,0,1,300,100,1),
+(@OGUID+20,190718,571,1,2,5850.167,-4351.829,374.0035,2.513274,0,0,0,1,300,100,1),
+(@OGUID+21,190718,571,1,2,5787.077,-4166.182,352.4897,2.652894,0,0,0,1,300,100,1),
+(@OGUID+22,190719,571,1,2,5706.358,-4183.55,353.0656,5.550147,0,0,0,1,300,100,1),
+(@OGUID+23,190717,571,1,2,5820.999,-4117.51,353.2778,2.216565,0,0,0,1,300,100,1),
+(@OGUID+24,190717,571,1,2,5725.525,-4183.616,356.4301,3.490667,0,0,0,1,300,100,1),
+(@OGUID+25,190717,571,1,2,5801.518,-4081.54,352.9559,0.4712385,0,0,0,1,300,100,1),
+(@OGUID+26,190718,571,1,2,5783.599,-4199.378,363.9255,1.361356,0,0,0,1,300,100,1),
+(@OGUID+27,190718,571,1,2,5788.463,-4028.865,364.6118,3.316144,0,0,0,1,300,100,1),
+(@OGUID+28,190718,571,1,2,5679.798,-4084.759,354.015,2.164206,0,0,0,1,300,100,1),
+(@OGUID+29,190717,571,1,2,5742.388,-4150.106,352.4384,1.134463,0,0,0,1,300,100,1),
+(@OGUID+30,190717,571,1,2,5726.853,-4062.069,354.3002,1.431168,0,0,0,1,300,100,1),
+(@OGUID+31,190719,571,1,2,5596.239,-4084.587,362.3596,1.151916,0,0,0,1,300,100,1),
+(@OGUID+32,190718,571,1,2,5631.854,-4079.604,352.2866,3.089183,0,0,0,1,300,100,1),
+(@OGUID+33,190718,571,1,2,5647.27,-4029.999,365.4366,1.570796,0,0,0,1,300,100,1),
+(@OGUID+34,190717,571,1,2,5860.241,-4433.489,375.8128,5.654869,0,0,0,1,300,100,1),
+(@OGUID+35,190718,571,1,2,5843.092,-4513.476,376.2388,1.989672,0,0,0,1,300,100,1),
+(@OGUID+36,190707,571,1,2,5664.056,-4146.634,351.3731,1.570796,0,0,0,1,300,255,1),
+(@OGUID+37,190707,571,1,2,5664.211,-4086.191,352.1793,4.747296,0,0,0,1,300,255,1),
+(@OGUID+38,190707,571,1,2,5716.826,-4226.646,362.7477,1.570796,0,0,0,1,300,255,1),
+(@OGUID+39,190707,571,1,2,5769.083,-4147.873,352.0845,1.553341,0,0,0,1,300,255,1),
+(@OGUID+40,190707,571,1,2,5689.842,-4294.94,373.995,4.677484,0,0,0,1,300,255,1),
+(@OGUID+41,190707,571,1,2,5742.686,-4293.651,373.9954,4.729844,0,0,0,1,300,255,1),
+(@OGUID+42,190707,571,1,2,5820.354,-4211.717,362.248,4.694937,0,0,0,1,300,255,1),
+(@OGUID+43,190707,571,1,2,5825.472,-4297.784,374.0092,3.194002,0,0,0,1,300,255,1),
+(@OGUID+44,190707,571,1,2,5784.287,-4449.718,385.8015,1.605702,0,0,0,1,300,255,1),
+(@OGUID+45,190707,571,1,2,5649.908,-4447.956,385.8015,1.553341,0,0,0,1,300,255,1),
+(@OGUID+46,190707,571,1,2,5582.351,-4435.273,373.9958,6.265733,0,0,0,1,300,255,1),
+(@OGUID+47,190707,571,1,2,5613.975,-4286.599,373.9606,5.375615,0,0,0,1,300,255,1),
+(@OGUID+48,190707,571,1,2,5616.112,-4236.369,363.7091,1.605702,0,0,0,1,300,255,1),
+(@OGUID+49,190707,571,1,2,5769.052,-4085.8,352.0868,4.694937,0,0,0,1,300,255,1),
+(@OGUID+50,190707,571,1,2,5848.813,-4433.848,373.995,3.141593,0,0,0,1,300,255,1);
+-- Addon data
+DELETE FROM `creature_addon` WHERE `guid` IN (@GUID+0,@GUID+3,@GUID+5,@GUID+6,@GUID+7,@GUID+10,@GUID+13,@GUID+14,@GUID+15,@GUID+18,@GUID+19,@GUID+20,@GUID+24,@GUID+25,@GUID+26,@GUID+29,@GUID+31,@GUID+33,@GUID+34,@GUID+36,@GUID+37,@GUID+38,@GUID+41,@GUID+43,@GUID+44,@GUID+47,@GUID+48,@GUID+50,@GUID+53,@GUID+56,@GUID+57,@GUID+58,@GUID+62,@GUID+64,@GUID+65,@GUID+67,@GUID+68,@GUID+69,@GUID+72,@GUID+73,@GUID+74,@GUID+77,@GUID+78,@GUID+79,@GUID+80,@GUID+81,@GUID+82);
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@GUID+0,0,0,8,1,0,''),
+(@GUID+3,0,0,0,1,431,''),
+(@GUID+5,0,0,8,1,0,''),
+(@GUID+6,0,0,8,1,0,''),
+(@GUID+7,0,0,0,1,431,''),
+(@GUID+10,(@GUID+10)*10,0,0,1,0,''),
+(@GUID+13,0,0,0,1,0,'52385'),
+(@GUID+14,0,0,0,1,0,'52385'),
+(@GUID+15,(@GUID+15)*10,0,0,1,0,''),
+(@GUID+18,0,0,0,1,431,''),
+(@GUID+19,(@GUID+19)*10,0,0,1,0,''),
+(@GUID+20,0,0,0,1,431,''),
+(@GUID+24,0,0,8,1,0,''),
+(@GUID+25,0,0,0,1,431,''),
+(@GUID+26,(@GUID+26)*10,0,0,1,0,''),
+(@GUID+29,0,0,8,1,0,''),
+(@GUID+31,0,0,0,1,0,'52385'),
+(@GUID+33,0,0,0,1,0,'52385'),
+(@GUID+34,(@GUID+34)*10,0,0,1,0,''),
+(@GUID+36,0,0,0,1,0,'52385'),
+(@GUID+37,0,0,0,1,431,''),
+(@GUID+38,0,0,8,1,0,''),
+(@GUID+41,0,0,0,1,431,''),
+(@GUID+43,0,0,0,1,431,''),
+(@GUID+44,0,0,0,1,0,'52385'),
+(@GUID+47,0,0,0,1,0,'52385'),
+(@GUID+48,(@GUID+48)*10,0,0,1,0,''),
+(@GUID+50,0,0,0,1,431,''),
+(@GUID+53,0,0,0,1,431,''),
+(@GUID+56,(@GUID+56)*10,0,0,1,0,''),
+(@GUID+57,0,0,0,1,431,''),
+(@GUID+58,0,0,0,1,0,'52385'),
+(@GUID+62,0,0,0,1,431,''),
+(@GUID+64,0,0,0,1,431,''),
+(@GUID+65,0,0,0,1,0,'52385'),
+(@GUID+67,0,0,0,1,431,''),
+(@GUID+68,0,0,8,1,0,''),
+(@GUID+69,0,0,8,1,0,''),
+(@GUID+72,0,0,8,1,0,''),
+(@GUID+73,0,0,0,1,0,'52385'),
+(@GUID+74,0,0,0,1,0,'52385'),
+(@GUID+77,0,0,0,1,431,''),
+(@GUID+78,0,0,0,1,431,''),
+(@GUID+79,0,0,0,1,0,'52385'),
+(@GUID+80,(@GUID+80)*10,0,0,1,0,''),
+(@GUID+81,(@GUID+81)*10,0,0,1,0,''),
+(@GUID+82,0,0,0,1,0,'52385');
+DELETE FROM `creature_template_addon` WHERE `entry` IN (@NPC_QUETZLUN,@NPC_SOUL_FONT_VOID_ZONE);
+INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@NPC_QUETZLUN,0,0,0,1,0,'51126 41408'),
+(@NPC_SOUL_FONT_VOID_ZONE,0,0,0,1,0,'52222');
+-- Creature_updates
+UPDATE `creature_template` SET `unit_flags`=33555200, `AIName`='SmartAI' WHERE `entry`=@NPC_MATERIAL_YOU;
+UPDATE `creature_template` SET `faction_A`=190, `faction_H`=190, `npcflag`=3, `gossip_menu_id`=9734, `unit_flags`=33536, `AIName`='SmartAI' WHERE `entry`=@NPC_QUETZLUN;
+UPDATE `creature_template` SET `minlevel`=77, `maxlevel`=77, `faction_A`=2073, `faction_H`=2073, `unit_flags`=33554432, `flags_extra`=2 WHERE `entry`=@NPC_SOUL_FONT_VOID_ZONE;
+UPDATE `creature_template` SET `minlevel`=77, `maxlevel`=77, `unit_flags`=33554432, `unit_flags2`=2080, `InhabitType`=4 WHERE `entry`=@NPC_SOUL_FONT_BUNNY;
+UPDATE `creature_template` SET `faction_A`=2069, `faction_H`=2069, `unit_flags`=32768, `equipment_id`=2482, `AIName`='SmartAI' WHERE `entry`=@NPC_QUTEZLUN_WORSHIPPER;
+UPDATE `creature_template` SET `speed_walk`=0.6666666, `faction_A`=2069, `faction_H`=2069, `unit_flags`=32768, `AIName`='SmartAI' WHERE `entry` IN (@NPC_SERPENTTOUCHED_BERSERKER,@NPC_HIGH_PRIEST_HAWINNI);
+UPDATE `creature_template` SET `faction_A`=2069, `faction_H`=2069, `unit_flags`=32768, `AIName`='SmartAI', `equipment_id`=2483 WHERE `entry`=@NPC_HIGH_PRIEST_MUFUNU;
+UPDATE `creature_template` SET `faction_A`=2069, `faction_H`=2069, `unit_flags`=32768, `AIName`='SmartAI', `equipment_id`=2484 WHERE `entry`=@NPC_HIGH_PRIESTESS_TUATUA;
+UPDATE `creature_model_info` SET `bounding_radius`=2.38, `combat_reach`=10.5 WHERE `modelid`=25634;
+UPDATE `creature_model_info` SET `bounding_radius`=0.3672, `combat_reach`=1.8, `gender`=0, `modelid_other_gender`=25661 WHERE `modelid`=25660;
+UPDATE `creature_model_info` SET `bounding_radius`=0.3672, `combat_reach`=1.8, `gender`=1, `modelid_other_gender`=25660 WHERE `modelid`=25661;
+UPDATE `creature_model_info` SET `bounding_radius`=2.625, `combat_reach`=2.625 WHERE `modelid`=25662;
+UPDATE `creature_model_info` SET `bounding_radius`=3, `combat_reach`=3 WHERE `modelid`=25663;
+UPDATE `creature_model_info` SET `bounding_radius`=0.5355, `combat_reach`=2.625 WHERE `modelid`=25666;
+UPDATE `creature_model_info` SET `bounding_radius`=4.5, `combat_reach`=4.5 WHERE `modelid`=25667;
+UPDATE `creature_model_info` SET `bounding_radius`=0.6076385, `combat_reach`=2.625 WHERE `modelid`=27858;
+-- Equipments
+DELETE FROM `creature_equip_template` WHERE `entry` IN (2482,2483,2484);
+INSERT INTO `creature_equip_template` (`entry`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES
+(2482,28678,0,0),
+(2483,13622,0,0),
+(2484,28739,0,0);
+-- Gossips
+DELETE FROM `gossip_menu` WHERE `entry`=9734;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+(9734,13331);
+-- SAI for involved creatures
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_QUETZLUN,@NPC_MATERIAL_YOU,@NPC_QUTEZLUN_WORSHIPPER,@NPC_SERPENTTOUCHED_BERSERKER,@NPC_HIGH_PRIEST_MUFUNU,@NPC_HIGH_PRIESTESS_TUATUA,@NPC_HIGH_PRIEST_HAWINNI) 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
+(@NPC_QUETZLUN,0,0,0,1,0,100,0,30000,60000,180000,300000,11,@SPELL_QUETZLUN_JUDGMENT,0,0,0,0,0,19,@NPC_QUTEZLUN_WORSHIPPER,30,0,0,0,0,0,'Quetz''lun - On update OOC - Spellcast Quetz''lun''s Judgment'),
+(@NPC_MATERIAL_YOU,0,0,1,54,0,100,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Material You - Just summoned - Say line'),
+(@NPC_MATERIAL_YOU,0,1,2,61,0,100,0,0,0,0,0,85,@SPELL_MATERIAL_YOU_MIRROR_IMAGE,0,0,0,0,0,1,0,0,0,0,0,0,0,'Material You - Just summoned - Invoker spellcast Altar of Quetz''lun: Material You''s Mirror Image Aura'),
+(@NPC_MATERIAL_YOU,0,2,3,61,0,100,0,0,0,0,0,85,41055,0,0,0,0,0,1,0,0,0,0,0,0,0,'Material You - Just summoned - Invoker spellcast Copy Weapon'),
+(@NPC_MATERIAL_YOU,0,3,0,61,0,100,0,0,0,0,0,85,45206,0,0,0,0,0,1,0,0,0,0,0,0,0,'Material You - Just summoned - Invoker spellcast Copy Off-hand Weapon'),
+(@NPC_QUTEZLUN_WORSHIPPER,0,0,0,4,0,100,0,0,0,0,0,11,54594,0,0,0,0,0,7,0,0,0,0,0,0,0,'Quetz''lun Worshipper - On aggro - Spellcast Serpent Strike'),
+(@NPC_QUTEZLUN_WORSHIPPER,0,1,0,2,0,100,0,0,50,30000,40000,11,54601,0,0,0,0,0,1,0,0,0,0,0,0,0,'Quetz''lun Worshipper - On health below 50% - Spellcast Serpent Form'),
+(@NPC_SERPENTTOUCHED_BERSERKER,0,0,0,4,0,100,0,0,0,0,0,11,54594,0,0,0,0,0,7,0,0,0,0,0,0,0,'Serpent-Touched Berserker - On aggro - Spellcast Serpent Strike'),
+(@NPC_HIGH_PRIEST_MUFUNU,0,0,2,11,0,100,0,0,0,0,0,11,51733,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priest Mu''funu - On spawn - Spellcast Shadow Channelling'),
+(@NPC_HIGH_PRIEST_MUFUNU,0,1,2,21,0,100,0,0,0,0,0,11,51733,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priest Mu''funu - On homeposition reached - Spellcast Shadow Channelling'),
+(@NPC_HIGH_PRIEST_MUFUNU,0,2,3,61,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priest Mu''funu - On homeposition reached - Disable combat movement'),
+(@NPC_HIGH_PRIEST_MUFUNU,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,'High Priest Mu''funu - On homeposition reached - Set event phase 1'),
+(@NPC_HIGH_PRIEST_MUFUNU,0,4,5,9,0,100,0,40,80,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priest Mu''funu - On target range more than 40y - Enable combat movement'),
+(@NPC_HIGH_PRIEST_MUFUNU,0,5,0,61,0,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priest Mu''funu - On target range more than 40y - Set event phase 2'),
+(@NPC_HIGH_PRIEST_MUFUNU,0,6,3,9,0,100,0,0,20,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priest Mu''funu - On target range below 20y - Disable combat movement'),
+(@NPC_HIGH_PRIEST_MUFUNU,0,7,0,0,1,100,0,0,0,2500,2500,11,20820,0,0,0,0,0,2,0,0,0,0,0,0,0,'High Priest Mu''funu - On update IC (phase 1) - Spellcast Holy Smite'),
+(@NPC_HIGH_PRIEST_MUFUNU,0,8,0,2,0,100,0,0,30,0,0,22,4,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priest Mu''funu - On health below 30% - Set event phase 4'),
+(@NPC_HIGH_PRIEST_MUFUNU,0,9,0,0,4,100,0,0,0,30000,30000,11,11974,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priest Mu''funu - On update IC (phase 4) - Spellcast Power Word: Shield'),
+(@NPC_HIGH_PRIEST_MUFUNU,0,10,0,0,4,100,0,50,50,15000,20000,11,11640,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priest Mu''funu - On update IC (phase 4) - Spellcast Renew'),
+(@NPC_HIGH_PRIESTESS_TUATUA,0,0,1,11,0,100,0,0,0,0,0,11,51733,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priestess Tua-Tua - On spawn - Spellcast Shadow Channelling'),
+(@NPC_HIGH_PRIESTESS_TUATUA,0,1,0,61,0,100,0,0,0,0,0,28,29406,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priestess Tua-Tua - On homeposition reached - Remove aura Shadowform'),
+(@NPC_HIGH_PRIESTESS_TUATUA,0,2,1,21,0,100,0,0,0,0,0,11,51733,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priestess Tua-Tua - On homeposition reached - Spellcast Shadow Channelling'),
+(@NPC_HIGH_PRIESTESS_TUATUA,0,3,0,4,0,100,0,0,0,0,0,11,29406,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priestess Tua-Tua - On aggro - Spellcast Shadowform'),
+(@NPC_HIGH_PRIESTESS_TUATUA,0,4,0,0,0,100,0,2000,3000,15000,20000,11,51818,0,0,0,0,0,2,0,0,0,0,0,0,0,'High Priestess Tua-Tua - On update IC - Spellcast Shadow Word: Death'),
+(@NPC_HIGH_PRIESTESS_TUATUA,0,5,0,0,0,100,0,4000,5000,3000,5000,11,13860,0,0,0,0,0,2,0,0,0,0,0,0,0,'High Priestess Tua-Tua - On update IC - Spellcast Mind Blast'),
+(@NPC_HIGH_PRIEST_HAWINNI,0,0,0,0,0,100,0,2000,3000,10000,15000,11,54603,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priest Hawinni - On update IC - Spellcast Serpent''s Agility'),
+(@NPC_HIGH_PRIEST_HAWINNI,0,1,2,2,0,100,1,0,40,0,0,11,50420,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priest Hawinni - On health below 40% - Spellcast Enrage'),
+(@NPC_HIGH_PRIEST_HAWINNI,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,'High Priest Hawinni - On health below 40% - Say line'),
+(@NPC_HIGH_PRIEST_HAWINNI,0,3,0,7,0,100,0,0,0,0,0,28,50420,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priest Hawinni - On evade - Remove aura Enrage');
+-- Waypoints
+DELETE FROM `waypoint_data` WHERE `id` IN ((@GUID+10)*10,(@GUID+15)*10,(@GUID+19)*10,(@GUID+26)*10,(@GUID+34)*10,(@GUID+48)*10,(@GUID+56)*10,(@GUID+80)*10,(@GUID+81)*10);
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+((@GUID+10)*10,1,5622.78,-4115.903,353.1671,0,0,0,0,100,0),
+((@GUID+10)*10,2,5700.014,-4116.477,353.2688,0,0,0,0,100,0),
+((@GUID+15)*10,1,5629.758,-4220.245,363.0638,0,0,0,0,100,0),
+((@GUID+15)*10,2,5698.905,-4220.559,362.8123,0,0,0,0,100,0),
+((@GUID+19)*10,1,5736.187,-4221.563,362.641,0,0,0,0,100,0),
+((@GUID+19)*10,2,5765.859,-4221.353,361.5846,0,0,0,0,100,0),
+((@GUID+19)*10,3,5781.38,-4231.069,359.3161,0,0,0,0,100,0),
+((@GUID+19)*10,4,5799.918,-4242.83,362.6221,0,0,0,0,100,0),
+((@GUID+19)*10,5,5817.34,-4242.409,363.7439,0,0,0,0,100,0),
+((@GUID+19)*10,6,5844.105,-4244.604,362.7979,0,0,0,0,100,0),
+((@GUID+19)*10,7,5817.34,-4242.409,363.7439,0,0,0,0,100,0),
+((@GUID+19)*10,8,5799.918,-4242.83,362.6221,0,0,0,0,100,0),
+((@GUID+19)*10,9,5781.38,-4231.069,359.3161,0,0,0,0,100,0),
+((@GUID+19)*10,10,5765.859,-4221.353,361.5846,0,0,0,0,100,0),
+((@GUID+26)*10,1,5606.6504,-4317.5366,373.995,0,0,0,0,100,0),
+((@GUID+26)*10,2,5625.5952,-4303.0625,373.995,0,0,0,0,100,0),
+((@GUID+26)*10,3,5782.809,-4302.274,374.12,0,0,0,0,100,0),
+((@GUID+26)*10,4,5802.482,-4309.014,374.0114,0,0,0,0,100,0),
+((@GUID+34)*10,1,5812.099,-4175.637,353.3968,0,0,0,0,100,0),
+((@GUID+34)*10,2,5821.506,-4165.563,353.5313,0,0,0,0,100,0),
+((@GUID+34)*10,3,5818.826,-4129.878,353.8851,0,0,0,0,100,0),
+((@GUID+34)*10,4,5810.663,-4117.67,353.2181,0,0,0,0,100,0),
+((@GUID+34)*10,5,5792.259,-4117.242,353.2197,0,0,0,0,100,0),
+((@GUID+34)*10,6,5755.833,-4119.403,353.3149,0,0,0,0,100,0),
+((@GUID+34)*10,7,5754.487,-4121.689,353.3535,0,0,0,0,100,0),
+((@GUID+34)*10,8,5747.097,-4163.901,352.5367,0,0,0,0,100,0),
+((@GUID+34)*10,9,5754.965,-4174.736,353.418,0,0,0,0,100,0),
+((@GUID+48)*10,1,5647.668,-4377.963,386.065,0,0,0,0,100,0),
+((@GUID+48)*10,2,5647.648,-4439.329,385.8019,0,0,0,0,100,0),
+((@GUID+56)*10,1,5591.341,-4395.804,374.0577,0,0,0,0,100,0),
+((@GUID+56)*10,2,5589.711,-4473.008,373.9948,0,0,0,0,100,0),
+((@GUID+80)*10,1,5841.862,-4383.027,374.0503,0,0,0,0,100,0),
+((@GUID+80)*10,2,5841.261,-4481.065,376.1894,0,0,0,0,100,0),
+((@GUID+81)*10,1,5794.948,-4488.715,387.3983,0,0,0,0,100,0),
+((@GUID+81)*10,2,5793.181,-4386.617,387.4278,0,0,0,0,100,0);
+-- Spell data
+DELETE FROM `spell_area` WHERE `spell`=@SPELL_GHOSTLY AND `area`=4325;
+INSERT INTO `spell_area` (`spell`,`area`,`quest_start`,`quest_end`,`aura_spell`,`racemask`,`gender`,`autocast`,`quest_start_status`) VALUES
+(@SPELL_GHOSTLY,4325,12667,12675,0,0,2,1,2|64);
+-- Spell Linking
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=@SPELL_GHOSTLY;
+INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
+(@SPELL_GHOSTLY,51717,1,'On Ghostly - Spellcast Altar of Quetz''lun: Summon Material You');
+-- Conditions
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (@SPELL_MATERIAL_YOU_MIRROR_IMAGE,@SPELL_QUETZLUN_JUDGMENT);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,1,@SPELL_MATERIAL_YOU_MIRROR_IMAGE,0,0,31,0,3,@NPC_MATERIAL_YOU,0,0,0,'','Spell Altar of Quetz''lun: Material You''s Mirror Image Aura targets Material You'),
+(13,2,@SPELL_MATERIAL_YOU_MIRROR_IMAGE,0,0,31,0,3,@NPC_MATERIAL_YOU,0,0,0,'','Spell Altar of Quetz''lun: Material You''s Mirror Image Aura targets Material You'),
+(13,4,@SPELL_MATERIAL_YOU_MIRROR_IMAGE,0,0,31,0,3,@NPC_MATERIAL_YOU,0,0,0,'','Spell Altar of Quetz''lun: Material You''s Mirror Image Aura targets Material You'),
+(13,1,@SPELL_QUETZLUN_JUDGMENT,0,0,31,0,3,@NPC_QUTEZLUN_WORSHIPPER,0,0,0,'','Spell Quetz''lun''s Judgment targets Quetz''lun Worshipper');
+-- Creature Texts
+DELETE FROM `creature_text` WHERE `entry` IN (@NPC_MATERIAL_YOU,@NPC_HIGH_PRIEST_HAWINNI);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@NPC_MATERIAL_YOU,0,0,'You leave your material body behind!',42,0,100,0,0,0,'Material You'),
+(@NPC_HIGH_PRIEST_HAWINNI,0,0,'%s becomes enraged!',16,0,100,0,0,0,'Hawinni');
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8515: Quest I Sense a Disturbance
+SET @GUID := 88701; -- need 34 set by TDB
+SET @GOSSIP := 9687;
+SET @QUEST := 12665;
+SET @NPC_ELM_BUNNY := 26298;
+SET @NPC_HARKOA := 28401;
+SET @NPC_CLAW_OF_HARKOA := 28402;
+SET @NPC_HARKOA_SUBDUER := 28403;
+SET @NPC_CURSED_OFFSPRING := 28404;
+SET @NPC_HARKOA_KITTEN := 28665;
+SET @NPC_QUETZLUN := 28671;
+SET @SPELL_RIDING_HARKOA_KITTEN := 25673;
+SET @SPELL_SPEED := 39870;
+SET @SPELL_SUMMON_HARKOA_KITTEN := 52187;
+SET @SPELL_STEALTH := 52188;
+-- Spawns
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID+0 AND @GUID+33;
+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
+(@GUID+0,@NPC_ELM_BUNNY,571,1,1,21999,0,5309.635,-3772.253,372.5037,5.707227,300,0,0,42,0,0,0,0,0),
+(@GUID+1,@NPC_ELM_BUNNY,571,1,1,21999,0,5333.049,-3796.974,372.489,2.356194,300,0,0,42,0,0,0,0,0),
+(@GUID+2,@NPC_ELM_BUNNY,571,1,1,21999,0,5309.46,-3772.571,372.4755,5.358161,300,0,0,42,0,0,0,0,0),
+(@GUID+3,@NPC_ELM_BUNNY,571,1,1,21999,0,5332.838,-3797.16,372.4756,2.321288,300,0,0,42,0,0,0,0,0),
+(@GUID+4,@NPC_CLAW_OF_HARKOA,571,1,1,0,0,5375.799,-3758.142,360.5291,0.7330383,300,0,0,0,0,0,0,0,0),
+(@GUID+5,@NPC_CURSED_OFFSPRING,571,1,1,0,0,5497.146,-3791.354,359.6451,3.033307,300,5,0,0,0,1,0,0,0),
+(@GUID+6,@NPC_HARKOA_SUBDUER,571,1,1,0,0,5323.46,-3813,371.9776,1.553343,300,0,0,0,0,0,0,0,0),
+(@GUID+7,@NPC_HARKOA_SUBDUER,571,1,1,0,0,5291.728,-3780.95,371.6594,6.248279,300,0,0,0,0,0,0,0,0),
+(@GUID+8,@NPC_HARKOA_SUBDUER,571,1,1,0,0,5316.537,-3755.717,371.5298,5.009095,300,0,0,0,0,0,0,0,0),
+(@GUID+9,@NPC_HARKOA_SUBDUER,571,1,1,0,0,5422.518,-3822.243,363.2307,0.01745329,300,0,0,0,0,0,0,0,0),
+(@GUID+10,@NPC_HARKOA_SUBDUER,571,1,1,0,0,5335.817,-3846.023,370.8626,3.926991,300,0,0,0,0,0,0,0,0),
+(@GUID+11,@NPC_HARKOA_SUBDUER,571,1,1,0,0,5382.776,-3799.292,372.6979,0.7853982,300,0,0,0,0,0,0,0,0),
+(@GUID+12,@NPC_HARKOA_SUBDUER,571,1,1,0,0,5347.82,-3790.36,371.4579,2.80998,300,0,0,0,0,0,0,0,0),
+(@GUID+13,@NPC_CURSED_OFFSPRING,571,1,1,0,0,5385.085,-3821.307,373.1991,4.390826,300,5,0,0,0,1,0,0,0),
+(@GUID+14,@NPC_CLAW_OF_HARKOA,571,1,1,0,0,5368.791,-3862.889,373.6328,5.51524,300,0,0,0,0,0,0,0,0),
+(@GUID+15,@NPC_CLAW_OF_HARKOA,571,1,1,0,0,5263.502,-3717.983,373.0725,2.356194,300,0,0,0,0,0,0,0,0),
+(@GUID+16,@NPC_HARKOA_SUBDUER,571,1,1,0,0,5394.254,-3702.963,362.089,0.1570796,300,0,0,0,0,0,0,0,0),
+(@GUID+17,@NPC_HARKOA_SUBDUER,571,1,1,0,0,5410.39,-3718.896,362.0468,1.518436,300,0,0,0,0,0,0,0,0),
+(@GUID+18,@NPC_CURSED_OFFSPRING,571,1,1,0,0,5395.654,-3862.894,362.4349,4.355803,300,5,0,0,0,1,0,0,0),
+(@GUID+19,@NPC_CURSED_OFFSPRING,571,1,1,0,0,5434.535,-3731.848,362.0858,2.675762,300,5,0,0,0,1,0,0,0),
+(@GUID+20,@NPC_HARKOA_SUBDUER,571,1,1,0,0,5477.654,-3878.015,361.0569,0.7679449,300,0,0,0,0,0,0,0,0),
+(@GUID+21,@NPC_CLAW_OF_HARKOA,571,1,1,0,0,5553.428,-3829.976,372.5273,5.654867,300,0,0,0,0,0,0,0,0),
+(@GUID+22,@NPC_CLAW_OF_HARKOA,571,1,1,0,0,5585.777,-3799.415,366.2234,6.143559,300,0,0,0,0,0,0,0,0),
+(@GUID+23,@NPC_CLAW_OF_HARKOA,571,1,1,0,0,5537.25,-3846.529,372.089,5.375614,300,0,0,0,0,0,0,0,0),
+(@GUID+24,@NPC_CURSED_OFFSPRING,571,1,1,0,0,5510.545,-3926.729,362.0851,5.462688,300,5,0,0,0,1,0,0,0),
+(@GUID+25,@NPC_HARKOA_SUBDUER,571,1,1,0,0,5322.316,-3572.04,363.3229,4.834562,300,0,0,0,0,0,0,0,0),
+(@GUID+26,@NPC_CLAW_OF_HARKOA,571,1,1,0,0,5367.774,-3541.64,364.2363,0.7853982,300,0,0,0,0,0,0,0,0),
+(@GUID+27,@NPC_CLAW_OF_HARKOA,571,1,1,0,0,5459.911,-3643.151,362.3447,0.9424778,300,0,0,0,0,0,0,0,0),
+(@GUID+28,@NPC_CLAW_OF_HARKOA,571,1,1,0,0,5323.396,-3644.5,362.0438,5.707227,300,0,0,0,0,0,0,0,0),
+(@GUID+29,@NPC_HARKOA_SUBDUER,571,1,1,0,0,5330.009,-3913.493,365.8797,4.694936,300,0,0,0,0,0,0,0,0),
+(@GUID+30,@NPC_HARKOA_SUBDUER,571,1,1,0,0,5434.8,-3919.141,361.1612,3.944444,300,0,0,0,0,0,0,0,0),
+(@GUID+31,@NPC_CLAW_OF_HARKOA,571,1,1,0,0,5407.908,-3925.006,362.0776,4.746883,300,5,0,0,0,1,0,0,0),
+(@GUID+32,@NPC_CURSED_OFFSPRING,571,1,1,0,0,5347.841,-3946.389,362.553,0.7498215,300,5,0,0,0,1,0,0,0),
+(@GUID+33,@NPC_HARKOA_SUBDUER,571,1,1,0,0,5277.245,-3619.667,363.3282,6.213372,300,0,0,0,0,0,0,0,0);
+-- some corrections to previous spawns
+UPDATE `creature` SET `position_x`=5349.371, `position_y`=-3615.906, `position_z`=363.8878, `orientation`=5.462881 WHERE `guid`=118735;
+UPDATE `creature` SET `spawndist`=5, `movementType`=1 WHERE `guid` IN (118714,118722,118729,118731,118732,118733);
+UPDATE `gameobject_template` SET `flags`=4 WHERE `entry`=190633;
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP, `AIName`='SmartAI' WHERE `entry`=28401;
+UPDATE `creature_template` SET `speed_run`=2.571429, `unit_flags`=33288, `AIName`='SmartAI' WHERE `entry`=28665;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@NPC_HARKOA_SUBDUER;
+DELETE FROM `creature_template_addon` WHERE `entry`=@NPC_CLAW_OF_HARKOA;
+INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@NPC_CLAW_OF_HARKOA,0,0,0,1,0,'54608');
+DELETE FROM `creature_addon` WHERE `guid` IN (@GUID+0,@GUID+1,@GUID+2,@GUID+3,118591);
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@GUID+0,0,0,0,1,0,'52485 51666'),
+(@GUID+1,0,0,0,1,0,'52485 51666'),
+(@GUID+2,0,0,0,1,0,'52485 51666'),
+(@GUID+3,0,0,0,1,0,'52485 51666'),
+(118591,0,0,0,1,0,'52485 51666');
+-- SAI info
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@NPC_HARKOA_SUBDUER;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_HARKOA_SUBDUER,-(@GUID+0),-(@GUID+1),-(@GUID+2),-(@GUID+3)) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_HARKOA_SUBDUER*100 AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@NPC_HARKOA_SUBDUER,0,0,0,11,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa Subduer - On spawn - Disable combatmovement'),
+(@NPC_HARKOA_SUBDUER,0,1,0,1,0,100,0,2000,20000,40000,60000,80,@NPC_HARKOA_SUBDUER*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa Subduer - On update OOC - Run script'),
+(@NPC_HARKOA_SUBDUER,0,2,0,4,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa Subduer - On aggro - Set eventphase 1'),
+(@NPC_HARKOA_SUBDUER,0,3,0,0,1,100,0,0,0,2800,3500,11,20822,0,0,0,0,0,2,0,0,0,0,0,0,0,'Har''koa Subduer - On update IC (phase 1) - Spellcast Frostbolt'),
+(@NPC_HARKOA_SUBDUER,0,4,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa Subduer - On range more than 35y (phase 1) - Enable combatmovement'),
+(@NPC_HARKOA_SUBDUER,0,6,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa Subduer - On range less than 15y (phase 1) - Disable combatmovement'),
+(@NPC_HARKOA_SUBDUER,0,7,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa Subduer - On range less than 5y (phase 1) - Enable combatmovement'),
+(@NPC_HARKOA_SUBDUER,0,8,9,3,1,100,0,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa Subduer - On mana below 15% (phase 1) - Set eventphase 2'),
+(@NPC_HARKOA_SUBDUER,0,9,0,61,0,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa Subduer - On mana below 15% - Enable combatmovement'),
+(@NPC_HARKOA_SUBDUER,0,10,0,3,2,100,0,30,100,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa Subduer - On mana over 30% (phase 2) - Set eventphase 1'),
+(@NPC_HARKOA_SUBDUER,0,11,12,2,0,100,0,0,15,0,0,22,4,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa Subduer - On health below 15% - Set eventphase 3'),
+(@NPC_HARKOA_SUBDUER,0,12,13,61,0,100,0,0,0,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa Subduer - On health below 15% - Enable combat movement'),
+(@NPC_HARKOA_SUBDUER,0,13,0,61,0,100,1,0,0,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa Subduer - On health below 15% - Flee'),
+(@NPC_HARKOA_SUBDUER,0,14,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa Subduer - On evade - Reset event phase'),
+(@NPC_HARKOA_SUBDUER,0,15,0,21,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa Subduer - On homeposition reached - Disable combatmovement'),
+(-(@GUID+0),0,0,0,11,0,100,0,0,0,0,0,11,51579,0,0,0,0,0,11,28401,10,0,0,0,0,0,'ELM General Purpose Bunny - On spawn - Spellcast Har''koa''s Chains'),
+(-(@GUID+1),0,0,0,11,0,100,0,0,0,0,0,11,51577,0,0,0,0,0,11,28401,10,0,0,0,0,0,'ELM General Purpose Bunny - On spawn - Spellcast Har''koa''s Chains'),
+(-(@GUID+2),0,0,0,11,0,100,0,0,0,0,0,11,45808,0,0,0,0,0,11,28401,10,0,0,0,0,0,'ELM General Purpose Bunny - On spawn - Spellcast Har''koa''s Chains'),
+(-(@GUID+3),0,0,0,11,0,100,0,0,0,0,0,11,45808,0,0,0,0,0,11,28401,10,0,0,0,0,0,'ELM General Purpose Bunny - On spawn - Spellcast Har''koa''s Chains'),
+(@NPC_HARKOA_SUBDUER*100,9,0,0,0,0,100,0,0,0,0,0,11,45846,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa Subduer script - Spellcast Frost Channelling'),
+(@NPC_HARKOA_SUBDUER*100,9,1,0,0,0,100,0,10000,20000,0,0,92,0,45846,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa Subduer script - Set unit_field_bytes1 (kneel)'),
+(@NPC_HARKOA_SUBDUER*100,9,2,0,0,0,100,0,0,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa Subduer script - Set unit_field_bytes1 (kneel)');
+-- Gossip info
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+(@GOSSIP,13139);
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=@GOSSIP AND `id`=0;
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES
+(@GOSSIP,0,0,'Great and powerful Har''koa, please call for one of your children that it might stealthily carry me into the Altar of Quetz''lun.',1,1,0,0,0,0,NULL);
+-- Conditions
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (45808,51577,51579);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,1,45808,0,0,31,0,3,28401,0,0,0,'','Spell Har''koa''s Chains targets Har''koa'),
+(13,1,51577,0,0,31,0,3,28401,0,0,0,'','Spell Har''koa''s Chains targets Har''koa'),
+(13,1,51579,0,0,31,0,3,28401,0,0,0,'','Spell Har''koa''s Chains targets Har''koa'),
+(15,@GOSSIP,0,0,0,9,0,@QUEST,0,0,0,0,'','Show gossip option if player has taken quest 12655');
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_HARKOA,@NPC_HARKOA_KITTEN) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_HARKOA_KITTEN*100 AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+-- Har'koa script
+(@NPC_HARKOA,0,0,1,62,0,100,0,@GOSSIP,0,0,0,11,@SPELL_SUMMON_HARKOA_KITTEN,0,0,0,0,0,7,0,0,0,0,0,0,0,'Har''koa - On gossip option select - force player to summon Har''koa''s Kitten'),
+(@NPC_HARKOA,0,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Har''koa - On gossip option select - close gossip'),
+-- Har'koa's Kitten script
+(@NPC_HARKOA_KITTEN,0,0,1,54,0,100,0,0,0,0,0,75,@SPELL_STEALTH,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa''s Kitten - On spawn - Apply Stealth'),
+(@NPC_HARKOA_KITTEN,0,1,0,61,0,100,0,0,0,0,0,53,1,@NPC_HARKOA_KITTEN,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa''s Kitten - On spawn - Start WP movement'),
+(@NPC_HARKOA_KITTEN,0,2,0,40,0,100,0,1,@NPC_HARKOA_KITTEN,0,0,1,0,0,0,0,0,0,23,0,0,0,0,0,0,0,'Har''koa''s Kitten - On WP 1 reached - Say line'),
+(@NPC_HARKOA_KITTEN,0,3,4,40,0,100,0,10,@NPC_HARKOA_KITTEN,0,0,54,1000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa''s Kitten - On WP 10 reached - Pause WP movement'),
+(@NPC_HARKOA_KITTEN,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,'Har''koa''s Kitten - On waypoint 10 reached - Say line'),
+(@NPC_HARKOA_KITTEN,0,5,6,40,0,100,0,18,@NPC_HARKOA_KITTEN,0,0,54,1000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa''s Kitten - On WP 18 reached - Pause WP movement'),
+(@NPC_HARKOA_KITTEN,0,6,7,61,0,100,0,0,0,0,0,59,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa''s Kitten - On WP 18 reached - Disable run'),
+(@NPC_HARKOA_KITTEN,0,7,0,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa''s Kitten - On WP 18 reached - Say line'),
+(@NPC_HARKOA_KITTEN,0,9,0,40,0,100,0,21,@NPC_HARKOA_KITTEN,0,0,84,0,0,0,0,0,0,19,@NPC_QUETZLUN,0,0,0,0,0,0,'Har''koa''s Kitten - On WP 21 reached - Set data 0 1 for Prophet of Quetz''lun'),
+(@NPC_HARKOA_KITTEN,0,10,11,40,0,100,0,22,@NPC_HARKOA_KITTEN,0,0,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa''s Kitten - On WP 22 reached - Enable run'),
+(@NPC_HARKOA_KITTEN,0,11,0,61,0,100,0,0,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa''s Kitten - On WP 22 reached - Say line'),
+(@NPC_HARKOA_KITTEN,0,12,0,40,0,100,0,31,@NPC_HARKOA_KITTEN,0,0,11,@SPELL_SPEED,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa''s Kitten - On WP 31 reached - Spellcast Speed Burst'),
+(@NPC_HARKOA_KITTEN,0,13,14,40,0,100,0,34,@NPC_HARKOA_KITTEN,0,0,28,@SPELL_SPEED,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa''s Kitten - On WP 34 reached - Remove aura Speed Burst'),
+(@NPC_HARKOA_KITTEN,0,14,15,61,0,100,0,0,0,0,0,97,30,10,0,0,0,0,8,0,0,0,5651.193,-3790.460,361.974,0,'Har''koa''s Kitten - On WP 34 reached - Jump'),
+(@NPC_HARKOA_KITTEN,0,15,0,61,0,100,0,0,0,0,0,80,@NPC_HARKOA_KITTEN*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa''s Kitten - On WP 34 reached - Run script'),
+(@NPC_HARKOA_KITTEN,0,16,17,40,0,100,0,11,@NPC_HARKOA_KITTEN*10,0,0,1,5,0,0,0,0,0,23,0,0,0,0,0,0,0,'Har''koa''s Kitten - On WP 11 reached - Say line'),
+(@NPC_HARKOA_KITTEN,0,17,18,61,0,100,0,0,0,0,0,28,@SPELL_RIDING_HARKOA_KITTEN,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa''s Kitten - On WP 10 reached - Remove aura Riding Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,0,18,0,61,0,100,0,0,0,0,0,41,500,0,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa''s Kitten - On WP 10 reached - Despawn'),
+(@NPC_HARKOA_KITTEN*100,9,0,0,0,0,100,0,2000,2000,0,0,1,4,0,0,0,0,0,23,0,0,0,0,0,0,0,'Har''koa''s Kitten script - Say line'),
+(@NPC_HARKOA_KITTEN*100,9,1,0,0,0,100,0,500,500,0,0,53,1,@NPC_HARKOA_KITTEN*10,0,0,0,0,1,0,0,0,0,0,0,0,'Har''koa''s Kitten script - Start WP movement');
+-- Waypoints
+DELETE FROM `waypoints` WHERE `entry` IN (@NPC_HARKOA_KITTEN,@NPC_HARKOA_KITTEN*10);
+INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
+(@NPC_HARKOA_KITTEN, 1,5343.219,-3763.973,373.093,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN, 2,5365.389,-3750.708,360.531,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN, 3,5386.707,-3755.923,360.458,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN, 4,5421.301,-3779.266,361.966,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN, 5,5464.585,-3784.811,362.422,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN, 6,5472.514,-3787.657,359.862,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN, 7,5523.643,-3823.486,360.533,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN, 8,5539.182,-3838.393,372.141,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN, 9,5714.259,-3895.436,371.987,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,10,5714.515,-3944.740,371.987,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,11,5715.673,-4019.310,372.152,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,12,5716.523,-4054.907,353.671,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,13,5716.630,-4188.195,354.075,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,14,5716.644,-4205.305,362.825,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,15,5724.548,-4238.222,362.746,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,16,5724.905,-4258.611,374.355,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,17,5720.831,-4331.177,374.023,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,18,5722.675,-4351.540,385.496,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,19,5728.693,-4374.917,386.492,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,20,5717.937,-4385.863,386.191,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,21,5705.368,-4379.375,385.803,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,22,5705.883,-4371.388,385.803,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,23,5714.739,-4352.132,385.560,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,24,5720.831,-4331.177,374.023,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,25,5724.905,-4258.611,374.355,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,26,5724.548,-4238.222,362.746,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,27,5716.644,-4205.305,362.825,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,28,5716.630,-4188.195,354.075,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,29,5716.523,-4054.907,353.671,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,30,5715.673,-4019.310,372.152,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,31,5714.515,-3944.740,371.987,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,32,5714.259,-3895.436,371.987,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,33,5709.297,-3844.293,372.012,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,34,5672.465,-3815.550,373.647,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN*10, 1,5605.440,-3790.634,362.713,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN*10, 2,5579.467,-3789.876,365.829,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN*10, 3,5552.734,-3794.191,362.082,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN*10, 4,5535.410,-3792.923,362.071,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN*10, 5,5472.514,-3787.657,359.862,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN*10, 6,5464.585,-3784.811,362.422,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN*10, 7,5421.301,-3779.266,361.966,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN*10, 8,5386.707,-3755.923,360.458,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN*10, 9,5365.389,-3750.708,360.531,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN*10,10,5344.119,-3764.440,373.096,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN*10,11,5331.768,-3774.679,371.341,'Har''koa''s Kitten');
+-- Areatrigger info
+DELETE FROM `areatrigger_involvedrelation` WHERE `quest`=@QUEST;
+INSERT INTO `areatrigger_involvedrelation` (`id`,`quest`) VALUES
+(5052,@QUEST);
+-- Spell Data
+DELETE FROM `spell_area` WHERE `spell`=52485 AND `area`=4322;
+INSERT INTO `spell_area` (`spell`,`area`,`quest_start`,`quest_end`,`aura_spell`,`racemask`,`gender`,`autocast`) VALUES
+(52485,4322,0,12685,0,0,2,1);
+-- Creature Texts
+DELETE FROM `creature_text` WHERE `entry` IN (@NPC_HARKOA_KITTEN,@NPC_QUETZLUN);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@NPC_HARKOA_KITTEN,0,0,'Thank you for saving me, $N. This is the least that I could do to return the favor. Hold on tight. Here we go.',15,0,100,0,0,0,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,1,0,'This doesn''t look good. Whatever you do, don''t fall off. There''s a ton of nasty things in there!',15,0,100,0,0,0,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,2,0,'Oh no... Quetz''lun is dead! Stay still. We''ll sneak past the prophet.',15,0,100,0,0,0,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,3,0,'We''re spotted! Hang on. We have to get out of here!',15,0,100,0,0,0,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,4,0,'I think we''re safe now. Let''s get back!',15,0,100,0,0,0,'Har''koa''s Kitten'),
+(@NPC_HARKOA_KITTEN,5,0,'We made it! Take care, $N, and thanks again!',15,0,100,0,0,0,'Har''koa''s Kitten'),
+(@NPC_QUETZLUN,0,0,'What was that? I sense an intruder. Find and kill them!',14,0,100,0,0,0,'Quetz''lun');
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/sql/updates/world/2012_12_07_03_world_tracker_trista.sql b/sql/updates/world/2012_12_07_03_world_tracker_trista.sql
new file mode 100644
index 00000000000..b717f4e53e8
--- /dev/null
+++ b/sql/updates/world/2012_12_07_03_world_tracker_trista.sql
@@ -0,0 +1,218 @@
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 1550: Membership Benefits 9884/9885/9886/9887
+-- Add special flags for monthly quests
+UPDATE `quest_template` SET `SpecialFlags`=16 WHERE `Id` IN (9884,9885,9886,9887);
+-- Add missing creature_quesrelation and involvedrealation that were blocking the next quests
+DELETE FROM `creature_questrelation` WHERE `quest`=9884;
+INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES
+(18265,9884);
+DELETE FROM `creature_involvedrelation` WHERE `quest`=9884;
+INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES
+(18265,9884);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 1944: Fix quest Canyon Chase ID: 12145
+-- Checked db and stuff from sniff, as lubomir8 said it had 2 times same credit required, following the alliance version, the fix is this:
+UPDATE `quest_template` SET `RequiredNpcOrGo2`=0, `RequiredNpcOrGoCount2`=0 WHERE `Id`=12145;
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 5971: Revenge for the Vargul
+-- Closes: #4341 and #2201
+-- Revenge for the Vargul (13059) quest fix by Trista
+-- Thanks to Pitcrawler for helping with some sniffs and suggestions
+-- Updated by nelegalno and w1sht0l1v3
+SET @Thane_Illskar := 30475;
+SET @Volgur := 30483;
+SET @Brita := 30484;
+SET @ObjectiveCredit := 61779; -- spell, note there are 2 credits
+SET @Arbiter := 30501; -- Val"kyr Arbiter
+SET @TheDamned := 30523; -- Thane Illskar the Damned
+SET @Script := 30475000;
+SET @Script1 := 30475001;
+SET @Script2 := 30501000;
+SET @Summon := 55064; -- this get displayed correctly each time after an active core use it once /first time he start above ground and do all, all rest emerge from groun - core issue with loading addon data/.
+SET @Judge := 55063; -- Arbiter - Judge the fallen vrykul, ascending them to Ymirjar or reducing them to vargul.
+SET @Challenge := 36851;
+SET @Teleport := 34427;
+SET @Sword := 192558;
+-- Increase "TEMP Thane Illskar be present and that he and his champions not be engaged in battle" GOs radius from 10 to 30
+UPDATE `gameobject_template` SET `data1`=30 WHERE `entry` = 300235;
+-- SAI Thane Illskar
+UPDATE `creature_template` SET `unit_flags`=`unit_flags`|4,`AIName`= 'SmartAI' WHERE `entry`=@Thane_Illskar;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Thane_Illskar;
+DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid` IN (@Script,@Script1);
+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
+(@Thane_Illskar,0,0,1,8,0,100,0,@Challenge,0,0,0,85,@ObjectiveCredit,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Thane - On spell hit by Sword Challenge - Invoker spell cast on self objectivecomplete credit'),
+(@Thane_Illskar,0,1,0,61,0,100,0,0,0,0,0,80,@Script,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Thane - Linked with event 0 - Start script 00'),
+(@Thane_Illskar,0,2,0,38,0,100,0,0,1,0,0,80,@Script1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Thane - On data set 0 1 - Start script 01'),
+-- Script 00
+(@Script,9,0,0,0,0,100,0,500,500,0,0,1,0,2000,0,0,0,0,21,60,0,0,0,0,0,0, 'Action 0 - Say text 0'),
+(@Script,9,1,0,0,0,100,0,1500,1500,0,0,45,0,1,0,0,0,0,9,@Volgur,0,70,0,0,0,0, 'Action 1 - Set data 0 1 to Volgur to trigger his SAI'),
+-- Script 01
+(@Script1,9,0,0,0,0,100,0,500,500,0,0,1,1,2000,0,0,0,0,21,60,0,0,0,0,0,0, 'Action 0 - Say text 1'),
+(@Script1,9,1,0,0,0,100,0,1500,1500,0,0,45,0,1,0,0,0,0,9,@Brita,0,70,0,0,0,0, 'Action 1 - Set data 0 1 to Brita to trigger her SAI'),
+-- Continues normal events
+(@Thane_Illskar,0,3,4,38,0,100,0,0,2,0,0,12,@Arbiter,2,180000,0,0,0,8,0,0,0,7851.866699,3399.678955,670.993225,3.665521, 'Thane - On Set data 0 2 - Summon Arbiter Val"kyr in air'),
+(@Thane_Illskar,0,4,5,61,0,100,0,0,2,0,0,1,2,2000,0,0,0,0,21,50,0,0,0,0,0,0, 'Thane - Linked with event 3 - Say text 2'),
+(@Thane_Illskar,0,5,6,61,0,100,0,0,0,0,0,1,3,2000,0,0,0,0,21,50,0,0,0,0,0,0, 'Thane - Linked with event 4 - Say text 3'),
+(@Thane_Illskar,0,6,7,61,0,100,0,0,0,0,0,19,258,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Thane - Linked with event 5 - Remove unattackable flag'),
+(@Thane_Illskar,0,7,0,61,0,100,0,0,0,0,0,49,0,0,0,0,0,0,21,30,0,0,0,0,0,0, 'Thane - Linked with event 6 - Attack player'),
+(@Thane_Illskar,0,8,0,0,0,100,0,2000,6000,8500,15800,11,51779,0,0,0,0,0,2,0,0,0,0,0,0,0,'Thane - IC - Cast spell Frostfire Bolt'),
+(@Thane_Illskar,0,9,0,0,0,100,0,2100,8100,2000,9000,11,19816,0,0,0,0,0,0,0,0,0,0,0,0,0,'Thane - IC - Cast spell Fire Ball'),
+(@Thane_Illskar,0,10,0,0,0,100,0,4200,10200,1000,10200,11,17145,0,0,0,0,0,2,0,0,0,0,0,0,0,'Thane - IC - Blast Wave'),
+(@Thane_Illskar,0,11,0,0,0,100,0,4300,10000,13000,16000,11,20754,0,0,0,0,0,2,0,0,0,0,0,0,0,'Thane - IC - Rain of Fire'),
+(@Thane_Illskar,0,12,0,6,0,100,0,0,0,0,0,45,0,1,0,0,0,0,9,@Arbiter,0,70,0,0,0,0, 'Thane - On death - Data set 0 1 on Val"kyr Arbiter'),
+(@Thane_Illskar,0,13,14,38,0,100,0,0,3,0,0,11,@Summon,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Thane - Action 0 - Cast Summon'),
+(@Thane_Illskar,0,14,0,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Thane - Linked with event 13 - Set unseen'),
+(@Thane_Illskar,0,15,0,25,0,100,0,0,0,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Thane - Data set 0 0');
+-- SAI for Volgur
+UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@Volgur;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Volgur;
+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
+(@Volgur,0,0,1,38,0,100,0,0,1,0,0,19,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Volgur - On data set 0 1 - Remove flag immune to players'),
+(@Volgur,0,1,0,61,0,100,0,0,0,0,0,49,0,0,0,0,0,0,21,50,0,0,0,0,0,0, 'Volgur - Linked with event 0 - Attack player'),
+(@Volgur,0,2,0,0,0,100,0,5000,5000,30000,31000,11,23262,0,0,0,0,0,2,0,0,0,0,0,0,0,'Volgur - IC - Cast spell Demoralize'),
+(@Volgur,0,3,0,0,0,100,0,3000,3000,11000,12800,11,43410,0,0,0,0,0,2,0,0,0,0,0,0,0,'Volgur - IC - Cast spell Chop'),
+(@Volgur,0,4,0,9,0,100,0,6,30,15000,20000,11,49758,0,0,0,0,0,2,0,0,0,0,0,0,0,'Volgur - On target in range more than 6 yards - Cast spell Charge'),
+(@Volgur,0,5,0,0,0,100,0,8000,8000,15000,18000,11,49807,0,0,0,0,0,2,0,0,0,0,0,0,0,'Volgur - IC - Cast spell Whirlwind'),
+(@Volgur,0,6,0,6,0,100,0,0,0,0,0,45,0,1,0,0,0,0,9,@Thane_Illskar,0,80,0,0,0,0, 'Volgur - On death - Dataset 0 1 on Thane'),
+(@Volgur,0,7,0,25,0,100,0,0,0,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Volgur - On Reset - Data set 0 0');
+-- SAI for Brita
+UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@Brita;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Brita;
+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
+(@Brita,0,0,1,38,0,100,0,0,1,0,0,19,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Brita - On data set 0 1 - Remove flag immune to players'),
+(@Brita,0,1,0,61,0,100,0,0,0,0,0,49,0,0,0,0,0,0,21,50,0,0,0,0,0,0, 'Brita - Linked with event 0 - Attack player'),
+(@Brita,0,2,0,0,0,100,0,19500,19600,60000,60000,11,43414,0,0,0,0,0,2,0,0,0,0,0,0,0,'Brita - IC - Cast spell Frost trap'),
+(@Brita,0,3,0,0,0,100,0,2100,6100,5000,10000,11,44286,0,0,0,0,0,2,0,0,0,0,0,0,0,'Brita - IC - Cast spell Wing Clip'),
+(@Brita,0,4,0,0,0,100,0,20000,21000,20000,21000,11,60932,0,0,0,0,0,2,0,0,0,0,0,0,0,'Brita - Linked with event 2 - Cast spell Disengage /Leaps backwards/'),
+(@Brita,0,5,6,0,0,100,0,2500,3000,2000,2250,11,60954,1,0,0,0,0,2,0,0,0,0,0,0,0,'Brita - IC - Cast spell Aimed Shot /only out of melee range/'),
+(@Brita,0,6,0,61,0,100,0,0,0,0,0,11,49712,0,0,0,0,0,2,0,0,0,0,0,0,0,'Brita - Linked with event 5 - Cast spell Shoot /only out of melee range/'),
+(@Brita,0,7,0,6,0,100,0,0,0,0,0,45,0,2,0,0,0,0,9,@Thane_Illskar,0,80,0,0,0,0, 'Brita - On death - Dataset 0 2 on Thane'),
+(@Brita,0,8,0,25,0,100,0,0,0,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Brita - On reset - Data set 0 0');
+-- SAI for Arbiter
+DELETE FROM `creature_template_addon` WHERE `entry`=@Arbiter;
+INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`)
+VALUES (@Arbiter, 0, 0, 33554432, 1, 0, NULL);
+UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@Arbiter;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Arbiter;
+DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script2;
+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
+(@Arbiter,0,0,0,54,0,100,0,0,0,0,0,11,@Teleport,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arbiter - On spawn - Cast Ethereal Teleport on self'),
+(@Arbiter,0,1,0,38,0,100,0,0,1,0,0,80,@Script2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arbiter - On Data set 0 1 - Follow Thane Illskar'),
+-- Start script 00 (Script2)
+(@Script2,9,0,0,0,0,100,0,0,0,0,0,69,1,0,0,0,0,0,0,0,0,0,7835.128906,3389.118408,655.098083,3.915739, 'Action 0 - Move to pos (near Illskar body)'),
+(@Script2,9,1,0,0,0,100,0,2250,2250,0,0,1,0,1000,0,0,0,0,1,0,0,0,0,0,0,0, 'Action 1 - Say text 0'),
+(@Script2,9,2,0,0,0,100,0,2250,2250,0,0,1,1,2000,0,0,0,0,1,0,0,0,0,0,0,0, 'Action 2 - Say text 1'),
+(@Script2,9,3,0,0,0,100,0,0,0,0,0,11,@Judge,0,0,0,0,0,10,121005,@Thane_Illskar,0,0,0,0,0, 'Action 3 - Cast spell Arbiter Judgment /visual stuff/'),
+(@Script2,9,4,0,0,0,100,0,5000,5000,0,0,45,0,3,0,0,0,0,10,121005,@Thane_Illskar,0,0,0,0,0, 'Action 4 - Data set 0 3 on Thane'),
+(@Script2,9,5,0,0,0,100,0,0,0,0,0,69,1,0,0,0,0,0,0,0,0,0,7851.866699,3399.678955,670.993225,3.665521, 'Action 5 - Move to pos /starting one/'),
+(@Script2,9,6,0,0,0,100,0,4000,4000,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Action 6 - Data set 0 0'),
+(@Script2,9,7,0,0,0,100,0,0,0,0,0,78,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Action 7 - Reset'),
+(@Script2,9,8,0,0,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Action 8 - Set unseen'),
+(@Script2,9,9,0,0,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Action 9 - Despawn');
+-- SAI for Thane Illskar the Damned and creature_template_addon data
+DELETE FROM `creature_template_addon` WHERE `entry`=@TheDamned;
+INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES
+(@TheDamned, 0, 0, 9, 1, 0, NULL);
+UPDATE `creature_template` SET `unit_flags`=33024,`faction_A`=1885,`faction_H`=1885,`AIName`= 'SmartAI' WHERE `entry`=@TheDamned;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@TheDamned;
+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
+(@TheDamned,0,0,1,54,0,100,0,0,0,0,0,91,9,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Thane Illskar the Damned - On summon - Remove field byte that makes creature submurged under ground (to create emerge on surface effect)'),
+(@TheDamned,0,1,2,61,0,100,0,0,0,0,0,1,0,1000,0,0,0,0,1,0,0,0,0,0,0,0, 'Thane Illskar the Damned - Linked with event 1 - Say text 0'),
+(@TheDamned,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,0.9, 'Thane Illskar the Damned - Linked with event 2 - Set orientation to look towards Arbiter'),
+(@TheDamned,0,3,0,61,0,100,0,0,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Thane Illskar the Damned - Linked with event 3 - Set unit field bytes for creature kneel state');
+-- Add conditions for Judge
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@Judge;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,1,@Judge,0,0,31,0,3,@Thane_Illskar,0,0,0,'','Judge can target only Illskar');
+-- Add conditions for Challenge - player can only cast it, if no sword is already on ground /per 3 minutes/
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=@Challenge;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(17,0,@Challenge,0,0,30,0,@Sword,30,0,1,0,'','Challenge can be used only, if no aura present from it');
+-- Texts
+DELETE FROM `creature_text` WHERE `entry` IN (@Thane_Illskar,@Arbiter,@TheDamned);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@Thane_Illskar,0,0,'Bethod''s Sword?!! Very well, $r, I accept your challenge. But first, you must best my champions. Volgur! Squash this insect!',14,0,100,15,2000,0,'Thane'),
+(@Thane_Illskar,1,0,'Brita, create a pincushion of this puny $c!',14,0,100,22,2000,0,'Thane'),
+(@Thane_Illskar,2,0,'You may have defeated my champions, $c. I am something else entirely.',14,0,100,66,2000,0,'Thane'),
+(@Thane_Illskar,3,0,'Pray to your gods for a quick death.',14,0,100,53,2000,0,'Thane'),
+(@Arbiter,0,0,'Thane Illskar, you were challenged to honorable combat and failed.',14,0,100,0,2000,0,'Arbiter'),
+(@Arbiter,1,0,'You have been found wanting and are judged accordingly. Now rise, Thane Illskar the Damned!',14,0,100,0,2000,0,'Arbiter'),
+(@TheDamned,0,0,'NOOOOOOOOOOOOOOOOOO!',14,0,100,15,2000,0,'Illskar the Damned');
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 5928: Quests 10305, 10306, 10307 and 10182
+-- Closes these issues: #3797 #1965 #1966 #1968 #1967
+-- Implement [Q]{A/H} Abjurist Belmara ID: 10305 & [Q]{A/H} Conjurer Luminrath ID: 10306 &
+-- [Q]{A/H} Cohlien Frostweaver: 10307 & [Q]{A/H} Battle-Mage Dathric: 10182
+-- NPCs
+SET @Belmara := 19546; -- The required npc to be summoned to thank the player, give credit and despawn
+SET @Luminrath := 19580; -- The required npc to be summoned to thank the player, give credit and despawn /with cape/
+SET @LCapeless := 19544; -- /without cape/
+SET @Dathric := 19543; -- The required npc to be summoned to thank the player, give credit and despawn /with hat version/
+SET @Frostweaver := 19579; -- The required npc to be summoned to thank the player, give credit and despawn /with hat version/
+SET @FHatless := 19545; -- /without hat/
+-- Involved spells and credits
+SET @Book := 34140; -- The required spell that triggers the event below to summon the npc to give credit
+SET @BelmaraCredit := 19547;
+SET @Mantle := 34142; -- The required spell that triggers the event below to summon the npc to give credit
+SET @LuminrathCredit := 19548;
+SET @Hat := 34144; -- The required spell that triggers the event below to summon the npc to give credit
+SET @FrostweaverCredit := 19550;
+SET @Weapon := 34141; -- The required spell that triggers the event below to summon the npc to give credit
+SET @DathricCredit := 19549;
+-- Removes the required spell since it doesn't exist in dbc, it's some random made error most likely,
+-- on top of that spells values were copied from quest template entry (huh?, anyway this field is deprecated)...
+UPDATE `quest_template` SET `RequiredSpellCast1`=0 WHERE `Id` IN (10305,10306,10307);
+UPDATE `quest_template` SET `RequiredSpellCast2`=0 WHERE `Id`=10182;
+-- Add SAI and db updates for related npcs
+UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN (@Belmara,@Luminrath,@LCapeless,@Dathric,@Frostweaver,@FHatless);
+UPDATE `creature_template` SET `maxlevel`=68,`minlevel`=68,`unit_class`=2 WHERE `entry`= @Luminrath;
+UPDATE `creature_template` SET `maxlevel`=68,`minlevel`=68,`unit_class`=2 WHERE `entry`= @Frostweaver;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (@Belmara,@Luminrath,@LCapeless,@Dathric,@Frostweaver,@FHatless);
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (@Belmara,@Luminrath,@LCapeless,@Dathric,@Frostweaver,@FHatless);
+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
+(@Belmara,0,0,1,54,0,100,0,0,0,0,0,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ajdurist Belmara - On creature summoned - Switch faction to friendly'),
+(@Belmara,0,1,2,61,0,100,0,0,0,0,0,1,0,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Ajdurist Belmara - Linked with event 0 - Say text 0'),
+(@Belmara,0,2,0,61,0,100,0,0,0,0,0,33,@BelmaraCredit,0,0,0,0,0,23,0,0,0,0,0,0,0,'Ajdurist Belmara - Linked with event 1 - Call killcredit to player'),
+(@Belmara,0,3,0,4,0,100,0,0,0,0,0,11,12544,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ajdurist Belmara - On aggro - Cast to self Frost armor'),
+(@Belmara,0,4,0,0,0,100,0,2000,5000,12000,22000,11,17740,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ajdurist Belmara - IC - Cast to self Mana shield'),
+(@Belmara,0,5,0,0,0,100,0,0,6000,2500,8000,11,34447,0,0,0,0,0,2,0,0,0,0,0,0,0,'Ajdurist Belmara - IC - Cast Arcane missles'),
+(@Belmara,0,6,0,25,0,100,0,0,0,0,0,28,12544,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ajdurist Belmara - On reset - Remove aura from Frost Armor'),
+-- Luminrath /with cape/
+(@Luminrath,0,0,0,54,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Conjurer Luminrath - On creature summoned - Say text 0'),
+(@Luminrath,0,1,2,61,0,100,0,0,0,0,0,1,1,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Conjurer Luminrath - Linked with event 0 - Say text 1'),
+(@Luminrath,0,2,0,61,0,100,0,0,0,0,0,33,@LuminrathCredit,0,0,0,0,0,21,20,0,0,0,0,0,0,'Conjurer Luminrath - Linked with event 1 - Call credit to player'),
+-- Luminrath /without cape/
+(@LCapeless,0,0,0,0,0,100,0,0,2500,1000,7500,11,9532,0,0,0,0,0,2,0,0,0,0,0,0,0,'Conjurer Luminrath - IC - Cast Lightening bolt'),
+(@LCapeless,0,1,0,0,0,100,0,0,5000,15000,30000,11,36110,0,0,0,0,0,2,0,0,0,0,0,0,0,'Conjurer Luminrath - IC - Cast Summon Dancing Swords'),
+(@LCapeless,0,2,0,0,0,100,0,0,10000,5000,15000,11,36109,0,0,0,0,0,1,0,0,0,0,0,0,0,'Conjurer Luminrath - IC - Cast Blink'),
+-- Frostweaver /without hat/
+(@FHatless,0,0,0,0,0,100,0,0,1000,25000,30000,11,33245,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cohlien Frostweaver - IC - Cast Ice Barrier on self'),
+(@FHatless,0,1,0,0,0,100,0,0,10000,2500,9500,11,11831,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cohlien Frostweaver - IC - Cast Frost Nova'),
+(@FHatless,0,2,0,0,0,100,0,0,2500,2500,11000,11,9672,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cohlien Frostweaver - IC - Cast Frostbolt'),
+-- Frostweaver /with hat/
+(@Frostweaver,0,0,1,54,0,100,0,0,0,0,0,1,0,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Cohlien Frostweaver - On creature summoned - Say text 0'),
+(@Frostweaver,0,1,0,61,0,100,0,0,0,0,0,33,@FrostweaverCredit,0,0,0,0,0,21,20,0,0,0,0,0,0,'Cohlien Frostweaver - Linked with event 0 - Call credit to player'),
+-- Dathric
+(@Dathric,0,0,1,54,0,100,0,0,0,0,0,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dathric - On creature summoned - Switch faction to friendly'),
+(@Dathric,0,1,2,61,0,100,0,0,0,0,0,1,0,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Dathric - Linked with event 0 - Say text 0'),
+(@Dathric,0,2,0,61,0,100,0,0,0,0,0,33,@DathricCredit,0,0,0,0,0,21,20,0,0,0,0,0,0,'Dathric - Linked with event 1 - Call credit to player'),
+(@Dathric,0,3,0,0,0,100,0,0,3000,3000,8000,11,36104,0,0,0,0,0,2,0,0,0,0,0,0,0,'Dathric - IC - Cast Torrent of Flames'),
+(@Dathric,0,4,0,0,0,100,0,0,2500,8500,12000,11,17273,0,0,0,0,0,2,0,0,0,0,0,0,0,'Dathric - IC - Cast Pyroblast');
+-- NPCs texts
+DELETE FROM `creature_text` WHERE `entry` IN (@Dathric,@Frostweaver,@Luminrath,@Belmara);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@Dathric,0,0,'I don''t know what I was thinking, going out without my sword. I would''ve put it on if I''d seen it here...',12,0,100,1,0,0,'Dathric gratitude'),
+-- Frostweaver's text
+(@Frostweaver,0,0,'Phew! There''s my lucky hat. I''ve been looking for it everywhere.',12,0,100,1,0,0,'Frostweaver gratitude'),
+-- Luminrath's text
+(@Luminrath,0,0,'I can''t possibly go out without my cloak. I hope it''s in here...',12,0,100,1,0,0,'Luminrath gratitude'),
+(@Luminrath,1,0,'There it is! I could''ve sworn it wasn''t here last time I checked...',12,0,100,1,0,0,'Luminrath gratitude'),
+-- Belmara's text
+(@Belmara,0,0,'I can''t sleep without a good bedtime story. Now I''m certain to rest well.',12,0,100,1,0,0,'Belmara gratitude');
+-- Gives support for send_event scripts in quest related spells
+DELETE FROM `event_scripts` WHERE `id` IN (12607,12608,12609,12610);
+INSERT INTO `event_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`x`,`y`,`z`,`o`) VALUES
+(12607,0,10,@Belmara,25000,2242.230957,2389.818115,112.811760,2.941585),
+(12608,0,10,@Dathric,25000,2228.003662,2314.015869,89.643219,4.822619),
+(12609,0,10,@Luminrath,25000,2192.744873,2340.836182,90.353905,4.682819),
+(12610,0,10,@Frostweaver,25000,2203.629883,2413.392090,109.257515,3.961037);
diff --git a/sql/updates/world/2012_12_07_04_world_misc.sql b/sql/updates/world/2012_12_07_04_world_misc.sql
new file mode 100644
index 00000000000..fb4c466d91c
--- /dev/null
+++ b/sql/updates/world/2012_12_07_04_world_misc.sql
@@ -0,0 +1,5 @@
+DELETE FROM `creature_ai_scripts` WHERE `creature_id` =19255;
+
+UPDATE `conditions` SET `ErrorType`=173,`ErrorTextId`=0 WHERE `SourceTypeOrReferenceId` =17 AND `SourceEntry`=74222;
+
+UPDATE `quest_template` SET `SpecialFlags`=`SpecialFlags` |0x1 WHERE `Id` IN (9884,9885,9886,9887);
diff --git a/sql/updates/world/2012_12_07_05_world_creature_text.sql b/sql/updates/world/2012_12_07_05_world_creature_text.sql
new file mode 100644
index 00000000000..8e3e2cd737f
--- /dev/null
+++ b/sql/updates/world/2012_12_07_05_world_creature_text.sql
@@ -0,0 +1,22 @@
+DELETE FROM `creature_text` WHERE `entry` IN (12428,12423,12430,12427,12429);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Deathguard Kel
+(12428, 0, 0, 'Thank you! Thank you, $GPriest:Priestess;. Now I can take on those gnolls with your power to back me!', 12, 1, 100, 1, 0, 0, 'Deathguard Kel - SAY_THANKS'),
+(12428, 1, 0, 'Farewell to you, and may shadow always protect you!', 12, 1, 100, 3, 0, 0, 'Deathguard Kel - SAY_GOODBYE'),
+(12428, 2, 0, 'Ah, $GPriest:Priestess; you came along just in time. I appreciate it.', 12, 0, 100, 2, 0, 0, 'Deathguard Kel - SAY_HEALED'),
+-- Guard Robert
+(12423, 0, 0, 'Thank you! Thank you, $GPriest:Priestess;. Now I can take on those murlocs with the Light on my side!', 12, 7, 100, 1, 0, 0, 'Guard Roberts - SAY_THANKS'),
+(12423, 1, 0, 'Farewell to you, and may the Light be with you always.', 12, 7, 100, 3, 0, 0, 'Guard Roberts - SAY_GOODBYE'),
+(12423, 2, 0, 'Ah, $GPriest:Priestess; you came along just in time. I appreciate it.', 12, 0, 100, 2, 0, 0, 'Guard Robert - SAY_HEALED'),
+-- Grunt Kor'ja
+(12430, 0, 0, 'Thank you! Thank you, $GPriest:Priestess;. Now I can take on those humans with your power to back me!', 12, 7, 100, 0, 0, 0, 'Grunt Kor''ja - SAY_THANKS'),
+(12430, 1, 0, 'Farewell to you, and may our ancestors be with you always!', 12, 1, 100, 3, 0, 0, 'Grunt Kor''ja - SAY_GOODBYE'),
+(12430, 2, 0, 'Ah, $GPriest:Priestess; you came along just in time. I appreciate it.', 12, 0, 100, 2, 0, 0, 'Grunt Kor''ja - SAY_HEALED'),
+-- Mountaineer Dol
+(12427, 0, 0, 'Thank you! Thank you, $GPriest:Priestess;. Now I can take on those wendigo with the Light on my side!', 12, 7, 100, 1, 0, 0, 'Mountaineer Dolf - SAY_THANKS'),
+(12427, 1, 0, 'Farewell to you, and may the Light be with you always.', 12, 7, 100, 3, 0, 0, 'Mountaineer Dolf - SAY_GOODBYE'),
+(12427, 2, 0, 'Ah, $GPriest:Priestess; you came along just in time. I appreciate it.', 12, 0, 100, 2, 0, 0, 'Mountaineer Dol - SAY_HEALED'),
+-- Sentinel Shaya
+(12429, 0, 0, 'Thank you! Thank you, $GPriest:Priestess;. Now I can take on those corrupt timberlings with Elune''s power behind me!', 12, 2, 100, 1, 0, 0, 'Sentinel Shaya - SAY_THANKS'),
+(12429, 1, 0, 'Farewell to you, and may Elune be with you always.', 12, 2, 100, 3, 0, 0, 'Sentinel Shaya - SAY_GOODBYE'),
+(12429, 2, 0, 'Ah, $GPriest:Priestess; you came along just in time. I appreciate it.', 12, 0, 100, 2, 0, 0, 'Sentinel Shaya - SAY_HEALED');
diff --git a/sql/updates/world/2012_12_07_06_world_sai.sql b/sql/updates/world/2012_12_07_06_world_sai.sql
new file mode 100644
index 00000000000..d0d1be35766
--- /dev/null
+++ b/sql/updates/world/2012_12_07_06_world_sai.sql
@@ -0,0 +1,35 @@
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- After 5 seconds a cleansed version of the plant appears
+DELETE FROM `quest_end_scripts` WHERE `id` IN (996,998,1514,2523,2878,3363,4113,4114,4115,4116,4117,4118,4119,4221,4222,4343,4401,4403,4443,4444,4445,4446,4447,4448,4461,4462,4464,4465,4466,4467);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (164887,173327,174599,164886,171939,171942,174594,174595,174600,174596,164888,174597,164885,174601,174602,174603,174598,174604,173284,174605,174606,174607,174684,173324,174686,174608,174712,174713,174708,174709) AND `source_type`=1;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(164887,1,0,1,20,0,100,0,996 ,0,0,0,70,5000,0,0,0,0,0,14,48878,0,0,0,0,0,0, 'On Quest "Corrupted Windblossom" Complete - After 5 seconds - Summon Cleansed Windblossom'),
+(173327,1,0,1,20,0,100,0,998 ,0,0,0,70,5000,0,0,0,0,0,14,48879,0,0,0,0,0,0, 'On Quest "Corrupted Windblossom" Complete - After 5 seconds - Summon Cleansed Windblossom'),
+(174599,1,0,1,20,0,100,0,1514,0,0,0,70,5000,0,0,0,0,0,14,48880,0,0,0,0,0,0, 'On Quest "Corrupted Windblossom" Complete - After 5 seconds - Summon Cleansed Windblossom'),
+(164886,1,0,1,20,0,100,0,2523,0,0,0,70,5000,0,0,0,0,0,14,48876,0,0,0,0,0,0, 'On Quest "Corrupted Songflower" Complete - After 5 seconds - Summon Cleansed Songflower'),
+(171939,1,0,1,20,0,100,0,2878,0,0,0,70,5000,0,0,0,0,0,14,48877,0,0,0,0,0,0, 'On Quest "Corrupted Songflower" Complete - After 5 seconds - Summon Cleansed Songflower'),
+(171942,1,0,1,20,0,100,0,3363,0,0,0,70,5000,0,0,0,0,0,14,48892,0,0,0,0,0,0, 'On Quest "Corrupted Songflower" Complete - After 5 seconds - Summon Cleansed Songflower'),
+(174594,1,0,1,20,0,100,0,4113,0,0,0,70,5000,0,0,0,0,0,14,48893,0,0,0,0,0,0, 'On Quest "Corrupted Songflower" Complete - After 5 seconds - Summon Cleansed Songflower'),
+(174595,1,0,1,20,0,100,0,4114,0,0,0,70,5000,0,0,0,0,0,14,48894,0,0,0,0,0,0, 'On Quest "Corrupted Songflower" Complete - After 5 seconds - Summon Cleansed Songflower'),
+(174600,1,0,1,20,0,100,0,4115,0,0,0,70,5000,0,0,0,0,0,14,48887,0,0,0,0,0,0, 'On Quest "Corrupted Windblossom" Complete - After 5 seconds - Summon Cleansed Windblossom'),
+(174596,1,0,1,20,0,100,0,4116,0,0,0,70,5000,0,0,0,0,0,14,48895,0,0,0,0,0,0, 'On Quest "Corrupted Songflower" Complete - After 5 seconds - Summon Cleansed Songflower'),
+(164888,1,0,1,20,0,100,0,4117,0,0,0,70,5000,0,0,0,0,0,14,48881,0,0,0,0,0,0, 'On Quest "Corrupted Whipper Root" Complete - After 5 seconds - Summon Cleansed Whipper Root'),
+(174597,1,0,1,20,0,100,0,4118,0,0,0,70,5000,0,0,0,0,0,14,18207,0,0,0,0,0,0, 'On Quest "Corrupted Songflower" Complete - After 5 seconds - Summon Cleansed Songflower'),
+(164885,1,0,1,20,0,100,0,4119,0,0,0,70,5000,0,0,0,0,0,14,17641,0,0,0,0,0,0, 'On Quest "Corrupted Night Dragon" Complete - After 5 seconds - Summon Cleansed Night Dragon'),
+(174601,1,0,1,20,0,100,0,4221,0,0,0,70,5000,0,0,0,0,0,14,48888,0,0,0,0,0,0, 'On Quest "Corrupted Windblossom" Complete - After 5 seconds - Summon Cleansed Windblossom'),
+(174602,1,0,1,20,0,100,0,4222,0,0,0,70,5000,0,0,0,0,0,14,48889,0,0,0,0,0,0, 'On Quest "Corrupted Windblossom" Complete - After 5 seconds - Summon Cleansed Windblossom'),
+(174603,1,0,1,20,0,100,0,4343,0,0,0,70,5000,0,0,0,0,0,14,48890,0,0,0,0,0,0, 'On Quest "Corrupted Windblossom" Complete - After 5 seconds - Summon Cleansed Windblossom'),
+(174598,1,0,1,20,0,100,0,4401,0,0,0,70,5000,0,0,0,0,0,14,48896,0,0,0,0,0,0, 'On Quest "Corrupted Songflower" Complete - After 5 seconds - Summon Cleansed Songflower'),
+(174604,1,0,1,20,0,100,0,4403,0,0,0,70,5000,0,0,0,0,0,14,48891,0,0,0,0,0,0, 'On Quest "Corrupted Windblossom" Complete - After 5 seconds - Summon Cleansed Windblossom'),
+(173284,1,0,1,20,0,100,0,4443,0,0,0,70,5000,0,0,0,0,0,14,44882,0,0,0,0,0,0, 'On Quest "Corrupted Whipper Root" Complete - After 5 seconds - Summon Cozy Fire'),
+(174605,1,0,1,20,0,100,0,4444,0,0,0,70,5000,0,0,0,0,0,14,48883,0,0,0,0,0,0, 'On Quest "Corrupted Whipper Root" Complete - After 5 seconds - Summon Cleansed Whipper Root'),
+(174606,1,0,1,20,0,100,0,4445,0,0,0,70,5000,0,0,0,0,0,14,48884,0,0,0,0,0,0, 'On Quest "Corrupted Whipper Root" Complete - After 5 seconds - Summon Cleansed Whipper Root'),
+(174607,1,0,1,20,0,100,0,4446,0,0,0,70,5000,0,0,0,0,0,14,48885,0,0,0,0,0,0, 'On Quest "Corrupted Whipper Root" Complete - After 5 seconds - Summon Cleansed Whipper Root'),
+(174684,1,0,1,20,0,100,0,4447,0,0,0,70,5000,0,0,0,0,0,14,48873,0,0,0,0,0,0, 'On Quest "Corrupted Night Dragon" Complete - After 5 seconds - Summon Cleansed Night Dragon'),
+(173324,1,0,1,20,0,100,0,4448,0,0,0,70,5000,0,0,0,0,0,14,48874,0,0,0,0,0,0, 'On Quest "Corrupted Night Dragon" Complete - After 5 seconds - Summon Cleansed Night Dragon'),
+(174686,1,0,1,20,0,100,0,4461,0,0,0,70,5000,0,0,0,0,0,14,48886,0,0,0,0,0,0, 'On Quest "Corrupted Whipper Root" Complete - After 5 seconds - Summon Cleansed Whipper Root'),
+(174608,1,0,1,20,0,100,0,4462,0,0,0,70,5000,0,0,0,0,0,14,48875,0,0,0,0,0,0, 'On Quest "Corrupted Night Dragon" Complete - After 5 seconds - Summon Cleansed Night Dragon'),
+(174712,1,0,1,20,0,100,0,4464,0,0,0,70,5000,0,0,0,0,0,14,48898,0,0,0,0,0,0, 'On Quest "Corrupted Songflower" Complete - After 5 seconds - Summon Cleansed Songflower'),
+(174713,1,0,1,20,0,100,0,4465,0,0,0,70,5000,0,0,0,0,0,14,48900,0,0,0,0,0,0, 'On Quest "Corrupted Songflower" Complete - After 5 seconds - Summon Cleansed Songflower'),
+(174708,1,0,1,20,0,100,0,4466,0,0,0,70,5000,0,0,0,0,0,14,48897,0,0,0,0,0,0, 'On Quest "Corrupted Windblossom" Complete - After 5 seconds - Summon Cleansed Windblossom'),
+(174709,1,0,1,20,0,100,0,4467,0,0,0,70,5000,0,0,0,0,0,14,48899,0,0,0,0,0,0, 'On Quest "Corrupted Windblossom" Complete - After 5 seconds - Summon Cleansed Windblossom');
diff --git a/sql/updates/world/2012_12_07_07_world_sai.sql b/sql/updates/world/2012_12_07_07_world_sai.sql
new file mode 100644
index 00000000000..d9acb9c310c
--- /dev/null
+++ b/sql/updates/world/2012_12_07_07_world_sai.sql
@@ -0,0 +1,36 @@
+-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+DELETE FROM `quest_end_scripts` WHERE `id`=13082;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=30562;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=30562 AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(30562,0,0,0,20,1,100,0,13082,0,0,0,11,57786,0,0,0,0,0,7,0,0,0,0,0,0,0,'Crusader Bridenbrad - On Quest Complete - Cast Spell on action Invoker'),
+(30562,0,1,0,20,1,100,0,13082,0,0,0,11,57782,0,0,0,0,0,7,0,0,0,0,0,0,0,'Crusader Bridenbrad - On Quest Complete - Cast Spell on action Invoker'),
+(30562,0,2,0,20,1,100,0,13082,0,0,0,11,57746,0,0,0,0,0,7,0,0,0,0,0,0,0,'Crusader Bridenbrad - On Quest Complete - Cast Spell on action Invoker'),
+(30562,0,3,0,20,1,100,0,13082,0,0,0,11,57747,0,0,0,0,0,7,0,0,0,0,0,0,0,'Crusader Bridenbrad - On Quest Complete - Cast Spell on action Invoker'),
+(30562,0,4,0,20,1,100,0,13082,0,0,0,11,57773,0,0,0,0,0,7,0,0,0,0,0,0,0,'Crusader Bridenbrad - On Quest Complete - Cast Spell on action Invoker');
+-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+DELETE FROM `quest_end_scripts` WHERE `id`=10919;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=20206;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=20206 AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(20206,0,0,0,20,1,100,0,13082,0,0,0,53,0,20206,0,0,0,0,1,0,0,0,0,0,0,0,'Fei Fei - On Quest Complete - Start Waypointing');
+DELETE FROM `waypoints` WHERE `entry`=20206;
+INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
+(20206,1,-697.934,2612.59,89.4752,'Fei Fei Treats Quest_End'),
+(20206,2,-688.665,2580.78,86.9841,'Fei Fei Treats Quest_End'),
+(20206,3,-689.199,2588.81,87.4460,'Fei Fei Treats Quest_End'),
+(20206,4,-667.044,2611.74,85.7029,'Fei Fei Treats Quest_End'),
+(20206,5,-649.407,2636.82,86.1539,'Fei Fei Treats Quest_End'),
+(20206,6,-659.047,2651.34,87.0480,'Fei Fei Treats Quest_End'),
+(20206,7,-656.048,2652.06,86.5892,'Fei Fei Treats Quest_End'),
+(20206,8,-656.055,2674.20,88.1354,'Fei Fei Treats Quest_End'),
+(20206,9,-691.042,2652.45,92.1508,'Fei Fei Treats Quest_End'),
+(20206,10,-688.807,2701.25,94.8354,'Fei Fei Treats Quest_End'),
+(20206,11,-667.514,2716.08,94.4471,'Fei Fei Treats Quest_End'),
+(20206,12,-688.593,2723.67,94.4145,'Fei Fei Treats Quest_End'),
+(20206,13,-687.635,2743.10,93.9095,'Fei Fei Treats Quest_End'),
+(20206,14,-697.062,2748.04,93.9380,'Fei Fei Treats Quest_End'),
+(20206,15,-687.635,2743.10,93.9095,'Fei Fei Treats Quest_End'),
+(20206,16,-685.121,2689.01,93.8042,'Fei Fei Treats Quest_End'),
+(20206,17,-688.862,2627.19,89.8591,'Fei Fei Treats Quest_End'),
+(20206,18,-685.494,2626.74,89.2711,'Fei Fei Treats Quest_End');
diff --git a/sql/updates/world/2012_12_07_08_world_misc.sql b/sql/updates/world/2012_12_07_08_world_misc.sql
new file mode 100644
index 00000000000..a696ba401cc
--- /dev/null
+++ b/sql/updates/world/2012_12_07_08_world_misc.sql
@@ -0,0 +1,7 @@
+-- from 2012_12_07_01_world_misc.sql
+UPDATE `quest_template` SET `CompleteScript`=0 WHERE `Id` IN (67,166,231,806,1521,3118,7786,10289,10813);
+DELETE FROM `quest_end_scripts` WHERE `id` IN (67,166,231,806,1521,3118,7786,10289,10813);
+-- from 2012_12_07_06_world_sai.sql
+UPDATE `quest_template` SET `CompleteScript`=0 WHERE `Id` IN (996,998,1514,2523,2878,3363,4113,4114,4115,4116,4117,4118,4119,4221,4222,4343,4401,4403,4443,4444,4445,4446,4447,4448,4461,4462,4464,4465,4466,4467);
+-- from 2012_12_07_07_world_sai.sql
+UPDATE `quest_template` SET `CompleteScript`=0 WHERE `Id` IN (13082,10919);
diff --git a/sql/updates/world/2012_12_07_09_world_db_script_string.sql b/sql/updates/world/2012_12_07_09_world_db_script_string.sql
new file mode 100644
index 00000000000..4880b84dff0
--- /dev/null
+++ b/sql/updates/world/2012_12_07_09_world_db_script_string.sql
@@ -0,0 +1,2 @@
+-- Remove texts that are no longer used
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000028,2000000055,2000000065,2000000066);
diff --git a/sql/updates/world/2012_12_08_00_world_creature_text.sql b/sql/updates/world/2012_12_08_00_world_creature_text.sql
new file mode 100644
index 00000000000..5a5cd579e2b
--- /dev/null
+++ b/sql/updates/world/2012_12_08_00_world_creature_text.sql
@@ -0,0 +1,12 @@
+DELETE FROM `creature_text` WHERE `entry`=27656;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+(27656, 0, 0, 'Simpletons! You cannot comprehend the forces you have set in motion. The ley line conduit will not be disrupted! Your defeat shall be absolute!', 14, 0, 100, 0, 0, 13622, 'Ley-Guardian Eregos - SAY_SPAWN'),
+(27656, 1, 0, 'You brash interlopers are out of your element! I will ground you!', 14, 0, 100, 0, 0, 13623, 'Ley-Guardian Eregos - SAY_AGGRO'),
+(27656, 2, 0, 'Such insolence... such arrogance... must be PUNISHED!', 14, 0, 100, 0, 0, 13624, 'Ley-Guardian Eregos - SAY_ENRAGE'),
+(27656, 3, 0, 'It''s a long way down...', 14, 0, 100, 0, 0, 13628, 'Ley-Guardian Eregos - SAY_KILL'),
+(27656, 3, 1, 'Back to the earth with you!', 14, 0, 100, 0, 0, 13629, 'Ley-Guardian Eregos - SAY_KILL'),
+(27656, 3, 2, 'Enjoy the fall!', 14, 0, 100, 0, 0, 13630, 'Ley-Guardian Eregos - SAY_KILL'),
+(27656, 4, 0, 'Savor this small victory, foolish little creatures. You and your dragon allies have won this battle, but we will win... the Nexus War.', 14, 0, 100, 0, 0, 13631, 'Ley-Guardian Eregos - SAY_DEATH'),
+(27656, 5, 0, 'We command the arcane! It shall not be used against us.', 14, 0, 100, 0, 0, 13626, 'Ley-Guardian Eregos - SAY_SHIELD'),
+(27656, 5, 1, 'It is trivial to extinguish your fire!', 14, 0, 100, 0, 0, 13627, 'Ley-Guardian Eregos - SAY_SHIELD'),
+(27656, 5, 2, 'No magic of nature will help you now!', 14, 0, 100, 0, 0, 13625, 'Ley-Guardian Eregos - SAY_SHIELD');
diff --git a/sql/updates/world/2012_12_08_01_world_sai.sql b/sql/updates/world/2012_12_08_01_world_sai.sql
new file mode 100644
index 00000000000..2880b01d07a
--- /dev/null
+++ b/sql/updates/world/2012_12_08_01_world_sai.sql
@@ -0,0 +1,56 @@
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Move Texts to correct table
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000090,2000000091,2000000092,2000000097,2000000098,2000000099,2000000100,2000000090,2000000091,2000000092,2000000095,2000000096);
+DELETE FROM `creature_text` WHERE `entry` IN (1443,3054,3616,3448,4049);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+-- 1443: Ferzerul Texts
+(1443,0,0, 'I hereby destroy these instruments of evil! For the Horde!',14,1,100,0,0,0, 'Felzerul on Quest 1445 finished'),
+-- 3054: Zarlman Two-Moons Texts
+(3054,0,0, 'Zarlman Two-Moons begins chanting as he mixes the well stones and ambercom before the Tribal Fire.',16,1,100,0,0,0, 'Zarlman Two-Moons on Quest 771 finished 1'),
+(3054,1,0, 'The Water of the Seers is ready for your consumption, $N.' ,12,1,100,0,0,0, 'Zarlman Two-Moons on Quest 771 finished 2'),
+-- 3448: Tonga Runetotem Texts
+(3448,0,0, 'Tonga Runetotem inspects the snapjaw shells...' ,16,1,100,0,0,0, 'Tonga Runetotem on Quest 880 finished'),
+(3448,1,0, 'Hm...' ,12,1,100,0,0,0, 'Tonga Runetotem on Quest 880 finished'),
+(3448,2,0, 'Strange. Very strange...' ,12,1,100,0,0,0, 'Tonga Runetotem on Quest 880 finished'),
+(3448,3,0, '$N. These shells tell me much, but I fear many more questions are now raised...',12,1,100,1,0,0, 'Tonga Runetotem on Quest 880 finished'),
+-- 3616: Onu Texts
+(3616,0,0, 'Onu studies the parchment from the Twilight Tome...',16,7,100,0,0,0, 'Onu on Quest 950 finished'),
+(3616,1,0, 'Onu is struck by unleashed magic!' ,16,7,100,0,0,0, 'Onu on Quest 950 finished'),
+(3616,2,0, 'Hmm...' ,12,7,100,0,0,0, 'Onu on Quest 950 finished'),
+-- 4049: Seereth Stonebreak Texts
+(4049,0,0, 'The spirits of Stonetalon still rage, $N.',16,7,100,0,0,0,'Seereth Stonebreak on Quest 1062 finished'),
+(4049,1,0, 'I fear we may never soothe them...' ,16,7,100,0,0,0,'Seereth Stonebreak on Quest 1062 finished');
+-- SAI
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (1443,3054,3448,3616,4049,21311);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (1443,3054,3448,3616,4049,21311) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=305400 AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+-- Ferzerul Converted Quest_end_scripts id 1445
+(1443,0,0,1,20,0,100,0,1062,0,0,0,1 , 0,3000,0,0,0,0,1,0,0,0,0,0,0,0,'Seereth Stonebreak - On quest " The Temple of AtalHakkar" rewarded - Say line 1'),
+(1443,0,1,0,20,0,100,0,1062,0,0,0,11,7437, 0,0,0,0,0,1,0,0,0,0,0,0,0,'Seereth Stonebreak - On quest " The Temple of AtalHakkar" rewarded - Cast Spell'),
+-- Tonga Runetotem Converted Quest_end_scripts id 880
+(3448,0,0,1,20,0,100,0,880,0,0,0,1,0,5000,0,0,0,0,1,0,0,0,0,0,0,0, 'Tonga Runetotem - On quest "Altered Beings" rewarded - Say line 1'),
+(3448,0,1,2,20,0,100,0,880,0,0,0,1,1,4000,0,0,0,0,1,0,0,0,0,0,0,0, 'Tonga Runetotem - On quest "Altered Beings" rewarded - Say line 2'),
+(3448,0,2,3,20,0,100,0,880,0,0,0,1,2,4000,0,0,0,0,1,0,0,0,0,0,0,0, 'Tonga Runetotem - On quest "Altered Beings" rewarded - Say line 3'),
+(3448,0,3,4,20,0,100,0,880,0,0,0,1,3,2000,0,0,0,0,1,0,0,0,0,0,0,0, 'Tonga Runetotem - On quest "Altered Beings" rewarded - Say line 4'),
+-- Onu Converted Quest_end_scripts id 950
+(3616,0,0,1,20,0,100,0,950,0,0,0,1,0,4000,0,0,0,0,1,0,0,0,0,0,0,0, 'Onu - On quest "Return to Onu" rewarded - Say line 1'),
+(3616,0,1,2,20,0,100,0,950,0,0,0,1,1,4000,0,0,0,0,1,0,0,0,0,0,0,0, 'Onu - On quest "Return to Onu" rewarded - Say line 2'),
+(3616,0,2,0,20,0,100,0,950,0,0,0,1,2, 0,0,0,0,0,1,0,0,0,0,0,0,0, 'Onu - On quest "Return to Onu" rewarded - Say line 3'),
+-- Seereth Stonebeak Converted Quest_end_scripts id 1062
+(4049,0,0,1,20,0,100,0,1062,0,0,0,1,0,4000,0,0,0,0,1,0,0,0,0,0,0,0,'Seereth Stonebreak - On quest "Goblin Invaders" rewarded - Say line 1'),
+(4049,0,1,0,20,0,100,0,1062,0,0,0,1,1, 0,0,0,0,0,1,0,0,0,0,0,0,0,'Seereth Stonebreak - On quest "Goblin Invaders" rewarded - Say line 2'),
+-- Rokgar Bloodgrip Converted Quest_end_scripts id 10526
+(21311,0,0,0,20,0,100,0,10526,0,0,0,12,21950,1,900000,0,0,0,8,0,0,0,2272.95,5984.40,142.79,6.23, 'Rokgah Bloodgrip - On Quest "The Thunderspike" Complete - Summon Garm Wolfbrother'),
+(21311,0,1,0,20,0,100,0,10526,0,0,0,12,21952,1,900000,0,0,0,8,0,0,0,2273.26,5986.73,142.75,5.14, 'Rokgah Bloodgrip - On Quest "The Thunderspike" Complete - Summon Lobo'),
+(21311,0,2,0,20,0,100,0,10526,0,0,0,12,21951,1,900000,0,0,0,8,0,0,0,2270.95,5982.93,142.83,0.31, 'Rokgah Bloodgrip - On Quest "The Thunderspike" Complete - Summon Thunderlord Clan Sub-Chief'),
+(21311,0,3,0,20,0,100,0,10526,0,0,0,12,21951,1,900000,0,0,0,8,0,0,0,2271.17,5986.07,142.81,5.86, 'Rokgah Bloodgrip - On Quest "The Thunderspike" Complete - Summon Thunderlord Clan Sub-Chief'),
+-- Zarlman Two-Moons Converted Quest_end_scripts id 771
+(3054 ,0,1,0,20,0,100,0, 771, 0,0,0,80,305400,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Zarlman Two-Moons: On quest "" Rewarded - call script'),
+(305400,9,0,1,1 ,0,100,0, 0, 0,0,0, 1, 0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Zarlman Two-Moons - TimedScript - Say line 1'),
+(305400,9,1,2,1 ,0,100,0,1000,1000,0,0,11, 5026,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Zarlman Two-Moons - TimedScript - Cast Spell'),
+(305400,9,2,0,1 ,0,100,0,7000,7000,0,0, 1, 1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Zarlman Two-Moons - TimedScript - Say line 2');
+-- Quest_end_script removal
+DELETE FROM `quest_end_scripts` WHERE `id` IN (10526,1445,1062,950,880);
+UPDATE `quest_template` SET `CompleteScript`=0 WHERE `Id`IN (10526,1445,1062,950,880);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/sql/updates/world/2012_12_09_00_world_conditions.sql b/sql/updates/world/2012_12_09_00_world_conditions.sql
new file mode 100644
index 00000000000..dbb3dac7fc3
--- /dev/null
+++ b/sql/updates/world/2012_12_09_00_world_conditions.sql
@@ -0,0 +1 @@
+UPDATE `conditions` SET `ErrorType`=172,`ErrorTextId`=77 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=54732; -- Defibrillate
diff --git a/sql/updates/world/2012_12_09_00_world_creature_text.sql b/sql/updates/world/2012_12_09_00_world_creature_text.sql
new file mode 100644
index 00000000000..6d850191938
--- /dev/null
+++ b/sql/updates/world/2012_12_09_00_world_creature_text.sql
@@ -0,0 +1,40 @@
+DELETE FROM `creature_text` WHERE `entry`=1756;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(1756,0,0,12,0,100,"lord gregor lescovar SAY_GUARD_2","Yes, sir!"),
+(1756,1,0,12,0,100,"tyrion spybot SAY_GUARD_1","Of course. He awaits you in the library.");
+
+DELETE FROM `creature_text` WHERE `entry`=1754;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(1754,0,0,12,0,100,"lord gregor lescovar SAY_LESCOVAR_2","It's time for my meditation, leave me."),
+(1754,1,0,12,0,100,"lord gregor lescovar SAY_LESCOVAR_3","There you are. What news from Westfall?"),
+(1754,2,0,12,0,100,"lord gregor lescovar SAY_LESCOVAR_4","Hmm, it could be that meddle Shaw. I will see what I can discover. Be off with you. I'll contact you again soon."),
+(1754,3,0,12,0,100,"tyrion spybot SAY_LESCOVAR_1","Ah, thank you kindly. I will leave you to the library while I tend to this small matter.");
+
+DELETE FROM `creature_text` WHERE `entry`=3849;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(3849,0,0,14,0,100,"prisoner adamant SAY_FREE_AD","Free from this wretched cell at last! Let me show you to the courtyard...."),
+(3849,1,0,14,0,100,"prisoner adamant SAY_OPEN_DOOR_AD","You are indeed courageous for wanting to brave the horrors that lie beyond this door."),
+(3849,2,0,14,0,100,"prisoner adamant SAY_POST1_DOOR_AD","There we go!"),
+(3849,3,0,14,0,100,"prisoner adamant SAY_POST2_DOOR_AD","Good luck with Arugal. I must hurry back to Hadrec now."),
+(3849,4,0,12,0,100,"prisoner adamant SAY_BOSS_DIE_AD","About time someone killed the wretch.");
+
+DELETE FROM `creature_text` WHERE `entry`=17243;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(17243,0,0,12,0,100,"engineer spark SAY_TEXT","Yes Master, all goes along as planned."),
+(17243,1,0,16,0,100,"engineer spark EMOTE_SHELL","%s puts the shell to his ear."),
+(17243,2,0,14,0,100,"engineer spark SAY_ATTACK","Now I cut you!"),
+(17243,3,0,12,0,100,"geezle SPARK_SAY_2","What's the big idea? You nearly blew my cover, idiot! I told you to put the compass and navigation maps somewhere safe - not out in the open for any fool to discover."),
+(17243,4,0,12,0,100,"geezle SPARK_SAY_3","The Master has gone to great lengths to secure information about the whereabouts of the Exodar. You could have blown the entire operation, including the cover of our spy on the inside."),
+(17243,5,0,12,0,100,"geezle SPARK_SAY_5","Relax? Do you know what Kael'thas does to those that fail him, Geezle? Eternal suffering and pain... Do NOT screw this up, fool."),
+(17243,6,0,12,0,100,"geezle SPARK_SAY_6","Our Bloodmyst scouts have located our contact. The fool, Velen, will soon leave himself open and defenseless -- long enough for us to strike! Now get out of my sight before I vaporize you..."),
+(17243,7,0,16,0,100,"geezle EMOTE_SPARK","picks up the naga flag.");
+
+DELETE FROM `creature_text` WHERE `entry`=38113;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
+(38113,0,0,14,16734,100,"marwyn SAY_AGGRO","Death is all that you will find here!"),
+(38113,1,0,14,16735,100,"marwyn SAY_SLAY_1","I saw the same look in his eyes when he died. Terenas could hardly believe it. Hahahaha!"),
+(38113,1,1,14,16736,100,"marwyn SAY_SLAY_2","Choke on your suffering!"),
+(38113,2,0,14,16737,100,"marwyn SAY_DEATH","Yes... Run... Run to meet your destiny... Its bitter, cold embrace, awaits you."),
+(38113,3,0,14,16739,100,"marwyn SAY_CORRUPTED_FLESH_1","Your flesh has decayed before your very eyes!"),
+(38113,3,1,14,16740,100,"marwyn SAY_CORRUPTED_FLESH_2","Waste away into nothingness!"),
+(38113,4,0,14,16741,100,"marwyn SAY_MARWYN_INTRO_1","As you wish, my lord.");
diff --git a/sql/updates/world/2012_12_09_01_world_misc.sql b/sql/updates/world/2012_12_09_01_world_misc.sql
new file mode 100644
index 00000000000..7c8bdfbb1c5
--- /dev/null
+++ b/sql/updates/world/2012_12_09_01_world_misc.sql
@@ -0,0 +1,2 @@
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000105,2000000106,2000000138);
+DELETE FROM `quest_end_scripts` WHERE `id`=771;
diff --git a/sql/updates/world/2012_12_09_02_world_quest_template.sql b/sql/updates/world/2012_12_09_02_world_quest_template.sql
new file mode 100644
index 00000000000..52d0202d2a1
--- /dev/null
+++ b/sql/updates/world/2012_12_09_02_world_quest_template.sql
@@ -0,0 +1 @@
+UPDATE `quest_template` SET `CompleteScript`=0 WHERE `Id`=771;
diff --git a/sql/updates/world/2012_12_10_00_world_smart_scripts.sql b/sql/updates/world/2012_12_10_00_world_smart_scripts.sql
new file mode 100644
index 00000000000..ed0ee9bf764
--- /dev/null
+++ b/sql/updates/world/2012_12_10_00_world_smart_scripts.sql
@@ -0,0 +1,3 @@
+DELETE FROM `smart_scripts` WHERE `entryorguid`=28557 AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(28557, 0, 0, 0, 2, 0, 100, 1, 0, 20, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'At 0-20% hp - rnd say text');
diff --git a/sql/updates/world/2012_12_10_01_world_spell_script_names.sql b/sql/updates/world/2012_12_10_01_world_spell_script_names.sql
new file mode 100644
index 00000000000..bc3684011e8
--- /dev/null
+++ b/sql/updates/world/2012_12_10_01_world_spell_script_names.sql
@@ -0,0 +1,4 @@
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (-24604,53434);
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(-24604,'spell_hun_target_only_pet_and_owner'),
+(53434,'spell_hun_target_only_pet_and_owner');
diff --git a/sql/updates/world/2012_12_10_02_world_spawns_waypoints.sql b/sql/updates/world/2012_12_10_02_world_spawns_waypoints.sql
new file mode 100644
index 00000000000..68613f3aaa9
--- /dev/null
+++ b/sql/updates/world/2012_12_10_02_world_spawns_waypoints.sql
@@ -0,0 +1,605 @@
+-- Issue 8514: Razormane Wolves - add and bind to Razormane Hunters
+-- Razormane Hunters in the Barrens (9 guids) are all missing the Wolves that path with them
+-- create a Razormane Wolf pet (#3939) for each of the 9 Razormane Hunters (#3265)
+SET @GUID := 45823; -- set by tdb team
+-- insert 9 razormane wolves into new guids (@GUID to @GUID+8) with invalid xyz coords (we don't know them yet)
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+8;
+INSERT INTO `creature` (`guid`,`id`,`map`,`position_x`,`position_y`, `position_z`,`spawntimesecs`,`curhealth`,`MovementType`) VALUES
+(@GUID ,3939,1,0,0,0,90,120,1),
+(@GUID+1,3939,1,0,0,0,90,120,1),
+(@GUID+2,3939,1,0,0,0,90,120,1),
+(@GUID+3,3939,1,0,0,0,90,120,1),
+(@GUID+4,3939,1,0,0,0,90,120,1),
+(@GUID+5,3939,1,0,0,0,90,120,1),
+(@GUID+6,3939,1,0,0,0,90,120,1),
+(@GUID+7,3939,1,0,0,0,90,120,1),
+(@GUID+8,3939,1,0,0,0,90,120,1);
+-- bind the wolves to the 9 razormane hunters (id 3265)
+DELETE FROM `creature_formations` WHERE `leaderGUID` BETWEEN 20301 AND 20309;
+INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`) VALUES
+(20301,20301,0,0,2),
+(20301,@GUID,4,60,2),
+(20302,20302,0,0,2),
+(20302,@GUID+1,4,60,2),
+(20303,20303,0,0,2),
+(20303,@GUID+2,4,60,2),
+(20304,20304,0,0,2),
+(20304,@GUID+3,4,60,2),
+(20305,20305,0,0,2),
+(20305,@GUID+4,4,60,2),
+(20306,20306,0,0,2),
+(20306,@GUID+5,4,60,2),
+(20307,20307,0,0,2),
+(20307,@GUID+6,4,60,2),
+(20308,20308,0,0,2),
+(20308,@GUID+7,4,60,2),
+(20309,20309,0,0,2),
+(20309,@GUID+8,4,60,2);
+-- now set the wolf pets to the same xyz as their leader
+UPDATE `creature` c1,`creature` c2,`creature_formations` cf SET c1.`position_x`=c2.`position_x`,c1.`position_y`=c2.`position_y`,c1.`position_z`=c2.`position_z` WHERE c1.`guid`=cf.`memberGUID` AND c2.`guid`=cf.`leaderGUID` AND c1. `guid` BETWEEN @GUID AND @GUID+8;
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8594: Missing Raptor egg nests
+-- Create spawn points for missing Raptor nests (Takk nest pool, Ravasaur nest pool, Razormaw nest)
+SET @GUID :=14990;
+-- existing nest for Ravasaur Matriarch will be re-added with others in pool
+DELETE FROM `gameobject` WHERE `guid` = 150392;
+-- New spawns
+DELETE FROM `gameobject` WHERE `guid` BETWEEN @GUID AND @GUID+9;
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`position_x`,`position_y`,`position_z`,`spawntimesecs`,`animprogress`,`state`) VALUES
+(@GUID ,202081,1, 1036.85,-3404.15, 91.67,3600,0,1),
+(@GUID+1,202081,1, 929.03,-3483.34, 91.67,3600,0,1),
+(@GUID+2,202081,1, 708.62,-3527.60, 91.76,3600,0,1),
+(@GUID+3,202081,1, 844.24,-3573.38, 91.74,3600,0,1),
+(@GUID+4,202082,1,-7522.43,-1797.43,-271.79,3600,0,1),
+(@GUID+5,202082,1,-7594.88,-1800.48,-265.33,3600,0,1),
+(@GUID+6,202082,1,-7426.77,-2018.86,-271.69,3600,0,1),
+(@GUID+7,202082,1,-7668.27,-1966.72,-271.96,3600,0,1),
+(@GUID+8,202082,1,-7824.72,-1590.05,-265.07,3600,0,1),
+(@GUID+9,202083,0,-2944.48,-3277.68, 62.27,18000,100, 1);
+DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @GUID AND @GUID+9;
+INSERT INTO `pool_gameobject` (`guid`,`pool_entry`,`description`) VALUES
+(@GUID ,7001, 'Takk''s Nest spawn point #1'),
+(@GUID+1,7001, 'Takk''s Nest spawn point #2'),
+(@GUID+2,7001, 'Takk''s Nest spawn point #3'),
+(@GUID+3,7001, 'Takk''s Nest spawn point #4'),
+(@GUID+4,7002, 'Ravasaur Matriarch''s Nest spawn point #1'),
+(@GUID+5,7002, 'Ravasaur Matriarch''s Nest spawn point #2'),
+(@GUID+6,7002, 'Ravasaur Matriarch''s Nest spawn point #3'),
+(@GUID+7,7002, 'Ravasaur Matriarch''s Nest spawn point #4'),
+(@GUID+8,7002, 'Ravasaur Matriarch''s Nest spawn point #5');
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8601: Twilight Prophet (2) - Pathing
+-- ====================================
+-- Paths for Twilight Prophet 1 (guid #43322)
+-- ====================================
+UPDATE `creature` SET `MovementType`=2,`position_x`=-7895.314941, `position_y`=1891.944092,`position_z`=8.447455 WHERE `guid`=43322;
+UPDATE `creature_addon` SET `path_id`=433220 WHERE `guid`=43322;
+DELETE FROM `waypoint_data` WHERE `id`=433220;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(433220,1,-7895.314941,1891.944092,8.447455,0,0,0,0,100,0),
+(433220,2,-7889.814453,1892.442139,6.512199,0,0,0,0,100,0),
+(433220,3,-7875.850586,1893.292969,5.065457,0,0,0,0,100,0),
+(433220,4,-7863.858398,1890.743408,3.855400,0,0,0,0,100,0),
+(433220,5,-7851.287109,1884.620361,3.379698,0,0,0,0,100,0),
+(433220,6,-7839.691406,1876.790527,3.826157,0,0,0,0,100,0),
+(433220,7,-7826.647461,1865.424316,4.368514,0,0,0,0,100,0),
+(433220,8,-7816.574219,1855.712524,3.208780,0,0,0,0,100,0),
+(433220,9,-7807.453613,1847.762085,2.136624,0,0,0,0,100,0),
+(433220,10,-7799.522461,1836.230225,2.907008,0,0,0,0,100,0),
+(433220,11,-7789.064453,1822.204468,1.495795,0,0,0,0,100,0),
+(433220,12,-7780.687500,1810.996704,-0.079978,0,0,0,0,100,0),
+(433220,13,-7773.758301,1795.407227,2.095025,0,0,0,0,100,0),
+(433220,14,-7770.189941,1781.901123,3.807251,0,0,0,0,100,0),
+(433220,15,-7768.526855,1768.004028,3.786433,0,0,0,0,100,0),
+(433220,16,-7767.317871,1754.062012,4.589085,0,0,0,0,100,0),
+(433220,17,-7766.593750,1740.086060,5.127120,0,0,0,0,100,0),
+(433220,18,-7766.543457,1722.587158,3.306771,0,0,0,0,100,0),
+(433220,19,-7765.512207,1710.202515,2.194530,0,0,0,0,100,0),
+(433220,20,-7756.119141,1696.762329,2.299271,0,0,0,0,100,0),
+(433220,21,-7745.099121,1688.132690,5.269642,0,0,0,0,100,0),
+(433220,22,-7734.173828,1679.384888,7.263340,0,0,0,0,100,0),
+(433220,23,-7724.966797,1669.663940,7.202020,0,0,0,0,100,0),
+(433220,24,-7715.616699,1659.246826,7.387191,0,0,0,0,100,0),
+(433220,25,-7703.356445,1646.774414,7.689360,0,0,0,0,100,0),
+(433220,26,-7693.303223,1637.030884,5.440024,0,0,0,0,100,0),
+(433220,27,-7685.538086,1624.118042,5.128979,0,0,0,0,100,0),
+(433220,28,-7677.588867,1612.681885,3.419049,0,0,0,0,100,0),
+(433220,29,-7667.428711,1601.642334,1.248345,0,0,0,0,100,0),
+(433220,30,-7656.230957,1593.253296,3.186309,0,0,0,0,100,0),
+(433220,31,-7643.143066,1587.457275,5.195174,0,0,0,0,100,0),
+(433220,32,-7628.659668,1587.804810,6.025109,0,0,0,0,100,0),
+(433220,33,-7619.128906,1595.998901,5.355808,0,0,0,0,100,0),
+(433220,34,-7613.072266,1608.582764,2.668371,0,0,0,0,100,0),
+(433220,35,-7605.075684,1620.776611,2.568130,0,0,0,0,100,0),
+(433220,36,-7599.562988,1634.706543,4.553499,0,0,0,0,100,0),
+(433220,37,-7605.732422,1639.759155,2.198371,0,0,0,0,100,0),
+(433220,38,-7610.278320,1628.909790,2.462519,0,0,0,0,100,0),
+(433220,39,-7613.120605,1611.651123,2.589123,0,0,0,0,100,0),
+(433220,40,-7617.356934,1598.347534,4.641613,0,0,0,0,100,0),
+(433220,41,-7628.784180,1587.950806,6.064836,0,0,0,0,100,0),
+(433220,42,-7639.729980,1589.783813,5.447087,0,0,0,0,100,0),
+(433220,43,-7654.615723,1597.761353,3.670609,0,0,0,0,100,0),
+(433220,44,-7663.443359,1606.836182,2.949980,0,0,0,0,100,0),
+(433220,45,-7672.763672,1617.280640,4.842738,0,0,0,0,100,0),
+(433220,46,-7684.707031,1630.059326,5.168031,0,0,0,0,100,0),
+(433220,47,-7694.602051,1639.962524,5.923426,0,0,0,0,100,0),
+(433220,48,-7707.055176,1652.256348,7.801556,0,0,0,0,100,0),
+(433220,49,-7717.229004,1661.873413,7.195765,0,0,0,0,100,0),
+(433220,50,-7727.743652,1671.116211,7.281052,0,0,0,0,100,0),
+(433220,51,-7738.428711,1680.162109,6.843456,0,0,0,0,100,0),
+(433220,52,-7751.823730,1691.423706,3.485293,0,0,0,0,100,0),
+(433220,53,-7762.860352,1702.140625,1.730373,0,0,0,0,100,0),
+(433220,54,-7768.805176,1716.334961,2.038195,0,0,0,0,100,0),
+(433220,55,-7772.072754,1729.328857,3.194579,0,0,0,0,100,0),
+(433220,56,-7773.440430,1746.756226,3.262704,0,0,0,0,100,0),
+(433220,57,-7774.675293,1760.701538,1.454978,0,0,0,0,100,0),
+(433220,58,-7775.765625,1778.149048,2.863208,0,0,0,0,100,0),
+(433220,59,-7778.452637,1790.994507,2.010733,0,0,0,0,100,0),
+(433220,60,-7783.087891,1807.865723,0.271067,0,0,0,0,100,0),
+(433220,61,-7786.545410,1821.431396,0.923371,0,0,0,0,100,0),
+(433220,62,-7790.598633,1838.451538,1.505119,0,0,0,0,100,0),
+(433220,63,-7795.272461,1852.971802,1.468031,0,0,0,0,100,0),
+(433220,64,-7804.368652,1867.914795,2.308474,0,0,0,0,100,0),
+(433220,65,-7811.636719,1877.915405,5.278152,0,0,0,0,100,0),
+(433220,66,-7824.912598,1887.686401,5.346197,0,0,0,0,100,0),
+(433220,67,-7839.624512,1892.284058,2.934072,0,0,0,0,100,0),
+(433220,68,-7856.468262,1895.142822,1.916823,0,0,0,0,100,0),
+(433220,69,-7868.257324,1894.790161,4.164560,0,0,0,0,100,0),
+(433220,70,-7885.666504,1893.007935,5.893253,0,0,0,0,100,0);
+-- ====================================
+-- Paths for Twilight Prophet 2 (guid #43323)
+-- ====================================
+UPDATE `creature` SET `MovementType`=2, `position_x`=-7007.199219, `position_y`=1155.165649, `position_z`=10.367001 WHERE `guid`=43323;
+UPDATE `creature_addon` SET `path_id`=433230 WHERE `guid`= 43323;
+DELETE FROM `waypoint_data` WHERE `id`=433230;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(433230,1,-7007.199219,1155.165649,10.367001,0,0,0,0,100,0),
+(433230,2,-7013.322754,1146.656982,7.765337,0,0,0,0,100,0),
+(433230,3,-7029.557129,1126.831177,0.441744,0,0,0,0,100,0),
+(433230,4,-7042.741211,1124.151367,2.458173,0,0,0,0,100,0),
+(433230,5,-7057.576172,1132.508423,1.796156,0,0,0,0,100,0),
+(433230,6,-7066.061523,1144.144409,1.819798,0,0,0,0,100,0),
+(433230,7,-7063.622559,1155.527222,0.355760,0,0,0,0,100,0),
+(433230,8,-7057.280273,1162.759033,0.884041,0,0,0,0,100,0),
+(433230,9,-7051.809082,1173.513184,0.766896,0,0,0,0,100,0),
+(433230,10,-7053.896973,1184.036377,0.545792,0,0,0,0,100,0),
+(433230,11,-7051.105469,1194.661133,0.349549,0,0,0,0,100,0),
+(433230,12,-7054.485840,1205.540894,0.349985,0,0,0,0,100,0),
+(433230,13,-7055.359375,1215.794434,0.349985,0,0,0,0,100,0),
+(433230,14,-7049.322266,1223.330322,0.349985,0,0,0,0,100,0),
+(433230,15,-7035.041992,1239.769531,0.358600,0,0,0,0,100,0),
+(433230,16,-7025.624023,1250.415405,0.526597,0,0,0,0,100,0),
+(433230,17,-7012.420410,1257.504395,0.411500,0,0,0,0,100,0),
+(433230,18,-6993.685059,1258.257690,-0.058926,0,0,0,0,100,0),
+(433230,19,-6976.384277,1260.632446,-0.220956,0,0,0,0,100,0),
+(433230,20,-6954.655273,1267.109131,2.393948,0,0,0,0,100,0),
+(433230,21,-6938.101074,1272.757690,3.474210,0,0,0,0,100,0),
+(433230,22,-6923.599609,1283.566650,2.920597,0,0,0,0,100,0),
+(433230,23,-6911.884277,1300.983032,5.251194,0,0,0,0,100,0),
+(433230,24,-6895.383301,1327.812012,3.925846,0,0,0,0,100,0),
+(433230,25,-6882.254395,1348.496704,2.143369,0,0,0,0,100,0),
+(433230,26,-6869.834473,1369.613037,3.275267,0,0,0,0,100,0),
+(433230,27,-6854.997559,1393.331299,3.114167,0,0,0,0,100,0),
+(433230,28,-6840.753418,1417.390625,-0.766261,0,0,0,0,100,0),
+(433230,29,-6827.396973,1441.993530,4.690745,0,0,0,0,100,0),
+(433230,30,-6815.702148,1459.405029,4.718923,0,0,0,0,100,0),
+(433230,31,-6802.099121,1479.763550,3.148716,0,0,0,0,100,0),
+(433230,32,-6786.228027,1498.344238,4.406202,0,0,0,0,100,0),
+(433230,33,-6756.861816,1533.071045,4.684423,0,0,0,0,100,0),
+(433230,34,-6739.011719,1557.908691,5.224258,0,0,0,0,100,0),
+(433230,35,-6719.190430,1577.632202,6.617586,0,0,0,0,100,0),
+(433230,36,-6700.756348,1593.744507,7.824927,0,0,0,0,100,0),
+(433230,37,-6688.981934,1615.776855,10.382424,0,0,0,0,100,0),
+(433230,38,-6688.395020,1633.384277,9.874694,0,0,0,0,100,0),
+(433230,39,-6695.491211,1645.041016,8.801991,0,0,0,0,100,0),
+(433230,40,-6709.729004,1660.468872,7.372326,0,0,0,0,100,0),
+(433230,41,-6717.024902,1672.027588,8.437102,0,0,0,0,100,0),
+(433230,42,-6725.587402,1666.742920,6.688062,0,0,0,0,100,0),
+(433230,43,-6749.216309,1660.499878,6.760650,0,0,0,0,100,0),
+(433230,44,-6756.531250,1655.720703,5.885690,0,0,0,0,100,0),
+(433230,45,-6751.630859,1649.907227,7.501710,0,0,0,0,100,0),
+(433230,46,-6757.303223,1654.306396,5.651666,0,0,0,0,100,0),
+(433230,47,-6760.314453,1646.274780,6.422415,0,0,0,0,100,0),
+(433230,48,-6760.897949,1620.609009,6.122479,0,0,0,0,100,0),
+(433230,49,-6754.945801,1604.433838,7.166245,0,0,0,0,100,0),
+(433230,50,-6743.704590,1586.736206,6.590928,0,0,0,0,100,0),
+(433230,51,-6734.563965,1566.877808,5.459243,0,0,0,0,100,0),
+(433230,52,-6737.753906,1555.786255,5.394959,0,0,0,0,100,0),
+(433230,53,-6751.723145,1512.513184,5.181065,0,0,0,0,100,0),
+(433230,54,-6759.635742,1478.423706,4.751054,0,0,0,0,100,0),
+(433230,55,-6770.013672,1446.814331,2.063652,0,0,0,0,100,0),
+(433230,56,-6788.232910,1425.676392,3.310894,0,0,0,0,100,0),
+(433230,57,-6800.025391,1396.515381,1.172720,0,0,0,0,100,0),
+(433230,58,-6819.817383,1360.497070,4.872425,0,0,0,0,100,0),
+(433230,59,-6843.601563,1330.235718,4.759835,0,0,0,0,100,0),
+(433230,60,-6865.066895,1302.607056,-0.134331,0,0,0,0,100,0),
+(433230,61,-6882.897949,1276.647705,-0.666526,0,0,0,0,100,0),
+(433230,62,-6899.618164,1249.951416,1.992437,0,0,0,0,100,0),
+(433230,63,-6911.325195,1233.318115,2.319501,0,0,0,0,100,0),
+(433230,64,-6921.393555,1211.509766,2.345217,0,0,0,0,100,0),
+(433230,65,-6924.643066,1190.791016,2.364320,0,0,0,0,100,0),
+(433230,66,-6928.015137,1159.474487,3.196892,0,0,0,0,100,0),
+(433230,67,-6936.601563,1143.801880,4.415056,0,0,0,0,100,0),
+(433230,68,-6943.562012,1128.777466,3.058245,0,0,0,0,100,0),
+(433230,69,-6949.626465,1108.707520,0.427855,0,0,0,0,100,0),
+(433230,70,-6964.038086,1089.657227,2.763069,0,0,0,0,100,0),
+(433230,71,-6987.258301,1082.670776,4.084322,0,0,0,0,100,0),
+(433230,72,-7012.456055,1093.988525,1.606724,0,0,0,0,100,0),
+(433230,73,-7026.307129,1108.785156,2.950602,0,0,0,0,100,0),
+(433230,74,-7021.941406,1133.171997,1.929922,0,0,0,0,100,0),
+(433230,75,-7013.507813,1146.713501,7.749496,0,0,0,0,100,0);
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8602: Setis - correction and pathing
+-- Before Cataclysm, this rare elite was a Fel Reaver type mob in Silithus
+-- but the 3.3.5 TDB has this mob inexplicably nerfed to his post-Cataclysm size and damage
+--
+-- This fixes his pre-Cat size, damage and restores his zone pathing
+
+-- ====================================
+-- Setis correction and path
+-- ====================================
+UPDATE `creature_template` SET `scale`=3, `mindmg`=700, `maxdmg`=900 WHERE `entry`=14471;
+UPDATE `creature` SET `MovementType`=2, `position_x`=-7970.898438, `position_y`=1507.219971, `position_z`=-1.551867 WHERE `guid`=51838;
+DELETE FROM `creature_addon` WHERE `guid`=51838;
+INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (51838, 518380);
+DELETE FROM `waypoint_data` WHERE `id`=518380;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(518380,1,-7970.898438,1507.219971,-1.551867,0,0,0,0,100,0),
+(518380,2,-7943.037598,1493.791138,-6.626160,0,0,0,0,100,0),
+(518380,3,-7918.484375,1468.855347,-5.768747,0,0,0,0,100,0),
+(518380,4,-7894.920898,1446.878418,-9.586535,0,0,0,0,100,0),
+(518380,5,-7887.063965,1414.645752,-4.758429,0,0,0,0,100,0),
+(518380,6,-7879.735840,1375.461914,-8.273664,0,0,0,0,100,0),
+(518380,7,-7863.913574,1348.840820,-6.652806,0,0,0,0,100,0),
+(518380,8,-7839.481934,1331.171509,-9.644982,0,0,0,0,100,0),
+(518380,9,-7799.420410,1305.002441,-5.837549,0,0,0,0,100,0),
+(518380,10,-7775.251953,1267.372559,-4.494194,0,0,0,0,100,0),
+(518380,11,-7796.921387,1231.137085,-4.357635,0,0,0,0,100,0),
+(518380,12,-7814.783203,1204.887451,-0.534356,0,0,0,0,100,0),
+(518380,13,-7823.562500,1158.288696,1.645526,0,0,0,0,100,0),
+(518380,14,-7818.532227,1123.668945,0.376355,0,0,0,0,100,0),
+(518380,15,-7803.921387,1086.932251,4.711929,0,0,0,0,100,0),
+(518380,16,-7769.979980,1061.283813,1.140280,0,0,0,0,100,0),
+(518380,17,-7748.981934,1029.688477,2.546784,0,0,0,0,100,0),
+(518380,18,-7725.582031,994.818115,1.862588,0,0,0,0,100,0),
+(518380,19,-7700.375977,961.477478,-1.844931,0,0,0,0,100,0),
+(518380,20,-7660.693848,939.870605,0.607142,0,0,0,0,100,0),
+(518380,21,-7628.968262,925.089294,0.414325,0,0,0,0,100,0),
+(518380,22,-7594.459473,932.484253,1.851091,0,0,0,0,100,0),
+(518380,23,-7550.452148,954.033569,0.911450,0,0,0,0,100,0),
+(518380,24,-7519.019531,969.427917,1.444063,0,0,0,0,100,0),
+(518380,25,-7476.106934,979.391663,2.042855,0,0,0,0,100,0),
+(518380,26,-7428.556641,978.902710,3.131437,0,0,0,0,100,0),
+(518380,27,-7390.671875,1013.550964,3.490367,0,0,0,0,100,0),
+(518380,28,-7373.875977,1046.144897,4.743690,0,0,0,0,100,0),
+(518380,29,-7364.927734,1093.089844,1.329022,0,0,0,0,100,0),
+(518380,30,-7347.156250,1145.419922,1.288395,0,0,0,0,100,0),
+(518380,31,-7364.325195,1159.787231,3.236028,0,0,0,0,100,0),
+(518380,32,-7399.254395,1182.984497,1.843866,0,0,0,0,100,0),
+(518380,33,-7429.508301,1202.897827,3.029610,0,0,0,0,100,0),
+(518380,34,-7468.980469,1233.918945,3.407038,0,0,0,0,100,0),
+(518380,35,-7511.831543,1250.466309,3.333737,0,0,0,0,100,0),
+(518380,36,-7540.864258,1269.111328,6.091939,0,0,0,0,100,0),
+(518380,37,-7555.662109,1299.827026,2.850513,0,0,0,0,100,0),
+(518380,38,-7569.881348,1333.556763,3.011905,0,0,0,0,100,0),
+(518380,39,-7598.235352,1373.451294,4.004597,0,0,0,0,100,0),
+(518380,40,-7626.755371,1409.476685,3.858852,0,0,0,0,100,0),
+(518380,41,-7655.338867,1460.769531,3.685694,0,0,0,0,100,0),
+(518380,42,-7697.577637,1485.361694,4.425735,0,0,0,0,100,0),
+(518380,43,-7728.651855,1513.852295,-0.668692,0,0,0,0,100,0),
+(518380,44,-7740.848633,1555.398560,1.300065,0,0,0,0,100,0),
+(518380,45,-7763.296875,1582.227173,-0.216693,0,0,0,0,100,0),
+(518380,46,-7787.744629,1593.927979,2.871248,0,0,0,0,100,0),
+(518380,47,-7832.063965,1601.147339,4.115499,0,0,0,0,100,0),
+(518380,48,-7870.669434,1592.223389,2.563943,0,0,0,0,100,0),
+(518380,49,-7908.875977,1561.901733,-2.734423,0,0,0,0,100,0),
+(518380,50,-7932.152832,1528.089844,-0.895027,0,0,0,0,100,0),
+(518380,51,-7946.883301,1508.120239,-6.629673,0,0,0,0,100,0);
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8604: Lapress - pathing
+-- Lapress is a rare elite in Silithus that paths around Hive'Regal
+-- TBD has two spawns for this type (error) and no path for either
+-- ====================================
+-- Path for Lapress (guid #43120)
+-- ====================================
+-- remove duplicate guid #51782
+DELETE FROM `creature` WHERE `guid`=51782;
+DELETE FROM `creature_addon` WHERE `guid`=51782;
+-- set pathing for guid #43120
+UPDATE `creature` SET `MovementType`=2,`position_x`=-7803.758789,`position_y`=515.706482,`position_z`=-38.351662 WHERE `guid`=43120;
+UPDATE `creature_addon` SET `path_id`=431200 WHERE `guid`=43120;
+DELETE FROM `waypoint_data` WHERE `id`=431200;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(431200,1,-7803.758789,515.706482,-38.351662,0,0,0,0,100,0),
+(431200,2,-7836.155762,493.625061,-35.266079,0,0,0,0,100,0),
+(431200,3,-7853.409180,473.479858,-33.659664,0,0,0,0,100,0),
+(431200,4,-7883.189941,436.889862,-32.837315,0,0,0,0,100,0),
+(431200,5,-7902.391113,426.345123,-32.146542,0,0,0,0,100,0),
+(431200,6,-7935.672852,417.698547,-30.542465,0,0,0,0,100,0),
+(431200,7,-7962.825684,424.285736,-31.605789,0,0,0,0,100,0),
+(431200,8,-7985.026367,438.749878,-30.173546,0,0,0,0,100,0),
+(431200,9,-7990.209961,447.782166,-30.206039,0,0,0,0,100,0),
+(431200,10,-7990.671387,458.651367,-30.272879,0,0,0,0,100,0),
+(431200,11,-7981.745117,472.982819,-28.886236,0,0,0,0,100,0),
+(431200,12,-7978.358398,486.361145,-27.435070,0,0,0,0,100,0),
+(431200,13,-7976.823730,500.482758,-29.771008,0,0,0,0,100,0),
+(431200,14,-7969.692383,514.711243,-29.564129,0,0,0,0,100,0),
+(431200,15,-7956.184570,519.753662,-29.493561,0,0,0,0,100,0),
+(431200,16,-7947.121094,518.579346,-28.268650,0,0,0,0,100,0),
+(431200,17,-7926.888184,512.964294,-30.582899,0,0,0,0,100,0),
+(431200,18,-7906.528809,511.238007,-31.442280,0,0,0,0,100,0),
+(431200,19,-7885.870117,513.818298,-32.604053,0,0,0,0,100,0),
+(431200,20,-7865.162598,522.834473,-35.134956,0,0,0,0,100,0),
+(431200,21,-7835.427246,536.469238,-35.256481,0,0,0,0,100,0),
+(431200,22,-7811.894531,531.935547,-37.693974,0,0,0,0,100,0),
+(431200,23,-7787.803223,517.669800,-39.175011,0,0,0,0,100,0),
+(431200,24,-7758.233887,498.946594,-43.895679,0,0,0,0,100,0),
+(431200,25,-7740.895020,487.130463,-44.247120,0,0,0,0,100,0),
+(431200,26,-7724.676270,473.797882,-43.348301,0,0,0,0,100,0),
+(431200,27,-7711.100098,466.066101,-42.162849,0,0,0,0,100,0),
+(431200,28,-7693.685547,462.775269,-41.935429,0,0,0,0,100,0),
+(431200,29,-7679.479980,465.434692,-42.725754,0,0,0,0,100,0),
+(431200,30,-7671.343750,477.136871,-43.937260,0,0,0,0,100,0),
+(431200,31,-7670.163086,492.271149,-43.557579,0,0,0,0,100,0),
+(431200,32,-7676.005371,503.306671,-42.504585,0,0,0,0,100,0),
+(431200,33,-7687.912598,517.063599,-42.958843,0,0,0,0,100,0),
+(431200,34,-7706.184570,525.815552,-43.932297,0,0,0,0,100,0),
+(431200,35,-7718.318848,525.054443,-43.541885,0,0,0,0,100,0),
+(431200,36,-7751.656738,514.520874,-43.412769,0,0,0,0,100,0),
+(431200,37,-7778.547363,507.991516,-41.380962,0,0,0,0,100,0);
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8605: Ghost Howl - pathing
+-- ====================================
+-- Ghost Howl path
+-- ====================================
+UPDATE `creature` SET `MovementType`=2,`position_x`=-758.331299,`position_y`=132.166534,`position_z`=2.778328 WHERE `guid`=51845;
+DELETE FROM `creature_addon` WHERE `guid`=51845;
+INSERT INTO `creature_addon` (`guid`,`path_id`) VALUES (51845,518450);
+DELETE FROM `waypoint_data` WHERE `id`=518450;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(518450,1,-758.331299,132.166534,2.778328,0,0,0,0,100,0),
+(518450,2,-779.039490,138.003098,-3.392812,0,0,0,0,100,0),
+(518450,3,-801.729553,140.723877,-8.184513,0,0,0,0,100,0),
+(518450,4,-817.906494,137.463898,-10.610684,0,0,0,0,100,0),
+(518450,5,-830.671692,150.509171,-10.048956,0,0,0,0,100,0),
+(518450,6,-824.121399,172.510635,-10.201122,0,0,0,0,100,0),
+(518450,7,-824.764526,186.873199,-9.988710,0,0,0,0,100,0),
+(518450,8,-831.982727,206.749084,-9.489987,0,0,0,0,100,0),
+(518450,9,-844.890625,227.419128,-3.092471,0,0,0,0,100,0),
+(518450,10,-857.643433,244.087906,8.022249,0,0,0,0,100,0),
+(518450,11,-872.992188,266.185333,19.168064,0,0,0,0,100,0),
+(518450,12,-882.134399,276.546539,22.082525,0,0,0,0,100,0),
+(518450,13,-889.800964,296.096069,23.395178,0,0,0,0,100,0),
+(518450,14,-902.934753,328.538361,23.222651,0,0,0,0,100,0),
+(518450,15,-911.667236,347.622101,22.762335,0,0,0,0,100,0),
+(518450,16,-920.617126,366.609924,17.728148,0,0,0,0,100,0),
+(518450,17,-929.675842,385.545471,15.672112,0,0,0,0,100,0),
+(518450,18,-939.391296,404.154327,17.809969,0,0,0,0,100,0),
+(518450,19,-952.277527,430.414551,22.445030,0,0,0,0,100,0),
+(518450,20,-962.798096,448.574280,27.889492,0,0,0,0,100,0),
+(518450,21,-974.157043,466.224060,33.387161,0,0,0,0,100,0),
+(518450,22,-986.256165,481.866150,36.911251,0,0,0,0,100,0),
+(518450,23,-1009.331055,498.010986,39.317425,0,0,0,0,100,0),
+(518450,24,-1028.780029,505.894989,38.973831,0,0,0,0,100,0),
+(518450,25,-1050.176880,512.740112,37.666676,0,0,0,0,100,0),
+(518450,26,-1067.730103,514.100281,36.464020,0,0,0,0,100,0),
+(518450,27,-1088.434937,510.596375,33.673737,0,0,0,0,100,0),
+(518450,28,-1109.123535,506.992828,31.172518,0,0,0,0,100,0),
+(518450,29,-1136.632324,501.823212,24.153307,0,0,0,0,100,0),
+(518450,30,-1156.810181,493.641083,17.238251,0,0,0,0,100,0),
+(518450,31,-1171.157104,480.669556,11.453438,0,0,0,0,100,0),
+(518450,32,-1185.964233,465.781128,6.865259,0,0,0,0,100,0),
+(518450,33,-1207.324707,447.692993,5.389233,0,0,0,0,100,0),
+(518450,34,-1218.004517,433.970886,4.800968,0,0,0,0,100,0),
+(518450,35,-1233.591797,412.767426,3.494786,0,0,0,0,100,0),
+(518450,36,-1231.269775,384.682373,-1.099372,0,0,0,0,100,0),
+(518450,37,-1215.842285,369.726135,-1.821958,0,0,0,0,100,0),
+(518450,38,-1195.579590,360.878784,4.173124,0,0,0,0,100,0),
+(518450,39,-1176.721313,351.738220,10.693844,0,0,0,0,100,0),
+(518450,40,-1156.654419,345.599243,15.725755,0,0,0,0,100,0),
+(518450,41,-1130.640137,342.170074,22.589449,0,0,0,0,100,0),
+(518450,42,-1102.557251,342.299896,31.515118,0,0,0,0,100,0),
+(518450,43,-1080.748291,344.271393,37.185501,0,0,0,0,100,0),
+(518450,44,-1064.598389,353.161041,35.431694,0,0,0,0,100,0),
+(518450,45,-1040.972900,368.182465,32.022644,0,0,0,0,100,0),
+(518450,46,-1023.555725,379.914581,27.822573,0,0,0,0,100,0),
+(518450,47,-1006.352783,391.955780,24.177290,0,0,0,0,100,0),
+(518450,48,-988.705933,402.575775,20.717924,0,0,0,0,100,0),
+(518450,49,-969.883667,398.736816,17.409334,0,0,0,0,100,0),
+(518450,50,-954.819580,383.869385,18.176464,0,0,0,0,100,0),
+(518450,51,-940.532715,364.391052,19.092533,0,0,0,0,100,0),
+(518450,52,-930.115662,346.157562,23.026438,0,0,0,0,100,0),
+(518450,53,-914.620056,322.843170,27.801060,0,0,0,0,100,0),
+(518450,54,-907.517029,307.239838,28.464359,0,0,0,0,100,0),
+(518450,55,-899.405396,286.196198,28.664932,0,0,0,0,100,0),
+(518450,56,-883.979919,262.894531,23.531834,0,0,0,0,100,0),
+(518450,57,-875.788635,248.850708,16.680983,0,0,0,0,100,0),
+(518450,58,-872.646851,221.030136,3.035634,0,0,0,0,100,0),
+(518450,59,-869.936951,200.205719,-4.584671,0,0,0,0,100,0),
+(518450,60,-865.188293,175.768646,-11.755344,0,0,0,0,100,0),
+(518450,61,-856.970764,158.444336,-10.823591,0,0,0,0,100,0),
+(518450,62,-840.617371,142.700714,-10.213431,0,0,0,0,100,0),
+(518450,63,-819.317688,131.755249,-10.598165,0,0,0,0,100,0),
+(518450,64,-794.494324,124.537750,-8.377938,0,0,0,0,100,0),
+(518450,65,-769.618774,126.572906,-4.253401,0,0,0,0,100,0),
+(518450,66,-751.691223,122.151276,0.485237,0,0,0,0,100,0),
+(518450,67,-727.576599,116.421646,5.932970,0,0,0,0,100,0),
+(518450,68,-701.033875,114.985733,7.786272,0,0,0,0,100,0);
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8606: Magram Pack Runners & Bonepaws - pathing and formations
+-- The 3 Magram Pack Runners are supposed to have paths and
+-- each in a formation with 2 of the 6 Magram Bonepaws
+-- ====================================
+-- Path for Magram Pack Runner #27113
+-- ====================================
+UPDATE `creature` SET `MovementType`=2,`position_x`=-1891.590088,`position_y`=980.184692,`position_z`=90.829735 WHERE `guid`=27113;
+UPDATE `creature_addon` SET `path_id` = 271130 WHERE `guid`= 27113;
+DELETE FROM `waypoint_data` WHERE `id`=271130;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(271130,1,-1891.590088,980.184692,90.829735,0,0,0,0,100,0),
+(271130,2,-1891.458496,956.675476,91.027580,0,0,0,0,100,0),
+(271130,3,-1891.624878,946.563904,92.976524,0,0,0,0,100,0),
+(271130,4,-1898.689453,936.942932,96.155182,0,0,0,0,100,0),
+(271130,5,-1896.239990,928.439636,100.486923,0,0,0,0,100,0),
+(271130,6,-1895.771118,926.325623,101.644440,0,0,0,0,100,0),
+(271130,7,-1898.247803,913.548157,108.486610,0,0,0,0,100,0),
+(271130,8,-1903.221069,906.490662,112.850449,0,0,0,0,100,0),
+(271130,9,-1900.763306,901.097595,113.787796,0,0,0,0,100,0),
+(271130,10,-1895.742065,893.227478,115.708855,0,0,0,0,100,0),
+(271130,11,-1893.209839,883.200073,119.829475,0,0,0,0,100,0),
+(271130,12,-1888.124268,877.533752,122.451233,0,0,0,0,100,0),
+(271130,13,-1881.200928,876.302002,123.132965,0,0,0,0,100,0),
+(271130,14,-1874.027710,875.738892,120.035500,0,0,0,0,100,0),
+(271130,15,-1863.357178,872.131592,113.412071,0,0,0,0,100,0),
+(271130,16,-1853.591919,866.042908,106.688286,0,0,0,0,100,0),
+(271130,17,-1848.998535,861.435791,105.390579,0,0,0,0,100,0),
+(271130,18,-1838.855347,859.845703,98.179382,0,0,0,0,100,0),
+(271130,19,-1832.145508,857.384705,96.830002,0,0,0,0,100,0),
+(271130,20,-1824.019287,851.966980,95.998306,0,0,0,0,100,0),
+(271130,21,-1820.149292,845.271362,95.867393,0,0,0,0,100,0),
+(271130,22,-1820.087524,837.699524,96.678963,0,0,0,0,100,0),
+(271130,23,-1820.891357,829.095459,101.625664,0,0,0,0,100,0),
+(271130,24,-1822.111328,821.425110,102.975616,0,0,0,0,100,0),
+(271130,25,-1813.876953,816.177124,102.989807,0,0,0,0,100,0),
+(271130,26,-1796.074097,809.767456,103.040268,0,0,0,0,100,0),
+(271130,27,-1775.111328,808.607422,103.003746,0,0,0,0,100,0),
+(271130,28,-1745.328003,812.193054,100.710617,0,0,0,0,100,0),
+(271130,29,-1731.692627,815.352661,98.948845,0,0,0,0,100,0),
+(271130,30,-1704.316528,821.220398,96.105034,0,0,0,0,100,0),
+(271130,31,-1684.435303,827.895630,95.722160,0,0,0,0,100,0),
+(271130,32,-1658.400269,838.199158,94.617905,0,0,0,0,100,0),
+(271130,33,-1639.631348,847.562805,92.239937,0,0,0,0,100,0),
+(271130,34,-1625.172974,862.494629,91.397324,0,0,0,0,100,0),
+(271130,35,-1622.582153,879.298401,89.652138,0,0,0,0,100,0),
+(271130,36,-1621.649536,904.026794,88.916763,0,0,0,0,100,0),
+(271130,37,-1607.298218,909.740479,88.886688,0,0,0,0,100,0),
+(271130,38,-1618.637207,899.038879,89.218735,0,0,0,0,100,0),
+(271130,39,-1621.257446,882.686401,89.581314,0,0,0,0,100,0),
+(271130,40,-1625.103271,866.434509,90.726997,0,0,0,0,100,0),
+(271130,41,-1642.078247,846.703918,92.289513,0,0,0,0,100,0),
+(271130,42,-1657.022583,841.595581,93.342613,0,0,0,0,100,0),
+(271130,43,-1676.612915,834.048279,94.937180,0,0,0,0,100,0),
+(271130,44,-1696.567139,827.531250,95.551430,0,0,0,0,100,0),
+(271130,45,-1716.638916,821.356750,96.912285,0,0,0,0,100,0),
+(271130,46,-1743.523560,813.593079,100.411209,0,0,0,0,100,0),
+(271130,47,-1762.349976,810.495056,102.357765,0,0,0,0,100,0),
+(271130,48,-1783.272583,809.470154,102.856506,0,0,0,0,100,0),
+(271130,49,-1801.859985,812.414734,103.297623,0,0,0,0,100,0),
+(271130,50,-1822.259888,821.903259,102.958633,0,0,0,0,100,0),
+(271130,51,-1819.364502,837.597229,96.466019,0,0,0,0,100,0),
+(271130,52,-1820.273804,844.711060,96.063477,0,0,0,0,100,0),
+(271130,53,-1826.404053,854.782043,95.999260,0,0,0,0,100,0),
+(271130,54,-1836.027832,861.635498,96.368958,0,0,0,0,100,0),
+(271130,55,-1848.700195,864.365601,104.286652,0,0,0,0,100,0),
+(271130,56,-1870.647461,871.074402,118.388863,0,0,0,0,100,0),
+(271130,57,-1880.014038,876.556885,122.919815,0,0,0,0,100,0),
+(271130,58,-1885.373779,877.127441,122.962570,0,0,0,0,100,0),
+(271130,59,-1893.455322,880.086243,120.755325,0,0,0,0,100,0),
+(271130,60,-1896.515259,889.165039,116.963913,0,0,0,0,100,0),
+(271130,61,-1897.799316,898.470825,114.102051,0,0,0,0,100,0),
+(271130,62,-1900.567505,904.286072,113.080307,0,0,0,0,100,0),
+(271130,63,-1903.235352,908.120667,112.314278,0,0,0,0,100,0),
+(271130,64,-1900.511353,914.542542,108.583321,0,0,0,0,100,0),
+(271130,65,-1894.257202,927.594543,100.719864,0,0,0,0,100,0),
+(271130,66,-1896.971069,937.240601,96.210007,0,0,0,0,100,0),
+(271130,67,-1892.367676,945.632507,93.317879,0,0,0,0,100,0),
+(271130,68,-1886.229248,960.514404,90.799576,0,0,0,0,100,0);
+-- ====================================
+-- Path for Magram Pack Runner #27114
+-- ====================================
+UPDATE `creature` SET `MovementType`=2,`position_x`=-1866.258911,`position_y`=1292.665039,`position_z`=90.267395 WHERE `guid`=27114;
+UPDATE `creature_addon` SET `path_id`=271140 WHERE `guid`=27114;
+DELETE FROM `waypoint_data` WHERE `id`=271140;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(271140,1,-1866.258911,1292.665039,90.267395,0,0,0,0,100,0),
+(271140,2,-1886.374634,1289.152222,90.551041,0,0,0,0,100,0),
+(271140,3,-1892.611328,1280.994873,91.166740,0,0,0,0,100,0),
+(271140,4,-1908.316772,1257.842529,93.266472,0,0,0,0,100,0),
+(271140,5,-1917.964233,1246.185059,92.404716,0,0,0,0,100,0),
+(271140,6,-1931.856934,1230.453003,91.080635,0,0,0,0,100,0),
+(271140,7,-1945.802490,1217.474487,90.822105,0,0,0,0,100,0),
+(271140,8,-1953.053955,1205.906982,90.199371,0,0,0,0,100,0),
+(271140,9,-1954.759521,1185.012451,90.546669,0,0,0,0,100,0),
+(271140,10,-1960.632080,1162.009644,92.740318,0,0,0,0,100,0),
+(271140,11,-1968.671509,1142.648438,92.969467,0,0,0,0,100,0),
+(271140,12,-1975.597656,1123.311523,98.838661,0,0,0,0,100,0),
+(271140,13,-1976.925781,1112.383911,100.757591,0,0,0,0,100,0),
+(271140,14,-1978.639648,1091.477661,104.626518,0,0,0,0,100,0),
+(271140,15,-1981.014648,1077.680664,108.600563,0,0,0,0,100,0),
+(271140,16,-1981.231812,1093.783081,104.649025,0,0,0,0,100,0),
+(271140,17,-1980.318115,1114.760254,100.730011,0,0,0,0,100,0),
+(271140,18,-1977.647827,1135.578613,98.110054,0,0,0,0,100,0),
+(271140,19,-1976.883911,1152.740601,92.612328,0,0,0,0,100,0),
+(271140,20,-1972.871948,1168.429443,92.369759,0,0,0,0,100,0),
+(271140,21,-1967.373779,1181.294678,91.924042,0,0,0,0,100,0),
+(271140,22,-1956.891968,1199.446533,90.469025,0,0,0,0,100,0),
+(271140,23,-1944.451538,1216.360474,90.741180,0,0,0,0,100,0),
+(271140,24,-1935.247192,1226.884766,90.725029,0,0,0,0,100,0),
+(271140,25,-1919.173584,1240.278442,91.884590,0,0,0,0,100,0),
+(271140,26,-1910.415283,1250.672729,92.707100,0,0,0,0,100,0),
+(271140,27,-1902.390259,1269.222412,93.079758,0,0,0,0,100,0),
+(271140,28,-1882.762817,1289.113037,89.803139,0,0,0,0,100,0);
+-- ====================================
+-- Path for Magram Pack Runner #27115
+-- ====================================
+UPDATE `creature` SET `MovementType`=2,`position_x`=-1743.915527,`position_y`=1068.425781,`position_z`=91.268845 WHERE `guid`=27115;
+UPDATE `creature_addon` SET `path_id`=271150 WHERE `guid`=27115;
+DELETE FROM `waypoint_data` WHERE `id`=271150;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(271150,1,-1743.915527,1068.425781,91.268845,0,0,0,0,100,0),
+(271150,2,-1736.558838,1082.173950,89.994659,0,0,0,0,100,0),
+(271150,3,-1731.699097,1095.289185,90.883049,0,0,0,0,100,0),
+(271150,4,-1722.143555,1114.410278,93.485123,0,0,0,0,100,0),
+(271150,5,-1709.042358,1125.708862,89.139664,0,0,0,0,100,0),
+(271150,6,-1699.357300,1128.252197,89.850990,0,0,0,0,100,0),
+(271150,7,-1683.567871,1130.573364,93.404541,0,0,0,0,100,0),
+(271150,8,-1667.459351,1123.953369,90.854866,0,0,0,0,100,0),
+(271150,9,-1656.821899,1116.278931,90.431404,0,0,0,0,100,0),
+(271150,10,-1646.577393,1106.751831,91.073830,0,0,0,0,100,0),
+(271150,11,-1631.150879,1093.422852,91.403458,0,0,0,0,100,0),
+(271150,12,-1621.821655,1082.984253,88.607735,0,0,0,0,100,0),
+(271150,13,-1611.260376,1069.123901,90.329842,0,0,0,0,100,0),
+(271150,14,-1604.194092,1057.039795,92.576813,0,0,0,0,100,0),
+(271150,15,-1594.728149,1034.252197,88.385590,0,0,0,0,100,0),
+(271150,16,-1595.609131,1021.981750,89.746979,0,0,0,0,100,0),
+(271150,17,-1604.221924,1005.585327,90.266022,0,0,0,0,100,0),
+(271150,18,-1615.037598,992.642090,90.368553,0,0,0,0,100,0),
+(271150,19,-1631.977051,980.254822,90.305595,0,0,0,0,100,0),
+(271150,20,-1647.029297,972.532104,90.763550,0,0,0,0,100,0),
+(271150,21,-1666.543457,964.811646,93.425499,0,0,0,0,100,0),
+(271150,22,-1679.549927,959.631775,91.412773,0,0,0,0,100,0),
+(271150,23,-1699.294800,952.516907,90.277832,0,0,0,0,100,0),
+(271150,24,-1717.125854,948.837036,90.326904,0,0,0,0,100,0),
+(271150,25,-1738.984375,950.498413,91.433197,0,0,0,0,100,0),
+(271150,26,-1759.411499,958.262085,92.419426,0,0,0,0,100,0),
+(271150,27,-1769.315063,968.137329,92.924309,0,0,0,0,100,0),
+(271150,28,-1783.742065,983.393127,95.142967,0,0,0,0,100,0),
+(271150,29,-1792.408325,994.340515,93.971786,0,0,0,0,100,0),
+(271150,30,-1800.310425,1011.053650,92.614510,0,0,0,0,100,0),
+(271150,31,-1793.093384,1027.993652,91.870705,0,0,0,0,100,0),
+(271150,32,-1772.457642,1046.897461,92.920769,0,0,0,0,100,0);
+-- ====================================
+-- assign the 6 Magram Bonepaws (guid 27601-27606) into groups with the 3 Magram Pack Runners (guid 27113-27115)
+-- ====================================
+DELETE FROM `creature_formations` WHERE `leaderGUID` BETWEEN 27113 AND 27115;
+INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`) VALUES
+(27113,27113,0,0,2),
+(27113,27601,3,20,2),
+(27113,27602,3,340,2),
+(27114,27114,0,0,2),
+(27114,27603,3,20,2),
+(27114,27604,3,340,2),
+(27115,27115,0,0,2),
+(27115,27605,3,20,2),
+(27115,27606,3,340,2);
+UPDATE creature c1, creature c2, `creature_formations` cf SET c1.position_x = c2.position_x, c1.position_y = c2.position_y, c1.position_z = c2.position_z WHERE c1.guid = cf.memberGUID AND c2.guid = cf.leaderGUID AND c1.guid IN (27601,27602,27603,27604,27605,27606);
+-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8608: Caliph Scorpidsting's guard formation
+-- Caliph Scorpidstring has two guards assigned (guid 23466 and 23467)
+-- but they are defined incorrectly as MovementType=2 with no waypoint data so they just sit at their spawn point and never moved
+-- This places them in a formation with Caliph Scorpidsting so that they follow him on his pathing
+DELETE FROM `creature_formations` WHERE `leaderGUID`=23286;
+INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`) VALUES
+(23286,23286,0,0,2),
+(23286,23466,4,30,2),
+(23286,23467,4,330,2);
diff --git a/sql/updates/world/2012_12_13_00_world.sql b/sql/updates/world/2012_12_13_00_world.sql
new file mode 100644
index 00000000000..ab27796f933
--- /dev/null
+++ b/sql/updates/world/2012_12_13_00_world.sql
@@ -0,0 +1,4 @@
+ALTER TABLE `creature_classlevelstats` ADD PRIMARY KEY (`level`, `class`);
+ALTER TABLE `playercreateinfo_item` ADD PRIMARY KEY (`race`, `class`, `itemid`); -- already got (race, class) index
+ALTER TABLE `spell_enchant_proc_data` ADD PRIMARY KEY (`entry`);
+ALTER TABLE `version` ADD PRIMARY KEY (`core_version`);
diff --git a/sql/updates/world/2012_12_14_00_world_conditions.sql b/sql/updates/world/2012_12_14_00_world_conditions.sql
new file mode 100644
index 00000000000..6b6fbfd02c0
--- /dev/null
+++ b/sql/updates/world/2012_12_14_00_world_conditions.sql
@@ -0,0 +1,4 @@
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9456;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(15,9456,0,0,0,9,0,12132,0,0,0,0,'','Koltira Deathweaver show gossip option if player has quest 12132'),
+(15,9456,0,0,0,1,0,47740,0,0,1,0,'','Koltira Deathweaver show gossip option if player has not aura World of Shadows');
diff --git a/sql/updates/world/2012_12_14_01_world_waypoint_data.sql b/sql/updates/world/2012_12_14_01_world_waypoint_data.sql
new file mode 100644
index 00000000000..e3589c53340
--- /dev/null
+++ b/sql/updates/world/2012_12_14_01_world_waypoint_data.sql
@@ -0,0 +1,188 @@
+SET @NPC := 131038;
+SET @PATH := @NPC*10;
+DELETE FROM `creature` WHERE `guid`=@NPC;
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+(@NPC,26933,571,1,1,0,0,3738.288,310.6056,206.0655,1.91463,120,0,0,1,0,2);
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,3738.288,310.6056,206.0655,0,0,0,100,0),
+(@PATH,2,3775.943,320.1521,206.0655,0,0,0,100,0),
+(@PATH,3,3791.984,364.0035,206.0655,0,0,0,100,0),
+(@PATH,4,3821.821,375.4122,206.0655,0,0,0,100,0),
+(@PATH,5,3862.769,402.7154,206.0655,0,0,0,100,0),
+(@PATH,6,3833.872,426.7561,206.0655,0,0,0,100,0),
+(@PATH,7,3796.899,413.8476,206.0655,0,0,0,100,0),
+(@PATH,8,3780.125,433.8598,206.0655,0,0,0,100,0),
+(@PATH,9,3736.043,443.3744,206.0655,0,0,0,100,0),
+(@PATH,10,3713.603,445.3026,206.0655,0,0,0,100,0),
+(@PATH,11,3683.613,406.9387,206.0655,0,0,0,100,0),
+(@PATH,12,3706.474,364.4982,206.0655,0,0,0,100,0),
+(@PATH,13,3712.073,324.8767,206.0655,0,0,0,100,0);
+
+DELETE FROM `waypoint_data` WHERE `id`=34760;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(34760,1 ,1527.534058,-4154.753418,40.633469,0,0,0,0,100,0),
+(34760,2 ,1538.660889,-4155.732910,40.592560,0,0,0,0,100,0),
+(34760,3 ,1544.449585,-4165.091797,40.235329,0,0,0,0,100,0),
+(34760,4 ,1549.555054,-4182.306152,40.612457,0,0,0,0,100,0),
+(34760,5 ,1546.198364,-4195.886719,41.639046,0,0,0,0,100,0),
+(34760,6 ,1546.507202,-4208.074219,42.972824,0,0,0,0,100,0),
+(34760,7 ,1563.277588,-4208.397949,43.588390,0,0,0,0,100,0),
+(34760,8 ,1580.304932,-4204.166992,42.040199,0,0,0,0,100,0),
+(34760,9 ,1579.333008,-4190.097656,40.364456,0,0,0,0,100,0),
+(34760,10,1578.215454,-4169.156250,36.905151,0,0,0,0,100,0),
+(34760,11,1583.998901,-4151.174316,34.014111,0,0,0,0,100,0),
+(34760,12,1598.492920,-4127.300293,30.541750,0,0,0,0,100,0),
+(34760,13,1617.180908,-4113.645508,29.638874,0,0,0,0,100,0),
+(34760,14,1636.737183,-4106.015625,30.359407,0,0,0,0,100,0),
+(34760,15,1656.451660,-4098.783691,33.361252,0,0,0,0,100,0),
+(34760,16,1682.917603,-4089.642822,37.421402,0,0,0,0,100,0),
+(34760,17,1703.152954,-4084.039551,40.476315,0,0,0,0,100,0),
+(34760,18,1726.875488,-4072.490234,43.763309,0,0,0,0,100,0),
+(34760,19,1731.973511,-4067.927002,44.831135,0,0,0,0,100,0),
+(34760,20,1741.482544,-4049.207031,44.283241,0,0,0,0,100,0),
+(34760,21,1745.628418,-4030.451172,45.169521,0,0,0,0,100,0),
+(34760,22,1745.231323,-4016.597412,45.969612,0,0,0,0,100,0),
+(34760,23,1740.649658,-3996.140625,46.610088,0,0,0,0,100,0),
+(34760,24,1729.449951,-3971.255615,48.347816,0,0,0,0,100,0),
+(34760,25,1723.011841,-3958.823730,49.068924,0,0,0,0,100,0),
+(34760,26,1708.968994,-3932.853760,50.349556,0,0,0,0,100,0),
+(34760,27,1721.805054,-3957.727295,49.226501,0,0,0,0,100,0),
+(34760,28,1734.530396,-3982.660156,47.613869,0,0,0,0,100,0),
+(34760,29,1740.518555,-4002.613770,46.854977,0,0,0,0,100,0),
+(34760,30,1743.422241,-4023.412109,46.146847,0,0,0,0,100,0),
+(34760,31,1742.478638,-4043.433350,44.345577,0,0,0,0,100,0),
+(34760,32,1735.912354,-4059.685303,44.504650,0,0,0,0,100,0),
+(34760,33,1729.070313,-4071.194092,44.119446,0,0,0,0,100,0),
+(34760,34,1714.267700,-4082.427490,40.937172,0,0,0,0,100,0),
+(34760,35,1696.915161,-4087.865967,38.582226,0,0,0,0,100,0),
+(34760,36,1676.688477,-4093.507080,36.173759,0,0,0,0,100,0),
+(34760,37,1656.776611,-4100.146484,33.436935,0,0,0,0,100,0),
+(34760,38,1637.123169,-4107.544922,30.447823,0,0,0,0,100,0),
+(34760,39,1617.755859,-4115.625000,29.678862,0,0,0,0,100,0),
+(34760,40,1597.177124,-4130.714844,31.122652,0,0,0,0,100,0),
+(34760,41,1590.612183,-4140.921875,32.565376,0,0,0,0,100,0),
+(34760,42,1578.348389,-4166.501953,36.404202,0,0,0,0,100,0),
+(34760,43,1578.059326,-4183.750488,39.244587,0,0,0,0,100,0),
+(34760,44,1578.675171,-4204.605957,42.405655,0,0,0,0,100,0),
+(34760,45,1569.681030,-4206.293457,43.517696,0,0,0,0,100,0),
+(34760,46,1548.253662,-4208.393555,43.110550,0,0,0,0,100,0),
+(34760,47,1544.526123,-4201.686035,42.132000,0,0,0,0,100,0),
+(34760,48,1549.644531,-4176.722656,40.245403,0,0,0,0,100,0),
+(34760,49,1547.767822,-4167.392578,39.779228,0,0,0,0,100,0),
+(34760,50,1541.973145,-4159.893555,40.252274,0,0,0,0,100,0);
+
+DELETE FROM `waypoint_data` WHERE `id`=389230 AND `point`=11 AND CONCAT(`position_z`)=21.8886;
+UPDATE `waypoint_data` SET `point`=18 WHERE `id`=798590 AND `point`=17 AND CONCAT(`position_z`)=86.8893;
+
+DELETE FROM `waypoint_data` WHERE `id`=1004880;
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_flag`, `action`, `action_chance`, `wpguid`) VALUES
+(1004880,1 , 3760.31, -5413.58, 26.5976, 0, 0, 0, 0, 100, 0),
+(1004880,2 , 3767.48, -5379.59, 37.1119, 0, 0, 0, 0, 100, 0),
+(1004880,3 , 3766.13, -5345.33, 53.1732, 0, 0, 0, 0, 100, 0),
+(1004880,4 , 3777.34, -5323.27, 63.4175, 0, 0, 0, 0, 100, 0),
+(1004880,5 , 3784.32, -5306.1, 69.4175, 0, 2000, 0, 1158, 100, 0),
+(1004880,6 , 3638.17, -5528.01, 15.9111, 0, 0, 0, 0, 100, 0),
+(1004880,7 , 3659.66, -5509.71, 18.4111, 0, 0, 0, 0, 100, 0),
+(1004880,8 , 3685.62, -5492.93, 17.1109, 0, 0, 0, 0, 100, 0),
+(1004880,9 , 3707.26, -5465.77, 22.0405, 0, 0, 0, 0, 100, 0),
+(1004880,10, 3740.28, -5445.48, 23.4599, 0, 0, 0, 0, 100, 0);
+
+DELETE FROM `waypoint_data` WHERE `id`=1004930;
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_flag`, `action`, `action_chance`, `wpguid`) VALUES
+(1004930,1, 3694.05, -5419.93, 29.8607, 0, 0, 0, 0, 100, 0),
+(1004930,2, 3703.84, -5410.59, 31.9159, 0, 0, 0, 0, 100, 0),
+(1004930,3, 3713.04, -5396.53, 35.2108, 0, 0, 0, 0, 100, 0),
+(1004930,4, 3736.31, -5388.52, 37.2879, 0, 0, 0, 0, 100, 0),
+(1004930,5, 3758.76, -5378.36, 37.9129, 0, 0, 0, 0, 100, 0),
+(1004930,6, 3771.44, -5360.71, 46.7247, 0, 2000, 0, 1156, 100, 0),
+(1004930,7, 3657.57, -5440.7, 26.5234, 0, 0, 0, 0, 100, 0),
+(1004930,8, 3679.07, -5423.48, 29.6107, 0, 0, 0, 0, 100, 0);
+
+DELETE FROM `waypoint_data` WHERE `id`=1005300;
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_flag`, `action`, `action_chance`, `wpguid`) VALUES
+(1005300,1 , 3706.62, -5237.35, 124.168, 0, 0, 0, 0, 100, 0),
+(1005300,2 , 3718.6, -5224.17, 125.384, 0, 0, 0, 0, 100, 0),
+(1005300,3 , 3725.75, -5214.71, 124.134, 0, 0, 0, 0, 100, 0),
+(1005300,4 , 3745.2, -5187.22, 120.89, 0, 2000, 0, 1157, 100, 0),
+(1005300,5 , 3519.54, -5462.26, 168.561, 0, 0, 0, 0, 100, 0),
+(1005300,6 , 3521.78, -5441.77, 164.311, 0, 0, 0, 0, 100, 0),
+(1005300,7 , 3520.97, -5424.06, 162.656, 0, 0, 0, 0, 100, 0),
+(1005300,8 , 3535.27, -5403.59, 156.172, 0, 0, 0, 0, 100, 0),
+(1005300,9 , 3549.19, -5384.1, 150.723, 0, 0, 0, 0, 100, 0),
+(1005300,10, 3558.99, -5362.74, 147.264, 0, 0, 0, 0, 100, 0),
+(1005300,11, 3575.57, -5347.88, 145.144, 0, 0, 0, 0, 100, 0),
+(1005300,12, 3591.95, -5333.96, 138.394, 0, 0, 0, 0, 100, 0),
+(1005300,13, 3614.07, -5316.79, 128.267, 0, 0, 0, 0, 100, 0),
+(1005300,14, 3629.8, -5303.53, 126.767, 0, 0, 0, 0, 100, 0),
+(1005300,15, 3653.6, -5275.46, 122.074, 0, 0, 0, 0, 100, 0),
+(1005300,16, 3673.5, -5264.86, 120.737, 0, 0, 0, 0, 100, 0),
+(1005300,17, 3694, -5250.39, 120.112, 0, 0, 0, 0, 100, 0);
+
+DELETE FROM `waypoint_data` WHERE `id`=1184060;
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_flag`, `action`, `action_chance`, `wpguid`) VALUES
+(1184060,1 , 2202.72, 5394.91, 39.1387, 0, 0, 0, 0, 100, 0),
+(1184060,2 , 2228.7, 5383.33, 41.9165, 0, 0, 0, 0, 100, 0),
+(1184060,3 , 2232.7, 5373.53, 41.111, 0, 0, 0, 0, 100, 0),
+(1184060,4 , 2222.01, 5361.25, 39.1387, 0, 0, 0, 0, 100, 0),
+(1184060,5 , 2198.15, 5369.98, 39.1387, 0, 0, 0, 0, 100, 0),
+(1184060,6 , 2175.98, 5386.82, 39.1387, 0, 0, 0, 0, 100, 0),
+(1184060,7 , 2168.55, 5427.55, 39.1387, 0, 0, 0, 0, 100, 0),
+(1184060,8 , 2152.3, 5456.32, 21.5832, 0, 0, 0, 0, 100, 0),
+(1184060,9 , 2121.99, 5462.54, 15.0276, 0, 0, 0, 0, 100, 0),
+(1184060,10, 2106.46, 5436.09, 7.52763, 0, 0, 0, 0, 100, 0),
+(1184060,11, 2118.35, 5421.9, 11.6109, 0, 0, 0, 0, 100, 0),
+(1184060,12, 2142.4, 5407.65, 26.111, 0, 0, 0, 0, 100, 0),
+(1184060,13, 2163.29, 5410.02, 34.7221, 0, 0, 0, 0, 100, 0),
+(1184060,14, 2175.98, 5410.9, 39.1387, 0, 0, 0, 0, 100, 0),
+(1184060,15, 2191.93, 5401.03, 39.1387, 0, 0, 0, 0, 100, 0);
+
+DELETE FROM `waypoint_data` WHERE `id`=1216840;
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_flag`, `action`, `action_chance`, `wpguid`) VALUES
+(1216840,1, 6156.09, -66.6786, 390.412, 0, 0, 0, 0, 100, 0),
+(1216840,2, 6157.94, -72.739, 390.412, 0, 0, 0, 0, 100, 0),
+(1216840,3, 6156.09, -66.6786, 390.412, 0, 0, 0, 0, 100, 0),
+(1216840,4, 6154.23, -60.7648, 390.412, 0, 0, 0, 0, 100, 0);
+
+DELETE FROM `waypoint_data` WHERE `id`=2026020;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(2026020,1,7024.75,-1625.538,957.3694,0,0,0,0,0,0),
+(2026020,2,7025.494,-1624.87,957.3694,0,0,0,0,0,0),
+(2026020,3,7167.578,-1501.694,962.5693,0,0,0,0,0,0),
+(2026020,4,7440.402,-1295.861,997.2911,0,0,0,0,0,0),
+(2026020,5,7210.958,-1046.892,1006.18,0,0,0,0,0,0),
+(2026020,6,6998.465,-1076.847,1024.819,0,0,0,0,0,0),
+(2026020,7,6874.249,-1097.382,927.736,0,0,0,0,0,0),
+(2026020,8,6614.792,-875.7547,812.7645,0,0,0,0,0,0),
+(2026020,9,6563.275,-811.7673,749.8757,0,0,0,0,0,0),
+(2026020,10,6299.502,-797.577,529.1257,0,0,0,0,0,0),
+(2026020,11,6194.549,-1013.144,501.5424,0,0,0,0,0,0),
+(2026020,12,6319.254,-1251.661,468.6258,0,0,0,0,0,0),
+(2026020,13,6309.161,-1537.857,615.0423,0,0,0,0,0,0),
+(2026020,14,6748.211,-1664.307,919.3118,0,0,0,0,0,0),
+(2026020,15,6913.308,-1725.261,954.7917,0,0,0,0,0,0),
+(2026020,16,7167.578,-1501.694,962.5693,0,0,0,0,0,0),
+(2026020,17,7440.402,-1295.861,997.2911,0,0,0,0,0,0);
+
+DELETE FROM `waypoint_data` WHERE `id` = 833780 AND `point` = 1 AND CONCAT(`position_x`) = 239.604 AND CONCAT(`position_y`) = -98.2138 AND CONCAT(`position_z`) = 26.5913;
+DELETE FROM `waypoint_data` WHERE `id` = 833780 AND `point` = 2 AND CONCAT(`position_x`) = 239.568 AND CONCAT(`position_y`) = -70.2138 AND CONCAT(`position_z`) = 26.5913;
+DELETE FROM `waypoint_data` WHERE `id` = 833780 AND `point` = 3 AND CONCAT(`position_x`) = 239.533 AND CONCAT(`position_y`) = -42.2138 AND CONCAT(`position_z`) = 26.5913;
+DELETE FROM `waypoint_data` WHERE `id` = 833780 AND `point` = 4 AND CONCAT(`position_x`) = 239.173 AND CONCAT(`position_y`) = -126.667 AND CONCAT(`position_z`) = 26.5913;
+
+DELETE FROM `waypoint_data` WHERE `id`=883750;
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_flag`, `action`, `action_chance`, `wpguid`) VALUES
+(883750, 1, -8541.23, 1144.3, 18.9831, 0, 3000, 0, 0, 100, 0),
+(883750, 2, -8538.3, 1149.52, 19.0522, 0, 2000, 0, 0, 100, 0),
+(883750, 3, -8538.3, 1149.52, 19.0522, 0, 15000, 0, 1029, 100, 0),
+(883750, 4, -8538.3, 1149.52, 19.0522, 0, 2000, 0, 0, 100, 0),
+(883750, 5, -8544.61, 1133.18, 18.1536, 0, 0, 0, 0, 100, 0),
+(883750, 6, -8551.97, 1118.55, 19.0523, 0, 0, 0, 0, 100, 0),
+(883750, 7, -8564.22, 1107.25, 19.0523, 0, 0, 0, 0, 100, 0),
+(883750, 8, -8566.66, 1101.82, 19.0523, 0, 2000, 0, 0, 100, 0),
+(883750, 9, -8566.66, 1101.82, 19.0523, 0, 15000, 0, 1030, 100, 0),
+(883750, 10, -8566.66, 1101.82, 19.0523, 0, 2000, 0, 0, 100, 0),
+(883750, 11, -8559.28, 1114.25, 19.0523, 0, 0, 0, 0, 100, 0);
+
+ALTER TABLE `waypoint_data` ADD PRIMARY KEY (`id`, `point`);
diff --git a/sql/updates/world/2012_12_14_02_world_misc.sql b/sql/updates/world/2012_12_14_02_world_misc.sql
new file mode 100644
index 00000000000..29aa47909e1
--- /dev/null
+++ b/sql/updates/world/2012_12_14_02_world_misc.sql
@@ -0,0 +1,15 @@
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (24750, 24751, 44436);
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(24750, 'spell_trick'),
+(24751, 'spell_trick_or_treat'),
+(44436, 'spell_tricky_treat');
+
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (42965,42966);
+INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
+(42965,42919,0, 'Hallows End - Tricky Treat'),
+(42966,-42965,0, 'Hallows End - Upset Tummy removes Tricky Treat'),
+(42966,-42919,0, 'Hallows End - Upset Tummy removes Tricky Treat');
+
+DELETE FROM `conditions` WHERE `SourceEntry`=44436 AND `SourceTypeOrReferenceId`=17;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(17, 0, 44436, 0, 0, 1, 0, 42966, 0, 0, 1, 0, '','Tricky Treat casted only if Upset Tummy aura is missing');
diff --git a/sql/updates/world/2012_12_14_03_world_npc_spellclick_spells.sql b/sql/updates/world/2012_12_14_03_world_npc_spellclick_spells.sql
new file mode 100644
index 00000000000..2669abbc562
--- /dev/null
+++ b/sql/updates/world/2012_12_14_03_world_npc_spellclick_spells.sql
@@ -0,0 +1 @@
+DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=30228;
diff --git a/sql/updates/world/2012_12_14_04_world_misc.sql b/sql/updates/world/2012_12_14_04_world_misc.sql
new file mode 100644
index 00000000000..2cd99cfb12a
--- /dev/null
+++ b/sql/updates/world/2012_12_14_04_world_misc.sql
@@ -0,0 +1,7 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=44436;
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(44436, 'spell_tricky_treat');
+
+DELETE FROM `waypoint_data` WHERE `id`=883750 AND `point`=3;
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_flag`, `action`, `action_chance`, `wpguid`) VALUES
+(883750, 3, -8538.3, 1149.52, 19.0522, 0, 15000, 0, 1029, 100, 0);
diff --git a/sql/updates/world/2012_12_14_05_world_spell_script_names.sql b/sql/updates/world/2012_12_14_05_world_spell_script_names.sql
new file mode 100644
index 00000000000..6d6ab651365
--- /dev/null
+++ b/sql/updates/world/2012_12_14_05_world_spell_script_names.sql
@@ -0,0 +1,10 @@
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (24750,24751,44436,-139,66118,67630,68646,68647);
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(24750, 'spell_hallow_end_trick'),
+(24751, 'spell_hallow_end_trick_or_treat'),
+(44436, 'spell_hallow_end_tricky_treat'),
+( -139, 'spell_pri_renew'),
+(66118, 'spell_anubarak_leeching_swarm'),
+(67630, 'spell_anubarak_leeching_swarm'),
+(68646, 'spell_anubarak_leeching_swarm'),
+(68647, 'spell_anubarak_leeching_swarm');
diff --git a/sql/updates/world/2012_12_15_00_world_waypoint_data.sql b/sql/updates/world/2012_12_15_00_world_waypoint_data.sql
new file mode 100644
index 00000000000..c63180ebe5e
--- /dev/null
+++ b/sql/updates/world/2012_12_15_00_world_waypoint_data.sql
@@ -0,0 +1,344 @@
+-- Issue 8629: Formation for alliance elites pathing in Barrens
+-- place 4 alliance elites in formation (guids 15145, 15246, 15169, 17433)
+-- they were not in a formation, but had the same path. This would
+-- cause them to be on top of each other rather than in a proper formation
+DELETE FROM `creature_formations` WHERE `memberGUID` IN (15145,15169,15246,17433);
+INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`) VALUES
+(15145,15145,0, 0,2),
+(15145,15169,4, 30,2),
+(15145,15246,4,330,2),
+(15145,17433,7, 0,2);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8630: Lady Vespia in Ashenvale - pathing
+-- this is a rare lacking its path, and instead there is a duplicate
+-- spawn in another location along the path
+-- Path for Lady Vespia #32384, remove duplicate #51887
+DELETE FROM `creature` WHERE `guid` = 51887;
+UPDATE `creature` SET `MovementType`=2,`position_x`=3722.429932,`position_y`=913.771790,`position_z`=1.002714,`currentwaypoint`=1 WHERE `guid` = 32384;
+UPDATE `creature_addon` SET `path_id` = 323840 WHERE `guid` = 32384;
+DELETE FROM `waypoint_data` WHERE `id`=323840;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(323840,1,3722.429932,913.771790,1.002714,0,0,0,0,100,0),
+(323840,2,3732.029053,904.330933,0.968114,0,0,0,0,100,0),
+(323840,3,3739.736328,895.524353,0.758106,0,0,0,0,100,0),
+(323840,4,3750.789551,880.084534,0.366120,0,0,0,0,100,0),
+(323840,5,3758.787354,867.507263,0.679295,0,0,0,0,100,0),
+(323840,6,3767.161865,856.288452,0.976484,0,0,0,0,100,0),
+(323840,7,3782.519043,843.848511,0.968118,0,0,0,0,100,0),
+(323840,8,3795.712402,840.702026,1.675440,0,0,0,0,100,0),
+(323840,9,3808.054688,838.972107,0.956729,0,0,0,0,100,0),
+(323840,10,3829.029541,839.984436,0.967158,0,0,0,0,100,0),
+(323840,11,3843.008545,840.750061,1.186359,0,0,0,0,100,0),
+(323840,12,3868.521484,844.503845,1.141360,0,0,0,0,100,0),
+(323840,13,3876.150635,850.337830,1.755279,0,0,0,0,100,0),
+(323840,14,3881.138672,864.115845,1.310831,0,0,0,0,100,0),
+(323840,15,3888.653076,865.323853,1.378022,0,0,0,0,100,0),
+(323840,16,3906.875488,866.120544,1.134151,0,0,0,0,100,0),
+(323840,17,3953.089355,864.282104,0.148911,0,0,0,0,100,0),
+(323840,18,3983.302734,857.571228,1.046788,0,0,0,0,100,0),
+(323840,19,4000.202637,860.725830,1.170438,0,0,0,0,100,0),
+(323840,20,4014.436035,868.470032,0.720758,0,0,0,0,100,0),
+(323840,21,4027.739258,883.203796,0.801679,0,0,0,0,100,0),
+(323840,22,4040.634277,896.320435,0.261184,0,0,0,0,100,0),
+(323840,23,4053.570068,909.003784,1.512342,0,0,0,0,100,0),
+(323840,24,4065.364258,911.439880,3.647654,0,0,0,0,100,0),
+(323840,25,4077.339111,909.210083,5.332397,0,0,0,0,100,0),
+(323840,26,4089.094971,903.189575,5.971728,0,0,0,0,100,0),
+(323840,27,4097.356934,901.196777,7.080781,0,0,0,0,100,0),
+(323840,28,4113.481934,897.701721,9.812309,0,0,0,0,100,0),
+(323840,29,4117.061035,886.646057,9.757087,0,0,0,0,100,0),
+(323840,30,4117.483887,870.737488,9.815219,0,0,0,0,100,0),
+(323840,31,4126.461426,866.358765,9.707480,0,0,0,0,100,0),
+(323840,32,4133.693359,864.304565,6.785762,0,0,0,0,100,0),
+(323840,33,4146.947754,861.233643,4.078417,0,0,0,0,100,0),
+(323840,34,4150.838867,864.035461,4.078417,0,0,0,0,100,0),
+(323840,35,4155.389160,871.403625,4.082621,0,0,0,0,100,0),
+(323840,36,4157.450684,877.767944,1.504079,0,0,0,0,100,0),
+(323840,37,4159.562012,886.388184,-1.458823,0,0,0,0,100,0),
+(323840,38,4157.624023,893.779236,-1.453992,0,0,0,0,100,0),
+(323840,39,4152.749512,898.931580,-1.453427,0,0,0,0,100,0),
+(323840,40,4147.643066,900.963562,-2.476280,0,0,0,0,100,0),
+(323840,41,4141.217773,902.808472,-5.821361,0,0,0,0,100,0),
+(323840,42,4135.142578,904.172913,-7.009238,0,0,0,0,100,0),
+(323840,43,4126.201660,900.406006,-7.008872,0,0,0,0,100,0),
+(323840,44,4123.505371,895.362976,-7.064267,0,0,0,0,100,0),
+(323840,45,4121.024902,888.352173,-10.009289,0,0,0,0,100,0),
+(323840,46,4118.931641,881.739380,-12.623049,0,0,0,0,100,0),
+(323840,47,4118.696777,874.418152,-12.563630,0,0,0,0,100,0),
+(323840,48,4124.143555,869.048279,-12.563630,0,0,0,0,100,0),
+(323840,49,4131.265625,865.740540,-14.077361,0,0,0,0,100,0),
+(323840,50,4127.223633,866.879333,-12.562355,0,0,0,0,100,0),
+(323840,51,4122.481445,869.654541,-12.562355,0,0,0,0,100,0),
+(323840,52,4117.991699,876.805542,-12.562355,0,0,0,0,100,0),
+(323840,53,4119.471191,886.473083,-11.126961,0,0,0,0,100,0),
+(323840,54,4121.210449,893.253479,-7.626825,0,0,0,0,100,0),
+(323840,55,4124.160645,900.132507,-7.007569,0,0,0,0,100,0),
+(323840,56,4129.967773,902.294678,-7.007569,0,0,0,0,100,0),
+(323840,57,4137.781738,903.702820,-7.009012,0,0,0,0,100,0),
+(323840,58,4143.771973,902.754822,-4.585012,0,0,0,0,100,0),
+(323840,59,4148.363281,901.231506,-2.167897,0,0,0,0,100,0),
+(323840,60,4155.444336,896.501953,-1.451832,0,0,0,0,100,0),
+(323840,61,4159.376465,886.155151,-1.458028,0,0,0,0,100,0),
+(323840,62,4158.670410,882.022095,-0.702407,0,0,0,0,100,0),
+(323840,63,4156.946777,875.238770,2.786326,0,0,0,0,100,0),
+(323840,64,4153.635254,865.145325,4.079946,0,0,0,0,100,0),
+(323840,65,4149.276855,863.342407,4.079946,0,0,0,0,100,0),
+(323840,66,4142.281250,863.443237,4.083534,0,0,0,0,100,0),
+(323840,67,4135.520996,863.820129,5.832601,0,0,0,0,100,0),
+(323840,68,4128.327637,866.176208,9.616565,0,0,0,0,100,0),
+(323840,69,4124.060059,869.521179,9.798268,0,0,0,0,100,0),
+(323840,70,4117.504883,877.208740,9.773583,0,0,0,0,100,0),
+(323840,71,4113.075195,883.248596,9.811710,0,0,0,0,100,0),
+(323840,72,4108.947754,885.473511,9.811710,0,0,0,0,100,0),
+(323840,73,4101.364258,894.021057,9.506009,0,0,0,0,100,0),
+(323840,74,4099.205566,901.251709,7.480323,0,0,0,0,100,0),
+(323840,75,4094.037109,900.019409,6.555405,0,0,0,0,100,0),
+(323840,76,4080.265869,902.525269,4.844516,0,0,0,0,100,0),
+(323840,77,4066.643311,905.211365,2.676093,0,0,0,0,100,0),
+(323840,78,4052.042480,900.388977,-0.015366,0,0,0,0,100,0),
+(323840,79,4036.894531,889.341431,0.380059,0,0,0,0,100,0),
+(323840,80,4015.933838,874.014709,0.399262,0,0,0,0,100,0),
+(323840,81,3996.318604,866.858826,1.082657,0,0,0,0,100,0),
+(323840,82,3960.317871,860.775940,0.167445,0,0,0,0,100,0),
+(323840,83,3952.938965,863.003601,0.241122,0,0,0,0,100,0),
+(323840,84,3940.339355,865.996704,0.925124,0,0,0,0,100,0),
+(323840,85,3919.454590,868.036560,1.203346,0,0,0,0,100,0),
+(323840,86,3898.702881,867.625793,1.277368,0,0,0,0,100,0),
+(323840,87,3881.742432,862.045654,1.276057,0,0,0,0,100,0),
+(323840,88,3877.997314,857.874329,1.554000,0,0,0,0,100,0),
+(323840,89,3874.550537,851.784485,1.574687,0,0,0,0,100,0),
+(323840,90,3867.740479,841.904846,1.197731,0,0,0,0,100,0),
+(323840,91,3851.134277,838.354553,0.993947,0,0,0,0,100,0),
+(323840,92,3809.334961,842.445557,0.796721,0,0,0,0,100,0),
+(323840,93,3781.462158,845.068787,0.967946,0,0,0,0,100,0),
+(323840,94,3770.630859,851.672424,0.967075,0,0,0,0,100,0),
+(323840,95,3759.555664,863.323792,0.992520,0,0,0,0,100,0),
+(323840,96,3739.665527,892.069092,0.734760,0,0,0,0,100,0),
+(323840,97,3729.475098,910.430786,0.967810,0,0,0,0,100,0),
+(323840,98,3716.260742,916.782471,1.253238,0,0,0,0,100,0),
+(323840,99,3705.518555,923.451660,1.566365,0,0,0,0,100,0),
+(323840,100,3693.323730,935.196167,3.147308,0,0,0,0,100,0),
+(323840,101,3682.386230,953.076477,1.517186,0,0,0,0,100,0),
+(323840,102,3675.434082,967.510315,2.468625,0,0,0,0,100,0),
+(323840,103,3677.183594,984.396912,0.705175,0,0,0,0,100,0);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8631: Prince Raze in Ashenvale - pathing
+-- this is a rare lacking its path,and instead there is a duplicate
+-- spawn in another location along the path
+-- Path for Prince Raze #32914,remove duplicate #51863
+DELETE FROM `creature` WHERE `guid` = 51863;
+UPDATE `creature` SET `MovementType`=2,`position_x`=2808.241455,`position_y`=-3003.126709,`position_z`=157.067291,`currentwaypoint`=1 WHERE `guid` = 32914;
+UPDATE `creature_addon` SET `path_id` = 329140 WHERE `guid` = 32914;
+DELETE FROM `waypoint_data` WHERE `id`=329140;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(329140,1,2808.241455,-3003.126709,157.067291,0,0,0,0,100,0),
+(329140,2,2811.392090,-2991.734619,155.334320,0,0,0,0,100,0),
+(329140,3,2808.639160,-2972.097412,155.101013,0,0,0,0,100,0),
+(329140,4,2804.842773,-2959.183350,152.490417,0,0,0,0,100,0),
+(329140,5,2805.551270,-2938.301270,154.462799,0,0,0,0,100,0),
+(329140,6,2814.461182,-2921.440918,163.474411,0,0,0,0,100,0),
+(329140,7,2818.510498,-2918.647461,166.685257,0,0,0,0,100,0),
+(329140,8,2840.341797,-2914.930176,183.502121,0,0,0,0,100,0),
+(329140,9,2854.309326,-2914.024170,192.161575,0,0,0,0,100,0),
+(329140,10,2871.512939,-2911.204834,198.770233,0,0,0,0,100,0),
+(329140,11,2882.424561,-2903.183594,201.184616,0,0,0,0,100,0),
+(329140,12,2888.192871,-2886.370850,203.285019,0,0,0,0,100,0),
+(329140,13,2892.449463,-2865.810547,203.822342,0,0,0,0,100,0),
+(329140,14,2898.969971,-2852.818848,207.158493,0,0,0,0,100,0),
+(329140,15,2908.747559,-2844.036377,209.318665,0,0,0,0,100,0),
+(329140,16,2926.231689,-2833.183350,211.338501,0,0,0,0,100,0),
+(329140,17,2943.589355,-2830.331543,212.665710,0,0,0,0,100,0),
+(329140,18,2953.075439,-2824.161621,212.613983,0,0,0,0,100,0),
+(329140,19,2964.846191,-2820.930420,211.645081,0,0,0,0,100,0),
+(329140,20,2978.736084,-2819.183350,209.463913,0,0,0,0,100,0),
+(329140,21,3001.006836,-2818.457031,206.082977,0,0,0,0,100,0),
+(329140,22,3022.530762,-2814.136230,203.552109,0,0,0,0,100,0),
+(329140,23,3035.244629,-2811.006836,198.437698,0,0,0,0,100,0),
+(329140,24,3040.000488,-2799.580811,195.965454,0,0,0,0,100,0),
+(329140,25,3035.478760,-2809.662354,198.041458,0,0,0,0,100,0),
+(329140,26,3024.454102,-2819.712158,202.394180,0,0,0,0,100,0),
+(329140,27,3006.513916,-2818.985107,205.280838,0,0,0,0,100,0),
+(329140,28,2984.259277,-2818.399902,209.399185,0,0,0,0,100,0),
+(329140,29,2970.594238,-2821.382324,210.345764,0,0,0,0,100,0),
+(329140,30,2952.682373,-2822.796875,212.661163,0,0,0,0,100,0),
+(329140,31,2942.465332,-2830.031982,212.665604,0,0,0,0,100,0),
+(329140,32,2930.226318,-2831.118164,211.663055,0,0,0,0,100,0),
+(329140,33,2915.546875,-2835.999512,209.535995,0,0,0,0,100,0),
+(329140,34,2904.552246,-2845.870850,208.518188,0,0,0,0,100,0),
+(329140,35,2889.942871,-2865.736084,203.493179,0,0,0,0,100,0),
+(329140,36,2887.777344,-2881.864746,203.374954,0,0,0,0,100,0),
+(329140,37,2884.007080,-2899.519775,202.008667,0,0,0,0,100,0),
+(329140,38,2875.229492,-2911.850098,199.338211,0,0,0,0,100,0),
+(329140,39,2862.768311,-2914.375977,196.399612,0,0,0,0,100,0),
+(329140,40,2850.098877,-2914.262207,189.543320,0,0,0,0,100,0),
+(329140,41,2843.341309,-2912.349365,185.238174,0,0,0,0,100,0),
+(329140,42,2829.395752,-2911.120605,175.736130,0,0,0,0,100,0),
+(329140,43,2818.509521,-2910.984131,166.842010,0,0,0,0,100,0),
+(329140,44,2808.092773,-2915.233643,159.118347,0,0,0,0,100,0),
+(329140,45,2804.951660,-2931.008545,155.843887,0,0,0,0,100,0),
+(329140,46,2806.345703,-2945.017822,154.086060,0,0,0,0,100,0),
+(329140,47,2807.287842,-2956.843994,153.169250,0,0,0,0,100,0),
+(329140,48,2807.587891,-2963.081055,153.936203,0,0,0,0,100,0),
+(329140,49,2808.624512,-2969.800537,155.047455,0,0,0,0,100,0),
+(329140,50,2813.630615,-2989.589600,155.539047,0,0,0,0,100,0),
+(329140,51,2810.635986,-2998.342529,156.787384,0,0,0,0,100,0);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8632: Rorgis Jowl in Ashenvale - pathing
+-- Path for Rorgis Jowl #32869
+UPDATE `creature` SET `MovementType`=2,`position_x`=3265.909912,`position_y`=-365.719818,`position_z`=153.103470,`currentwaypoint`=1 WHERE `guid` = 32869;
+UPDATE `creature_addon` SET `path_id` = 328690 WHERE `guid` = 32869;
+DELETE FROM `waypoint_data` WHERE `id`=328690;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(328690,1,3265.909912,-365.719818,153.103470,0,0,0,0,100,0),
+(328690,2,3273.110840,-371.723724,152.879028,0,0,0,0,100,0),
+(328690,3,3278.832275,-382.906128,152.523438,0,0,0,0,100,0),
+(328690,4,3290.602295,-408.267151,150.345276,0,0,0,0,100,0),
+(328690,5,3307.686523,-430.401825,149.835861,0,0,0,0,100,0),
+(328690,6,3320.117676,-447.278168,150.562851,0,0,0,0,100,0),
+(328690,7,3336.108154,-470.102722,153.994934,0,0,0,0,100,0),
+(328690,8,3347.987305,-480.422211,154.224228,0,0,0,0,100,0),
+(328690,9,3358.450439,-476.938568,154.218155,0,0,0,0,100,0),
+(328690,10,3365.435547,-464.821289,154.220810,0,0,0,0,100,0),
+(328690,11,3370.219482,-452.802338,153.902512,0,0,0,0,100,0),
+(328690,12,3384.146973,-428.400848,149.321747,0,0,0,0,100,0),
+(328690,13,3392.826660,-417.417175,146.746826,0,0,0,0,100,0),
+(328690,14,3405.046387,-403.259644,143.910614,0,0,0,0,100,0),
+(328690,15,3421.904541,-390.824982,139.321136,0,0,0,0,100,0),
+(328690,16,3434.331055,-384.391785,135.793793,0,0,0,0,100,0),
+(328690,17,3447.364990,-378.007141,135.662186,0,0,0,0,100,0),
+(328690,18,3434.159668,-382.636597,135.496231,0,0,0,0,100,0),
+(328690,19,3421.415283,-388.368469,138.450043,0,0,0,0,100,0),
+(328690,20,3404.063721,-400.144897,143.263397,0,0,0,0,100,0),
+(328690,21,3390.340332,-412.986176,145.812714,0,0,0,0,100,0),
+(328690,22,3377.259033,-421.769073,148.559967,0,0,0,0,100,0),
+(328690,23,3362.353027,-430.288391,151.450409,0,0,0,0,100,0),
+(328690,24,3349.057861,-433.942139,151.799011,0,0,0,0,100,0),
+(328690,25,3333.835205,-433.346802,150.422485,0,0,0,0,100,0),
+(328690,26,3318.930664,-428.625763,149.402405,0,0,0,0,100,0),
+(328690,27,3307.989014,-420.835663,149.473190,0,0,0,0,100,0),
+(328690,28,3293.188721,-405.975098,150.441910,0,0,0,0,100,0),
+(328690,29,3284.596191,-394.927856,151.113251,0,0,0,0,100,0),
+(328690,30,3275.517822,-378.112610,152.894287,0,0,0,0,100,0),
+(328690,31,3269.427979,-368.935364,153.063339,0,0,0,0,100,0);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8633: Branch Snapper in Ashenvale - pathing
+-- Path for Branch Snapper #51882
+UPDATE `creature` SET `MovementType`=2,`position_x`=2971.350098,`position_y`=-982.097900,`position_z`=198.683380,`currentwaypoint`=1 WHERE `guid` = 51882;
+DELETE FROM `creature_addon` WHERE `guid` = 51882;
+INSERT INTO `creature_addon` (`guid`,`path_id`) VALUES (51882,518820);
+DELETE FROM `waypoint_data` WHERE `id`=518820;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(518820,1,2971.350098,-982.097900,198.683380,0,0,0,0,100,0),
+(518820,2,2971.690918,-962.483948,198.426682,0,0,0,0,100,0),
+(518820,3,2968.384521,-941.765564,200.709015,0,0,0,0,100,0),
+(518820,4,2965.152344,-928.147766,198.484497,0,0,0,0,100,0),
+(518820,5,2952.836670,-910.756836,197.443298,0,0,0,0,100,0),
+(518820,6,2938.869141,-905.128601,197.099640,0,0,0,0,100,0),
+(518820,7,2919.632568,-903.527100,198.155716,0,0,0,0,100,0),
+(518820,8,2903.414307,-903.434143,197.123611,0,0,0,0,100,0),
+(518820,9,2885.066162,-906.786804,197.560242,0,0,0,0,100,0),
+(518820,10,2867.496582,-918.221313,198.913681,0,0,0,0,100,0),
+(518820,11,2856.638184,-927.044983,199.210022,0,0,0,0,100,0),
+(518820,12,2840.306152,-940.243774,198.580444,0,0,0,0,100,0),
+(518820,13,2819.923340,-952.546692,196.251236,0,0,0,0,100,0),
+(518820,14,2812.915527,-966.389648,195.477539,0,0,0,0,100,0),
+(518820,15,2813.452637,-983.662659,197.860260,0,0,0,0,100,0),
+(518820,16,2821.784180,-1002.938599,197.072479,0,0,0,0,100,0),
+(518820,17,2830.527100,-1018.294495,198.959946,0,0,0,0,100,0),
+(518820,18,2839.100586,-1026.947266,197.751938,0,0,0,0,100,0),
+(518820,19,2862.386719,-1035.757080,197.902298,0,0,0,0,100,0),
+(518820,20,2876.326660,-1037.055908,198.182755,0,0,0,0,100,0),
+(518820,21,2897.217041,-1039.198364,198.248016,0,0,0,0,100,0),
+(518820,22,2911.110352,-1040.886230,197.331467,0,0,0,0,100,0),
+(518820,23,2934.677002,-1045.407104,196.986130,0,0,0,0,100,0),
+(518820,24,2946.637451,-1040.841553,197.254547,0,0,0,0,100,0),
+(518820,25,2958.366455,-1029.786133,197.856155,0,0,0,0,100,0),
+(518820,26,2968.661621,-1011.250610,197.917145,0,0,0,0,100,0);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8634: Akkrilus in Ashenvale - pathing
+-- Path for Akkrilus #51883
+UPDATE `creature` SET `MovementType`=2,`position_x`=2230.626221,`position_y`=222.503265,`position_z`=134.671127,`currentwaypoint`=1 WHERE `guid` = 51883;
+DELETE FROM `creature_addon` WHERE `guid` = 51883;
+INSERT INTO `creature_addon` (`guid`,`path_id`) VALUES (51883,518830);
+DELETE FROM `waypoint_data` WHERE `id`=518830;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(518830,1,2230.626221,222.503265,134.671127,0,0,0,0,100,0),
+(518830,2,2224.842773,204.381668,131.745773,0,0,0,0,100,0),
+(518830,3,2224.397461,186.195084,128.542633,0,0,0,0,100,0),
+(518830,4,2224.783691,165.252151,121.905479,0,0,0,0,100,0),
+(518830,5,2228.541992,144.604492,115.583405,0,0,0,0,100,0),
+(518830,6,2234.316162,129.033264,110.983452,0,0,0,0,100,0),
+(518830,7,2246.995850,104.069115,105.569809,0,0,0,0,100,0),
+(518830,8,2259.200195,85.328667,102.283875,0,0,0,0,100,0),
+(518830,9,2272.217529,73.944885,99.108376,0,0,0,0,100,0),
+(518830,10,2289.473145,65.154480,96.752800,0,0,0,0,100,0),
+(518830,11,2303.842529,63.234364,95.158028,0,0,0,0,100,0),
+(518830,12,2324.819580,62.301811,92.302200,0,0,0,0,100,0),
+(518830,13,2315.044678,61.647449,94.050667,0,0,0,0,100,0),
+(518830,14,2294.266602,64.414993,96.811752,0,0,0,0,100,0),
+(518830,15,2274.864502,73.553665,98.970840,0,0,0,0,100,0),
+(518830,16,2262.320557,85.840591,101.911362,0,0,0,0,100,0),
+(518830,17,2251.133057,95.907051,104.024017,0,0,0,0,100,0),
+(518830,18,2236.551025,110.107979,108.169083,0,0,0,0,100,0),
+(518830,19,2227.548340,124.708336,110.385513,0,0,0,0,100,0),
+(518830,20,2222.801758,143.517090,116.077888,0,0,0,0,100,0),
+(518830,21,2219.976563,164.319946,122.124672,0,0,0,0,100,0),
+(518830,22,2218.412598,184.548325,128.981644,0,0,0,0,100,0),
+(518830,23,2219.249023,198.518890,131.665329,0,0,0,0,100,0),
+(518830,24,2220.353516,219.485901,133.995987,0,0,0,0,100,0),
+(518830,25,2222.075684,244.729797,134.205353,0,0,0,0,100,0),
+(518830,26,2224.536377,261.256378,134.331970,0,0,0,0,100,0),
+(518830,27,2229.941895,281.548462,133.522369,0,0,0,0,100,0),
+(518830,28,2236.282471,301.551971,133.194031,0,0,0,0,100,0),
+(518830,29,2240.797363,314.802246,133.413681,0,0,0,0,100,0),
+(518830,30,2246.947021,334.861572,130.498993,0,0,0,0,100,0),
+(518830,31,2252.275635,347.803162,129.387589,0,0,0,0,100,0),
+(518830,32,2261.552246,366.643127,129.971725,0,0,0,0,100,0),
+(518830,33,2270.846436,385.474365,129.803040,0,0,0,0,100,0),
+(518830,34,2280.354004,399.463409,130.359802,0,0,0,0,100,0),
+(518830,35,2293.543945,412.130554,130.348328,0,0,0,0,100,0),
+(518830,36,2304.319580,421.066528,129.609512,0,0,0,0,100,0),
+(518830,37,2321.469482,433.147339,128.849838,0,0,0,0,100,0),
+(518830,38,2336.443604,441.356476,123.324211,0,0,0,0,100,0),
+(518830,39,2355.435059,450.315521,116.676407,0,0,0,0,100,0),
+(518830,40,2365.592285,455.130249,114.194473,0,0,0,0,100,0),
+(518830,41,2353.159180,449.219360,117.543526,0,0,0,0,100,0),
+(518830,42,2340.275391,443.741028,122.071327,0,0,0,0,100,0),
+(518830,43,2327.483887,438.059875,126.869530,0,0,0,0,100,0),
+(518830,44,2310.080078,428.210297,128.501328,0,0,0,0,100,0),
+(518830,45,2299.125244,419.506104,129.949829,0,0,0,0,100,0),
+(518830,46,2288.756104,410.103882,130.291275,0,0,0,0,100,0),
+(518830,47,2274.876221,394.387665,129.901978,0,0,0,0,100,0),
+(518830,48,2267.130615,382.738708,129.731949,0,0,0,0,100,0),
+(518830,49,2257.433350,364.646637,129.959579,0,0,0,0,100,0),
+(518830,50,2251.866943,351.801178,129.571732,0,0,0,0,100,0),
+(518830,51,2244.710938,332.076782,131.140259,0,0,0,0,100,0),
+(518830,52,2240.668945,318.680450,133.109680,0,0,0,0,100,0),
+(518830,53,2236.625977,305.276886,133.475372,0,0,0,0,100,0),
+(518830,54,2231.740234,284.870972,133.536728,0,0,0,0,100,0),
+(518830,55,2230.472412,271.257019,134.439743,0,0,0,0,100,0),
+(518830,56,2229.767334,252.587219,134.871262,0,0,0,0,100,0),
+(518830,57,2228.250000,238.221497,135.416504,0,0,0,0,100,0);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8635: Terrowulf Pack Lord in Ashenvale - pathing
+-- Path for Terrowulf Pack Lord #51870
+UPDATE `creature` SET `MovementType`=2,`position_x`=3150.399902,`position_y`=-1170.138062,`position_z`=217.299103,`currentwaypoint`=1 WHERE `guid` = 51870;
+DELETE FROM `creature_addon` WHERE `guid` = 51870;
+INSERT INTO `creature_addon` (`guid`,`path_id`) VALUES (51870,518700);
+DELETE FROM `waypoint_data` WHERE `id`=518700;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(518700,1,3150.399902,-1170.138062,217.299103,0,0,0,0,100,0),
+(518700,2,3150.364258,-1176.916138,217.212677,0,0,0,0,100,0),
+(518700,3,3151.549072,-1184.704468,216.956177,0,0,0,0,100,0),
+(518700,4,3154.039307,-1195.630127,216.413452,0,0,0,0,100,0),
+(518700,5,3157.339600,-1200.890625,215.839249,0,0,0,0,100,0),
+(518700,6,3162.611328,-1203.641479,215.186890,0,0,0,0,100,0),
+(518700,7,3167.498779,-1202.496216,214.795517,0,0,0,0,100,0),
+(518700,8,3169.949463,-1199.822632,214.695114,0,0,0,0,100,0),
+(518700,9,3174.424316,-1191.442871,214.546326,0,0,0,0,100,0),
+(518700,10,3176.167969,-1184.175903,214.374252,0,0,0,0,100,0),
+(518700,11,3175.641846,-1176.006592,214.256958,0,0,0,0,100,0),
+(518700,12,3170.866699,-1170.889526,214.670517,0,0,0,0,100,0),
+(518700,13,3165.246826,-1166.603638,215.211517,0,0,0,0,100,0),
+(518700,14,3156.909180,-1163.954956,216.297623,0,0,0,0,100,0);
+
diff --git a/sql/updates/world/2012_12_15_01_world_sai.sql b/sql/updates/world/2012_12_15_01_world_sai.sql
new file mode 100644
index 00000000000..6d43bedc446
--- /dev/null
+++ b/sql/updates/world/2012_12_15_01_world_sai.sql
@@ -0,0 +1,95 @@
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 8644: EAI->SAI - Urom adds
+-- Convert EAI -> SAI and not sure, if I even changed something, but I checked and stuff were working correct (as of mechanics).
+SET @P_Murloc := 27649;
+SET @P_Cloudscraper := 27645;
+SET @P_Mammoth := 27642;
+SET @P_Wolf := 27644;
+SET @P_Air := 27650;
+SET @P_Water := 27653;
+SET @P_Fire := 27651;
+SET @P_Ogre := 27647;
+SET @P_Naga := 27648;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@P_Murloc,@P_Cloudscraper,@P_Mammoth,@P_Wolf,@P_Air,@P_Water,@P_Fire,@P_Ogre,@P_Naga);
+DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (@P_Murloc,@P_Cloudscraper,@P_Mammoth,@P_Wolf,@P_Air,@P_Water,@P_Fire,@P_Ogre,@P_Naga);
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (@P_Murloc,@P_Cloudscraper,@P_Mammoth,@P_Wolf,@P_Air,@P_Water,@P_Fire,@P_Ogre,@P_Naga);
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@P_Murloc,0,0,0,0,0,100,0,1000,3000,13000,16000,11,54074,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Murloc - IC - Cast poison'),
+(@P_Naga,0,0,0,0,0,100,2,9000,12000,13000,16000,11,50732,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Naga - IC /Normal/ - Cast Water Tomb'),
+(@P_Naga,0,1,0,0,0,100,4,9000,12000,13000,16000,11,59261,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Naga - IC /Heroic/ - Cast Water Tomb'),
+(@P_Naga,0,2,0,0,0,100,2,1000,3000,9000,12000,11,49711,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Phantasmal Naga - IC /Normal/ - Cast Water Tomb'),
+(@P_Naga,0,3,0,0,0,100,4,1000,3000,9000,12000,11,59260,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Phantasmal Naga - IC /Heroic/ - Cast Water Tomb'),
+(@P_Ogre,0,0,0,2,0,100,0,30,30,20000,24000,11,50730,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Ogre - On 30% - Cast Bloodlust at 30% HP'),
+(@P_Ogre,0,1,0,0,0,100,0,3000,7000,9000,12000,11,50731,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Ogre - IC - Cast Mace Smash'),
+(@P_Cloudscraper,0,0,0,0,0,100,4,3000,5000,4000,6000,11,59223,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Cloudscraper - IC /Heroic/ - Cast Chain Lightning'),
+(@P_Cloudscraper,0,1,0,0,0,100,2,3000,7000,9000,12000,11,59220,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Cloudscraper - IC /Normal/ - Cast Chain Lightning'),
+(@P_Cloudscraper,0,2,0,0,0,100,2,7000,10000,12000,15000,11,15588,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Cloudscraper - IC /Normal/ - Cast Thunderclap'),
+(@P_Cloudscraper,0,3,0,0,0,100,4,7000,10000,12000,15000,11,59217,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Cloudscraper - IC /Heroic/ - Cast Thunderclap'),
+(@P_Mammoth,0,0,0,9,0,100,0,8,25,2000,2500,11,32323,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Mammoth - IC - Cast Charge'),
+(@P_Mammoth,0,1,0,0,0,100,0,4000,7000,12000,15000,11,59274,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Mammoth - IC - Cast Trample'),
+(@P_Wolf,0,0,0,0,0,100,2,10000,13000,18000,24000,11,50728,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Wolf - IC /Normal/ - Cast Furious Howl'),
+(@P_Wolf,0,1,0,0,0,100,4,10000,13000,18000,24000,11,59274,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Wolf - IC /Heroic/ - Cast Furious Howl'),
+(@P_Wolf,0,2,0,0,0,100,2,4000,9000,9000,12000,11,50729,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Wolf - IC /Normal/ - Cast Carnivorous Bite'),
+(@P_Wolf,0,3,0,0,0,100,4,4000,9000,9000,12000,11,59269,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Wolf - IC /Heroic/ - Cast Carnivorous Bite'),
+(@P_Air,0,0,0,4,0,100,5,0,0,0,0,11,20545,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Air - On aggro /Heroic/ - Cast Lightning Shield'),
+(@P_Air,0,1,0,4,0,100,3,0,0,0,0,11,25020,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Air - On aggro /Normal/ - Cast Lightning Shield'),
+(@P_Fire,0,0,0,0,0,100,2,3000,8000,5000,9000,11,50744,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Fire - IC /Normla/ - Cast Blaze'),
+(@P_Fire,0,1,0,0,0,100,4,3000,8000,5000,9000,11,59225,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Fire - IC /Heroic/ - Cast Blaze'),
+(@P_Water,0,0,1,54,0,100,1,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Water - On spawn - Disable combat movement'),
+(@P_Water,0,1,0,61,0,100,1,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Water - Linked with previous event - Set phase 0'),
+(@P_Water,0,2,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Water - On Evade - Set phase 0'),
+(@P_Water,0,3,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Water - On In Range /0-5/ - Allow combat movement'),
+(@P_Water,0,4,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Water - On In Range /5-15/ - Disable combat movement'),
+(@P_Water,0,5,0,9,1,100,0,30,80,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Water - On In Range /30-80/ - Allow combat movement'),
+(@P_Water,0,6,7,3,1,100,0,0,7,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Water - On mana pct below 7% - Allow combat movement'),
+(@P_Water,0,7,0,61,1,100,0,0,0,0,0,23,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Water - Linked with previous event - Increment phase by 1'),
+(@P_Water,0,8,0,3,2,100,0,15,100,100,100,23,0,1,0,0,0,0,1,0,0,0,0,0,0,0, 'Phantasmal Water - On mana pct above 15% - Decrement phase by 1'),
+(@P_Water,0,9,10,4,0,100,3,0,0,0,0,11,37924,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Water - On aggro - Cast Water Bolt Volley'),
+(@P_Water,0,10,0,61,0,100,3,0,0,0,0,23,1,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Water - IC /Heroic/ - Increment phase by 1'),
+(@P_Water,0,11,12,4,0,100,5,0,0,0,0,11,59266,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Water - On aggro - Cast Water Bolt Volley'),
+(@P_Water,0,12,0,61,0,100,5,0,0,0,0,23,1,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Water - IC /Heroic/ - Increment phase by 1'),
+(@P_Water,0,13,0,9,1,100,2,0,35,3400,4800,11,37924,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Water - In range - Cast Water Bolt Volley'),
+(@P_Water,0,14,0,9,1,100,4,0,35,3400,4800,11,59266,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Phantasmal Water - In range - Cast Water Bolt Volley');
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Fix quest: Whelps of the Wyrmcult http://www.wowhead.com/quest=10747
+-- TO DO: Find why movement of the whelps is not prevented even, if unit flags are set from sniff values and contain disable move flag (not quest breaking by any means, most likely core handling bug somewhere).
+-- ID indexes
+SET @Blackwhelp := 21387;
+SET @CreateItem := 38178;
+SET @BlackwhelpNet := 38177;
+SET @Script := @Blackwhelp * 100;
+-- Add SAI support for Wyrmcult Blackwhelp
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Blackwhelp;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@Blackwhelp;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Blackwhelp AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Script AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@Blackwhelp,0,0,1,54,0,100,1,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - On spawn - Disable combat movement'),
+(@Blackwhelp,0,1,0,61,0,100,1,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Linked with previous event - Set phase 0'),
+(@Blackwhelp,0,2,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - On Evade - Set phase 0'),
+(@Blackwhelp,0,3,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - On In Range /0-5/ - Allow combat movement'),
+(@Blackwhelp,0,4,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - On In Range /5-15/ - Disable combat movement'),
+(@Blackwhelp,0,5,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - On In Range /35-80/ - Allow combat movement'),
+(@Blackwhelp,0,6,7,3,1,100,1,0,7,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - On mana pct below 7% - Allow combat movement'),
+(@Blackwhelp,0,7,0,61,1,100,0,0,0,0,0,23,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Linked with previous event - Increment phase by 1'),
+(@Blackwhelp,0,8,0,3,2,100,1,7,100,100,100,23,0,1,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - On mana pct above 7% - Decrement phase by 1'),
+(@Blackwhelp,0,9,10,4,0,100,1,0,0,0,0,11,19816,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - On aggro - Cast Fireball'),
+(@Blackwhelp,0,10,0,61,0,100,0,0,0,0,0,23,1,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Linked with previous event - Increment phase by 1'),
+(@Blackwhelp,0,11,0,5,1,100,0,0,40,3500,5200,11,19816,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - In range - Cast Fire Ball'),
+(@Blackwhelp,0,12,0,8,0,100,1,@BlackwhelpNet,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - On spellhit by net - Start actionlist'),
+(@Script,9,0,0,0,0,100,0,0,0,0,0,90,7,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Action 1 - SET UNIT FIELD BYTES 1'),
+(@Script,9,1,0,0,0,100,0,0,0,0,0,18,663552,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Action 2 - Set unit flags'),
+(@Script,9,2,0,0,0,100,0,5000,5000,0,0,11,38178,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Action 3 - Cast credit spell to invoker'),
+(@Script,9,3,0,0,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Action 4 - Set unseen'),
+(@Script,9,4,0,0,0,100,0,0,0,0,0,19,663552,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Action 5 - Remove unit flags'),
+(@Script,9,5,0,0,0,100,0,0,0,0,0,91,7,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Action 6 - Remove unit field bytes 1'),
+(@Script,9,6,0,0,0,100,0,0,0,0,0,41,100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wyrmcult Blackwhelp - Action 7 - Despawn after 100 ms');
+-- This is not directly related to the quest, but was on my way and it improves the experience of the quest
+-- Insert missing go that is spawned by another go with a spell and can't be sniffed in order to cast spell that summon whelp (the difference in models is correct, also this double trap makes a lot of sense based on the video for the quest, on top of that there is delay set)
+DELETE FROM `gameobject_template` WHERE `entry`=184839;
+INSERT INTO `gameobject_template` (`entry`,`type`,`displayId`,`name`,`IconName`,`castBarCaption`,`unk1`,`faction`,`flags`,`size`,`questItem1`,`questItem2`,`questItem3`,`questItem4`,`questItem5`,`questItem6`,`data0`,`data1`,`data2`,`data3`,`data4`,`data5`,`data6`,`data7`,`data8`,`data9`,`data10`,`data11`,`data12`,`data13`,`data14`,`data15`,`data16`,`data17`,`data18`,`data19`,`data20`,`data21`,`data22`,`data23`,`AIName`,`ScriptName`,`WDBVerified`) VALUES
+(184839,6,477, 'Wyrmcult Egg Spawner','','','',1827,0,1,0,0,0,0,0,0,0,0,5,36903,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',-1);
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 4942: Galen's Escape
+-- Remove Galen Goodward's immunity to NPC
+UPDATE `creature_template` SET `unit_flags`=256 WHERE `entry`=5391;
diff --git a/sql/updates/world/2012_12_15_02_world_sai.sql b/sql/updates/world/2012_12_15_02_world_sai.sql
new file mode 100644
index 00000000000..bf092bfb88d
--- /dev/null
+++ b/sql/updates/world/2012_12_15_02_world_sai.sql
@@ -0,0 +1,40 @@
+--
+-- Convert quest_end_scripts to SAI
+DELETE FROM `creature_text` WHERE `entry`=836;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(836,0,1, 'There''s nothing like some scalding mornbrew on a chilly Dun Morogh day to get things started right!',12,7,100, 1,0,0,'Durnan Furcutter after quest'),
+(836,1,1, 'Oooooo hot hot hot! If that won''t put spring in your step, I don''t know what will!' ,12,7,100,400,0,0,'Durnan Furcutter after quest');
+UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=836;
+UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry` IN (51708,2289,2688,2933,142343,175926,175925);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (51708,2289,2688,2933,142343,175926,175925) AND `source_type`=1;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (293300,14234300,83600,17592600,17592500) AND `source_type`=9;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=836 AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+-- Eliza's Grave Dirt for Digging Through the Dirt (1s delay is needed?)
+(51708,1,0,0,20,1,100,0,254,0,0,0,12, 314,1,300000,0,1,0,8,0,0,0,-10267 , 52.52,42.54,2.5,'Eliza Grave Dirt - On Quest Complete - Spawn Eliza'),
+-- Ruined Lifeboat for Enticing Negolash Spawndata is from sniff! ( 3s delay is required?)
+(2289 ,1,0,0,20,1,100,0,619,0,0,0,12,1494,1,300000,0,1,0,8,0,0,0,-14621.93,148.1328,0.7201138,0.9944053,'Ruined Lifeboat - On Quest Complete - Spawn Negolash'),
+-- Keystone for Breaking the Keystone, spawndata is from sniff! (1s delay is needed?)
+(2688 ,1,0,0,20,1,100,0,652,0,0,0,12,2763,1, 60000,0,1,0,8,0,0,0,-1517.452,-2181.302,17.31267,2.722714,'Keystone - On Quest Complete - Spawn Thenan'),
+-- Seal of the Earth for Seal of the Earth (2x)
+(2933,1,0,0,20,0,100,0, 779,0,0,0,80,293300,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Seal of the Earth - On quest "Seal of the Earth" Rewarded - call script'),
+(2933,1,1,0,20,0,100,0, 795,0,0,0,80,293300,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Seal of the Earth - On quest "Seal of the Earth" Rewarded - call script'),
+(293300,9,0,0,1,0,100,0,2000,2000,0,0,12,2759,1,300000,0,1,0,8,0,0,0,-6703,-4094,264.235,2.830, 'Seal of the Earth - After 2 seconds - Summon Hematus'),
+(293300,9,1,0,1,0,100,0,2000,2000,0,0,12,2757,1,300000,0,1,0,8,0,0,0,-6718,-4125,264.235,2.683, 'Seal of the Earth - After 2 seconds - Summon Blacklash'),
+-- Uldum Pedestal for Seeing What Happens (2x)
+(142343,1,0,0,20,0,100,0,2946,0,0,0,80,14234300,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Uldum Pedestal - On quest "Seeing What Happens" Rewarded - call script'),
+(142343,1,1,0,20,0,100,0,2966,0,0,0,80,14234300,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Uldum Pedestal - On quest "Seeing What Happens" Rewarded - call script'),
+(14234300,9,0,0,1,0,100,0,2000,2000,0,0,12,7918,1,300000,0,0,0,8,0,0,0,-9619,-2815,11.21,0.43, 'Uldum Pedestal - After 2 seconds - Stone Watcher of Norgannon'),
+-- Durnan Furcuttor for Scalding Mornbrew Delivery
+(836,0,0,0,20,0,100,0,2946,0,0,0,80,83600,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Durnan Furcutter - On quest "Scalding Mornbrew Delivery" Rewarded - call script'),
+-- Script for Dance/talk part
+(83600,9,0,1,1,0,100,0,2000,2000,0,0,1,0, 2000,0,0,0,0,7,0,0,0,0,0,0,0,'Durnan Furcutter - After 2s - Say line1'),
+(83600,9,1,2,1,0,100,0, 0, 0,0,0,5,7, 0,0,0,0,0,7,0,0,0,0,0,0,0,'Durnan Furcutter - After 4s - EmoteEat'),
+(83600,9,2,3,1,0,100,0,4000,4000,0,0,1,0,12000,0,0,0,0,7,0,0,0,0,0,0,0,'Durnan Furcutter - After 8s - Say line2'),
+(83600,9,3,0,1,0,100,0, 0, 0,0,0,5,0, 0,0,0,0,0,7,0,0,0,0,0,0,0,'Durnan Furcutter - After 20s - StopDance'),
+-- Mrs. Dalson's Diary for Mrs.Dalson's Diary
+(175926,1,1,0,20,0,100,0,5058,0,0,0,80,17592600,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Mrs. Dalson''s Diary - On quest "Mrs. Dalson''s Diary" Rewarded - call script'),
+(17592600,9,0,0, 1,0,100,0,2000,2000,0,0,12,10816,1,300000,0,1,0,8,0,0,0,1926.55,-1627.94,60.42,2.24, 'Mrs. Dalson''s Diary - After 2 seconds - Summon Wandering Skeleton'),
+-- Outhouse for Locked Away
+(175925,1,1,0,20,0,100,0,5059,0,0,0,80,17592500,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Outhouse - On quest "Locked Away" Rewarded - call script'),
+(17592500,9,0,0, 1,0,100,0,2000,2000,0,0,12,10836,1,300000,0,1,0,8,0,0,0,1943.38,-1654.68,59.69,6.19, 'Outhouse - After 2 seconds - Summon Farmer Dalson');
diff --git a/sql/updates/world/2012_12_15_03_world_quest_end_scripts.sql b/sql/updates/world/2012_12_15_03_world_quest_end_scripts.sql
new file mode 100644
index 00000000000..91838bda93d
--- /dev/null
+++ b/sql/updates/world/2012_12_15_03_world_quest_end_scripts.sql
@@ -0,0 +1,8 @@
+DELETE FROM `quest_end_scripts` WHERE `id` IN (254,619,652,779,795,2946,2966,3364,5058,5059);
+UPDATE `quest_template` SET `CompleteScript`=0 WHERE `Id`IN (254,619,652,779,795,2946,2966,3364,5058,5059);
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000045,2000000046);
+DELETE FROM `smart_scripts` WHERE `entryorguid`=836 AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+-- Durnan Furcuttor for Scalding Mornbrew Delivery
+(836,0,0,0,20,0,100,0,3364,0,0,0,80,83600,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Durnan Furcutter - On quest "Scalding Mornbrew Delivery" Rewarded - call script');
+-- corrected quest
diff --git a/sql/updates/world/2012_12_16_00_world_creature_addon.sql b/sql/updates/world/2012_12_16_00_world_creature_addon.sql
new file mode 100644
index 00000000000..a79bb407321
--- /dev/null
+++ b/sql/updates/world/2012_12_16_00_world_creature_addon.sql
@@ -0,0 +1,5 @@
+-- Vyragosa
+UPDATE `creature_addon` SET `bytes1`=0x3000000 WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id`=32630);
+-- Chillmaw
+UPDATE `creature_addon` SET `bytes1`=0x3000000,`bytes2`=0x1 WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id`=33687);
+DELETE FROM `creature_template_addon` WHERE `entry`=33687;
diff --git a/sql/updates/world/2012_12_16_01_world_npc_vendor.sql b/sql/updates/world/2012_12_16_01_world_npc_vendor.sql
new file mode 100644
index 00000000000..0e5ed38c88d
--- /dev/null
+++ b/sql/updates/world/2012_12_16_01_world_npc_vendor.sql
@@ -0,0 +1,10 @@
+-- Red Rider Air Rifle
+DELETE FROM `npc_vendor` WHERE `entry` IN (29478,29716) AND `item`=46725;
+INSERT INTO `npc_vendor` (`entry`, `slot`, `item`, `maxcount`, `incrtime`, `ExtendedCost`) VALUES
+(29478,0,46725,0,0,0), -- Jepetto Joybuzz <Toymaker>
+(29716,0,46725,0,0,0); -- Clockwork Assistant <Jepetto's Companion>
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=23 AND `SourceEntry`=46725;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(23,29478,46725,0,0,12,0,2,0,0,0,0,0,'','Rotes Erbsengewehr / Jepetto Joybuzz <Toymaker> - only for Winter Veil'),
+(23,29716,46725,0,0,12,0,2,0,0,0,0,0,'','Rotes Erbsengewehr / Clockwork Assistant <Jepetto''s Companion> - only for Winter Veil');
diff --git a/sql/updates/world/2012_12_16_02_world_creature_text.sql b/sql/updates/world/2012_12_16_02_world_creature_text.sql
new file mode 100644
index 00000000000..f2d605469f8
--- /dev/null
+++ b/sql/updates/world/2012_12_16_02_world_creature_text.sql
@@ -0,0 +1,186 @@
+DELETE FROM `creature_text` WHERE `entry`=35005;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Arelas Brightstar
+(35005, 0, 0, 'Entering the arena, a paladin who is no stranger to the battlefield or tournament ground, the Grand Champion of the Argent Crusade, Eadric the Pure!', 14, 0, 100, 0, 0, 8574, 'Arelas Brightstar - SAY_EADRIC_INTRO'),
+(35005, 1, 0, 'The next combatant is second to none in her passion for upholding the Light. I give you Argent Confessor Paletress!', 14, 0, 100, 0, 0, 8574, 'Arelas Brightstar - SAY_ARELAS_PALETRESS_INTRO'),
+(35005, 2, 0, 'The Silver Covenant is pleased to present their contenders for this event, Highlord.', 14, 0, 100, 396, 0, 8574, 'Arelas Brightstar - SAY_ARELAS_GRAND_CHAMPIONS_INTRO_1'),
+(35005, 3, 0, 'Coming out of the gate is Eressea Dawnsinger, skilled mage and Grand Champion of Silvermoon!', 12, 0, 100, 0, 0, 8573, 'Arelas Brightstar - SAY_ARELAS_GRAND_CHAMPIONS_INTRO_2'),
+(35005, 4, 0, 'Entering the arena is the lean and dangerous Zul''tore, Grand Champion of Sen''jin!', 12, 0, 100, 0, 0, 8573, 'Arelas Brightstar - SAY_ARELAS_GRAND_CHAMPIONS_INTRO_2'),
+(35005, 5, 0, 'Presenting the fierce Grand Champion of Orgrimmar, Mokra the Skullcrusher!', 12, 0, 100, 0, 0, 8573, 'Arelas Brightstar - SAY_ARELAS_GRAND_CHAMPIONS_INTRO_2'),
+(35005, 6, 0, 'Representing the tenacity of the Forsaken, here is the Grand Champion of the Undercity, Deathstalker Visceri!', 12, 0, 100, 0, 0, 8573, 'Arelas Brightstar - SAY_ARELAS_GRAND_CHAMPIONS_INTRO_2'),
+(35005, 7, 0, 'Tall in the saddle of his kodo, here is the venerable Runok Wildmane, Grand Champion of Thunder Bluff!', 12, 0, 100, 0, 0, 8573, 'Arelas Brightstar - SAY_ARELAS_GRAND_CHAMPIONS_INTRO_2'),
+(35005, 8, 0, 'What''s that, up near the rafters?', 12, 0, 100, 25, 0, 0, 'Arelas Brightstar - SAY_ARELAS_KNIGHT_INTRO');
+
+DELETE FROM `creature_text` WHERE `entry`=35004;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Jaeren Sunsworn
+(35004, 0, 0, 'Entering the arena, a paladin who is no stranger to the battlefield or tournament ground, the Grand Champion of the Argent Crusade, Eadric the Pure!', 12, 0, 100, 0, 0, 8574, 'Jaeren Sunsworn - SAY_JAEREN_EADRIC_INTRO'),
+(35004, 1, 0, 'The next combatant is second to none in her passion for upholding the Light. I give you Argent Confessor Paletress!', 14, 0, 100, 0, 0, 8574, 'Jaeren Sunsworn - SAY_JAEREN_PALETRESS_INTRO'),
+(35004, 2, 0, 'The Sunreavers are proud to present their representatives in this trial by combat.', 14, 0, 100, 396, 0, 8574, 'Jaeren Sunsworn - SAY_JAEREN_GRAND_CHAMPIONS_INTRO_1'),
+(35004, 3, 0, 'Coming out of the gate is Colosos, the towering Grand Champion of the Exodar!', 12, 0, 100, 0, 0, 8573, 'Jaeren Sunsworn - SAY_JAEREN_GRAND_CHAMPIONS_INTRO_2'),
+(35004, 4, 0, 'Entering the arena is the Grand Champion of Darnassus, the skilled sentinel Jaelyne Evensong!', 12, 0, 100, 0, 0, 8573, 'Jaeren Sunsworn - SAY_JAEREN_GRAND_CHAMPIONS_INTRO_2'),
+(35004, 5, 0, 'Here comes the small but deadly Ambrose Boltspark, Grand Champion of Gnomeregan!', 12, 0, 100, 0, 0, 8573, 'Jaeren Sunsworn - SAY_JAEREN_GRAND_CHAMPIONS_INTRO_2'),
+(35004, 6, 0, 'Proud and strong, give a cheer for Marshal Jacob Alerius, the Grand Champion of Stormwind!', 12, 0, 100, 0, 0, 8573, 'Jaeren Sunsworn - SAY_JAEREN_GRAND_CHAMPIONS_INTRO_2'),
+(35004, 7, 0, 'The might of the dwarves is represented today by the Grand Champion of Ironforge, Lana Stouthammer!', 12, 0, 100, 0, 0, 8573, 'Jaeren Sunsworn - SAY_JAEREN_GRAND_CHAMPIONS_INTRO_2'),
+(35004, 8, 0, 'What''s that, up near the rafters?', 12, 0, 100, 25, 0, 0, 'Jaeren Sunsworn - SAY_JAEREN_KNIGHT_INTRO');
+
+DELETE FROM `creature_text` WHERE `entry`=34996 AND `groupid` BETWEEN 50 AND 58;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Highlord Tirion Fordring
+/* Grand Champions */
+(34996, 50, 0, 'Welcome, champions. Today, before the eyes of your leaders and peers, you will prove yourselves worthy combatants.', 14, 0, 100, 1, 0, 0, 'Highlord Tirion Fordring - SAY_TIRION_GRAND_CHAMPION_INTRO_1'),
+(34996, 51, 0, 'You will first be facing three of the Grand Champions of the Tournament! These fierce contenders have beaten out all others to reach the pinnacle of skill in the joust.', 14, 0, 100, 0, 0, 0, 'Highlord Tirion Fordring - SAY_TIRION_GRAND_CHAMPION_INTRO_2'),
+(34996, 52, 0, 'Begin!', 14, 0, 100, 0, 0, 8574, 'Highlord Tirion Fordring - SAY_TIRION_GRAND_CHAMPION_INTRO_3'),
+/* Argent Confessor Paletress */
+(34996, 53, 0, 'Well fought! Your next challenge comes from the Crusade''s own ranks. You will be tested against their considerable prowess.', 14, 0, 100, 0, 0, 15882, 'Highlord Tirion Fordring - SAY_TIRION_PALETRESS_INTRO_1'),
+(34996, 54, 0, 'You may begin!', 14, 0, 100, 22, 0, 8574, 'Highlord Tirion Fordring - SAY_TIRION_PALETRESS_INTRO_2'),
+/* The Black Knight */
+(34996, 55, 0, 'Well done. You have proven yourself today-', 14, 0, 100, 0, 0, 0, 'Highlord Tirion Fordring - SAY_TIRION_KNIGHT_INTRO_2'),
+(34996, 56, 0, 'What is the meaning of this?', 14, 0, 100, 0, 0, 0, 'Highlord Tirion Fordring - SAY_TIRION_KNIGHT_INTRO_2'),
+(34996, 57, 0, 'My congratulations, champions. Through trials both planned and unexpected, you have triumphed.', 14, 0, 100, 0, 0, 15882, 'Highlord Tirion Fordring - SAY_TIRION_KNIGHT_OUTRO_1'),
+(34996, 58, 0, 'Go now and rest; you''ve earned it.', 14, 0, 100, 0, 0, 0, 'Highlord Tirion Fordring - SAY_TIRION_KNIGHT_OUTRO_2');
+
+DELETE FROM `creature_text` WHERE `entry`=34994;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Thrall
+(34994, 0, 0, 'Fight well, Horde! Lok''tar Ogar!', 14, 0, 100, 22, 0, 0, 'Thrall - SAY_THRALL_GRAND_CHAMPIONS_INTRO'),
+(34994, 1, 0, 'Well done, Horde!', 14, 0, 100, 66, 0, 0, 'Thrall - SAY_THRALL_KNIGHT_OUTRO'),
+(34994, 2, 0, 'Garrosh, enough.', 12, 0, 100, 396, 0, 0, 'Thrall');
+
+DELETE FROM `creature_text` WHERE `entry`=34990 AND `groupid` BETWEEN 50 AND 53;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- King Varian Wrynn
+(34990, 50, 0, 'I have no taste for these games, Tirion. Still... I trust they will perform admirably.', 12, 0, 100, 1, 0, 0, 'King Varian Wrynn'),
+(34990, 51, 0, 'Don''t just stand there; kill him!', 14, 0, 100, 22, 0, 0, 'King Varian Wrynn'),
+(34990, 52, 0, 'I did not come here to watch animals tear at each other senselessly, Tirion.', 12, 0, 100, 1, 0, 0, 'King Varian Wrynn'),
+(34990, 53, 0, 'You fought well.', 14, 0, 100, 66, 0, 0, 'King Varian Wrynn - SAY_KNIGHT_OUTRO');
+
+DELETE FROM `creature_text` WHERE `entry`=34995 AND `groupid` BETWEEN 50 AND 52;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Garrosh Hellscream
+(34995, 50, 0, 'Finally, a fight worth watching.', 12, 0, 100, 396, 0, 0, 'Garrosh Hellscream - SAY_GARROSH_GRAND_CHAMPIONS_INTRO'),
+(34995, 51, 0, 'Tear him apart!', 14, 0, 100, 22, 0, 0, 'Garrosh Hellscream'),
+(34995, 52, 0, 'Admirably? Hah! I will enjoy watching your weak little champions fail, human.', 14, 0, 100, 22, 0, 0, 'Garrosh Hellscream');
+
+DELETE FROM `creature_text` WHERE `entry` IN (35572,35569,35571,35570,35617,34705,34701,34703,34702,34657);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Grand Champions
+/* Horde */
+(35572, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Mokra the Skullcrusher - SAY_TRAMPLED'),
+(35569, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Eressea Dawnsinger - SAY_TRAMPLED'),
+(35571, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Runok Wildmane - SAY_TRAMPLED'),
+(35570, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Zul''tore - SAY_TRAMPLED'),
+(35617, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Deathstalker Visceri - SAY_TRAMPLED'),
+/* Alliance */
+(34705, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Marshal Jacob Alerius - SAY_TRAMPLED'),
+(34701, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Colosos - SAY_TRAMPLED'),
+(34703, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Lana Stouthammer - SAY_TRAMPLED'),
+(34702, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Ambrose Boltspark - SAY_TRAMPLED'),
+(34657, 0, 0, '$n is trampled!', 16, 0, 100, 0, 0, 0, 'Jaelyne Evensong - SAY_TRAMPLED');
+
+DELETE FROM `creature_text` WHERE `entry` IN (34883,34887,34904,34903,34902,34901,34905,34906,34910,34900,34909,34908);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- [ph] Argent Raid Spectator - FX - Horde
+(34883, 0, 0, 'The Horde spectators cheer for $n.', 16, 0, 100, 71, 0, 8574, '[ph] Argent Raid Spectator - FX - Horde - SAY_SPECTATOR_PALETRESS_INTRO'),
+-- [ph] Argent Raid Spectator - FX - Alliance
+(34887, 0, 0, 'The Alliance spectators cheer for $n.', 16, 0, 100, 71, 0, 8574, '[ph] Argent Raid Spectator - FX - Alliance - SAY_SPECTATOR_PALETRESS_INTRO'),
+-- [ph] Argent Raid Spectator - FX - Blood Elf
+(34904, 0, 0, 'The blood elves of Silvermoon cheer for $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Blood Elf SAY_PALETRESS_INTRO_1 - SAY_CHEER'),
+-- [ph] Argent Raid Spectator - FX - Tauren
+(34903, 0, 0, 'The tauren of Thunder Bluff cheer for $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Tauren - SAY_CHEER'),
+-- [ph] Argent Raid Spectator - FX - Troll
+(34902, 0, 0, 'The trolls of the Sen''jin Village begin a chant to celebrate $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Troll - SAY_CHEER'),
+-- [ph] Argent Raid Spectator - FX - Orc
+(34901, 0, 0, 'The orcs of Orgrimmar cheer for $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Orc - SAY_CHEER'),
+-- [ph] Argent Raid Spectator - FX - Undead
+(34905, 0, 0, 'The forsaken of the Undercity cheer for $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Undead - SAY_CHEER'),
+-- [ph] Argent Raid Spectator - FX - Dwarf
+(34906, 0, 0, 'The dwarves of Ironforge begin a cheer for $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Dwarf - SAY_CHEER'),
+-- [ph] Argent Raid Spectator - FX - Gnome
+(34910, 0, 0, 'The gnomes of Gnomeregan cheer for $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Gnome - SAY_CHEER'),
+-- [ph] Argent Raid Spectator - FX - Human
+(34900, 0, 0, 'The humans of Stormwind cheer for $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Human - SAY_CHEER'),
+-- [ph] Argent Raid Spectator - FX - Night Elf
+(34909, 0, 0, 'The night elves of Darnassus cheer for $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Night Elf - SAY_CHEER'),
+-- [ph] Argent Raid Spectator - FX - Draenei
+(34908, 0, 0, 'The draenei of the Exodar cheer for $n.', 16, 0, 100, 0, 0, 8573, '[ph] Argent Raid Spectator - FX - Draenei - SAY_CHEER');
+
+DELETE FROM `creature_text` WHERE `entry` IN (35052,35041,35033,35046,35043,35047,35044,35039,35034,35049,35030,34942,35050,35042,35045,35037,35031,35038,35048,35029,35032,35028,35040,35036,35051);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Memory of X
+(35052, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Algalon - EMOTE_WAKING_NIGHTMARE'),
+(35041, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Archimonde - EMOTE_WAKING_NIGHTMARE'),
+(35033, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Chromaggus - EMOTE_WAKING_NIGHTMARE'),
+(35046, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Cyanigosa - EMOTE_WAKING_NIGHTMARE'),
+(35043, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Delrissa - EMOTE_WAKING_NIGHTMARE'),
+(35047, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Eck - EMOTE_WAKING_NIGHTMARE'),
+(35044, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Entropius - EMOTE_WAKING_NIGHTMARE'),
+(35039, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Gruul - EMOTE_WAKING_NIGHTMARE'),
+(35034, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Hakkar - EMOTE_WAKING_NIGHTMARE'),
+(35049, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Heigan - EMOTE_WAKING_NIGHTMARE'),
+(35030, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Herod - EMOTE_WAKING_NIGHTMARE'),
+(34942, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Hogger - EMOTE_WAKING_NIGHTMARE'),
+(35050, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Ignis - EMOTE_WAKING_NIGHTMARE'),
+(35042, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Illidan - EMOTE_WAKING_NIGHTMARE'),
+(35045, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Ingvar - EMOTE_WAKING_NIGHTMARE'),
+(35037, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Kalithresh - EMOTE_WAKING_NIGHTMARE'),
+(35031, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Lucifron - EMOTE_WAKING_NIGHTMARE'),
+(35038, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Malchezaar - EMOTE_WAKING_NIGHTMARE'),
+(35048, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Onyxia - EMOTE_WAKING_NIGHTMARE'),
+(35029, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Mutanus - EMOTE_WAKING_NIGHTMARE'),
+(35032, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Thunderaan - EMOTE_WAKING_NIGHTMARE'),
+(35028, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of VanCleef - EMOTE_WAKING_NIGHTMARE'),
+(35040, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Vashj - EMOTE_WAKING_NIGHTMARE'),
+(35036, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Vek''nilash - EMOTE_WAKING_NIGHTMARE'),
+(35051, 0, 0, '%s begins to invoke the Waking Nightmare!', 41, 0, 100, 0, 0, 0, 'Memory of Vezax - EMOTE_WAKING_NIGHTMARE');
+
+DELETE FROM `creature_text` WHERE `entry`=35564;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Risen Arelas Brightstar
+(35564, 0, 0, 'What a Brains shot!', 12, 36, 100, 0, 0, 0, 'Risen Arelas Brightstar'),
+(35564, 1, 0, 'Somone stop that ghoul!', 12, 36, 100, 0, 0, 0, 'Risen Arelas Brightstar'),
+(35564, 2, 0, 'That had to hurt! Brains!', 12, 36, 100, 0, 0, 0, 'Risen Arelas Brightstar');
+
+DELETE FROM `creature_text` WHERE `entry`=35545;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Risen Jaeren Sunsworn
+(35545, 0, 0, 'What a Brains shot!', 12, 36, 100, 0, 0, 0, 'Risen Jaeren Sunsworn'),
+(35545, 1, 0, 'Somone stop that ghoul!', 12, 36, 100, 0, 0, 0, 'Risen Jaeren Sunsworn'),
+(35545, 2, 0, 'That had to hurt! Brains!', 12, 36, 100, 0, 0, 0, 'Risen Jaeren Sunsworn');
+
+DELETE FROM `creature_text` WHERE `entry`=34928;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Argent Confessor Paletress
+(34928, 0, 0, 'Thank you, good herald. Your words are too kind.', 12, 0, 100, 2, 0, 16245, 'Argent Confessor Paletress - SAY_INTRO_1'),
+(34928, 1, 0, 'May the Light give me strength to provide a worthy challenge.', 12, 0, 100, 16, 0, 16246, 'Argent Confessor Paletress - SAY_INTRO_2'),
+(34928, 2, 0, 'Well, then. Let us begin.', 14, 0, 100, 0, 0, 16247, 'Argent Confessor Paletress - SAY_AGGRO'),
+(34928, 3, 0, 'Take this time to consider your past deeds.', 14, 0, 100, 0, 0, 16248, 'Argent Confessor Paletress - SAY_MEMORY_SUMMON'),
+(34928, 4, 0, 'Even the darkest memory fades when confronted!', 14, 0, 100, 0, 0, 16249, 'Argent Confessor Paletress - SAY_MEMORY_DEATH'),
+(34928, 5, 0, 'Take your rest.', 14, 0, 100, 0, 0, 16250, 'Argent Confessor Paletress - SAY_KILL_PLAYER'),
+(34928, 5, 1, 'Be at ease.', 14, 0, 100, 0, 0, 16251, 'Argent Confessor Paletress - SAY_KILL_PLAYER'),
+(34928, 6, 0, 'Excellent work!', 14, 0, 100, 0, 0, 16252, 'Argent Confessor Paletress - SAY_DEFEATED');
+
+DELETE FROM `creature_text` WHERE `entry`=35119;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- Eadric the Pure
+(35119, 0, 0, 'Are you up to the challenge? I will not hold back.', 12, 0, 100, 397, 0, 16134, 'Eadric the Pure - SAY_INTRO'),
+(35119, 1, 0, 'Prepare yourselves!', 14, 0, 100, 0, 0, 16135, 'Eadric the Pure - SAY_AGGRO'),
+(35119, 2, 0, '%s begins to radiate light. Shield your eyes!', 41, 0, 100, 0, 0, 0, 'Eadric the Pure - EMOTE_RADIANCE'),
+(35119, 3, 0, '%s targets $n with the Hammer of the Righteous!', 41, 0, 100, 0, 0, 16136, 'Eadric the Pure - EMOTE_HAMMER_RIGHTEOUS'),
+(35119, 4, 0, 'Hammer of the Righteous!', 14, 0, 100, 0, 0, 16136, 'Eadric the Pure - SAY_HAMMER_RIGHTEOUS'),
+(35119, 5, 0, 'You... You need more practice.', 14, 0, 100, 0, 0, 16137, 'Eadric the Pure - SAY_KILL_PLAYER'),
+(35119, 5, 1, 'Nay! Nay! And I say yet again nay! Not good enough!', 14, 0, 100, 0, 0, 16138, 'Eadric the Pure - SAY_KILL_PLAYER'),
+(35119, 6, 0, 'I yield! I submit. Excellent work. May I run away now?', 14, 0, 100, 0, 0, 16139, 'Eadric the Pure - SAY_DEFEATED');
+
+DELETE FROM `creature_text` WHERE `entry`=35451;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+-- The Black Knight
+(35451, 0, 0, 'You spoiled my grand entrance, rat.', 12, 0, 100, 0, 0, 16256, 'The Black Knight - SAY_INTRO_1'),
+(35451, 1, 0, 'Did you honestly think an agent of the Lich King would be bested on the field of your pathetic little tournament?', 12, 0, 100, 396, 0, 16257, 'The Black Knight - SAY_INTRO_2'),
+(35451, 2, 0, 'I''ve come to finish my task.', 12, 0, 100, 396, 0, 16258, 'The Black Knight - SAY_INTRO_3'),
+(35451, 3, 0, 'This farce ends here!', 14, 0, 100, 0, 0, 16259, 'The Black Knight - SAY_AGGRO'),
+(35451, 4, 0, 'My rotting flesh was just getting in the way!', 14, 0, 100, 0, 0, 16262, 'The Black Knight - SAY_PHASE_2'),
+(35451, 5, 0, 'I have no need for bones to best you!', 14, 0, 100, 0, 0, 16263, 'The Black Knight - SAY_PHASE_3'),
+(35451, 6, 0, 'Pathetic.', 14, 0, 100, 0, 0, 16260, 'The Black Knight - SAY_KILL_PLAYER'),
+(35451, 6, 1, 'A waste of flesh.', 14, 0, 100, 0, 0, 16261, 'The Black Knight - SAY_KILL_PLAYER'),
+(35451, 7, 0, 'No! I must not fail... again...', 14, 0, 100, 0, 0, 16264, 'The Black Knight - SAY_DEATH');
diff --git a/sql/updates/world/2012_12_16_03_world_sai.sql b/sql/updates/world/2012_12_16_03_world_sai.sql
new file mode 100644
index 00000000000..40b1e32dbeb
--- /dev/null
+++ b/sql/updates/world/2012_12_16_03_world_sai.sql
@@ -0,0 +1,34 @@
+SET @NPC_KC := 28713;
+SET @NPC_SOUL_FONT_BUNNY := 28724;
+SET @NPC_QUTEZLUN_WORSHIPPER := 28747;
+SET @NPC_SERPENTTOUCHED_BERSERKER := 28748;
+SET @SPELL_SOUL_FONT_VOID := 52222;
+SET @SPELL_SOUL_FONT_VOID_CHANNEL := 52242;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_QUTEZLUN_WORSHIPPER AND `source_type`=0 AND `id` IN (2,3,4,5,6);
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_SERPENTTOUCHED_BERSERKER AND `source_type`=0 AND `id` IN (1,2,3,4,5);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_QUTEZLUN_WORSHIPPER*100,@NPC_SERPENTTOUCHED_BERSERKER*100) AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@NPC_QUTEZLUN_WORSHIPPER,0,2,3,4,0,100,0,0,0,0,0,42,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Quetz''lun Worshipper - On aggro - Set invincibility 1 HP'),
+(@NPC_QUTEZLUN_WORSHIPPER,0,3,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Quetz''lun Worshipper - On aggro - Set event phase 1'),
+(@NPC_QUTEZLUN_WORSHIPPER,0,4,5,2,1,100,1,0,0.1,0,0,11,@SPELL_SOUL_FONT_VOID_CHANNEL,0,0,0,0,0,19,@NPC_SOUL_FONT_BUNNY,15,0,0,0,0,0,'Quetz''lun Worshipper - On health below 0.1% (phase 1) - Spellcast Soul Font Void Channel'),
+(@NPC_QUTEZLUN_WORSHIPPER,0,5,0,61,0,100,0,0,0,0,0,80,@NPC_QUTEZLUN_WORSHIPPER*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Quetz''lun Worshipper - On health below 0.1% (phase 1) - Run script'),
+(@NPC_QUTEZLUN_WORSHIPPER,0,6,0,6,0,100,0,0,0,0,0,33,@NPC_KC,0,0,0,0,0,16,0,0,0,0,0,0,0,'Quetz''lun Worshipper - On death - Quest credit'),
+(@NPC_SERPENTTOUCHED_BERSERKER,0,1,2,4,0,100,0,0,0,0,0,42,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Serpent-Touched Berserker - On aggro - Set invincibility 1 HP'),
+(@NPC_SERPENTTOUCHED_BERSERKER,0,2,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Serpent-Touched Berserker - On aggro - Set event phase 1'),
+(@NPC_SERPENTTOUCHED_BERSERKER,0,3,4,2,1,100,1,0,0.1,0,0,11,@SPELL_SOUL_FONT_VOID_CHANNEL,0,0,0,0,0,19,@NPC_SOUL_FONT_BUNNY,15,0,0,0,0,0,'Serpent-Touched Berserker - On health below 0.1% (phase 1) - Spellcast Soul Font Void Channel'),
+(@NPC_SERPENTTOUCHED_BERSERKER,0,4,0,61,0,100,0,0,0,0,0,80,@NPC_SERPENTTOUCHED_BERSERKER*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Serpent-Touched Berserker - On health below 0.1% (phase 1) - Run script'),
+(@NPC_SERPENTTOUCHED_BERSERKER,0,5,0,6,0,100,0,0,0,0,0,33,@NPC_KC,0,0,0,0,0,16,0,0,0,0,0,0,0,'Serpent-Touched Berserker - On death - Quest credit'),
+
+(@NPC_QUTEZLUN_WORSHIPPER*100,9,0,0,0,0,100,0,100,100,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Quetz''lun Worshipper script - Die'),
+(@NPC_SERPENTTOUCHED_BERSERKER*100,9,0,0,0,0,100,0,100,100,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Serpent-Touched Berserker script - Die');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SPELL_SOUL_FONT_VOID_CHANNEL;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=@NPC_QUTEZLUN_WORSHIPPER;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=@NPC_SERPENTTOUCHED_BERSERKER;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,1,@SPELL_SOUL_FONT_VOID_CHANNEL,0,0,31,0,3,@NPC_SOUL_FONT_BUNNY,0,0,0,'','Spell Soul Font Void Channel targets Soul Font Bunny'),
+(22,3,@NPC_QUTEZLUN_WORSHIPPER,0,0,9,0,12668,0,0,0,0,'','SAI Quetz''lun Worshipper set invincibility if player has taken quest 12668'),
+(22,7,@NPC_QUTEZLUN_WORSHIPPER,0,0,1,1,@SPELL_SOUL_FONT_VOID,0,0,0,0,'','SAI Quetz''lun Worshipper quest credit if aura 52222 applied'),
+(22,2,@NPC_SERPENTTOUCHED_BERSERKER,0,0,9,0,12668,0,0,0,0,'','SAI Serpent-touched Berserker set invincibility if player has taken quest 12668'),
+(22,6,@NPC_SERPENTTOUCHED_BERSERKER,0,0,1,1,@SPELL_SOUL_FONT_VOID,0,0,0,0,'','SAI Serpent-touched Berserker triggers if aura 52222 applied');
diff --git a/sql/updates/world/2012_12_17_00_world_creature_template.sql b/sql/updates/world/2012_12_17_00_world_creature_template.sql
new file mode 100644
index 00000000000..dfe9132e7a6
--- /dev/null
+++ b/sql/updates/world/2012_12_17_00_world_creature_template.sql
@@ -0,0 +1,2 @@
+UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask` & ~(1|2|4|8|32|64|128|256|512|1024|2048|4096|8192|65536|131072|524288|4194304|67108864|536870912) WHERE `entry` = 36066;
+UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask` |1|2|4|8|32|64|128|256|512|1024|2048|4096|8192|65536|131072|524288|4194304|67108864|536870912 WHERE `entry` = 34496;
diff --git a/sql/updates/world/2012_12_17_00_world_song_of_wind_and_water.sql b/sql/updates/world/2012_12_17_00_world_song_of_wind_and_water.sql
new file mode 100644
index 00000000000..52c80334c0c
--- /dev/null
+++ b/sql/updates/world/2012_12_17_00_world_song_of_wind_and_water.sql
@@ -0,0 +1,38 @@
+-- Add DB suport for quest ID: 12726 "Song of Wind and Water"
+-- Indexes:
+SET @HAIPHOON_W := 28999; -- WATER
+SET @HAIPHOON_A := 28985; -- AIR
+SET @STORM := 28858; -- Storm Revenant
+SET @AQUEOUS := 28862; -- Aqueous Spirit
+-- WATER VERSION SPELLS
+SET @SPELL_W_1 := 61375; -- Water Bolt
+SET @SPELL_W_2 := 61376; -- Frost Nova
+SET @SPELL_W_3 := 52862; -- Devour Wind
+-- Both version spell
+SET @SPELL_AW := 52869; -- Evocation
+-- AIR VERSION SPELLS
+SET @SPELL_A_1 :=61374; -- Lightning Bolt
+SET @SPELL_A_2 :=52870; -- Windshear
+SET @SPELL_A_3 :=52864; -- Devour Water
+
+-- Update both quest vehicles templates
+-- Water version
+UPDATE `creature_template` SET `spell1`=@SPELL_W_1,`spell2`=@SPELL_W_2,`spell3`=@SPELL_W_3,`spell6`=@SPELL_AW,`unit_flags`=`unit_flags`|16777216,`VehicleId`=257,`AIName`='',`exp`=2,`minlevel`=80,`maxlevel`=80,`ScriptName`='npc_haiphoon' WHERE `entry`=@HAIPHOON_W;
+-- Wind version
+UPDATE `creature_template` SET `spell1`=@SPELL_A_1,`spell2`=@SPELL_A_2,`spell3`=@SPELL_A_3,`spell6`=@SPELL_AW,`unit_flags`=`unit_flags`|16777216,`VehicleId`=257,`unit_class`=2,`exp`=2,`minlevel`=80,`maxlevel`=80,`ScriptName`='npc_haiphoon' WHERE `entry`=@HAIPHOON_A;
+
+-- Insert conditions
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry` IN (@SPELL_W_3,@SPELL_A_3);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(17,0,@SPELL_W_3,0,0,31,1,3,@STORM,0,0,0,'', 'Spell Devour Wind can only target Storm Revenant'),
+(17,0,@SPELL_A_3,0,0,31,1,3,@AQUEOUS,0,0,0,'', 'Spell Devour Water can only target Aqueous Spirit');
+
+-- Add SAI and DB support for Storm Revenant and Aqueous Spirit
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@STORM,@AQUEOUS);
+UPDATE `creature_template` SET `resistance3`=545 WHERE `entry`=@STORM; -- should've resistance according to video (tried to be precise as possible)
+UPDATE `creature_template` SET `resistance4`=545 WHERE `entry`=@AQUEOUS; -- should've resistance according to video -//-
+DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (@STORM,@AQUEOUS);
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (@STORM,@AQUEOUS);
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@STORM,0,0,0,0,0,100,0,2000,4000,5000,7000,11,32018,0,0,0,0,0,2,0,0,0,0,0,0,0,'Storm Revenant - IC - Cast Call Lightning'),
+(@AQUEOUS,0,0,0,0,0,100,0,6000,9000,7000,10000,11,55087,0,0,0,0,0,2,0,0,0,0,0,0,0,'Aqueous Spirit - IC - Cast Typhoon');
diff --git a/sql/updates/world/2012_12_17_00_world_spell_linked_spell.sql b/sql/updates/world/2012_12_17_00_world_spell_linked_spell.sql
new file mode 100644
index 00000000000..a2cfc7073d0
--- /dev/null
+++ b/sql/updates/world/2012_12_17_00_world_spell_linked_spell.sql
@@ -0,0 +1,4 @@
+-- Fix Preserved Holly item triggered spell to apply reindeer transformation also so Fa-la-la-la Ogri'La can be doable with it also, based on sniffs.
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=62061;
+INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
+(62061,25860,0, 'Festive Holiday Mount');
diff --git a/sql/updates/world/2012_12_18_00_world_creature_text.sql b/sql/updates/world/2012_12_18_00_world_creature_text.sql
new file mode 100644
index 00000000000..1cf9211343f
--- /dev/null
+++ b/sql/updates/world/2012_12_18_00_world_creature_text.sql
@@ -0,0 +1,5 @@
+DELETE FROM `creature_text` WHERE `entry`=32273;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+(32273, 0, 0, 'How dare you interfere with our work!', 14, 0, 100, 0, 0, 0, 'Infinite Corruptor - SAY_AGGRO'),
+(32273, 1, 0, 'My time... has run out...', 14, 0, 100, 0, 0, 0, 'Infinite Corruptor - SAY_DEATH'),
+(32273, 2, 0, 'The process is finally complete! My work here is done.', 14, 0, 100, 0, 0, 0, 'Infinite Corruptor - SAY_FAIL');
diff --git a/sql/updates/world/2012_12_18_00_world_waking_the_sleeper.sql b/sql/updates/world/2012_12_18_00_world_waking_the_sleeper.sql
new file mode 100644
index 00000000000..4f8a203100d
--- /dev/null
+++ b/sql/updates/world/2012_12_18_00_world_waking_the_sleeper.sql
@@ -0,0 +1,47 @@
+-- Convert quest_end_script "10964" to SAI, alongside dropping creature c++ script
+-- Indexes:
+SET @CLINTAR_DREAMWALKER := 22834;
+SET @SCRIPT := @CLINTAR_DREAMWALKER * 100;
+SET @SPIRIT := 22916;
+
+-- Remove template addon emote (all is handled by that SAI, this breaks it)
+UPDATE `creature_template_addon` SET `emote`=0 WHERE `entry`=@CLINTAR_DREAMWALKER;
+
+-- Remove from quest_end_scripts
+DELETE FROM `quest_end_scripts` WHERE `id`=10964;
+
+-- Add SAI support and drop c++ script
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@CLINTAR_DREAMWALKER;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@CLINTAR_DREAMWALKER AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@CLINTAR_DREAMWALKER,0,0,0,20,0,100,0,10964,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - On quest 10964 rewarded - Start action list'),
+(@CLINTAR_DREAMWALKER,0,1,2,19,1,100,0,10965,0,0,0,12,@SPIRIT,2,100000,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - On quest 10965 accepted - Spawn creature (can happen only after actionlist stuff are complete)'),
+(@CLINTAR_DREAMWALKER,0,2,0,61,1,100,0,0,0,0,0,69,3,0,0,0,0,0,8,0,0,0,7459.47,-3122.79,439.485,5.84588, 'Clintar Dreamwalker - Linked - Move to pos'),
+(@CLINTAR_DREAMWALKER,0,3,4,34,1,100,0,8,3,0,0,90,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - On point 3 reached set - Set field byte 1 for sleeping'),
+(@CLINTAR_DREAMWALKER,0,4,0,61,1,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Linked - Set phase 0'),
+(@CLINTAR_DREAMWALKER,0,5,6,1,1,100,1,360000,360000,360000,360000,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - OOC (phase 1) - Set unseen'),
+(@CLINTAR_DREAMWALKER,0,6,0,61,1,100,1,0,0,0,0,41,100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Linked - Despawn'),
+(@SCRIPT,9,0,0,0,0,100,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 0 - Remove npc flag for quest giver'),
+(@SCRIPT,9,1,0,0,0,100,0,3000,3000,0,0,91,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 1 - Remove bytes for sleeping'),
+(@SCRIPT,9,2,0,0,0,100,0,0,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 2 - Set bytes 1 kneel'),
+(@SCRIPT,9,3,0,0,0,100,0,3000,3000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 3 - Say line 0'),
+(@SCRIPT,9,4,0,0,0,100,0,6000,6000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 4 - Say line 1 (with exclamation emote)'),
+(@SCRIPT,9,5,0,0,0,100,0,7000,7000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 5 - Say line 2'),
+(@SCRIPT,9,6,0,0,0,100,0,0,0,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 6 - Remove bytes 1 for kneel'),
+(@SCRIPT,9,7,0,0,0,100,0,5000,5000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 7 - Say line 3'),
+(@SCRIPT,9,8,0,0,0,100,0,5000,5000,0,0,69,0,0,0,0,0,0,8,0,0,0,7453.25,-3116.29,439.604,5.534, 'Clintar Dreamwalker - Action 8 - Move to pos'),
+(@SCRIPT,9,9,0,0,0,100,0,5000,5000,0,0,69,0,0,0,0,0,0,8,0,0,0,7453.79,-3116.83,439.604,5.534, 'Clintar Dreamwalker - Action 9 - Move to pos'),
+(@SCRIPT,9,10,0,0,0,100,0,8000,8000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 10 - Say line 4'),
+(@SCRIPT,9,11,0,0,0,100,0,1500,1500,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 11 - Add npc flag for quest giver'),
+(@SCRIPT,9,12,0,0,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 12 - Set phase 1');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000067,2000000068,2000000069);
+DELETE FROM `creature_text` WHERE `entry`=@CLINTAR_DREAMWALKER;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@CLINTAR_DREAMWALKER,0,0, 'Clintar Dreamwalker snaps up to a kneeling position, but seems as though he''s somewhere else.',16,0,100,0,0,0, 'Clintar Dreamwalker (line 0)'),
+(@CLINTAR_DREAMWALKER,1,0, 'What are you doing in Ysera''s realm, interloper? Leave us, I say! Your kind are not welcome here!',12,0,100,5,0,0, 'Clintar Dreamwalker (line 1)'),
+(@CLINTAR_DREAMWALKER,2,0, 'Clintar Dreamwalker gets to his feet, beginning to recognize his surroundings.',16,0,100,0,0,0, 'Clintar Dreamwalker (line 2)'),
+(@CLINTAR_DREAMWALKER,3,0, 'You - you''re not one of them! Let''s get out of sight before they find us! Hurry! ',12,0,100,1,0,0, 'Clintar Dreamwalker (line 3)'),
+(@CLINTAR_DREAMWALKER,4,0, 'They''re following me, $R! Quickly, tell me why you''re here before we''re discovered! If they catch up to me, it will mean my death and yours!',12,0,100,1,0,0, 'Clintar Dreamwalker (line 4)');
diff --git a/sql/updates/world/2012_12_18_01_world_creature_text.sql b/sql/updates/world/2012_12_18_01_world_creature_text.sql
new file mode 100644
index 00000000000..24779f67fc7
--- /dev/null
+++ b/sql/updates/world/2012_12_18_01_world_creature_text.sql
@@ -0,0 +1,75 @@
+-- Vazruden the herald
+DELETE FROM `creature_text` WHERE `entry`=17307;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`probability`,`sound`,`comment`,`text`) VALUES
+(17307,0,0,14,100,10292,"vazruden the herald SAY_INTRO","You have faced many challenges, pity they were all in vain. Soon your people will kneel to my lord!");
+
+-- Nazan
+DELETE FROM `creature_text` WHERE `entry`=17536;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`probability`,`comment`,`text`) VALUE
+(17536,0,0,41,100,"nazan EMOTE","%s descends from the sky");
+
+-- Vazruden
+DELETE FROM `creature_text` WHERE `entry`=17537;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`probability`,`sound`,`comment`,`text`) VALUES
+(17537,0,0,14,100,10293,"vazruden SAY_WIPE","Is there no one left to test me?"),
+(17537,1,0,14,100,10294,"vazruden SAY_AGGRO_1","Your time is running out!"),
+(17537,1,1,14,100,10295,"vazruden SAY_AGGRO_2","You are nothing, I answer a higher call!"),
+(17537,1,2,14,100,10296,"vazruden SAY_AGGRO_3","The Dark Lord laughs at you!"),
+(17537,2,0,14,100,10297,"vazruden SAY_KILL_1","It is over. Finished!"),
+(17537,2,1,14,100,10298,"vazruden SAY_KILL_2","Your days are done!"),
+(17537,3,0,14,100,10299,"vazruden SAY_DIE","My lord will be the end you all...");
+
+-- Talbot aka Prince Valanar (There's an UpdateEntry() call in the script which I did not see)
+UPDATE `creature_text` SET `entry`=28189 WHERE `entry`=25301;
+
+-- Darion Mograine
+UPDATE `creature_text` SET `entry`=29228 WHERE `entry`=29173 AND `groupid`=74;
+
+-- Core rager
+UPDATE `creature_text` SET `entry`=11672 WHERE `entry`=11988;
+
+DELETE FROM `creature_text` WHERE `entry` IN (15550,16151);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`probability`,`sound`,`comment`,`text`) VALUES
+-- Attumen
+(15550,0,0,14,100,9169,"attumen SAY_KILL1","It was... inevitable."),
+(15550,0,1,14,100,9300,"attumen SAY_KILL2","Another trophy to add to my collection!"),
+(15550,1,0,14,100,9166,"attumen SAY_DISARMED","Weapons are merely a convenience for a warrior of my skill!"),
+(15550,2,0,14,100,9165,"attumen SAY_DEATH","I always knew... someday I would become... the hunted."),
+(15550,3,0,14,100,9170,"attumen SAY_RANDOM1","Such easy sport."),
+(15550,3,1,14,100,9304,"attumen SAY_RANDOM2","Amateurs! Do not think you can best me! I kill for a living."),
+-- Midnight
+(16151,0,0,14,100,9173,"attumen SAY_MIDNIGHT_KILL","Well done Midnight!"),
+(16151,1,0,14,100,9167,"attumen SAY_APPEAR1","Cowards! Wretches!"),
+(16151,1,1,14,100,9298,"attumen SAY_APPEAR2","Who dares attack the steed of the Huntsman?"),
+(16151,1,2,14,100,9299,"attumen SAY_APPEAR3","Perhaps you would rather test yourselves against a more formidable opponent?!"),
+(16151,2,0,14,100,9168,"attumen SAY_MOUNT","Come, Midnight, let\'s disperse this petty rabble!");
+
+-- Creature text preparation for rajaxx
+DELETE FROM `creature_text` WHERE `entry` IN (15471,15341);
+INSERT INTO `creature_text`(`entry`,`groupid`,`sound`,`type`,`probability`,`comment`,`text`) VALUES
+(15471,0,0,14,100,"andorov SAY_ANDOROV_INTRO","They come now. Try not to get yourself killed, young blood."),
+(15471,1,0,14,100,"andorov SAY_ANDOROV_ATTACK","Remember, Rajaxx, when I said I\'d kill you last? I lied..."),
+(15341,0,8612,14,100,"rajaxx SAY_WAVE3","The time of our retribution is at hand! Let darkness reign in the hearts of our enemies!"),
+(15341,1,8610,14,100,"rajaxx SAY_WAVE4","No longer will we wait behind barred doors and walls of stone! No longer will our vengeance be denied! The dragons themselves will tremble before our wrath!"),
+(15341,2,8608,14,100,"rajaxx SAY_WAVE5","Fear is for the enemy! Fear and death!"),
+(15341,3,8611,14,100,"rajaxx SAY_WAVE6","Staghelm will whimper and beg for his life, just as his whelp of a son did! One thousand years of injustice will end this day!"),
+(15341,4,8607,14,100,"rajaxx SAY_WAVE7","Fandral! Your time has come! Go and hide in the Emerald Dream and pray we never find you!"),
+(15341,5,8609,14,100,"rajaxx SAY_INTRO","Impudent fool! I will kill you myself!"),
+(15341,6,8603,14,100,"rajaxx SAY_UNK1","Attack and make them pay dearly!"),
+(15341,7,8605,14,100,"rajaxx SAY_UNK2","Crush them! Drive them out!"),
+(15341,8,8606,14,100,"rajaxx SAY_UNK3","Do not hesitate! Destroy them!"),
+(15341,9,8613,14,100,"rajaxx SAY_UNK4","Warriors! Captains! Continue the fight!"),
+(15341,10,8614,14,100,"rajaxx SAY_DEAGGRO","You are not worth my time $N!"),
+(15341,11,8604,14,100,"rajaxx SAY_KILLS_ANDOROV","Breath your last!"),
+(15341,12,0,14,100,"rajaxx SAY_COMPLETE_QUEST","Soon you will know the price of your meddling, mortals... The master is nearly whole... And when he rises, your world will be cease!");
+
+-- moam
+DELETE FROM `creature_text` WHERE `entry`=15340;
+INSERT INTO `creature_text`(`entry`,`groupid`,`type`,`probability`,`comment`,`text`) VALUES
+(15340,0,16,100,"moam EMOTE_AGGRO","%s senses your fear."),
+(15340,1,16,100,"moan EMOTE_MANA_FULL","%s bristles with energy!");
+
+-- buru
+DELETE FROM `creature_text` WHERE `entry`=15370;
+INSERT INTO `creature_text`(`entry`,`groupid`,`type`,`probability`,`comment`,`text`) VALUES
+(15370,0,16,100,"buru EMOTE_TARGET","%s sets eyes on $N!");
diff --git a/sql/updates/world/2012_12_18_02_world_misc.sql b/sql/updates/world/2012_12_18_02_world_misc.sql
new file mode 100644
index 00000000000..5df6ef8eb95
--- /dev/null
+++ b/sql/updates/world/2012_12_18_02_world_misc.sql
@@ -0,0 +1,14 @@
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=15760;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=15760 AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(15760, 0, 0, 0, 22, 0, 100, 0, 58, 0, 0, 0, 11, 26218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Winter Reveler - Cast Mistletoe on /kiss');
+
+DELETE FROM `spell_script_names` WHERE `spell_id`=26218;
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(26218,'spell_winter_veil_mistletoe');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=15760;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(22, 1, 15760, 0, 0, 1, 0, 26218, 1, 0, 1, 0, 0, '', 'execute sai only if player has not Mistletoe Debuff'),
+(22, 1, 15760, 0, 0, 12, 0, 2, 0, 0, 0, 0, 0, '', 'execute sai only if Winter Veil');
diff --git a/sql/updates/world/2012_12_18_02_world_sai.sql b/sql/updates/world/2012_12_18_02_world_sai.sql
new file mode 100644
index 00000000000..0843285550f
--- /dev/null
+++ b/sql/updates/world/2012_12_18_02_world_sai.sql
@@ -0,0 +1,47 @@
+SET @NPC_WARLORD_ZOLMAZ := 28902;
+SET @NPC_ENCHANTED_TIKI := 28927;
+SET @GO_ZOLMAZ_GATE := 190784;
+SET @GO_GATE_LEVER := 190834;
+
+DELETE FROM `event_scripts` WHERE `id`=18940;
+INSERT INTO `event_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES
+(18940,6,11,57571,180,0,0,0,0,0);
+
+DELETE FROM `creature_text` WHERE `entry`=@NPC_WARLORD_ZOLMAZ;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@NPC_WARLORD_ZOLMAZ,0,0,'%s becomes enraged.',16,0,100,0,0,0,'Warlord Zol''Maz'),
+(@NPC_WARLORD_ZOLMAZ,1,0,'You have an enchanted tiki? YOU KILLED MY FAMILY!',14,0,100,15,0,6200,'Warlord Zol''Maz'),
+(@NPC_WARLORD_ZOLMAZ,2,0,'I WILL KILL YOU, $N!',14,0,100,0,0,0,'Warlord Zol''Maz');
+
+UPDATE `creature_template` SET `dmg_multiplier`=2.75, `AIName`='SmartAI' WHERE `entry`=@NPC_WARLORD_ZOLMAZ;
+UPDATE `creature_template` SET `minlevel`=77, `maxlevel`=77, `exp`=2, `mindmg`=371, `maxdmg`=522, `attackpower`=478, `dmg_multiplier`=1.75, `unit_flags`=32776, `unit_class`=2, `minrangedmg`=314, `maxrangedmg`=466, `rangedattackpower`=81, `AIName`='SmartAI', `equipment_id`=838 WHERE `entry`=@NPC_ENCHANTED_TIKI;
+UPDATE `creature_model_info` SET `bounding_radius`=0.465, `combat_reach`=7.5 WHERE `modelid`=26286;
+
+DELETE FROM `creature_template_addon` WHERE `entry`=@NPC_ENCHANTED_TIKI;
+INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@NPC_ENCHANTED_TIKI,0,0,0,1,0,'52614 52670');
+
+UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@GO_GATE_LEVER;
+UPDATE `gameobject_template` SET `flags`=4 WHERE `entry` IN (190836,191766,194126);
+UPDATE `gameobject` SET `position_x`=6552.984, `position_y`=-3903.916, `position_z`=490.9412 WHERE `guid`=99744;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_WARLORD_ZOLMAZ,@NPC_ENCHANTED_TIKI) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@GO_GATE_LEVER AND `source_type`=1;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@NPC_WARLORD_ZOLMAZ,0,0,0,9,0,100,0,10,25,0,0,11,32323,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On target range 10-25y - Spellcast Charge'),
+(@NPC_WARLORD_ZOLMAZ,0,1,2,2,0,100,1,0,20,0,0,11,8599,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On health below 20% - Spellcast Enrage'),
+(@NPC_WARLORD_ZOLMAZ,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On health below 20% - Say line'),
+(@NPC_WARLORD_ZOLMAZ,0,3,0,0,0,100,0,12000,12000,20000,20000,11,54670,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On update IC - Spellcast Decapitate'),
+(@NPC_WARLORD_ZOLMAZ,0,4,0,2,0,100,1,0,35,0,0,11,40546,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On health below 35% - Spellcast Retaliation'),
+(@NPC_WARLORD_ZOLMAZ,0,5,0,38,0,100,0,0,1,0,0,1,1,7000,0,0,0,0,12,1,0,0,0,0,0,0, 'Warlord Zol''Maz - On data set 0 1 - Say line'),
+(@NPC_WARLORD_ZOLMAZ,0,6,7,52,0,100,0,1,@NPC_WARLORD_ZOLMAZ,0,0,1,2,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Warlord Zol''Maz - On text over - Say line'),
+(@NPC_WARLORD_ZOLMAZ,0,7,8,61,0,100,0,0,0,0,0,19,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On text over - Remove unit_flags IMMUNE_TO_PC'),
+(@NPC_WARLORD_ZOLMAZ,0,8,0,61,0,100,0,0,0,0,0,49,0,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Warlord Zol''Maz - On text over - Start attack'),
+(@NPC_WARLORD_ZOLMAZ,0,9,10,6,0,100,0,0,0,0,0,32,0,0,0,0,0,0,14,57571,@GO_ZOLMAZ_GATE,0,0,0,0,0, 'Warlord Zol''Maz - On death - Reset gate'),
+(@NPC_WARLORD_ZOLMAZ,0,10,0,61,0,100,0,0,0,0,0,18,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On death - Set unit_flags IMMUNE_TO_PC'),
+(@NPC_WARLORD_ZOLMAZ,0,11,10,21,0,100,0,0,0,0,0,32,0,0,0,0,0,0,14,57571,@GO_ZOLMAZ_GATE,0,0,0,0,0, 'Warlord Zol''Maz - On homeposition reached - Reset gate'),
+(@NPC_ENCHANTED_TIKI,0,0,1,54,0,100,0,0,0,0,0,45,0,1,0,0,0,0,19,@NPC_WARLORD_ZOLMAZ,50,0,0,0,0,0, 'Enchanted Tiki - Just summoned - Set data 0 1'),
+(@NPC_ENCHANTED_TIKI,0,1,2,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Enchanted Tiki - Just summoned - Store targetlist'),
+(@NPC_ENCHANTED_TIKI,0,2,3,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,19,@NPC_WARLORD_ZOLMAZ,50,0,0,0,0,0, 'Enchanted Tiki - Just summoned - Send target list'),
+(@NPC_ENCHANTED_TIKI,0,3,0,61,0,100,0,0,0,0,0,3,0,25749,0,0,0,0,1,0,0,0,0,0,0,0, 'Enchanted Tiki - Just summoned - Set modelid'),
+(@GO_GATE_LEVER,1,0,0,70,0,100,0,2,0,0,0,9,0,0,0,0,0,0,14,57571,@GO_ZOLMAZ_GATE,0,0,0,0,0, 'Gate lever - On activate - Activate gate');
diff --git a/sql/updates/world/2012_12_19_00_world_sai.sql b/sql/updates/world/2012_12_19_00_world_sai.sql
new file mode 100644
index 00000000000..170028e8a68
--- /dev/null
+++ b/sql/updates/world/2012_12_19_00_world_sai.sql
@@ -0,0 +1,106 @@
+-- Remove from quest_end_scripts
+DELETE FROM `quest_end_scripts` WHERE `id` IN (12657,12597,10988,10850,10447,9565);
+
+-- Convert quest_end_script "12657" to SAI
+-- Indexes:
+SET @DARION_MORGRAINE := 28444;
+SET @SCRIPT := @DARION_MORGRAINE * 100;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@DARION_MORGRAINE;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@DARION_MORGRAINE;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@DARION_MORGRAINE AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@DARION_MORGRAINE,0,0,0,20,0,100,0,12657,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - On quest 12657 rewarded - Start action list'),
+(@DARION_MORGRAINE,0,1,0,1,0,100,0,60000,90000,60000,90000,4,12893,1,0,0,0,0,0,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - OOC - Play sound'),
+(@SCRIPT,9,0,0,0,0,100,0,16000,16000,0,0,5,22,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - Action 0 - Play emote 22'),
+(@SCRIPT,9,1,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2465.47,-5567.3,372.16,1.64, 'Highlord Darion Morgraine - Action 1 - Summon'),
+(@SCRIPT,9,2,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2434.52,-5588.56,372.16,3.26, 'Highlord Darion Morgraine - Action 2 - Summon'),
+(@SCRIPT,9,3,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2455.59,-5618.32,372.16,4.59, 'Highlord Darion Morgraine - Action 3 - Summon'),
+(@SCRIPT,9,4,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2439.31,-5608.69,372.16,3.77, 'Highlord Darion Morgraine - Action 4 - Summon'),
+(@SCRIPT,9,5,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2486.72,-5598.66,372.16,6.02, 'Highlord Darion Morgraine - Action 5 - Summon'),
+(@SCRIPT,9,6,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - Action 6 - Say line 0'),
+(@SCRIPT,9,7,0,0,0,100,0,16000,16000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - Action 7 - Say line 1');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry` IN (2000005409,2000005410);
+DELETE FROM `creature_text` WHERE `entry`=@DARION_MORGRAINE;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@DARION_MORGRAINE,0,0, '%s calls upon the mighty armies of the Scourge!',42,0,100,1,0,0, 'Highlord Darion Morgraine'),
+(@DARION_MORGRAINE,1,0, 'Armies of the Scourge, hear my call! The scarlet apocalypse has begun! Tear this land asunder and leave only death in your wake!',12,0,100,1,0,0, 'Highlord Darion Morgraine');
+
+-- Convert quest_end_script "10988" to SAI
+-- Indexes:
+SET @Arthorn_Windsong := 22924;
+SET @SCRIPT := @Arthorn_Windsong * 100;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Arthorn_Windsong;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Arthorn_Windsong AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@Arthorn_Windsong,0,0,0,20,0,100,0,10988,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Captain Brandon - On quest 10988 rewarded - Start script'),
+(@SCRIPT,9,0,0,0,0,100,0,30000,30000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 0 - Say line 0'),
+(@SCRIPT,9,1,0,0,0,100,0,43000,43000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 1 - Say line 1'),
+(@SCRIPT,9,2,0,0,0,100,0,43000,43000,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 2 - Play emote 1'),
+(@SCRIPT,9,3,0,0,0,100,0,56000,56000,0,0,69,1,0,0,0,0,0,8,0,0,0,3024.32,5511.29,146.051,2.31064, 'Arthorn Windsong - Action 3 - Move to'),
+(@SCRIPT,9,4,0,0,0,100,0,17000,17000,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 4 - Play emote 1'),
+(@SCRIPT,9,5,0,0,0,100,0,17000,17000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 5 - Say line 2'),
+(@SCRIPT,9,6,0,0,0,100,0,11000,11000,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 6 - Play emote'),
+(@SCRIPT,9,7,0,0,0,100,0,11000,11000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 7- Say line 3'),
+(@SCRIPT,9,8,0,0,0,100,0,1000,1000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 8 - Say line 4'),
+(@SCRIPT,9,9,0,0,0,100,0,11000,11000,0,0,11,39679,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 9 - Cast spell'),
+(@SCRIPT,9,10,0,0,0,100,0,10000,10000,0,0,69,0,0,0,0,0,0,8,0,0,0,3044.22,5510.91,146.033,4.654, 'Windsong - Action 10 - Move to pos'),
+(@SCRIPT,9,11,0,0,0,100,0,56000,56000,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 11 - Say line 5');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000073,2000000074,2000000072,2000000071,2000000070,2000000075);
+DELETE FROM `creature_text` WHERE `entry`=@Arthorn_Windsong;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@Arthorn_Windsong,0,0, 'There''s something else here, too. After a discription of a bloody battle and the downfall of the raven, there''s a prophecy. Anzu will haunt the dreams of his enemies, twisting them to affect a return to this world...',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,1,0, 'The tablet has the confirmation we need, just as I thought. Now, we have to use this information to draw out and defeat this Anzu before he can do any more damage to the Emerald Dream!',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,2,0, 'It''s all here... how the raven''s followers captured and subdued the sprints of rivals, trapping them forever within stone statues! The tablet even mentions the raven god''s name -- Anzu. I''d thought it was lost to history!',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,3,0, 'This is it! This is really it -- the Book of the Raven!',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,4,0, 'It would''ve taken years to find the Book of the Raven without you, young sparrowhawk. Return to your home in Nagrand with our gratitude.',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,5,0, 'Since the sparrowhawks have proven such a success in hunting down the raven stones, Watcher Elaira has trained another one to relay my voice at a great distance. He can help us communicate as you investigate the bird spirits revealed in the tablet!',12,0,100,1,0,0, 'Arthorn Windsong');
+
+-- Convert quest_end_script "10850" to SAI
+-- Indexes:
+SET @Inactive_Fel_Reaver := 22293;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Inactive_Fel_Reaver;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Inactive_Fel_Reaver AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@Inactive_Fel_Reaver,0,0,0,20,0,100,0,10850,0,0,0,15,10855,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Inactive Fel Reaver - On quest 10850 rewarded - Call Quest Explored for invoker');
+
+-- Convert quest_end_script "10447" to SAI
+-- Indexes:
+SET @Toki := 18447;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Toki;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Toki AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@Toki,0,0,0,20,0,100,0,10447,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Toki - On quest 10447 rewarded - Say line 0');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry`=2000000062;
+DELETE FROM `creature_text` WHERE `entry`=@Toki;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@Toki,0,0, 'The threat be over! $N be savin'' us all!',12,0,100,1,0,0, 'Toki');
+
+-- Convert quest_end_script "9565" to SAI
+-- Indexes:
+SET @Blood_Crystal := 181748;
+SET @SCRIPT := @Blood_Crystal * 100;
+
+-- Add SAI support
+UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@Blood_Crystal;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Blood_Crystal AND `source_type`=1;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@Blood_Crystal,1,0,0,20,0,100,0,9565,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Blood Crystal - On quest 9565 rewarded - Start actionlist'),
+(@SCRIPT,9,0,0,0,0,100,0,2000,2000,0,0,12,17189,3,180000,0,0,0,8,0,0,0,-3105.36,-12549.2,-1.28,4.6, 'Blood Crystal - Action 0 - Summon'),
+(@SCRIPT,9,1,0,0,0,100,0,2000,2000,0,0,12,17189,3,180000,0,0,0,8,0,0,0,-3128.49,-12540.2,-2.54,1.5, 'Blood Crystal - Action 1 - Summon');
diff --git a/sql/updates/world/2012_12_19_01_world_viscidus.sql b/sql/updates/world/2012_12_19_01_world_viscidus.sql
new file mode 100644
index 00000000000..16d33b80b8f
--- /dev/null
+++ b/sql/updates/world/2012_12_19_01_world_viscidus.sql
@@ -0,0 +1,11 @@
+DELETE FROM `spell_dbc` WHERE `Id`=25893;
+INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`AttributesEx2`,`AttributesEx3`,`AttributesEx4`,`AttributesEx5`,`AttributesEx6`,`AttributesEx7`,`Stances`,`StancesNot`,`Targets`,`CastingTimeIndex`,`AuraInterruptFlags`,`ProcFlags`,`ProcChance`,`ProcCharges`,`MaxLevel`,`BaseLevel`,`SpellLevel`,`DurationIndex`,`RangeIndex`,`StackAmount`,`EquippedItemClass`,`EquippedItemSubClassMask`,`EquippedItemInventoryTypeMask`,`Effect1`,`Effect2`,`Effect3`,`EffectDieSides1`,`EffectDieSides2`,`EffectDieSides3`,`EffectRealPointsPerLevel1`,`EffectRealPointsPerLevel2`,`EffectRealPointsPerLevel3`,`EffectBasePoints1`,`EffectBasePoints2`,`EffectBasePoints3`,`EffectMechanic1`,`EffectMechanic2`,`EffectMechanic3`,`EffectImplicitTargetA1`,`EffectImplicitTargetA2`,`EffectImplicitTargetA3`,`EffectImplicitTargetB1`,`EffectImplicitTargetB2`,`EffectImplicitTargetB3`,`EffectRadiusIndex1`,`EffectRadiusIndex2`,`EffectRadiusIndex3`,`EffectApplyAuraName1`,`EffectApplyAuraName2`,`EffectApplyAuraName3`,`EffectAmplitude1`,`EffectAmplitude2`,`EffectAmplitude3`,`EffectMultipleValue1`,`EffectMultipleValue2`,`EffectMultipleValue3`,`EffectMiscValue1`,`EffectMiscValue2`,`EffectMiscValue3`,`EffectMiscValueB1`,`EffectMiscValueB2`,`EffectMiscValueB3`,`EffectTriggerSpell1`,`EffectTriggerSpell2`,`EffectTriggerSpell3`,`EffectSpellClassMaskA1`,`EffectSpellClassMaskA2`,`EffectSpellClassMaskA3`,`EffectSpellClassMaskB1`,`EffectSpellClassMaskB2`,`EffectSpellClassMaskB3`,`EffectSpellClassMaskC1`,`EffectSpellClassMaskC2`,`EffectSpellClassMaskC3`,`MaxTargetLevel`,`SpellFamilyName`,`SpellFamilyFlags1`,`SpellFamilyFlags2`,`SpellFamilyFlags3`,`MaxAffectedTargets`,`DmgClass`,`PreventionType`,`DmgMultiplier1`,`DmgMultiplier2`,`DmgMultiplier3`,`AreaGroupId`,`SchoolMask`,`Comment`) VALUES
+(25893,0,0,8388864,268435456,5,269484032,0,0,0,0,0,0,0,1,0,0,101,0,0,0,0,225,13,20,-1,0,0,6,0,0,1,0,0,0,0,0,-5,0,0,0,0,0,1,0,0,0,0,0,0,0,0,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,'Viscidus Shrinks');
+DELETE FROM `creature_text` WHERE `entry`=15299;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(15299, 0, 0, 'Viscidus begins to slow!', 41, 0, 100, 0, 0, 0, 'EMOTE_SLOW'),
+(15299, 1, 0, 'Viscidus is freezing up!', 41, 0, 100, 0, 0, 0, 'EMOTE_FREEZE'),
+(15299, 2, 0, 'Viscidus is frozen solid!', 41, 0, 100, 0, 0, 0, 'EMOTE_FROZEN'),
+(15299, 3, 0, 'Viscidus begins to crack!', 41, 0, 100, 0, 0, 0, 'EMOTE_CRACK'),
+(15299, 4, 0, 'Viscidus looks ready to shatter!', 41, 0, 100, 0, 0, 0, 'EMOTE_SHATTER'),
+(15299, 5, 0, 'Viscidus explodes!', 41, 0, 100, 0, 0, 0, 'EMOTE_EXPLODE');
diff --git a/sql/updates/world/2012_12_19_02_world_sai.sql b/sql/updates/world/2012_12_19_02_world_sai.sql
new file mode 100644
index 00000000000..c6367e1a8ca
--- /dev/null
+++ b/sql/updates/world/2012_12_19_02_world_sai.sql
@@ -0,0 +1,19 @@
+SET @SASHA := 26935;
+SET @HORSE := 27626;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SASHA AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@SASHA,0,0,3,38,1,100,0,0,1,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sasha - On data set 0 1 (phase 1) - Say line'),
+(@SASHA,0,1,3,38,1,100,0,0,2,0,0,1,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sasha - On data set 0 2 (phase 1) - Say line'),
+(@SASHA,0,2,3,38,1,100,0,0,3,0,0,1,2,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sasha - On data set 0 3 (phase 1) - Say line'),
+(@SASHA,0,3,0,61,0,100,0,0,0,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - Linked with events 0,1,2 - Set data 0 0'),
+(@SASHA,0,4,5,38,0,100,0,0,4,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - On data set 0 4 - Set event phase 0'),
+(@SASHA,0,5,0,61,0,100,0,0,0,0,0,80,@SASHA*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - On data set 0 4 - Run script'),
+(@SASHA,0,6,0,25,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - On reset - Set event phase 1'),
+(@SASHA,0,7,0,54,0,100,0,0,0,0,0,53,1,@SASHA,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - Just summoned - Start WP movement'),
+(@SASHA,0,8,9,40,0,100,0,4,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - On WP 4 reached - Set unit_field_bytes1 (kneel)'),
+(@SASHA,0,9,0,61,0,100,0,0,0,0,0,80,@SASHA*100+1,2,0,0,0,0,1,0,0,0,0,0,0,0,'Sasha - On WP 4 reached - Run script');
+
+DELETE FROM `waypoints` WHERE `entry`=@HORSE AND `pointid`=19;
+INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
+(@HORSE,19,4056.67,-4143.688,211.3766,'');
diff --git a/sql/updates/world/2012_12_20_00_world_conditions.sql b/sql/updates/world/2012_12_20_00_world_conditions.sql
new file mode 100644
index 00000000000..53fc5733e53
--- /dev/null
+++ b/sql/updates/world/2012_12_20_00_world_conditions.sql
@@ -0,0 +1,3 @@
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=21885;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 21885, 0, 0, 31, 0, 5, 178905, 0, 0, 0, 0, '', 'Heal Vylestem Vine - Vylestem Vine');
diff --git a/sql/updates/world/2012_12_20_01_world_conditions.sql b/sql/updates/world/2012_12_20_01_world_conditions.sql
new file mode 100644
index 00000000000..9d1851305a3
--- /dev/null
+++ b/sql/updates/world/2012_12_20_01_world_conditions.sql
@@ -0,0 +1,3 @@
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=55647;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 55647, 0, 0, 31, 0, 5, 191840, 0, 0, 0, 0, '', 'Frost Oil - Plagued Proto-Drake Egg');
diff --git a/sql/updates/world/2012_12_20_02_world_misc.sql b/sql/updates/world/2012_12_20_02_world_misc.sql
new file mode 100644
index 00000000000..c04965d8258
--- /dev/null
+++ b/sql/updates/world/2012_12_20_02_world_misc.sql
@@ -0,0 +1,26 @@
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=52781;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(17,0,52781,0,0,31,0,3,28610,0,0,27,0,'','Persuasive Strike - Scarlet Marksman'),
+(17,0,52781,0,1,31,0,3,28939,0,0,27,0,'','Persuasive Strike - Scarlet Preacher'),
+(17,0,52781,0,2,31,0,3,28940,0,0,27,0,'','Persuasive Strike - Scarlet Crusader');
+
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (32096,32098);
+INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
+(32096,32172,2,'Thrallmar''s Favor'),
+(32098,32172,2,'Honor Hold''s Favor');
+
+DELETE FROM `spell_area` WHERE `spell` IN (32096,32098);
+INSERT INTO `spell_area` (`spell`,`area`,`autocast`) VALUES
+(32096,3483,0),
+(32096,3562,0),
+(32096,3713,0),
+(32096,3714,0),
+(32096,3836,0),
+(32098,3483,0),
+(32098,3562,0),
+(32098,3713,0),
+(32098,3714,0),
+(32098,3836,0);
+
+-- Dark / Light essence removing
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (-67222, -67223, -67224, -65686, -67176, -67177, -67178, -65684);
diff --git a/sql/updates/world/2012_12_20_0_world_conditions.sql b/sql/updates/world/2012_12_20_0_world_conditions.sql
new file mode 100644
index 00000000000..f07b18ed2e4
--- /dev/null
+++ b/sql/updates/world/2012_12_20_0_world_conditions.sql
@@ -0,0 +1 @@
+UPDATE `conditions` SET `ConditionTarget`=1 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=52781 AND `ConditionTypeOrReference`=31;
diff --git a/src/server/authserver/Authentication/AuthCodes.h b/src/server/authserver/Authentication/AuthCodes.h
index 148225377ff..148225377ff 100755..100644
--- a/src/server/authserver/Authentication/AuthCodes.h
+++ b/src/server/authserver/Authentication/AuthCodes.h
diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp
index 90d112a1433..90d112a1433 100755..100644
--- a/src/server/authserver/Main.cpp
+++ b/src/server/authserver/Main.cpp
diff --git a/src/server/authserver/Realms/RealmList.cpp b/src/server/authserver/Realms/RealmList.cpp
index 453efd5bf72..79df2b15605 100755..100644
--- a/src/server/authserver/Realms/RealmList.cpp
+++ b/src/server/authserver/Realms/RealmList.cpp
@@ -31,7 +31,7 @@ void RealmList::Initialize(uint32 updateInterval)
UpdateRealms(true);
}
-void RealmList::UpdateRealm(uint32 ID, const std::string& name, const std::string& address, uint16 port, uint8 icon, RealmFlags flag, uint8 timezone, AccountTypes allowedSecurityLevel, float popu, uint32 build)
+void RealmList::UpdateRealm(uint32 ID, const std::string& name, ACE_INET_Addr const& address, uint8 icon, RealmFlags flag, uint8 timezone, AccountTypes allowedSecurityLevel, float popu, uint32 build)
{
// Create new if not exist or update existed
Realm& realm = m_realms[name];
@@ -45,9 +45,7 @@ void RealmList::UpdateRealm(uint32 ID, const std::string& name, const std::strin
realm.populationLevel = popu;
// Append port to IP address.
- std::ostringstream ss;
- ss << address << ':' << port;
- realm.address = ss.str();
+ address.addr_to_string(realm.address, ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 16);
realm.gamebuild = build;
}
@@ -80,8 +78,8 @@ void RealmList::UpdateRealms(bool init)
{
Field* fields = result->Fetch();
uint32 realmId = fields[0].GetUInt32();
- const std::string& name = fields[1].GetString();
- const std::string& address = fields[2].GetString();
+ std::string name = fields[1].GetString();
+ std::string address = fields[2].GetString();
uint16 port = fields[3].GetUInt16();
uint8 icon = fields[4].GetUInt8();
RealmFlags flag = RealmFlags(fields[5].GetUInt8());
@@ -90,10 +88,12 @@ void RealmList::UpdateRealms(bool init)
float pop = fields[8].GetFloat();
uint32 build = fields[9].GetUInt32();
- UpdateRealm(realmId, name, address, port, icon, flag, timezone, (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), pop, build);
+ ACE_INET_Addr addr(port, address.c_str(), AF_INET);
+
+ UpdateRealm(realmId, name, addr, icon, flag, timezone, (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), pop, build);
if (init)
- sLog->outInfo(LOG_FILTER_AUTHSERVER, "Added realm \"%s\".", fields[1].GetCString());
+ sLog->outInfo(LOG_FILTER_AUTHSERVER, "Added realm \"%s\" at %s.", name.c_str(), m_realms[name].address);
}
while (result->NextRow());
}
diff --git a/src/server/authserver/Realms/RealmList.h b/src/server/authserver/Realms/RealmList.h
index c8407b0fea1..52482897ea4 100755..100644
--- a/src/server/authserver/Realms/RealmList.h
+++ b/src/server/authserver/Realms/RealmList.h
@@ -21,6 +21,7 @@
#include <ace/Singleton.h>
#include <ace/Null_Mutex.h>
+#include <ace/INET_Addr.h>
#include "Common.h"
enum RealmFlags
@@ -39,7 +40,7 @@ enum RealmFlags
// Storage object for a realm
struct Realm
{
- std::string address;
+ char address[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 16];
std::string name;
uint8 icon;
RealmFlags flag;
@@ -71,7 +72,7 @@ public:
private:
void UpdateRealms(bool init=false);
- void UpdateRealm(uint32 ID, const std::string& name, const std::string& address, uint16 port, uint8 icon, RealmFlags flag, uint8 timezone, AccountTypes allowedSecurityLevel, float popu, uint32 build);
+ void UpdateRealm(uint32 ID, const std::string& name, ACE_INET_Addr const& address, uint8 icon, RealmFlags flag, uint8 timezone, AccountTypes allowedSecurityLevel, float popu, uint32 build);
RealmMap m_realms;
uint32 m_UpdateInterval;
diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp
index ed3b3cf4145..ed3b3cf4145 100755..100644
--- a/src/server/authserver/Server/AuthSocket.cpp
+++ b/src/server/authserver/Server/AuthSocket.cpp
diff --git a/src/server/authserver/Server/AuthSocket.h b/src/server/authserver/Server/AuthSocket.h
index 9be2136b55c..9be2136b55c 100755..100644
--- a/src/server/authserver/Server/AuthSocket.h
+++ b/src/server/authserver/Server/AuthSocket.h
diff --git a/src/server/authserver/Server/RealmAcceptor.h b/src/server/authserver/Server/RealmAcceptor.h
index b764e4d2494..b764e4d2494 100755..100644
--- a/src/server/authserver/Server/RealmAcceptor.h
+++ b/src/server/authserver/Server/RealmAcceptor.h
diff --git a/src/server/authserver/Server/RealmSocket.cpp b/src/server/authserver/Server/RealmSocket.cpp
index d65431eca44..d65431eca44 100755..100644
--- a/src/server/authserver/Server/RealmSocket.cpp
+++ b/src/server/authserver/Server/RealmSocket.cpp
diff --git a/src/server/authserver/Server/RealmSocket.h b/src/server/authserver/Server/RealmSocket.h
index b093691047c..b093691047c 100755..100644
--- a/src/server/authserver/Server/RealmSocket.h
+++ b/src/server/authserver/Server/RealmSocket.h
diff --git a/src/server/authserver/authserver.rc b/src/server/authserver/authserver.rc
index 97de89432bf..97de89432bf 100755..100644
--- a/src/server/authserver/authserver.rc
+++ b/src/server/authserver/authserver.rc
diff --git a/src/server/collision/BoundingIntervalHierarchy.cpp b/src/server/collision/BoundingIntervalHierarchy.cpp
index 8e90cac92f5..8e90cac92f5 100755..100644
--- a/src/server/collision/BoundingIntervalHierarchy.cpp
+++ b/src/server/collision/BoundingIntervalHierarchy.cpp
diff --git a/src/server/collision/BoundingIntervalHierarchy.h b/src/server/collision/BoundingIntervalHierarchy.h
index a4bbe21006a..a4bbe21006a 100755..100644
--- a/src/server/collision/BoundingIntervalHierarchy.h
+++ b/src/server/collision/BoundingIntervalHierarchy.h
diff --git a/src/server/collision/Management/IVMapManager.h b/src/server/collision/Management/IVMapManager.h
index 7cf296625f4..7cf296625f4 100755..100644
--- a/src/server/collision/Management/IVMapManager.h
+++ b/src/server/collision/Management/IVMapManager.h
diff --git a/src/server/collision/Management/VMapFactory.cpp b/src/server/collision/Management/VMapFactory.cpp
index 657f989a0c0..657f989a0c0 100755..100644
--- a/src/server/collision/Management/VMapFactory.cpp
+++ b/src/server/collision/Management/VMapFactory.cpp
diff --git a/src/server/collision/Management/VMapFactory.h b/src/server/collision/Management/VMapFactory.h
index 27bce523c43..27bce523c43 100755..100644
--- a/src/server/collision/Management/VMapFactory.h
+++ b/src/server/collision/Management/VMapFactory.h
diff --git a/src/server/collision/Management/VMapManager2.h b/src/server/collision/Management/VMapManager2.h
index c87c42fd832..c87c42fd832 100755..100644
--- a/src/server/collision/Management/VMapManager2.h
+++ b/src/server/collision/Management/VMapManager2.h
diff --git a/src/server/collision/Maps/MapTree.h b/src/server/collision/Maps/MapTree.h
index f0df713bf57..f0df713bf57 100755..100644
--- a/src/server/collision/Maps/MapTree.h
+++ b/src/server/collision/Maps/MapTree.h
diff --git a/src/server/collision/Maps/TileAssembler.h b/src/server/collision/Maps/TileAssembler.h
index 554940a4663..554940a4663 100755..100644
--- a/src/server/collision/Maps/TileAssembler.h
+++ b/src/server/collision/Maps/TileAssembler.h
diff --git a/src/server/collision/Models/ModelInstance.h b/src/server/collision/Models/ModelInstance.h
index 92591a91b93..92591a91b93 100755..100644
--- a/src/server/collision/Models/ModelInstance.h
+++ b/src/server/collision/Models/ModelInstance.h
diff --git a/src/server/collision/Models/WorldModel.h b/src/server/collision/Models/WorldModel.h
index 98be3494927..98be3494927 100755..100644
--- a/src/server/collision/Models/WorldModel.h
+++ b/src/server/collision/Models/WorldModel.h
diff --git a/src/server/collision/VMapTools.h b/src/server/collision/VMapTools.h
index 72d9e8988c1..72d9e8988c1 100755..100644
--- a/src/server/collision/VMapTools.h
+++ b/src/server/collision/VMapTools.h
diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp
index d9d19c2f009..d9d19c2f009 100755..100644
--- a/src/server/game/AI/CoreAI/CombatAI.cpp
+++ b/src/server/game/AI/CoreAI/CombatAI.cpp
diff --git a/src/server/game/AI/CoreAI/CombatAI.h b/src/server/game/AI/CoreAI/CombatAI.h
index fa31e57d780..fa31e57d780 100755..100644
--- a/src/server/game/AI/CoreAI/CombatAI.h
+++ b/src/server/game/AI/CoreAI/CombatAI.h
diff --git a/src/server/game/AI/CoreAI/GuardAI.cpp b/src/server/game/AI/CoreAI/GuardAI.cpp
index 90ca7009098..90ca7009098 100755..100644
--- a/src/server/game/AI/CoreAI/GuardAI.cpp
+++ b/src/server/game/AI/CoreAI/GuardAI.cpp
diff --git a/src/server/game/AI/CoreAI/GuardAI.h b/src/server/game/AI/CoreAI/GuardAI.h
index c8dd9d54921..c8dd9d54921 100755..100644
--- a/src/server/game/AI/CoreAI/GuardAI.h
+++ b/src/server/game/AI/CoreAI/GuardAI.h
diff --git a/src/server/game/AI/CoreAI/PassiveAI.cpp b/src/server/game/AI/CoreAI/PassiveAI.cpp
index 3738d5bab6c..3738d5bab6c 100755..100644
--- a/src/server/game/AI/CoreAI/PassiveAI.cpp
+++ b/src/server/game/AI/CoreAI/PassiveAI.cpp
diff --git a/src/server/game/AI/CoreAI/PassiveAI.h b/src/server/game/AI/CoreAI/PassiveAI.h
index b4fd579d693..b4fd579d693 100755..100644
--- a/src/server/game/AI/CoreAI/PassiveAI.h
+++ b/src/server/game/AI/CoreAI/PassiveAI.h
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index 1de5417b820..78c22e74f44 100755..100644
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -44,10 +44,6 @@ PetAI::PetAI(Creature* c) : CreatureAI(c), i_tracker(TIME_INTERVAL_LOOK)
UpdateAllies();
}
-void PetAI::EnterEvadeMode()
-{
-}
-
bool PetAI::_needToStop()
{
// This is needed for charmed creatures, as once their target was reset other effects can trigger threat
@@ -74,12 +70,13 @@ void PetAI::_stopAttack()
me->InterruptNonMeleeSpells(false);
me->SendMeleeAttackStop(); // Should stop pet's attack button from flashing
me->GetCharmInfo()->SetIsCommandAttack(false);
+ ClearCharmInfoFlags();
HandleReturnMovement();
}
void PetAI::UpdateAI(const uint32 diff)
{
- if (!me->isAlive())
+ if (!me->isAlive() || !me->GetCharmInfo())
return;
Unit* owner = me->GetCharmerOrOwner();
@@ -107,39 +104,34 @@ void PetAI::UpdateAI(const uint32 diff)
}
// Check before attacking to prevent pets from leaving stay position
- if (CanAttack(me->getVictim()))
+ if (me->GetCharmInfo()->HasCommandState(COMMAND_STAY))
+ {
+ if (me->GetCharmInfo()->IsCommandAttack() || (me->GetCharmInfo()->IsAtStay() && me->IsWithinMeleeRange(me->getVictim())))
+ DoMeleeAttackIfReady();
+ }
+ else
DoMeleeAttackIfReady();
}
- else if (owner && me->GetCharmInfo()) //no victim
+ else
{
- // Only aggressive pets do target search every update.
- // Defensive pets do target search only in these cases:
- // * Owner attacks something - handled by OwnerAttacked()
- // * Owner receives damage - handled by OwnerDamagedBy()
- // * Pet is in combat and current target dies - handled by KilledUnit()
- if (me->HasReactState(REACT_AGGRESSIVE))
+ if (me->HasReactState(REACT_AGGRESSIVE) || me->GetCharmInfo()->IsAtStay())
{
- Unit* nextTarget = SelectNextTarget();
+ // Every update we need to check targets only in certain cases
+ // Aggressive - Allow auto select if owner or pet don't have a target
+ // Stay - Only pick from pet or owner targets / attackers so targets won't run by
+ // while chasing our owner. Don't do auto select.
+ // All other cases (ie: defensive) - Targets are assigned by AttackedBy(), OwnerAttackedBy(), OwnerAttacked(), etc.
+ Unit* nextTarget = SelectNextTarget(me->HasReactState(REACT_AGGRESSIVE));
if (nextTarget)
AttackStart(nextTarget);
else
- {
- me->GetCharmInfo()->SetIsCommandAttack(false);
HandleReturnMovement();
- }
}
else
- {
- me->GetCharmInfo()->SetIsCommandAttack(false);
HandleReturnMovement();
- }
- }
- else if (owner && !me->HasUnitState(UNIT_STATE_FOLLOW)) // no charm info and no victim
- HandleReturnMovement();
- if (!me->GetCharmInfo())
- return;
+ }
// Autocast (casted only in combat or persistent spells in any state)
if (!me->HasUnitState(UNIT_STATE_CASTING))
@@ -191,6 +183,9 @@ void PetAI::UpdateAI(const uint32 diff)
}
}
+ if (spellInfo->HasEffect(SPELL_EFFECT_JUMP_DEST))
+ continue; // Pets must only jump to target
+
// No enemy, check friendly
if (!spellUsed)
{
@@ -274,6 +269,7 @@ void PetAI::UpdateAllies()
//only pet and owner/not in group->ok
if (m_AllySet.size() == 2 && !group)
return;
+
//owner is in group; group members filled in already (no raid -> subgroupcount = whole count)
if (group && !group->isRaidGroup() && m_AllySet.size() == (group->GetMembersCount() + 2))
return;
@@ -313,15 +309,11 @@ void PetAI::KilledUnit(Unit* victim)
me->InterruptNonMeleeSpells(false);
me->SendMeleeAttackStop(); // Stops the pet's 'Attack' button from flashing
- Unit* nextTarget = SelectNextTarget();
-
- if (nextTarget)
+ // Before returning to owner, see if there are more things to attack
+ if (Unit* nextTarget = SelectNextTarget(false))
AttackStart(nextTarget);
else
- {
- me->GetCharmInfo()->SetIsCommandAttack(false);
HandleReturnMovement(); // Return
- }
}
void PetAI::AttackStart(Unit* target)
@@ -332,17 +324,14 @@ void PetAI::AttackStart(Unit* target)
if (!CanAttack(target))
return;
- if (Unit* owner = me->GetOwner())
- owner->SetInCombatWith(target);
-
// Only chase if not commanded to stay or if stay but commanded to attack
DoAttack(target, (!me->GetCharmInfo()->HasCommandState(COMMAND_STAY) || me->GetCharmInfo()->IsCommandAttack()));
}
-void PetAI::OwnerDamagedBy(Unit* attacker)
+void PetAI::OwnerAttackedBy(Unit* attacker)
{
- // Called when owner takes damage. Allows defensive pets to know
- // that their owner might need help
+ // Called when owner takes damage. This function helps keep pets from running off
+ // simply due to owner gaining aggro.
if (!attacker)
return;
@@ -380,10 +369,12 @@ void PetAI::OwnerAttacked(Unit* target)
AttackStart(target);
}
-Unit* PetAI::SelectNextTarget()
+Unit* PetAI::SelectNextTarget(bool allowAutoSelect) const
{
- // Provides next target selection after current target death
- // Targets are not evaluated here for being valid attack targets
+ // Provides next target selection after current target death.
+ // This function should only be called internally by the AI
+ // Targets are not evaluated here for being valid targets, that is done in _CanAttack()
+ // The parameter: allowAutoSelect lets us disable aggressive pet auto targeting for certain situations
// Passive pets don't do next target selection
if (me->HasReactState(REACT_PASSIVE))
@@ -406,17 +397,17 @@ Unit* PetAI::SelectNextTarget()
// Check owner victim
// 3.0.2 - Pets now start attacking their owners victim in defensive mode as soon as the hunter does
if (Unit* ownerVictim = me->GetCharmerOrOwner()->getVictim())
- if (!ownerVictim->HasBreakableByDamageCrowdControlAura())
return ownerVictim;
// Neither pet or owner had a target and aggressive pets can pick any target
- // Note: Creature::SelectNearestTarget() If no distance is supplied it uses MAX_VISIBILITY_DISTANCE
- // We also want to lock this to LOS so pet doesn't go running through walls and stuff
- if (me->HasReactState(REACT_AGGRESSIVE))
- if (Unit* nearTarget = me->ToCreature()->SelectNearestTarget())
- if (nearTarget->IsHostileTo(me) && !nearTarget->HasBreakableByDamageCrowdControlAura())
- if (nearTarget->IsWithinLOS(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()))
- return nearTarget;
+ // To prevent aggressive pets from chain selecting targets and running off, we
+ // only select a random target if certain conditions are met.
+ if (me->HasReactState(REACT_AGGRESSIVE) && allowAutoSelect)
+ {
+ if (!me->GetCharmInfo()->IsReturning() || me->GetCharmInfo()->IsFollowing() || me->GetCharmInfo()->IsAtStay())
+ if (Unit* nearTarget = me->ToCreature()->SelectNearestHostileUnitInAggroRange(true))
+ return nearTarget;
+ }
// Default - no valid targets
return NULL;
@@ -426,6 +417,11 @@ void PetAI::HandleReturnMovement()
{
// Handles moving the pet back to stay or owner
+ // Prevent activating movement when under control of spells
+ // such as "Eyes of the Beast"
+ if (me->isCharmed())
+ return;
+
if (me->GetCharmInfo()->HasCommandState(COMMAND_STAY))
{
if (!me->GetCharmInfo()->IsAtStay() && !me->GetCharmInfo()->IsReturning())
@@ -436,6 +432,7 @@ void PetAI::HandleReturnMovement()
float x, y, z;
me->GetCharmInfo()->GetStayPosition(x, y, z);
+ ClearCharmInfoFlags();
me->GetCharmInfo()->SetIsReturning(true);
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MovePoint(me->GetGUIDLow(), x, y, z);
@@ -448,6 +445,7 @@ void PetAI::HandleReturnMovement()
{
if (!me->GetCharmInfo()->IsCommandAttack())
{
+ ClearCharmInfoFlags();
me->GetCharmInfo()->SetIsReturning(true);
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveFollow(me->GetCharmerOrOwner(), PET_FOLLOW_DIST, me->GetFollowAngle());
@@ -458,33 +456,33 @@ void PetAI::HandleReturnMovement()
void PetAI::DoAttack(Unit* target, bool chase)
{
- // Handles attack with or without chase and also resets all
- // PetAI flags for next update / creature kill
+ // Handles attack with or without chase and also resets flags
+ // for next update / creature kill
- // me->GetCharmInfo()->SetIsCommandAttack(false);
+ if (me->Attack(target, true))
+ {
+ if (Unit* owner = me->GetOwner())
+ owner->SetInCombatWith(target);
- // The following conditions are true if chase == true
- // (Follow && (Aggressive || Defensive))
- // ((Stay || Follow) && (Passive && player clicked attack))
+ // Play sound to let the player know the pet is attacking something it picked on its own
+ if (me->HasReactState(REACT_AGGRESSIVE) && !me->GetCharmInfo()->IsCommandAttack())
+ me->SendPetAIReaction(me->GetGUID());
- if (chase)
- {
- if (me->Attack(target, true))
+
+ if (chase)
+ {
+ ClearCharmInfoFlags();
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MoveChase(target);
+ }
+ else // (Stay && ((Aggressive || Defensive) && In Melee Range)))
{
- me->GetCharmInfo()->SetIsAtStay(false);
- me->GetCharmInfo()->SetIsFollowing(false);
- me->GetCharmInfo()->SetIsReturning(false);
+ ClearCharmInfoFlags();
+ me->GetCharmInfo()->SetIsAtStay(true);
me->GetMotionMaster()->Clear();
- me->GetMotionMaster()->MoveChase(target);
+ me->GetMotionMaster()->MoveIdle();
}
}
- else // (Stay && ((Aggressive || Defensive) && In Melee Range)))
- {
- me->GetCharmInfo()->SetIsAtStay(true);
- me->GetCharmInfo()->SetIsFollowing(false);
- me->GetCharmInfo()->SetIsReturning(false);
- me->Attack(target, true);
- }
}
void PetAI::MovementInform(uint32 moveType, uint32 data)
@@ -498,10 +496,8 @@ void PetAI::MovementInform(uint32 moveType, uint32 data)
// pet's GUIDLow since we set that as the waypoint ID
if (data == me->GetGUIDLow() && me->GetCharmInfo()->IsReturning())
{
+ ClearCharmInfoFlags();
me->GetCharmInfo()->SetIsAtStay(true);
- me->GetCharmInfo()->SetIsReturning(false);
- me->GetCharmInfo()->SetIsFollowing(false);
- me->GetCharmInfo()->SetIsCommandAttack(false);
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveIdle();
}
@@ -513,10 +509,8 @@ void PetAI::MovementInform(uint32 moveType, uint32 data)
// otherwise we're probably chasing a creature
if (me->GetCharmerOrOwner() && me->GetCharmInfo() && data == me->GetCharmerOrOwner()->GetGUIDLow() && me->GetCharmInfo()->IsReturning())
{
- me->GetCharmInfo()->SetIsAtStay(false);
- me->GetCharmInfo()->SetIsReturning(false);
+ ClearCharmInfoFlags();
me->GetCharmInfo()->SetIsFollowing(true);
- me->GetCharmInfo()->SetIsCommandAttack(false);
}
break;
}
@@ -527,32 +521,55 @@ void PetAI::MovementInform(uint32 moveType, uint32 data)
bool PetAI::CanAttack(Unit* target)
{
- // Evaluates wether a pet can attack a specific
- // target based on CommandState, ReactState and other flags
+ // Evaluates wether a pet can attack a specific target based on CommandState, ReactState and other flags
+ // IMPORTANT: The order in which things are checked is important, be careful if you add or remove checks
- // Can't attack dead targets...
- if (!target->isAlive())
+ // Hmmm...
+ if (!target)
return false;
- // Returning - check first since pets returning ignore attacks
- if (me->GetCharmInfo()->IsReturning())
+ if (!target->isAlive())
+ {
+ // Clear target to prevent getting stuck on dead targets
+ me->AttackStop();
+ me->InterruptNonMeleeSpells(false);
+ me->SendMeleeAttackStop();
return false;
+ }
- // Passive - check now so we don't have to worry about passive in later checks
+ // Passive - passive pets can attack if told to
if (me->HasReactState(REACT_PASSIVE))
return me->GetCharmInfo()->IsCommandAttack();
- // Follow
- if (me->GetCharmInfo()->HasCommandState(COMMAND_FOLLOW))
- return true;
+ // CC - mobs under crowd control can be attacked if owner commanded
+ if (target->HasBreakableByDamageCrowdControlAura())
+ return me->GetCharmInfo()->IsCommandAttack();
+
+ // Returning - pets ignore attacks only if owner clicked follow
+ if (me->GetCharmInfo()->IsReturning())
+ return !me->GetCharmInfo()->IsCommandFollow();
// Stay - can attack if target is within range or commanded to
if (me->GetCharmInfo()->HasCommandState(COMMAND_STAY))
return (me->IsWithinMeleeRange(target) || me->GetCharmInfo()->IsCommandAttack());
- // Pets commanded to attack should not stop their approach if attacked by another creature
- if (me->getVictim() && (me->getVictim() != target))
- return !me->GetCharmInfo()->IsCommandAttack();
+ // Pets attacking something (or chasing) should only switch targets if owner tells them to
+ if (me->getVictim() && me->getVictim() != target)
+ {
+ // Check if our owner selected this target and clicked "attack"
+ Unit* ownerTarget = NULL;
+ if (Player* owner = me->GetCharmerOrOwner()->ToPlayer())
+ ownerTarget = owner->GetSelectedUnit();
+ else
+ ownerTarget = me->GetCharmerOrOwner()->getVictim();
+
+ if (ownerTarget && me->GetCharmInfo()->IsCommandAttack())
+ return (target->GetGUID() == ownerTarget->GetGUID());
+ }
+
+ // Follow
+ if (me->GetCharmInfo()->HasCommandState(COMMAND_FOLLOW))
+ return !me->GetCharmInfo()->IsReturning();
// default, though we shouldn't ever get here
return false;
@@ -565,11 +582,55 @@ void PetAI::ReceiveEmote(Player* player, uint32 emote)
{
case TEXT_EMOTE_COWER:
if (me->isPet() && me->ToPet()->IsPetGhoul())
- me->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
+ me->HandleEmoteCommand(/*EMOTE_ONESHOT_ROAR*/EMOTE_ONESHOT_OMNICAST_GHOUL);
break;
case TEXT_EMOTE_ANGRY:
if (me->isPet() && me->ToPet()->IsPetGhoul())
- me->HandleEmoteCommand(EMOTE_ONESHOT_COWER);
+ me->HandleEmoteCommand(/*EMOTE_ONESHOT_COWER*/EMOTE_STATE_STUN);
+ break;
+ case TEXT_EMOTE_GLARE:
+ if (me->isPet() && me->ToPet()->IsPetGhoul())
+ me->HandleEmoteCommand(EMOTE_STATE_STUN);
+ break;
+ case TEXT_EMOTE_SOOTHE:
+ if (me->isPet() && me->ToPet()->IsPetGhoul())
+ me->HandleEmoteCommand(EMOTE_ONESHOT_OMNICAST_GHOUL);
break;
}
}
+
+void PetAI::ClearCharmInfoFlags()
+{
+ // Quick access to set all flags to FALSE
+
+ CharmInfo* ci = me->GetCharmInfo();
+
+ if (ci)
+ {
+ ci->SetIsAtStay(false);
+ ci->SetIsCommandAttack(false);
+ ci->SetIsCommandFollow(false);
+ ci->SetIsFollowing(false);
+ ci->SetIsReturning(false);
+ }
+}
+
+void PetAI::AttackedBy(Unit* attacker)
+{
+ // Called when pet takes damage. This function helps keep pets from running off
+ // simply due to gaining aggro.
+
+ if (!attacker)
+ return;
+
+ // Passive pets don't do anything
+ if (me->HasReactState(REACT_PASSIVE))
+ return;
+
+ // Prevent pet from disengaging from current target
+ if (me->getVictim() && me->getVictim()->isAlive())
+ return;
+
+ // Continue to evaluate and attack if necessary
+ AttackStart(attacker);
+}
diff --git a/src/server/game/AI/CoreAI/PetAI.h b/src/server/game/AI/CoreAI/PetAI.h
index d7f1dca3fbf..8a8853b19b5 100755..100644
--- a/src/server/game/AI/CoreAI/PetAI.h
+++ b/src/server/game/AI/CoreAI/PetAI.h
@@ -31,17 +31,24 @@ class PetAI : public CreatureAI
explicit PetAI(Creature* c);
- void EnterEvadeMode();
void UpdateAI(const uint32);
static int Permissible(const Creature*);
void KilledUnit(Unit* /*victim*/);
void AttackStart(Unit* target);
void MovementInform(uint32 moveType, uint32 data);
- void OwnerDamagedBy(Unit* attacker);
+ void OwnerAttackedBy(Unit* attacker);
void OwnerAttacked(Unit* target);
+ void AttackedBy(Unit* attacker);
void ReceiveEmote(Player* player, uint32 textEmote);
+ // The following aren't used by the PetAI but need to be defined to override
+ // default CreatureAI functions which interfere with the PetAI
+ //
+ void MoveInLineOfSight(Unit* /*who*/) {} // CreatureAI interferes with returning pets
+ void MoveInLineOfSight_Safe(Unit* /*who*/) {} // CreatureAI interferes with returning pets
+ void EnterEvadeMode() {} // For fleeing, pets don't use this type of Evade mechanic
+
private:
bool _isVisible(Unit*) const;
bool _needToStop(void);
@@ -54,10 +61,11 @@ class PetAI : public CreatureAI
std::set<uint64> m_AllySet;
uint32 m_updateAlliesTimer;
- Unit* SelectNextTarget();
+ Unit* SelectNextTarget(bool allowAutoSelect) const;
void HandleReturnMovement();
void DoAttack(Unit* target, bool chase);
bool CanAttack(Unit* target);
+ void ClearCharmInfoFlags();
};
#endif
diff --git a/src/server/game/AI/CoreAI/ReactorAI.cpp b/src/server/game/AI/CoreAI/ReactorAI.cpp
index 4683a75a44e..4683a75a44e 100755..100644
--- a/src/server/game/AI/CoreAI/ReactorAI.cpp
+++ b/src/server/game/AI/CoreAI/ReactorAI.cpp
diff --git a/src/server/game/AI/CoreAI/ReactorAI.h b/src/server/game/AI/CoreAI/ReactorAI.h
index 4a95dcf04e8..4a95dcf04e8 100755..100644
--- a/src/server/game/AI/CoreAI/ReactorAI.h
+++ b/src/server/game/AI/CoreAI/ReactorAI.h
diff --git a/src/server/game/AI/CoreAI/TotemAI.cpp b/src/server/game/AI/CoreAI/TotemAI.cpp
index d12d3c098e8..d12d3c098e8 100755..100644
--- a/src/server/game/AI/CoreAI/TotemAI.cpp
+++ b/src/server/game/AI/CoreAI/TotemAI.cpp
diff --git a/src/server/game/AI/CoreAI/TotemAI.h b/src/server/game/AI/CoreAI/TotemAI.h
index f0d705345ef..f0d705345ef 100755..100644
--- a/src/server/game/AI/CoreAI/TotemAI.h
+++ b/src/server/game/AI/CoreAI/TotemAI.h
diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp
index 9f2c9a86094..9f2c9a86094 100755..100644
--- a/src/server/game/AI/CoreAI/UnitAI.cpp
+++ b/src/server/game/AI/CoreAI/UnitAI.cpp
diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h
index 2eab0e89fcd..8b31bb5c54d 100755..100644
--- a/src/server/game/AI/CoreAI/UnitAI.h
+++ b/src/server/game/AI/CoreAI/UnitAI.h
@@ -29,17 +29,6 @@ class Quest;
class Unit;
struct AISpellInfoType;
-// Default script texts
-enum GeneralScriptTexts
-{
- DEFAULT_TEXT = -1000000,
- EMOTE_GENERIC_FRENZY_KILL = -1000001,
- EMOTE_GENERIC_FRENZY = -1000002,
- EMOTE_GENERIC_ENRAGED = -1000003,
- EMOTE_GENERIC_BERSERK = -1000004,
- EMOTE_GENERIC_BERSERK_RAID = -1000005 // RaidBossEmote version of the previous one
-};
-
//Selection method used by SelectTarget
enum SelectAggroTarget
{
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp
index e5868117da8..e5868117da8 100755..100644
--- a/src/server/game/AI/CreatureAI.cpp
+++ b/src/server/game/AI/CreatureAI.cpp
diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h
index d3ad27935ca..4f61e168a87 100755..100644
--- a/src/server/game/AI/CreatureAI.h
+++ b/src/server/game/AI/CreatureAI.h
@@ -117,7 +117,7 @@ class CreatureAI : public UnitAI
virtual void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spell*/) {}
// Called when the creature is target of hostile action: swing, hostile spell landed, fear/etc)
- //virtual void AttackedBy(Unit* attacker);
+ virtual void AttackedBy(Unit* /*attacker*/) {}
virtual bool IsEscorted() { return false; }
// Called when creature is spawned or respawned (for reseting variables)
@@ -137,7 +137,7 @@ class CreatureAI : public UnitAI
virtual void ReceiveEmote(Player* /*player*/, uint32 /*emoteId*/) {}
// Called when owner takes damage
- virtual void OwnerDamagedBy(Unit* /*attacker*/) {}
+ virtual void OwnerAttackedBy(Unit* /*attacker*/) {}
// Called when owner attacks something
virtual void OwnerAttacked(Unit* /*target*/) {}
diff --git a/src/server/game/AI/CreatureAIFactory.h b/src/server/game/AI/CreatureAIFactory.h
index f4147826811..f4147826811 100755..100644
--- a/src/server/game/AI/CreatureAIFactory.h
+++ b/src/server/game/AI/CreatureAIFactory.h
diff --git a/src/server/game/AI/CreatureAIImpl.h b/src/server/game/AI/CreatureAIImpl.h
index 981ac1f5f16..981ac1f5f16 100755..100644
--- a/src/server/game/AI/CreatureAIImpl.h
+++ b/src/server/game/AI/CreatureAIImpl.h
diff --git a/src/server/game/AI/CreatureAIRegistry.cpp b/src/server/game/AI/CreatureAIRegistry.cpp
index e5c689da339..e5c689da339 100755..100644
--- a/src/server/game/AI/CreatureAIRegistry.cpp
+++ b/src/server/game/AI/CreatureAIRegistry.cpp
diff --git a/src/server/game/AI/CreatureAIRegistry.h b/src/server/game/AI/CreatureAIRegistry.h
index 39d792a0d77..39d792a0d77 100755..100644
--- a/src/server/game/AI/CreatureAIRegistry.h
+++ b/src/server/game/AI/CreatureAIRegistry.h
diff --git a/src/server/game/AI/CreatureAISelector.cpp b/src/server/game/AI/CreatureAISelector.cpp
index 4ccaa174e67..4ccaa174e67 100755..100644
--- a/src/server/game/AI/CreatureAISelector.cpp
+++ b/src/server/game/AI/CreatureAISelector.cpp
diff --git a/src/server/game/AI/CreatureAISelector.h b/src/server/game/AI/CreatureAISelector.h
index 933ec16f75c..933ec16f75c 100755..100644
--- a/src/server/game/AI/CreatureAISelector.h
+++ b/src/server/game/AI/CreatureAISelector.h
diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp
index 84e44109e58..84e44109e58 100755..100644
--- a/src/server/game/AI/EventAI/CreatureEventAI.cpp
+++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp
diff --git a/src/server/game/AI/EventAI/CreatureEventAI.h b/src/server/game/AI/EventAI/CreatureEventAI.h
index da5f0b084cf..da5f0b084cf 100755..100644
--- a/src/server/game/AI/EventAI/CreatureEventAI.h
+++ b/src/server/game/AI/EventAI/CreatureEventAI.h
diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
index f3df332c1e9..f3df332c1e9 100755..100644
--- a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
+++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.h b/src/server/game/AI/EventAI/CreatureEventAIMgr.h
index 75e24266fb5..75e24266fb5 100755..100644
--- a/src/server/game/AI/EventAI/CreatureEventAIMgr.h
+++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.h
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 6aebcbb2d8a..bd528edc432 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -677,7 +677,7 @@ void SmartAI::CorpseRemoved(uint32& respawnDelay)
void SmartAI::PassengerBoarded(Unit* who, int8 seatId, bool apply)
{
- GetScript()->ProcessEventsFor(SMART_EVENT_PASSENGER_BOARDED, who, (uint32)seatId, 0, apply);
+ GetScript()->ProcessEventsFor(apply ? SMART_EVENT_PASSENGER_BOARDED : SMART_EVENT_PASSENGER_REMOVED, who, uint32(seatId), 0, apply);
}
void SmartAI::InitializeAI()
diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp
index a82de501ea6..a82de501ea6 100755..100644
--- a/src/server/game/Accounts/AccountMgr.cpp
+++ b/src/server/game/Accounts/AccountMgr.cpp
diff --git a/src/server/game/Accounts/AccountMgr.h b/src/server/game/Accounts/AccountMgr.h
index c14bcc48bdc..c14bcc48bdc 100755..100644
--- a/src/server/game/Accounts/AccountMgr.h
+++ b/src/server/game/Accounts/AccountMgr.h
diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp
index 91437ae3bb5..09e1de0a2bf 100755..100644
--- a/src/server/game/Achievements/AchievementMgr.cpp
+++ b/src/server/game/Achievements/AchievementMgr.cpp
@@ -42,7 +42,6 @@
#include "World.h"
#include "WorldPacket.h"
-
namespace Trinity
{
class AchievementChatBuilder
@@ -472,7 +471,7 @@ void AchievementMgr::ResetAchievementCriteria(AchievementCriteriaTypes type, uin
{
AchievementCriteriaEntry const* achievementCriteria = (*i);
- AchievementEntry const* achievement = sAchievementStore.LookupEntry(achievementCriteria->referredAchievement);
+ AchievementEntry const* achievement = sAchievementMgr->GetAchievement(achievementCriteria->referredAchievement);
if (!achievement)
continue;
@@ -620,7 +619,7 @@ void AchievementMgr::LoadFromDB(PreparedQueryResult achievementResult, PreparedQ
uint32 achievementid = fields[0].GetUInt16();
// must not happen: cleanup at server startup in sAchievementMgr->LoadCompletedAchievements()
- AchievementEntry const* achievement = sAchievementStore.LookupEntry(achievementid);
+ AchievementEntry const* achievement = sAchievementMgr->GetAchievement(achievementid);
if (!achievement)
continue;
@@ -646,7 +645,7 @@ void AchievementMgr::LoadFromDB(PreparedQueryResult achievementResult, PreparedQ
uint32 counter = fields[1].GetUInt32();
time_t date = time_t(fields[2].GetUInt32());
- AchievementCriteriaEntry const* criteria = sAchievementCriteriaStore.LookupEntry(id);
+ AchievementCriteriaEntry const* criteria = sAchievementMgr->GetAchievementCriteria(id);
if (!criteria)
{
// we will remove not existed criteria for all characters
@@ -781,7 +780,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
for (AchievementCriteriaEntryList::const_iterator i = achievementCriteriaList.begin(); i != achievementCriteriaList.end(); ++i)
{
AchievementCriteriaEntry const* achievementCriteria = (*i);
- AchievementEntry const* achievement = sAchievementStore.LookupEntry(achievementCriteria->referredAchievement);
+ AchievementEntry const* achievement = sAchievementMgr->GetAchievement(achievementCriteria->referredAchievement);
if (!achievement)
continue;
@@ -1490,7 +1489,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
{
uint32 points = 0;
for (CompletedAchievementMap::iterator itr = m_completedAchievements.begin(); itr != m_completedAchievements.end(); ++itr)
- if (AchievementEntry const* pAchievement = sAchievementStore.LookupEntry(itr->first))
+ if (AchievementEntry const* pAchievement = sAchievementMgr->GetAchievement(itr->first))
points += pAchievement->points;
SetCriteriaProgress(achievementCriteria, points, PROGRESS_SET);
}
@@ -1940,7 +1939,7 @@ void AchievementMgr::SetCriteriaProgress(AchievementCriteriaEntry const* entry,
if (entry->timeLimit)
{
// has to exist else we wouldn't be here
- timedCompleted = IsCompletedCriteria(entry, sAchievementStore.LookupEntry(entry->referredAchievement));
+ timedCompleted = IsCompletedCriteria(entry, sAchievementMgr->GetAchievement(entry->referredAchievement));
// Client expects this in packet
timeElapsed = entry->timeLimit - (timedIter->second/IN_MILLISECONDS);
@@ -1974,7 +1973,7 @@ void AchievementMgr::UpdateTimedAchievements(uint32 timeDiff)
// Time is up, remove timer and reset progress
if (itr->second <= timeDiff)
{
- AchievementCriteriaEntry const* entry = sAchievementCriteriaStore.LookupEntry(itr->first);
+ AchievementCriteriaEntry const* entry = sAchievementMgr->GetAchievementCriteria(itr->first);
RemoveCriteriaProgress(entry);
m_timedAchievements.erase(itr++);
}
@@ -1995,7 +1994,7 @@ void AchievementMgr::StartTimedAchievement(AchievementCriteriaTimedTypes type, u
if ((*i)->timerStartEvent != entry)
continue;
- AchievementEntry const* achievement = sAchievementStore.LookupEntry((*i)->referredAchievement);
+ AchievementEntry const* achievement = sAchievementMgr->GetAchievement((*i)->referredAchievement);
if (m_timedAchievements.find((*i)->ID) == m_timedAchievements.end() && !IsCompletedCriteria(*i, achievement))
{
// Start the timer
@@ -2131,7 +2130,7 @@ void AchievementMgr::BuildAllDataPacket(WorldPacket* data) const
for (CompletedAchievementMap::const_iterator iter = m_completedAchievements.begin(); iter != m_completedAchievements.end(); ++iter)
{
// Skip hidden achievements
- achievement = sAchievementStore.LookupEntry(iter->first);
+ achievement = sAchievementMgr->GetAchievement(iter->first);
if (achievement->flags & ACHIEVEMENT_FLAG_HIDDEN)
continue;
@@ -2211,7 +2210,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()
for (uint32 entryId = 0; entryId < sAchievementCriteriaStore.GetNumRows(); ++entryId)
{
- AchievementCriteriaEntry const* criteria = sAchievementCriteriaStore.LookupEntry(entryId);
+ AchievementCriteriaEntry const* criteria = sAchievementMgr->GetAchievementCriteria(entryId);
if (!criteria)
continue;
@@ -2239,7 +2238,7 @@ void AchievementGlobalMgr::LoadAchievementReferenceList()
for (uint32 entryId = 0; entryId < sAchievementStore.GetNumRows(); ++entryId)
{
- AchievementEntry const* achievement = sAchievementStore.LookupEntry(entryId);
+ AchievementEntry const* achievement = sAchievementMgr->GetAchievement(entryId);
if (!achievement || !achievement->refAchievement)
continue;
@@ -2248,7 +2247,7 @@ void AchievementGlobalMgr::LoadAchievementReferenceList()
}
// Once Bitten, Twice Shy (10 player) - Icecrown Citadel
- if (AchievementEntry const* achievement = sAchievementStore.LookupEntry(4539))
+ if (AchievementEntry const* achievement = sAchievementMgr->GetAchievement(4539))
const_cast<AchievementEntry*>(achievement)->mapID = 631; // Correct map requirement (currently has Ulduar)
sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u achievement references in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@@ -2275,7 +2274,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
Field* fields = result->Fetch();
uint32 criteria_id = fields[0].GetUInt32();
- AchievementCriteriaEntry const* criteria = sAchievementCriteriaStore.LookupEntry(criteria_id);
+ AchievementCriteriaEntry const* criteria = sAchievementMgr->GetAchievementCriteria(criteria_id);
if (!criteria)
{
@@ -2315,7 +2314,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
// post loading checks
for (uint32 entryId = 0; entryId < sAchievementCriteriaStore.GetNumRows(); ++entryId)
{
- AchievementCriteriaEntry const* criteria = sAchievementCriteriaStore.LookupEntry(entryId);
+ AchievementCriteriaEntry const* criteria = sAchievementMgr->GetAchievementCriteria(entryId);
if (!criteria)
continue;
@@ -2327,7 +2326,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
break; // any cases
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST:
{
- AchievementEntry const* achievement = sAchievementStore.LookupEntry(criteria->referredAchievement);
+ AchievementEntry const* achievement = sAchievementMgr->GetAchievement(criteria->referredAchievement);
if (!achievement)
continue;
@@ -2378,7 +2377,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST:
case ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM: // only Children's Week achievements
{
- AchievementEntry const* achievement = sAchievementStore.LookupEntry(criteria->referredAchievement);
+ AchievementEntry const* achievement = sAchievementMgr->GetAchievement(criteria->referredAchievement);
if (!achievement)
continue;
if (achievement->categoryId != CATEGORY_CHILDRENS_WEEK)
@@ -2415,23 +2414,22 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
Field* fields = result->Fetch();
uint16 achievementId = fields[0].GetUInt16();
- const AchievementEntry* achievement = sAchievementStore.LookupEntry(achievementId);
+ const AchievementEntry* achievement = sAchievementMgr->GetAchievement(achievementId);
if (!achievement)
{
// Remove non existent achievements from all characters
sLog->outError(LOG_FILTER_ACHIEVEMENTSYS, "Non-existing achievement %u data removed from table `character_achievement`.", achievementId);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_ACHIEVMENT);
-
stmt->setUInt16(0, uint16(achievementId));
-
CharacterDatabase.Execute(stmt);
continue;
}
else if (achievement->flags & (ACHIEVEMENT_FLAG_REALM_FIRST_REACH | ACHIEVEMENT_FLAG_REALM_FIRST_KILL))
m_allCompletedAchievements.insert(achievementId);
- } while (result->NextRow());
+ }
+ while (result->NextRow());
sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu realm first completed achievements in %u ms", (unsigned long)m_allCompletedAchievements.size(), GetMSTimeDiffToNow(oldMSTime));
}
@@ -2442,7 +2440,7 @@ void AchievementGlobalMgr::LoadRewards()
m_achievementRewards.clear(); // need for reload case
- // 0 1 2 3 4 5 6
+ // 0 1 2 3 4 5 6
QueryResult result = WorldDatabase.Query("SELECT entry, title_A, title_H, item, sender, subject, text FROM achievement_reward");
if (!result)
@@ -2457,10 +2455,10 @@ void AchievementGlobalMgr::LoadRewards()
{
Field* fields = result->Fetch();
uint32 entry = fields[0].GetUInt32();
- const AchievementEntry* pAchievement = sAchievementStore.LookupEntry(entry);
+ const AchievementEntry* pAchievement = GetAchievement(entry);
if (!pAchievement)
{
- sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` has wrong achievement (Entry: %u), ignore", entry);
+ sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` has wrong achievement (Entry: %u), ignored.", entry);
continue;
}
@@ -2475,7 +2473,7 @@ void AchievementGlobalMgr::LoadRewards()
// must be title or mail at least
if (!reward.titleId[0] && !reward.titleId[1] && !reward.sender)
{
- sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) not have title or item reward data, ignore.", entry);
+ sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) does not have title or item reward data, ignored.", entry);
continue;
}
@@ -2534,7 +2532,6 @@ void AchievementGlobalMgr::LoadRewards()
m_achievementRewards[entry] = reward;
++count;
-
}
while (result->NextRow());
@@ -2577,7 +2574,18 @@ void AchievementGlobalMgr::LoadRewardLocales()
ObjectMgr::AddLocaleString(fields[1 + 2 * (i - 1)].GetString(), locale, data.subject);
ObjectMgr::AddLocaleString(fields[1 + 2 * (i - 1) + 1].GetString(), locale, data.text);
}
- } while (result->NextRow());
+ }
+ while (result->NextRow());
sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu achievement reward locale strings in %u ms", (unsigned long)m_achievementRewardLocales.size(), GetMSTimeDiffToNow(oldMSTime));
}
+
+AchievementEntry const* AchievementGlobalMgr::GetAchievement(uint32 achievementId) const
+{
+ return sAchievementStore.LookupEntry(achievementId);
+}
+
+AchievementCriteriaEntry const* AchievementGlobalMgr::GetAchievementCriteria(uint32 criteriaId) const
+{
+ return sAchievementCriteriaStore.LookupEntry(criteriaId);
+}
diff --git a/src/server/game/Achievements/AchievementMgr.h b/src/server/game/Achievements/AchievementMgr.h
index 3215b4196f7..0f3d63cd60f 100755..100644
--- a/src/server/game/Achievements/AchievementMgr.h
+++ b/src/server/game/Achievements/AchievementMgr.h
@@ -15,6 +15,7 @@
* 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 __TRINITY_ACHIEVEMENTMGR_H
#define __TRINITY_ACHIEVEMENTMGR_H
@@ -27,11 +28,15 @@
#include "DBCEnums.h"
#include "DBCStores.h"
-typedef std::list<AchievementCriteriaEntry const*> AchievementCriteriaEntryList;
-typedef std::list<AchievementEntry const*> AchievementEntryList;
+class Unit;
+class Player;
+class WorldPacket;
+
+typedef std::vector<AchievementCriteriaEntry const*> AchievementCriteriaEntryList;
+typedef std::vector<AchievementEntry const*> AchievementEntryList;
-typedef std::map<uint32, AchievementCriteriaEntryList> AchievementCriteriaListByAchievement;
-typedef std::map<uint32, AchievementEntryList> AchievementListByReferencedId;
+typedef UNORDERED_MAP<uint32, AchievementCriteriaEntryList> AchievementCriteriaListByAchievement;
+typedef UNORDERED_MAP<uint32, AchievementEntryList> AchievementListByReferencedId;
struct CriteriaProgress
{
@@ -68,9 +73,6 @@ enum AchievementCriteriaDataType
#define MAX_ACHIEVEMENT_CRITERIA_DATA_TYPE 22 // maximum value in AchievementCriteriaDataType enum
-class Player;
-class Unit;
-
struct AchievementCriteriaData
{
AchievementCriteriaDataType dataType;
@@ -194,7 +196,7 @@ struct AchievementCriteriaData
}
bool IsValid(AchievementCriteriaEntry const* criteria);
- bool Meets(uint32 criteria_id, Player const* source, Unit const* target, uint32 miscvalue1 = 0) const;
+ bool Meets(uint32 criteria_id, Player const* source, Unit const* target, uint32 miscValue1 = 0) const;
};
struct AchievementCriteriaDataSet
@@ -202,7 +204,7 @@ struct AchievementCriteriaDataSet
AchievementCriteriaDataSet() : criteria_id(0) {}
typedef std::vector<AchievementCriteriaData> Storage;
void Add(AchievementCriteriaData const& data) { storage.push_back(data); }
- bool Meets(Player const* source, Unit const* target, uint32 miscvalue = 0) const;
+ bool Meets(Player const* source, Unit const* target, uint32 miscValue = 0) const;
void SetCriteriaId(uint32 id) {criteria_id = id;}
private:
uint32 criteria_id;
@@ -220,15 +222,15 @@ struct AchievementReward
std::string text;
};
-typedef std::map<uint32, AchievementReward> AchievementRewards;
+typedef UNORDERED_MAP<uint32, AchievementReward> AchievementRewards;
struct AchievementRewardLocale
{
- StringVector subject;
- StringVector text;
+ std::vector<std::string> subject;
+ std::vector<std::string> text;
};
-typedef std::map<uint32, AchievementRewardLocale> AchievementRewardLocales;
+typedef UNORDERED_MAP<uint32, AchievementRewardLocale> AchievementRewardLocales;
struct CompletedAchievementData
{
@@ -239,9 +241,12 @@ struct CompletedAchievementData
typedef UNORDERED_MAP<uint32, CriteriaProgress> CriteriaProgressMap;
typedef UNORDERED_MAP<uint32, CompletedAchievementData> CompletedAchievementMap;
-class Unit;
-class Player;
-class WorldPacket;
+enum ProgressType
+{
+ PROGRESS_SET,
+ PROGRESS_ACCUMULATE,
+ PROGRESS_HIGHEST
+};
class AchievementMgr
{
@@ -253,7 +258,7 @@ class AchievementMgr
static void DeleteFromDB(uint32 lowguid);
void LoadFromDB(PreparedQueryResult achievementResult, PreparedQueryResult criteriaResult);
void SaveToDB(SQLTransaction& trans);
- void ResetAchievementCriteria(AchievementCriteriaTypes type, uint32 miscvalue1 = 0, uint32 miscvalue2 = 0, bool evenIfCriteriaComplete = false);
+ void ResetAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1 = 0, uint32 miscValue2 = 0, bool evenIfCriteriaComplete = false);
void UpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1 = 0, uint32 miscValue2 = 0, Unit* unit = NULL);
void CompletedAchievement(AchievementEntry const* entry);
void CheckAllAchievementCriteria();
@@ -266,7 +271,6 @@ class AchievementMgr
void RemoveTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry); // used for quest and scripted timed achievements
private:
- enum ProgressType { PROGRESS_SET, PROGRESS_ACCUMULATE, PROGRESS_HIGHEST };
void SendAchievementEarned(AchievementEntry const* achievement) const;
void SendCriteriaUpdate(AchievementCriteriaEntry const* entry, CriteriaProgress const* progress, uint32 timeElapsed, bool timedCompleted) const;
CriteriaProgress* GetCriteriaProgress(AchievementCriteriaEntry const* entry);
@@ -348,14 +352,19 @@ class AchievementGlobalMgr
void LoadCompletedAchievements();
void LoadRewards();
void LoadRewardLocales();
+ AchievementEntry const* GetAchievement(uint32 achievementId) const;
+ AchievementCriteriaEntry const* GetAchievementCriteria(uint32 achievementId) const;
private:
AchievementCriteriaDataMap m_criteriaDataMap;
// store achievement criterias by type to speed up lookup
AchievementCriteriaEntryList m_AchievementCriteriasByType[ACHIEVEMENT_CRITERIA_TYPE_TOTAL];
+
AchievementCriteriaEntryList m_AchievementCriteriasByTimedType[ACHIEVEMENT_TIMED_TYPE_MAX];
+
// store achievement criterias by achievement to speed up lookup
AchievementCriteriaListByAchievement m_AchievementCriteriaListByAchievement;
+
// store achievements by referenced achievement id to speed up lookup
AchievementListByReferencedId m_AchievementListByReferencedId;
diff --git a/src/server/game/Addons/AddonMgr.cpp b/src/server/game/Addons/AddonMgr.cpp
index a595c73c7c0..a595c73c7c0 100755..100644
--- a/src/server/game/Addons/AddonMgr.cpp
+++ b/src/server/game/Addons/AddonMgr.cpp
diff --git a/src/server/game/Addons/AddonMgr.h b/src/server/game/Addons/AddonMgr.h
index 9efbabc8b9f..9efbabc8b9f 100755..100644
--- a/src/server/game/Addons/AddonMgr.h
+++ b/src/server/game/Addons/AddonMgr.h
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
index d580df63700..161c4a578ce 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
@@ -29,7 +29,7 @@
#include "AuctionHouseMgr.h"
#include "Item.h"
#include "Language.h"
-#include "Logging/Log.h"
+#include "Log.h"
#include <vector>
enum eAuctionHouse
@@ -89,7 +89,7 @@ uint32 AuctionHouseMgr::GetAuctionDeposit(AuctionHouseEntry const* entry, uint32
//does not clear ram
void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry* auction, SQLTransaction& trans)
{
- Item* pItem = GetAItem(auction->item_guidlow);
+ Item* pItem = GetAItem(auction->itemGUIDLow);
if (!pItem)
return;
@@ -143,7 +143,7 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry* auction, SQLTransaction&
if (bidder)
{
- bidder->GetSession()->SendAuctionBidderNotification(auction->GetHouseId(), auction->Id, bidder_guid, 0, 0, auction->item_template);
+ bidder->GetSession()->SendAuctionBidderNotification(auction->GetHouseId(), auction->Id, bidder_guid, 0, 0, auction->itemEntry);
// FIXME: for offline player need also
bidder->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WON_AUCTIONS, 1);
}
@@ -195,7 +195,7 @@ void AuctionHouseMgr::SendAuctionSuccessfulMail(AuctionEntry* auction, SQLTransa
void AuctionHouseMgr::SendAuctionExpiredMail(AuctionEntry* auction, SQLTransaction& trans)
{
//return an item in auction to its owner by mail
- Item* pItem = GetAItem(auction->item_guidlow);
+ Item* pItem = GetAItem(auction->itemGUIDLow);
if (!pItem)
return;
@@ -228,7 +228,7 @@ void AuctionHouseMgr::SendAuctionOutbiddedMail(AuctionEntry* auction, uint32 new
if (oldBidder || oldBidder_accId)
{
if (oldBidder && newBidder)
- oldBidder->GetSession()->SendAuctionBidderNotification(auction->GetHouseId(), auction->Id, newBidder->GetGUID(), newPrice, auction->GetAuctionOutBid(), auction->item_template);
+ oldBidder->GetSession()->SendAuctionBidderNotification(auction->GetHouseId(), auction->Id, newBidder->GetGUID(), newPrice, auction->GetAuctionOutBid(), auction->itemEntry);
MailDraft(auction->BuildAuctionMailSubject(AUCTION_OUTBIDDED), AuctionEntry::BuildAuctionMailBody(auction->owner, auction->bid, auction->buyout, auction->deposit, auction->GetAuctionCut()))
.AddMoney(auction->bid)
@@ -275,17 +275,17 @@ void AuctionHouseMgr::LoadAuctionItems()
Field* fields = result->Fetch();
uint32 item_guid = fields[11].GetUInt32();
- uint32 item_template = fields[12].GetUInt32();
+ uint32 itemEntry = fields[12].GetUInt32();
- ItemTemplate const* proto = sObjectMgr->GetItemTemplate(item_template);
+ ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemEntry);
if (!proto)
{
- sLog->outError(LOG_FILTER_GENERAL, "AuctionHouseMgr::LoadAuctionItems: Unknown item (GUID: %u id: #%u) in auction, skipped.", item_guid, item_template);
+ sLog->outError(LOG_FILTER_GENERAL, "AuctionHouseMgr::LoadAuctionItems: Unknown item (GUID: %u id: #%u) in auction, skipped.", item_guid, itemEntry);
continue;
}
Item* item = NewItemOrBag(proto);
- if (!item->LoadFromDB(item_guid, 0, fields, item_template))
+ if (!item->LoadFromDB(item_guid, 0, fields, itemEntry))
{
delete item;
continue;
@@ -411,7 +411,7 @@ void AuctionHouseObject::AddAuction(AuctionEntry* auction)
sScriptMgr->OnAuctionAdd(this, auction);
}
-bool AuctionHouseObject::RemoveAuction(AuctionEntry* auction, uint32 /*item_template*/)
+bool AuctionHouseObject::RemoveAuction(AuctionEntry* auction, uint32 /*itemEntry*/)
{
bool wasInMap = AuctionsMap.erase(auction->Id) ? true : false;
@@ -419,6 +419,8 @@ bool AuctionHouseObject::RemoveAuction(AuctionEntry* auction, uint32 /*item_temp
// we need to delete the entry, it is not referenced any more
delete auction;
+ auction = NULL;
+
return wasInMap;
}
@@ -465,14 +467,14 @@ void AuctionHouseObject::Update()
sScriptMgr->OnAuctionSuccessful(this, auction);
}
- uint32 item_template = auction->item_template;
+ uint32 itemEntry = auction->itemEntry;
///- In any case clear the auction
auction->DeleteFromDB(trans);
CharacterDatabase.CommitTransaction(trans);
- RemoveAuction(auction, item_template);
- sAuctionMgr->RemoveAItem(auction->item_guidlow);
+ sAuctionMgr->RemoveAItem(auction->itemGUIDLow);
+ RemoveAuction(auction, itemEntry);
}
while (result->NextRow());
}
@@ -518,7 +520,7 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr)
{
AuctionEntry* Aentry = itr->second;
- Item* item = sAuctionMgr->GetAItem(Aentry->item_guidlow);
+ Item* item = sAuctionMgr->GetAItem(Aentry->itemGUIDLow);
if (!item)
continue;
@@ -570,7 +572,6 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
if (itemRandProp)
{
char* const* temp = itemRandProp->nameSuffix;
- //char* temp = itemRandProp->nameSuffix;
// dbc local name
if (temp)
@@ -601,10 +602,10 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
//this function inserts to WorldPacket auction's data
bool AuctionEntry::BuildAuctionInfo(WorldPacket& data) const
{
- Item* item = sAuctionMgr->GetAItem(item_guidlow);
+ Item* item = sAuctionMgr->GetAItem(itemGUIDLow);
if (!item)
{
- sLog->outError(LOG_FILTER_GENERAL, "AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %u", Id, item_guidlow);
+ sLog->outError(LOG_FILTER_GENERAL, "AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %u", Id, itemGUIDLow);
return false;
}
data << uint32(Id);
@@ -658,7 +659,7 @@ void AuctionEntry::SaveToDB(SQLTransaction& trans) const
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_AUCTION);
stmt->setUInt32(0, Id);
stmt->setUInt32(1, auctioneer);
- stmt->setUInt32(2, item_guidlow);
+ stmt->setUInt32(2, itemGUIDLow);
stmt->setUInt32(3, owner);
stmt->setInt32 (4, int32(buyout));
stmt->setUInt64(5, uint64(expire_time));
@@ -673,8 +674,8 @@ bool AuctionEntry::LoadFromDB(Field* fields)
{
Id = fields[0].GetUInt32();
auctioneer = fields[1].GetUInt32();
- item_guidlow = fields[2].GetUInt32();
- item_template = fields[3].GetUInt32();
+ itemGUIDLow = fields[2].GetUInt32();
+ itemEntry = fields[3].GetUInt32();
itemCount = fields[4].GetUInt32();
owner = fields[5].GetUInt32();
buyout = fields[6].GetUInt32();
@@ -707,10 +708,10 @@ bool AuctionEntry::LoadFromDB(Field* fields)
}
// check if sold item exists for guid
- // and item_template in fact (GetAItem will fail if problematic in result check in AuctionHouseMgr::LoadAuctionItems)
- if (!sAuctionMgr->GetAItem(item_guidlow))
+ // and itemEntry in fact (GetAItem will fail if problematic in result check in AuctionHouseMgr::LoadAuctionItems)
+ if (!sAuctionMgr->GetAItem(itemGUIDLow))
{
- sLog->outError(LOG_FILTER_GENERAL, "Auction %u has not a existing item : %u", Id, item_guidlow);
+ sLog->outError(LOG_FILTER_GENERAL, "Auction %u has not a existing item : %u", Id, itemGUIDLow);
return false;
}
return true;
@@ -795,8 +796,8 @@ bool AuctionEntry::LoadFromFieldList(Field* fields)
Id = fields[0].GetUInt32();
auctioneer = fields[1].GetUInt32();
- item_guidlow = fields[2].GetUInt32();
- item_template = fields[3].GetUInt32();
+ itemGUIDLow = fields[2].GetUInt32();
+ itemEntry = fields[3].GetUInt32();
itemCount = fields[4].GetUInt32();
owner = fields[5].GetUInt32();
buyout = fields[6].GetUInt32();
@@ -835,7 +836,7 @@ bool AuctionEntry::LoadFromFieldList(Field* fields)
std::string AuctionEntry::BuildAuctionMailSubject(MailAuctionAnswers response) const
{
std::ostringstream strm;
- strm << item_template << ":0:" << response << ':' << Id << ':' << itemCount;
+ strm << itemEntry << ":0:" << response << ':' << Id << ':' << itemCount;
return strm.str();
}
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.h b/src/server/game/AuctionHouse/AuctionHouseMgr.h
index 049440f99d0..e13b4665b7b 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.h
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.h
@@ -34,11 +34,11 @@ class WorldPacket;
enum AuctionError
{
- AUCTION_OK = 0,
- AUCTION_INTERNAL_ERROR = 2,
- AUCTION_NOT_ENOUGHT_MONEY = 3,
- AUCTION_ITEM_NOT_FOUND = 4,
- CANNOT_BID_YOUR_AUCTION_ERROR = 10
+ ERR_AUCTION_OK = 0,
+ ERR_AUCTION_DATABASE_ERROR = 2,
+ ERR_AUCTION_NOT_ENOUGHT_MONEY = 3,
+ ERR_AUCTION_ITEM_NOT_FOUND = 4,
+ ERR_AUCTION_BID_OWN = 10
};
enum AuctionAction
@@ -63,8 +63,8 @@ struct AuctionEntry
{
uint32 Id;
uint32 auctioneer; // creature low guid
- uint32 item_guidlow;
- uint32 item_template;
+ uint32 itemGUIDLow;
+ uint32 itemEntry;
uint32 itemCount;
uint32 owner;
uint32 startbid; //maybe useless
@@ -118,7 +118,7 @@ class AuctionHouseObject
void AddAuction(AuctionEntry* auction);
- bool RemoveAuction(AuctionEntry* auction, uint32 item_template);
+ bool RemoveAuction(AuctionEntry* auction, uint32 itemEntry);
void Update();
diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp
index 7e3b3cc0f1a..55f38f748f2 100644
--- a/src/server/game/Battlefield/Battlefield.cpp
+++ b/src/server/game/Battlefield/Battlefield.cpp
@@ -407,13 +407,17 @@ void Battlefield::PlayerAcceptInviteToWar(Player* player)
void Battlefield::TeamCastSpell(TeamId team, int32 spellId)
{
if (spellId > 0)
+ {
for (GuidSet::const_iterator itr = m_PlayersInWar[team].begin(); itr != m_PlayersInWar[team].end(); ++itr)
if (Player* player = sObjectAccessor->FindPlayer(*itr))
player->CastSpell(player, uint32(spellId), true);
+ }
else
+ {
for (GuidSet::const_iterator itr = m_PlayersInWar[team].begin(); itr != m_PlayersInWar[team].end(); ++itr)
if (Player* player = sObjectAccessor->FindPlayer(*itr))
player->RemoveAuraFromStack(uint32(-spellId));
+ }
}
void Battlefield::BroadcastPacketToZone(WorldPacket& data) const
@@ -460,10 +464,9 @@ WorldPacket Battlefield::BuildWarningAnnPacket(std::string const& msg)
void Battlefield::SendWarningToAllInZone(uint32 entry)
{
- if (Unit* unit = sObjectAccessor->FindUnit(StalkerGuid))
- if (Creature* stalker = unit->ToCreature())
- // FIXME: replaced CHAT_TYPE_END with CHAT_MSG_BG_SYSTEM_NEUTRAL to fix compile, it's a guessed change :/
- sCreatureTextMgr->SendChat(stalker, (uint8) entry, 0, CHAT_MSG_BG_SYSTEM_NEUTRAL, LANG_ADDON, TEXT_RANGE_ZONE);
+ if (Creature* stalker = GetCreature(StalkerGuid))
+ // FIXME: replaced CHAT_TYPE_END with CHAT_MSG_BG_SYSTEM_NEUTRAL to fix compile, it's a guessed change :/
+ sCreatureTextMgr->SendChat(stalker, (uint8) entry, 0, CHAT_MSG_BG_SYSTEM_NEUTRAL, LANG_ADDON, TEXT_RANGE_ZONE);
}
/*void Battlefield::SendWarningToAllInWar(int32 entry,...)
@@ -483,9 +486,8 @@ void Battlefield::SendWarningToAllInZone(uint32 entry)
void Battlefield::SendWarningToPlayer(Player* player, uint32 entry)
{
if (player)
- if (Unit* unit = sObjectAccessor->FindUnit(StalkerGuid))
- if (Creature* stalker = unit->ToCreature())
- sCreatureTextMgr->SendChat(stalker, (uint8)entry, player->GetGUID());
+ if (Creature* stalker = GetCreature(StalkerGuid))
+ sCreatureTextMgr->SendChat(stalker, (uint8)entry, player->GetGUID());
}
void Battlefield::SendUpdateWorldState(uint32 field, uint32 value)
@@ -658,7 +660,7 @@ void Battlefield::RemovePlayerFromResurrectQueue(uint64 playerGuid)
}
}
-void Battlefield::SendAreaSpiritHealerQueryOpcode(Player* player, const uint64 &guid)
+void Battlefield::SendAreaSpiritHealerQueryOpcode(Player* player, uint64 guid)
{
WorldPacket data(SMSG_AREA_SPIRIT_HEALER_TIME, 12);
uint32 time = m_LastResurectTimer; // resurrect every 30 seconds
@@ -738,7 +740,7 @@ void BfGraveyard::Resurrect()
// Check if the player is in world and on the good graveyard
if (player->IsInWorld())
- if (Unit* spirit = sObjectAccessor->FindUnit(m_SpiritGuide[m_ControlTeam]))
+ if (Creature* spirit = m_Bf->GetCreature(m_SpiritGuide[m_ControlTeam]))
spirit->CastSpell(spirit, SPELL_SPIRIT_HEAL, true);
// Resurect player
@@ -788,6 +790,18 @@ void BfGraveyard::RelocateDeadPlayers()
}
}
+bool BfGraveyard::HasNpc(uint64 guid)
+{
+ if (!m_SpiritGuide[0] || !m_SpiritGuide[1])
+ return false;
+
+ if (!m_Bf->GetCreature(m_SpiritGuide[0]) ||
+ !m_Bf->GetCreature(m_SpiritGuide[1]))
+ return false;
+
+ return (m_SpiritGuide[0] == guid || m_SpiritGuide[1] == guid);
+}
+
// *******************************************************
// *************** End Spirit Guide system ***************
// *******************************************************
@@ -861,11 +875,25 @@ GameObject* Battlefield::SpawnGameObject(uint32 entry, float x, float y, float z
return go;
}
+Creature* Battlefield::GetCreature(uint64 GUID)
+{
+ if (!m_Map)
+ return NULL;
+ return m_Map->GetCreature(GUID);
+}
+
+GameObject* Battlefield::GetGameObject(uint64 GUID)
+{
+ if (!m_Map)
+ return NULL;
+ return m_Map->GetGameObject(GUID);
+}
+
// *******************************************************
// ******************* CapturePoint **********************
// *******************************************************
-BfCapturePoint::BfCapturePoint(Battlefield* battlefield) : m_Bf(battlefield), m_capturePoint(NULL)
+BfCapturePoint::BfCapturePoint(Battlefield* battlefield) : m_Bf(battlefield), m_capturePointGUID(0)
{
m_team = TEAM_NEUTRAL;
m_value = 0;
@@ -880,19 +908,24 @@ BfCapturePoint::BfCapturePoint(Battlefield* battlefield) : m_Bf(battlefield), m_
bool BfCapturePoint::HandlePlayerEnter(Player* player)
{
- if (m_capturePoint)
+ if (m_capturePointGUID)
{
- player->SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldState1, 1);
- player->SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldstate2, uint32(ceil((m_value + m_maxValue) / (2 * m_maxValue) * 100.0f)));
- player->SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldstate3, m_neutralValuePct);
+ if (GameObject* capturePoint = m_Bf->GetGameObject(m_capturePointGUID))
+ {
+ player->SendUpdateWorldState(capturePoint->GetGOInfo()->capturePoint.worldState1, 1);
+ player->SendUpdateWorldState(capturePoint->GetGOInfo()->capturePoint.worldstate2, uint32(ceil((m_value + m_maxValue) / (2 * m_maxValue) * 100.0f)));
+ player->SendUpdateWorldState(capturePoint->GetGOInfo()->capturePoint.worldstate3, m_neutralValuePct);
+ }
}
+
return m_activePlayers[player->GetTeamId()].insert(player->GetGUID()).second;
}
GuidSet::iterator BfCapturePoint::HandlePlayerLeave(Player* player)
{
- if (m_capturePoint)
- player->SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldState1, 0);
+ if (m_capturePointGUID)
+ if (GameObject* capturePoint = m_Bf->GetGameObject(m_capturePointGUID))
+ player->SendUpdateWorldState(capturePoint->GetGOInfo()->capturePoint.worldState1, 0);
GuidSet::iterator current = m_activePlayers[player->GetTeamId()].find(player->GetGUID());
@@ -905,15 +938,18 @@ GuidSet::iterator BfCapturePoint::HandlePlayerLeave(Player* player)
void BfCapturePoint::SendChangePhase()
{
- if (!m_capturePoint)
+ if (!m_capturePointGUID)
return;
- // send this too, sometimes the slider disappears, dunno why :(
- SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldState1, 1);
- // send these updates to only the ones in this objective
- SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldstate2, (uint32) ceil((m_value + m_maxValue) / (2 * m_maxValue) * 100.0f));
- // send this too, sometimes it resets :S
- SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldstate3, m_neutralValuePct);
+ if (GameObject* capturePoint = m_Bf->GetGameObject(m_capturePointGUID))
+ {
+ // send this too, sometimes the slider disappears, dunno why :(
+ SendUpdateWorldState(capturePoint->GetGOInfo()->capturePoint.worldState1, 1);
+ // send these updates to only the ones in this objective
+ SendUpdateWorldState(capturePoint->GetGOInfo()->capturePoint.worldstate2, (uint32) ceil((m_value + m_maxValue) / (2 * m_maxValue) * 100.0f));
+ // send this too, sometimes it resets :S
+ SendUpdateWorldState(capturePoint->GetGOInfo()->capturePoint.worldstate3, m_neutralValuePct);
+ }
}
bool BfCapturePoint::SetCapturePointData(GameObject* capturePoint)
@@ -922,7 +958,7 @@ bool BfCapturePoint::SetCapturePointData(GameObject* capturePoint)
sLog->outDebug(LOG_FILTER_BATTLEFIELD, "Creating capture point %u", capturePoint->GetEntry());
- m_capturePoint = capturePoint;
+ m_capturePointGUID = MAKE_NEW_GUID(capturePoint->GetGUIDLow(), capturePoint->GetEntry(), HIGHGUID_GAMEOBJECT);
// check info existence
GameObjectTemplate const* goinfo = capturePoint->GetGOInfo();
@@ -952,13 +988,22 @@ bool BfCapturePoint::SetCapturePointData(GameObject* capturePoint)
return true;
}
+GameObject* BfCapturePoint::GetCapturePointGo()
+{
+ return m_Bf->GetGameObject(m_capturePointGUID);
+}
+
bool BfCapturePoint::DelCapturePoint()
{
- if (m_capturePoint)
+ if (m_capturePointGUID)
{
- m_capturePoint->SetRespawnTime(0); // not save respawn time
- m_capturePoint->Delete();
- m_capturePoint = NULL;
+ if (GameObject* capturePoint = m_Bf->GetGameObject(m_capturePointGUID))
+ {
+ capturePoint->SetRespawnTime(0); // not save respawn time
+ capturePoint->Delete();
+ capturePoint = NULL;
+ }
+ m_capturePointGUID = 0;
}
return true;
@@ -966,36 +1011,39 @@ bool BfCapturePoint::DelCapturePoint()
bool BfCapturePoint::Update(uint32 diff)
{
- if (!m_capturePoint)
+ if (!m_capturePointGUID)
return false;
- float radius = m_capturePoint->GetGOInfo()->capturePoint.radius;
-
- for (uint8 team = 0; team < 2; ++team)
+ if (GameObject* capturePoint = m_Bf->GetGameObject(m_capturePointGUID))
{
- for (GuidSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end();)
+ float radius = capturePoint->GetGOInfo()->capturePoint.radius;
+
+ for (uint8 team = 0; team < 2; ++team)
{
- if (Player* player = sObjectAccessor->FindPlayer(*itr))
+ for (GuidSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end();)
{
- if (!m_capturePoint->IsWithinDistInMap(player, radius) || !player->IsOutdoorPvPActive())
- itr = HandlePlayerLeave(player);
+ if (Player* player = sObjectAccessor->FindPlayer(*itr))
+ {
+ if (!capturePoint->IsWithinDistInMap(player, radius) || !player->IsOutdoorPvPActive())
+ itr = HandlePlayerLeave(player);
+ else
+ ++itr;
+ }
else
++itr;
}
- else
- ++itr;
}
- }
- std::list<Player*> players;
- Trinity::AnyPlayerInObjectRangeCheck checker(m_capturePoint, radius);
- Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(m_capturePoint, players, checker);
- m_capturePoint->VisitNearbyWorldObject(radius, searcher);
+ std::list<Player*> players;
+ Trinity::AnyPlayerInObjectRangeCheck checker(capturePoint, radius);
+ Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(capturePoint, players, checker);
+ capturePoint->VisitNearbyWorldObject(radius, searcher);
- for (std::list<Player*>::iterator itr = players.begin(); itr != players.end(); ++itr)
- if ((*itr)->IsOutdoorPvPActive())
- if (m_activePlayers[(*itr)->GetTeamId()].insert((*itr)->GetGUID()).second)
- HandlePlayerEnter(*itr);
+ for (std::list<Player*>::iterator itr = players.begin(); itr != players.end(); ++itr)
+ if ((*itr)->IsOutdoorPvPActive())
+ if (m_activePlayers[(*itr)->GetTeamId()].insert((*itr)->GetGUID()).second)
+ HandlePlayerEnter(*itr);
+ }
// get the difference of numbers
float fact_diff = ((float) m_activePlayers[0].size() - (float) m_activePlayers[1].size()) * diff / BATTLEFIELD_OBJECTIVE_UPDATE_INTERVAL;
diff --git a/src/server/game/Battlefield/Battlefield.h b/src/server/game/Battlefield/Battlefield.h
index 4533c666869..28216a43758 100644
--- a/src/server/game/Battlefield/Battlefield.h
+++ b/src/server/game/Battlefield/Battlefield.h
@@ -103,7 +103,8 @@ class BfCapturePoint
virtual void SendChangePhase();
bool SetCapturePointData(GameObject* capturePoint);
- GameObject* GetCapturePointGo() { return m_capturePoint; }
+ GameObject* GetCapturePointGo();
+ uint32 GetCapturePointEntry(){ return m_capturePointEntry; }
TeamId GetTeamId() { return m_team; }
protected:
@@ -137,7 +138,7 @@ class BfCapturePoint
uint32 m_capturePointEntry;
// Gameobject related to that capture point
- GameObject* m_capturePoint;
+ uint64 m_capturePointGUID;
};
class BfGraveyard
@@ -171,17 +172,7 @@ class BfGraveyard
void RelocateDeadPlayers();
// Check if this graveyard has a spirit guide
- bool HasNpc(uint64 guid)
- {
- if (!m_SpiritGuide[0] || !m_SpiritGuide[1])
- return false;
-
- if (!sObjectAccessor->FindUnit(m_SpiritGuide[0]) ||
- !sObjectAccessor->FindUnit(m_SpiritGuide[1]))
- return false;
-
- return (m_SpiritGuide[0] == guid || m_SpiritGuide[1] == guid);
- }
+ bool HasNpc(uint64 guid);
// Check if a player is in this graveyard's ressurect queue
bool HasPlayer(uint64 guid) { return m_ResurrectQueue.find(guid) != m_ResurrectQueue.end(); }
@@ -299,22 +290,25 @@ class Battlefield : public ZoneScript
Creature* SpawnCreature(uint32 entry, Position pos, TeamId team);
GameObject* SpawnGameObject(uint32 entry, float x, float y, float z, float o);
+ Creature* GetCreature(uint64 GUID);
+ GameObject* GetGameObject(uint64 GUID);
+
// Script-methods
/// Called on start
- virtual void OnBattleStart() {};
+ virtual void OnBattleStart() { }
/// Called at the end of battle
- virtual void OnBattleEnd(bool /*endByTimer*/) {};
+ virtual void OnBattleEnd(bool /*endByTimer*/) { }
/// Called x minutes before battle start when player in zone are invite to join queue
- virtual void OnStartGrouping() {};
+ virtual void OnStartGrouping() { }
/// Called when a player accept to join the battle
- virtual void OnPlayerJoinWar(Player* /*player*/) {};
+ virtual void OnPlayerJoinWar(Player* /*player*/) { }
/// Called when a player leave the battle
- virtual void OnPlayerLeaveWar(Player* /*player*/) {};
+ virtual void OnPlayerLeaveWar(Player* /*player*/) { }
/// Called when a player leave battlefield zone
- virtual void OnPlayerLeaveZone(Player* /*player*/) {};
+ virtual void OnPlayerLeaveZone(Player* /*player*/) { }
/// Called when a player enter in battlefield zone
- virtual void OnPlayerEnterZone(Player* /*player*/) {};
+ virtual void OnPlayerEnterZone(Player* /*player*/) { }
WorldPacket BuildWarningAnnPacket(std::string const& msg);
void SendWarningToAllInZone(uint32 entry);
@@ -326,7 +320,7 @@ class Battlefield : public ZoneScript
uint32 GetBattleId() { return m_BattleId; }
void AskToLeaveQueue(Player* player);
- virtual void DoCompleteOrIncrementAchievement(uint32 /*achievement*/, Player* /*player*/, uint8 /*incrementNumber = 1*/) {};
+ virtual void DoCompleteOrIncrementAchievement(uint32 /*achievement*/, Player* /*player*/, uint8 /*incrementNumber = 1*/) { }
/// Send all worldstate data to all player in zone.
virtual void SendInitWorldStatesToAll() = 0;
@@ -335,7 +329,7 @@ class Battlefield : public ZoneScript
/// Return if we can use mount in battlefield
bool CanFlyIn() { return !m_isActive; }
- void SendAreaSpiritHealerQueryOpcode(Player* player, const uint64 & guid);
+ void SendAreaSpiritHealerQueryOpcode(Player* player, uint64 guid);
void StartBattle();
void EndBattle(bool endByTimer);
@@ -377,6 +371,7 @@ class Battlefield : public ZoneScript
uint32 m_BattleId; // BattleID (for packet)
uint32 m_ZoneId; // ZoneID of Wintergrasp = 4197
uint32 m_MapId; // MapId where is Battlefield
+ Map* m_Map;
uint32 m_MaxPlayer; // Maximum number of player that participated to Battlefield
uint32 m_MinPlayer; // Minimum number of player for Battlefield start
uint32 m_MinLevel; // Required level to participate at Battlefield
@@ -412,7 +407,7 @@ class Battlefield : public ZoneScript
void BroadcastPacketToWar(WorldPacket& data) const;
// CapturePoint system
- void AddCapturePoint(BfCapturePoint* cp) { m_capturePoints[cp->GetCapturePointGo()->GetEntry()] = cp; }
+ void AddCapturePoint(BfCapturePoint* cp) { m_capturePoints[cp->GetCapturePointEntry()] = cp; }
BfCapturePoint* GetCapturePoint(uint32 lowguid) const
{
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
index 0ea4266cc22..63f95e159af 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
@@ -21,6 +21,8 @@
// TODO: Add proper implement of achievement
#include "BattlefieldWG.h"
+#include "AchievementMgr.h"
+#include "MapManager.h"
#include "ObjectMgr.h"
#include "Opcodes.h"
#include "Player.h"
@@ -54,6 +56,7 @@ bool BattlefieldWG::SetupBattlefield()
m_BattleId = BATTLEFIELD_BATTLEID_WG;
m_ZoneId = BATTLEFIELD_WG_ZONEID;
m_MapId = BATTLEFIELD_WG_MAPID;
+ m_Map = sMapMgr->FindMap(m_MapId, 0);
m_MaxPlayer = sWorld->getIntConfig(CONFIG_WINTERGRASP_PLR_MAX);
m_IsEnabled = sWorld->getBoolConfig(CONFIG_WINTERGRASP_ENABLE);
@@ -141,9 +144,8 @@ bool BattlefieldWG::SetupBattlefield()
// Hide NPCs from the Attacker's team in the keep
for (GuidSet::const_iterator itr = KeepCreature[GetAttackerTeam()].begin(); itr != KeepCreature[GetAttackerTeam()].end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- HideNpc(creature);
+ if (Creature* creature = GetCreature(*itr))
+ HideNpc(creature);
// Spawn Horde NPCs outside the keep
for (uint8 i = 0; i < WG_OUTSIDE_ALLIANCE_NPC; i++)
@@ -157,9 +159,8 @@ bool BattlefieldWG::SetupBattlefield()
// Hide units outside the keep that are defenders
for (GuidSet::const_iterator itr = OutsideCreature[GetDefenderTeam()].begin(); itr != OutsideCreature[GetDefenderTeam()].end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- HideNpc(creature);
+ if (Creature* creature = GetCreature(*itr))
+ HideNpc(creature);
// Spawn turrets and hide them per default
for (uint8 i = 0; i < WG_MAX_TURRET; i++)
@@ -176,20 +177,24 @@ bool BattlefieldWG::SetupBattlefield()
// Spawn all gameobjects
for (uint8 i = 0; i < WG_MAX_OBJ; i++)
{
- GameObject* go = SpawnGameObject(WGGameObjectBuilding[i].entry, WGGameObjectBuilding[i].x, WGGameObjectBuilding[i].y, WGGameObjectBuilding[i].z, WGGameObjectBuilding[i].o);
- BfWGGameObjectBuilding* b = new BfWGGameObjectBuilding(this);
- b->Init(go, WGGameObjectBuilding[i].type, WGGameObjectBuilding[i].WorldState, WGGameObjectBuilding[i].nameId);
- if (!IsEnabled() && go->GetEntry() == GO_WINTERGRASP_VAULT_GATE)
- go->SetDestructibleState(GO_DESTRUCTIBLE_DESTROYED);
- BuildingsInZone.insert(b);
+ if (GameObject* go = SpawnGameObject(WGGameObjectBuilding[i].entry, WGGameObjectBuilding[i].x, WGGameObjectBuilding[i].y, WGGameObjectBuilding[i].z, WGGameObjectBuilding[i].o))
+ {
+ BfWGGameObjectBuilding* b = new BfWGGameObjectBuilding(this);
+ b->Init(go, WGGameObjectBuilding[i].type, WGGameObjectBuilding[i].WorldState, WGGameObjectBuilding[i].nameId);
+ if (!IsEnabled() && go->GetEntry() == GO_WINTERGRASP_VAULT_GATE)
+ go->SetDestructibleState(GO_DESTRUCTIBLE_DESTROYED);
+ BuildingsInZone.insert(b);
+ }
}
// Spawning portal defender
for (uint8 i = 0; i < WG_MAX_TELEPORTER; i++)
{
- GameObject* go = SpawnGameObject(WGPortalDefenderData[i].entry, WGPortalDefenderData[i].x, WGPortalDefenderData[i].y, WGPortalDefenderData[i].z, WGPortalDefenderData[i].o);
- DefenderPortalList.insert(go);
- go->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[GetDefenderTeam()]);
+ if (GameObject* go = SpawnGameObject(WGPortalDefenderData[i].entry, WGPortalDefenderData[i].x, WGPortalDefenderData[i].y, WGPortalDefenderData[i].z, WGPortalDefenderData[i].o))
+ {
+ DefenderPortalList.insert(go->GetGUID());
+ go->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[GetDefenderTeam()]);
+ }
}
UpdateCounterVehicle(true);
@@ -215,13 +220,13 @@ bool BattlefieldWG::Update(uint32 diff)
void BattlefieldWG::OnBattleStart()
{
// Spawn titan relic
- m_titansRelic = SpawnGameObject(GO_WINTERGRASP_TITAN_S_RELIC, 5440.0f, 2840.8f, 430.43f, 0);
- if (m_titansRelic)
+ if (GameObject* relic = SpawnGameObject(GO_WINTERGRASP_TITAN_S_RELIC, 5440.0f, 2840.8f, 430.43f, 0))
{
// Update faction of relic, only attacker can click on
- m_titansRelic->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[GetAttackerTeam()]);
+ relic->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[GetAttackerTeam()]);
// Set in use (not allow to click on before last door is broken)
- m_titansRelic->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
+ relic->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
+ m_titansRelicGUID = relic->GetGUID();
}
else
sLog->outError(LOG_FILTER_BATTLEFIELD, "WG: Failed to spawn titan relic.");
@@ -230,13 +235,10 @@ void BattlefieldWG::OnBattleStart()
// Update tower visibility and update faction
for (GuidSet::const_iterator itr = CanonList.begin(); itr != CanonList.end(); ++itr)
{
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
+ if (Creature* creature = GetCreature(*itr))
{
- if (Creature* creature = unit->ToCreature())
- {
- ShowNpc(creature, true);
- creature->setFaction(WintergraspFaction[GetDefenderTeam()]);
- }
+ ShowNpc(creature, true);
+ creature->setFaction(WintergraspFaction[GetDefenderTeam()]);
}
}
@@ -306,21 +308,19 @@ void BattlefieldWG::UpdateCounterVehicle(bool init)
void BattlefieldWG::OnBattleEnd(bool endByTimer)
{
// Remove relic
- if (m_titansRelic)
- m_titansRelic->RemoveFromWorld();
- m_titansRelic = NULL;
+ if (m_titansRelicGUID)
+ if (GameObject* relic = GetGameObject(m_titansRelicGUID))
+ relic->RemoveFromWorld();
+ m_titansRelicGUID = 0;
// Remove turret
for (GuidSet::const_iterator itr = CanonList.begin(); itr != CanonList.end(); ++itr)
{
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
+ if (Creature* creature = GetCreature(*itr))
{
- if (Creature* creature = unit->ToCreature())
- {
- if (!endByTimer)
- creature->setFaction(WintergraspFaction[GetDefenderTeam()]);
- HideNpc(creature);
- }
+ if (!endByTimer)
+ creature->setFaction(WintergraspFaction[GetDefenderTeam()]);
+ HideNpc(creature);
}
}
@@ -328,25 +328,21 @@ void BattlefieldWG::OnBattleEnd(bool endByTimer)
{
// Change all npc in keep
for (GuidSet::const_iterator itr = KeepCreature[GetAttackerTeam()].begin(); itr != KeepCreature[GetAttackerTeam()].end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- HideNpc(creature);
+ if (Creature* creature = GetCreature(*itr))
+ HideNpc(creature);
for (GuidSet::const_iterator itr = KeepCreature[GetDefenderTeam()].begin(); itr != KeepCreature[GetDefenderTeam()].end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- ShowNpc(creature, true);
+ if (Creature* creature = GetCreature(*itr))
+ ShowNpc(creature, true);
// Change all npc out of keep
for (GuidSet::const_iterator itr = OutsideCreature[GetDefenderTeam()].begin(); itr != OutsideCreature[GetDefenderTeam()].end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- HideNpc(creature);
+ if (Creature* creature = GetCreature(*itr))
+ HideNpc(creature);
for (GuidSet::const_iterator itr = OutsideCreature[GetAttackerTeam()].begin(); itr != OutsideCreature[GetAttackerTeam()].end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- ShowNpc(creature, true);
+ if (Creature* creature = GetCreature(*itr))
+ ShowNpc(creature, true);
}
// Update all graveyard, control is to defender when no wartime
@@ -354,15 +350,18 @@ void BattlefieldWG::OnBattleEnd(bool endByTimer)
if (BfGraveyard* graveyard = GetGraveyardById(i))
graveyard->GiveControlTo(GetDefenderTeam());
- for (GameObjectSet::const_iterator itr = m_KeepGameObject[GetDefenderTeam()].begin(); itr != m_KeepGameObject[GetDefenderTeam()].end(); ++itr)
- (*itr)->SetRespawnTime(RESPAWN_IMMEDIATELY);
+ for (GuidSet::const_iterator itr = m_KeepGameObject[GetDefenderTeam()].begin(); itr != m_KeepGameObject[GetDefenderTeam()].end(); ++itr)
+ if (GameObject* object = GetGameObject(*itr))
+ object->SetRespawnTime(RESPAWN_IMMEDIATELY);
- for (GameObjectSet::const_iterator itr = m_KeepGameObject[GetAttackerTeam()].begin(); itr != m_KeepGameObject[GetAttackerTeam()].end(); ++itr)
- (*itr)->SetRespawnTime(RESPAWN_ONE_DAY);
+ for (GuidSet::const_iterator itr = m_KeepGameObject[GetAttackerTeam()].begin(); itr != m_KeepGameObject[GetAttackerTeam()].end(); ++itr)
+ if (GameObject* object = GetGameObject(*itr))
+ object->SetRespawnTime(RESPAWN_ONE_DAY);
// Update portal defender faction
- for (GameObjectSet::const_iterator itr = DefenderPortalList.begin(); itr != DefenderPortalList.end(); ++itr)
- (*itr)->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[GetDefenderTeam()]);
+ for (GuidSet::const_iterator itr = DefenderPortalList.begin(); itr != DefenderPortalList.end(); ++itr)
+ if (GameObject* portal = GetGameObject(*itr))
+ portal->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[GetDefenderTeam()]);
// Saving data
for (GameObjectBuilding::const_iterator itr = BuildingsInZone.begin(); itr != BuildingsInZone.end(); ++itr)
@@ -397,10 +396,9 @@ void BattlefieldWG::OnBattleEnd(bool endByTimer)
m_PlayersInWar[team].clear();
for (GuidSet::const_iterator itr = m_vehicles[team].begin(); itr != m_vehicles[team].end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- if (creature->IsVehicle())
- creature->GetVehicleKit()->Dismiss();
+ if (Creature* creature = GetCreature(*itr))
+ if (creature->IsVehicle())
+ creature->GetVehicleKit()->Dismiss();
m_vehicles[team].clear();
}
@@ -431,7 +429,7 @@ void BattlefieldWG::OnBattleEnd(bool endByTimer)
// *******************************************************
void BattlefieldWG::DoCompleteOrIncrementAchievement(uint32 achievement, Player* player, uint8 /*incrementNumber*/)
{
- AchievementEntry const* achievementEntry = sAchievementStore.LookupEntry(achievement);
+ AchievementEntry const* achievementEntry = sAchievementMgr->GetAchievement(achievement);
if (!achievementEntry)
return;
@@ -649,18 +647,15 @@ void BattlefieldWG::HandleKill(Player* killer, Unit* victim)
for (GuidSet::const_iterator itr = KeepCreature[GetOtherTeam(killerTeam)].begin();
itr != KeepCreature[GetOtherTeam(killerTeam)].end(); ++itr)
{
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
+ if (Creature* creature = GetCreature(*itr))
{
- if (Creature* creature = unit->ToCreature())
+ if (victim->GetEntry() == creature->GetEntry() && !again)
{
- if (victim->GetEntry() == creature->GetEntry() && !again)
- {
- again = true;
- for (GuidSet::const_iterator iter = m_PlayersInWar[killerTeam].begin(); iter != m_PlayersInWar[killerTeam].end(); ++iter)
- if (Player* player = sObjectAccessor->FindPlayer(*iter))
- if (player->GetDistance2d(killer) < 40.0f)
- PromotePlayer(player);
- }
+ again = true;
+ for (GuidSet::const_iterator iter = m_PlayersInWar[killerTeam].begin(); iter != m_PlayersInWar[killerTeam].end(); ++iter)
+ if (Player* player = sObjectAccessor->FindPlayer(*iter))
+ if (player->GetDistance2d(killer) < 40.0f)
+ PromotePlayer(player);
}
}
}
@@ -937,22 +932,25 @@ void BattlefieldWG::ProcessEvent(WorldObject *obj, uint32 eventId)
{
if (CanInteractWithRelic())
EndBattle(false);
- else
- GetRelic()->SetRespawnTime(RESPAWN_IMMEDIATELY);
+ else if (GameObject* relic = GetRelic())
+ relic->SetRespawnTime(RESPAWN_IMMEDIATELY);
}
// if destroy or damage event, search the wall/tower and update worldstate/send warning message
for (GameObjectBuilding::const_iterator itr = BuildingsInZone.begin(); itr != BuildingsInZone.end(); ++itr)
{
- if (go->GetEntry() == (*itr)->m_Build->GetEntry())
+ if (GameObject* build = GetGameObject((*itr)->m_BuildGUID))
{
- if ((*itr)->m_Build->GetGOInfo()->building.damagedEvent == eventId)
- (*itr)->Damaged();
+ if (go->GetEntry() == build->GetEntry())
+ {
+ if (build->GetGOInfo()->building.damagedEvent == eventId)
+ (*itr)->Damaged();
- if ((*itr)->m_Build->GetGOInfo()->building.destroyedEvent == eventId)
- (*itr)->Destroyed();
+ if (build->GetGOInfo()->building.destroyedEvent == eventId)
+ (*itr)->Destroyed();
- break;
+ break;
+ }
}
}
}
@@ -1008,9 +1006,8 @@ void BattlefieldWG::UpdateTenacity()
player->RemoveAurasDueToSpell(SPELL_TENACITY);
for (GuidSet::const_iterator itr = m_vehicles[team].begin(); itr != m_vehicles[team].end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- creature->RemoveAurasDueToSpell(SPELL_TENACITY_VEHICLE);
+ if (Creature* creature = GetCreature(*itr))
+ creature->RemoveAurasDueToSpell(SPELL_TENACITY_VEHICLE);
}
// Apply new buff
@@ -1036,9 +1033,8 @@ void BattlefieldWG::UpdateTenacity()
player->SetAuraStack(SPELL_TENACITY, player, newStack);
for (GuidSet::const_iterator itr = m_vehicles[team].begin(); itr != m_vehicles[team].end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- creature->SetAuraStack(SPELL_TENACITY_VEHICLE, creature, newStack);
+ if (Creature* creature = GetCreature(*itr))
+ creature->SetAuraStack(SPELL_TENACITY_VEHICLE, creature, newStack);
if (buff_honor != 0)
{
@@ -1046,9 +1042,8 @@ void BattlefieldWG::UpdateTenacity()
if (Player* player = sObjectAccessor->FindPlayer(*itr))
player->CastSpell(player, buff_honor, true);
for (GuidSet::const_iterator itr = m_vehicles[team].begin(); itr != m_vehicles[team].end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- creature->CastSpell(creature, buff_honor, true);
+ if (Creature* creature = GetCreature(*itr))
+ creature->CastSpell(creature, buff_honor, true);
}
}
}
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h
index bd616167e8b..0ac87af94ba 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.h
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h
@@ -383,10 +383,10 @@ class BattlefieldWG : public Battlefield
bool SetupBattlefield();
/// Return pointer to relic object
- GameObject* GetRelic() { return m_titansRelic; }
+ GameObject* GetRelic() { return GetGameObject(m_titansRelicGUID); }
/// Define relic object
- void SetRelic(GameObject* relic) { m_titansRelic = relic; }
+ void SetRelic(uint64 relicGUID) { m_titansRelicGUID = relicGUID; }
/// Check if players can interact with the relic (Only if the last door has been broken)
bool CanInteractWithRelic() { return m_isRelicInteractible; }
@@ -420,8 +420,8 @@ class BattlefieldWG : public Battlefield
Workshop WorkshopsList;
- GameObjectSet DefenderPortalList;
- GameObjectSet m_KeepGameObject[2];
+ GuidSet DefenderPortalList;
+ GuidSet m_KeepGameObject[2];
GameObjectBuilding BuildingsInZone;
GuidSet m_vehicles[2];
@@ -432,7 +432,7 @@ class BattlefieldWG : public Battlefield
uint32 m_tenacityStack;
uint32 m_saveTimer;
- GameObject* m_titansRelic;
+ uint64 m_titansRelicGUID;
};
uint32 const VehNumWorldState[] = { 3680, 3490 };
@@ -1065,7 +1065,7 @@ struct BfWGGameObjectBuilding
{
m_WG = WG;
m_Team = 0;
- m_Build = NULL;
+ m_BuildGUID = 0;
m_Type = 0;
m_WorldState = 0;
m_State = 0;
@@ -1079,7 +1079,7 @@ struct BfWGGameObjectBuilding
BattlefieldWG* m_WG;
// Linked gameobject
- GameObject* m_Build;
+ uint64 m_BuildGUID;
// eWGGameObjectBuildingType
uint32 m_Type;
@@ -1094,7 +1094,7 @@ struct BfWGGameObjectBuilding
uint32 m_NameId;
// GameObject associations
- GameObjectSet m_GameObjectList[2];
+ GuidSet m_GameObjectList[2];
// Creature associations
GuidSet m_CreatureBottomList[2];
@@ -1120,20 +1120,23 @@ struct BfWGGameObjectBuilding
break;
}
- // Rebuild gameobject
- if (m_Build->IsDestructibleBuilding())
+ if (GameObject* build = m_WG->GetGameObject(m_BuildGUID))
{
- m_Build->SetDestructibleState(GO_DESTRUCTIBLE_REBUILDING, NULL, true);
- if (m_Build->GetEntry() == GO_WINTERGRASP_VAULT_GATE)
- if (GameObject* go = m_Build->FindNearestGameObject(GO_WINTERGRASP_KEEP_COLLISION_WALL, 10.0f))
- go->EnableCollision(true);
-
- // Update worldstate
- m_State = BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_INTACT - (m_Team * 3);
- m_WG->SendUpdateWorldState(m_WorldState, m_State);
+ // Rebuild gameobject
+ if (build->IsDestructibleBuilding())
+ {
+ build->SetDestructibleState(GO_DESTRUCTIBLE_REBUILDING, NULL, true);
+ if (build->GetEntry() == GO_WINTERGRASP_VAULT_GATE)
+ if (GameObject* go = build->FindNearestGameObject(GO_WINTERGRASP_KEEP_COLLISION_WALL, 50.0f))
+ go->EnableCollision(true);
+
+ // Update worldstate
+ m_State = BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_INTACT - (m_Team * 3);
+ m_WG->SendUpdateWorldState(m_WorldState, m_State);
+ }
+ UpdateCreatureAndGo();
+ build->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[m_Team]);
}
- UpdateCreatureAndGo();
- m_Build->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[m_Team]);
}
// Called when associated gameobject is damaged
@@ -1148,14 +1151,12 @@ struct BfWGGameObjectBuilding
m_WG->SendWarningToAllInZone(m_NameId);
for (GuidSet::const_iterator itr = m_CreatureTopList[m_WG->GetAttackerTeam()].begin(); itr != m_CreatureTopList[m_WG->GetAttackerTeam()].end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- m_WG->HideNpc(creature);
+ if (Creature* creature = m_WG->GetCreature(*itr))
+ m_WG->HideNpc(creature);
for (GuidSet::const_iterator itr = m_TurretTopList.begin(); itr != m_TurretTopList.end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- m_WG->HideNpc(creature);
+ if (Creature* creature = m_WG->GetCreature(*itr))
+ m_WG->HideNpc(creature);
if (m_Type == BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER)
m_WG->UpdateDamagedTowerCount(m_WG->GetDefenderTeam());
@@ -1182,8 +1183,9 @@ struct BfWGGameObjectBuilding
m_WG->UpdatedDestroyedTowerCount(TeamId(m_Team));
break;
case BATTLEFIELD_WG_OBJECTTYPE_DOOR_LAST:
- if (GameObject* go = m_Build->FindNearestGameObject(GO_WINTERGRASP_KEEP_COLLISION_WALL, 10.0f))
- go->EnableCollision(false);
+ if (GameObject* build = m_WG->GetGameObject(m_BuildGUID))
+ if (GameObject* go = build->FindNearestGameObject(GO_WINTERGRASP_KEEP_COLLISION_WALL, 10.0f))
+ go->EnableCollision(false);
m_WG->SetRelicInteractible(true);
if (m_WG->GetRelic())
m_WG->GetRelic()->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
@@ -1197,8 +1199,11 @@ struct BfWGGameObjectBuilding
void Init(GameObject* go, uint32 type, uint32 worldstate, uint32 nameid)
{
+ if (!go)
+ return;
+
// GameObject associated to object
- m_Build = go;
+ m_BuildGUID = go->GetGUID();
// Type of building (WALL/TOWER/DOOR)
m_Type = type;
@@ -1226,23 +1231,20 @@ struct BfWGGameObjectBuilding
}
m_State = sWorld->getWorldState(m_WorldState);
- if (m_Build)
+ switch (m_State)
{
- switch (m_State)
- {
- case BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_INTACT:
- case BATTLEFIELD_WG_OBJECTSTATE_HORDE_INTACT:
- m_Build->SetDestructibleState(GO_DESTRUCTIBLE_REBUILDING, NULL, true);
- break;
- case BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_DESTROY:
- case BATTLEFIELD_WG_OBJECTSTATE_HORDE_DESTROY:
- m_Build->SetDestructibleState(GO_DESTRUCTIBLE_DESTROYED);
- break;
- case BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_DAMAGE:
- case BATTLEFIELD_WG_OBJECTSTATE_HORDE_DAMAGE:
- m_Build->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
- break;
- }
+ case BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_INTACT:
+ case BATTLEFIELD_WG_OBJECTSTATE_HORDE_INTACT:
+ go->SetDestructibleState(GO_DESTRUCTIBLE_REBUILDING, NULL, true);
+ break;
+ case BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_DESTROY:
+ case BATTLEFIELD_WG_OBJECTSTATE_HORDE_DESTROY:
+ go->SetDestructibleState(GO_DESTRUCTIBLE_DESTROYED);
+ break;
+ case BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_DAMAGE:
+ case BATTLEFIELD_WG_OBJECTSTATE_HORDE_DAMAGE:
+ go->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
+ break;
}
int32 towerid = -1;
@@ -1278,9 +1280,9 @@ struct BfWGGameObjectBuilding
{
WintergraspObjectPositionData gobData = AttackTowers[towerid - 4].GameObject[i];
if (GameObject* go = m_WG->SpawnGameObject(gobData.entryHorde, gobData.x, gobData.y, gobData.z, gobData.o))
- m_GameObjectList[TEAM_HORDE].insert(go);
+ m_GameObjectList[TEAM_HORDE].insert(go->GetGUID());
if (GameObject* go = m_WG->SpawnGameObject(gobData.entryAlliance, gobData.x, gobData.y, gobData.z, gobData.o))
- m_GameObjectList[TEAM_ALLIANCE].insert(go);
+ m_GameObjectList[TEAM_ALLIANCE].insert(go->GetGUID());
}
// Spawn associate npc bottom
@@ -1364,64 +1366,59 @@ struct BfWGGameObjectBuilding
void UpdateCreatureAndGo()
{
for (GuidSet::const_iterator itr = m_CreatureTopList[m_WG->GetDefenderTeam()].begin(); itr != m_CreatureTopList[m_WG->GetDefenderTeam()].end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- m_WG->HideNpc(creature);
+ if (Creature* creature = m_WG->GetCreature(*itr))
+ m_WG->HideNpc(creature);
for (GuidSet::const_iterator itr = m_CreatureTopList[m_WG->GetAttackerTeam()].begin(); itr != m_CreatureTopList[m_WG->GetAttackerTeam()].end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- m_WG->ShowNpc(creature, true);
+ if (Creature* creature = m_WG->GetCreature(*itr))
+ m_WG->ShowNpc(creature, true);
for (GuidSet::const_iterator itr = m_CreatureBottomList[m_WG->GetDefenderTeam()].begin(); itr != m_CreatureBottomList[m_WG->GetDefenderTeam()].end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- m_WG->HideNpc(creature);
+ if (Creature* creature = m_WG->GetCreature(*itr))
+ m_WG->HideNpc(creature);
for (GuidSet::const_iterator itr = m_CreatureBottomList[m_WG->GetAttackerTeam()].begin(); itr != m_CreatureBottomList[m_WG->GetAttackerTeam()].end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- m_WG->ShowNpc(creature, true);
+ if (Creature* creature = m_WG->GetCreature(*itr))
+ m_WG->ShowNpc(creature, true);
- for (GameObjectSet::const_iterator itr = m_GameObjectList[m_WG->GetDefenderTeam()].begin(); itr != m_GameObjectList[m_WG->GetDefenderTeam()].end(); ++itr)
- (*itr)->SetRespawnTime(RESPAWN_ONE_DAY);
+ for (GuidSet::const_iterator itr = m_GameObjectList[m_WG->GetDefenderTeam()].begin(); itr != m_GameObjectList[m_WG->GetDefenderTeam()].end(); ++itr)
+ if (GameObject* object = m_WG->GetGameObject(*itr))
+ object->SetRespawnTime(RESPAWN_ONE_DAY);
- for (GameObjectSet::const_iterator itr = m_GameObjectList[m_WG->GetAttackerTeam()].begin(); itr != m_GameObjectList[m_WG->GetAttackerTeam()].end(); ++itr)
- (*itr)->SetRespawnTime(RESPAWN_IMMEDIATELY);
+ for (GuidSet::const_iterator itr = m_GameObjectList[m_WG->GetAttackerTeam()].begin(); itr != m_GameObjectList[m_WG->GetAttackerTeam()].end(); ++itr)
+ if (GameObject* object = m_WG->GetGameObject(*itr))
+ object->SetRespawnTime(RESPAWN_IMMEDIATELY);
}
void UpdateTurretAttack(bool disable)
{
for (GuidSet::const_iterator itr = m_TowerCannonBottomList.begin(); itr != m_TowerCannonBottomList.end(); ++itr)
{
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
+ if (Creature* creature = m_WG->GetCreature(*itr))
{
- if (Creature* creature = unit->ToCreature())
+ if (GameObject* build = m_WG->GetGameObject(m_BuildGUID))
{
- if (m_Build)
- {
- if (disable)
- m_WG->HideNpc(creature);
- else
- m_WG->ShowNpc(creature, true);
+ if (disable)
+ m_WG->HideNpc(creature);
+ else
+ m_WG->ShowNpc(creature, true);
- switch (m_Build->GetEntry())
+ switch (build->GetEntry())
+ {
+ case GO_WINTERGRASP_FORTRESS_TOWER_1:
+ case GO_WINTERGRASP_FORTRESS_TOWER_2:
+ case GO_WINTERGRASP_FORTRESS_TOWER_3:
+ case GO_WINTERGRASP_FORTRESS_TOWER_4:
{
- case GO_WINTERGRASP_FORTRESS_TOWER_1:
- case GO_WINTERGRASP_FORTRESS_TOWER_2:
- case GO_WINTERGRASP_FORTRESS_TOWER_3:
- case GO_WINTERGRASP_FORTRESS_TOWER_4:
- {
- creature->setFaction(WintergraspFaction[m_WG->GetDefenderTeam()]);
- break;
- }
- case GO_WINTERGRASP_SHADOWSIGHT_TOWER:
- case GO_WINTERGRASP_WINTER_S_EDGE_TOWER:
- case GO_WINTERGRASP_FLAMEWATCH_TOWER:
- {
- creature->setFaction(WintergraspFaction[m_WG->GetAttackerTeam()]);
- break;
- }
+ creature->setFaction(WintergraspFaction[m_WG->GetDefenderTeam()]);
+ break;
+ }
+ case GO_WINTERGRASP_SHADOWSIGHT_TOWER:
+ case GO_WINTERGRASP_WINTER_S_EDGE_TOWER:
+ case GO_WINTERGRASP_FLAMEWATCH_TOWER:
+ {
+ creature->setFaction(WintergraspFaction[m_WG->GetAttackerTeam()]);
+ break;
}
}
}
@@ -1430,34 +1427,31 @@ struct BfWGGameObjectBuilding
for (GuidSet::const_iterator itr = m_TurretTopList.begin(); itr != m_TurretTopList.end(); ++itr)
{
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
+ if (Creature* creature = m_WG->GetCreature(*itr))
{
- if (Creature* creature = unit->ToCreature())
+ if (GameObject* build = m_WG->GetGameObject(m_BuildGUID))
{
- if (m_Build)
- {
- if (disable)
- m_WG->HideNpc(creature);
- else
- m_WG->ShowNpc(creature, true);
+ if (disable)
+ m_WG->HideNpc(creature);
+ else
+ m_WG->ShowNpc(creature, true);
- switch (m_Build->GetEntry())
+ switch (build->GetEntry())
+ {
+ case GO_WINTERGRASP_FORTRESS_TOWER_1:
+ case GO_WINTERGRASP_FORTRESS_TOWER_2:
+ case GO_WINTERGRASP_FORTRESS_TOWER_3:
+ case GO_WINTERGRASP_FORTRESS_TOWER_4:
{
- case GO_WINTERGRASP_FORTRESS_TOWER_1:
- case GO_WINTERGRASP_FORTRESS_TOWER_2:
- case GO_WINTERGRASP_FORTRESS_TOWER_3:
- case GO_WINTERGRASP_FORTRESS_TOWER_4:
- {
- creature->setFaction(WintergraspFaction[m_WG->GetDefenderTeam()]);
- break;
- }
- case GO_WINTERGRASP_SHADOWSIGHT_TOWER:
- case GO_WINTERGRASP_WINTER_S_EDGE_TOWER:
- case GO_WINTERGRASP_FLAMEWATCH_TOWER:
- {
- creature->setFaction(WintergraspFaction[m_WG->GetAttackerTeam()]);
- break;
- }
+ creature->setFaction(WintergraspFaction[m_WG->GetDefenderTeam()]);
+ break;
+ }
+ case GO_WINTERGRASP_SHADOWSIGHT_TOWER:
+ case GO_WINTERGRASP_WINTER_S_EDGE_TOWER:
+ case GO_WINTERGRASP_FLAMEWATCH_TOWER:
+ {
+ creature->setFaction(WintergraspFaction[m_WG->GetAttackerTeam()]);
+ break;
}
}
}
@@ -1544,19 +1538,19 @@ struct WGWorkshop
struct WintergraspWorkshopData
{
BattlefieldWG* m_WG; // Pointer to wintergrasp
- GameObject* m_Build;
+ uint64 m_BuildGUID;
uint32 m_Type;
uint32 m_State; // For worldstate
uint32 m_WorldState;
uint32 m_TeamControl; // Team witch control the workshop
GuidSet m_CreatureOnPoint[2]; // Contain all Creature associate to this point
- GameObjectSet m_GameObjectOnPoint[2]; // Contain all Gameobject associate to this point
+ GuidSet m_GameObjectOnPoint[2]; // Contain all Gameobject associate to this point
uint32 m_NameId; // Id of trinity_string witch contain name of this node, using for alert message
WintergraspWorkshopData(BattlefieldWG* WG)
{
m_WG = WG;
- m_Build = NULL;
+ m_BuildGUID = 0;
m_Type = 0;
m_State = 0;
m_WorldState = 0;
@@ -1578,9 +1572,9 @@ struct WintergraspWorkshopData
void AddGameObject(WintergraspObjectPositionData obj)
{
if (GameObject* gameobject = m_WG->SpawnGameObject(obj.entryHorde, obj.x, obj.y, obj.z, obj.o))
- m_GameObjectOnPoint[TEAM_HORDE].insert(gameobject);
+ m_GameObjectOnPoint[TEAM_HORDE].insert(gameobject->GetGUID());
if (GameObject* gameobject = m_WG->SpawnGameObject(obj.entryAlliance, obj.x, obj.y, obj.z, obj.o))
- m_GameObjectOnPoint[TEAM_ALLIANCE].insert(gameobject);
+ m_GameObjectOnPoint[TEAM_ALLIANCE].insert(gameobject->GetGUID());
}
// Init method, setup variable
@@ -1607,23 +1601,23 @@ struct WintergraspWorkshopData
{
// Show Alliance creature
for (GuidSet::const_iterator itr = m_CreatureOnPoint[TEAM_ALLIANCE].begin(); itr != m_CreatureOnPoint[TEAM_ALLIANCE].end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- m_WG->ShowNpc(creature, creature->GetEntry() != 30499);
+ if (Creature* creature = m_WG->GetCreature(*itr))
+ m_WG->ShowNpc(creature, creature->GetEntry() != 30499);
// Hide Horde creature
for (GuidSet::const_iterator itr = m_CreatureOnPoint[TEAM_HORDE].begin(); itr != m_CreatureOnPoint[TEAM_HORDE].end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- m_WG->HideNpc(creature);
+ if (Creature* creature = m_WG->GetCreature(*itr))
+ m_WG->HideNpc(creature);
// Show Alliance gameobject
- for (GameObjectSet::const_iterator itr = m_GameObjectOnPoint[TEAM_ALLIANCE].begin(); itr != m_GameObjectOnPoint[TEAM_ALLIANCE].end(); ++itr)
- (*itr)->SetRespawnTime(RESPAWN_IMMEDIATELY);
+ for (GuidSet::const_iterator itr = m_GameObjectOnPoint[TEAM_ALLIANCE].begin(); itr != m_GameObjectOnPoint[TEAM_ALLIANCE].end(); ++itr)
+ if (GameObject* object = m_WG->GetGameObject(*itr))
+ object->SetRespawnTime(RESPAWN_IMMEDIATELY);
// Hide Horde gameobject
- for (GameObjectSet::const_iterator itr = m_GameObjectOnPoint[TEAM_HORDE].begin(); itr != m_GameObjectOnPoint[TEAM_HORDE].end(); ++itr)
- (*itr)->SetRespawnTime(RESPAWN_ONE_DAY);
+ for (GuidSet::const_iterator itr = m_GameObjectOnPoint[TEAM_HORDE].begin(); itr != m_GameObjectOnPoint[TEAM_HORDE].end(); ++itr)
+ if (GameObject* object = m_WG->GetGameObject(*itr))
+ object->SetRespawnTime(RESPAWN_ONE_DAY);
// Updating worldstate
@@ -1646,23 +1640,23 @@ struct WintergraspWorkshopData
{
// Show Horde creature
for (GuidSet::const_iterator itr = m_CreatureOnPoint[TEAM_HORDE].begin(); itr != m_CreatureOnPoint[TEAM_HORDE].end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- m_WG->ShowNpc(creature, creature->GetEntry() != 30400);
+ if (Creature* creature = m_WG->GetCreature(*itr))
+ m_WG->ShowNpc(creature, creature->GetEntry() != 30400);
// Hide Alliance creature
for (GuidSet::const_iterator itr = m_CreatureOnPoint[TEAM_ALLIANCE].begin(); itr != m_CreatureOnPoint[TEAM_ALLIANCE].end(); ++itr)
- if (Unit* unit = sObjectAccessor->FindUnit(*itr))
- if (Creature* creature = unit->ToCreature())
- m_WG->HideNpc(creature);
+ if (Creature* creature = m_WG->GetCreature(*itr))
+ m_WG->HideNpc(creature);
// Hide Alliance gameobject
- for (GameObjectSet::const_iterator itr = m_GameObjectOnPoint[TEAM_ALLIANCE].begin(); itr != m_GameObjectOnPoint[TEAM_ALLIANCE].end(); ++itr)
- (*itr)->SetRespawnTime(RESPAWN_ONE_DAY);
+ for (GuidSet::const_iterator itr = m_GameObjectOnPoint[TEAM_ALLIANCE].begin(); itr != m_GameObjectOnPoint[TEAM_ALLIANCE].end(); ++itr)
+ if (GameObject* object = m_WG->GetGameObject(*itr))
+ object->SetRespawnTime(RESPAWN_ONE_DAY);
// Show Horde gameobject
- for (GameObjectSet::const_iterator itr = m_GameObjectOnPoint[TEAM_HORDE].begin(); itr != m_GameObjectOnPoint[TEAM_HORDE].end(); ++itr)
- (*itr)->SetRespawnTime(RESPAWN_IMMEDIATELY);
+ for (GuidSet::const_iterator itr = m_GameObjectOnPoint[TEAM_HORDE].begin(); itr != m_GameObjectOnPoint[TEAM_HORDE].end(); ++itr)
+ if (GameObject* object = m_WG->GetGameObject(*itr))
+ object->SetRespawnTime(RESPAWN_IMMEDIATELY);
// Update worlstate
m_State = BATTLEFIELD_WG_OBJECTSTATE_HORDE_INTACT;
diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp
index fd58765b056..628eb5ff3c1 100755..100644
--- a/src/server/game/Battlegrounds/ArenaTeam.cpp
+++ b/src/server/game/Battlegrounds/ArenaTeam.cpp
@@ -48,7 +48,7 @@ bool ArenaTeam::Create(uint64 captainGuid, uint8 type, std::string const& teamNa
return false;
// Check if arena team name is already taken
- if (sArenaTeamMgr->GetArenaTeamByName(TeamName))
+ if (sArenaTeamMgr->GetArenaTeamByName(teamName))
return false;
// Generate new arena team id
@@ -179,7 +179,7 @@ bool ArenaTeam::AddMember(uint64 playerGuid)
player->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_MEMBER, 1);
}
- sLog->outInfo(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] joined arena team type: %u [Id: %u].", playerName.c_str(), GUID_LOPART(playerGuid), GetType(), GetId());
+ sLog->outInfo(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] joined arena team type: %u [Id: %u, Name: %s].", playerName.c_str(), GUID_LOPART(playerGuid), GetType(), GetId(), GetName().c_str());
return true;
}
diff --git a/src/server/game/Battlegrounds/ArenaTeam.h b/src/server/game/Battlegrounds/ArenaTeam.h
index 137ac93d3c0..137ac93d3c0 100755..100644
--- a/src/server/game/Battlegrounds/ArenaTeam.h
+++ b/src/server/game/Battlegrounds/ArenaTeam.h
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 40a74a49b69..22f960ceaef 100755..100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -411,7 +411,7 @@ uint32 Battleground::GetPrematureWinner()
winner = ALLIANCE;
else if (GetPlayersCountByTeam(HORDE) >= GetMinPlayersPerTeam())
winner = HORDE;
-
+
return winner;
}
@@ -1265,6 +1265,9 @@ void Battleground::EventPlayerLoggedIn(Player* player)
void Battleground::EventPlayerLoggedOut(Player* player)
{
uint64 guid = player->GetGUID();
+ if (!IsPlayerInBattleground(guid)) // Check if this player really is in battleground (might be a GM who teleported inside)
+ return;
+
// player is correct pointer, it is checked in WorldSession::LogoutPlayer()
m_OfflineQueue.push_back(player->GetGUID());
m_Players[guid].OfflineRemoveTime = sWorld->GetGameTime() + MAX_OFFLINE_TIME;
@@ -1275,8 +1278,8 @@ void Battleground::EventPlayerLoggedOut(Player* player)
// 1 player is logging out, if it is the last, then end arena!
if (isArena())
- if (GetAlivePlayersCountByTeam(player->GetTeam()) <= 1 && GetPlayersCountByTeam(GetOtherTeam(player->GetTeam())))
- EndBattleground(GetOtherTeam(player->GetTeam()));
+ if (GetAlivePlayersCountByTeam(player->GetBGTeam()) <= 1 && GetPlayersCountByTeam(GetOtherTeam(player->GetBGTeam())))
+ EndBattleground(GetOtherTeam(player->GetBGTeam()));
}
}
diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h
index 71dbd097b0a..0a837f9f3c3 100755..100644
--- a/src/server/game/Battlegrounds/Battleground.h
+++ b/src/server/game/Battlegrounds/Battleground.h
@@ -528,7 +528,7 @@ class Battleground
virtual uint64 GetFlagPickerGUID(int32 /*team*/ = -1) const { return 0; }
virtual void SetDroppedFlagGUID(uint64 /*guid*/, int32 /*team*/ = -1) {}
uint32 GetTeamScore(uint32 TeamID) const;
-
+
virtual uint32 GetPrematureWinner();
protected:
diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
index a0f95e1eaef..a0f95e1eaef 100755..100644
--- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.h b/src/server/game/Battlegrounds/BattlegroundMgr.h
index 67bed737588..22c42b0febc 100755..100644
--- a/src/server/game/Battlegrounds/BattlegroundMgr.h
+++ b/src/server/game/Battlegrounds/BattlegroundMgr.h
@@ -80,8 +80,8 @@ class BattlegroundMgr
void BuildGroupJoinedBattlegroundPacket(WorldPacket* data, GroupJoinBattlegroundResult result);
void BuildUpdateWorldStatePacket(WorldPacket* data, uint32 field, uint32 value);
void BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg);
- void BuildBattlegroundStatusPacket(WorldPacket* data, Battleground* bg, uint8 QueueSlot, uint8 StatusID, uint32 Time1, uint32 Time2, uint8 arenatype, uint8 uiFrame = 1);
- void BuildPlaySoundPacket(WorldPacket* data, uint32 soundid);
+ void BuildBattlegroundStatusPacket(WorldPacket* data, Battleground* bg, uint8 queueSlot, uint8 statusId, uint32 time1, uint32 time2, uint8 arenaType, uint8 uiFrame = 1);
+ void BuildPlaySoundPacket(WorldPacket* data, uint32 soundId);
void SendAreaSpiritHealerQueryOpcode(Player* player, Battleground* bg, uint64 guid);
/* Battlegrounds */
diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
index c610cafa1b1..c610cafa1b1 100755..100644
--- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.h b/src/server/game/Battlegrounds/BattlegroundQueue.h
index 6f8c774864d..6f8c774864d 100755..100644
--- a/src/server/game/Battlegrounds/BattlegroundQueue.h
+++ b/src/server/game/Battlegrounds/BattlegroundQueue.h
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
index 47320db27cf..cb0d651ad47 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
@@ -558,12 +558,12 @@ uint32 BattlegroundAB::GetPrematureWinner()
++ally;
else if (m_Nodes[i] == BG_AB_NODE_STATUS_HORDE_OCCUPIED)
++horde;
-
+
if (ally > horde)
return ALLIANCE;
else if (horde > ally)
return HORDE;
-
+
// If the values are equal, fall back to the original result (based on number of players on each team)
return Battleground::GetPrematureWinner();
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
index b80e216a216..6e01437b895 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
@@ -272,7 +272,7 @@ class BattlegroundAB : public Battleground
/* achievement req. */
bool IsAllNodesConrolledByTeam(uint32 team) const; // overwrited
bool IsTeamScores500Disadvantage(uint32 team) const { return m_TeamScores500Disadvantage[GetTeamIndexByTeamId(team)]; }
-
+
uint32 GetPrematureWinner();
private:
void PostUpdateImpl(uint32 diff);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
index 918cef4d261..b12aec245cd 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
@@ -1701,11 +1701,11 @@ uint32 BattlegroundAV::GetPrematureWinner()
{
uint32 allianceScore = m_Team_Scores[GetTeamIndexByTeamId(ALLIANCE)];
uint32 hordeScore = m_Team_Scores[GetTeamIndexByTeamId(HORDE)];
-
+
if (allianceScore > hordeScore)
return ALLIANCE;
else if (hordeScore > allianceScore)
return HORDE;
-
+
return Battleground::GetPrematureWinner();
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
index bedd946a78c..b7fa8d6ece8 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
@@ -1572,7 +1572,7 @@ class BattlegroundAV : public Battleground
/* achievement req. */
bool IsBothMinesControlledByTeam(uint32 team) const;
bool IsAllTowersControlledAndCaptainAlive(uint32 team) const;
-
+
uint32 GetPrematureWinner();
private:
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp
index 402406f7fd0..402406f7fd0 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.h b/src/server/game/Battlegrounds/Zones/BattlegroundBE.h
index 27a88fcfc33..27a88fcfc33 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundBE.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundBE.h
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.h b/src/server/game/Battlegrounds/Zones/BattlegroundDS.h
index ff4b279a2cf..ff4b279a2cf 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.h
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
index 458e86729e7..ab0f94b74f6 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
@@ -944,6 +944,6 @@ uint32 BattlegroundEY::GetPrematureWinner()
return ALLIANCE;
else if (GetTeamScore(TEAM_HORDE) > GetTeamScore(TEAM_ALLIANCE))
return HORDE;
-
+
return Battleground::GetPrematureWinner();
} \ No newline at end of file
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
index 2cfd4ca7e0f..43e7fb4f933 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
@@ -369,7 +369,7 @@ class BattlegroundEY : public Battleground
/* achievement req. */
bool IsAllNodesConrolledByTeam(uint32 team) const;
-
+
uint32 GetPrematureWinner();
private:
void PostUpdateImpl(uint32 diff);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
index dbffc318c78..dbffc318c78 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
index 9e58a93fd2d..9e58a93fd2d 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp
index 6677d665290..6677d665290 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.h b/src/server/game/Battlegrounds/Zones/BattlegroundNA.h
index 0241cf182a7..0241cf182a7 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundNA.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundNA.h
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp
index 2c715193a3b..2c715193a3b 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.h b/src/server/game/Battlegrounds/Zones/BattlegroundRL.h
index 56d089909e0..56d089909e0 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRL.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRL.h
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
index 130ba4f3290..130ba4f3290 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.h b/src/server/game/Battlegrounds/Zones/BattlegroundRV.h
index 115fd95d1b0..115fd95d1b0 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.h
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
index ab479eeff2d..ab479eeff2d 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h
index 9089f0c2818..9089f0c2818 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
index 965045c5293..63204129f24 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
@@ -864,6 +864,6 @@ uint32 BattlegroundWS::GetPrematureWinner()
return ALLIANCE;
else if (GetTeamScore(TEAM_HORDE) > GetTeamScore(TEAM_ALLIANCE))
return HORDE;
-
+
return Battleground::GetPrematureWinner();
-} \ No newline at end of file
+}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
index 5b72de43b32..b0d68177072 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
@@ -211,7 +211,7 @@ class BattlegroundWS : public Battleground
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();
private:
uint64 m_FlagKeepers[2]; // 0 - alliance, 1 - horde
diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp
index cba38a3ebf1..8ce7d7d2139 100755..100644
--- a/src/server/game/Chat/Channels/Channel.cpp
+++ b/src/server/game/Chat/Channels/Channel.cpp
@@ -297,7 +297,7 @@ void Channel::KickOrBan(Player const* player, std::string const& badname, bool b
SendToOne(&data, good);
return;
}
-
+
Player* bad = sObjectAccessor->FindPlayerByName(badname);
uint64 victim = bad ? bad->GetGUID() : 0;
if (!victim || !IsOn(victim))
@@ -403,7 +403,7 @@ void Channel::Password(Player const* player, std::string const& pass)
SendToOne(&data, guid);
return;
}
-
+
if (!playersStore[guid].IsModerator() && !AccountMgr::IsGMAccount(player->GetSession()->GetSecurity()))
{
WorldPacket data;
@@ -497,7 +497,7 @@ void Channel::SetOwner(Player const* player, std::string const& newname)
Player* newp = sObjectAccessor->FindPlayerByName(newname);
uint64 victim = newp ? newp->GetGUID() : 0;
-
+
if (!victim || !IsOn(victim) ||
(newp->GetTeam() != player->GetTeam() && !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL)))
{
@@ -615,7 +615,7 @@ void Channel::Say(uint64 guid, std::string const& what, uint32 lang)
SendToOne(&data, guid);
return;
}
-
+
if (playersStore[guid].IsMuted())
{
WorldPacket data;
diff --git a/src/server/game/Chat/Channels/Channel.h b/src/server/game/Chat/Channels/Channel.h
index c816cd91257..b9883144cbc 100755..100644
--- a/src/server/game/Chat/Channels/Channel.h
+++ b/src/server/game/Chat/Channels/Channel.h
@@ -28,6 +28,8 @@
#include "Opcodes.h"
#include "WorldPacket.h"
+class Player;
+
enum ChatNotify
{
CHAT_JOINED_NOTICE = 0x00, //+ "%s joined channel.";
diff --git a/src/server/game/Chat/Channels/ChannelMgr.cpp b/src/server/game/Chat/Channels/ChannelMgr.cpp
index acd85f11ed8..acd85f11ed8 100755..100644
--- a/src/server/game/Chat/Channels/ChannelMgr.cpp
+++ b/src/server/game/Chat/Channels/ChannelMgr.cpp
diff --git a/src/server/game/Chat/Channels/ChannelMgr.h b/src/server/game/Chat/Channels/ChannelMgr.h
index c1d1793c446..c1d1793c446 100755..100644
--- a/src/server/game/Chat/Channels/ChannelMgr.h
+++ b/src/server/game/Chat/Channels/ChannelMgr.h
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp
index c1ea96b0db1..6441bd1bcb6 100755..100644
--- a/src/server/game/Chat/Chat.cpp
+++ b/src/server/game/Chat/Chat.cpp
@@ -63,7 +63,7 @@ ChatCommand* ChatHandler::getCommandTable()
// cache for commands, needed because some commands are loaded dynamically through ScriptMgr
// cache is never freed and will show as a memory leak in diagnostic tools
// can't use vector as vector storage is implementation-dependent, eg, there can be alignment gaps between elements
- static ChatCommand* commandTableCache = 0;
+ static ChatCommand* commandTableCache = NULL;
if (LoadCommandTable())
{
@@ -96,7 +96,6 @@ ChatCommand* ChatHandler::getCommandTable()
std::string name = fields[0].GetString();
SetDataForCommandInTable(commandTableCache, name.c_str(), fields[1].GetUInt8(), fields[2].GetString(), name);
-
}
while (result->NextRow());
}
diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h
index 3b08fd9aa76..3b08fd9aa76 100755..100644
--- a/src/server/game/Chat/Chat.h
+++ b/src/server/game/Chat/Chat.h
diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp
index a9c72e1112e..c02df6198f8 100644
--- a/src/server/game/Chat/ChatLink.cpp
+++ b/src/server/game/Chat/ChatLink.cpp
@@ -20,6 +20,7 @@
#include "ObjectMgr.h"
#include "SpellInfo.h"
#include "DBCStores.h"
+#include "AchievementMgr.h"
// Supported shift-links (client generated and server side)
// |color|Hachievement:achievement_id:player_guid:0:0:0:0:0:0:0:0|h[name]|h|r
@@ -318,17 +319,12 @@ bool SpellChatLink::ValidateName(char* buffer, const char* context)
}
}
- bool res = false;
for (uint8 i = 0; i < TOTAL_LOCALES; ++i)
if (*_spell->SpellName[i] && strcmp(_spell->SpellName[i], buffer) == 0)
- {
- res = true;
- break;
- }
+ return true;
- if (!res)
- sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked spell (id: %u) name wasn't found in any localization", context, _spell->Id);
- return res;
+ sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked spell (id: %u) name wasn't found in any localization", context, _spell->Id);
+ return false;
}
// |color|Hachievement:achievement_id:player_guid:0:0:0:0:0:0:0:0|h[name]|h|r
@@ -345,7 +341,7 @@ bool AchievementChatLink::Initialize(std::istringstream& iss)
return false;
}
// Validate achievement
- _achievement = sAchievementStore.LookupEntry(achievementId);
+ _achievement = sAchievementMgr->GetAchievement(achievementId);
if (!_achievement)
{
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid achivement id %u in |achievement command", iss.str().c_str(), achievementId);
@@ -380,17 +376,12 @@ bool AchievementChatLink::ValidateName(char* buffer, const char* context)
{
ChatLink::ValidateName(buffer, context);
- bool res = false;
for (uint8 i = 0; i < TOTAL_LOCALES; ++i)
if (*_achievement->name[i] && strcmp(_achievement->name[i], buffer) == 0)
- {
- res = true;
- break;
- }
+ return true;
- if (!res)
- sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked achievement (id: %u) name wasn't found in any localization", context, _achievement->ID);
- return res;
+ sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked achievement (id: %u) name wasn't found in any localization", context, _achievement->ID);
+ return false;
}
// |color|Htrade:spell_id:cur_value:max_value:player_guid:base64_data|h[name]|h|r
diff --git a/src/server/game/Combat/HostileRefManager.cpp b/src/server/game/Combat/HostileRefManager.cpp
index 05b4fa171c7..05b4fa171c7 100755..100644
--- a/src/server/game/Combat/HostileRefManager.cpp
+++ b/src/server/game/Combat/HostileRefManager.cpp
diff --git a/src/server/game/Combat/HostileRefManager.h b/src/server/game/Combat/HostileRefManager.h
index b8991d8faf8..b8991d8faf8 100755..100644
--- a/src/server/game/Combat/HostileRefManager.h
+++ b/src/server/game/Combat/HostileRefManager.h
diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp
index 2c45067d95a..2c45067d95a 100755..100644
--- a/src/server/game/Combat/ThreatManager.cpp
+++ b/src/server/game/Combat/ThreatManager.cpp
diff --git a/src/server/game/Combat/ThreatManager.h b/src/server/game/Combat/ThreatManager.h
index 665acd6d751..665acd6d751 100755..100644
--- a/src/server/game/Combat/ThreatManager.h
+++ b/src/server/game/Combat/ThreatManager.h
diff --git a/src/server/game/Combat/UnitEvents.h b/src/server/game/Combat/UnitEvents.h
index 8d57ef6c59c..8d57ef6c59c 100755..100644
--- a/src/server/game/Combat/UnitEvents.h
+++ b/src/server/game/Combat/UnitEvents.h
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index 5fe81bcf89c..37835618183 100755..100644
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -17,6 +17,7 @@
*/
#include "ConditionMgr.h"
+#include "AchievementMgr.h"
#include "GameEventMgr.h"
#include "InstanceScript.h"
#include "ObjectMgr.h"
@@ -105,6 +106,12 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
condMeets = unit->getRaceMask() & ConditionValue1;
break;
}
+ case CONDITION_GENDER:
+ {
+ if (Player* player = object->ToPlayer())
+ condMeets = player->getGender() == ConditionValue1;
+ break;
+ }
case CONDITION_SKILL:
{
if (Player* player = object->ToPlayer())
@@ -442,6 +449,9 @@ uint32 Condition::GetSearcherTypeMaskForCondition()
case CONDITION_SPAWNMASK:
mask |= GRID_MAP_TYPE_MASK_ALL;
break;
+ case CONDITION_GENDER:
+ mask |= GRID_MAP_TYPE_MASK_PLAYER;
+ break;
default:
ASSERT(false && "Condition::GetSearcherTypeMaskForCondition - missing condition handling!");
break;
@@ -462,6 +472,7 @@ uint32 Condition::GetMaxAvailableConditionTargets()
case CONDITION_SOURCE_TYPE_GOSSIP_MENU:
case CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION:
case CONDITION_SOURCE_TYPE_SMART_EVENT:
+ case CONDITION_SOURCE_TYPE_NPC_VENDOR:
return 2;
default:
return 1;
@@ -612,7 +623,8 @@ bool ConditionMgr::CanHaveSourceGroupSet(ConditionSourceType sourceType) const
sourceType == CONDITION_SOURCE_TYPE_VEHICLE_SPELL ||
sourceType == CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET ||
sourceType == CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT ||
- sourceType == CONDITION_SOURCE_TYPE_SMART_EVENT);
+ sourceType == CONDITION_SOURCE_TYPE_SMART_EVENT ||
+ sourceType == CONDITION_SOURCE_TYPE_NPC_VENDOR);
}
bool ConditionMgr::CanHaveSourceIdSet(ConditionSourceType sourceType) const
@@ -639,7 +651,6 @@ ConditionList ConditionMgr::GetConditionsForNotGroupedEntry(ConditionSourceType
return spellCond;
}
-
ConditionList ConditionMgr::GetConditionsForSpellClickEvent(uint32 creatureId, uint32 spellId)
{
ConditionList cond;
@@ -688,6 +699,22 @@ ConditionList ConditionMgr::GetConditionsForSmartEvent(int32 entryOrGuid, uint32
return cond;
}
+ConditionList ConditionMgr::GetConditionsForNpcVendorEvent(uint32 creatureId, uint32 itemId)
+{
+ ConditionList cond;
+ NpcVendorConditionContainer::const_iterator itr = NpcVendorConditionContainerStore.find(creatureId);
+ if (itr != NpcVendorConditionContainerStore.end())
+ {
+ ConditionTypeContainer::const_iterator i = (*itr).second.find(itemId);
+ if (i != (*itr).second.end())
+ {
+ cond = (*i).second;
+ sLog->outDebug(LOG_FILTER_CONDITIONSYS, "GetConditionsForNpcVendorEvent: found conditions for creature entry %u item %u", creatureId, itemId);
+ }
+ }
+ return cond;
+}
+
void ConditionMgr::LoadConditions(bool isReload)
{
uint32 oldMSTime = getMSTime();
@@ -720,12 +747,11 @@ void ConditionMgr::LoadConditions(bool isReload)
}
QueryResult result = WorldDatabase.Query("SELECT SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, ConditionTarget, "
- " ConditionValue1, ConditionValue2, ConditionValue3, NegativeCondition, ErrorTextId, ScriptName FROM conditions");
+ " ConditionValue1, ConditionValue2, ConditionValue3, NegativeCondition, ErrorType, ErrorTextId, ScriptName FROM conditions");
if (!result)
{
sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 conditions. DB table `conditions` is empty!");
-
return;
}
@@ -736,19 +762,20 @@ void ConditionMgr::LoadConditions(bool isReload)
Field* fields = result->Fetch();
Condition* cond = new Condition();
- int32 iSourceTypeOrReferenceId = fields[0].GetInt32();
+ int32 iSourceTypeOrReferenceId = fields[0].GetInt32();
cond->SourceGroup = fields[1].GetUInt32();
cond->SourceEntry = fields[2].GetInt32();
cond->SourceId = fields[3].GetInt32();
cond->ElseGroup = fields[4].GetUInt32();
- int32 iConditionTypeOrReference = fields[5].GetInt32();
+ int32 iConditionTypeOrReference = fields[5].GetInt32();
cond->ConditionTarget = fields[6].GetUInt8();
cond->ConditionValue1 = fields[7].GetUInt32();
cond->ConditionValue2 = fields[8].GetUInt32();
cond->ConditionValue3 = fields[9].GetUInt32();
cond->NegativeCondition = fields[10].GetUInt8();
- cond->ErrorTextId = fields[11].GetUInt32();
- cond->ScriptId = sObjectMgr->GetScriptId(fields[12].GetCString());
+ cond->ErrorType = fields[11].GetUInt32();
+ cond->ErrorTextId = fields[12].GetUInt32();
+ cond->ScriptId = sObjectMgr->GetScriptId(fields[13].GetCString());
if (iConditionTypeOrReference >= 0)
cond->ConditionType = ConditionTypes(iConditionTypeOrReference);
@@ -825,6 +852,18 @@ void ConditionMgr::LoadConditions(bool isReload)
continue;
}
+ if (cond->ErrorType && cond->SourceType != CONDITION_SOURCE_TYPE_SPELL)
+ {
+ sLog->outError(LOG_FILTER_SQL, "Condition type %u entry %i can't have ErrorType (%u), set to 0!", uint32(cond->SourceType), cond->SourceEntry, cond->ErrorType);
+ cond->ErrorType = 0;
+ }
+
+ if (cond->ErrorTextId && !cond->ErrorType)
+ {
+ sLog->outError(LOG_FILTER_SQL, "Condition type %u entry %i has any ErrorType, ErrorTextId (%u) is set, set to 0!", uint32(cond->SourceType), cond->SourceEntry, cond->ErrorTextId);
+ cond->ErrorTextId = 0;
+ }
+
if (cond->SourceGroup)
{
bool valid = false;
@@ -899,6 +938,13 @@ void ConditionMgr::LoadConditions(bool isReload)
++count;
continue;
}
+ case CONDITION_SOURCE_TYPE_NPC_VENDOR:
+ {
+ NpcVendorConditionContainerStore[cond->SourceGroup][cond->SourceEntry].push_back(cond);
+ valid = true;
+ ++count;
+ continue;
+ }
default:
break;
}
@@ -1390,6 +1436,21 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
return false;
}
break;
+ case CONDITION_SOURCE_TYPE_NPC_VENDOR:
+ {
+ if (!sObjectMgr->GetCreatureTemplate(cond->SourceGroup))
+ {
+ sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup);
+ return false;
+ }
+ ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!itemTemplate)
+ {
+ sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceEntry);
+ return false;
+ }
+ break;
+ }
case CONDITION_SOURCE_TYPE_GOSSIP_MENU:
case CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION:
case CONDITION_SOURCE_TYPE_SMART_EVENT:
@@ -1400,6 +1461,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
return true;
}
+
bool ConditionMgr::isConditionTypeValid(Condition* cond)
{
if (cond->ConditionType == CONDITION_NONE || cond->ConditionType >= CONDITION_MAX)
@@ -1563,7 +1625,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
}
case CONDITION_ACHIEVEMENT:
{
- AchievementEntry const* achievement = sAchievementStore.LookupEntry(cond->ConditionValue1);
+ AchievementEntry const* achievement = sAchievementMgr->GetAchievement(cond->ConditionValue1);
if (!achievement)
{
sLog->outError(LOG_FILTER_SQL, "Achivement condition has non existing achivement id (%u), skipped", cond->ConditionValue1);
@@ -1604,6 +1666,20 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
sLog->outError(LOG_FILTER_SQL, "Race condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
+ case CONDITION_GENDER:
+ {
+ if (!Player::IsValidGender(uint8(cond->ConditionValue1)))
+ {
+ sLog->outError(LOG_FILTER_SQL, "Gender condition has invalid gender (%u), skipped", cond->ConditionValue1);
+ return false;
+ }
+
+ if (cond->ConditionValue2)
+ sLog->outError(LOG_FILTER_SQL, "Gender condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outError(LOG_FILTER_SQL, "Gender condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ break;
+ }
case CONDITION_MAPID:
{
MapEntry const* me = sMapStore.LookupEntry(cond->ConditionValue1);
@@ -1863,9 +1939,6 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
}
break;
}
- case CONDITION_UNUSED_20:
- sLog->outError(LOG_FILTER_SQL, "Found ConditionTypeOrReference = CONDITION_UNUSED_20 in `conditions` table - ignoring");
- return false;
case CONDITION_UNUSED_21:
sLog->outError(LOG_FILTER_SQL, "Found ConditionTypeOrReference = CONDITION_UNUSED_21 in `conditions` table - ignoring");
return false;
@@ -1941,6 +2014,19 @@ void ConditionMgr::Clean()
SpellClickEventConditionStore.clear();
+ for (NpcVendorConditionContainer::iterator itr = NpcVendorConditionContainerStore.begin(); itr != NpcVendorConditionContainerStore.end(); ++itr)
+ {
+ for (ConditionTypeContainer::iterator it = itr->second.begin(); it != itr->second.end(); ++it)
+ {
+ for (ConditionList::const_iterator i = it->second.begin(); i != it->second.end(); ++i)
+ delete *i;
+ it->second.clear();
+ }
+ itr->second.clear();
+ }
+
+ NpcVendorConditionContainerStore.clear();
+
// this is a BIG hack, feel free to fix it if you can figure out the ConditionMgr ;)
for (std::list<Condition*>::const_iterator itr = AllocatedMemoryStore.begin(); itr != AllocatedMemoryStore.end(); ++itr)
delete *itr;
diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h
index 7b0dc1f20bf..807b75c4ee6 100755..100644
--- a/src/server/game/Conditions/ConditionMgr.h
+++ b/src/server/game/Conditions/ConditionMgr.h
@@ -53,7 +53,7 @@ enum ConditionTypes
CONDITION_ACHIEVEMENT = 17, // achievement_id 0 0 true if achievement is complete
CONDITION_TITLE = 18, // title id 0 0 true if player has title
CONDITION_SPAWNMASK = 19, // spawnMask 0 0 true if in spawnMask
- CONDITION_UNUSED_20 = 20, //
+ CONDITION_GENDER = 20, // gender 0 0 true if player's gender is equal to gender
CONDITION_UNUSED_21 = 21, //
CONDITION_MAPID = 22, // map_id 0 0 true if in map_id
CONDITION_AREAID = 23, // area_id 0 0 true if in area_id
@@ -127,7 +127,8 @@ enum ConditionSourceType
CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK = 20,
CONDITION_SOURCE_TYPE_VEHICLE_SPELL = 21,
CONDITION_SOURCE_TYPE_SMART_EVENT = 22,
- CONDITION_SOURCE_TYPE_MAX = 23 //MAX
+ CONDITION_SOURCE_TYPE_NPC_VENDOR = 23,
+ CONDITION_SOURCE_TYPE_MAX = 24 // MAX
};
enum ComparisionType
@@ -180,6 +181,7 @@ struct Condition
uint32 ConditionValue1;
uint32 ConditionValue2;
uint32 ConditionValue3;
+ uint32 ErrorType;
uint32 ErrorTextId;
uint32 ReferenceId;
uint32 ScriptId;
@@ -198,6 +200,7 @@ struct Condition
ConditionValue2 = 0;
ConditionValue3 = 0;
ReferenceId = 0;
+ ErrorType = 0;
ErrorTextId = 0;
ScriptId = 0;
NegativeCondition = false;
@@ -213,6 +216,7 @@ typedef std::list<Condition*> ConditionList;
typedef std::map<uint32, ConditionList> ConditionTypeContainer;
typedef std::map<ConditionSourceType, ConditionTypeContainer> ConditionContainer;
typedef std::map<uint32, ConditionTypeContainer> CreatureSpellConditionContainer;
+typedef std::map<uint32, ConditionTypeContainer> NpcVendorConditionContainer;
typedef std::map<std::pair<int32, uint32 /*SAI source_type*/>, ConditionTypeContainer> SmartEventConditionContainer;
typedef std::map<uint32, ConditionList> ConditionReferenceContainer;//only used for references
@@ -240,6 +244,7 @@ class ConditionMgr
ConditionList GetConditionsForSpellClickEvent(uint32 creatureId, uint32 spellId);
ConditionList GetConditionsForSmartEvent(int32 entryOrGuid, uint32 eventId, uint32 sourceType);
ConditionList GetConditionsForVehicleSpell(uint32 creatureId, uint32 spellId);
+ ConditionList GetConditionsForNpcVendorEvent(uint32 creatureId, uint32 itemId);
private:
bool isSourceTypeValid(Condition* cond);
@@ -256,6 +261,7 @@ class ConditionMgr
ConditionReferenceContainer ConditionReferenceStore;
CreatureSpellConditionContainer VehicleSpellConditionStore;
CreatureSpellConditionContainer SpellClickEventConditionStore;
+ NpcVendorConditionContainer NpcVendorConditionContainerStore;
SmartEventConditionContainer SmartEventConditionStore;
};
diff --git a/src/server/game/Conditions/DisableMgr.cpp b/src/server/game/Conditions/DisableMgr.cpp
index cc23036c534..b544e966084 100755..100644
--- a/src/server/game/Conditions/DisableMgr.cpp
+++ b/src/server/game/Conditions/DisableMgr.cpp
@@ -17,6 +17,7 @@
*/
#include "DisableMgr.h"
+#include "AchievementMgr.h"
#include "ObjectMgr.h"
#include "OutdoorPvP.h"
#include "SpellMgr.h"
@@ -173,7 +174,7 @@ void LoadDisables()
sLog->outError(LOG_FILTER_SQL, "Disable flags specified for outdoor PvP %u, useless data.", entry);
break;
case DISABLE_TYPE_ACHIEVEMENT_CRITERIA:
- if (!sAchievementCriteriaStore.LookupEntry(entry))
+ if (!sAchievementMgr->GetAchievementCriteria(entry))
{
sLog->outError(LOG_FILTER_SQL, "Achievement Criteria entry %u from `disables` doesn't exist in dbc, skipped.", entry);
continue;
diff --git a/src/server/game/Conditions/DisableMgr.h b/src/server/game/Conditions/DisableMgr.h
index b1bb43315bd..b1bb43315bd 100755..100644
--- a/src/server/game/Conditions/DisableMgr.h
+++ b/src/server/game/Conditions/DisableMgr.h
diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h
index 4fa2e3e748e..fa6b5f0695f 100755..100644
--- a/src/server/game/DataStores/DBCEnums.h
+++ b/src/server/game/DataStores/DBCEnums.h
@@ -79,12 +79,12 @@ enum AchievementCriteriaCondition
{
ACHIEVEMENT_CRITERIA_CONDITION_NONE = 0,
ACHIEVEMENT_CRITERIA_CONDITION_NO_DEATH = 1, // reset progress on death
- ACHIEVEMENT_CRITERIA_CONDITION_UNK1 = 2, // only used in "Complete a daily quest every day for five consecutive days"
+ ACHIEVEMENT_CRITERIA_CONDITION_UNK2 = 2, // only used in "Complete a daily quest every day for five consecutive days"
ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP = 3, // requires you to be on specific map, reset at change
ACHIEVEMENT_CRITERIA_CONDITION_NO_LOSE = 4, // only used in "Win 10 arenas without losing"
ACHIEVEMENT_CRITERIA_CONDITION_NO_SPELL_HIT = 9, // requires the player not to be hit by specific spell
ACHIEVEMENT_CRITERIA_CONDITION_NOT_IN_GROUP = 10, // requires the player not to be in group
- ACHIEVEMENT_CRITERIA_CONDITION_UNK3 = 13 // unk
+ ACHIEVEMENT_CRITERIA_CONDITION_UNK13 = 13 // unk
};
enum AchievementCriteriaFlags
@@ -140,7 +140,7 @@ enum AchievementCriteriaTypes
ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL = 34,
ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL = 35,
ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM = 36,
- ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA = 37, // TODO: the archievements 1162 and 1163 requires a special rating which can't be found in the dbc
+ ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA = 37,
ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_TEAM_RATING = 38,
ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING = 39,
ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LEVEL = 40,
@@ -213,14 +213,9 @@ enum AchievementCriteriaTypes
ACHIEVEMENT_CRITERIA_TYPE_ACCEPTED_SUMMONINGS = 114,
ACHIEVEMENT_CRITERIA_TYPE_EARN_ACHIEVEMENT_POINTS = 115,
ACHIEVEMENT_CRITERIA_TYPE_USE_LFD_TO_GROUP_WITH_PLAYERS = 119,
- // 120
- // 121
- // 122
- // 123
- // 0..123 => 124 criteria types total
};
-#define ACHIEVEMENT_CRITERIA_TYPE_TOTAL 124
+#define ACHIEVEMENT_CRITERIA_TYPE_TOTAL 120
enum AchievementCategory
{
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index 850c58bdf93..b74c8a4d1f5 100755..100644
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -17,11 +17,9 @@
*/
#include "DBCStores.h"
-
#include "Log.h"
#include "SharedDefines.h"
#include "SpellMgr.h"
-
#include "DBCfmt.h"
#include <map>
diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h
index cd30ed587f8..cd30ed587f8 100755..100644
--- a/src/server/game/DataStores/DBCStores.h
+++ b/src/server/game/DataStores/DBCStores.h
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
index 20eab098add..f57724fe58b 100755..100644
--- a/src/server/game/DataStores/DBCStructure.h
+++ b/src/server/game/DataStores/DBCStructure.h
@@ -1677,9 +1677,9 @@ struct SpellFocusObjectEntry
struct SpellRadiusEntry
{
uint32 ID;
- float radiusMin;
- //uint32 Unk //always 0
- float radiusMax;
+ float RadiusMin;
+ float RadiusPerLevel;
+ float RadiusMax;
};
struct SpellRangeEntry
diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h
index 0fe82ea3311..bb671d4dd72 100755..100644
--- a/src/server/game/DataStores/DBCfmt.h
+++ b/src/server/game/DataStores/DBCfmt.h
@@ -106,7 +106,7 @@ const std::string CustomSpellEntryIndex = "Id";
char const SpellFocusObjectfmt[]="nxxxxxxxxxxxxxxxxx";
char const SpellItemEnchantmentfmt[]="nxiiiiiixxxiiissssssssssssssssxiiiiiii";
char const SpellItemEnchantmentConditionfmt[]="nbbbbbxxxxxbbbbbbbbbbiiiiiXXXXX";
-char const SpellRadiusfmt[]="nfxf";
+char const SpellRadiusfmt[]="nfff";
char const SpellRangefmt[]="nffffixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
char const SpellRuneCostfmt[]="niiii";
char const SpellShapeshiftfmt[]="nxxxxxxxxxxxxxxxxxxiixiiixxiiiiiiii";
diff --git a/src/server/game/DungeonFinding/LFG.h b/src/server/game/DungeonFinding/LFG.h
index 8477002279c..8477002279c 100755..100644
--- a/src/server/game/DungeonFinding/LFG.h
+++ b/src/server/game/DungeonFinding/LFG.h
diff --git a/src/server/game/DungeonFinding/LFGGroupData.cpp b/src/server/game/DungeonFinding/LFGGroupData.cpp
index c7cf6f23ce9..68e7ab82c32 100644
--- a/src/server/game/DungeonFinding/LFGGroupData.cpp
+++ b/src/server/game/DungeonFinding/LFGGroupData.cpp
@@ -34,10 +34,12 @@ void LfgGroupData::SetState(LfgState state)
{
switch (state)
{
- case LFG_STATE_FINISHED_DUNGEON:
case LFG_STATE_NONE:
+ m_Dungeon = 0;
+ m_KicksLeft = LFG_GROUP_MAX_KICKS;
+ case LFG_STATE_FINISHED_DUNGEON:
case LFG_STATE_DUNGEON:
- m_OldState = m_State;
+ m_OldState = state;
// No break on purpose
default:
m_State = state;
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index da279016255..668b1622738 100755..100644
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -370,11 +370,13 @@ void LFGMgr::Update(uint32 diff)
for (LfgRolesMap::const_iterator itRoles = roleCheck.roles.begin(); itRoles != roleCheck.roles.end(); ++itRoles)
{
uint64 guid = itRoles->first;
- ClearState(guid, "Remove Obsolete RoleCheck");
+ RestoreState(guid, "Remove Obsolete RoleCheck");
SendLfgRoleCheckUpdate(guid, roleCheck);
if (guid == roleCheck.leader)
SendLfgJoinResult(guid, LfgJoinResultData(LFG_JOIN_FAILED, LFG_ROLECHECK_MISSING_ROLE));
}
+
+ RestoreState(itRoleCheck->first, "Remove Obsolete RoleCheck");
RoleChecksStore.erase(itRoleCheck);
}
@@ -754,7 +756,7 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons, const
*/
void LFGMgr::LeaveLfg(uint64 guid)
{
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::Leave: [" UI64FMTD "]", guid);
+ sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::LeaveLfg: [" UI64FMTD "]", guid);
uint64 gguid = IS_GROUP(guid) ? guid : GetGroup(guid);
LfgState state = GetState(guid);
@@ -765,13 +767,12 @@ void LFGMgr::LeaveLfg(uint64 guid)
{
LFGQueue& queue = GetQueue(gguid);
queue.RemoveFromQueue(gguid);
- RestoreState(gguid, "Leave queue");
+ SetState(gguid, LFG_STATE_NONE);
const LfgGuidSet& players = GetPlayers(gguid);
for (LfgGuidSet::const_iterator it = players.begin(); it != players.end(); ++it)
{
- uint64 guid = (*it);
- ClearState(guid, "Leave queue");
- SendLfgUpdateParty(guid, LfgUpdateData(LFG_UPDATETYPE_REMOVED_FROM_QUEUE));
+ SetState(*it, LFG_STATE_NONE);
+ SendLfgUpdateParty(*it, LfgUpdateData(LFG_UPDATETYPE_REMOVED_FROM_QUEUE));
}
}
else
@@ -779,7 +780,7 @@ void LFGMgr::LeaveLfg(uint64 guid)
LFGQueue& queue = GetQueue(guid);
queue.RemoveFromQueue(guid);
SendLfgUpdatePlayer(guid, LfgUpdateData(LFG_UPDATETYPE_REMOVED_FROM_QUEUE));
- ClearState(guid, "Leave queue");
+ SetState(guid, LFG_STATE_NONE);
}
break;
case LFG_STATE_ROLECHECK:
@@ -808,7 +809,14 @@ void LFGMgr::LeaveLfg(uint64 guid)
RemoveProposal(it, LFG_UPDATETYPE_PROPOSAL_DECLINED);
break;
}
- default:
+ case LFG_STATE_NONE:
+ case LFG_STATE_RAIDBROWSER:
+ break;
+ case LFG_STATE_DUNGEON:
+ case LFG_STATE_FINISHED_DUNGEON:
+ case LFG_STATE_BOOT:
+ if (guid != gguid) // Player
+ SetState(guid, LFG_STATE_NONE);
break;
}
}
@@ -882,7 +890,7 @@ void LFGMgr::UpdateRoleCheck(uint64 gguid, uint64 guid /* = 0 */, uint8 roles /*
if (roleCheck.leader == pguid)
SendLfgJoinResult(pguid, joinData);
SendLfgUpdateParty(pguid, LfgUpdateData(LFG_UPDATETYPE_ROLECHECK_FAILED));
- ClearState(pguid, "Role check Failed");
+ RestoreState(pguid, "Rolecheck Failed");
break;
}
}
@@ -1007,7 +1015,7 @@ bool LFGMgr::CheckGroupRoles(LfgRolesMap& groles, bool removeLeaderFlag /*= true
Makes a new group given a proposal
@param[in] proposal Proposal to get info from
*/
-void LFGMgr::MakeNewGroup(const LfgProposal& proposal)
+void LFGMgr::MakeNewGroup(LfgProposal const& proposal)
{
LfgGuidList players;
LfgGuidList playersToTeleport;
@@ -1038,7 +1046,7 @@ void LFGMgr::MakeNewGroup(const LfgProposal& proposal)
Group* group = player->GetGroup();
if (group && group != grp)
- player->RemoveFromGroup();
+ group->RemoveMember(player->GetGUID());
if (!grp)
{
@@ -1243,10 +1251,11 @@ void LFGMgr::RemoveProposal(LfgProposalContainer::iterator itProposal, LfgUpdate
updateData.updateType = LFG_UPDATETYPE_REMOVED_FROM_QUEUE;
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RemoveProposal: [" UI64FMTD "] in same group that someone that didn't accept. Removing from queue and compatible cache", guid);
}
- ClearState(guid, "Proposal Fail (didn't accepted or in group with someone that didn't accept");
+
+ RestoreState(guid, "Proposal Fail (didn't accepted or in group with someone that didn't accept");
if (gguid != guid)
{
- RestoreState(gguid, "Proposal Fail (someone in group didn't accepted)");
+ RestoreState(it->second.group, "Proposal Fail (someone in group didn't accepted)");
SendLfgUpdateParty(guid, updateData);
}
else
@@ -1325,7 +1334,7 @@ void LFGMgr::InitBoot(uint64 gguid, uint64 kicker, uint64 victim, std::string co
Update Boot info with player answer
@param[in] guid Player who has answered
- @param[in] accept player answer
+ @param[in] player answer
*/
void LFGMgr::UpdateBoot(uint64 guid, bool accept)
{
@@ -1339,7 +1348,7 @@ void LFGMgr::UpdateBoot(uint64 guid, bool accept)
LfgPlayerBoot& boot = itBoot->second;
- if (boot.votes[guid] != LFG_ANSWER_PENDING) // Cheat check: Player can't vote twice
+ if (boot.votes[guid] != LFG_ANSWER_PENDING) // Cheat check: Player can't vote twice
return;
boot.votes[guid] = LfgAnswer(accept);
@@ -1517,7 +1526,6 @@ void LFGMgr::RewardDungeonDoneFor(const uint32 dungeonId, Player* player)
// Clear player related lfg stuff
uint32 rDungeonId = (*GetSelectedDungeons(guid).begin());
- ClearState(guid, "Dungeon Finished");
SetState(guid, LFG_STATE_FINISHED_DUNGEON);
// Give rewards only if its a random or seasonal dungeon
@@ -1621,14 +1629,14 @@ LfgState LFGMgr::GetState(uint64 guid)
else
state = PlayersStore[guid].GetState();
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetState: [" UI64FMTD "] = %u", guid, state);
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::GetState: [" UI64FMTD "] = %u", guid, state);
return state;
}
uint32 LFGMgr::GetDungeon(uint64 guid, bool asId /*= true */)
{
uint32 dungeon = GroupsStore[guid].GetDungeon(asId);
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetDungeon: [" UI64FMTD "] asId: %u = %u", guid, asId, dungeon);
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::GetDungeon: [" UI64FMTD "] asId: %u = %u", guid, asId, dungeon);
return dungeon;
}
@@ -1640,20 +1648,20 @@ uint32 LFGMgr::GetDungeonMapId(uint64 guid)
if (LFGDungeonData const* dungeon = GetLFGDungeon(dungeonId))
mapId = dungeon->map;
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetDungeonMapId: [" UI64FMTD "] = %u (DungeonId = %u)", guid, mapId, dungeonId);
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::GetDungeonMapId: [" UI64FMTD "] = %u (DungeonId = %u)", guid, mapId, dungeonId);
return mapId;
}
uint8 LFGMgr::GetRoles(uint64 guid)
{
uint8 roles = PlayersStore[guid].GetRoles();
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetRoles: [" UI64FMTD "] = %u", guid, roles);
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::GetRoles: [" UI64FMTD "] = %u", guid, roles);
return roles;
}
const std::string& LFGMgr::GetComment(uint64 guid)
{
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetComment: [" UI64FMTD "] = %s", guid, PlayersStore[guid].GetComment().c_str());
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::GetComment: [" UI64FMTD "] = %s", guid, PlayersStore[guid].GetComment().c_str());
return PlayersStore[guid].GetComment();
}
@@ -1669,48 +1677,50 @@ bool LFGMgr::IsTeleported(uint64 pguid)
const LfgDungeonSet& LFGMgr::GetSelectedDungeons(uint64 guid)
{
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetSelectedDungeons: [" UI64FMTD "]", guid);
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::GetSelectedDungeons: [" UI64FMTD "]", guid);
return PlayersStore[guid].GetSelectedDungeons();
}
const LfgLockMap& LFGMgr::GetLockedDungeons(uint64 guid)
{
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetLockedDungeons: [" UI64FMTD "]", guid);
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::GetLockedDungeons: [" UI64FMTD "]", guid);
return PlayersStore[guid].GetLockedDungeons();
}
uint8 LFGMgr::GetKicksLeft(uint64 guid)
{
uint8 kicks = GroupsStore[guid].GetKicksLeft();
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetKicksLeft: [" UI64FMTD "] = %u", guid, kicks);
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::GetKicksLeft: [" UI64FMTD "] = %u", guid, kicks);
return kicks;
}
void LFGMgr::RestoreState(uint64 guid, char const *debugMsg)
{
- LfgGroupData& data = GroupsStore[guid];
- if (sLog->ShouldLog(LOG_FILTER_LFG, LOG_LEVEL_DEBUG))
+ if (IS_GROUP(guid))
{
- std::string const& ps = GetStateString(data.GetState());
- std::string const& os = GetStateString(data.GetOldState());
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RestoreState: Group: [" UI64FMTD "] (%s) State: %s, oldState: %s",
- guid, debugMsg, ps.c_str(), os.c_str());
- }
-
- data.RestoreState();
-}
+ LfgGroupData& data = GroupsStore[guid];
+ if (sLog->ShouldLog(LOG_FILTER_LFG, LOG_LEVEL_DEBUG))
+ {
+ std::string const& ps = GetStateString(data.GetState());
+ std::string const& os = GetStateString(data.GetOldState());
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::RestoreState: Group: [" UI64FMTD "] (%s) State: %s, oldState: %s",
+ guid, debugMsg, ps.c_str(), os.c_str());
+ }
-void LFGMgr::ClearState(uint64 guid, char const *debugMsg)
-{
- LfgPlayerData& data = PlayersStore[guid];
- if (sLog->ShouldLog(LOG_FILTER_LFG, LOG_LEVEL_DEBUG))
+ data.RestoreState();
+ }
+ else
{
- std::string const& ps = GetStateString(data.GetState());
- std::string const& os = GetStateString(data.GetOldState());
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::ClearState: Player: [" UI64FMTD "] (%s) State: %s, oldState: %s",
- guid, debugMsg, ps.c_str(), os.c_str());
+ LfgPlayerData& data = PlayersStore[guid];
+ if (sLog->ShouldLog(LOG_FILTER_LFG, LOG_LEVEL_DEBUG))
+ {
+ std::string const& ps = GetStateString(data.GetState());
+ std::string const& os = GetStateString(data.GetOldState());
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::RestoreState: Player: [" UI64FMTD "] (%s) State: %s, oldState: %s",
+ guid, debugMsg, ps.c_str(), os.c_str());
+ }
+ data.RestoreState();
}
- data.ClearState();
}
void LFGMgr::SetState(uint64 guid, LfgState state)
@@ -1723,7 +1733,7 @@ void LFGMgr::SetState(uint64 guid, LfgState state)
std::string const& ns = GetStateString(state);
std::string const& ps = GetStateString(data.GetState());
std::string const& os = GetStateString(data.GetOldState());
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetState: Group: [" UI64FMTD "] newState: %s, previous: %s, oldState: %s",
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::SetState: Group: [" UI64FMTD "] newState: %s, previous: %s, oldState: %s",
guid, ns.c_str(), ps.c_str(), os.c_str());
}
data.SetState(state);
@@ -1736,7 +1746,7 @@ void LFGMgr::SetState(uint64 guid, LfgState state)
std::string const& ns = GetStateString(state);
std::string const& ps = GetStateString(data.GetState());
std::string const& os = GetStateString(data.GetOldState());
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetState: Player: [" UI64FMTD "] newState: %s, previous: %s, oldState: %s",
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::SetState: Player: [" UI64FMTD "] newState: %s, previous: %s, oldState: %s",
guid, ns.c_str(), ps.c_str(), os.c_str());
}
data.SetState(state);
@@ -1745,43 +1755,43 @@ void LFGMgr::SetState(uint64 guid, LfgState state)
void LFGMgr::SetDungeon(uint64 guid, uint32 dungeon)
{
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetDungeon: [" UI64FMTD "] dungeon %u", guid, dungeon);
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::SetDungeon: [" UI64FMTD "] dungeon %u", guid, dungeon);
GroupsStore[guid].SetDungeon(dungeon);
}
void LFGMgr::SetRoles(uint64 guid, uint8 roles)
{
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetRoles: [" UI64FMTD "] roles: %u", guid, roles);
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::SetRoles: [" UI64FMTD "] roles: %u", guid, roles);
PlayersStore[guid].SetRoles(roles);
}
void LFGMgr::SetComment(uint64 guid, const std::string& comment)
{
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetComment: [" UI64FMTD "] comment: %s", guid, comment.c_str());
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::SetComment: [" UI64FMTD "] comment: %s", guid, comment.c_str());
PlayersStore[guid].SetComment(comment);
}
void LFGMgr::SetSelectedDungeons(uint64 guid, const LfgDungeonSet& dungeons)
{
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetSelectedDungeons: [" UI64FMTD "]", guid);
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::SetSelectedDungeons: [" UI64FMTD "]", guid);
PlayersStore[guid].SetSelectedDungeons(dungeons);
}
void LFGMgr::SetLockedDungeons(uint64 guid, const LfgLockMap& lock)
{
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetLockedDungeons: [" UI64FMTD "]", guid);
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::SetLockedDungeons: [" UI64FMTD "]", guid);
PlayersStore[guid].SetLockedDungeons(lock);
}
void LFGMgr::DecreaseKicksLeft(uint64 guid)
{
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::DecreaseKicksLeft: [" UI64FMTD "]", guid);
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::DecreaseKicksLeft: [" UI64FMTD "]", guid);
GroupsStore[guid].DecreaseKicksLeft();
}
void LFGMgr::RemovePlayerData(uint64 guid)
{
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RemovePlayerData: [" UI64FMTD "]", guid);
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::RemovePlayerData: [" UI64FMTD "]", guid);
LfgPlayerDataContainer::iterator it = PlayersStore.find(guid);
if (it != PlayersStore.end())
PlayersStore.erase(it);
@@ -1789,18 +1799,23 @@ void LFGMgr::RemovePlayerData(uint64 guid)
void LFGMgr::RemoveGroupData(uint64 guid)
{
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RemoveGroupData: [" UI64FMTD "]", guid);
+ sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::RemoveGroupData: [" UI64FMTD "]", guid);
LfgGroupDataContainer::iterator it = GroupsStore.find(guid);
if (it == GroupsStore.end())
return;
+ LfgState state = GetState(guid);
+ // If group is being formed after proposal success do nothing more
LfgGuidSet const& players = it->second.GetPlayers();
for (LfgGuidSet::const_iterator it = players.begin(); it != players.end(); ++it)
{
uint64 guid = (*it);
- ClearState(*it, "Group Disband");
SetGroup(*it, 0);
- SendLfgUpdateParty(guid, LfgUpdateData(LFG_UPDATETYPE_REMOVED_FROM_QUEUE));
+ if (state != LFG_STATE_PROPOSAL)
+ {
+ SetState(*it, LFG_STATE_NONE);
+ SendLfgUpdateParty(guid, LfgUpdateData(LFG_UPDATETYPE_REMOVED_FROM_QUEUE));
+ }
}
GroupsStore.erase(it);
}
diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h
index 9c023d1daf8..14bc0becb02 100755..100644
--- a/src/server/game/DungeonFinding/LFGMgr.h
+++ b/src/server/game/DungeonFinding/LFGMgr.h
@@ -254,7 +254,7 @@ struct LfgPlayerBoot
{
time_t cancelTime; ///< Time left to vote
bool inProgress; ///< Vote in progress
- LfgAnswerContainer votes; ///< Player votes (-1 not answer | 0 Not agree | 1 agree)
+ LfgAnswerContainer votes; ///< Player votes (-1 not answer | 0 Not agree | 1 agree)
uint64 victim; ///< Player guid to be kicked (can't vote)
std::string reason; ///< kick reason
};
diff --git a/src/server/game/DungeonFinding/LFGPlayerData.cpp b/src/server/game/DungeonFinding/LFGPlayerData.cpp
index f1281875598..deee0ddae3c 100644
--- a/src/server/game/DungeonFinding/LFGPlayerData.cpp
+++ b/src/server/game/DungeonFinding/LFGPlayerData.cpp
@@ -33,23 +33,27 @@ void LfgPlayerData::SetState(LfgState state)
case LFG_STATE_FINISHED_DUNGEON:
m_Roles = 0;
m_SelectedDungeons.clear();
+ m_Comment = "";
// No break on purpose
case LFG_STATE_DUNGEON:
- m_OldState = m_State;
+ m_OldState = state;
// No break on purpose
default:
m_State = state;
}
}
-void LfgPlayerData::ClearState()
+void LfgPlayerData::RestoreState()
{
- m_SelectedDungeons.clear();
- m_Roles = 0;
+ if (m_OldState == LFG_STATE_NONE)
+ {
+ m_SelectedDungeons.clear();
+ m_Roles = 0;
+ }
m_State = m_OldState;
}
-void LfgPlayerData::SetLockedDungeons(const LfgLockMap& lockStatus)
+void LfgPlayerData::SetLockedDungeons(LfgLockMap const& lockStatus)
{
m_LockedDungeons = lockStatus;
}
@@ -69,12 +73,12 @@ void LfgPlayerData::SetRoles(uint8 roles)
m_Roles = roles;
}
-void LfgPlayerData::SetComment(const std::string& comment)
+void LfgPlayerData::SetComment(std::string const& comment)
{
m_Comment = comment;
}
-void LfgPlayerData::SetSelectedDungeons(const LfgDungeonSet& dungeons)
+void LfgPlayerData::SetSelectedDungeons(LfgDungeonSet const& dungeons)
{
m_SelectedDungeons = dungeons;
}
diff --git a/src/server/game/DungeonFinding/LFGPlayerData.h b/src/server/game/DungeonFinding/LFGPlayerData.h
index 0682ad66698..589404cf65c 100644
--- a/src/server/game/DungeonFinding/LFGPlayerData.h
+++ b/src/server/game/DungeonFinding/LFGPlayerData.h
@@ -31,7 +31,7 @@ class LfgPlayerData
// General
void SetState(LfgState state);
- void ClearState();
+ void RestoreState();
void SetLockedDungeons(LfgLockMap const& lock);
void SetTeam(uint8 team);
void SetGroup(uint64 group);
@@ -56,7 +56,7 @@ class LfgPlayerData
private:
// General
LfgState m_State; ///< State if group in LFG
- LfgState m_OldState; ///< Old State
+ LfgState m_OldState; ///< Old State - Used to restore state after failed Rolecheck/Proposal
// Player
LfgLockMap m_LockedDungeons; ///< Dungeons player can't do and reason
uint8 m_Team; ///< Player team - determines the queue to join
diff --git a/src/server/game/DungeonFinding/LFGQueue.cpp b/src/server/game/DungeonFinding/LFGQueue.cpp
index 3bcd1ee5643..bfcf17dc270 100644
--- a/src/server/game/DungeonFinding/LFGQueue.cpp
+++ b/src/server/game/DungeonFinding/LFGQueue.cpp
@@ -483,12 +483,7 @@ LfgCompatibility LFGQueue::CheckCompatibility(LfgGuidList check)
}
proposal.queues = check;
- if (check.size() == 1)
- {
- for (LfgGroupsMap::const_iterator it = proposalGroups.begin(); it != proposalGroups.end(); ++it)
- if (proposal.group && it->second != proposal.group)
- proposal.isNew = false;
- }
+ proposal.isNew = numLfgGroups != 1;
if (!sLFGMgr->AllQueued(check))
{
diff --git a/src/server/game/DungeonFinding/LFGScripts.cpp b/src/server/game/DungeonFinding/LFGScripts.cpp
index f9e3c02fe98..32dc8319215 100644
--- a/src/server/game/DungeonFinding/LFGScripts.cpp
+++ b/src/server/game/DungeonFinding/LFGScripts.cpp
@@ -161,7 +161,6 @@ void LFGGroupScript::OnRemoveMember(Group* group, uint64 guid, RemoveMethod meth
}
sLFGMgr->LeaveLfg(guid);
- sLFGMgr->SetState(guid, LFG_STATE_NONE);
sLFGMgr->SetGroup(guid, 0);
uint8 players = sLFGMgr->RemovePlayerFromGroup(gguid, guid);
diff --git a/src/server/game/Entities/Corpse/Corpse.cpp b/src/server/game/Entities/Corpse/Corpse.cpp
index bbee663c955..9f3b416d0f6 100755..100644
--- a/src/server/game/Entities/Corpse/Corpse.cpp
+++ b/src/server/game/Entities/Corpse/Corpse.cpp
@@ -103,25 +103,26 @@ void Corpse::SaveToDB()
SQLTransaction trans = CharacterDatabase.BeginTransaction();
DeleteFromDB(trans);
+ uint16 index = 0;
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CORPSE);
- stmt->setUInt32(0, GetGUIDLow()); // corpseGuid
- stmt->setUInt32(1, GUID_LOPART(GetOwnerGUID())); // guid
- stmt->setFloat (2, GetPositionX()); // posX
- stmt->setFloat (3, GetPositionY()); // posY
- stmt->setFloat (4, GetPositionZ()); // posZ
- stmt->setFloat (5, GetOrientation()); // orientation
- stmt->setUInt16(6, GetMapId()); // mapId
- stmt->setUInt32(7, GetUInt32Value(CORPSE_FIELD_DISPLAY_ID)); // displayId
- stmt->setString(8, _ConcatFields(CORPSE_FIELD_ITEM, EQUIPMENT_SLOT_END)); // itemCache
- stmt->setUInt32(9, GetUInt32Value(CORPSE_FIELD_BYTES_1)); // bytes1
- stmt->setUInt32(10, GetUInt32Value(CORPSE_FIELD_BYTES_2)); // bytes2
- stmt->setUInt32(11, GetUInt32Value(CORPSE_FIELD_GUILD)); // guildId
- stmt->setUInt8 (12, GetUInt32Value(CORPSE_FIELD_FLAGS)); // flags
- stmt->setUInt8 (13, GetUInt32Value(CORPSE_FIELD_DYNAMIC_FLAGS)); // dynFlags
- stmt->setUInt32(14, uint32(m_time)); // time
- stmt->setUInt8 (15, GetType()); // corpseType
- stmt->setUInt32(16, GetInstanceId()); // instanceId
- stmt->setUInt16(17, GetPhaseMask()); // phaseMask
+ stmt->setUInt32(index++, GetGUIDLow()); // corpseGuid
+ stmt->setUInt32(index++, GUID_LOPART(GetOwnerGUID())); // guid
+ stmt->setFloat (index++, GetPositionX()); // posX
+ stmt->setFloat (index++, GetPositionY()); // posY
+ stmt->setFloat (index++, GetPositionZ()); // posZ
+ stmt->setFloat (index++, GetOrientation()); // orientation
+ stmt->setUInt16(index++, GetMapId()); // mapId
+ stmt->setUInt32(index++, GetUInt32Value(CORPSE_FIELD_DISPLAY_ID)); // displayId
+ stmt->setString(index++, _ConcatFields(CORPSE_FIELD_ITEM, EQUIPMENT_SLOT_END)); // itemCache
+ stmt->setUInt32(index++, GetUInt32Value(CORPSE_FIELD_BYTES_1)); // bytes1
+ stmt->setUInt32(index++, GetUInt32Value(CORPSE_FIELD_BYTES_2)); // bytes2
+ stmt->setUInt32(index++, GetUInt32Value(CORPSE_FIELD_GUILD)); // guildId
+ stmt->setUInt8 (index++, GetUInt32Value(CORPSE_FIELD_FLAGS)); // flags
+ stmt->setUInt8 (index++, GetUInt32Value(CORPSE_FIELD_DYNAMIC_FLAGS)); // dynFlags
+ stmt->setUInt32(index++, uint32(m_time)); // time
+ stmt->setUInt8 (index++, GetType()); // corpseType
+ stmt->setUInt32(index++, GetInstanceId()); // instanceId
+ stmt->setUInt16(index++, GetPhaseMask()); // phaseMask
trans->Append(stmt);
CharacterDatabase.CommitTransaction(trans);
@@ -161,9 +162,10 @@ void Corpse::DeleteFromDB(SQLTransaction& trans)
bool Corpse::LoadCorpseFromDB(uint32 guid, Field* fields)
{
- uint32 ownerGuid = fields[17].GetUInt32();
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// SELECT posX, posY, posZ, orientation, mapId, displayId, itemCache, bytes1, bytes2, guildId, flags, dynFlags, time, corpseType, instanceId, phaseMask, corpseGuid, guid FROM corpse WHERE corpseType <> 0
+
+ uint32 ownerGuid = fields[17].GetUInt32();
float posX = fields[0].GetFloat();
float posY = fields[1].GetFloat();
float posZ = fields[2].GetFloat();
diff --git a/src/server/game/Entities/Corpse/Corpse.h b/src/server/game/Entities/Corpse/Corpse.h
index afac900df32..afac900df32 100755..100644
--- a/src/server/game/Entities/Corpse/Corpse.h
+++ b/src/server/game/Entities/Corpse/Corpse.h
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 911ccd25728..8d39e459187 100755..100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -411,6 +411,16 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData* data)
SetPvP(false);
}
+ // updates spell bars for vehicles and set player's faction - should be called here, to overwrite faction that is set from the new template
+ if (IsVehicle())
+ {
+ if (Player* owner = Creature::GetCharmerOrOwnerPlayerOrPlayerItself()) // this check comes in case we don't have a player
+ {
+ setFaction(owner->getFaction()); // vehicles should have same as owner faction
+ owner->VehicleSpellInitialize();
+ }
+ }
+
// trigger creature is always not selectable and can not be attacked
if (isTrigger())
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
@@ -2515,3 +2525,69 @@ bool Creature::SetHover(bool enable)
SendMessageToSet(&data, false);
return true;
}
+
+float Creature::GetAggroRange(Unit const* target) const
+{
+ // Determines the aggro range for creatures (usually pets), used mainly for aggressive pet target selection.
+ // Based on data from wowwiki due to lack of 3.3.5a data
+
+ if (target && this->isPet())
+ {
+ uint32 targetLevel = 0;
+
+ if (target->GetTypeId() == TYPEID_PLAYER)
+ targetLevel = target->getLevelForTarget(this);
+ else if (target->GetTypeId() == TYPEID_UNIT)
+ targetLevel = target->ToCreature()->getLevelForTarget(this);
+
+ uint32 myLevel = getLevelForTarget(target);
+ int32 levelDiff = int32(targetLevel) - int32(myLevel);
+
+ // The maximum Aggro Radius is capped at 45 yards (25 level difference)
+ if (levelDiff < -25)
+ levelDiff = -25;
+
+ // The base aggro radius for mob of same level
+ float aggroRadius = 20;
+
+ // Aggro Radius varies with level difference at a rate of roughly 1 yard/level
+ aggroRadius -= (float)levelDiff;
+
+ // detect range auras
+ aggroRadius += GetTotalAuraModifier(SPELL_AURA_MOD_DETECT_RANGE);
+
+ // detected range auras
+ aggroRadius += target->GetTotalAuraModifier(SPELL_AURA_MOD_DETECTED_RANGE);
+
+ // Just in case, we don't want pets running all over the map
+ if (aggroRadius > MAX_AGGRO_RADIUS)
+ aggroRadius = MAX_AGGRO_RADIUS;
+
+ // Minimum Aggro Radius for a mob seems to be combat range (5 yards)
+ // hunter pets seem to ignore minimum aggro radius so we'll default it a little higher
+ if (aggroRadius < 10)
+ aggroRadius = 10;
+
+ return (aggroRadius);
+ }
+
+ // Default
+ return 0.0f;
+}
+
+Unit* Creature::SelectNearestHostileUnitInAggroRange(bool useLOS) const
+{
+ // Selects nearest hostile target within creature's aggro range. Used primarily by
+ // pets set to aggressive. Will not return neutral or friendly targets.
+
+ Unit* target = NULL;
+
+ {
+ Trinity::NearestHostileUnitInAggroRangeCheck u_check(this, useLOS);
+ Trinity::UnitSearcher<Trinity::NearestHostileUnitInAggroRangeCheck> searcher(this, target, u_check);
+
+ VisitNearbyGridObject(MAX_AGGRO_RADIUS, searcher);
+ }
+
+ return target;
+}
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index 228485d001e..8a697dd0ef0 100755..100644
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -323,7 +323,7 @@ struct VendorItem
: item(_item), maxcount(_maxcount), incrtime(_incrtime), ExtendedCost(_ExtendedCost) {}
uint32 item;
- uint32 maxcount; // 0 for infinity item amount
+ uint32 maxcount; // 0 for infinity item amount
uint32 incrtime; // time for restore items amount if maxcount != 0
uint32 ExtendedCost;
@@ -621,12 +621,14 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature
bool canStartAttack(Unit const* u, bool force) const;
float GetAttackDistance(Unit const* player) const;
+ float GetAggroRange(Unit const* target) const;
void SendAIReaction(AiReaction reactionType);
Unit* SelectNearestTarget(float dist = 0) const;
Unit* SelectNearestTargetInAttackDistance(float dist = 0) const;
Player* SelectNearestPlayer(float distance = 0) const;
+ Unit* SelectNearestHostileUnitInAggroRange(bool useLOS = false) const;
void DoFleeToGetAssistance();
void CallForHelp(float fRadius);
@@ -682,8 +684,8 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature
void SetHomePosition(float x, float y, float z, float o) { m_homePosition.Relocate(x, y, z, o); }
void SetHomePosition(const Position &pos) { m_homePosition.Relocate(pos); }
- void GetHomePosition(float &x, float &y, float &z, float &ori) { m_homePosition.GetPosition(x, y, z, ori); }
- Position GetHomePosition() { return m_homePosition; }
+ void GetHomePosition(float &x, float &y, float &z, float &ori) const { m_homePosition.GetPosition(x, y, z, ori); }
+ Position GetHomePosition() const { return m_homePosition; }
void SetTransportHomePosition(float x, float y, float z, float o) { m_transportHomePosition.Relocate(x, y, z, o); }
void SetTransportHomePosition(const Position &pos) { m_transportHomePosition.Relocate(pos); }
diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp
index c9d1944af09..c9d1944af09 100755..100644
--- a/src/server/game/Entities/Creature/CreatureGroups.cpp
+++ b/src/server/game/Entities/Creature/CreatureGroups.cpp
diff --git a/src/server/game/Entities/Creature/CreatureGroups.h b/src/server/game/Entities/Creature/CreatureGroups.h
index e5b8771ee40..e5b8771ee40 100755..100644
--- a/src/server/game/Entities/Creature/CreatureGroups.h
+++ b/src/server/game/Entities/Creature/CreatureGroups.h
diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp
index 17a8711379a..17a8711379a 100755..100644
--- a/src/server/game/Entities/Creature/GossipDef.cpp
+++ b/src/server/game/Entities/Creature/GossipDef.cpp
diff --git a/src/server/game/Entities/Creature/GossipDef.h b/src/server/game/Entities/Creature/GossipDef.h
index 15766bbcd59..15766bbcd59 100755..100644
--- a/src/server/game/Entities/Creature/GossipDef.h
+++ b/src/server/game/Entities/Creature/GossipDef.h
diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp
index a6b51a4d395..a6b51a4d395 100755..100644
--- a/src/server/game/Entities/Creature/TemporarySummon.cpp
+++ b/src/server/game/Entities/Creature/TemporarySummon.cpp
diff --git a/src/server/game/Entities/Creature/TemporarySummon.h b/src/server/game/Entities/Creature/TemporarySummon.h
index ba7faf60ddf..b60197ff613 100755..100644
--- a/src/server/game/Entities/Creature/TemporarySummon.h
+++ b/src/server/game/Entities/Creature/TemporarySummon.h
@@ -34,7 +34,7 @@ class TempSummon : public Creature
void SetTempSummonType(TempSummonType type);
void SaveToDB(uint32 /*mapid*/, uint8 /*spawnMask*/, uint32 /*phaseMask*/) {}
Unit* GetSummoner() const;
- uint64 GetSummonerGUID() { return m_summonerGUID; }
+ uint64 GetSummonerGUID() const { return m_summonerGUID; }
TempSummonType const& GetSummonType() { return m_type; }
uint32 GetTimer() { return m_timer; }
diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.cpp b/src/server/game/Entities/DynamicObject/DynamicObject.cpp
index cd4a9443867..cd4a9443867 100755..100644
--- a/src/server/game/Entities/DynamicObject/DynamicObject.cpp
+++ b/src/server/game/Entities/DynamicObject/DynamicObject.cpp
diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.h b/src/server/game/Entities/DynamicObject/DynamicObject.h
index 68da99ac668..68da99ac668 100755..100644
--- a/src/server/game/Entities/DynamicObject/DynamicObject.h
+++ b/src/server/game/Entities/DynamicObject/DynamicObject.h
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 214df2672cb..f72e36e2d30 100755..100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -118,7 +118,7 @@ void GameObject::RemoveFromOwner()
else if (IS_PET_GUID(ownerGUID))
ownerType = "pet";
- sLog->outFatal(LOG_FILTER_GENERAL, "Delete GameObject (GUID: %u Entry: %u SpellId %u LinkedGO %u) that lost references to owner (GUID %u Type '%s') GO list. Crash possible later.",
+ sLog->outFatal(LOG_FILTER_GENERAL, "Removed GameObject (GUID: %u Entry: %u SpellId: %u LinkedGO: %u) that just lost any reference to the owner (GUID: %u Type: '%s') GO list",
GetGUIDLow(), GetGOInfo()->entry, m_spellId, GetGOInfo()->GetLinkedGameObjectEntry(), GUID_LOPART(ownerGUID), ownerType);
SetOwnerGUID(0);
}
@@ -1698,7 +1698,7 @@ void GameObject::CastSpell(Unit* target, uint32 spellId)
{
trigger->setFaction(owner->getFaction());
// needed for GO casts for proper target validation checks
- trigger->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, owner->GetGUID());
+ trigger->SetOwnerGUID(owner->GetGUID());
trigger->CastSpell(target ? target : trigger, spellInfo, true, 0, 0, owner->GetGUID());
}
else
diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h
index 32d73579f51..32d73579f51 100755..100644
--- a/src/server/game/Entities/GameObject/GameObject.h
+++ b/src/server/game/Entities/GameObject/GameObject.h
diff --git a/src/server/game/Entities/Item/Container/Bag.cpp b/src/server/game/Entities/Item/Container/Bag.cpp
index 73b38c1da83..73b38c1da83 100755..100644
--- a/src/server/game/Entities/Item/Container/Bag.cpp
+++ b/src/server/game/Entities/Item/Container/Bag.cpp
diff --git a/src/server/game/Entities/Item/Container/Bag.h b/src/server/game/Entities/Item/Container/Bag.h
index 5a533d9cf57..5a533d9cf57 100755..100644
--- a/src/server/game/Entities/Item/Container/Bag.h
+++ b/src/server/game/Entities/Item/Container/Bag.h
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index a1ff6cf2ce8..5303fb8dc38 100755..100644
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -378,6 +378,10 @@ void Item::SaveToDB(SQLTransaction& trans)
if (!isInTransaction)
CharacterDatabase.CommitTransaction(trans);
+ // Delete the items if this is a container
+ if (!loot.isLooted())
+ ItemContainerDeleteLootMoneyAndLootItemsFromDB();
+
delete this;
return;
}
@@ -483,6 +487,10 @@ void Item::DeleteFromDB(SQLTransaction& trans, uint32 itemGuid)
void Item::DeleteFromDB(SQLTransaction& trans)
{
DeleteFromDB(trans, GetGUIDLow());
+
+ // Delete the items if this is a container
+ if (!loot.isLooted())
+ ItemContainerDeleteLootMoneyAndLootItemsFromDB();
}
/*static*/
@@ -1045,7 +1053,7 @@ Item* Item::CloneItem(uint32 count, Player const* player) const
newItem->SetUInt32Value(ITEM_FIELD_CREATOR, GetUInt32Value(ITEM_FIELD_CREATOR));
newItem->SetUInt32Value(ITEM_FIELD_GIFTCREATOR, GetUInt32Value(ITEM_FIELD_GIFTCREATOR));
- newItem->SetUInt32Value(ITEM_FIELD_FLAGS, GetUInt32Value(ITEM_FIELD_FLAGS));
+ newItem->SetUInt32Value(ITEM_FIELD_FLAGS, GetUInt32Value(ITEM_FIELD_FLAGS) & ~(ITEM_FLAG_REFUNDABLE | ITEM_FLAG_BOP_TRADEABLE));
newItem->SetUInt32Value(ITEM_FIELD_DURATION, GetUInt32Value(ITEM_FIELD_DURATION));
// player CAN be NULL in which case we must not update random properties because that accesses player's item update queue
if (player)
@@ -1198,3 +1206,191 @@ bool Item::CheckSoulboundTradeExpire()
return false;
}
+
+void Item::ItemContainerSaveLootToDB()
+{
+ // Saves the money and item loot associated with an openable item to the DB
+
+ if (loot.isLooted()) // no money and no loot
+ return;
+
+ uint32 container_id = GetGUIDLow();
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+
+ loot.containerID = container_id; // Save this for when a LootItem is removed
+
+ // Save money
+ if (loot.gold > 0)
+ {
+ PreparedStatement* stmt_money = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEMCONTAINER_MONEY);
+ stmt_money->setUInt32(0, container_id);
+ trans->Append(stmt_money);
+
+ stmt_money = CharacterDatabase.GetPreparedStatement(CHAR_INS_ITEMCONTAINER_MONEY);
+ stmt_money->setUInt32(0, container_id);
+ stmt_money->setUInt32(1, loot.gold);
+ trans->Append(stmt_money);
+ }
+
+ // Save items
+ if (!loot.isLooted())
+ {
+
+ PreparedStatement* stmt_items = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEMCONTAINER_ITEMS);
+ stmt_items->setUInt32(0, container_id);
+ trans->Append(stmt_items);
+
+ // Now insert the items
+ for (LootItemList::const_iterator _li = loot.items.begin(); _li != loot.items.end(); _li++)
+ {
+ // When an item is looted, it doesn't get removed from the items collection
+ // but we don't want to resave it.
+ if (!_li->canSave)
+ continue;
+
+ stmt_items = CharacterDatabase.GetPreparedStatement(CHAR_INS_ITEMCONTAINER_ITEMS);
+
+ // container_id, item_id, item_count, follow_rules, ffa, blocked, counted, under_threshold, needs_quest, rnd_prop, rnd_suffix
+ stmt_items->setUInt32(0, container_id);
+ stmt_items->setUInt32(1, _li->itemid);
+ stmt_items->setUInt32(2, _li->count);
+ stmt_items->setBool(3, _li->follow_loot_rules);
+ stmt_items->setBool(4, _li->freeforall);
+ stmt_items->setBool(5, _li->is_blocked);
+ stmt_items->setBool(6, _li->is_counted);
+ stmt_items->setBool(7, _li->is_underthreshold);
+ stmt_items->setBool(8, _li->needs_quest);
+ stmt_items->setUInt32(9, _li->randomPropertyId);
+ stmt_items->setUInt32(10, _li->randomSuffix);
+ trans->Append(stmt_items);
+ }
+ }
+
+ CharacterDatabase.CommitTransaction(trans);
+}
+
+bool Item::ItemContainerLoadLootFromDB()
+{
+ // Loads the money and item loot associated with an openable item from the DB
+
+ // Default. If there are no records for this item then it will be rolled for in Player::SendLoot()
+ m_lootGenerated = false;
+
+ uint32 container_id = GetGUIDLow();
+
+ // Save this for later use
+ loot.containerID = container_id;
+
+ // First, see if there was any money loot. This gets added directly to the container.
+ PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ITEMCONTAINER_MONEY);
+ stmt->setUInt32(0, container_id);
+ PreparedQueryResult money_result = CharacterDatabase.Query(stmt);
+
+ if (money_result)
+ {
+ Field* fields = money_result->Fetch();
+ loot.gold = fields[0].GetUInt32();
+ }
+
+ // Next, load any items that were saved
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ITEMCONTAINER_ITEMS);
+ stmt->setUInt32(0, container_id);
+ PreparedQueryResult item_result = CharacterDatabase.Query(stmt);
+
+ if (item_result)
+ {
+ // Get a LootTemplate for the container item. This is where
+ // the saved loot was originally rolled from, we will copy conditions from it
+ LootTemplate const* lt = LootTemplates_Item.GetLootFor(GetEntry());
+
+ if (lt)
+ {
+ do
+ {
+ // Create an empty LootItem
+ LootItem loot_item = LootItem();
+
+ // Fill in the rest of the LootItem from the DB
+ Field* fields = item_result->Fetch();
+
+ // item_id, itm_count, follow_rules, ffa, blocked, counted, under_threshold, needs_quest, rnd_prop, rnd_suffix
+ loot_item.itemid = fields[0].GetUInt32();
+ loot_item.count = fields[1].GetUInt32();
+ loot_item.follow_loot_rules = fields[2].GetBool();
+ loot_item.freeforall = fields[3].GetBool();
+ loot_item.is_blocked = fields[4].GetBool();
+ loot_item.is_counted = fields[5].GetBool();
+ loot_item.canSave = true;
+ loot_item.is_underthreshold = fields[6].GetBool();
+ loot_item.needs_quest = fields[7].GetBool();
+ loot_item.randomPropertyId = fields[8].GetUInt32();
+ loot_item.randomSuffix = fields[9].GetUInt32();
+
+ // Copy the extra loot conditions from the item in the loot template
+ lt->CopyConditions(&loot_item);
+
+ // If container item is in a bag, add that player as an allowed looter
+ if (GetBagSlot())
+ loot_item.allowedGUIDs.insert(GetOwner()->GetGUIDLow());
+
+ // Finally add the LootItem to the container
+ loot.items.push_back(loot_item);
+
+ // Increment unlooted count
+ loot.unlootedCount++;
+
+ } while (item_result->NextRow());
+ }
+ }
+
+ // Mark the item if it has loot so it won't be generated again on open
+ m_lootGenerated = !loot.isLooted();
+
+ return m_lootGenerated;
+}
+
+void Item::ItemContainerDeleteLootItemsFromDB()
+{
+ // Deletes items associated with an openable item from the DB
+
+ uint32 containerId = GetGUIDLow();
+ PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEMCONTAINER_ITEMS);
+ stmt->setUInt32(0, containerId);
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ trans->Append(stmt);
+ CharacterDatabase.CommitTransaction(trans);
+}
+
+void Item::ItemContainerDeleteLootItemFromDB(uint32 itemID)
+{
+ // Deletes a single item associated with an openable item from the DB
+
+ uint32 containerId = GetGUIDLow();
+ PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEMCONTAINER_ITEM);
+ stmt->setUInt32(0, containerId);
+ stmt->setUInt32(1, itemID);
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ trans->Append(stmt);
+ CharacterDatabase.CommitTransaction(trans);
+}
+
+void Item::ItemContainerDeleteLootMoneyFromDB()
+{
+ // Deletes the money loot associated with an openable item from the DB
+
+ uint32 containerId = GetGUIDLow();
+ PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEMCONTAINER_MONEY);
+ stmt->setUInt32(0, containerId);
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ trans->Append(stmt);
+ CharacterDatabase.CommitTransaction(trans);
+}
+
+void Item::ItemContainerDeleteLootMoneyAndLootItemsFromDB()
+{
+ // Deletes money and items associated with an openable item from the DB
+
+ ItemContainerDeleteLootMoneyFromDB();
+ ItemContainerDeleteLootItemsFromDB();
+}
+
diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h
index a5f9ed5c008..2e1956250f3 100755..100644
--- a/src/server/game/Entities/Item/Item.h
+++ b/src/server/game/Entities/Item/Item.h
@@ -231,6 +231,15 @@ class Item : public Object
static void DeleteFromDB(SQLTransaction& trans, uint32 itemGuid);
virtual void DeleteFromDB(SQLTransaction& trans);
static void DeleteFromInventoryDB(SQLTransaction& trans, uint32 itemGuid);
+
+ // Lootable items and their contents
+ void ItemContainerSaveLootToDB();
+ bool ItemContainerLoadLootFromDB();
+ void ItemContainerDeleteLootItemsFromDB();
+ void ItemContainerDeleteLootItemFromDB(uint32 itemID);
+ void ItemContainerDeleteLootMoneyFromDB();
+ void ItemContainerDeleteLootMoneyAndLootItemsFromDB();
+
void DeleteFromInventoryDB(SQLTransaction& trans);
void SaveRefundDataToDB();
void DeleteRefundDataFromDB(SQLTransaction* trans);
diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
index cfb8c880479..cfb8c880479 100755..100644
--- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
+++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.h b/src/server/game/Entities/Item/ItemEnchantmentMgr.h
index fe4dca40d24..fe4dca40d24 100755..100644
--- a/src/server/game/Entities/Item/ItemEnchantmentMgr.h
+++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.h
diff --git a/src/server/game/Entities/Item/ItemPrototype.h b/src/server/game/Entities/Item/ItemPrototype.h
index f2f41d6a8b9..f2f41d6a8b9 100755..100644
--- a/src/server/game/Entities/Item/ItemPrototype.h
+++ b/src/server/game/Entities/Item/ItemPrototype.h
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index ca32fd377e9..6f16618491e 100755..100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -2336,12 +2336,7 @@ void WorldObject::SetZoneScript()
if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(GetZoneId()))
m_zoneScript = bf;
else
- {
- if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(GetZoneId()))
- m_zoneScript = bf;
- else
- m_zoneScript = sOutdoorPvPMgr->GetZoneScript(GetZoneId());
- }
+ m_zoneScript = sOutdoorPvPMgr->GetZoneScript(GetZoneId());
}
}
}
diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h
index 0bb4214de32..0bb4214de32 100755..100644
--- a/src/server/game/Entities/Object/Object.h
+++ b/src/server/game/Entities/Object/Object.h
diff --git a/src/server/game/Entities/Object/ObjectDefines.h b/src/server/game/Entities/Object/ObjectDefines.h
index 03fa44da08a..03fa44da08a 100755..100644
--- a/src/server/game/Entities/Object/ObjectDefines.h
+++ b/src/server/game/Entities/Object/ObjectDefines.h
diff --git a/src/server/game/Entities/Object/ObjectPosSelector.cpp b/src/server/game/Entities/Object/ObjectPosSelector.cpp
index f5c36f5a3c9..f5c36f5a3c9 100755..100644
--- a/src/server/game/Entities/Object/ObjectPosSelector.cpp
+++ b/src/server/game/Entities/Object/ObjectPosSelector.cpp
diff --git a/src/server/game/Entities/Object/ObjectPosSelector.h b/src/server/game/Entities/Object/ObjectPosSelector.h
index b30694672df..b30694672df 100755..100644
--- a/src/server/game/Entities/Object/ObjectPosSelector.h
+++ b/src/server/game/Entities/Object/ObjectPosSelector.h
diff --git a/src/server/game/Entities/Object/Updates/UpdateData.cpp b/src/server/game/Entities/Object/Updates/UpdateData.cpp
index 45464f19083..45464f19083 100755..100644
--- a/src/server/game/Entities/Object/Updates/UpdateData.cpp
+++ b/src/server/game/Entities/Object/Updates/UpdateData.cpp
diff --git a/src/server/game/Entities/Object/Updates/UpdateData.h b/src/server/game/Entities/Object/Updates/UpdateData.h
index ff649b7cb2f..ff649b7cb2f 100755..100644
--- a/src/server/game/Entities/Object/Updates/UpdateData.h
+++ b/src/server/game/Entities/Object/Updates/UpdateData.h
diff --git a/src/server/game/Entities/Object/Updates/UpdateFields.h b/src/server/game/Entities/Object/Updates/UpdateFields.h
index 7e4aa9aaab8..7e4aa9aaab8 100755..100644
--- a/src/server/game/Entities/Object/Updates/UpdateFields.h
+++ b/src/server/game/Entities/Object/Updates/UpdateFields.h
diff --git a/src/server/game/Entities/Object/Updates/UpdateMask.h b/src/server/game/Entities/Object/Updates/UpdateMask.h
index ad70936b81d..ad70936b81d 100755..100644
--- a/src/server/game/Entities/Object/Updates/UpdateMask.h
+++ b/src/server/game/Entities/Object/Updates/UpdateMask.h
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index b6417681f4a..a6130f03c6e 100755..100644
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -74,6 +74,7 @@ void Pet::AddToWorld()
if (GetCharmInfo() && GetCharmInfo()->HasCommandState(COMMAND_FOLLOW))
{
GetCharmInfo()->SetIsCommandAttack(false);
+ GetCharmInfo()->SetIsCommandFollow(false);
GetCharmInfo()->SetIsAtStay(false);
GetCharmInfo()->SetIsFollowing(false);
GetCharmInfo()->SetIsReturning(false);
@@ -267,7 +268,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
{
SQLTransaction trans = CharacterDatabase.BeginTransaction();
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UDP_CHAR_PET_SLOT_BY_SLOT_EXCLUDE_ID);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_UDP_CHAR_PET_SLOT_BY_SLOT_EXCLUDE_ID);
stmt->setUInt8(0, uint8(PET_SAVE_NOT_IN_SLOT));
stmt->setUInt32(1, ownerid);
stmt->setUInt8(2, uint8(PET_SAVE_AS_CURRENT));
@@ -332,7 +333,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
if (getPetType() == HUNTER_PET)
{
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PET_DECLINED_NAME);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PET_DECLINED_NAME);
stmt->setUInt32(0, owner->GetGUIDLow());
stmt->setUInt32(1, GetCharmInfo()->GetPetNumber());
PreparedQueryResult result = CharacterDatabase.Query(stmt);
@@ -428,7 +429,7 @@ void Pet::SavePetToDB(PetSaveMode mode)
// prevent existence another hunter pet in PET_SAVE_AS_CURRENT and PET_SAVE_NOT_IN_SLOT
if (getPetType() == HUNTER_PET && (mode == PET_SAVE_AS_CURRENT || mode > PET_SAVE_LAST_STABLE_SLOT))
{
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_PET_BY_SLOT);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_PET_BY_SLOT);
stmt->setUInt32(0, ownerLowGUID);
stmt->setUInt8(1, uint8(PET_SAVE_AS_CURRENT));
stmt->setUInt8(2, uint8(PET_SAVE_LAST_STABLE_SLOT));
@@ -1349,7 +1350,7 @@ void Pet::_SaveAuras(SQLTransaction& trans)
uint8 index = 0;
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_PET_AURA);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_PET_AURA);
stmt->setUInt32(index++, m_charmInfo->GetPetNumber());
stmt->setUInt64(index++, casterGUID);
stmt->setUInt32(index++, itr->second->GetId());
diff --git a/src/server/game/Entities/Pet/Pet.h b/src/server/game/Entities/Pet/Pet.h
index a1dd57a26cc..a1dd57a26cc 100755..100644
--- a/src/server/game/Entities/Pet/Pet.h
+++ b/src/server/game/Entities/Pet/Pet.h
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index dd9907d8c07..af7692b87c5 100755..100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -207,12 +207,12 @@ void PlayerTaxi::AppendTaximaskTo(ByteBuffer& data, bool all)
{
if (all)
{
- for (uint8 i=0; i<TaxiMaskSize; i++)
+ for (uint8 i = 0; i < TaxiMaskSize; ++i)
data << uint32(sTaxiNodesMask[i]); // all existed nodes
}
else
{
- for (uint8 i=0; i<TaxiMaskSize; i++)
+ for (uint8 i = 0; i < TaxiMaskSize; ++i)
data << uint32(m_taximask[i]); // known nodes
}
}
@@ -221,9 +221,9 @@ bool PlayerTaxi::LoadTaxiDestinationsFromString(const std::string& values, uint3
{
ClearTaxiDestinations();
- Tokenizer tokens(values, ' ');
+ Tokenizer Tokenizer(values, ' ');
- for (Tokenizer::const_iterator iter = tokens.begin(); iter != tokens.end(); ++iter)
+ for (Tokenizer::const_iterator iter = Tokenizer.begin(); iter != Tokenizer.end(); ++iter)
{
uint32 node = uint32(atol(*iter));
AddTaxiDestination(node);
@@ -728,7 +728,7 @@ Player::Player(WorldSession* session): Unit(true)
m_DailyQuestChanged = false;
m_lastDailyQuestTime = 0;
- for (uint8 i=0; i<MAX_TIMERS; i++)
+ for (uint8 i=0; i < MAX_TIMERS; i++)
m_MirrorTimer[i] = DISABLED_MIRROR_TIMER;
m_MirrorTimerFlags = UNDERWATER_NONE;
@@ -743,7 +743,7 @@ Player::Player(WorldSession* session): Unit(true)
for (uint8 j = 0; j < PLAYER_MAX_BATTLEGROUND_QUEUES; ++j)
{
- m_bgBattlegroundQueueID[j].bgQueueTypeId = BATTLEGROUND_QUEUE_NONE;
+ m_bgBattlegroundQueueID[j].bgQueueTypeId = BATTLEGROUND_QUEUE_NONE;
m_bgBattlegroundQueueID[j].invitedToInstance = 0;
}
@@ -990,8 +990,7 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo)
SetFloatValue(UNIT_MOD_CAST_SPEED, 1.0f); // fix cast time showed in spell tooltip on client
SetFloatValue(UNIT_FIELD_HOVERHEIGHT, 1.0f); // default for players in 3.0.3
- // -1 is default value
- SetInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, uint32(-1));
+ SetInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, uint32(-1)); // -1 is default value
SetUInt32Value(PLAYER_BYTES, (createInfo->Skin | (createInfo->Face << 8) | (createInfo->HairStyle << 16) | (createInfo->HairColor << 24)));
SetUInt32Value(PLAYER_BYTES_2, (createInfo->FacialHair |
@@ -4751,7 +4750,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
// We can return mail now
// So firstly delete the old one
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_MAIL_BY_ID);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_MAIL_BY_ID);
stmt->setUInt32(0, mail_id);
trans->Append(stmt);
@@ -4760,7 +4759,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
{
if (has_items)
{
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_MAIL_ITEM_BY_ID);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_MAIL_ITEM_BY_ID);
stmt->setUInt32(0, mail_id);
trans->Append(stmt);
}
@@ -4774,7 +4773,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
if (has_items)
{
// Data needs to be at first place for Item::LoadFromDB
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAILITEMS);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAILITEMS);
stmt->setUInt32(0, mail_id);
PreparedQueryResult resultItems = CharacterDatabase.Query(stmt);
if (resultItems)
@@ -4989,7 +4988,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
// The character gets unlinked from the account, the name gets freed up and appears as deleted ingame
case CHAR_DELETE_UNLINK:
{
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_DELETE_INFO);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_DELETE_INFO);
stmt->setUInt32(0, guid);
@@ -5726,7 +5725,7 @@ void Player::HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, floa
float Player::GetBaseModValue(BaseModGroup modGroup, BaseModType modType) const
{
- if (modGroup >= BASEMOD_END || modType > MOD_END)
+ if (modGroup >= BASEMOD_END || modType >= MOD_END)
{
sLog->outError(LOG_FILTER_SPELLS_AURAS, "trial to access non existed BaseModGroup or wrong BaseModType!");
return 0.0f;
@@ -6924,37 +6923,83 @@ ReputationRank Player::GetReputationRank(uint32 faction) const
return GetReputationMgr().GetRank(factionEntry);
}
-//Calculate total reputation percent player gain with quest/creature level
-int32 Player::CalculateReputationGain(uint32 creatureOrQuestLevel, int32 rep, int32 faction, bool for_quest, bool noQuestBonus)
+// Calculate total reputation percent player gain with quest/creature level
+int32 Player::CalculateReputationGain(ReputationSource source, uint32 creatureOrQuestLevel, int32 rep, int32 faction, bool noQuestBonus)
{
float percent = 100.0f;
- // Get the generic rate first
- if (RepRewardRate const* repData = sObjectMgr->GetRepRewardRate(faction))
+ float repMod = noQuestBonus ? 0.0f : float(GetTotalAuraModifier(SPELL_AURA_MOD_REPUTATION_GAIN));
+
+ // faction specific auras only seem to apply to kills
+ if (source == REPUTATION_SOURCE_KILL)
+ repMod += GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_FACTION_REPUTATION_GAIN, faction);
+
+ percent += rep > 0 ? repMod : -repMod;
+
+ float rate;
+ switch (source)
{
- float repRate = for_quest ? repData->quest_rate : repData->creature_rate;
- percent *= repRate;
+ case REPUTATION_SOURCE_KILL:
+ rate = sWorld->getRate(RATE_REPUTATION_LOWLEVEL_KILL);
+ break;
+ case REPUTATION_SOURCE_QUEST:
+ case REPUTATION_SOURCE_DAILY_QUEST:
+ case REPUTATION_SOURCE_WEEKLY_QUEST:
+ case REPUTATION_SOURCE_MONTHLY_QUEST:
+ rate = sWorld->getRate(RATE_REPUTATION_LOWLEVEL_QUEST);
+ break;
+ case REPUTATION_SOURCE_SPELL:
+ default:
+ rate = 1.0f;
+ break;
}
- float rate = for_quest ? sWorld->getRate(RATE_REPUTATION_LOWLEVEL_QUEST) : sWorld->getRate(RATE_REPUTATION_LOWLEVEL_KILL);
-
if (rate != 1.0f && creatureOrQuestLevel <= Trinity::XP::GetGrayLevel(getLevel()))
percent *= rate;
- float repMod = noQuestBonus ? 0.0f : (float)GetTotalAuraModifier(SPELL_AURA_MOD_REPUTATION_GAIN);
+ if (percent <= 0.0f)
+ return 0;
- if (!for_quest)
- repMod += GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_FACTION_REPUTATION_GAIN, faction);
+ // Multiply result with the faction specific rate
+ if (RepRewardRate const* repData = sObjectMgr->GetRepRewardRate(faction))
+ {
+ float repRate = 0.0f;
+ switch (source)
+ {
+ case REPUTATION_SOURCE_KILL:
+ repRate = repData->creatureRate;
+ break;
+ case REPUTATION_SOURCE_QUEST:
+ repRate = repData->questRate;
+ break;
+ case REPUTATION_SOURCE_DAILY_QUEST:
+ repRate = repData->questDailyRate;
+ break;
+ case REPUTATION_SOURCE_WEEKLY_QUEST:
+ repRate = repData->questWeeklyRate;
+ break;
+ case REPUTATION_SOURCE_MONTHLY_QUEST:
+ repRate = repData->questMonthlyRate;
+ break;
+ case REPUTATION_SOURCE_SPELL:
+ repRate = repData->spellRate;
+ break;
+ }
- percent += rep > 0 ? repMod : -repMod;
+ // for custom, a rate of 0.0 will totally disable reputation gain for this faction/type
+ if (repRate <= 0.0f)
+ return 0;
- if (percent <= 0.0f)
- return 0;
+ percent *= repRate;
+ }
+
+ if (source != REPUTATION_SOURCE_SPELL && GetsRecruitAFriendBonus(false))
+ percent *= 1.0f + sWorld->getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS);
- return int32(rep*percent/100);
+ return CalculatePct(rep, percent);
}
-//Calculates how many reputation points player gains in victim's enemy factions
+// Calculates how many reputation points player gains in victim's enemy factions
void Player::RewardReputation(Unit* victim, float rate)
{
if (!victim || victim->GetTypeId() == TYPEID_PLAYER)
@@ -6964,7 +7009,6 @@ void Player::RewardReputation(Unit* victim, float rate)
return;
ReputationOnKillEntry const* Rep = sObjectMgr->GetReputationOnKilEntry(victim->ToCreature()->GetCreatureTemplate()->Entry);
-
if (!Rep)
return;
@@ -6975,41 +7019,20 @@ void Player::RewardReputation(Unit* victim, float rate)
// support for: Championing - http://www.wowwiki.com/Championing
Map const* map = GetMap();
- if (map && map->IsDungeon())
+ if (map && map->IsNonRaidDungeon())
{
- InstanceTemplate const* instance = sObjectMgr->GetInstanceTemplate(map->GetId());
- if (instance)
- {
- AccessRequirement const* pAccessRequirement = sObjectMgr->GetAccessRequirement(map->GetId(), ((InstanceMap*)map)->GetDifficulty());
- if (pAccessRequirement)
- {
- if (!map->IsRaid() && pAccessRequirement->levelMin == 80)
- ChampioningFaction = GetChampioningFaction();
- }
- }
+ if (AccessRequirement const* accessRequirement = sObjectMgr->GetAccessRequirement(map->GetId(), map->GetDifficulty()))
+ if (accessRequirement->levelMin == 80)
+ ChampioningFaction = GetChampioningFaction();
}
}
- // Favored reputation increase START
- uint32 zone = GetZoneId();
uint32 team = GetTeam();
- float favored_rep_mult = 0;
-
- if ((HasAura(32096) || HasAura(32098)) && (zone == 3483 || zone == 3562 || zone == 3836 || zone == 3713 || zone == 3714)) favored_rep_mult = 0.25; // Thrallmar's Favor and Honor Hold's Favor
- else if (HasAura(30754) && (Rep->RepFaction1 == 609 || Rep->RepFaction2 == 609) && !ChampioningFaction) favored_rep_mult = 0.25; // Cenarion Favor
-
- if (favored_rep_mult > 0) favored_rep_mult *= 2; // Multiplied by 2 because the reputation is divided by 2 for some reason (See "donerep1 / 2" and "donerep2 / 2") -- if you know why this is done, please update/explain :)
- // Favored reputation increase END
-
- bool recruitAFriend = GetsRecruitAFriendBonus(false);
if (Rep->RepFaction1 && (!Rep->TeamDependent || team == ALLIANCE))
{
- int32 donerep1 = CalculateReputationGain(victim->getLevel(), Rep->RepValue1, ChampioningFaction ? ChampioningFaction : Rep->RepFaction1, false);
- donerep1 = int32(donerep1*(rate + favored_rep_mult));
-
- if (recruitAFriend)
- donerep1 = int32(donerep1 * (1 + sWorld->getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS)));
+ int32 donerep1 = CalculateReputationGain(REPUTATION_SOURCE_KILL, victim->getLevel(), Rep->RepValue1, ChampioningFaction ? ChampioningFaction : Rep->RepFaction1);
+ donerep1 = int32(donerep1 * rate);
FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->RepFaction1);
uint32 current_reputation_rank1 = GetReputationMgr().GetRank(factionEntry1);
@@ -7019,11 +7042,8 @@ void Player::RewardReputation(Unit* victim, float rate)
if (Rep->RepFaction2 && (!Rep->TeamDependent || team == HORDE))
{
- int32 donerep2 = CalculateReputationGain(victim->getLevel(), Rep->RepValue2, ChampioningFaction ? ChampioningFaction : Rep->RepFaction2, false);
- donerep2 = int32(donerep2*(rate + favored_rep_mult));
-
- if (recruitAFriend)
- donerep2 = int32(donerep2 * (1 + sWorld->getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS)));
+ int32 donerep2 = CalculateReputationGain(REPUTATION_SOURCE_KILL, victim->getLevel(), Rep->RepValue2, ChampioningFaction ? ChampioningFaction : Rep->RepFaction2);
+ donerep2 = int32(donerep2 * rate);
FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->RepFaction2);
uint32 current_reputation_rank2 = GetReputationMgr().GetRank(factionEntry2);
@@ -7032,47 +7052,46 @@ void Player::RewardReputation(Unit* victim, float rate)
}
}
-//Calculate how many reputation points player gain with the quest
+// Calculate how many reputation points player gain with the quest
void Player::RewardReputation(Quest const* quest)
{
- bool recruitAFriend = GetsRecruitAFriendBonus(false);
-
- // quest reputation reward/loss
for (uint8 i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
{
if (!quest->RewardFactionId[i])
continue;
- if (quest->RewardFactionValueIdOverride[i])
- {
- int32 rep = CalculateReputationGain(GetQuestLevel(quest), quest->RewardFactionValueIdOverride[i]/100, quest->RewardFactionId[i], true, true);
- if (recruitAFriend)
- rep = int32(rep * (1 + sWorld->getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS)));
+ int32 rep = 0;
+ bool noQuestBonus = false;
- if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(quest->RewardFactionId[i]))
- GetReputationMgr().ModifyReputation(factionEntry, rep);
+ if (quest->RewardFactionValueIdOverride[i])
+ {
+ rep = quest->RewardFactionValueIdOverride[i] / 100;
+ noQuestBonus = true;
}
else
{
uint32 row = ((quest->RewardFactionValueId[i] < 0) ? 1 : 0) + 1;
- uint32 field = abs(quest->RewardFactionValueId[i]);
-
- if (const QuestFactionRewEntry* pRow = sQuestFactionRewardStore.LookupEntry(row))
+ if (QuestFactionRewEntry const* questFactionRewEntry = sQuestFactionRewardStore.LookupEntry(row))
{
- int32 repPoints = pRow->QuestRewFactionValue[field];
-
- if (!repPoints)
- continue;
+ uint32 field = abs(quest->RewardFactionValueId[i]);
+ rep = questFactionRewEntry->QuestRewFactionValue[field];
+ }
+ }
- repPoints = CalculateReputationGain(GetQuestLevel(quest), repPoints, quest->RewardFactionId[i], true);
+ if (!rep)
+ continue;
- if (recruitAFriend)
- repPoints = int32(repPoints * (1 + sWorld->getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS)));
+ if (quest->IsDaily())
+ rep = CalculateReputationGain(REPUTATION_SOURCE_DAILY_QUEST, GetQuestLevel(quest), rep, quest->RewardFactionId[i], noQuestBonus);
+ else if (quest->IsWeekly())
+ rep = CalculateReputationGain(REPUTATION_SOURCE_WEEKLY_QUEST, GetQuestLevel(quest), rep, quest->RewardFactionId[i], noQuestBonus);
+ else if (quest->IsMonthly())
+ rep = CalculateReputationGain(REPUTATION_SOURCE_MONTHLY_QUEST, GetQuestLevel(quest), rep, quest->RewardFactionId[i], noQuestBonus);
+ else
+ rep = CalculateReputationGain(REPUTATION_SOURCE_QUEST, GetQuestLevel(quest), rep, quest->RewardFactionId[i], noQuestBonus);
- if (const FactionEntry* factionEntry = sFactionStore.LookupEntry(quest->RewardFactionId[i]))
- GetReputationMgr().ModifyReputation(factionEntry, repPoints);
- }
- }
+ if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(quest->RewardFactionId[i]))
+ GetReputationMgr().ModifyReputation(factionEntry, rep);
}
}
@@ -7373,7 +7392,7 @@ uint32 Player::GetZoneIdFromDB(uint64 guid)
if (!zone)
{
// stored zone is zero, use generic and slow zone detection
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_POSITION_XYZ);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_POSITION_XYZ);
stmt->setUInt32(0, guidLow);
PreparedQueryResult result = CharacterDatabase.Query(stmt);
@@ -7389,7 +7408,7 @@ uint32 Player::GetZoneIdFromDB(uint64 guid)
if (zone > 0)
{
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ZONE);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ZONE);
stmt->setUInt16(0, uint16(zone));
stmt->setUInt32(1, guidLow);
@@ -8336,25 +8355,11 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32
if (spellData.SpellPPMRate)
{
- if (spellData.SpellId == 52781) // Persuasive Strike
- {
- switch (target->GetEntry())
- {
- default:
- return;
- case 28939:
- case 28940:
- case 28610:
- break;
- }
- }
uint32 WeaponSpeed = GetAttackTime(attType);
chance = GetPPMProcChance(WeaponSpeed, spellData.SpellPPMRate, spellInfo);
}
else if (chance > 100.0f)
- {
chance = GetWeaponProcChance();
- }
if (roll_chance_f(chance))
CastSpell(target, spellInfo->Id, true, item);
@@ -8845,7 +8850,9 @@ void Player::SendLoot(uint64 guid, LootType loot_type)
loot = &item->loot;
- if (!item->m_lootGenerated)
+ // If item doesn't already have loot, attempt to load it. If that
+ // fails then this is first time opening, generate loot
+ if (!item->m_lootGenerated && !item->ItemContainerLoadLootFromDB())
{
item->m_lootGenerated = true;
loot->clear();
@@ -8864,6 +8871,12 @@ void Player::SendLoot(uint64 guid, LootType loot_type)
default:
loot->generateMoneyLoot(item->GetTemplate()->MinMoneyLoot, item->GetTemplate()->MaxMoneyLoot);
loot->FillLoot(item->GetEntry(), LootTemplates_Item, this, true, loot->gold != 0);
+
+ // Force save the loot and money items that were just rolled
+ // Also saves the container item ID in Loot struct (not to DB)
+ if (loot->gold > 0 || loot->unlootedCount > 0)
+ item->ItemContainerSaveLootToDB();
+
break;
}
}
@@ -9625,8 +9638,8 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
instance->FillInitialWorldStates(data);
else
{
- data << uint32(4132) << uint32(0); // 9 WORLDSTATE_SHOW_CRATES
- data << uint32(4131) << uint32(0); // 10 WORLDSTATE_CRATES_REVEALED
+ data << uint32(4132) << uint32(0); // 9 WORLDSTATE_ALGALON_TIMER_ENABLED
+ data << uint32(4131) << uint32(0); // 10 WORLDSTATE_ALGALON_DESPAWN_TIMER
}
break;
// Wintergrasp
@@ -9768,11 +9781,10 @@ void Player::SetSheath(SheathState sheathed)
SetVirtualItemSlot(2, NULL);
break;
case SHEATH_STATE_MELEE: // prepared melee weapon
- {
SetVirtualItemSlot(0, GetWeaponForAttack(BASE_ATTACK, true));
SetVirtualItemSlot(1, GetWeaponForAttack(OFF_ATTACK, true));
SetVirtualItemSlot(2, NULL);
- }; break;
+ break;
case SHEATH_STATE_RANGED: // prepared ranged weapon
SetVirtualItemSlot(0, NULL);
SetVirtualItemSlot(1, NULL);
@@ -11910,7 +11922,7 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje
Map const* map = lootedObject->GetMap();
if (uint32 dungeonId = sLFGMgr->GetDungeon(GetGroup()->GetGUID(), true))
if (LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(dungeonId))
- if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == uint32(map->GetDifficulty()))
+ if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == map->GetDifficulty())
lootedObjectInDungeon = true;
if (!lootedObjectInDungeon)
@@ -12308,12 +12320,12 @@ Item* Player::EquipItem(uint16 pos, Item* pItem, bool update)
switch (slot)
{
- case EQUIPMENT_SLOT_MAINHAND:
- case EQUIPMENT_SLOT_OFFHAND:
- case EQUIPMENT_SLOT_RANGED:
- RecalculateRating(CR_ARMOR_PENETRATION);
- default:
- break;
+ case EQUIPMENT_SLOT_MAINHAND:
+ case EQUIPMENT_SLOT_OFFHAND:
+ case EQUIPMENT_SLOT_RANGED:
+ RecalculateRating(CR_ARMOR_PENETRATION);
+ default:
+ break;
}
}
else
@@ -12530,10 +12542,10 @@ void Player::MoveItemToInventory(ItemPosCountVec const& dest, Item* pItem, bool
// if this original item then it need create record in inventory
// in case trade we already have item in other player inventory
pLastItem->SetState(in_characterInventoryDB ? ITEM_CHANGED : ITEM_NEW, this);
- }
- if (pLastItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_BOP_TRADEABLE))
- AddTradeableItem(pLastItem);
+ if (pLastItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_BOP_TRADEABLE))
+ AddTradeableItem(pLastItem);
+ }
}
void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
@@ -12617,6 +12629,12 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
else if (Bag* pBag = GetBagByPos(bag))
pBag->RemoveItem(slot, update);
+ // Delete rolled money / loot from db.
+ // MUST be done before RemoveFromWorld() or GetTemplate() fails
+ if (ItemTemplate const* pTmp = pItem->GetTemplate())
+ if (pTmp->Flags & ITEM_PROTO_FLAG_OPENABLE)
+ pItem->ItemContainerDeleteLootMoneyAndLootItemsFromDB();
+
if (IsInWorld() && update)
{
pItem->RemoveFromWorld();
@@ -12630,22 +12648,22 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
}
}
-void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequip_check)
+void Player::DestroyItemCount(uint32 itemEntry, uint32 count, bool update, bool unequip_check)
{
- sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: DestroyItemCount item = %u, count = %u", item, count);
+ sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: DestroyItemCount item = %u, count = %u", itemEntry, count);
uint32 remcount = 0;
// in inventory
for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; ++i)
{
- if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
+ if (Item* item = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
{
- if (pItem->GetEntry() == item && !pItem->IsInTrade())
+ if (item->GetEntry() == itemEntry && !item->IsInTrade())
{
- if (pItem->GetCount() + remcount <= count)
+ if (item->GetCount() + remcount <= count)
{
// all items in inventory can unequipped
- remcount += pItem->GetCount();
+ remcount += item->GetCount();
DestroyItem(INVENTORY_SLOT_BAG_0, i, update);
if (remcount >= count)
@@ -12653,11 +12671,11 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
}
else
{
- ItemRemovedQuestCheck(pItem->GetEntry(), count - remcount);
- pItem->SetCount(pItem->GetCount() - count + remcount);
+ ItemRemovedQuestCheck(item->GetEntry(), count - remcount);
+ item->SetCount(item->GetCount() - count + remcount);
if (IsInWorld() && update)
- pItem->SendUpdateToPlayer(this);
- pItem->SetState(ITEM_CHANGED, this);
+ item->SendUpdateToPlayer(this);
+ item->SetState(ITEM_CHANGED, this);
return;
}
}
@@ -12666,14 +12684,14 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
for (uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
{
- if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
+ if (Item* item = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
{
- if (pItem->GetEntry() == item && !pItem->IsInTrade())
+ if (item->GetEntry() == itemEntry && !item->IsInTrade())
{
- if (pItem->GetCount() + remcount <= count)
+ if (item->GetCount() + remcount <= count)
{
// all keys can be unequipped
- remcount += pItem->GetCount();
+ remcount += item->GetCount();
DestroyItem(INVENTORY_SLOT_BAG_0, i, update);
if (remcount >= count)
@@ -12681,11 +12699,11 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
}
else
{
- ItemRemovedQuestCheck(pItem->GetEntry(), count - remcount);
- pItem->SetCount(pItem->GetCount() - count + remcount);
+ ItemRemovedQuestCheck(item->GetEntry(), count - remcount);
+ item->SetCount(item->GetCount() - count + remcount);
if (IsInWorld() && update)
- pItem->SendUpdateToPlayer(this);
- pItem->SetState(ITEM_CHANGED, this);
+ item->SendUpdateToPlayer(this);
+ item->SetState(ITEM_CHANGED, this);
return;
}
}
@@ -12695,18 +12713,18 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
// in inventory bags
for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
{
- if (Bag* pBag = GetBagByPos(i))
+ if (Bag* bag = GetBagByPos(i))
{
- for (uint32 j = 0; j < pBag->GetBagSize(); j++)
+ for (uint32 j = 0; j < bag->GetBagSize(); j++)
{
- if (Item* pItem = pBag->GetItemByPos(j))
+ if (Item* item = bag->GetItemByPos(j))
{
- if (pItem->GetEntry() == item && !pItem->IsInTrade())
+ if (item->GetEntry() == itemEntry && !item->IsInTrade())
{
// all items in bags can be unequipped
- if (pItem->GetCount() + remcount <= count)
+ if (item->GetCount() + remcount <= count)
{
- remcount += pItem->GetCount();
+ remcount += item->GetCount();
DestroyItem(i, j, update);
if (remcount >= count)
@@ -12714,11 +12732,11 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
}
else
{
- ItemRemovedQuestCheck(pItem->GetEntry(), count - remcount);
- pItem->SetCount(pItem->GetCount() - count + remcount);
+ ItemRemovedQuestCheck(item->GetEntry(), count - remcount);
+ item->SetCount(item->GetCount() - count + remcount);
if (IsInWorld() && update)
- pItem->SendUpdateToPlayer(this);
- pItem->SetState(ITEM_CHANGED, this);
+ item->SendUpdateToPlayer(this);
+ item->SetState(ITEM_CHANGED, this);
return;
}
}
@@ -12730,15 +12748,15 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
// in equipment and bag list
for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_BAG_END; i++)
{
- if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
+ if (Item* item = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
{
- if (pItem && pItem->GetEntry() == item && !pItem->IsInTrade())
+ if (item && item->GetEntry() == itemEntry && !item->IsInTrade())
{
- if (pItem->GetCount() + remcount <= count)
+ if (item->GetCount() + remcount <= count)
{
if (!unequip_check || CanUnequipItem(INVENTORY_SLOT_BAG_0 << 8 | i, false) == EQUIP_ERR_OK)
{
- remcount += pItem->GetCount();
+ remcount += item->GetCount();
DestroyItem(INVENTORY_SLOT_BAG_0, i, update);
if (remcount >= count)
@@ -12747,16 +12765,78 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
}
else
{
- ItemRemovedQuestCheck(pItem->GetEntry(), count - remcount);
- pItem->SetCount(pItem->GetCount() - count + remcount);
+ ItemRemovedQuestCheck(item->GetEntry(), count - remcount);
+ item->SetCount(item->GetCount() - count + remcount);
+ if (IsInWorld() && update)
+ item->SendUpdateToPlayer(this);
+ item->SetState(ITEM_CHANGED, this);
+ return;
+ }
+ }
+ }
+ }
+
+ // in bank
+ for (uint8 i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; i++)
+ {
+ if (Item* item = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
+ {
+ if (item->GetEntry() == itemEntry && !item->IsInTrade())
+ {
+ if (item->GetCount() + remcount <= count)
+ {
+ remcount += item->GetCount();
+ DestroyItem(INVENTORY_SLOT_BAG_0, i, update);
+ if (remcount >= count)
+ return;
+ }
+ else
+ {
+ ItemRemovedQuestCheck(item->GetEntry(), count - remcount);
+ item->SetCount(item->GetCount() - count + remcount);
if (IsInWorld() && update)
- pItem->SendUpdateToPlayer(this);
- pItem->SetState(ITEM_CHANGED, this);
+ item->SendUpdateToPlayer(this);
+ item->SetState(ITEM_CHANGED, this);
return;
}
}
}
}
+
+ // in bank bags
+ for (uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
+ {
+ if (Bag* bag = GetBagByPos(i))
+ {
+ for (uint32 j = 0; j < bag->GetBagSize(); j++)
+ {
+ if (Item* item = bag->GetItemByPos(j))
+ {
+ if (item->GetEntry() == itemEntry && !item->IsInTrade())
+ {
+ // all items in bags can be unequipped
+ if (item->GetCount() + remcount <= count)
+ {
+ remcount += item->GetCount();
+ DestroyItem(i, j, update);
+
+ if (remcount >= count)
+ return;
+ }
+ else
+ {
+ ItemRemovedQuestCheck(item->GetEntry(), count - remcount);
+ item->SetCount(item->GetCount() - count + remcount);
+ if (IsInWorld() && update)
+ item->SendUpdateToPlayer(this);
+ item->SetState(ITEM_CHANGED, this);
+ return;
+ }
+ }
+ }
+ }
+ }
+ }
}
void Player::DestroyZoneLimitedItem(bool update, uint32 new_zone)
@@ -14706,11 +14786,11 @@ Quest const* Player::GetNextQuest(uint64 guid, Quest const* quest)
bool Player::CanSeeStartQuest(Quest const* quest)
{
- if (SatisfyQuestClass(quest, false) && SatisfyQuestRace(quest, false) && SatisfyQuestSkill(quest, false) &&
- SatisfyQuestExclusiveGroup(quest, false) && SatisfyQuestReputation(quest, false) &&
+ if (!DisableMgr::IsDisabledFor(DISABLE_TYPE_QUEST, quest->GetQuestId(), this) && SatisfyQuestClass(quest, false) && SatisfyQuestRace(quest, false) &&
+ SatisfyQuestSkill(quest, false) && SatisfyQuestExclusiveGroup(quest, false) && SatisfyQuestReputation(quest, false) &&
SatisfyQuestPreviousQuest(quest, false) && SatisfyQuestNextChain(quest, false) &&
SatisfyQuestPrevChain(quest, false) && SatisfyQuestDay(quest, false) && SatisfyQuestWeek(quest, false) &&
- SatisfyQuestSeasonal(quest, false) && !DisableMgr::IsDisabledFor(DISABLE_TYPE_QUEST, quest->GetQuestId(), this))
+ SatisfyQuestMonth(quest, false) && SatisfyQuestSeasonal(quest, false))
{
return getLevel() + sWorld->getIntConfig(CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF) >= quest->GetMinLevel();
}
@@ -14727,7 +14807,7 @@ bool Player::CanTakeQuest(Quest const* quest, bool msg)
&& SatisfyQuestPreviousQuest(quest, msg) && SatisfyQuestTimed(quest, msg)
&& SatisfyQuestNextChain(quest, msg) && SatisfyQuestPrevChain(quest, msg)
&& SatisfyQuestDay(quest, msg) && SatisfyQuestWeek(quest, msg)
- && SatisfyQuestSeasonal(quest,msg)
+ && SatisfyQuestMonth(quest, msg) && SatisfyQuestSeasonal(quest, msg)
&& SatisfyQuestConditions(quest, msg);
}
@@ -14851,7 +14931,7 @@ bool Player::CanRewardQuest(Quest const* quest, bool msg)
return false;
// daily quest can't be rewarded (25 daily quest already completed)
- if (!SatisfyQuestDay(quest, true) || !SatisfyQuestWeek(quest, true) || !SatisfyQuestSeasonal(quest,true))
+ if (!SatisfyQuestDay(quest, true) || !SatisfyQuestWeek(quest, true) || !SatisfyQuestMonth(quest, true) || !SatisfyQuestSeasonal(quest, true))
return false;
// rewarded and not repeatable quest (only cheating case, then ignore without message)
@@ -14984,10 +15064,6 @@ void Player::AddQuest(Quest const* quest, Object* questGiver)
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_QUEST, quest_id);
- //starting initial quest script
- if (questGiver && quest->GetQuestStartScript() != 0)
- GetMap()->ScriptsStart(sQuestStartScripts, quest->GetQuestStartScript(), questGiver, this);
-
UpdateForQuestWorldObjects();
}
@@ -15149,6 +15225,8 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
}
else if (quest->IsWeekly())
SetWeeklyQuestStatus(quest_id);
+ else if (quest->IsMonthly())
+ SetMonthlyQuestStatus(quest_id);
else if (quest->IsSeasonal())
SetSeasonalQuestStatus(quest_id);
@@ -15602,6 +15680,15 @@ bool Player::SatisfyQuestSeasonal(Quest const* qInfo, bool /*msg*/)
return m_seasonalquests[eventId].find(qInfo->GetQuestId()) == m_seasonalquests[eventId].end();
}
+bool Player::SatisfyQuestMonth(Quest const* qInfo, bool /*msg*/)
+{
+ if (!qInfo->IsMonthly() || m_monthlyquests.empty())
+ return true;
+
+ // if not found in cooldown list
+ return m_monthlyquests.find(qInfo->GetQuestId()) == m_monthlyquests.end();
+}
+
bool Player::GiveQuestSourceItem(Quest const* quest)
{
uint32 srcitem = quest->GetSrcItemId();
@@ -16612,13 +16699,11 @@ bool Player::LoadPositionFromDB(uint32& mapid, float& x, float& y, float& z, flo
return true;
}
-void Player::SetHomebind(WorldLocation const& /*loc*/, uint32 /*area_id*/)
+void Player::SetHomebind(WorldLocation const& loc, uint32 areaId)
{
- m_homebindMapId = GetMapId();
- m_homebindAreaId = GetAreaId();
- m_homebindX = GetPositionX();
- m_homebindY = GetPositionY();
- m_homebindZ = GetPositionZ();
+ loc.GetPosition(m_homebindX, m_homebindY, m_homebindZ);
+ m_homebindMapId = loc.GetMapId();
+ m_homebindAreaId = areaId;
// update sql homebind
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_PLAYER_HOMEBIND);
@@ -16665,8 +16750,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
//"arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk, "
// 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
//"health, power1, power2, power3, power4, power5, power6, power7, instance_id, speccount, activespec, exploredZones, equipmentCache, ammoId, knownTitles, actionBars, grantableLevels FROM characters WHERE guid = '%u'", guid);
- PreparedQueryResult result = holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADFROM);
-
+ PreparedQueryResult result = holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_FROM);
if (!result)
{
sLog->outError(LOG_FILTER_PLAYER, "Player (GUID: %u) not found in table `characters`, can't load. ", guid);
@@ -16685,7 +16769,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
return false;
}
- if (holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADBANNED))
+ if (holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_BANNED))
{
sLog->outError(LOG_FILTER_PLAYER, "Player (GUID: %u) is banned, can't load.", guid);
return false;
@@ -16700,12 +16784,9 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
(AccountMgr::IsPlayerAccount(GetSession()->GetSecurity()) && sObjectMgr->IsReservedName(m_name)))
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
-
stmt->setUInt16(0, uint16(AT_LOGIN_RENAME));
stmt->setUInt32(1, guid);
-
CharacterDatabase.Execute(stmt);
-
return false;
}
@@ -16737,7 +16818,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
SetFloatValue(UNIT_FIELD_HOVERHEIGHT, 1.0f);
// load achievements before anything else to prevent multiple gains for the same achievement/criteria on every loading (as loading does call UpdateAchievementCriteria)
- m_achievementMgr->LoadFromDB(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADACHIEVEMENTS), holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADCRITERIAPROGRESS));
+ m_achievementMgr->LoadFromDB(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_ACHIEVEMENTS), holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_CRITERIA_PROGRESS));
uint32 money = fields[8].GetUInt32();
if (money > MAX_MONEY_AMOUNT)
@@ -16778,7 +16859,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
setFactionForRace(getRace());
// load home bind and check in same time class/race pair, it used later for restore broken positions
- if (!_LoadHomeBind(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADHOMEBIND)))
+ if (!_LoadHomeBind(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_HOME_BIND)))
return false;
InitPrimaryProfessions(); // to max set before any spell loaded
@@ -16802,9 +16883,9 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
#define RelocateToHomebind(){ mapId = m_homebindMapId; instanceId = 0; Relocate(m_homebindX, m_homebindY, m_homebindZ); }
- _LoadGroup(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADGROUP));
+ _LoadGroup(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_GROUP));
- _LoadArenaTeamInfo(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADARENAINFO));
+ _LoadArenaTeamInfo(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_ARENA_INFO));
SetArenaPoints(fields[39].GetUInt32());
@@ -16831,9 +16912,9 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
SetUInt16Value(PLAYER_FIELD_KILLS, 0, fields[44].GetUInt16());
SetUInt16Value(PLAYER_FIELD_KILLS, 1, fields[45].GetUInt16());
- _LoadBoundInstances(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADBOUNDINSTANCES));
- _LoadInstanceTimeRestrictions(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADINSTANCELOCKTIMES));
- _LoadBGData(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADBGDATA));
+ _LoadBoundInstances(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_BOUND_INSTANCES));
+ _LoadInstanceTimeRestrictions(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_INSTANCE_LOCK_TIMES));
+ _LoadBGData(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_BG_DATA));
GetSession()->SetPlayer(this);
MapEntry const* mapEntry = sMapStore.LookupEntry(mapId);
@@ -16875,7 +16956,9 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
const WorldLocation& _loc = GetBattlegroundEntryPoint();
mapId = _loc.GetMapId(); instanceId = 0;
- if (mapId == MAPID_INVALID) // Battleground Entry Point not found (???)
+ // Db field type is type int16, so it can never be MAPID_INVALID
+ //if (mapId == MAPID_INVALID) -- code kept for reference
+ if (int16(mapId) == int16(-1)) // Battleground Entry Point not found (???)
{
sLog->outError(LOG_FILTER_PLAYER, "Player (guidlow %d) was in BG in database, but BG was not found, and entry point was invalid! Teleport to default race/class locations.", guid);
RelocateToHomebind();
@@ -17140,7 +17223,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
}
// load skills after InitStatsForLevel because it triggering aura apply also
- _LoadSkills(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADSKILLS));
+ _LoadSkills(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_SKILLS));
UpdateSkillsForLevel(); //update skills after load, to make sure they are correctly update at player load
// apply original stats mods before spell loading or item equipment that call before equip _RemoveStatsMods()
@@ -17158,42 +17241,43 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
sLog->outError(LOG_FILTER_PLAYER, "Player %s(GUID: %u) has SpecCount = %u and ActiveSpec = %u.", GetName().c_str(), GetGUIDLow(), m_specsCount, m_activeSpec);
}
- _LoadTalents(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADTALENTS));
- _LoadSpells(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADSPELLS));
+ _LoadTalents(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_TALENTS));
+ _LoadSpells(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_SPELLS));
- _LoadGlyphs(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADGLYPHS));
- _LoadAuras(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADAURAS), time_diff);
+ _LoadGlyphs(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_GLYPHS));
+ _LoadAuras(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_AURAS), time_diff);
_LoadGlyphAuras();
// add ghost flag (must be after aura load: PLAYER_FLAGS_GHOST set in aura)
if (HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))
m_deathState = DEAD;
// after spell load, learn rewarded spell if need also
- _LoadQuestStatus(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADQUESTSTATUS));
- _LoadQuestStatusRewarded(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADQUESTSTATUSREW));
- _LoadDailyQuestStatus(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADDAILYQUESTSTATUS));
- _LoadWeeklyQuestStatus(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADWEEKLYQUESTSTATUS));
- _LoadSeasonalQuestStatus(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADSEASONALQUESTSTATUS));
- _LoadRandomBGStatus(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADRANDOMBG));
+ _LoadQuestStatus(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS));
+ _LoadQuestStatusRewarded(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_REW));
+ _LoadDailyQuestStatus(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_DAILY_QUEST_STATUS));
+ _LoadWeeklyQuestStatus(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_WEEKLY_QUEST_STATUS));
+ _LoadSeasonalQuestStatus(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_SEASONAL_QUEST_STATUS));
+ _LoadMonthlyQuestStatus(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_MONTHLY_QUEST_STATUS));
+ _LoadRandomBGStatus(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_RANDOM_BG));
// after spell and quest load
InitTalentForLevel();
learnDefaultSpells();
// must be before inventory (some items required reputation check)
- m_reputationMgr->LoadFromDB(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADREPUTATION));
+ m_reputationMgr->LoadFromDB(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_REPUTATION));
- _LoadInventory(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADINVENTORY), time_diff);
+ _LoadInventory(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_INVENTORY), time_diff);
// update items with duration and realtime
UpdateItemDuration(time_diff, true);
- _LoadActions(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADACTIONS));
+ _LoadActions(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_ACTIONS));
// unread mails and next delivery time, actual mails not loaded
- _LoadMailInit(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADMAILCOUNT), holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADMAILDATE));
+ _LoadMailInit(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_MAIL_COUNT), holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_MAIL_DATE));
- m_social = sSocialMgr->LoadFromDB(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADSOCIALLIST), GetGUIDLow());
+ m_social = sSocialMgr->LoadFromDB(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_SOCIAL_LIST), GetGUIDLow());
// check PLAYER_CHOSEN_TITLE compatibility with PLAYER__FIELD_KNOWN_TITLES
// note: PLAYER__FIELD_KNOWN_TITLES updated at quest status loaded
@@ -17206,7 +17290,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
// has to be called after last Relocate() in Player::LoadFromDB
SetFallInformation(0, GetPositionZ());
- _LoadSpellCooldowns(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADSPELLCOOLDOWNS));
+ _LoadSpellCooldowns(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_SPELL_COOLDOWNS));
// Spell code allow apply any auras to dead character in load time in aura/spell/item loading
// Do now before stats re-calculation cleanup for ghost state unexpected auras
@@ -17287,11 +17371,11 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
if (m_grantableLevels > 0)
SetByteValue(PLAYER_FIELD_BYTES, 1, 0x01);
- _LoadDeclinedNames(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADDECLINEDNAMES));
+ _LoadDeclinedNames(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_DECLINED_NAMES));
m_achievementMgr->CheckAllAchievementCriteria();
- _LoadEquipmentSets(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADEQUIPMENTSETS));
+ _LoadEquipmentSets(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_EQUIPMENT_SETS));
return true;
}
@@ -17662,7 +17746,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F
}
else
{
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ITEM_REFUNDS);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ITEM_REFUNDS);
stmt->setUInt32(0, item->GetGUIDLow());
stmt->setUInt32(1, GetGUIDLow());
if (PreparedQueryResult result = CharacterDatabase.Query(stmt))
@@ -17682,7 +17766,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F
}
else if (item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_BOP_TRADEABLE))
{
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ITEM_BOP_TRADE);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ITEM_BOP_TRADE);
stmt->setUInt32(0, item->GetGUIDLow());
if (PreparedQueryResult result = CharacterDatabase.Query(stmt))
{
@@ -17691,8 +17775,14 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F
AllowedLooterSet looters;
for (Tokenizer::const_iterator itr = GUIDlist.begin(); itr != GUIDlist.end(); ++itr)
looters.insert(atol(*itr));
- item->SetSoulboundTradeable(looters);
- AddTradeableItem(item);
+
+ if (looters.size() > 1 && item->GetTemplate()->GetMaxStackSize() == 1 && item->IsSoulBound())
+ {
+ item->SetSoulboundTradeable(looters);
+ AddTradeableItem(item);
+ }
+ else
+ item->ClearSoulboundTradeable(this);
}
else
{
@@ -18095,6 +18185,29 @@ void Player::_LoadSeasonalQuestStatus(PreparedQueryResult result)
m_SeasonalQuestChanged = false;
}
+void Player::_LoadMonthlyQuestStatus(PreparedQueryResult result)
+{
+ m_monthlyquests.clear();
+
+ if (result)
+ {
+ do
+ {
+ Field* fields = result->Fetch();
+ uint32 quest_id = fields[0].GetUInt32();
+ Quest const* quest = sObjectMgr->GetQuestTemplate(quest_id);
+ if (!quest)
+ continue;
+
+ m_monthlyquests.insert(quest_id);
+ sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Monthly quest {%u} cooldown for player (GUID: %u)", quest_id, GetGUIDLow());
+ }
+ while (result->NextRow());
+ }
+
+ m_MonthlyQuestChanged = false;
+}
+
void Player::_LoadSpells(PreparedQueryResult result)
{
//QueryResult* result = CharacterDatabase.PQuery("SELECT spell, active, disabled FROM character_spell WHERE guid = '%u'", GetGUIDLow());
@@ -18257,11 +18370,12 @@ InstancePlayerBind* Player::BindToInstance(InstanceSave* save, bool permanent, b
if (save)
{
InstancePlayerBind& bind = m_boundInstances[save->GetDifficulty()][save->GetMapId()];
- if (bind.save)
+ if (!load)
{
- // update the save when the group kills a boss
- if (permanent != bind.perm || save != bind.save)
- if (!load)
+ if (bind.save)
+ {
+ // update the save when the group kills a boss
+ if (permanent != bind.perm || save != bind.save)
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_INSTANCE);
@@ -18272,9 +18386,8 @@ InstancePlayerBind* Player::BindToInstance(InstanceSave* save, bool permanent, b
CharacterDatabase.Execute(stmt);
}
- }
- else
- if (!load)
+ }
+ else
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_INSTANCE);
@@ -18284,6 +18397,7 @@ InstancePlayerBind* Player::BindToInstance(InstanceSave* save, bool permanent, b
CharacterDatabase.Execute(stmt);
}
+ }
if (bind.save != save)
{
@@ -18302,8 +18416,8 @@ InstancePlayerBind* Player::BindToInstance(InstanceSave* save, bool permanent, b
sScriptMgr->OnPlayerBindToInstance(this, save->GetDifficulty(), save->GetMapId(), permanent);
return &bind;
}
- else
- return NULL;
+
+ return NULL;
}
void Player::BindToInstance()
@@ -18835,6 +18949,7 @@ void Player::SaveToDB(bool create /*=false*/)
_SaveDailyQuestStatus(trans);
_SaveWeeklyQuestStatus(trans);
_SaveSeasonalQuestStatus(trans);
+ _SaveMonthlyQuestStatus(trans);
_SaveTalents(trans);
_SaveSpells(trans);
_SaveSpellCooldowns(trans);
@@ -18990,7 +19105,7 @@ void Player::_SaveInventory(SQLTransaction& trans)
if (!item || item->GetState() == ITEM_NEW)
continue;
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_INVENTORY_BY_ITEM);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_INVENTORY_BY_ITEM);
stmt->setUInt32(0, item->GetGUIDLow());
trans->Append(stmt);
@@ -19075,7 +19190,6 @@ void Player::_SaveInventory(SQLTransaction& trans)
}
}
- PreparedStatement* stmt = NULL;
switch (item->GetState())
{
case ITEM_NEW:
@@ -19112,7 +19226,7 @@ void Player::_SaveMail(SQLTransaction& trans)
Mail* m = (*itr);
if (m->state == MAIL_STATE_CHANGED)
{
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_MAIL);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_MAIL);
stmt->setUInt8(0, uint8(m->HasItems() ? 1 : 0));
stmt->setUInt32(1, uint32(m->expire_time));
stmt->setUInt32(2, uint32(m->deliver_time));
@@ -19139,7 +19253,6 @@ void Player::_SaveMail(SQLTransaction& trans)
{
if (m->HasItems())
{
- PreparedStatement* stmt = NULL;
for (MailItemInfoVec::iterator itr2 = m->items.begin(); itr2 != m->items.end(); ++itr2)
{
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEM_INSTANCE);
@@ -19337,6 +19450,28 @@ void Player::_SaveSeasonalQuestStatus(SQLTransaction& trans)
m_SeasonalQuestChanged = false;
}
+void Player::_SaveMonthlyQuestStatus(SQLTransaction& trans)
+{
+ if (!m_MonthlyQuestChanged || m_monthlyquests.empty())
+ return;
+
+ // we don't need transactions here.
+ PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_QUEST_STATUS_MONTHLY_CHAR);
+ stmt->setUInt32(0, GetGUIDLow());
+ trans->Append(stmt);
+
+ for (QuestSet::const_iterator iter = m_monthlyquests.begin(); iter != m_monthlyquests.end(); ++iter)
+ {
+ uint32 quest_id = *iter;
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHARACTER_MONTHLYQUESTSTATUS);
+ stmt->setUInt32(0, GetGUIDLow());
+ stmt->setUInt32(1, quest_id);
+ trans->Append(stmt);
+ }
+
+ m_MonthlyQuestChanged = false;
+}
+
void Player::_SaveSkills(SQLTransaction& trans)
{
PreparedStatement* stmt = NULL;
@@ -20472,7 +20607,7 @@ void Player::RemovePetitionsAndSigns(uint64 guid, uint32 type)
if (type == 10)
{
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ALL_PETITION_SIGNATURES);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ALL_PETITION_SIGNATURES);
stmt->setUInt32(0, GUID_LOPART(guid));
@@ -20480,7 +20615,7 @@ void Player::RemovePetitionsAndSigns(uint64 guid, uint32 type)
}
else
{
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_PETITION_SIGNATURE);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_PETITION_SIGNATURE);
stmt->setUInt32(0, GUID_LOPART(guid));
stmt->setUInt8(1, uint8(type));
@@ -20538,7 +20673,7 @@ void Player::LeaveAllArenaTeams(uint64 guid)
while (result->NextRow());
}
-void Player::SetRestBonus (float rest_bonus_new)
+void Player::SetRestBonus(float rest_bonus_new)
{
// Prevent resting on max level
if (getLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
@@ -21009,7 +21144,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32
if (count < 1) count = 1;
// cheating attempt
- if (slot > MAX_BAG_SIZE && slot !=NULL_SLOT)
+ if (slot > MAX_BAG_SIZE && slot != NULL_SLOT)
return false;
if (!isAlive())
@@ -22519,6 +22654,12 @@ void Player::SetSeasonalQuestStatus(uint32 quest_id)
m_SeasonalQuestChanged = true;
}
+void Player::SetMonthlyQuestStatus(uint32 quest_id)
+{
+ m_monthlyquests.insert(quest_id);
+ m_MonthlyQuestChanged = true;
+}
+
void Player::ResetDailyQuestStatus()
{
for (uint32 quest_daily_idx = 0; quest_daily_idx < PLAYER_MAX_DAILY_QUESTS; ++quest_daily_idx)
@@ -22551,6 +22692,16 @@ void Player::ResetSeasonalQuestStatus(uint16 event_id)
m_SeasonalQuestChanged = false;
}
+void Player::ResetMonthlyQuestStatus()
+{
+ if (m_monthlyquests.empty())
+ return;
+
+ m_monthlyquests.clear();
+ // DB data deleted in caller
+ m_MonthlyQuestChanged = false;
+}
+
Battleground* Player::GetBattleground() const
{
if (GetBattlegroundId() == 0)
@@ -23925,6 +24076,11 @@ void Player::StoreLootItem(uint8 lootSlot, Loot* loot)
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM, item->itemid, item->count);
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE, loot->loot_type, item->count);
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_EPIC_ITEM, item->itemid, item->count);
+
+ // LootItem is being removed (looted) from the container, delete it from the DB.
+ if (loot->containerID > 0)
+ loot->DeleteLootItemFromContainerItemDB(item->itemid);
+
}
else
SendEquipError(msg, NULL, NULL, item->itemid);
@@ -25552,14 +25708,6 @@ bool Player::IsInWhisperWhiteList(uint64 guid)
return false;
}
-bool Player::SetHover(bool enable)
-{
- if (!Unit::SetHover(enable))
- return false;
-
- return true;
-}
-
void Player::SendMovementSetCanFly(bool apply)
{
WorldPacket data(apply ? SMSG_MOVE_SET_CAN_FLY : SMSG_MOVE_UNSET_CAN_FLY, 12);
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index 3e4b3e8a971..cc08e9c2e18 100755..100644
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -162,6 +162,16 @@ enum ActionButtonType
ACTION_BUTTON_ITEM = 0x80
};
+enum ReputationSource
+{
+ REPUTATION_SOURCE_KILL,
+ REPUTATION_SOURCE_QUEST,
+ REPUTATION_SOURCE_DAILY_QUEST,
+ REPUTATION_SOURCE_WEEKLY_QUEST,
+ REPUTATION_SOURCE_MONTHLY_QUEST,
+ REPUTATION_SOURCE_SPELL
+};
+
#define ACTION_BUTTON_ACTION(X) (uint32(X) & 0x00FFFFFF)
#define ACTION_BUTTON_TYPE(X) ((uint32(X) & 0xFF000000) >> 24)
#define MAX_ACTION_BUTTON_ACTION_VALUE (0x00FFFFFF+1)
@@ -763,38 +773,39 @@ enum PlayedTimeIndex
// used at player loading query list preparing, and later result selection
enum PlayerLoginQueryIndex
{
- PLAYER_LOGIN_QUERY_LOADFROM = 0,
- PLAYER_LOGIN_QUERY_LOADGROUP = 1,
- PLAYER_LOGIN_QUERY_LOADBOUNDINSTANCES = 2,
- PLAYER_LOGIN_QUERY_LOADAURAS = 3,
- PLAYER_LOGIN_QUERY_LOADSPELLS = 4,
- PLAYER_LOGIN_QUERY_LOADQUESTSTATUS = 5,
- PLAYER_LOGIN_QUERY_LOADDAILYQUESTSTATUS = 6,
- PLAYER_LOGIN_QUERY_LOADREPUTATION = 7,
- PLAYER_LOGIN_QUERY_LOADINVENTORY = 8,
- PLAYER_LOGIN_QUERY_LOADACTIONS = 9,
- PLAYER_LOGIN_QUERY_LOADMAILCOUNT = 10,
- PLAYER_LOGIN_QUERY_LOADMAILDATE = 11,
- PLAYER_LOGIN_QUERY_LOADSOCIALLIST = 12,
- PLAYER_LOGIN_QUERY_LOADHOMEBIND = 13,
- PLAYER_LOGIN_QUERY_LOADSPELLCOOLDOWNS = 14,
- PLAYER_LOGIN_QUERY_LOADDECLINEDNAMES = 15,
- PLAYER_LOGIN_QUERY_LOADGUILD = 16,
- PLAYER_LOGIN_QUERY_LOADARENAINFO = 17,
- PLAYER_LOGIN_QUERY_LOADACHIEVEMENTS = 18,
- PLAYER_LOGIN_QUERY_LOADCRITERIAPROGRESS = 19,
- PLAYER_LOGIN_QUERY_LOADEQUIPMENTSETS = 20,
- PLAYER_LOGIN_QUERY_LOADBGDATA = 21,
- PLAYER_LOGIN_QUERY_LOADGLYPHS = 22,
- PLAYER_LOGIN_QUERY_LOADTALENTS = 23,
- PLAYER_LOGIN_QUERY_LOADACCOUNTDATA = 24,
- PLAYER_LOGIN_QUERY_LOADSKILLS = 25,
- PLAYER_LOGIN_QUERY_LOADWEEKLYQUESTSTATUS = 26,
- PLAYER_LOGIN_QUERY_LOADRANDOMBG = 27,
- PLAYER_LOGIN_QUERY_LOADBANNED = 28,
- PLAYER_LOGIN_QUERY_LOADQUESTSTATUSREW = 29,
- PLAYER_LOGIN_QUERY_LOADINSTANCELOCKTIMES = 30,
- PLAYER_LOGIN_QUERY_LOADSEASONALQUESTSTATUS = 31,
+ PLAYER_LOGIN_QUERY_LOAD_FROM = 0,
+ PLAYER_LOGIN_QUERY_LOAD_GROUP = 1,
+ PLAYER_LOGIN_QUERY_LOAD_BOUND_INSTANCES = 2,
+ PLAYER_LOGIN_QUERY_LOAD_AURAS = 3,
+ PLAYER_LOGIN_QUERY_LOAD_SPELLS = 4,
+ PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS = 5,
+ PLAYER_LOGIN_QUERY_LOAD_DAILY_QUEST_STATUS = 6,
+ PLAYER_LOGIN_QUERY_LOAD_REPUTATION = 7,
+ PLAYER_LOGIN_QUERY_LOAD_INVENTORY = 8,
+ PLAYER_LOGIN_QUERY_LOAD_ACTIONS = 9,
+ PLAYER_LOGIN_QUERY_LOAD_MAIL_COUNT = 10,
+ PLAYER_LOGIN_QUERY_LOAD_MAIL_DATE = 11,
+ PLAYER_LOGIN_QUERY_LOAD_SOCIAL_LIST = 12,
+ PLAYER_LOGIN_QUERY_LOAD_HOME_BIND = 13,
+ PLAYER_LOGIN_QUERY_LOAD_SPELL_COOLDOWNS = 14,
+ PLAYER_LOGIN_QUERY_LOAD_DECLINED_NAMES = 15,
+ PLAYER_LOGIN_QUERY_LOAD_GUILD = 16,
+ PLAYER_LOGIN_QUERY_LOAD_ARENA_INFO = 17,
+ PLAYER_LOGIN_QUERY_LOAD_ACHIEVEMENTS = 18,
+ PLAYER_LOGIN_QUERY_LOAD_CRITERIA_PROGRESS = 19,
+ PLAYER_LOGIN_QUERY_LOAD_EQUIPMENT_SETS = 20,
+ PLAYER_LOGIN_QUERY_LOAD_BG_DATA = 21,
+ PLAYER_LOGIN_QUERY_LOAD_GLYPHS = 22,
+ PLAYER_LOGIN_QUERY_LOAD_TALENTS = 23,
+ PLAYER_LOGIN_QUERY_LOAD_ACCOUNT_DATA = 24,
+ PLAYER_LOGIN_QUERY_LOAD_SKILLS = 25,
+ PLAYER_LOGIN_QUERY_LOAD_WEEKLY_QUEST_STATUS = 26,
+ PLAYER_LOGIN_QUERY_LOAD_RANDOM_BG = 27,
+ PLAYER_LOGIN_QUERY_LOAD_BANNED = 28,
+ PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_REW = 29,
+ PLAYER_LOGIN_QUERY_LOAD_INSTANCE_LOCK_TIMES = 30,
+ PLAYER_LOGIN_QUERY_LOAD_SEASONAL_QUEST_STATUS = 31,
+ PLAYER_LOGIN_QUERY_LOAD_MONTHLY_QUEST_STATUS = 32,
MAX_PLAYER_LOGIN_QUERY
};
@@ -1397,6 +1408,7 @@ class Player : public Unit, public GridObject<Player>
bool SatisfyQuestPrevChain(Quest const* qInfo, bool msg);
bool SatisfyQuestDay(Quest const* qInfo, bool msg);
bool SatisfyQuestWeek(Quest const* qInfo, bool msg);
+ bool SatisfyQuestMonth(Quest const* qInfo, bool msg);
bool SatisfyQuestSeasonal(Quest const* qInfo, bool msg);
bool GiveQuestSourceItem(Quest const* quest);
bool TakeQuestSourceItem(uint32 questId, bool msg);
@@ -1408,9 +1420,11 @@ class Player : public Unit, public GridObject<Player>
void SetDailyQuestStatus(uint32 quest_id);
void SetWeeklyQuestStatus(uint32 quest_id);
+ void SetMonthlyQuestStatus(uint32 quest_id);
void SetSeasonalQuestStatus(uint32 quest_id);
void ResetDailyQuestStatus();
void ResetWeeklyQuestStatus();
+ void ResetMonthlyQuestStatus();
void ResetSeasonalQuestStatus(uint16 event_id);
uint16 FindQuestSlot(uint32 quest_id) const;
@@ -2021,6 +2035,8 @@ class Player : public Unit, public GridObject<Player>
void RewardReputation(Unit* victim, float rate);
void RewardReputation(Quest const* quest);
+ int32 CalculateReputationGain(ReputationSource source, uint32 creatureOrQuestLevel, int32 rep, int32 faction, bool noQuestBonus = false);
+
void UpdateSkillsForLevel();
void UpdateSkillsToMaxSkillsForLevel(); // for .levelup
void ModifySkillBonus(uint32 skillid, int32 val, bool talent);
@@ -2279,8 +2295,6 @@ class Player : public Unit, public GridObject<Player>
m_mover->m_movedPlayer = this;
}
- bool SetHover(bool enable);
-
void SetSeer(WorldObject* target) { m_seer = target; }
void SetViewpoint(WorldObject* target, bool apply);
WorldObject* GetViewpoint() const;
@@ -2298,7 +2312,7 @@ class Player : public Unit, public GridObject<Player>
float m_recallO;
void SaveRecallPosition();
- void SetHomebind(WorldLocation const& loc, uint32 area_id);
+ void SetHomebind(WorldLocation const& loc, uint32 areaId);
// Homebind coordinates
uint32 m_homebindMapId;
@@ -2554,6 +2568,7 @@ class Player : public Unit, public GridObject<Player>
typedef UNORDERED_MAP<uint32,SeasonalQuestSet> SeasonalEventQuestMap;
QuestSet m_timedquests;
QuestSet m_weeklyquests;
+ QuestSet m_monthlyquests;
SeasonalEventQuestMap m_seasonalquests;
uint64 m_divider;
@@ -2575,6 +2590,7 @@ class Player : public Unit, public GridObject<Player>
void _LoadQuestStatusRewarded(PreparedQueryResult result);
void _LoadDailyQuestStatus(PreparedQueryResult result);
void _LoadWeeklyQuestStatus(PreparedQueryResult result);
+ void _LoadMonthlyQuestStatus(PreparedQueryResult result);
void _LoadSeasonalQuestStatus(PreparedQueryResult result);
void _LoadRandomBGStatus(PreparedQueryResult result);
void _LoadGroup(PreparedQueryResult result);
@@ -2601,6 +2617,7 @@ class Player : public Unit, public GridObject<Player>
void _SaveQuestStatus(SQLTransaction& trans);
void _SaveDailyQuestStatus(SQLTransaction& trans);
void _SaveWeeklyQuestStatus(SQLTransaction& trans);
+ void _SaveMonthlyQuestStatus(SQLTransaction& trans);
void _SaveSeasonalQuestStatus(SQLTransaction& trans);
void _SaveSkills(SQLTransaction& trans);
void _SaveSpells(SQLTransaction& trans);
@@ -2710,6 +2727,7 @@ class Player : public Unit, public GridObject<Player>
bool m_DailyQuestChanged;
bool m_WeeklyQuestChanged;
+ bool m_MonthlyQuestChanged;
bool m_SeasonalQuestChanged;
time_t m_lastDailyQuestTime;
@@ -2793,7 +2811,6 @@ class Player : public Unit, public GridObject<Player>
// know currencies are not removed at any point (0 displayed)
void AddKnownCurrency(uint32 itemId);
- int32 CalculateReputationGain(uint32 creatureOrQuestLevel, int32 rep, int32 faction, bool for_quest, bool noQuestBonus = false);
void AdjustQuestReqItemCount(Quest const* quest, QuestStatusData& questStatusData);
bool IsCanDelayTeleport() const { return m_bCanDelayTeleport; }
diff --git a/src/server/game/Entities/Player/SocialMgr.cpp b/src/server/game/Entities/Player/SocialMgr.cpp
index bc16a7f42a2..bc16a7f42a2 100755..100644
--- a/src/server/game/Entities/Player/SocialMgr.cpp
+++ b/src/server/game/Entities/Player/SocialMgr.cpp
diff --git a/src/server/game/Entities/Player/SocialMgr.h b/src/server/game/Entities/Player/SocialMgr.h
index 85daf369f69..85daf369f69 100755..100644
--- a/src/server/game/Entities/Player/SocialMgr.h
+++ b/src/server/game/Entities/Player/SocialMgr.h
diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp
index 4d726181c4f..4d726181c4f 100755..100644
--- a/src/server/game/Entities/Totem/Totem.cpp
+++ b/src/server/game/Entities/Totem/Totem.cpp
diff --git a/src/server/game/Entities/Totem/Totem.h b/src/server/game/Entities/Totem/Totem.h
index 6271253498d..6271253498d 100755..100644
--- a/src/server/game/Entities/Totem/Totem.h
+++ b/src/server/game/Entities/Totem/Totem.h
diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
index 6de359c67dd..6de359c67dd 100755..100644
--- a/src/server/game/Entities/Transport/Transport.cpp
+++ b/src/server/game/Entities/Transport/Transport.cpp
diff --git a/src/server/game/Entities/Transport/Transport.h b/src/server/game/Entities/Transport/Transport.h
index 8fd12b50695..8fd12b50695 100755..100644
--- a/src/server/game/Entities/Transport/Transport.h
+++ b/src/server/game/Entities/Transport/Transport.h
diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp
index 8c0bfb8af23..2a17367e7a8 100755..100644
--- a/src/server/game/Entities/Unit/StatSystem.cpp
+++ b/src/server/game/Entities/Unit/StatSystem.cpp
@@ -78,16 +78,16 @@ bool Player::UpdateStats(Stats stat)
UpdateAllCritPercentages();
UpdateDodgePercentage();
break;
- case STAT_STAMINA: UpdateMaxHealth(); break;
+ case STAT_STAMINA:
+ UpdateMaxHealth();
+ break;
case STAT_INTELLECT:
UpdateMaxPower(POWER_MANA);
UpdateAllSpellCritChances();
UpdateArmor(); //SPELL_AURA_MOD_RESISTANCE_OF_INTELLECT_PERCENT, only armor currently
break;
-
case STAT_SPIRIT:
break;
-
default:
break;
}
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 0b168a1615b..02a0ec7d5b9 100755..100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -551,18 +551,22 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam
if (IsAIEnabled)
GetAI()->DamageDealt(victim, damage, damagetype);
- if (victim->GetTypeId() == TYPEID_PLAYER)
+ if (victim->GetTypeId() == TYPEID_PLAYER && this != victim)
{
- if (victim->ToPlayer()->GetCommandStatus(CHEAT_GOD))
- return 0;
-
// Signal to pets that their owner was attacked
Pet* pet = victim->ToPlayer()->GetPet();
if (pet && pet->isAlive())
- pet->AI()->OwnerDamagedBy(this);
+ pet->AI()->OwnerAttackedBy(this);
+
+ if (victim->ToPlayer()->GetCommandStatus(CHEAT_GOD))
+ return 0;
}
+ // Signal the pet it was attacked so the AI can respond if needed
+ if (victim->GetTypeId() == TYPEID_UNIT && this != victim && victim->isPet() && victim->isAlive())
+ victim->ToPet()->AI()->AttackedBy(this);
+
if (damagetype != NODAMAGE)
{
// interrupting auras with AURA_INTERRUPT_FLAG_DAMAGE before checking !damage (absorbed damage breaks that type of auras)
@@ -1034,6 +1038,9 @@ void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 dama
break;
}
+ // Script Hook For CalculateSpellDamageTaken -- Allow scripts to change the Damage post class mitigation calculations
+ sScriptMgr->ModifySpellDamageTaken(damageInfo->target, damageInfo->attacker, damage);
+
// Calculate absorb resist
if (damage > 0)
{
@@ -1130,6 +1137,9 @@ void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* dam
damage = MeleeDamageBonusDone(damageInfo->target, damage, damageInfo->attackType);
damage = damageInfo->target->MeleeDamageBonusTaken(this, damage, damageInfo->attackType);
+ // Script Hook For CalculateMeleeDamage -- Allow scripts to change the Damage pre class mitigation calculations
+ sScriptMgr->ModifyMeleeDamage(damageInfo->target, damageInfo->attacker, damage);
+
// Calculate armor reduction
if (IsDamageReducedByArmor((SpellSchoolMask)(damageInfo->damageSchoolMask)))
{
@@ -5562,37 +5572,28 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Shadow's Fate (Shadowmourne questline)
case 71169:
{
- target = triggeredByAura->GetCaster();
- if (!target)
- return false;
- Player* player = target->ToPlayer();
- if (!player)
- return false;
- // not checking Infusion auras because its in targetAuraSpell of credit spell
- if (player->GetQuestStatus(24749) == QUEST_STATUS_INCOMPLETE) // Unholy Infusion
- {
- if (GetEntry() != 36678) // Professor Putricide
- return false;
- CastSpell(target, 71518, true); // Quest Credit
- return true;
- }
- else if (player->GetQuestStatus(24756) == QUEST_STATUS_INCOMPLETE) // Blood Infusion
- {
- if (GetEntry() != 37955) // Blood-Queen Lana'thel
- return false;
- CastSpell(target, 72934, true); // Quest Credit
- return true;
- }
- else if (player->GetQuestStatus(24757) == QUEST_STATUS_INCOMPLETE) // Frost Infusion
+ uint32 spellId = 0;
+
+ switch (GetEntry())
{
- if (GetEntry() != 36853) // Sindragosa
- return false;
- CastSpell(target, 72289, true); // Quest Credit
- return true;
+ case 36678: // NPC: Professor Putricide
+ spellId = 71518; // Spell: Unholy Infusion Credit
+ break;
+ case 37955: // NPC: Blood-Queen Lana'thel
+ spellId = 72934; // Spell: Quest Credit
+ break;
+ case 36853: // NPC: Sindragosa <Queen of the Frostbrood>
+ spellId = 72289; // Spell: Frost Infusion Quest Credit
+ break;
+ default:
+ break;
}
- else if (player->GetQuestStatus(24547) == QUEST_STATUS_INCOMPLETE) // A Feast of Souls
- triggered_spell_id = 71203;
- break;
+ if (spellId)
+ CastSpell((Unit*)NULL, spellId, true);
+
+ CastSpell((Unit*)NULL, 71203, true);
+
+ return true;
}
// Essence of the Blood Queen
case 70871:
@@ -6022,9 +6023,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
{
// Replenishment - roll chance
if (roll_chance_i(aurEff->GetAmount()))
- {
CastSpell(this, 57669, true, castItem, triggeredByAura);
- }
}
break;
}
@@ -7545,12 +7544,18 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Unholy Blight
if (dummySpell->Id == 49194)
{
+ triggered_spell_id = 50536;
+ SpellInfo const* unholyBlight = sSpellMgr->GetSpellInfo(triggered_spell_id);
+ if (!unholyBlight)
+ return false;
+
basepoints0 = CalculatePct(int32(damage), triggerAmount);
- // Glyph of Unholy Blight
+
+ //Glyph of Unholy Blight
if (AuraEffect* glyph=GetAuraEffect(63332, 0))
AddPct(basepoints0, glyph->GetAmount());
- triggered_spell_id = 50536;
+ basepoints0 = basepoints0 / (unholyBlight->GetMaxDuration() / unholyBlight->Effects[0].Amplitude);
basepoints0 += victim->GetRemainingPeriodicAmount(GetGUID(), triggered_spell_id, SPELL_AURA_PERIODIC_DAMAGE);
break;
}
@@ -8224,7 +8229,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
case 40336:
{
// On successful melee or ranged attack gain $29471s1 mana and if possible drain $27526s1 mana from the target.
- if (this && isAlive())
+ if (isAlive())
CastSpell(this, 29471, true, castItem, triggeredByAura);
if (victim && victim->isAlive())
CastSpell(victim, 27526, true, castItem, triggeredByAura);
@@ -8235,7 +8240,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
{
// Remove a Evasive Charge
Aura* charge = GetAura(50241);
- if (charge->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL))
+ if (charge && charge->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL))
RemoveAurasDueToSpell(50240);
}
}
@@ -9033,33 +9038,36 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
// Shadow's Fate (Shadowmourne questline)
case 71169:
{
- if (GetTypeId() != TYPEID_PLAYER)
+ // Victim needs more checks so bugs, rats or summons can not be affected by the proc.
+ if (GetTypeId() != TYPEID_PLAYER || victim->GetTypeId() != TYPEID_UNIT || victim->GetCreatureType() == CREATURE_TYPE_CRITTER)
return false;
Player* player = ToPlayer();
- if (player->GetQuestStatus(24749) == QUEST_STATUS_INCOMPLETE) // Unholy Infusion
+ if (player->GetQuestStatus(24547) != QUEST_STATUS_INCOMPLETE)
{
- if (!player->HasAura(71516) || victim->GetEntry() != 36678) // Shadow Infusion && Professor Putricide
- return false;
- }
- else if (player->GetQuestStatus(24756) == QUEST_STATUS_INCOMPLETE) // Blood Infusion
- {
- if (!player->HasAura(72154) || victim->GetEntry() != 37955) // Thirst Quenched && Blood-Queen Lana'thel
- return false;
- }
- else if (player->GetQuestStatus(24757) == QUEST_STATUS_INCOMPLETE) // Frost Infusion
- {
- if (!player->HasAura(72290) || victim->GetEntry() != 36853) // Frost-Imbued Blade && Sindragosa
+ uint32 spellId = 0;
+ uint32 questId = 0;
+ switch (victim->GetEntry())
+ {
+ case 36678: // NPC: Professor Putricide
+ questId = 24749; // Quest: Unholy Infusion
+ spellId = 71516; // Spell: Shadow Infusion
+ break;
+ case 37955: // NPC: Blood-Queen Lana'thel
+ questId = 24756; // Quest: Blood Infusion
+ spellId = 72154; // Spell: Thirst Quenched
+ break;
+ case 36853: // NPC: Sindragosa
+ questId = 24757; // Quest: Frost Infusion
+ spellId = 72290; // Spell: Frost-Imbued Blade
+ break;
+ default:
+ return false;
+ }
+
+ if (player->GetQuestStatus(questId) != QUEST_STATUS_INCOMPLETE || !player->HasAura(spellId))
return false;
}
- else if (player->GetQuestStatus(24547) != QUEST_STATUS_INCOMPLETE) // A Feast of Souls
- return false;
-
- if (victim->GetTypeId() != TYPEID_UNIT)
- return false;
- // critters are not allowed
- if (victim->GetCreatureType() == CREATURE_TYPE_CRITTER)
- return false;
break;
}
}
@@ -13944,17 +13952,17 @@ void Unit::DeleteCharmInfo()
}
CharmInfo::CharmInfo(Unit* unit)
-: m_unit(unit), m_CommandState(COMMAND_FOLLOW), m_petnumber(0), m_barInit(false),
- m_isCommandAttack(false), m_isAtStay(false), m_isFollowing(false), m_isReturning(false),
- m_stayX(0.0f), m_stayY(0.0f), m_stayZ(0.0f)
+: _unit(unit), _CommandState(COMMAND_FOLLOW), _petnumber(0), _barInit(false),
+ _isCommandAttack(false), _isAtStay(false), _isFollowing(false), _isReturning(false),
+ _stayX(0.0f), _stayY(0.0f), _stayZ(0.0f)
{
for (uint8 i = 0; i < MAX_SPELL_CHARM; ++i)
- m_charmspells[i].SetActionAndType(0, ACT_DISABLED);
+ _charmspells[i].SetActionAndType(0, ACT_DISABLED);
- if (m_unit->GetTypeId() == TYPEID_UNIT)
+ if (_unit->GetTypeId() == TYPEID_UNIT)
{
- m_oldReactState = m_unit->ToCreature()->GetReactState();
- m_unit->ToCreature()->SetReactState(REACT_PASSIVE);
+ _oldReactState = _unit->ToCreature()->GetReactState();
+ _unit->ToCreature()->SetReactState(REACT_PASSIVE);
}
}
@@ -13964,9 +13972,9 @@ CharmInfo::~CharmInfo()
void CharmInfo::RestoreState()
{
- if (m_unit->GetTypeId() == TYPEID_UNIT)
- if (Creature* creature = m_unit->ToCreature())
- creature->SetReactState(m_oldReactState);
+ if (_unit->GetTypeId() == TYPEID_UNIT)
+ if (Creature* creature = _unit->ToCreature())
+ creature->SetReactState(_oldReactState);
}
void CharmInfo::InitPetActionBar()
@@ -13997,16 +14005,16 @@ void CharmInfo::InitEmptyActionBar(bool withAttack)
void CharmInfo::InitPossessCreateSpells()
{
InitEmptyActionBar();
- if (m_unit->GetTypeId() == TYPEID_UNIT)
+ if (_unit->GetTypeId() == TYPEID_UNIT)
{
for (uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
{
- uint32 spellId = m_unit->ToCreature()->m_spells[i];
+ uint32 spellId = _unit->ToCreature()->m_spells[i];
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (spellInfo && !(spellInfo->Attributes & SPELL_ATTR0_CASTABLE_WHILE_DEAD))
{
if (spellInfo->IsPassive())
- m_unit->CastSpell(m_unit, spellInfo, true);
+ _unit->CastSpell(_unit, spellInfo, true);
else
AddSpellToActionBar(spellInfo, ACT_PASSIVE);
}
@@ -14016,7 +14024,7 @@ void CharmInfo::InitPossessCreateSpells()
void CharmInfo::InitCharmCreateSpells()
{
- if (m_unit->GetTypeId() == TYPEID_PLAYER) // charmed players don't have spells
+ if (_unit->GetTypeId() == TYPEID_PLAYER) // charmed players don't have spells
{
InitEmptyActionBar();
return;
@@ -14026,23 +14034,23 @@ void CharmInfo::InitCharmCreateSpells()
for (uint32 x = 0; x < MAX_SPELL_CHARM; ++x)
{
- uint32 spellId = m_unit->ToCreature()->m_spells[x];
+ uint32 spellId = _unit->ToCreature()->m_spells[x];
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo || spellInfo->Attributes & SPELL_ATTR0_CASTABLE_WHILE_DEAD)
{
- m_charmspells[x].SetActionAndType(spellId, ACT_DISABLED);
+ _charmspells[x].SetActionAndType(spellId, ACT_DISABLED);
continue;
}
if (spellInfo->IsPassive())
{
- m_unit->CastSpell(m_unit, spellInfo, true);
- m_charmspells[x].SetActionAndType(spellId, ACT_PASSIVE);
+ _unit->CastSpell(_unit, spellInfo, true);
+ _charmspells[x].SetActionAndType(spellId, ACT_PASSIVE);
}
else
{
- m_charmspells[x].SetActionAndType(spellId, ACT_DISABLED);
+ _charmspells[x].SetActionAndType(spellId, ACT_DISABLED);
ActiveStates newstate = ACT_PASSIVE;
@@ -14119,17 +14127,17 @@ void CharmInfo::ToggleCreatureAutocast(SpellInfo const* spellInfo, bool apply)
return;
for (uint32 x = 0; x < MAX_SPELL_CHARM; ++x)
- if (spellInfo->Id == m_charmspells[x].GetAction())
- m_charmspells[x].SetType(apply ? ACT_ENABLED : ACT_DISABLED);
+ if (spellInfo->Id == _charmspells[x].GetAction())
+ _charmspells[x].SetType(apply ? ACT_ENABLED : ACT_DISABLED);
}
void CharmInfo::SetPetNumber(uint32 petnumber, bool statwindow)
{
- m_petnumber = petnumber;
+ _petnumber = petnumber;
if (statwindow)
- m_unit->SetUInt32Value(UNIT_FIELD_PETNUMBER, m_petnumber);
+ _unit->SetUInt32Value(UNIT_FIELD_PETNUMBER, _petnumber);
else
- m_unit->SetUInt32Value(UNIT_FIELD_PETNUMBER, 0);
+ _unit->SetUInt32Value(UNIT_FIELD_PETNUMBER, 0);
}
void CharmInfo::LoadPetActionBar(const std::string& data)
@@ -16702,178 +16710,181 @@ uint32 Unit::GetCombatRatingDamageReduction(CombatRating cr, float rate, float c
return CalculatePct(damage, percent);
}
-uint32 Unit::GetModelForForm(ShapeshiftForm form)
+uint32 Unit::GetModelForForm(ShapeshiftForm form) const
{
- switch (form)
+ if (GetTypeId() == TYPEID_PLAYER)
{
- case FORM_CAT:
- // Based on Hair color
- if (getRace() == RACE_NIGHTELF)
- {
- uint8 hairColor = GetByteValue(PLAYER_BYTES, 3);
- switch (hairColor)
+ switch (form)
+ {
+ case FORM_CAT:
+ // Based on Hair color
+ if (getRace() == RACE_NIGHTELF)
{
- case 7: // Violet
- case 8:
- return 29405;
- case 3: // Light Blue
- return 29406;
- case 0: // Green
- case 1: // Light Green
- case 2: // Dark Green
- return 29407;
- case 4: // White
- return 29408;
- default: // original - Dark Blue
- return 892;
+ uint8 hairColor = GetByteValue(PLAYER_BYTES, 3);
+ switch (hairColor)
+ {
+ case 7: // Violet
+ case 8:
+ return 29405;
+ case 3: // Light Blue
+ return 29406;
+ case 0: // Green
+ case 1: // Light Green
+ case 2: // Dark Green
+ return 29407;
+ case 4: // White
+ return 29408;
+ default: // original - Dark Blue
+ return 892;
+ }
}
- }
- // Based on Skin color
- else if (getRace() == RACE_TAUREN)
- {
- uint8 skinColor = GetByteValue(PLAYER_BYTES, 0);
- // Male
- if (getGender() == GENDER_MALE)
+ // Based on Skin color
+ else if (getRace() == RACE_TAUREN)
{
- switch (skinColor)
+ uint8 skinColor = GetByteValue(PLAYER_BYTES, 0);
+ // Male
+ if (getGender() == GENDER_MALE)
{
- case 12: // White
- case 13:
- case 14:
- case 18: // Completly White
+ switch (skinColor)
+ {
+ case 12: // White
+ case 13:
+ case 14:
+ case 18: // Completly White
+ return 29409;
+ case 9: // Light Brown
+ case 10:
+ case 11:
+ return 29410;
+ case 6: // Brown
+ case 7:
+ case 8:
+ return 29411;
+ case 0: // Dark
+ case 1:
+ case 2:
+ case 3: // Dark Grey
+ case 4:
+ case 5:
+ return 29412;
+ default: // original - Grey
+ return 8571;
+ }
+ }
+ // Female
+ else switch (skinColor)
+ {
+ case 10: // White
return 29409;
- case 9: // Light Brown
- case 10:
- case 11:
- return 29410;
- case 6: // Brown
+ case 6: // Light Brown
case 7:
- case 8:
+ return 29410;
+ case 4: // Brown
+ case 5:
return 29411;
case 0: // Dark
case 1:
case 2:
- case 3: // Dark Grey
- case 4:
- case 5:
+ case 3:
return 29412;
default: // original - Grey
return 8571;
}
}
- // Female
- else switch (skinColor)
+ else if (Player::TeamForRace(getRace()) == ALLIANCE)
+ return 892;
+ else
+ return 8571;
+ case FORM_DIREBEAR:
+ case FORM_BEAR:
+ // Based on Hair color
+ if (getRace() == RACE_NIGHTELF)
{
- case 10: // White
- return 29409;
- case 6: // Light Brown
- case 7:
- return 29410;
- case 4: // Brown
- case 5:
- return 29411;
- case 0: // Dark
- case 1:
- case 2:
- case 3:
- return 29412;
- default: // original - Grey
- return 8571;
+ uint8 hairColor = GetByteValue(PLAYER_BYTES, 3);
+ switch (hairColor)
+ {
+ case 0: // Green
+ case 1: // Light Green
+ case 2: // Dark Green
+ return 29413; // 29415?
+ case 6: // Dark Blue
+ return 29414;
+ case 4: // White
+ return 29416;
+ case 3: // Light Blue
+ return 29417;
+ default: // original - Violet
+ return 2281;
+ }
}
- }
- else if (Player::TeamForRace(getRace()) == ALLIANCE)
- return 892;
- else
- return 8571;
- case FORM_DIREBEAR:
- case FORM_BEAR:
- // Based on Hair color
- if (getRace() == RACE_NIGHTELF)
- {
- uint8 hairColor = GetByteValue(PLAYER_BYTES, 3);
- switch (hairColor)
+ // Based on Skin color
+ else if (getRace() == RACE_TAUREN)
{
- case 0: // Green
- case 1: // Light Green
- case 2: // Dark Green
- return 29413; // 29415?
- case 6: // Dark Blue
- return 29414;
- case 4: // White
- return 29416;
- case 3: // Light Blue
- return 29417;
- default: // original - Violet
- return 2281;
- }
- }
- // Based on Skin color
- else if (getRace() == RACE_TAUREN)
- {
- uint8 skinColor = GetByteValue(PLAYER_BYTES, 0);
- // Male
- if (getGender() == GENDER_MALE)
- {
- switch (skinColor)
+ uint8 skinColor = GetByteValue(PLAYER_BYTES, 0);
+ // Male
+ if (getGender() == GENDER_MALE)
+ {
+ switch (skinColor)
+ {
+ case 0: // Dark (Black)
+ case 1:
+ case 2:
+ return 29418;
+ case 3: // White
+ case 4:
+ case 5:
+ case 12:
+ case 13:
+ case 14:
+ return 29419;
+ case 9: // Light Brown/Grey
+ case 10:
+ case 11:
+ case 15:
+ case 16:
+ case 17:
+ return 29420;
+ case 18: // Completly White
+ return 29421;
+ default: // original - Brown
+ return 2289;
+ }
+ }
+ // Female
+ else switch (skinColor)
{
case 0: // Dark (Black)
case 1:
- case 2:
return 29418;
- case 3: // White
- case 4:
- case 5:
- case 12:
- case 13:
- case 14:
+ case 2: // White
+ case 3:
return 29419;
- case 9: // Light Brown/Grey
- case 10:
- case 11:
- case 15:
- case 16:
- case 17:
+ case 6: // Light Brown/Grey
+ case 7:
+ case 8:
+ case 9:
return 29420;
- case 18: // Completly White
+ case 10: // Completly White
return 29421;
default: // original - Brown
return 2289;
}
}
- // Female
- else switch (skinColor)
- {
- case 0: // Dark (Black)
- case 1:
- return 29418;
- case 2: // White
- case 3:
- return 29419;
- case 6: // Light Brown/Grey
- case 7:
- case 8:
- case 9:
- return 29420;
- case 10: // Completly White
- return 29421;
- default: // original - Brown
- return 2289;
- }
- }
- else if (Player::TeamForRace(getRace()) == ALLIANCE)
- return 2281;
- else
- return 2289;
- case FORM_FLIGHT:
- if (Player::TeamForRace(getRace()) == ALLIANCE)
- return 20857;
- return 20872;
- case FORM_FLIGHT_EPIC:
- if (Player::TeamForRace(getRace()) == ALLIANCE)
- return 21243;
- return 21244;
- default:
- break;
+ else if (Player::TeamForRace(getRace()) == ALLIANCE)
+ return 2281;
+ else
+ return 2289;
+ case FORM_FLIGHT:
+ if (Player::TeamForRace(getRace()) == ALLIANCE)
+ return 20857;
+ return 20872;
+ case FORM_FLIGHT_EPIC:
+ if (Player::TeamForRace(getRace()) == ALLIANCE)
+ return 21243;
+ return 21244;
+ default:
+ break;
+ }
}
uint32 modelid = 0;
@@ -17572,58 +17583,68 @@ uint32 Unit::GetResistance(SpellSchoolMask mask) const
void CharmInfo::SetIsCommandAttack(bool val)
{
- m_isCommandAttack = val;
+ _isCommandAttack = val;
}
bool CharmInfo::IsCommandAttack()
{
- return m_isCommandAttack;
+ return _isCommandAttack;
+}
+
+void CharmInfo::SetIsCommandFollow(bool val)
+{
+ _isCommandFollow = val;
+}
+
+bool CharmInfo::IsCommandFollow()
+{
+ return _isCommandFollow;
}
void CharmInfo::SaveStayPosition()
{
//! At this point a new spline destination is enabled because of Unit::StopMoving()
- G3D::Vector3 const stayPos = m_unit->movespline->FinalDestination();
- m_stayX = stayPos.x;
- m_stayY = stayPos.y;
- m_stayZ = stayPos.z;
+ G3D::Vector3 const stayPos = _unit->movespline->FinalDestination();
+ _stayX = stayPos.x;
+ _stayY = stayPos.y;
+ _stayZ = stayPos.z;
}
void CharmInfo::GetStayPosition(float &x, float &y, float &z)
{
- x = m_stayX;
- y = m_stayY;
- z = m_stayZ;
+ x = _stayX;
+ y = _stayY;
+ z = _stayZ;
}
void CharmInfo::SetIsAtStay(bool val)
{
- m_isAtStay = val;
+ _isAtStay = val;
}
bool CharmInfo::IsAtStay()
{
- return m_isAtStay;
+ return _isAtStay;
}
void CharmInfo::SetIsFollowing(bool val)
{
- m_isFollowing = val;
+ _isFollowing = val;
}
bool CharmInfo::IsFollowing()
{
- return m_isFollowing;
+ return _isFollowing;
}
void CharmInfo::SetIsReturning(bool val)
{
- m_isReturning = val;
+ _isReturning = val;
}
bool CharmInfo::IsReturning()
{
- return m_isReturning;
+ return _isReturning;
}
void Unit::SetInFront(Unit const* target)
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index 08fefe4c420..bba58a2f5e9 100755..100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -253,6 +253,7 @@ enum UnitRename
#define MAX_SPELL_CONTROL_BAR 10
#define MAX_AGGRO_RESET_TIME 10 // in seconds
+#define MAX_AGGRO_RADIUS 45.0f // yards
enum Swing
{
@@ -1095,12 +1096,12 @@ struct CharmInfo
explicit CharmInfo(Unit* unit);
~CharmInfo();
void RestoreState();
- uint32 GetPetNumber() const { return m_petnumber; }
+ uint32 GetPetNumber() const { return _petnumber; }
void SetPetNumber(uint32 petnumber, bool statwindow);
- void SetCommandState(CommandStates st) { m_CommandState = st; }
- CommandStates GetCommandState() const { return m_CommandState; }
- bool HasCommandState(CommandStates state) const { return (m_CommandState == state); }
+ void SetCommandState(CommandStates st) { _CommandState = st; }
+ CommandStates GetCommandState() const { return _CommandState; }
+ bool HasCommandState(CommandStates state) const { return (_CommandState == state); }
void InitPossessCreateSpells();
void InitCharmCreateSpells();
@@ -1121,12 +1122,14 @@ struct CharmInfo
void ToggleCreatureAutocast(SpellInfo const* spellInfo, bool apply);
- CharmSpellInfo* GetCharmSpell(uint8 index) { return &(m_charmspells[index]); }
+ CharmSpellInfo* GetCharmSpell(uint8 index) { return &(_charmspells[index]); }
GlobalCooldownMgr& GetGlobalCooldownMgr() { return m_GlobalCooldownMgr; }
void SetIsCommandAttack(bool val);
bool IsCommandAttack();
+ void SetIsCommandFollow(bool val);
+ bool IsCommandFollow();
void SetIsAtStay(bool val);
bool IsAtStay();
void SetIsFollowing(bool val);
@@ -1138,23 +1141,24 @@ struct CharmInfo
private:
- Unit* m_unit;
+ Unit* _unit;
UnitActionBarEntry PetActionBar[MAX_UNIT_ACTION_BAR_INDEX];
- CharmSpellInfo m_charmspells[4];
- CommandStates m_CommandState;
- uint32 m_petnumber;
- bool m_barInit;
+ CharmSpellInfo _charmspells[4];
+ CommandStates _CommandState;
+ uint32 _petnumber;
+ bool _barInit;
//for restoration after charmed
- ReactStates m_oldReactState;
+ ReactStates _oldReactState;
- bool m_isCommandAttack;
- bool m_isAtStay;
- bool m_isFollowing;
- bool m_isReturning;
- float m_stayX;
- float m_stayY;
- float m_stayZ;
+ bool _isCommandAttack;
+ bool _isCommandFollow;
+ bool _isAtStay;
+ bool _isFollowing;
+ bool _isReturning;
+ float _stayX;
+ float _stayY;
+ float _stayZ;
GlobalCooldownMgr m_GlobalCooldownMgr;
};
@@ -1619,7 +1623,7 @@ class Unit : public WorldObject
bool IsWalking() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_WALKING);}
virtual bool SetWalk(bool enable);
virtual bool SetDisableGravity(bool disable, bool packetOnly = false);
- bool SetHover(bool enable);
+ virtual bool SetHover(bool enable);
void SetInFront(Unit const* target);
void SetFacingTo(float ori);
@@ -2138,7 +2142,7 @@ class Unit : public WorldObject
void AddPetAura(PetAura const* petSpell);
void RemovePetAura(PetAura const* petSpell);
- uint32 GetModelForForm(ShapeshiftForm form);
+ uint32 GetModelForForm(ShapeshiftForm form) const;
uint32 GetModelForTotem(PlayerTotemType totemType);
void SetReducedThreatPercent(uint32 pct, uint64 guid)
diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp
index f8f7a1a1b72..502ec0335e2 100755
--- a/src/server/game/Entities/Vehicle/Vehicle.cpp
+++ b/src/server/game/Entities/Vehicle/Vehicle.cpp
@@ -348,7 +348,7 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
unit->m_movementInfo.t_pos.m_positionX = veSeat->m_attachmentOffsetX;
unit->m_movementInfo.t_pos.m_positionY = veSeat->m_attachmentOffsetY;
unit->m_movementInfo.t_pos.m_positionZ = veSeat->m_attachmentOffsetZ;
- unit->m_movementInfo.t_pos.m_orientation = 0;
+ unit->m_movementInfo.t_pos.SetOrientation(0);
unit->m_movementInfo.t_time = 0; // 1 for player
unit->m_movementInfo.t_seat = seat->first;
unit->m_movementInfo.t_guid = _me->GetGUID();
@@ -363,9 +363,9 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
if (_me->IsInWorld())
{
- unit->SendClearTarget(); // SMSG_BREAK_TARGET
- unit->SetControlled(true, UNIT_STATE_ROOT); // SMSG_FORCE_ROOT - In some cases we send SMSG_SPLINE_MOVE_ROOT here (for creatures)
- // also adds MOVEMENTFLAG_ROOT
+ unit->SendClearTarget(); // SMSG_BREAK_TARGET
+ unit->SetControlled(true, UNIT_STATE_ROOT); // SMSG_FORCE_ROOT - In some cases we send SMSG_SPLINE_MOVE_ROOT here (for creatures)
+ // also adds MOVEMENTFLAG_ROOT
Movement::MoveSplineInit init(unit);
init.DisableTransportPathTransformations();
init.MoveTo(veSeat->m_attachmentOffsetX, veSeat->m_attachmentOffsetY, veSeat->m_attachmentOffsetZ);
diff --git a/src/server/game/Entities/Vehicle/Vehicle.h b/src/server/game/Entities/Vehicle/Vehicle.h
index 4ad8663a17a..3f1567c74ee 100755..100644
--- a/src/server/game/Entities/Vehicle/Vehicle.h
+++ b/src/server/game/Entities/Vehicle/Vehicle.h
@@ -20,9 +20,11 @@
#define __TRINITY_VEHICLE_H
#include "ObjectDefines.h"
+#include "Object.h"
#include "VehicleDefines.h"
struct VehicleEntry;
+
class Unit;
typedef std::set<uint64> GuidSet;
@@ -58,6 +60,9 @@ class Vehicle : public TransportBase
void TeleportVehicle(float x, float y, float z, float ang);
bool IsVehicleInUse() { return Seats.begin() != Seats.end(); }
+ void SetLastShootPos(Position const& pos) { m_lastShootPos.Relocate(pos); }
+ Position GetLastShootPos() { return m_lastShootPos; }
+
SeatMap Seats;
VehicleSeatEntry const* GetSeatForPassenger(Unit* passenger);
@@ -77,5 +82,7 @@ class Vehicle : public TransportBase
GuidSet vehiclePlayers;
uint32 _usableSeatNum; // Number of seats that match VehicleSeatEntry::UsableByPlayer, used for proper display flags
uint32 _creatureEntry; // Can be different than me->GetBase()->GetEntry() in case of players
+
+ Position m_lastShootPos;
};
#endif
diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp
index 2116738fac3..256864d6a77 100755..100644
--- a/src/server/game/Events/GameEventMgr.cpp
+++ b/src/server/game/Events/GameEventMgr.cpp
@@ -795,9 +795,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT eventEntry, guid, item, maxcount, incrtime, ExtendedCost FROM game_event_npc_vendor ORDER BY guid, slot ASC");
if (!result)
- {
sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 vendor additions in game events. DB table `game_event_npc_vendor` is empty.");
- }
else
{
uint32 count = 0;
@@ -1041,14 +1039,14 @@ uint32 GameEventMgr::Update() // return the next e
// changed, save to DB the gameevent state, will be updated in next update cycle
SaveWorldEventStateToDB(itr);
- //sLog->outDebug("GameEvent %u is active", itr->first);
+ //sLog->outDebug(LOG_FILTER_GENERAL, "GameEvent %u is active", itr->first);
// queue for activation
if (!IsActiveEvent(itr))
activate.insert(itr);
}
else
{
- //sLog->outDebug("GameEvent %u is not active", itr->first);
+ //sLog->outDebug(LOG_FILTER_GENERAL, "GameEvent %u is not active", itr->first);
if (IsActiveEvent(itr))
deactivate.insert(itr);
else
@@ -1206,7 +1204,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if (!map->Instanceable() && map->IsGridLoaded(data->posX, data->posY))
{
Creature* creature = new Creature;
- //sLog->outDebug("Spawning creature %u", *itr);
+ //sLog->outDebug(LOG_FILTER_GENERAL, "Spawning creature %u", *itr);
if (!creature->LoadCreatureFromDB(*itr, map))
delete creature;
}
@@ -1233,7 +1231,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if (!map->Instanceable() && map->IsGridLoaded(data->posX, data->posY))
{
GameObject* pGameobject = new GameObject;
- //sLog->outDebug("Spawning gameobject %u", *itr);
+ //sLog->outDebug(LOG_FILTER_GENERAL, "Spawning gameobject %u", *itr);
//TODO: find out when it is add to map
if (!pGameobject->LoadGameObjectFromDB(*itr, map, false))
delete pGameobject;
diff --git a/src/server/game/Events/GameEventMgr.h b/src/server/game/Events/GameEventMgr.h
index dbc2c7ead10..dbc2c7ead10 100755..100644
--- a/src/server/game/Events/GameEventMgr.h
+++ b/src/server/game/Events/GameEventMgr.h
diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp
index cedb20eccf1..cedb20eccf1 100755..100644
--- a/src/server/game/Globals/ObjectAccessor.cpp
+++ b/src/server/game/Globals/ObjectAccessor.cpp
diff --git a/src/server/game/Globals/ObjectAccessor.h b/src/server/game/Globals/ObjectAccessor.h
index d2b532c9f94..d2b532c9f94 100755..100644
--- a/src/server/game/Globals/ObjectAccessor.h
+++ b/src/server/game/Globals/ObjectAccessor.h
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index ff734efe385..70ac4aec4aa 100755..100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -50,7 +50,6 @@
#include "World.h"
ScriptMapMap sQuestEndScripts;
-ScriptMapMap sQuestStartScripts;
ScriptMapMap sSpellScripts;
ScriptMapMap sGameObjectScripts;
ScriptMapMap sEventScripts;
@@ -62,7 +61,6 @@ std::string GetScriptsTableNameByType(ScriptsType type)
switch (type)
{
case SCRIPTS_QUEST_END: res = "quest_end_scripts"; break;
- case SCRIPTS_QUEST_START: res = "quest_start_scripts";break;
case SCRIPTS_SPELL: res = "spell_scripts"; break;
case SCRIPTS_GAMEOBJECT: res = "gameobject_scripts"; break;
case SCRIPTS_EVENT: res = "event_scripts"; break;
@@ -78,7 +76,6 @@ ScriptMapMap* GetScriptsMapByType(ScriptsType type)
switch (type)
{
case SCRIPTS_QUEST_END: res = &sQuestEndScripts; break;
- case SCRIPTS_QUEST_START: res = &sQuestStartScripts; break;
case SCRIPTS_SPELL: res = &sSpellScripts; break;
case SCRIPTS_GAMEOBJECT: res = &sGameObjectScripts; break;
case SCRIPTS_EVENT: res = &sEventScripts; break;
@@ -1661,7 +1658,7 @@ bool ObjectMgr::MoveCreData(uint32 guid, uint32 mapId, Position pos)
Creature* creature = new Creature;
if (!creature->LoadCreatureFromDB(guid, map))
{
- sLog->outError(LOG_FILTER_GENERAL, "AddCreature: cannot add creature entry %u to map", guid);
+ sLog->outError(LOG_FILTER_GENERAL, "MoveCreData: Cannot add creature guid %u to map", guid);
delete creature;
return false;
}
@@ -1713,7 +1710,7 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 /*team*/, uint32 mapId, float
Creature* creature = new Creature;
if (!creature->LoadCreatureFromDB(guid, map))
{
- sLog->outError(LOG_FILTER_GENERAL, "AddCreature: cannot add creature entry %u to map", entry);
+ sLog->outError(LOG_FILTER_GENERAL, "AddCreature: Cannot add creature entry %u to map", entry);
delete creature;
return 0;
}
@@ -1739,7 +1736,6 @@ void ObjectMgr::LoadGameobjects()
if (!result)
{
sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 gameobjects. DB table `gameobject` is empty.");
-
return;
}
@@ -3662,8 +3658,8 @@ void ObjectMgr::LoadQuests()
"DetailsEmote1, DetailsEmote2, DetailsEmote3, DetailsEmote4, DetailsEmoteDelay1, DetailsEmoteDelay2, DetailsEmoteDelay3, DetailsEmoteDelay4, EmoteOnIncomplete, EmoteOnComplete, "
// 136 137 138 139 140 141 142 143
"OfferRewardEmote1, OfferRewardEmote2, OfferRewardEmote3, OfferRewardEmote4, OfferRewardEmoteDelay1, OfferRewardEmoteDelay2, OfferRewardEmoteDelay3, OfferRewardEmoteDelay4, "
- // 144 145 146
- "StartScript, CompleteScript, WDBVerified"
+ // 144 145
+ "CompleteScript, WDBVerified"
" FROM quest_template");
if (!result)
{
@@ -3730,6 +3726,15 @@ void ObjectMgr::LoadQuests()
}
}
+ if (qinfo->Flags & QUEST_TRINITY_FLAGS_MONTHLY)
+ {
+ if (!(qinfo->Flags & QUEST_TRINITY_FLAGS_REPEATABLE))
+ {
+ sLog->outError(LOG_FILTER_SQL, "Monthly quest %u not marked as repeatable in `SpecialFlags`, added.", qinfo->GetQuestId());
+ qinfo->Flags |= QUEST_TRINITY_FLAGS_REPEATABLE;
+ }
+ }
+
if (qinfo->Flags & QUEST_FLAGS_AUTO_REWARDED)
{
// at auto-reward can be rewarded only RewardChoiceItemId[0]
@@ -4690,18 +4695,6 @@ void ObjectMgr::LoadQuestEndScripts()
}
}
-void ObjectMgr::LoadQuestStartScripts()
-{
- LoadScripts(SCRIPTS_QUEST_START);
-
- // check ids
- for (ScriptMapMap::const_iterator itr = sQuestStartScripts.begin(); itr != sQuestStartScripts.end(); ++itr)
- {
- if (!GetQuestTemplate(itr->first))
- sLog->outError(LOG_FILTER_SQL, "Table `quest_start_scripts` has not existing quest (Id: %u) as script id", itr->first);
- }
-}
-
void ObjectMgr::LoadSpellScripts()
{
LoadScripts(SCRIPTS_SPELL);
@@ -6016,7 +6009,7 @@ void ObjectMgr::LoadAccessRequirements()
if (ar->achievement)
{
- if (!sAchievementStore.LookupEntry(ar->achievement))
+ if (!sAchievementMgr->GetAchievement(ar->achievement))
{
sLog->outError(LOG_FILTER_SQL, "Required Achievement %u not exist for map %u difficulty %u, remove quest done requirement.", ar->achievement, mapid, difficulty);
ar->achievement = 0;
@@ -6650,13 +6643,11 @@ void ObjectMgr::LoadReputationRewardRate()
_repRewardRateStore.clear(); // for reload case
- uint32 count = 0; // 0 1 2 3
- QueryResult result = WorldDatabase.Query("SELECT faction, quest_rate, creature_rate, spell_rate FROM reputation_reward_rate");
-
+ uint32 count = 0; // 0 1 2 3 4 5 6
+ QueryResult result = WorldDatabase.Query("SELECT faction, quest_rate, quest_daily_rate, quest_weekly_rate, quest_monthly_rate, creature_rate, spell_rate FROM reputation_reward_rate");
if (!result)
{
sLog->outError(LOG_FILTER_SQL, ">> Loaded `reputation_reward_rate`, table is empty!");
-
return;
}
@@ -6664,13 +6655,16 @@ void ObjectMgr::LoadReputationRewardRate()
{
Field* fields = result->Fetch();
- uint32 factionId = fields[0].GetUInt32();
+ uint32 factionId = fields[0].GetUInt32();
RepRewardRate repRate;
- repRate.quest_rate = fields[1].GetFloat();
- repRate.creature_rate = fields[2].GetFloat();
- repRate.spell_rate = fields[3].GetFloat();
+ repRate.questRate = fields[1].GetFloat();
+ repRate.questDailyRate = fields[2].GetFloat();
+ repRate.questWeeklyRate = fields[3].GetFloat();
+ repRate.questMonthlyRate = fields[4].GetFloat();
+ repRate.creatureRate = fields[5].GetFloat();
+ repRate.spellRate = fields[6].GetFloat();
FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionId);
if (!factionEntry)
@@ -6679,21 +6673,39 @@ void ObjectMgr::LoadReputationRewardRate()
continue;
}
- if (repRate.quest_rate < 0.0f)
+ if (repRate.questRate < 0.0f)
+ {
+ sLog->outError(LOG_FILTER_SQL, "Table reputation_reward_rate has quest_rate with invalid rate %f, skipping data for faction %u", repRate.questRate, factionId);
+ continue;
+ }
+
+ if (repRate.questDailyRate < 0.0f)
+ {
+ sLog->outError(LOG_FILTER_SQL, "Table reputation_reward_rate has quest_daily_rate with invalid rate %f, skipping data for faction %u", repRate.questDailyRate, factionId);
+ continue;
+ }
+
+ if (repRate.questWeeklyRate < 0.0f)
+ {
+ sLog->outError(LOG_FILTER_SQL, "Table reputation_reward_rate has quest_weekly_rate with invalid rate %f, skipping data for faction %u", repRate.questWeeklyRate, factionId);
+ continue;
+ }
+
+ if (repRate.questMonthlyRate < 0.0f)
{
- sLog->outError(LOG_FILTER_SQL, "Table reputation_reward_rate has quest_rate with invalid rate %f, skipping data for faction %u", repRate.quest_rate, factionId);
+ sLog->outError(LOG_FILTER_SQL, "Table reputation_reward_rate has quest_monthly_rate with invalid rate %f, skipping data for faction %u", repRate.questMonthlyRate, factionId);
continue;
}
- if (repRate.creature_rate < 0.0f)
+ if (repRate.creatureRate < 0.0f)
{
- sLog->outError(LOG_FILTER_SQL, "Table reputation_reward_rate has creature_rate with invalid rate %f, skipping data for faction %u", repRate.creature_rate, factionId);
+ sLog->outError(LOG_FILTER_SQL, "Table reputation_reward_rate has creature_rate with invalid rate %f, skipping data for faction %u", repRate.creatureRate, factionId);
continue;
}
- if (repRate.spell_rate < 0.0f)
+ if (repRate.spellRate < 0.0f)
{
- sLog->outError(LOG_FILTER_SQL, "Table reputation_reward_rate has spell_rate with invalid rate %f, skipping data for faction %u", repRate.spell_rate, factionId);
+ sLog->outError(LOG_FILTER_SQL, "Table reputation_reward_rate has spell_rate with invalid rate %f, skipping data for faction %u", repRate.spellRate, factionId);
continue;
}
@@ -8551,9 +8563,9 @@ void ObjectMgr::LoadFactionChangeAchievements()
uint32 alliance = fields[0].GetUInt32();
uint32 horde = fields[1].GetUInt32();
- if (!sAchievementStore.LookupEntry(alliance))
+ if (!sAchievementMgr->GetAchievement(alliance))
sLog->outError(LOG_FILTER_SQL, "Achievement %u referenced in `player_factionchange_achievement` does not exist, pair skipped!", alliance);
- else if (!sAchievementStore.LookupEntry(horde))
+ else if (!sAchievementMgr->GetAchievement(horde))
sLog->outError(LOG_FILTER_SQL, "Achievement %u referenced in `player_factionchange_achievement` does not exist, pair skipped!", horde);
else
FactionChange_Achievements[alliance] = horde;
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index 3dcab3df951..e1df03b97b0 100755..100644
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -128,7 +128,6 @@ enum ScriptsType
SCRIPTS_FIRST = 1,
SCRIPTS_QUEST_END = SCRIPTS_FIRST,
- SCRIPTS_QUEST_START,
SCRIPTS_SPELL,
SCRIPTS_GAMEOBJECT,
SCRIPTS_EVENT,
@@ -363,7 +362,6 @@ typedef std::map<uint32, ScriptMap > ScriptMapMap;
typedef std::multimap<uint32, uint32> SpellScriptsContainer;
typedef std::pair<SpellScriptsContainer::iterator, SpellScriptsContainer::iterator> SpellScriptsBounds;
extern ScriptMapMap sQuestEndScripts;
-extern ScriptMapMap sQuestStartScripts;
extern ScriptMapMap sSpellScripts;
extern ScriptMapMap sGameObjectScripts;
extern ScriptMapMap sEventScripts;
@@ -465,9 +463,12 @@ typedef UNORDERED_MAP<uint8, MailLevelRewardList> MailLevelRewardContainer;
// We assume the rate is in general the same for all three types below, but chose to keep three for scalability and customization
struct RepRewardRate
{
- float quest_rate; // We allow rate = 0.0 in database. For this case, it means that
- float creature_rate; // no reputation are given at all for this faction/rate type.
- float spell_rate;
+ float questRate; // We allow rate = 0.0 in database. For this case, it means that
+ float questDailyRate;
+ float questWeeklyRate;
+ float questMonthlyRate;
+ float creatureRate; // no reputation are given at all for this faction/rate type.
+ float spellRate;
};
struct ReputationOnKillEntry
@@ -864,7 +865,6 @@ class ObjectMgr
void LoadGameObjectScripts();
void LoadQuestEndScripts();
- void LoadQuestStartScripts();
void LoadEventScripts();
void LoadSpellScripts();
void LoadWaypointScripts();
diff --git a/src/server/game/Grids/Cells/Cell.h b/src/server/game/Grids/Cells/Cell.h
index 67b862845b9..67b862845b9 100755..100644
--- a/src/server/game/Grids/Cells/Cell.h
+++ b/src/server/game/Grids/Cells/Cell.h
diff --git a/src/server/game/Grids/Grid.h b/src/server/game/Grids/Grid.h
index d9350e9e897..d9350e9e897 100755..100644
--- a/src/server/game/Grids/Grid.h
+++ b/src/server/game/Grids/Grid.h
diff --git a/src/server/game/Grids/GridLoader.h b/src/server/game/Grids/GridLoader.h
index 85393872eb9..85393872eb9 100755..100644
--- a/src/server/game/Grids/GridLoader.h
+++ b/src/server/game/Grids/GridLoader.h
diff --git a/src/server/game/Grids/GridRefManager.h b/src/server/game/Grids/GridRefManager.h
index 66b6313c997..66b6313c997 100755..100644
--- a/src/server/game/Grids/GridRefManager.h
+++ b/src/server/game/Grids/GridRefManager.h
diff --git a/src/server/game/Grids/GridReference.h b/src/server/game/Grids/GridReference.h
index 107bddf04eb..107bddf04eb 100755..100644
--- a/src/server/game/Grids/GridReference.h
+++ b/src/server/game/Grids/GridReference.h
diff --git a/src/server/game/Grids/GridStates.cpp b/src/server/game/Grids/GridStates.cpp
index c2f66bc3e8a..c2f66bc3e8a 100755..100644
--- a/src/server/game/Grids/GridStates.cpp
+++ b/src/server/game/Grids/GridStates.cpp
diff --git a/src/server/game/Grids/GridStates.h b/src/server/game/Grids/GridStates.h
index ad888b26dd3..ad888b26dd3 100755..100644
--- a/src/server/game/Grids/GridStates.h
+++ b/src/server/game/Grids/GridStates.h
diff --git a/src/server/game/Grids/NGrid.h b/src/server/game/Grids/NGrid.h
index 0ef885703be..0ef885703be 100755..100644
--- a/src/server/game/Grids/NGrid.h
+++ b/src/server/game/Grids/NGrid.h
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.cpp b/src/server/game/Grids/Notifiers/GridNotifiers.cpp
index 1cd442e48f9..1cd442e48f9 100755..100644
--- a/src/server/game/Grids/Notifiers/GridNotifiers.cpp
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.cpp
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h
index 752c6ec068e..24d2a45c4f2 100755..100644
--- a/src/server/game/Grids/Notifiers/GridNotifiers.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.h
@@ -1087,6 +1087,35 @@ namespace Trinity
NearestHostileUnitInAttackDistanceCheck(NearestHostileUnitInAttackDistanceCheck const&);
};
+ class NearestHostileUnitInAggroRangeCheck
+ {
+ public:
+ explicit NearestHostileUnitInAggroRangeCheck(Creature const* creature, bool useLOS = false) : _me(creature), _useLOS(useLOS)
+ {
+ }
+ bool operator()(Unit* u)
+ {
+ if (!u->IsHostileTo(_me))
+ return false;
+
+ if (!u->IsWithinDistInMap(_me, _me->GetAggroRange(u)))
+ return false;
+
+ if (!_me->IsValidAttackTarget(u))
+ return false;
+
+ if (_useLOS && !u->IsWithinLOSInMap(_me))
+ return false;
+
+ return true;
+ }
+
+ private:
+ Creature const* _me;
+ bool _useLOS;
+ NearestHostileUnitInAggroRangeCheck(NearestHostileUnitInAggroRangeCheck const&);
+ };
+
class AnyAssistCreatureInRangeCheck
{
public:
diff --git a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
index 2d60678d4ff..2d60678d4ff 100755..100644
--- a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp
index 3b2d59dd998..3b2d59dd998 100755..100644
--- a/src/server/game/Grids/ObjectGridLoader.cpp
+++ b/src/server/game/Grids/ObjectGridLoader.cpp
diff --git a/src/server/game/Grids/ObjectGridLoader.h b/src/server/game/Grids/ObjectGridLoader.h
index f768bd0826b..f768bd0826b 100755..100644
--- a/src/server/game/Grids/ObjectGridLoader.h
+++ b/src/server/game/Grids/ObjectGridLoader.h
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index 45473f792c4..13c656a4aa3 100755..100644
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -368,10 +368,13 @@ bool Group::AddMember(Player* player)
if (player)
{
player->SetGroupInvite(NULL);
- if (player->GetGroup() && (isBGGroup() || isBFGroup())) // if player is in group and he is being added to BG raid group, then call SetBattlegroundRaid()
- player->SetBattlegroundOrBattlefieldRaid(this, subGroup);
- else if (player->GetGroup()) //if player is in bg raid and we are adding him to normal group, then call SetOriginalGroup()
- player->SetOriginalGroup(this, subGroup);
+ if (player->GetGroup())
+ {
+ if (isBGGroup() || isBFGroup()) // if player is in group and he is being added to BG raid group, then call SetBattlegroundRaid()
+ player->SetBattlegroundOrBattlefieldRaid(this, subGroup);
+ else //if player is in bg raid and we are adding him to normal group, then call SetOriginalGroup()
+ player->SetOriginalGroup(this, subGroup);
+ }
else //if player is not in group, then call set group
player->SetGroup(this, subGroup);
@@ -770,7 +773,7 @@ void Group::Disband(bool hideDestroy /* = false */)
/*** LOOT SYSTEM ***/
/*********************************************************/
-void Group::SendLootStartRoll(uint32 CountDown, uint32 mapid, const Roll &r)
+void Group::SendLootStartRoll(uint32 countDown, uint32 mapid, const Roll &r)
{
WorldPacket data(SMSG_LOOT_START_ROLL, (8+4+4+4+4+4+4+1));
data << uint64(r.itemGUID); // guid of rolled item
@@ -780,7 +783,7 @@ void Group::SendLootStartRoll(uint32 CountDown, uint32 mapid, const Roll &r)
data << uint32(r.itemRandomSuffix); // randomSuffix
data << uint32(r.itemRandomPropId); // item random property ID
data << uint32(r.itemCount); // items in stack
- data << uint32(CountDown); // the countdown time to choose "need" or "greed"
+ data << uint32(countDown); // the countdown time to choose "need" or "greed"
data << uint8(r.rollVoteMask); // roll type mask
for (Roll::PlayerVote::const_iterator itr=r.playerVote.begin(); itr != r.playerVote.end(); ++itr)
@@ -914,7 +917,7 @@ void Group::GroupLoot(Loot* loot, WorldObject* pLootedObject)
item = sObjectMgr->GetItemTemplate(i->itemid);
if (!item)
{
- //sLog->outDebug("Group::GroupLoot: missing item prototype for item with id: %d", i->itemid);
+ //sLog->outDebug(LOG_FILTER_GENERAL, "Group::GroupLoot: missing item prototype for item with id: %d", i->itemid);
continue;
}
@@ -1001,7 +1004,7 @@ void Group::GroupLoot(Loot* loot, WorldObject* pLootedObject)
item = sObjectMgr->GetItemTemplate(i->itemid);
if (!item)
{
- //sLog->outDebug("Group::GroupLoot: missing item prototype for item with id: %d", i->itemid);
+ //sLog->outDebug(LOG_FILTER_GENERAL, "Group::GroupLoot: missing item prototype for item with id: %d", i->itemid);
continue;
}
@@ -1198,12 +1201,12 @@ void Group::NeedBeforeGreed(Loot* loot, WorldObject* lootedObject)
void Group::MasterLoot(Loot* /*loot*/, WorldObject* pLootedObject)
{
- sLog->outDebug(LOG_FILTER_NETWORKIO, "Group::MasterLoot (SMSG_LOOT_MASTER_LIST, 330)");
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "Group::MasterLoot (SMSG_LOOT_MASTER_LIST)");
uint32 real_count = 0;
- WorldPacket data(SMSG_LOOT_MASTER_LIST, 330);
- data << (uint8)GetMembersCount();
+ WorldPacket data(SMSG_LOOT_MASTER_LIST, 1 + GetMembersCount() * 8);
+ data << uint8(GetMembersCount());
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
@@ -1507,7 +1510,7 @@ void Group::SendUpdateToPlayer(uint64 playerGUID, MemberSlot* slot)
Player* member = ObjectAccessor::FindPlayer(citr->guid);
- uint8 onlineState = (member) ? MEMBER_STATUS_ONLINE : MEMBER_STATUS_OFFLINE;
+ uint8 onlineState = member ? MEMBER_STATUS_ONLINE : MEMBER_STATUS_OFFLINE;
onlineState = onlineState | ((isBGGroup() || isBFGroup()) ? MEMBER_STATUS_PVP : 0);
data << citr->name;
diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h
index b20a1bd9dd4..3421e12a9a4 100755..100644
--- a/src/server/game/Groups/Group.h
+++ b/src/server/game/Groups/Group.h
@@ -267,7 +267,7 @@ class Group
void SendUpdateToPlayer(uint64 playerGUID, MemberSlot* slot = NULL);
void UpdatePlayerOutOfRange(Player* player);
// ignore: GUID of player that will be ignored
- void BroadcastPacket(WorldPacket* packet, bool ignorePlayersInBGRaid, int group=-1, uint64 ignore=0);
+ void BroadcastPacket(WorldPacket* packet, bool ignorePlayersInBGRaid, int group = -1, uint64 ignore = 0);
void BroadcastReadyCheck(WorldPacket* packet);
void OfflineReadyCheck();
diff --git a/src/server/game/Groups/GroupRefManager.h b/src/server/game/Groups/GroupRefManager.h
index d9fef8611de..d9fef8611de 100755..100644
--- a/src/server/game/Groups/GroupRefManager.h
+++ b/src/server/game/Groups/GroupRefManager.h
diff --git a/src/server/game/Groups/GroupReference.cpp b/src/server/game/Groups/GroupReference.cpp
index 68d85c5bce9..68d85c5bce9 100755..100644
--- a/src/server/game/Groups/GroupReference.cpp
+++ b/src/server/game/Groups/GroupReference.cpp
diff --git a/src/server/game/Groups/GroupReference.h b/src/server/game/Groups/GroupReference.h
index 7960dd21035..7960dd21035 100755..100644
--- a/src/server/game/Groups/GroupReference.h
+++ b/src/server/game/Groups/GroupReference.h
diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp
index a03e94ff190..8609e1a7735 100755..100644
--- a/src/server/game/Guilds/Guild.cpp
+++ b/src/server/game/Guilds/Guild.cpp
@@ -249,7 +249,7 @@ void Guild::BankEventLogEntry::WritePacket(WorldPacket& data) const
data << uint8(m_destTabId);
break;
default:
- data << uint64(m_itemOrMoney);
+ data << uint32(m_itemOrMoney);
}
data << uint32(time(NULL) - m_timestamp);
diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h
index 2f43245159b..2f43245159b 100755..100644
--- a/src/server/game/Guilds/Guild.h
+++ b/src/server/game/Guilds/Guild.h
diff --git a/src/server/game/Handlers/AddonHandler.cpp b/src/server/game/Handlers/AddonHandler.cpp
index c3ffeace3fb..c3ffeace3fb 100755..100644
--- a/src/server/game/Handlers/AddonHandler.cpp
+++ b/src/server/game/Handlers/AddonHandler.cpp
diff --git a/src/server/game/Handlers/AddonHandler.h b/src/server/game/Handlers/AddonHandler.h
index 36cb19e5698..36cb19e5698 100755..100644
--- a/src/server/game/Handlers/AddonHandler.h
+++ b/src/server/game/Handlers/AddonHandler.h
diff --git a/src/server/game/Handlers/ArenaTeamHandler.cpp b/src/server/game/Handlers/ArenaTeamHandler.cpp
index b8592fd846e..e3ccee35b47 100755..100644
--- a/src/server/game/Handlers/ArenaTeamHandler.cpp
+++ b/src/server/game/Handlers/ArenaTeamHandler.cpp
@@ -29,7 +29,7 @@
#include "ArenaTeamMgr.h"
#include "Opcodes.h"
-void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket & recvData)
+void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "MSG_INSPECT_ARENA_TEAMS");
@@ -50,7 +50,7 @@ void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket & recvData)
}
}
-void WorldSession::HandleArenaTeamQueryOpcode(WorldPacket & recvData)
+void WorldSession::HandleArenaTeamQueryOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ARENA_TEAM_QUERY");
@@ -64,7 +64,7 @@ void WorldSession::HandleArenaTeamQueryOpcode(WorldPacket & recvData)
}
}
-void WorldSession::HandleArenaTeamRosterOpcode(WorldPacket & recvData)
+void WorldSession::HandleArenaTeamRosterOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ARENA_TEAM_ROSTER");
@@ -75,7 +75,7 @@ void WorldSession::HandleArenaTeamRosterOpcode(WorldPacket & recvData)
arenaTeam->Roster(this);
}
-void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recvData)
+void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_INVITE");
@@ -194,7 +194,7 @@ void WorldSession::HandleArenaTeamDeclineOpcode(WorldPacket & /*recvData*/)
_player->SetArenaTeamIdInvited(0);
}
-void WorldSession::HandleArenaTeamLeaveOpcode(WorldPacket & recvData)
+void WorldSession::HandleArenaTeamLeaveOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_LEAVE");
@@ -236,7 +236,7 @@ void WorldSession::HandleArenaTeamLeaveOpcode(WorldPacket & recvData)
SendArenaTeamCommandResult(ERR_ARENA_TEAM_QUIT_S, arenaTeam->GetName(), "", 0);
}
-void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket & recvData)
+void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_DISBAND");
@@ -258,7 +258,7 @@ void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket & recvData)
}
}
-void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket & recvData)
+void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_REMOVE");
@@ -304,7 +304,7 @@ void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket & recvData)
arenaTeam->BroadcastEvent(ERR_ARENA_TEAM_REMOVE_SSS, 0, 3, name, arenaTeam->GetName(), _player->GetName());
}
-void WorldSession::HandleArenaTeamLeaderOpcode(WorldPacket & recvData)
+void WorldSession::HandleArenaTeamLeaderOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_LEADER");
diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp
index 7e23429be2f..3c38ff8460e 100755..100644
--- a/src/server/game/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Handlers/AuctionHouseHandler.cpp
@@ -34,7 +34,7 @@
//post-incrementation is always slower than pre-incrementation !
//void called when player click on auctioneer npc
-void WorldSession::HandleAuctionHelloOpcode(WorldPacket & recvData)
+void WorldSession::HandleAuctionHelloOpcode(WorldPacket& recvData)
{
uint64 guid; //NPC guid
recvData >> guid;
@@ -86,7 +86,7 @@ void WorldSession::SendAuctionCommandResult(uint32 auctionId, uint32 Action, uin
}
//this function sends notification, if bidder is online
-void WorldSession::SendAuctionBidderNotification(uint32 location, uint32 auctionId, uint64 bidder, uint32 bidSum, uint32 diff, uint32 item_template)
+void WorldSession::SendAuctionBidderNotification(uint32 location, uint32 auctionId, uint64 bidder, uint32 bidSum, uint32 diff, uint32 itemEntry)
{
WorldPacket data(SMSG_AUCTION_BIDDER_NOTIFICATION, (8*4));
data << uint32(location);
@@ -94,7 +94,7 @@ void WorldSession::SendAuctionBidderNotification(uint32 location, uint32 auction
data << uint64(bidder);
data << uint32(bidSum);
data << uint32(diff);
- data << uint32(item_template);
+ data << uint32(itemEntry);
data << uint32(0);
SendPacket(&data);
}
@@ -107,14 +107,14 @@ void WorldSession::SendAuctionOwnerNotification(AuctionEntry* auction)
data << uint32(auction->bid);
data << uint32(0); //unk
data << uint64(0); //unk (bidder guid?)
- data << uint32(auction->item_template);
+ data << uint32(auction->itemEntry);
data << uint32(0); //unk
data << float(0); //unk (time?)
SendPacket(&data);
}
//this void creates new auction and adds auction to some auctionhouse
-void WorldSession::HandleAuctionSellItem(WorldPacket & recvData)
+void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
{
uint64 auctioneer;
uint32 itemsCount, etime, bid, buyout;
@@ -126,7 +126,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recvData)
if (itemsCount > MAX_AUCTION_ITEMS)
{
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
return;
}
@@ -185,7 +185,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recvData)
if (!item)
{
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_ITEM_NOT_FOUND);
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, ERR_AUCTION_ITEM_NOT_FOUND);
return;
}
@@ -193,7 +193,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recvData)
item->GetTemplate()->Flags & ITEM_PROTO_FLAG_CONJURED || item->GetUInt32Value(ITEM_FIELD_DURATION) ||
item->GetCount() < count[i])
{
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
return;
}
@@ -203,7 +203,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recvData)
if (!finalCount)
{
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
return;
}
@@ -213,7 +213,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recvData)
if (item->GetMaxStackCount() < finalCount)
{
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
return;
}
}
@@ -228,7 +228,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recvData)
uint32 deposit = sAuctionMgr->GetAuctionDeposit(auctionHouseEntry, etime, item, finalCount);
if (!_player->HasEnoughMoney(deposit))
{
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_NOT_ENOUGHT_MONEY);
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, ERR_AUCTION_NOT_ENOUGHT_MONEY);
return;
}
@@ -251,8 +251,8 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recvData)
GetPlayerName().c_str(), GetAccountId(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetCount());
}
- AH->item_guidlow = item->GetGUIDLow();
- AH->item_template = item->GetEntry();
+ AH->itemGUIDLow = item->GetGUIDLow();
+ AH->itemEntry = item->GetEntry();
AH->itemCount = item->GetCount();
AH->owner = _player->GetGUIDLow();
AH->startbid = bid;
@@ -276,7 +276,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recvData)
_player->SaveInventoryAndGoldToDB(trans);
CharacterDatabase.CommitTransaction(trans);
- SendAuctionCommandResult(AH->Id, AUCTION_SELL_ITEM, AUCTION_OK);
+ SendAuctionCommandResult(AH->Id, AUCTION_SELL_ITEM, ERR_AUCTION_OK);
GetPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION, 1);
return;
@@ -287,7 +287,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recvData)
if (!newItem)
{
sLog->outError(LOG_FILTER_NETWORKIO, "CMSG_AUCTION_SELL_ITEM: Could not create clone of item %u", item->GetEntry());
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
return;
}
@@ -297,8 +297,8 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recvData)
GetPlayerName().c_str(), GetAccountId(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(), newItem->GetCount());
}
- AH->item_guidlow = newItem->GetGUIDLow();
- AH->item_template = newItem->GetEntry();
+ AH->itemGUIDLow = newItem->GetGUIDLow();
+ AH->itemEntry = newItem->GetEntry();
AH->itemCount = newItem->GetCount();
AH->owner = _player->GetGUIDLow();
AH->startbid = bid;
@@ -346,7 +346,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recvData)
_player->SaveInventoryAndGoldToDB(trans);
CharacterDatabase.CommitTransaction(trans);
- SendAuctionCommandResult(AH->Id, AUCTION_SELL_ITEM, AUCTION_OK);
+ SendAuctionCommandResult(AH->Id, AUCTION_SELL_ITEM, ERR_AUCTION_OK);
GetPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION, 1);
return;
@@ -355,7 +355,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recvData)
}
//this function is called when client bids or buys out auction
-void WorldSession::HandleAuctionPlaceBid(WorldPacket & recvData)
+void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_PLACE_BID");
@@ -387,7 +387,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recvData)
if (!auction || auction->owner == player->GetGUIDLow())
{
//you cannot bid your own auction:
- SendAuctionCommandResult(0, AUCTION_PLACE_BID, CANNOT_BID_YOUR_AUCTION_ERROR);
+ SendAuctionCommandResult(0, AUCTION_PLACE_BID, ERR_AUCTION_BID_OWN);
return;
}
@@ -396,7 +396,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recvData)
if (!auction_owner && sObjectMgr->GetPlayerAccountIdByGUID(MAKE_NEW_GUID(auction->owner, 0, HIGHGUID_PLAYER)) == player->GetSession()->GetAccountId())
{
//you cannot bid your another character auction:
- SendAuctionCommandResult(0, AUCTION_PLACE_BID, CANNOT_BID_YOUR_AUCTION_ERROR);
+ SendAuctionCommandResult(0, AUCTION_PLACE_BID, ERR_AUCTION_BID_OWN);
return;
}
@@ -447,7 +447,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recvData)
stmt->setUInt32(2, auction->Id);
trans->Append(stmt);
- SendAuctionCommandResult(auction->Id, AUCTION_PLACE_BID, AUCTION_OK, 0);
+ SendAuctionCommandResult(auction->Id, AUCTION_PLACE_BID, ERR_AUCTION_OK, 0);
}
else
{
@@ -469,20 +469,20 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recvData)
sAuctionMgr->SendAuctionSuccessfulMail(auction, trans);
sAuctionMgr->SendAuctionWonMail(auction, trans);
- SendAuctionCommandResult(auction->Id, AUCTION_PLACE_BID, AUCTION_OK);
+ SendAuctionCommandResult(auction->Id, AUCTION_PLACE_BID, ERR_AUCTION_OK);
auction->DeleteFromDB(trans);
- uint32 item_template = auction->item_template;
- sAuctionMgr->RemoveAItem(auction->item_guidlow);
- auctionHouse->RemoveAuction(auction, item_template);
+ uint32 itemEntry = auction->itemEntry;
+ sAuctionMgr->RemoveAItem(auction->itemGUIDLow);
+ auctionHouse->RemoveAuction(auction, itemEntry);
}
player->SaveInventoryAndGoldToDB(trans);
CharacterDatabase.CommitTransaction(trans);
}
//this void is called when auction_owner cancels his auction
-void WorldSession::HandleAuctionRemoveItem(WorldPacket & recvData)
+void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_REMOVE_ITEM");
@@ -511,7 +511,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recvData)
SQLTransaction trans = CharacterDatabase.BeginTransaction();
if (auction && auction->owner == player->GetGUIDLow())
{
- Item* pItem = sAuctionMgr->GetAItem(auction->item_guidlow);
+ Item* pItem = sAuctionMgr->GetAItem(auction->itemGUIDLow);
if (pItem)
{
if (auction->bidder > 0) // If we have a bidder, we have to send him the money he paid
@@ -531,21 +531,21 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recvData)
}
else
{
- sLog->outError(LOG_FILTER_NETWORKIO, "Auction id: %u has non-existed item (item guid : %u)!!!", auction->Id, auction->item_guidlow);
- SendAuctionCommandResult(0, AUCTION_CANCEL, AUCTION_INTERNAL_ERROR);
+ sLog->outError(LOG_FILTER_NETWORKIO, "Auction id: %u has non-existed item (item guid : %u)!!!", auction->Id, auction->itemGUIDLow);
+ SendAuctionCommandResult(0, AUCTION_CANCEL, ERR_AUCTION_DATABASE_ERROR);
return;
}
}
else
{
- SendAuctionCommandResult(0, AUCTION_CANCEL, AUCTION_INTERNAL_ERROR);
+ SendAuctionCommandResult(0, AUCTION_CANCEL, ERR_AUCTION_DATABASE_ERROR);
//this code isn't possible ... maybe there should be assert
sLog->outError(LOG_FILTER_NETWORKIO, "CHEATER : %u, he tried to cancel auction (id: %u) of another player, or auction is NULL", player->GetGUIDLow(), auctionId);
return;
}
//inform player, that auction is removed
- SendAuctionCommandResult(auction->Id, AUCTION_CANCEL, AUCTION_OK);
+ SendAuctionCommandResult(auction->Id, AUCTION_CANCEL, ERR_AUCTION_OK);
// Now remove the auction
@@ -553,13 +553,13 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recvData)
auction->DeleteFromDB(trans);
CharacterDatabase.CommitTransaction(trans);
- uint32 item_template = auction->item_template;
- sAuctionMgr->RemoveAItem(auction->item_guidlow);
- auctionHouse->RemoveAuction(auction, item_template);
+ uint32 itemEntry = auction->itemEntry;
+ sAuctionMgr->RemoveAItem(auction->itemGUIDLow);
+ auctionHouse->RemoveAuction(auction, itemEntry);
}
//called when player lists his bids
-void WorldSession::HandleAuctionListBidderItems(WorldPacket & recvData)
+void WorldSession::HandleAuctionListBidderItems(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_LIST_BIDDER_ITEMS");
@@ -616,7 +616,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recvData)
}
//this void sends player info about his auctions
-void WorldSession::HandleAuctionListOwnerItems(WorldPacket & recvData)
+void WorldSession::HandleAuctionListOwnerItems(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_LIST_OWNER_ITEMS");
@@ -653,7 +653,7 @@ void WorldSession::HandleAuctionListOwnerItems(WorldPacket & recvData)
}
//this void is called when player clicks on search button
-void WorldSession::HandleAuctionListItems(WorldPacket & recvData)
+void WorldSession::HandleAuctionListItems(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_LIST_ITEMS");
@@ -720,7 +720,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket & recvData)
SendPacket(&data);
}
-void WorldSession::HandleAuctionListPendingSales(WorldPacket & recvData)
+void WorldSession::HandleAuctionListPendingSales(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_LIST_PENDING_SALES");
diff --git a/src/server/game/Handlers/AuthHandler.cpp b/src/server/game/Handlers/AuthHandler.cpp
index 49027bdf497..49027bdf497 100755..100644
--- a/src/server/game/Handlers/AuthHandler.cpp
+++ b/src/server/game/Handlers/AuthHandler.cpp
diff --git a/src/server/game/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp
index 0a076dfaa34..12f4e6ffa82 100755..100644
--- a/src/server/game/Handlers/BattleGroundHandler.cpp
+++ b/src/server/game/Handlers/BattleGroundHandler.cpp
@@ -35,7 +35,7 @@
#include "DisableMgr.h"
#include "Group.h"
-void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket & recvData)
+void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket& recvData)
{
uint64 guid;
recvData >> guid;
@@ -70,7 +70,7 @@ void WorldSession::SendBattleGroundList(uint64 guid, BattlegroundTypeId bgTypeId
SendPacket(&data);
}
-void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recvData)
+void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
{
uint64 guid;
uint32 bgTypeId_;
@@ -581,7 +581,7 @@ void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recvData*/)
}
}
-void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recvData)
+void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_BATTLEMASTER_JOIN_ARENA");
@@ -749,7 +749,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recvData)
sBattlegroundMgr->ScheduleQueueUpdate(matchmakerRating, arenatype, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
}
-void WorldSession::HandleReportPvPAFK(WorldPacket & recvData)
+void WorldSession::HandleReportPvPAFK(WorldPacket& recvData)
{
uint64 playerGuid;
recvData >> playerGuid;
diff --git a/src/server/game/Battlefield/BattlefieldHandler.cpp b/src/server/game/Handlers/BattlefieldHandler.cpp
index a2d8cec3936..c4225551311 100644
--- a/src/server/game/Battlefield/BattlefieldHandler.cpp
+++ b/src/server/game/Handlers/BattlefieldHandler.cpp
@@ -102,7 +102,7 @@ void WorldSession::HandleBfQueueInviteResponse(WorldPacket & recvData)
uint8 Accepted;
recvData >> BattleId >> Accepted;
- sLog->outError(LOG_FILTER_GENERAL, "HandleQueueInviteResponse: BattleID:%u Accepted:%u", BattleId, Accepted);
+ sLog->outDebug(LOG_FILTER_GENERAL, "HandleQueueInviteResponse: BattleID:%u Accepted:%u", BattleId, Accepted);
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldByBattleId(BattleId);
if (!Bf)
return;
@@ -120,7 +120,7 @@ void WorldSession::HandleBfEntryInviteResponse(WorldPacket & recvData)
uint8 Accepted;
recvData >> BattleId >> Accepted;
- sLog->outError(LOG_FILTER_GENERAL, "HandleBattlefieldInviteResponse: BattleID:%u Accepted:%u", BattleId, Accepted);
+ sLog->outDebug(LOG_FILTER_GENERAL, "HandleBattlefieldInviteResponse: BattleID:%u Accepted:%u", BattleId, Accepted);
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldByBattleId(BattleId);
if (!Bf)
return;
@@ -142,7 +142,7 @@ void WorldSession::HandleBfExitRequest(WorldPacket & recvData)
uint32 BattleId;
recvData >> BattleId;
- sLog->outError(LOG_FILTER_GENERAL, "HandleBfExitRequest: BattleID:%u ", BattleId);
+ sLog->outDebug(LOG_FILTER_GENERAL, "HandleBfExitRequest: BattleID:%u ", BattleId);
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldByBattleId(BattleId);
if (!Bf)
return;
diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp
index 876a0fc4463..876a0fc4463 100755..100644
--- a/src/server/game/Handlers/CalendarHandler.cpp
+++ b/src/server/game/Handlers/CalendarHandler.cpp
diff --git a/src/server/game/Handlers/ChannelHandler.cpp b/src/server/game/Handlers/ChannelHandler.cpp
index 462bc7fff0b..462bc7fff0b 100755..100644
--- a/src/server/game/Handlers/ChannelHandler.cpp
+++ b/src/server/game/Handlers/ChannelHandler.cpp
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index 0b01c796511..9580e1d193a 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -71,135 +71,139 @@ bool LoginQueryHolder::Initialize()
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADFROM, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_FROM, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GROUP_MEMBER);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADGROUP, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_GROUP, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_INSTANCE);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADBOUNDINSTANCES, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_BOUND_INSTANCES, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_AURAS);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADAURAS, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_AURAS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SPELL);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADSPELLS, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_SPELLS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_QUESTSTATUS);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADQUESTSTATUS, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_DAILYQUESTSTATUS);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADDAILYQUESTSTATUS, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_DAILY_QUEST_STATUS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_WEEKLYQUESTSTATUS);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADWEEKLYQUESTSTATUS, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_WEEKLY_QUEST_STATUS, stmt);
+
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_MONTHLYQUESTSTATUS);
+ stmt->setUInt32(0, lowGuid);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_MONTHLY_QUEST_STATUS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SEASONALQUESTSTATUS);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADSEASONALQUESTSTATUS, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_SEASONAL_QUEST_STATUS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_REPUTATION);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADREPUTATION, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_REPUTATION, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_INVENTORY);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADINVENTORY, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_INVENTORY, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_ACTIONS);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADACTIONS, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_ACTIONS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_MAILCOUNT);
stmt->setUInt32(0, lowGuid);
stmt->setUInt64(1, uint64(time(NULL)));
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADMAILCOUNT, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_MAIL_COUNT, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_MAILDATE);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADMAILDATE, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_MAIL_DATE, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SOCIALLIST);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADSOCIALLIST, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_SOCIAL_LIST, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_HOMEBIND);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADHOMEBIND, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_HOME_BIND, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SPELLCOOLDOWNS);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADSPELLCOOLDOWNS, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_SPELL_COOLDOWNS, stmt);
if (sWorld->getBoolConfig(CONFIG_DECLINED_NAMES_USED))
{
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_DECLINEDNAMES);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADDECLINEDNAMES, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_DECLINED_NAMES, stmt);
}
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUILD_MEMBER);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADGUILD, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_GUILD, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_ARENAINFO);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADARENAINFO, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_ARENA_INFO, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_ACHIEVEMENTS);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADACHIEVEMENTS, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_ACHIEVEMENTS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_CRITERIAPROGRESS);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADCRITERIAPROGRESS, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_CRITERIA_PROGRESS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_EQUIPMENTSETS);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADEQUIPMENTSETS, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_EQUIPMENT_SETS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_BGDATA);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADBGDATA, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_BG_DATA, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_GLYPHS);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADGLYPHS, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_GLYPHS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_TALENTS);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADTALENTS, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_TALENTS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PLAYER_ACCOUNT_DATA);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADACCOUNTDATA, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_ACCOUNT_DATA, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SKILLS);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADSKILLS, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_SKILLS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_RANDOMBG);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADRANDOMBG, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_RANDOM_BG, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_BANNED);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADBANNED, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_BANNED, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_QUESTSTATUSREW);
stmt->setUInt32(0, lowGuid);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADQUESTSTATUSREW, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_REW, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ACCOUNT_INSTANCELOCKTIMES);
stmt->setUInt32(0, m_accountId);
- res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADINSTANCELOCKTIMES, stmt);
+ res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_INSTANCE_LOCK_TIMES, stmt);
return res;
}
@@ -252,7 +256,7 @@ void WorldSession::HandleCharEnumOpcode(WorldPacket & /*recvData*/)
_charEnumCallback = CharacterDatabase.AsyncQuery(stmt);
}
-void WorldSession::HandleCharCreateOpcode(WorldPacket & recvData)
+void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData)
{
std::string name;
uint8 race_, class_;
@@ -673,7 +677,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte
}
}
-void WorldSession::HandleCharDeleteOpcode(WorldPacket & recvData)
+void WorldSession::HandleCharDeleteOpcode(WorldPacket& recvData)
{
uint64 guid;
recvData >> guid;
@@ -683,6 +687,7 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recvData)
return;
uint32 accountId = 0;
+ uint8 level = 0;
std::string name;
// is guild leader
@@ -703,14 +708,15 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recvData)
return;
}
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ACCOUNT_NAME_BY_GUID);
+ PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_DATA_BY_GUID);
stmt->setUInt32(0, GUID_LOPART(guid));
if (PreparedQueryResult result = CharacterDatabase.Query(stmt))
{
Field* fields = result->Fetch();
- accountId = fields[0].GetUInt32();
- name = fields[1].GetString();
+ accountId = fields[0].GetUInt32();
+ name = fields[1].GetString();
+ level = fields[2].GetUInt8();
}
// prevent deleting other players' characters using cheating tools
@@ -718,7 +724,7 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recvData)
return;
std::string IP_str = GetRemoteAddress();
- sLog->outInfo(LOG_FILTER_CHARACTER, "Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid));
+ sLog->outInfo(LOG_FILTER_CHARACTER, "Account: %d, IP: %s deleted character: %s, GUID: %u, Level: %u", accountId, IP_str.c_str(), name.c_str(), GUID_LOPART(guid), level);
sScriptMgr->OnPlayerDelete(guid);
sWorld->DeleteCharaceterNameData(GUID_LOPART(guid));
@@ -726,18 +732,18 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recvData)
{
std::string dump;
if (PlayerDumpWriter().GetDump(GUID_LOPART(guid), dump))
- sLog->outCharDump(dump.c_str(), GetAccountId(), GUID_LOPART(guid), name.c_str());
+ sLog->outCharDump(dump.c_str(), accountId, GUID_LOPART(guid), name.c_str());
}
sCalendarMgr->RemoveAllPlayerEventsAndInvites(guid);
- Player::DeleteFromDB(guid, GetAccountId());
+ Player::DeleteFromDB(guid, accountId);
WorldPacket data(SMSG_CHAR_DELETE, 1);
data << uint8(CHAR_DELETE_SUCCESS);
SendPacket(&data);
}
-void WorldSession::HandlePlayerLoginOpcode(WorldPacket & recvData)
+void WorldSession::HandlePlayerLoginOpcode(WorldPacket& recvData)
{
if (PlayerLoading() || GetPlayer() != NULL)
{
@@ -801,7 +807,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
SendPacket(&data);
// load player specific part before send times
- LoadAccountData(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADACCOUNTDATA), PER_CHARACTER_CACHE_MASK);
+ LoadAccountData(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_ACCOUNT_DATA), PER_CHARACTER_CACHE_MASK);
SendAccountDataTimes(PER_CHARACTER_CACHE_MASK);
data.Initialize(SMSG_FEATURE_SYSTEM_STATUS, 2); // added in 2.2.0
@@ -848,7 +854,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
}
//QueryResult* result = CharacterDatabase.PQuery("SELECT guildid, rank FROM guild_member WHERE guid = '%u'", pCurrChar->GetGUIDLow());
- if (PreparedQueryResult resultGuild = holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADGUILD))
+ if (PreparedQueryResult resultGuild = holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_GUILD))
{
Field* fields = resultGuild->Fetch();
pCurrChar->SetInGuild(fields[0].GetUInt32());
@@ -1006,7 +1012,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
delete holder;
}
-void WorldSession::HandleSetFactionAtWar(WorldPacket & recvData)
+void WorldSession::HandleSetFactionAtWar(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_FACTION_ATWAR");
@@ -1026,7 +1032,7 @@ void WorldSession::HandleSetFactionCheat(WorldPacket & /*recvData*/)
GetPlayer()->GetReputationMgr().SendStates();
}
-void WorldSession::HandleTutorialFlag(WorldPacket & recvData)
+void WorldSession::HandleTutorialFlag(WorldPacket& recvData)
{
uint32 data;
recvData >> data;
@@ -1054,7 +1060,7 @@ void WorldSession::HandleTutorialReset(WorldPacket & /*recvData*/)
SetTutorialInt(i, 0x00000000);
}
-void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket & recvData)
+void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_WATCHED_FACTION");
uint32 fact;
@@ -1062,7 +1068,7 @@ void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket & recvData)
GetPlayer()->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, fact);
}
-void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket & recvData)
+void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_FACTION_INACTIVE");
uint32 replistid;
@@ -1279,7 +1285,7 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recvData)
SendPacket(&data);
}
-void WorldSession::HandleAlterAppearance(WorldPacket & recvData)
+void WorldSession::HandleAlterAppearance(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ALTER_APPEARANCE");
@@ -1351,7 +1357,7 @@ void WorldSession::HandleAlterAppearance(WorldPacket & recvData)
_player->SetStandState(0); // stand up
}
-void WorldSession::HandleRemoveGlyph(WorldPacket & recvData)
+void WorldSession::HandleRemoveGlyph(WorldPacket& recvData)
{
uint32 slot;
recvData >> slot;
@@ -1800,7 +1806,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
if (recvData.GetOpcode() == CMSG_CHAR_FACTION_CHANGE)
{
// Delete all Flypaths
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_TAXI_PATH);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_TAXI_PATH);
stmt->setUInt32(0, lowGuid);
trans->Append(stmt);
@@ -1845,7 +1851,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
taximaskstream << '0';
std::string taximask = taximaskstream.str();
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_TAXIMASK);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_TAXIMASK);
stmt->setString(0, taximask);
stmt->setUInt32(1, lowGuid);
trans->Append(stmt);
@@ -1892,7 +1898,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD))
{
// Reset guild
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUILD_MEMBER);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUILD_MEMBER);
stmt->setUInt32(0, lowGuid);
@@ -1905,7 +1911,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND))
{
// Delete Friend List
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SOCIAL_BY_GUID);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SOCIAL_BY_GUID);
stmt->setUInt32(0, lowGuid);
trans->Append(stmt);
@@ -1951,7 +1957,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
uint32 achiev_alliance = it->first;
uint32 achiev_horde = it->second;
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_ACHIEVEMENT_BY_ACHIEVEMENT);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_ACHIEVEMENT_BY_ACHIEVEMENT);
stmt->setUInt16(0, uint16(team == TEAM_ALLIANCE ? achiev_alliance : achiev_horde));
stmt->setUInt32(1, lowGuid);
trans->Append(stmt);
@@ -1969,7 +1975,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
uint32 item_alliance = it->first;
uint32 item_horde = it->second;
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_INVENTORY_FACTION_CHANGE);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_INVENTORY_FACTION_CHANGE);
stmt->setUInt32(0, (team == TEAM_ALLIANCE ? item_alliance : item_horde));
stmt->setUInt32(1, (team == TEAM_ALLIANCE ? item_horde : item_alliance));
stmt->setUInt32(2, guid);
@@ -1982,7 +1988,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
uint32 spell_alliance = it->first;
uint32 spell_horde = it->second;
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SPELL_BY_SPELL);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SPELL_BY_SPELL);
stmt->setUInt32(0, (team == TEAM_ALLIANCE ? spell_alliance : spell_horde));
stmt->setUInt32(1, lowGuid);
trans->Append(stmt);
@@ -2003,7 +2009,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
uint32 oldReputation = (team == TEAM_ALLIANCE) ? reputation_horde : reputation_alliance;
// select old standing set in db
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_REP_BY_FACTION);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_REP_BY_FACTION);
stmt->setUInt32(0, oldReputation);
stmt->setUInt32(1, lowGuid);
PreparedQueryResult result = CharacterDatabase.Query(stmt);
@@ -2095,7 +2101,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
for (uint32 index = 0; index < ktcount; ++index)
ss << knownTitles[index] << ' ';
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_TITLES_FACTION_CHANGE);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_TITLES_FACTION_CHANGE);
stmt->setString(0, ss.str().c_str());
stmt->setUInt32(1, lowGuid);
trans->Append(stmt);
diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp
index e4989816998..e4989816998 100755..100644
--- a/src/server/game/Handlers/ChatHandler.cpp
+++ b/src/server/game/Handlers/ChatHandler.cpp
diff --git a/src/server/game/Handlers/CombatHandler.cpp b/src/server/game/Handlers/CombatHandler.cpp
index d30164b2592..d30164b2592 100755..100644
--- a/src/server/game/Handlers/CombatHandler.cpp
+++ b/src/server/game/Handlers/CombatHandler.cpp
diff --git a/src/server/game/Handlers/DuelHandler.cpp b/src/server/game/Handlers/DuelHandler.cpp
index bdfb2369198..bdfb2369198 100755..100644
--- a/src/server/game/Handlers/DuelHandler.cpp
+++ b/src/server/game/Handlers/DuelHandler.cpp
diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp
index 8555b4a6a1f..5b517e1d726 100755..100644
--- a/src/server/game/Handlers/GroupHandler.cpp
+++ b/src/server/game/Handlers/GroupHandler.cpp
@@ -57,7 +57,7 @@ void WorldSession::SendPartyResult(PartyOperation operation, const std::string&
SendPacket(&data);
}
-void WorldSession::HandleGroupInviteOpcode(WorldPacket & recvData)
+void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_INVITE");
@@ -271,7 +271,7 @@ void WorldSession::HandleGroupDeclineOpcode(WorldPacket & /*recvData*/)
leader->GetSession()->SendPacket(&data);
}
-void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket & recvData)
+void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_UNINVITE_GUID");
@@ -320,7 +320,7 @@ void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket & recvData)
SendPartyResult(PARTY_OP_UNINVITE, "", ERR_TARGET_NOT_IN_GROUP_S);
}
-void WorldSession::HandleGroupUninviteOpcode(WorldPacket & recvData)
+void WorldSession::HandleGroupUninviteOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_UNINVITE");
@@ -365,7 +365,7 @@ void WorldSession::HandleGroupUninviteOpcode(WorldPacket & recvData)
SendPartyResult(PARTY_OP_UNINVITE, membername, ERR_TARGET_NOT_IN_GROUP_S);
}
-void WorldSession::HandleGroupSetLeaderOpcode(WorldPacket & recvData)
+void WorldSession::HandleGroupSetLeaderOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_SET_LEADER");
@@ -409,7 +409,7 @@ void WorldSession::HandleGroupDisbandOpcode(WorldPacket & /*recvData*/)
GetPlayer()->RemoveFromGroup(GROUP_REMOVEMETHOD_LEAVE);
}
-void WorldSession::HandleLootMethodOpcode(WorldPacket & recvData)
+void WorldSession::HandleLootMethodOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_LOOT_METHOD");
@@ -513,7 +513,7 @@ void WorldSession::HandleRandomRollOpcode(WorldPacket& recvData)
SendPacket(&data);
}
-void WorldSession::HandleRaidTargetUpdateOpcode(WorldPacket & recvData)
+void WorldSession::HandleRaidTargetUpdateOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_RAID_TARGET_UPDATE");
@@ -564,7 +564,7 @@ void WorldSession::HandleGroupRaidConvertOpcode(WorldPacket & /*recvData*/)
group->ConvertToRaid();
}
-void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recvData)
+void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_CHANGE_SUB_GROUP");
@@ -603,7 +603,7 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recvData)
group->ChangeMembersGroup(guid, groupNr);
}
-void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket & recvData)
+void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_ASSISTANT_LEADER");
@@ -624,7 +624,7 @@ void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket & recvData)
group->SendUpdate();
}
-void WorldSession::HandlePartyAssignmentOpcode(WorldPacket & recvData)
+void WorldSession::HandlePartyAssignmentOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_PARTY_ASSIGNMENT");
@@ -658,7 +658,7 @@ void WorldSession::HandlePartyAssignmentOpcode(WorldPacket & recvData)
group->SendUpdate();
}
-void WorldSession::HandleRaidReadyCheckOpcode(WorldPacket & recvData)
+void WorldSession::HandleRaidReadyCheckOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_RAID_READY_CHECK");
@@ -969,12 +969,12 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recvData)
_player->SendRaidInfo();
}
-/*void WorldSession::HandleGroupCancelOpcode(WorldPacket & recvData)
+/*void WorldSession::HandleGroupCancelOpcode(WorldPacket& recvData)
{
sLog->outDebug("WORLD: got CMSG_GROUP_CANCEL.");
}*/
-void WorldSession::HandleOptOutOfLootOpcode(WorldPacket & recvData)
+void WorldSession::HandleOptOutOfLootOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_OPT_OUT_OF_LOOT");
diff --git a/src/server/game/Handlers/GuildHandler.cpp b/src/server/game/Handlers/GuildHandler.cpp
index 929a31938d2..929a31938d2 100755..100644
--- a/src/server/game/Handlers/GuildHandler.cpp
+++ b/src/server/game/Handlers/GuildHandler.cpp
diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp
index 6dc7dc427d3..2053f14e814 100755..100644
--- a/src/server/game/Handlers/ItemHandler.cpp
+++ b/src/server/game/Handlers/ItemHandler.cpp
@@ -28,7 +28,7 @@
#include "ObjectAccessor.h"
#include "SpellInfo.h"
-void WorldSession::HandleSplitItemOpcode(WorldPacket & recvData)
+void WorldSession::HandleSplitItemOpcode(WorldPacket& recvData)
{
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_SPLIT_ITEM");
uint8 srcbag, srcslot, dstbag, dstslot;
@@ -61,7 +61,7 @@ void WorldSession::HandleSplitItemOpcode(WorldPacket & recvData)
_player->SplitItem(src, dst, count);
}
-void WorldSession::HandleSwapInvItemOpcode(WorldPacket & recvData)
+void WorldSession::HandleSwapInvItemOpcode(WorldPacket& recvData)
{
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_SWAP_INV_ITEM");
uint8 srcslot, dstslot;
@@ -91,7 +91,7 @@ void WorldSession::HandleSwapInvItemOpcode(WorldPacket & recvData)
_player->SwapItem(src, dst);
}
-void WorldSession::HandleAutoEquipItemSlotOpcode(WorldPacket & recvData)
+void WorldSession::HandleAutoEquipItemSlotOpcode(WorldPacket& recvData)
{
uint64 itemguid;
uint8 dstslot;
@@ -110,7 +110,7 @@ void WorldSession::HandleAutoEquipItemSlotOpcode(WorldPacket & recvData)
_player->SwapItem(item->GetPos(), dstpos);
}
-void WorldSession::HandleSwapItem(WorldPacket & recvData)
+void WorldSession::HandleSwapItem(WorldPacket& recvData)
{
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_SWAP_ITEM");
uint8 dstbag, dstslot, srcbag, srcslot;
@@ -140,7 +140,7 @@ void WorldSession::HandleSwapItem(WorldPacket & recvData)
_player->SwapItem(src, dst);
}
-void WorldSession::HandleAutoEquipItemOpcode(WorldPacket & recvData)
+void WorldSession::HandleAutoEquipItemOpcode(WorldPacket& recvData)
{
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_AUTOEQUIP_ITEM");
uint8 srcbag, srcslot;
@@ -234,7 +234,7 @@ void WorldSession::HandleAutoEquipItemOpcode(WorldPacket & recvData)
}
}
-void WorldSession::HandleDestroyItemOpcode(WorldPacket & recvData)
+void WorldSession::HandleDestroyItemOpcode(WorldPacket& recvData)
{
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_DESTROYITEM");
uint8 bag, slot, count, data1, data2, data3;
@@ -278,7 +278,7 @@ void WorldSession::HandleDestroyItemOpcode(WorldPacket & recvData)
}
// Only _static_ data send in this packet !!!
-void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recvData)
+void WorldSession::HandleItemQuerySingleOpcode(WorldPacket& recvData)
{
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_ITEM_QUERY_SINGLE");
uint32 item;
@@ -437,7 +437,7 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recvData)
}
}
-void WorldSession::HandleReadItem(WorldPacket & recvData)
+void WorldSession::HandleReadItem(WorldPacket& recvData)
{
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_READ_ITEM");
@@ -470,7 +470,7 @@ void WorldSession::HandleReadItem(WorldPacket & recvData)
_player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL);
}
-void WorldSession::HandlePageQuerySkippedOpcode(WorldPacket & recvData)
+void WorldSession::HandlePageQuerySkippedOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_PAGE_TEXT_QUERY");
@@ -483,7 +483,7 @@ void WorldSession::HandlePageQuerySkippedOpcode(WorldPacket & recvData)
itemid, GUID_LOPART(guid), GUID_ENPART(guid), GUID_HIPART(guid));
}
-void WorldSession::HandleSellItemOpcode(WorldPacket & recvData)
+void WorldSession::HandleSellItemOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SELL_ITEM");
uint64 vendorguid, itemguid;
@@ -538,9 +538,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket & recvData)
// special case at auto sell (sell all)
if (count == 0)
- {
count = pItem->GetCount();
- }
else
{
// prevent sell more items that exist in stack (possible only not from client)
@@ -597,7 +595,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket & recvData)
return;
}
-void WorldSession::HandleBuybackItem(WorldPacket & recvData)
+void WorldSession::HandleBuybackItem(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUYBACK_ITEM");
uint64 vendorguid;
@@ -645,7 +643,7 @@ void WorldSession::HandleBuybackItem(WorldPacket & recvData)
_player->SendBuyError(BUY_ERR_CANT_FIND_ITEM, creature, 0, 0);
}
-void WorldSession::HandleBuyItemInSlotOpcode(WorldPacket & recvData)
+void WorldSession::HandleBuyItemInSlotOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUY_ITEM_IN_SLOT");
uint64 vendorguid, bagguid;
@@ -687,7 +685,7 @@ void WorldSession::HandleBuyItemInSlotOpcode(WorldPacket & recvData)
GetPlayer()->BuyItemFromVendorSlot(vendorguid, slot, item, count, bag, bagslot);
}
-void WorldSession::HandleBuyItemOpcode(WorldPacket & recvData)
+void WorldSession::HandleBuyItemOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUY_ITEM");
uint64 vendorguid;
@@ -705,7 +703,7 @@ void WorldSession::HandleBuyItemOpcode(WorldPacket & recvData)
GetPlayer()->BuyItemFromVendorSlot(vendorguid, slot, item, count, NULL_BAG, NULL_SLOT);
}
-void WorldSession::HandleListInventoryOpcode(WorldPacket & recvData)
+void WorldSession::HandleListInventoryOpcode(WorldPacket& recvData)
{
uint64 guid;
@@ -779,6 +777,13 @@ void WorldSession::SendListInventory(uint64 vendorGuid)
if (!_player->isGameMaster() && !leftInStock)
continue;
+ ConditionList conditions = sConditionMgr->GetConditionsForNpcVendorEvent(vendor->GetEntry(), item->item);
+ if (!sConditionMgr->IsObjectMeetToConditions(_player, vendor, conditions))
+ {
+ sLog->outDebug(LOG_FILTER_CONDITIONSYS, "SendListInventory: conditions not met for creature entry %u item %u", vendor->GetEntry(), item->item);
+ continue;
+ }
+
++count;
// reputation discount
@@ -807,7 +812,7 @@ void WorldSession::SendListInventory(uint64 vendorGuid)
SendPacket(&data);
}
-void WorldSession::HandleAutoStoreBagItemOpcode(WorldPacket & recvData)
+void WorldSession::HandleAutoStoreBagItemOpcode(WorldPacket& recvData)
{
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_AUTOSTORE_BAG_ITEM");
uint8 srcbag, srcslot, dstbag;
@@ -983,7 +988,7 @@ void WorldSession::HandleAutoStoreBankItemOpcode(WorldPacket& recvPacket)
}
}
-void WorldSession::HandleSetAmmoOpcode(WorldPacket & recvData)
+void WorldSession::HandleSetAmmoOpcode(WorldPacket& recvData)
{
if (!GetPlayer()->isAlive())
{
@@ -1024,7 +1029,7 @@ void WorldSession::SendItemEnchantTimeUpdate(uint64 Playerguid, uint64 Itemguid,
SendPacket(&data);
}
-void WorldSession::HandleItemNameQueryOpcode(WorldPacket & recvData)
+void WorldSession::HandleItemNameQueryOpcode(WorldPacket& recvData)
{
uint32 itemid;
recvData >> itemid;
@@ -1415,7 +1420,7 @@ void WorldSession::HandleItemRefund(WorldPacket &recvData)
*
* This function is called when player clicks on item which has some flag set
*/
-void WorldSession::HandleItemTextQuery(WorldPacket & recvData )
+void WorldSession::HandleItemTextQuery(WorldPacket& recvData )
{
uint64 itemGuid;
recvData >> itemGuid;
diff --git a/src/server/game/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp
index 3f33b60329b..3f33b60329b 100755..100644
--- a/src/server/game/Handlers/LFGHandler.cpp
+++ b/src/server/game/Handlers/LFGHandler.cpp
diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp
index 1c9719a210f..b15636e75d2 100755..100644
--- a/src/server/game/Handlers/LootHandler.cpp
+++ b/src/server/game/Handlers/LootHandler.cpp
@@ -31,7 +31,7 @@
#include "WorldPacket.h"
#include "WorldSession.h"
-void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket & recvData)
+void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AUTOSTORE_LOOT_ITEM");
Player* player = GetPlayer();
@@ -93,6 +93,10 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket & recvData)
}
player->StoreLootItem(lootSlot, loot);
+
+ // If player is removing the last LootItem, delete the empty container.
+ if (loot->isLooted() && IS_ITEM_GUID(lguid))
+ player->GetSession()->DoLootRelease(lguid);
}
void WorldSession::HandleLootMoneyOpcode(WorldPacket & /*recvData*/)
@@ -200,10 +204,18 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket & /*recvData*/)
}
loot->gold = 0;
+
+ // Delete the money loot record from the DB
+ if (loot->containerID > 0)
+ loot->DeleteLootMoneyFromContainerItemDB();
+
+ // Delete container if empty
+ if (loot->isLooted() && IS_ITEM_GUID(guid))
+ player->GetSession()->DoLootRelease(guid);
}
}
-void WorldSession::HandleLootOpcode(WorldPacket & recvData)
+void WorldSession::HandleLootOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_LOOT");
@@ -381,8 +393,8 @@ void WorldSession::DoLootRelease(uint64 lguid)
player->DestroyItemCount(pItem, count, true);
}
else
- // FIXME: item must not be deleted in case not fully looted state. But this pre-request implement loot saving in DB at item save. Or cheating possible.
- player->DestroyItem(pItem->GetBagSlot(), pItem->GetSlot(), true);
+ if (pItem->loot.isLooted()) // Only delete item if no loot or money (unlooted loot is saved to db)
+ player->DestroyItem(pItem->GetBagSlot(), pItem->GetSlot(), true);
return; // item can be looted only single player
}
else
@@ -429,7 +441,7 @@ void WorldSession::DoLootRelease(uint64 lguid)
loot->RemoveLooter(player->GetGUID());
}
-void WorldSession::HandleLootMasterGiveOpcode(WorldPacket & recvData)
+void WorldSession::HandleLootMasterGiveOpcode(WorldPacket& recvData)
{
uint8 slotid;
uint64 lootguid, target_playerguid;
diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp
index cb3a6d920b8..6b8c83cce73 100755..100644
--- a/src/server/game/Handlers/MailHandler.cpp
+++ b/src/server/game/Handlers/MailHandler.cpp
@@ -29,7 +29,7 @@
#include "Item.h"
#include "AccountMgr.h"
-void WorldSession::HandleSendMail(WorldPacket & recvData)
+void WorldSession::HandleSendMail(WorldPacket& recvData)
{
uint64 mailbox, unk3;
std::string receiver, subject, body;
@@ -302,7 +302,7 @@ void WorldSession::HandleSendMail(WorldPacket & recvData)
}
//called when mail is read
-void WorldSession::HandleMailMarkAsRead(WorldPacket & recvData)
+void WorldSession::HandleMailMarkAsRead(WorldPacket& recvData)
{
uint64 mailbox;
uint32 mailId;
@@ -325,7 +325,7 @@ void WorldSession::HandleMailMarkAsRead(WorldPacket & recvData)
}
//called when client deletes mail
-void WorldSession::HandleMailDelete(WorldPacket & recvData)
+void WorldSession::HandleMailDelete(WorldPacket& recvData)
{
uint64 mailbox;
uint32 mailId;
@@ -353,7 +353,7 @@ void WorldSession::HandleMailDelete(WorldPacket & recvData)
player->SendMailResult(mailId, MAIL_DELETED, MAIL_OK);
}
-void WorldSession::HandleMailReturnToSender(WorldPacket & recvData)
+void WorldSession::HandleMailReturnToSender(WorldPacket& recvData)
{
uint64 mailbox;
uint32 mailId;
@@ -417,7 +417,7 @@ void WorldSession::HandleMailReturnToSender(WorldPacket & recvData)
}
//called when player takes item attached in mail
-void WorldSession::HandleMailTakeItem(WorldPacket & recvData)
+void WorldSession::HandleMailTakeItem(WorldPacket& recvData)
{
uint64 mailbox;
uint32 mailId;
@@ -513,7 +513,7 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recvData)
player->SendMailResult(mailId, MAIL_ITEM_TAKEN, MAIL_ERR_EQUIP_ERROR, msg);
}
-void WorldSession::HandleMailTakeMoney(WorldPacket & recvData)
+void WorldSession::HandleMailTakeMoney(WorldPacket& recvData)
{
uint64 mailbox;
uint32 mailId;
@@ -547,7 +547,7 @@ void WorldSession::HandleMailTakeMoney(WorldPacket & recvData)
}
//called when player lists his received mails
-void WorldSession::HandleGetMailList(WorldPacket & recvData)
+void WorldSession::HandleGetMailList(WorldPacket& recvData)
{
uint64 mailbox;
recvData >> mailbox;
@@ -617,7 +617,7 @@ void WorldSession::HandleGetMailList(WorldPacket & recvData)
data << uint32((*itr)->stationery); // stationery (Stationery.dbc)
data << uint32((*itr)->money); // Gold
data << uint32((*itr)->checked); // flags
- data << float(((*itr)->expire_time-time(NULL))/DAY); // Time
+ data << float(float((*itr)->expire_time-time(NULL))/DAY); // Time
data << uint32((*itr)->mailTemplateId); // mail template (MailTemplate.dbc)
data << (*itr)->subject; // Subject string - once 00, when mail type = 3, max 256
data << (*itr)->body; // message? max 8000
@@ -667,7 +667,7 @@ void WorldSession::HandleGetMailList(WorldPacket & recvData)
}
//used when player copies mail body to his inventory
-void WorldSession::HandleMailCreateTextItem(WorldPacket & recvData)
+void WorldSession::HandleMailCreateTextItem(WorldPacket& recvData)
{
uint64 mailbox;
uint32 mailId;
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index aa182a16d91..aa182a16d91 100755..100644
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp
index 0eaf3c127b7..9ad70772476 100755..100644
--- a/src/server/game/Handlers/MovementHandler.cpp
+++ b/src/server/game/Handlers/MovementHandler.cpp
@@ -239,7 +239,7 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recvData)
GetPlayer()->ProcessDelayedOperations();
}
-void WorldSession::HandleMovementOpcodes(WorldPacket & recvData)
+void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
{
uint16 opcode = recvData.GetOpcode();
@@ -523,7 +523,7 @@ void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket& /*recvData*/)
GetPlayer()->SendMessageToSet(&data, false);
}
-void WorldSession::HandleMoveKnockBackAck(WorldPacket & recvData)
+void WorldSession::HandleMoveKnockBackAck(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_MOVE_KNOCK_BACK_ACK");
diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp
index ef0f8e130b6..a9cb7e9b806 100755..100644
--- a/src/server/game/Handlers/NPCHandler.cpp
+++ b/src/server/game/Handlers/NPCHandler.cpp
@@ -48,7 +48,7 @@ enum StableResultCode
STABLE_ERR_EXOTIC = 0x0C // "you are unable to control exotic creatures"
};
-void WorldSession::HandleTabardVendorActivateOpcode(WorldPacket & recvData)
+void WorldSession::HandleTabardVendorActivateOpcode(WorldPacket& recvData)
{
uint64 guid;
recvData >> guid;
@@ -74,7 +74,7 @@ void WorldSession::SendTabardVendorActivate(uint64 guid)
SendPacket(&data);
}
-void WorldSession::HandleBankerActivateOpcode(WorldPacket & recvData)
+void WorldSession::HandleBankerActivateOpcode(WorldPacket& recvData)
{
uint64 guid;
@@ -103,7 +103,7 @@ void WorldSession::SendShowBank(uint64 guid)
SendPacket(&data);
}
-void WorldSession::HandleTrainerListOpcode(WorldPacket & recvData)
+void WorldSession::HandleTrainerListOpcode(WorldPacket& recvData)
{
uint64 guid;
@@ -235,7 +235,7 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle)
SendPacket(&data);
}
-void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket & recvData)
+void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recvData)
{
uint64 guid;
uint32 spellId = 0;
@@ -295,7 +295,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket & recvData)
SendPacket(&data);
}
-void WorldSession::HandleGossipHelloOpcode(WorldPacket & recvData)
+void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GOSSIP_HELLO");
@@ -344,7 +344,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recvData)
unit->AI()->sGossipHello(_player);
}
-/*void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recvData)
+/*void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_GOSSIP_SELECT_OPTION");
@@ -385,7 +385,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recvData)
}
}*/
-void WorldSession::HandleSpiritHealerActivateOpcode(WorldPacket & recvData)
+void WorldSession::HandleSpiritHealerActivateOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_SPIRIT_HEALER_ACTIVATE");
@@ -440,7 +440,7 @@ void WorldSession::SendSpiritResurrect()
_player->UpdateObjectVisibility();
}
-void WorldSession::HandleBinderActivateOpcode(WorldPacket & recvData)
+void WorldSession::HandleBinderActivateOpcode(WorldPacket& recvData)
{
uint64 npcGUID;
recvData >> npcGUID;
@@ -470,22 +470,6 @@ void WorldSession::SendBindPoint(Creature* npc)
uint32 bindspell = 3286;
- // update sql homebind
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_PLAYER_HOMEBIND);
- stmt->setUInt16(0, _player->GetMapId());
- stmt->setUInt16(1, _player->GetAreaId());
- stmt->setFloat (2, _player->GetPositionX());
- stmt->setFloat (3, _player->GetPositionY());
- stmt->setFloat (4, _player->GetPositionZ());
- stmt->setUInt32(5, _player->GetGUIDLow());
- CharacterDatabase.Execute(stmt);
-
- _player->m_homebindMapId = _player->GetMapId();
- _player->m_homebindAreaId = _player->GetAreaId();
- _player->m_homebindX = _player->GetPositionX();
- _player->m_homebindY = _player->GetPositionY();
- _player->m_homebindZ = _player->GetPositionZ();
-
// send spell for homebinding (3286)
npc->CastSpell(_player, bindspell, true);
@@ -497,7 +481,7 @@ void WorldSession::SendBindPoint(Creature* npc)
_player->PlayerTalkClass->SendCloseGossip();
}
-void WorldSession::HandleListStabledPetsOpcode(WorldPacket & recvData)
+void WorldSession::HandleListStabledPetsOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv MSG_LIST_STABLED_PETS");
uint64 npcGUID;
@@ -590,7 +574,7 @@ void WorldSession::SendStableResult(uint8 res)
SendPacket(&data);
}
-void WorldSession::HandleStablePet(WorldPacket & recvData)
+void WorldSession::HandleStablePet(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_STABLE_PET");
uint64 npcGUID;
@@ -665,7 +649,7 @@ void WorldSession::HandleStablePetCallback(PreparedQueryResult result)
SendStableResult(STABLE_ERR_STABLE);
}
-void WorldSession::HandleUnstablePet(WorldPacket & recvData)
+void WorldSession::HandleUnstablePet(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_UNSTABLE_PET.");
uint64 npcGUID;
@@ -746,7 +730,7 @@ void WorldSession::HandleUnstablePetCallback(PreparedQueryResult result, uint32
SendStableResult(STABLE_SUCCESS_UNSTABLE);
}
-void WorldSession::HandleBuyStableSlot(WorldPacket & recvData)
+void WorldSession::HandleBuyStableSlot(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_BUY_STABLE_SLOT.");
uint64 npcGUID;
@@ -784,7 +768,7 @@ void WorldSession::HandleStableRevivePet(WorldPacket &/* recvData */)
sLog->outDebug(LOG_FILTER_NETWORKIO, "HandleStableRevivePet: Not implemented");
}
-void WorldSession::HandleStableSwapPet(WorldPacket & recvData)
+void WorldSession::HandleStableSwapPet(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_STABLE_SWAP_PET.");
uint64 npcGUID;
@@ -876,7 +860,7 @@ void WorldSession::HandleStableSwapPetCallback(PreparedQueryResult result, uint3
SendStableResult(STABLE_SUCCESS_UNSTABLE);
}
-void WorldSession::HandleRepairItemOpcode(WorldPacket & recvData)
+void WorldSession::HandleRepairItemOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_REPAIR_ITEM");
diff --git a/src/server/game/Handlers/NPCHandler.h b/src/server/game/Handlers/NPCHandler.h
index af84b71a74f..af84b71a74f 100755..100644
--- a/src/server/game/Handlers/NPCHandler.h
+++ b/src/server/game/Handlers/NPCHandler.h
diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp
index 97a2765b4df..6bcbcbbcfc9 100755..100644
--- a/src/server/game/Handlers/PetHandler.cpp
+++ b/src/server/game/Handlers/PetHandler.cpp
@@ -56,7 +56,7 @@ void WorldSession::HandleDismissCritter(WorldPacket& recvData)
}
}
-void WorldSession::HandlePetAction(WorldPacket & recvData)
+void WorldSession::HandlePetAction(WorldPacket& recvData)
{
uint64 guid1;
uint32 data;
@@ -162,6 +162,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
charmInfo->SetIsCommandAttack(false);
charmInfo->SetIsAtStay(true);
+ charmInfo->SetIsCommandFollow(false);
charmInfo->SetIsFollowing(false);
charmInfo->SetIsReturning(false);
charmInfo->SaveStayPosition();
@@ -175,6 +176,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
charmInfo->SetIsCommandAttack(false);
charmInfo->SetIsAtStay(false);
charmInfo->SetIsReturning(true);
+ charmInfo->SetIsCommandFollow(true);
charmInfo->SetIsFollowing(false);
break;
case COMMAND_ATTACK: //spellid=1792 //ATTACK
@@ -208,6 +210,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
charmInfo->SetIsCommandAttack(true);
charmInfo->SetIsAtStay(false);
charmInfo->SetIsFollowing(false);
+ charmInfo->SetIsCommandFollow(false);
charmInfo->SetIsReturning(false);
pet->ToCreature()->AI()->AttackStart(TargetUnit);
@@ -229,6 +232,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
charmInfo->SetIsCommandAttack(true);
charmInfo->SetIsAtStay(false);
charmInfo->SetIsFollowing(false);
+ charmInfo->SetIsCommandFollow(false);
charmInfo->SetIsReturning(false);
pet->Attack(TargetUnit, true);
@@ -396,7 +400,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
}
}
-void WorldSession::HandlePetNameQuery(WorldPacket & recvData)
+void WorldSession::HandlePetNameQuery(WorldPacket& recvData)
{
sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetNameQuery. CMSG_PET_NAME_QUERY");
@@ -463,7 +467,7 @@ bool WorldSession::CheckStableMaster(uint64 guid)
return true;
}
-void WorldSession::HandlePetSetAction(WorldPacket & recvData)
+void WorldSession::HandlePetSetAction(WorldPacket& recvData)
{
sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetSetAction. CMSG_PET_SET_ACTION");
@@ -580,7 +584,7 @@ void WorldSession::HandlePetSetAction(WorldPacket & recvData)
}
}
-void WorldSession::HandlePetRename(WorldPacket & recvData)
+void WorldSession::HandlePetRename(WorldPacket& recvData)
{
sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetRename. CMSG_PET_RENAME");
@@ -665,7 +669,7 @@ void WorldSession::HandlePetRename(WorldPacket & recvData)
pet->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, uint32(time(NULL))); // cast can't be helped
}
-void WorldSession::HandlePetAbandon(WorldPacket & recvData)
+void WorldSession::HandlePetAbandon(WorldPacket& recvData)
{
uint64 guid;
recvData >> guid; //pet guid
@@ -861,7 +865,7 @@ void WorldSession::HandlePetLearnTalent(WorldPacket& recvData)
_player->SendTalentsInfoData(true);
}
-void WorldSession::HandleLearnPreviewTalentsPet(WorldPacket & recvData)
+void WorldSession::HandleLearnPreviewTalentsPet(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LEARN_PREVIEW_TALENTS_PET");
diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp
index 0da9c762ca9..1704229674e 100755..100644
--- a/src/server/game/Handlers/PetitionsHandler.cpp
+++ b/src/server/game/Handlers/PetitionsHandler.cpp
@@ -50,7 +50,7 @@ enum CharterCosts
ARENA_TEAM_CHARTER_5v5_COST = 2000000
};
-void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recvData)
+void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_BUY");
@@ -305,7 +305,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recvData)
SendPacket(&data);
}
-void WorldSession::HandlePetitionQueryOpcode(WorldPacket & recvData)
+void WorldSession::HandlePetitionQueryOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_QUERY"); // ok
@@ -380,7 +380,7 @@ void WorldSession::SendPetitionQueryOpcode(uint64 petitionguid)
SendPacket(&data);
}
-void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recvData)
+void WorldSession::HandlePetitionRenameOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode MSG_PETITION_RENAME"); // ok
@@ -453,7 +453,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recvData)
SendPacket(&data);
}
-void WorldSession::HandlePetitionSignOpcode(WorldPacket & recvData)
+void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_SIGN"); // ok
@@ -590,7 +590,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recvData)
owner->GetSession()->SendPacket(&data);
}
-void WorldSession::HandlePetitionDeclineOpcode(WorldPacket & recvData)
+void WorldSession::HandlePetitionDeclineOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode MSG_PETITION_DECLINE"); // ok
@@ -620,7 +620,7 @@ void WorldSession::HandlePetitionDeclineOpcode(WorldPacket & recvData)
}
}
-void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recvData)
+void WorldSession::HandleOfferPetitionOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_OFFER_PETITION"); // ok
@@ -729,7 +729,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recvData)
player->GetSession()->SendPacket(&data);
}
-void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recvData)
+void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_TURN_IN_PETITION");
@@ -919,7 +919,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recvData)
SendPacket(&data);
}
-void WorldSession::HandlePetitionShowListOpcode(WorldPacket & recvData)
+void WorldSession::HandlePetitionShowListOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received CMSG_PETITION_SHOWLIST");
diff --git a/src/server/game/Handlers/QueryHandler.cpp b/src/server/game/Handlers/QueryHandler.cpp
index 534f992b594..e44fbd0d899 100755..100644
--- a/src/server/game/Handlers/QueryHandler.cpp
+++ b/src/server/game/Handlers/QueryHandler.cpp
@@ -89,7 +89,7 @@ void WorldSession::SendQueryTimeResponse()
}
/// Only _static_ data is sent in this packet !!!
-void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recvData)
+void WorldSession::HandleCreatureQueryOpcode(WorldPacket& recvData)
{
uint32 entry;
recvData >> entry;
@@ -152,7 +152,7 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recvData)
}
/// Only _static_ data is sent in this packet !!!
-void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recvData)
+void WorldSession::HandleGameObjectQueryOpcode(WorldPacket& recvData)
{
uint32 entry;
recvData >> entry;
@@ -258,7 +258,7 @@ void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recvData*/)
SendPacket(&data);
}
-void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recvData)
+void WorldSession::HandleNpcTextQueryOpcode(WorldPacket& recvData)
{
uint32 textID;
uint64 guid;
@@ -342,7 +342,7 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recvData)
}
/// Only _static_ data is sent in this packet !!!
-void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recvData)
+void WorldSession::HandlePageTextQueryOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_PAGE_TEXT_QUERY");
@@ -382,7 +382,7 @@ void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recvData)
}
}
-void WorldSession::HandleCorpseMapPositionQuery(WorldPacket & recvData)
+void WorldSession::HandleCorpseMapPositionQuery(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_CORPSE_MAP_POSITION_QUERY");
diff --git a/src/server/game/Handlers/QuestHandler.cpp b/src/server/game/Handlers/QuestHandler.cpp
index 4196bc26b91..8b230ae05c9 100755..100644
--- a/src/server/game/Handlers/QuestHandler.cpp
+++ b/src/server/game/Handlers/QuestHandler.cpp
@@ -33,7 +33,7 @@
#include "ScriptMgr.h"
#include "GameObjectAI.h"
-void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recvData)
+void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket& recvData)
{
uint64 guid;
recvData >> guid;
@@ -43,7 +43,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recvData)
Object* questgiver = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT);
if (!questgiver)
{
- sLog->outInfo(LOG_FILTER_NETWORKIO, "Error in CMSG_QUESTGIVER_STATUS_QUERY, called for not found questgiver (Typeid: %u GUID: %u)", GuidHigh2TypeId(GUID_HIPART(guid)), GUID_LOPART(guid));
+ sLog->outInfo(LOG_FILTER_NETWORKIO, "Error in CMSG_QUESTGIVER_STATUS_QUERY, called for non-existing questgiver (Typeid: %u GUID: %u)", GuidHigh2TypeId(GUID_HIPART(guid)), GUID_LOPART(guid));
return;
}
@@ -79,7 +79,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recvData)
_player->PlayerTalkClass->SendQuestGiverStatus(questStatus, guid);
}
-void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket & recvData)
+void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket& recvData)
{
uint64 guid;
recvData >> guid;
@@ -109,7 +109,7 @@ void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket & recvData)
creature->AI()->sGossipHello(_player);
}
-void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket & recvData)
+void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket& recvData)
{
uint64 guid;
uint32 questId;
@@ -230,7 +230,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket & recvData)
_player->PlayerTalkClass->SendCloseGossip();
}
-void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket & recvData)
+void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket& recvData)
{
uint64 guid;
uint32 questId;
@@ -268,7 +268,7 @@ void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket & recvData)
}
}
-void WorldSession::HandleQuestQueryOpcode(WorldPacket & recvData)
+void WorldSession::HandleQuestQueryOpcode(WorldPacket& recvData)
{
if (!_player)
return;
@@ -281,7 +281,7 @@ void WorldSession::HandleQuestQueryOpcode(WorldPacket & recvData)
_player->PlayerTalkClass->SendQuestQueryResponse(quest);
}
-void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recvData)
+void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket& recvData)
{
uint32 questId, reward;
uint64 guid;
@@ -289,7 +289,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recvData)
if (reward >= QUEST_REWARD_CHOICES_COUNT)
{
- sLog->outError(LOG_FILTER_NETWORKIO, "Error in CMSG_QUESTGIVER_CHOOSE_REWARD: player %s (guid %d) tried to get invalid reward (%u) (probably packet hacking)", _player->GetName().c_str(), _player->GetGUIDLow(), reward);
+ sLog->outError(LOG_FILTER_NETWORKIO, "Error in CMSG_QUESTGIVER_CHOOSE_REWARD: player %s (guid %d) tried to get invalid reward (%u) (possible packet-hacking detected)", _player->GetName().c_str(), _player->GetGUIDLow(), reward);
return;
}
@@ -308,7 +308,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recvData)
if ((!_player->CanSeeStartQuest(quest) && _player->GetQuestStatus(questId) == QUEST_STATUS_NONE) ||
(_player->GetQuestStatus(questId) != QUEST_STATUS_COMPLETE && !quest->IsAutoComplete()))
{
- sLog->outError(LOG_FILTER_NETWORKIO, "HACK ALERT: Player %s (guid: %u) is trying to complete quest (id: %u) but he has no right to do it!",
+ sLog->outError(LOG_FILTER_NETWORKIO, "Error in QUEST_STATUS_COMPLETE: player %s (guid %u) tried to complete quest %u, but is not allowed to do so (possible packet-hacking or high latency)",
_player->GetName().c_str(), _player->GetGUIDLow(), questId);
return;
}
@@ -365,7 +365,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recvData)
}
}
-void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket & recvData)
+void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket& recvData)
{
uint32 questId;
uint64 guid;
diff --git a/src/server/game/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp
index ec389142182..f5f48b2a45b 100755..100644
--- a/src/server/game/Handlers/SkillHandler.cpp
+++ b/src/server/game/Handlers/SkillHandler.cpp
@@ -27,7 +27,7 @@
#include "WorldPacket.h"
#include "WorldSession.h"
-void WorldSession::HandleLearnTalentOpcode(WorldPacket & recvData)
+void WorldSession::HandleLearnTalentOpcode(WorldPacket& recvData)
{
uint32 talent_id, requested_rank;
recvData >> talent_id >> requested_rank;
@@ -55,7 +55,7 @@ void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket)
_player->SendTalentsInfoData(false);
}
-void WorldSession::HandleTalentWipeConfirmOpcode(WorldPacket & recvData)
+void WorldSession::HandleTalentWipeConfirmOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "MSG_TALENT_WIPE_CONFIRM");
uint64 guid;
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp
index 270980c8e7c..7002a55e2d1 100755..100644
--- a/src/server/game/Handlers/SpellHandler.cpp
+++ b/src/server/game/Handlers/SpellHandler.cpp
@@ -51,15 +51,8 @@ void WorldSession::HandleClientCastFlags(WorldPacket& recvPacket, uint8 castFlag
recvPacket >> hasMovementData;
if (hasMovementData)
{
- recvPacket.rfinish();
- // movement packet for caster of the spell
- /*recvPacket.read_skip<uint32>(); // MSG_MOVE_STOP - hardcoded in client
- uint64 guid;
- recvPacket.readPackGUID(guid);
-
- MovementInfo movementInfo;
- movementInfo.guid = guid;
- ReadMovementInfo(recvPacket, &movementInfo);*/
+ recvPacket.SetOpcode(recvPacket.read<uint32>());
+ HandleMovementOpcodes(recvPacket);
}
}
}
@@ -270,7 +263,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
pUser->SendLoot(item->GetGUID(), LOOT_CORPSE);
}
-void WorldSession::HandleGameObjectUseOpcode(WorldPacket & recvData)
+void WorldSession::HandleGameObjectUseOpcode(WorldPacket& recvData)
{
uint64 guid;
@@ -486,7 +479,7 @@ void WorldSession::HandleCancelAutoRepeatSpellOpcode(WorldPacket& /*recvPacket*/
_player->InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
}
-void WorldSession::HandleCancelChanneling(WorldPacket & recvData)
+void WorldSession::HandleCancelChanneling(WorldPacket& recvData)
{
recvData.read_skip<uint32>(); // spellid, not used
@@ -556,7 +549,7 @@ void WorldSession::HandleSpellClick(WorldPacket& recvData)
unit->HandleSpellClick(_player);
}
-void WorldSession::HandleMirrorImageDataRequest(WorldPacket & recvData)
+void WorldSession::HandleMirrorImageDataRequest(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_GET_MIRRORIMAGE_DATA");
uint64 guid;
diff --git a/src/server/game/Handlers/TaxiHandler.cpp b/src/server/game/Handlers/TaxiHandler.cpp
index 16ffdfbc440..1df98af315d 100755..100644
--- a/src/server/game/Handlers/TaxiHandler.cpp
+++ b/src/server/game/Handlers/TaxiHandler.cpp
@@ -28,7 +28,7 @@
#include "Path.h"
#include "WaypointMovementGenerator.h"
-void WorldSession::HandleTaxiNodeStatusQueryOpcode(WorldPacket & recvData)
+void WorldSession::HandleTaxiNodeStatusQueryOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_TAXINODE_STATUS_QUERY");
@@ -63,7 +63,7 @@ void WorldSession::SendTaxiStatus(uint64 guid)
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_TAXINODE_STATUS");
}
-void WorldSession::HandleTaxiQueryAvailableNodes(WorldPacket & recvData)
+void WorldSession::HandleTaxiQueryAvailableNodes(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_TAXIQUERYAVAILABLENODES");
@@ -163,7 +163,7 @@ void WorldSession::SendDiscoverNewTaxiNode(uint32 nodeid)
}
}
-void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket & recvData)
+void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXIEXPRESS");
@@ -273,7 +273,7 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recvData)
GetPlayer()->CastSpell(GetPlayer(), 2479, true);
}
-void WorldSession::HandleActivateTaxiOpcode(WorldPacket & recvData)
+void WorldSession::HandleActivateTaxiOpcode(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXI");
diff --git a/src/server/game/Handlers/TicketHandler.cpp b/src/server/game/Handlers/TicketHandler.cpp
index 1571d857f41..a632f956470 100755..100644
--- a/src/server/game/Handlers/TicketHandler.cpp
+++ b/src/server/game/Handlers/TicketHandler.cpp
@@ -97,7 +97,7 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket& recvData)
SendPacket(&data);
}
-void WorldSession::HandleGMTicketUpdateOpcode(WorldPacket & recvData)
+void WorldSession::HandleGMTicketUpdateOpcode(WorldPacket& recvData)
{
std::string message;
recvData >> message;
diff --git a/src/server/game/Handlers/TradeHandler.cpp b/src/server/game/Handlers/TradeHandler.cpp
index 08f2d61826e..08f2d61826e 100755..100644
--- a/src/server/game/Handlers/TradeHandler.cpp
+++ b/src/server/game/Handlers/TradeHandler.cpp
diff --git a/src/server/game/Handlers/VoiceChatHandler.cpp b/src/server/game/Handlers/VoiceChatHandler.cpp
index 785b4f8e5cd..785b4f8e5cd 100755..100644
--- a/src/server/game/Handlers/VoiceChatHandler.cpp
+++ b/src/server/game/Handlers/VoiceChatHandler.cpp
diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp
index 48ed7bdba1f..48ed7bdba1f 100755..100644
--- a/src/server/game/Instances/InstanceSaveMgr.cpp
+++ b/src/server/game/Instances/InstanceSaveMgr.cpp
diff --git a/src/server/game/Instances/InstanceSaveMgr.h b/src/server/game/Instances/InstanceSaveMgr.h
index 83c2170255d..83c2170255d 100755..100644
--- a/src/server/game/Instances/InstanceSaveMgr.h
+++ b/src/server/game/Instances/InstanceSaveMgr.h
diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp
index a370cf25d97..a370cf25d97 100755..100644
--- a/src/server/game/Instances/InstanceScript.cpp
+++ b/src/server/game/Instances/InstanceScript.cpp
diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h
index f1766833aee..f1766833aee 100755..100644
--- a/src/server/game/Instances/InstanceScript.h
+++ b/src/server/game/Instances/InstanceScript.h
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index ef3d2b9fbd6..098fcc657b3 100755..100644
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -334,6 +334,7 @@ LootItem::LootItem(LootStoreItem const& li)
is_blocked = 0;
is_underthreshold = 0;
is_counted = 0;
+ canSave = true;
}
// Basic checks for player/item compatibility - if false no chance to see the item in the loot
@@ -654,6 +655,33 @@ void Loot::generateMoneyLoot(uint32 minAmount, uint32 maxAmount)
}
}
+void Loot::DeleteLootItemFromContainerItemDB(uint32 itemID)
+{
+ // Deletes a single item associated with an openable item from the DB
+ PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEMCONTAINER_ITEM);
+ stmt->setUInt32(0, containerID);
+ stmt->setUInt32(1, itemID);
+ CharacterDatabase.Execute(stmt);
+
+ // Mark the item looted to prevent resaving
+ for (LootItemList::iterator _itr = items.begin(); _itr != items.end(); _itr++)
+ {
+ if (!_itr->itemid == itemID)
+ continue;
+
+ _itr->canSave = true;
+ break;
+ }
+}
+
+void Loot::DeleteLootMoneyFromContainerItemDB()
+{
+ // Deletes money loot associated with an openable item from the DB
+ PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEMCONTAINER_MONEY);
+ stmt->setUInt32(0, containerID);
+ CharacterDatabase.Execute(stmt);
+}
+
LootItem* Loot::LootItemInSlot(uint32 lootSlot, Player* player, QuestItem* *qitem, QuestItem* *ffaitem, QuestItem* *conditem)
{
LootItem* item = NULL;
@@ -1239,6 +1267,19 @@ void LootTemplate::CopyConditions(ConditionList conditions)
i->CopyConditions(conditions);
}
+void LootTemplate::CopyConditions(LootItem* li) const
+{
+ // Copies the conditions list from a template item to a LootItem
+ for (LootStoreItemList::const_iterator _iter = Entries.begin(); _iter != Entries.end(); ++_iter)
+ {
+ if (!_iter->itemid == li->itemid)
+ continue;
+
+ li->conditions = _iter->conditions;
+ break;
+ }
+}
+
// Rolls for every item in the template and adds the rolled items the the loot
void LootTemplate::Process(Loot& loot, bool rate, uint16 lootMode, uint8 groupId) const
{
diff --git a/src/server/game/Loot/LootMgr.h b/src/server/game/Loot/LootMgr.h
index 45fc5c7983c..cfa5d370e3b 100755..100644
--- a/src/server/game/Loot/LootMgr.h
+++ b/src/server/game/Loot/LootMgr.h
@@ -141,14 +141,17 @@ struct LootItem
bool is_counted : 1;
bool needs_quest : 1; // quest drop
bool follow_loot_rules : 1;
+ bool canSave;
// Constructor, copies most fields from LootStoreItem, generates random count and random suffixes/properties
// Should be called for non-reference LootStoreItem entries only (mincountOrRef > 0)
explicit LootItem(LootStoreItem const& li);
+ // Empty constructor for creating an empty LootItem to be filled in with DB data
+ LootItem() : canSave(true){};
+
// Basic checks for player/item compatibility - if false no chance to see the item in the loot
bool AllowedForPlayer(Player const* player) const;
-
void AddAllowedLooter(Player const* player);
const AllowedLooterSet & GetAllowedLooters() const { return allowedGUIDs; }
};
@@ -223,6 +226,7 @@ class LootTemplate
// Rolls for every item in the template and adds the rolled items the the loot
void Process(Loot& loot, bool rate, uint16 lootMode, uint8 groupId = 0) const;
void CopyConditions(ConditionList conditions);
+ void CopyConditions(LootItem* li) const;
// True if template includes at least 1 quest drop entry
bool HasQuestDrop(LootTemplateMap const& store, uint8 groupId = 0) const;
@@ -286,10 +290,18 @@ struct Loot
uint8 unlootedCount;
uint64 roundRobinPlayer; // GUID of the player having the Round-Robin ownership for the loot. If 0, round robin owner has released.
LootType loot_type; // required for achievement system
+
+ // GUIDLow of container that holds this loot (item_instance.entry)
+ // Only set for inventory items that can be right-click looted
+ uint32 containerID;
- Loot(uint32 _gold = 0) : gold(_gold), unlootedCount(0), loot_type(LOOT_CORPSE) {}
+ Loot(uint32 _gold = 0) : gold(_gold), unlootedCount(0), loot_type(LOOT_CORPSE), containerID(0) {}
~Loot() { clear(); }
+ // For deleting items at loot removal since there is no backward interface to the Item()
+ void DeleteLootItemFromContainerItemDB(uint32 itemID);
+ void DeleteLootMoneyFromContainerItemDB();
+
// if loot becomes invalid this reference is used to inform the listener
void addLootValidatorRef(LootValidatorRef* pLootValidatorRef)
{
diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp
index 108856d81b6..108856d81b6 100755..100644
--- a/src/server/game/Mails/Mail.cpp
+++ b/src/server/game/Mails/Mail.cpp
diff --git a/src/server/game/Mails/Mail.h b/src/server/game/Mails/Mail.h
index c2771f4b57c..c2771f4b57c 100755..100644
--- a/src/server/game/Mails/Mail.h
+++ b/src/server/game/Mails/Mail.h
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index 1bb651831c7..3ef168929c9 100755..100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -1113,7 +1113,7 @@ bool GridMap::loadData(char* filename)
return false;
}
// loadup height data
- if (header.heightMapOffset && !loadHeihgtData(in, header.heightMapOffset, header.heightMapSize))
+ if (header.heightMapOffset && !loadHeightData(in, header.heightMapOffset, header.heightMapSize))
{
sLog->outError(LOG_FILTER_MAPS, "Error loading map height data\n");
fclose(in);
@@ -1169,7 +1169,7 @@ bool GridMap::loadAreaData(FILE* in, uint32 offset, uint32 /*size*/)
return true;
}
-bool GridMap::loadHeihgtData(FILE* in, uint32 offset, uint32 /*size*/)
+bool GridMap::loadHeightData(FILE* in, uint32 offset, uint32 /*size*/)
{
map_heightHeader header;
fseek(in, offset, SEEK_SET);
@@ -2489,7 +2489,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true))
if (LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(dungeonId))
if (LFGDungeonData const* randomDungeon = sLFGMgr->GetLFGDungeon(*(sLFGMgr->GetSelectedDungeons(player->GetGUID()).begin())))
- if (uint32(dungeon->map) == GetId() && dungeon->difficulty == uint32(GetDifficulty()) && randomDungeon->type == uint32(LFG_TYPE_RANDOM))
+ if (uint32(dungeon->map) == GetId() && dungeon->difficulty == GetDifficulty() && randomDungeon->type == LFG_TYPE_RANDOM)
player->CastSpell(player, LFG_SPELL_LUCK_OF_THE_DRAW, true);
}
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index e35f430b638..4bf2544543a 100755..100644
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -178,7 +178,7 @@ class GridMap
bool loadAreaData(FILE* in, uint32 offset, uint32 size);
- bool loadHeihgtData(FILE* in, uint32 offset, uint32 size);
+ bool loadHeightData(FILE* in, uint32 offset, uint32 size);
bool loadLiquidData(FILE* in, uint32 offset, uint32 size);
// Get height functions and pointers
diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp
index f45105c324a..f45105c324a 100755..100644
--- a/src/server/game/Maps/MapInstanced.cpp
+++ b/src/server/game/Maps/MapInstanced.cpp
diff --git a/src/server/game/Maps/MapInstanced.h b/src/server/game/Maps/MapInstanced.h
index 0b1a404630b..0b1a404630b 100755..100644
--- a/src/server/game/Maps/MapInstanced.h
+++ b/src/server/game/Maps/MapInstanced.h
diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp
index 96a2a44655d..96a2a44655d 100755..100644
--- a/src/server/game/Maps/MapManager.cpp
+++ b/src/server/game/Maps/MapManager.cpp
diff --git a/src/server/game/Maps/MapManager.h b/src/server/game/Maps/MapManager.h
index aa07eef2204..aa07eef2204 100755..100644
--- a/src/server/game/Maps/MapManager.h
+++ b/src/server/game/Maps/MapManager.h
diff --git a/src/server/game/Maps/MapRefManager.h b/src/server/game/Maps/MapRefManager.h
index 3976139a18d..3976139a18d 100755..100644
--- a/src/server/game/Maps/MapRefManager.h
+++ b/src/server/game/Maps/MapRefManager.h
diff --git a/src/server/game/Maps/MapReference.h b/src/server/game/Maps/MapReference.h
index 86709fb28ab..86709fb28ab 100755..100644
--- a/src/server/game/Maps/MapReference.h
+++ b/src/server/game/Maps/MapReference.h
diff --git a/src/server/game/Maps/ZoneScript.h b/src/server/game/Maps/ZoneScript.h
index 7b20b0ee676..7b20b0ee676 100755..100644
--- a/src/server/game/Maps/ZoneScript.h
+++ b/src/server/game/Maps/ZoneScript.h
diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h
index 4f358d7a145..4f358d7a145 100755..100644
--- a/src/server/game/Miscellaneous/Formulas.h
+++ b/src/server/game/Miscellaneous/Formulas.h
diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h
index 5321202b256..df5f45622f8 100755..100644
--- a/src/server/game/Miscellaneous/Language.h
+++ b/src/server/game/Miscellaneous/Language.h
@@ -86,8 +86,7 @@ enum TrinityStrings
LANG_CONNECTED_PLAYERS = 60,
LANG_ACCOUNT_ADDON = 61,
LANG_IMPROPER_VALUE = 62,
- LANG_CANT_DO_NOW = 63,
- // Room for more level 0 64-99 not used
+ // Room for more level 0 63-99 not used
// level 1 chat
LANG_GLOBAL_NOTIFY = 100,
diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
index 7d69753b287..283025c7e0d 100755..100644
--- a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -37,11 +37,11 @@ enum SpellEffIndex
// loot modes for creatures and gameobjects, bitmask!
enum LootModes
{
- LOOT_MODE_DEFAULT = 1,
- LOOT_MODE_HARD_MODE_1 = 2,
- LOOT_MODE_HARD_MODE_2 = 4,
- LOOT_MODE_HARD_MODE_3 = 8,
- LOOT_MODE_HARD_MODE_4 = 16
+ LOOT_MODE_DEFAULT = 0x1,
+ LOOT_MODE_HARD_MODE_1 = 0x2,
+ LOOT_MODE_HARD_MODE_2 = 0x4,
+ LOOT_MODE_HARD_MODE_3 = 0x8,
+ LOOT_MODE_HARD_MODE_4 = 0x10
};
enum Gender
@@ -54,28 +54,28 @@ enum Gender
// Race value is index in ChrRaces.dbc
enum Races
{
- RACE_NONE = 0,
- RACE_HUMAN = 1,
- RACE_ORC = 2,
- RACE_DWARF = 3,
- RACE_NIGHTELF = 4,
- RACE_UNDEAD_PLAYER = 5,
- RACE_TAUREN = 6,
- RACE_GNOME = 7,
- RACE_TROLL = 8,
- //RACE_GOBLIN = 9,
- RACE_BLOODELF = 10,
- RACE_DRAENEI = 11
- //RACE_FEL_ORC = 12,
- //RACE_NAGA = 13,
- //RACE_BROKEN = 14,
- //RACE_SKELETON = 15,
- //RACE_VRYKUL = 16,
- //RACE_TUSKARR = 17,
- //RACE_FOREST_TROLL = 18,
- //RACE_TAUNKA = 19,
+ RACE_NONE = 0,
+ RACE_HUMAN = 1,
+ RACE_ORC = 2,
+ RACE_DWARF = 3,
+ RACE_NIGHTELF = 4,
+ RACE_UNDEAD_PLAYER = 5,
+ RACE_TAUREN = 6,
+ RACE_GNOME = 7,
+ RACE_TROLL = 8,
+ //RACE_GOBLIN = 9,
+ RACE_BLOODELF = 10,
+ RACE_DRAENEI = 11
+ //RACE_FEL_ORC = 12,
+ //RACE_NAGA = 13,
+ //RACE_BROKEN = 14,
+ //RACE_SKELETON = 15,
+ //RACE_VRYKUL = 16,
+ //RACE_TUSKARR = 17,
+ //RACE_FOREST_TROLL = 18,
+ //RACE_TAUNKA = 19,
//RACE_NORTHREND_SKELETON = 20,
- //RACE_ICE_TROLL = 21
+ //RACE_ICE_TROLL = 21
};
// max+1 for player race
@@ -83,13 +83,13 @@ enum Races
#define RACEMASK_ALL_PLAYABLE \
((1<<(RACE_HUMAN-1)) |(1<<(RACE_ORC-1)) |(1<<(RACE_DWARF-1)) | \
- (1<<(RACE_NIGHTELF-1))|(1<<(RACE_UNDEAD_PLAYER-1))|(1<<(RACE_TAUREN-1)) | \
- (1<<(RACE_GNOME-1)) |(1<<(RACE_TROLL-1)) |(1<<(RACE_BLOODELF-1))| \
- (1<<(RACE_DRAENEI-1)))
+ (1<<(RACE_NIGHTELF-1))|(1<<(RACE_UNDEAD_PLAYER-1))|(1<<(RACE_TAUREN-1)) | \
+ (1<<(RACE_GNOME-1)) |(1<<(RACE_TROLL-1)) |(1<<(RACE_BLOODELF-1))| \
+ (1<<(RACE_DRAENEI-1)))
#define RACEMASK_ALLIANCE \
((1<<(RACE_HUMAN-1)) | (1<<(RACE_DWARF-1)) | (1<<(RACE_NIGHTELF-1)) | \
- (1<<(RACE_GNOME-1)) | (1<<(RACE_DRAENEI-1)))
+ (1<<(RACE_GNOME-1)) | (1<<(RACE_DRAENEI-1)))
#define RACEMASK_HORDE RACEMASK_ALL_PLAYABLE & ~RACEMASK_ALLIANCE
@@ -2520,47 +2520,47 @@ uint32 const CREATURE_TYPEMASK_MECHANICAL_OR_ELEMENTAL = (1 << (CREATURE_TYPE_ME
// CreatureFamily.dbc
enum CreatureFamily
{
- CREATURE_FAMILY_WOLF = 1,
- CREATURE_FAMILY_CAT = 2,
- CREATURE_FAMILY_SPIDER = 3,
- CREATURE_FAMILY_BEAR = 4,
- CREATURE_FAMILY_BOAR = 5,
- CREATURE_FAMILY_CROCOLISK = 6,
- CREATURE_FAMILY_CARRION_BIRD = 7,
- CREATURE_FAMILY_CRAB = 8,
- CREATURE_FAMILY_GORILLA = 9,
- CREATURE_FAMILY_HORSE_CUSTOM = 10, // not exist in DBC but used for horse like beasts in DB
- CREATURE_FAMILY_RAPTOR = 11,
- CREATURE_FAMILY_TALLSTRIDER = 12,
- CREATURE_FAMILY_FELHUNTER = 15,
- CREATURE_FAMILY_VOIDWALKER = 16,
- CREATURE_FAMILY_SUCCUBUS = 17,
- CREATURE_FAMILY_DOOMGUARD = 19,
- CREATURE_FAMILY_SCORPID = 20,
- CREATURE_FAMILY_TURTLE = 21,
- CREATURE_FAMILY_IMP = 23,
- CREATURE_FAMILY_BAT = 24,
- CREATURE_FAMILY_HYENA = 25,
- CREATURE_FAMILY_BIRD_OF_PREY = 26,
- CREATURE_FAMILY_WIND_SERPENT = 27,
- CREATURE_FAMILY_REMOTE_CONTROL = 28,
- CREATURE_FAMILY_FELGUARD = 29,
- CREATURE_FAMILY_DRAGONHAWK = 30,
- CREATURE_FAMILY_RAVAGER = 31,
- CREATURE_FAMILY_WARP_STALKER = 32,
- CREATURE_FAMILY_SPOREBAT = 33,
- CREATURE_FAMILY_NETHER_RAY = 34,
- CREATURE_FAMILY_SERPENT = 35,
- CREATURE_FAMILY_MOTH = 37,
- CREATURE_FAMILY_CHIMAERA = 38,
- CREATURE_FAMILY_DEVILSAUR = 39,
- CREATURE_FAMILY_GHOUL = 40,
- CREATURE_FAMILY_SILITHID = 41,
- CREATURE_FAMILY_WORM = 42,
- CREATURE_FAMILY_RHINO = 43,
- CREATURE_FAMILY_WASP = 44,
- CREATURE_FAMILY_CORE_HOUND = 45,
- CREATURE_FAMILY_SPIRIT_BEAST = 46
+ CREATURE_FAMILY_WOLF = 1,
+ CREATURE_FAMILY_CAT = 2,
+ CREATURE_FAMILY_SPIDER = 3,
+ CREATURE_FAMILY_BEAR = 4,
+ CREATURE_FAMILY_BOAR = 5,
+ CREATURE_FAMILY_CROCOLISK = 6,
+ CREATURE_FAMILY_CARRION_BIRD = 7,
+ CREATURE_FAMILY_CRAB = 8,
+ CREATURE_FAMILY_GORILLA = 9,
+ CREATURE_FAMILY_HORSE_CUSTOM = 10, // Does not exist in DBC but used for horse like beasts in DB
+ CREATURE_FAMILY_RAPTOR = 11,
+ CREATURE_FAMILY_TALLSTRIDER = 12,
+ CREATURE_FAMILY_FELHUNTER = 15,
+ CREATURE_FAMILY_VOIDWALKER = 16,
+ CREATURE_FAMILY_SUCCUBUS = 17,
+ CREATURE_FAMILY_DOOMGUARD = 19,
+ CREATURE_FAMILY_SCORPID = 20,
+ CREATURE_FAMILY_TURTLE = 21,
+ CREATURE_FAMILY_IMP = 23,
+ CREATURE_FAMILY_BAT = 24,
+ CREATURE_FAMILY_HYENA = 25,
+ CREATURE_FAMILY_BIRD_OF_PREY = 26,
+ CREATURE_FAMILY_WIND_SERPENT = 27,
+ CREATURE_FAMILY_REMOTE_CONTROL = 28,
+ CREATURE_FAMILY_FELGUARD = 29,
+ CREATURE_FAMILY_DRAGONHAWK = 30,
+ CREATURE_FAMILY_RAVAGER = 31,
+ CREATURE_FAMILY_WARP_STALKER = 32,
+ CREATURE_FAMILY_SPOREBAT = 33,
+ CREATURE_FAMILY_NETHER_RAY = 34,
+ CREATURE_FAMILY_SERPENT = 35,
+ CREATURE_FAMILY_MOTH = 37,
+ CREATURE_FAMILY_CHIMAERA = 38,
+ CREATURE_FAMILY_DEVILSAUR = 39,
+ CREATURE_FAMILY_GHOUL = 40,
+ CREATURE_FAMILY_SILITHID = 41,
+ CREATURE_FAMILY_WORM = 42,
+ CREATURE_FAMILY_RHINO = 43,
+ CREATURE_FAMILY_WASP = 44,
+ CREATURE_FAMILY_CORE_HOUND = 45,
+ CREATURE_FAMILY_SPIRIT_BEAST = 46
};
enum CreatureTypeFlags
@@ -2993,7 +2993,7 @@ enum WeatherType
enum ChatMsg
{
- CHAT_MSG_ADDON = 0xFFFFFFFF,
+ CHAT_MSG_ADDON = 0xFFFFFFFF, // -1
CHAT_MSG_SYSTEM = 0x00,
CHAT_MSG_SAY = 0x01,
CHAT_MSG_PARTY = 0x02,
@@ -3077,8 +3077,11 @@ enum PetDiet
#define CHAIN_SPELL_JUMP_RADIUS 8
-#define GUILD_BANKLOG_MAX_RECORDS 25
-#define GUILD_EVENTLOG_MAX_RECORDS 100
+enum GuildLogs
+{
+ GUILD_BANKLOG_MAX_RECORDS = 25,
+ GUILD_EVENTLOG_MAX_RECORDS = 100,
+};
enum AiReaction
{
@@ -3152,7 +3155,8 @@ enum SummonType
enum EventId
{
- EVENT_CHARGE = 1003
+ EVENT_CHARGE = 1003,
+ EVENT_JUMP = 1004
};
enum ResponseCodes
@@ -3231,9 +3235,7 @@ enum ResponseCodes
CHAR_CREATE_CHARACTER_DELETE_MAIL = 0x41,
CHAR_CREATE_CHARACTER_SWAP_FACTION = 0x42,
CHAR_CREATE_CHARACTER_RACE_ONLY = 0x43,
-
CHAR_CREATE_CHARACTER_GOLD_LIMIT = 0x44,
-
CHAR_CREATE_FORCE_LOGIN = 0x45,
CHAR_DELETE_IN_PROGRESS = 0x46,
@@ -3293,20 +3295,20 @@ enum BanReturn
// indexes of BattlemasterList.dbc
enum BattlegroundTypeId
{
- BATTLEGROUND_TYPE_NONE = 0, // None
- BATTLEGROUND_AV = 1, // Alterac Valley
- BATTLEGROUND_WS = 2, // Warsong Gulch
- BATTLEGROUND_AB = 3, // Arathi Basin
- BATTLEGROUND_NA = 4, // Nagrand Arena
- BATTLEGROUND_BE = 5, // Blade's Edge Arena
- BATTLEGROUND_AA = 6, // All Arenas
- BATTLEGROUND_EY = 7, // Eye of the Storm
- BATTLEGROUND_RL = 8, // Ruins of Lordaernon
- BATTLEGROUND_SA = 9, // Strand of the Ancients
- BATTLEGROUND_DS = 10, // Dalaran Sewers
- BATTLEGROUND_RV = 11, // Ring of Valor
- BATTLEGROUND_IC = 30, // Isle of Conquest
- BATTLEGROUND_RB = 32 // Random Battleground
+ BATTLEGROUND_TYPE_NONE = 0, // None
+ BATTLEGROUND_AV = 1, // Alterac Valley
+ BATTLEGROUND_WS = 2, // Warsong Gulch
+ BATTLEGROUND_AB = 3, // Arathi Basin
+ BATTLEGROUND_NA = 4, // Nagrand Arena
+ BATTLEGROUND_BE = 5, // Blade's Edge Arena
+ BATTLEGROUND_AA = 6, // All Arenas
+ BATTLEGROUND_EY = 7, // Eye of the Storm
+ BATTLEGROUND_RL = 8, // Ruins of Lordaernon
+ BATTLEGROUND_SA = 9, // Strand of the Ancients
+ BATTLEGROUND_DS = 10, // Dalaran Sewers
+ BATTLEGROUND_RV = 11, // Ring of Valor
+ BATTLEGROUND_IC = 30, // Isle of Conquest
+ BATTLEGROUND_RB = 32 // Random Battleground
};
#define MAX_BATTLEGROUND_TYPE_ID 33
diff --git a/src/server/game/Movement/FollowerRefManager.h b/src/server/game/Movement/FollowerRefManager.h
index 5066804d60f..5066804d60f 100755..100644
--- a/src/server/game/Movement/FollowerRefManager.h
+++ b/src/server/game/Movement/FollowerRefManager.h
diff --git a/src/server/game/Movement/FollowerReference.cpp b/src/server/game/Movement/FollowerReference.cpp
index 997d066a9f2..997d066a9f2 100755..100644
--- a/src/server/game/Movement/FollowerReference.cpp
+++ b/src/server/game/Movement/FollowerReference.cpp
diff --git a/src/server/game/Movement/FollowerReference.h b/src/server/game/Movement/FollowerReference.h
index 6a1a3719cb8..6a1a3719cb8 100755..100644
--- a/src/server/game/Movement/FollowerReference.h
+++ b/src/server/game/Movement/FollowerReference.h
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index 48f17a0d0c6..600165f5d97 100644
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -378,14 +378,14 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
}
-void MotionMaster::MoveFall(uint32 id/*=0*/)
+void MotionMaster::MoveFall(uint32 id /*=0*/)
{
// use larger distance for vmap height search than in most other cases
float tz = _owner->GetMap()->GetHeight(_owner->GetPhaseMask(), _owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ(), true, MAX_FALL_DISTANCE);
if (tz <= INVALID_HEIGHT)
{
sLog->outDebug(LOG_FILTER_GENERAL, "MotionMaster::MoveFall: unable retrive a proper height at map %u (x: %f, y: %f, z: %f).",
- _owner->GetMap()->GetId(), _owner->GetPositionX(), _owner->GetPositionX(), _owner->GetPositionZ());
+ _owner->GetMap()->GetId(), _owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ());
return;
}
diff --git a/src/server/game/Movement/MotionMaster.h b/src/server/game/Movement/MotionMaster.h
index 0dd9248da7a..b0676e02f51 100755..100644
--- a/src/server/game/Movement/MotionMaster.h
+++ b/src/server/game/Movement/MotionMaster.h
@@ -165,7 +165,9 @@ class MotionMaster //: private std::stack<MovementGenerator *>
void MoveCharge(PathGenerator path, float speed = SPEED_CHARGE, uint32 id = EVENT_CHARGE);
void MoveKnockbackFrom(float srcX, float srcY, float speedXY, float speedZ);
void MoveJumpTo(float angle, float speedXY, float speedZ);
- void MoveJump(float x, float y, float z, float speedXY, float speedZ, uint32 id = 0);
+ void MoveJump(Position const& pos, float speedXY, float speedZ, uint32 id = EVENT_JUMP)
+ { MoveJump(pos.m_positionX, pos.m_positionY, pos.m_positionZ, speedXY, speedZ, id); };
+ void MoveJump(float x, float y, float z, float speedXY, float speedZ, uint32 id = EVENT_JUMP);
void MoveFall(uint32 id = 0);
void MoveSeekAssistance(float x, float y, float z);
diff --git a/src/server/game/Movement/MovementGenerator.cpp b/src/server/game/Movement/MovementGenerator.cpp
index 73921ea86ff..73921ea86ff 100755..100644
--- a/src/server/game/Movement/MovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerator.cpp
diff --git a/src/server/game/Movement/MovementGenerator.h b/src/server/game/Movement/MovementGenerator.h
index ee8dfb51cce..43d03160a41 100755
--- a/src/server/game/Movement/MovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerator.h
@@ -38,7 +38,7 @@ class MovementGenerator
virtual void Reset(Unit*) = 0;
- virtual bool Update(Unit*, const uint32& time_diff) = 0;
+ virtual bool Update(Unit*, uint32 time_diff) = 0;
virtual MovementGeneratorType GetMovementGeneratorType() = 0;
@@ -70,7 +70,7 @@ class MovementGeneratorMedium : public MovementGenerator
(static_cast<D*>(this))->Reset(static_cast<T*>(u));
}
- bool Update(Unit* u, const uint32& time_diff)
+ bool Update(Unit* u, uint32 time_diff)
{
//u->AssertIsType<T>();
return (static_cast<D*>(this))->Update(static_cast<T*>(u), time_diff);
diff --git a/src/server/game/Movement/MovementGeneratorImpl.h b/src/server/game/Movement/MovementGeneratorImpl.h
index 725b309e3f1..725b309e3f1 100755..100644
--- a/src/server/game/Movement/MovementGeneratorImpl.h
+++ b/src/server/game/Movement/MovementGeneratorImpl.h
diff --git a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
index a8b4d68c802..9ccb13c32ee 100755
--- a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
@@ -57,7 +57,7 @@ void ConfusedMovementGenerator<T>::Reset(T* unit)
}
template<class T>
-bool ConfusedMovementGenerator<T>::Update(T* unit, const uint32& diff)
+bool ConfusedMovementGenerator<T>::Update(T* unit, uint32 diff)
{
if (unit->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED | UNIT_STATE_DISTRACTED))
return true;
@@ -125,6 +125,6 @@ template void ConfusedMovementGenerator<Player>::Initialize(Player*);
template void ConfusedMovementGenerator<Creature>::Initialize(Creature*);
template void ConfusedMovementGenerator<Player>::Reset(Player*);
template void ConfusedMovementGenerator<Creature>::Reset(Creature*);
-template bool ConfusedMovementGenerator<Player>::Update(Player*, const uint32&);
-template bool ConfusedMovementGenerator<Creature>::Update(Creature*, const uint32&);
+template bool ConfusedMovementGenerator<Player>::Update(Player*, uint32 diff);
+template bool ConfusedMovementGenerator<Creature>::Update(Creature*, uint32 diff);
diff --git a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h
index 5b535e2d47d..22d9bcc1a07 100755
--- a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h
@@ -31,7 +31,7 @@ class ConfusedMovementGenerator : public MovementGeneratorMedium< T, ConfusedMov
void Initialize(T*);
void Finalize(T*);
void Reset(T*);
- bool Update(T*, const uint32&);
+ bool Update(T*, uint32);
MovementGeneratorType GetMovementGeneratorType() { return CONFUSED_MOTION_TYPE; }
private:
diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp
index 3d75e384e93..7f9c7fac7e7 100644
--- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp
@@ -136,7 +136,7 @@ void FleeingMovementGenerator<T>::Reset(T* owner)
}
template<class T>
-bool FleeingMovementGenerator<T>::Update(T* owner, const uint32& time_diff)
+bool FleeingMovementGenerator<T>::Update(T* owner, uint32 time_diff)
{
if (!owner || !owner->isAlive())
return false;
@@ -162,8 +162,8 @@ template void FleeingMovementGenerator<Player>::_setTargetLocation(Player*);
template void FleeingMovementGenerator<Creature>::_setTargetLocation(Creature*);
template void FleeingMovementGenerator<Player>::Reset(Player*);
template void FleeingMovementGenerator<Creature>::Reset(Creature*);
-template bool FleeingMovementGenerator<Player>::Update(Player*, const uint32&);
-template bool FleeingMovementGenerator<Creature>::Update(Creature*, const uint32&);
+template bool FleeingMovementGenerator<Player>::Update(Player*, uint32);
+template bool FleeingMovementGenerator<Creature>::Update(Creature*, uint32);
void TimedFleeingMovementGenerator::Finalize(Unit* owner)
{
@@ -179,7 +179,7 @@ void TimedFleeingMovementGenerator::Finalize(Unit* owner)
}
}
-bool TimedFleeingMovementGenerator::Update(Unit* owner, const uint32& time_diff)
+bool TimedFleeingMovementGenerator::Update(Unit* owner, uint32 time_diff)
{
if (!owner->isAlive())
return false;
@@ -194,7 +194,7 @@ bool TimedFleeingMovementGenerator::Update(Unit* owner, const uint32& time_diff)
if (i_totalFleeTime.Passed())
return false;
- // This calls grant-parent Update method hiden by FleeingMovementGenerator::Update(Creature &, const uint32 &) version
+ // This calls grant-parent Update method hiden by FleeingMovementGenerator::Update(Creature &, uint32) version
// This is done instead of casting Unit& to Creature& and call parent method, then we can use Unit directly
return MovementGeneratorMedium< Creature, FleeingMovementGenerator<Creature> >::Update(owner, time_diff);
}
diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h
index ed1fe85a314..05c3916ea8a 100755
--- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h
@@ -30,7 +30,7 @@ class FleeingMovementGenerator : public MovementGeneratorMedium< T, FleeingMovem
void Initialize(T*);
void Finalize(T*);
void Reset(T*);
- bool Update(T*, const uint32&);
+ bool Update(T*, uint32);
MovementGeneratorType GetMovementGeneratorType() { return FLEEING_MOTION_TYPE; }
@@ -50,7 +50,7 @@ class TimedFleeingMovementGenerator : public FleeingMovementGenerator<Creature>
i_totalFleeTime(time) {}
MovementGeneratorType GetMovementGeneratorType() { return TIMED_FLEEING_MOTION_TYPE; }
- bool Update(Unit*, const uint32&);
+ bool Update(Unit*, uint32);
void Finalize(Unit*);
private:
diff --git a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h
index dfbea60d353..dfbea60d353 100755..100644
--- a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h
diff --git a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp
index 8ef9bd7697a..b33cddc6f6d 100755
--- a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp
@@ -48,7 +48,7 @@ void RotateMovementGenerator::Initialize(Unit* owner)
owner->AttackStop();
}
-bool RotateMovementGenerator::Update(Unit* owner, const uint32& diff)
+bool RotateMovementGenerator::Update(Unit* owner, uint32 diff)
{
float angle = owner->GetOrientation();
if (m_direction == ROTATE_DIRECTION_LEFT)
@@ -89,7 +89,7 @@ void DistractMovementGenerator::Finalize(Unit* owner)
owner->ClearUnitState(UNIT_STATE_DISTRACTED);
}
-bool DistractMovementGenerator::Update(Unit* /*owner*/, const uint32& time_diff)
+bool DistractMovementGenerator::Update(Unit* /*owner*/, uint32 time_diff)
{
if (time_diff > m_timer)
return false;
diff --git a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h
index 14287d871c9..4a2a5e35d22 100755
--- a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h
@@ -28,7 +28,7 @@ class IdleMovementGenerator : public MovementGenerator
void Initialize(Unit*);
void Finalize(Unit*) { }
void Reset(Unit*);
- bool Update(Unit*, const uint32&) { return true; }
+ bool Update(Unit*, uint32) { return true; }
MovementGeneratorType GetMovementGeneratorType() { return IDLE_MOTION_TYPE; }
};
@@ -42,7 +42,7 @@ class RotateMovementGenerator : public MovementGenerator
void Initialize(Unit*);
void Finalize(Unit*);
void Reset(Unit* owner) { Initialize(owner); }
- bool Update(Unit*, const uint32&);
+ bool Update(Unit*, uint32);
MovementGeneratorType GetMovementGeneratorType() { return ROTATE_MOTION_TYPE; }
private:
@@ -58,7 +58,7 @@ class DistractMovementGenerator : public MovementGenerator
void Initialize(Unit*);
void Finalize(Unit*);
void Reset(Unit* owner) { Initialize(owner); }
- bool Update(Unit*, const uint32&);
+ bool Update(Unit*, uint32);
MovementGeneratorType GetMovementGeneratorType() { return DISTRACT_MOTION_TYPE; }
private:
diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
index c022de31869..5d70b1aac3a 100755
--- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
@@ -45,7 +45,7 @@ void PointMovementGenerator<T>::Initialize(T* unit)
}
template<class T>
-bool PointMovementGenerator<T>::Update(T* unit, const uint32& /*diff*/)
+bool PointMovementGenerator<T>::Update(T* unit, uint32 /*diff*/)
{
if (!unit)
return false;
@@ -107,8 +107,8 @@ template void PointMovementGenerator<Player>::Finalize(Player*);
template void PointMovementGenerator<Creature>::Finalize(Creature*);
template void PointMovementGenerator<Player>::Reset(Player*);
template void PointMovementGenerator<Creature>::Reset(Creature*);
-template bool PointMovementGenerator<Player>::Update(Player*, const uint32&);
-template bool PointMovementGenerator<Creature>::Update(Creature*, const uint32&);
+template bool PointMovementGenerator<Player>::Update(Player*, uint32);
+template bool PointMovementGenerator<Creature>::Update(Creature*, uint32);
void AssistanceMovementGenerator::Finalize(Unit* unit)
{
@@ -118,7 +118,7 @@ void AssistanceMovementGenerator::Finalize(Unit* unit)
unit->GetMotionMaster()->MoveSeekAssistanceDistract(sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY));
}
-bool EffectMovementGenerator::Update(Unit* unit, const uint32&)
+bool EffectMovementGenerator::Update(Unit* unit, uint32)
{
return !unit->movespline->Finalized();
}
diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h
index e01ced758a3..c26ff94c3a4 100644
--- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h
@@ -32,7 +32,7 @@ class PointMovementGenerator : public MovementGeneratorMedium< T, PointMovementG
void Initialize(T*);
void Finalize(T*);
void Reset(T*);
- bool Update(T*, const uint32 &);
+ bool Update(T*, uint32);
void MovementInform(T*);
@@ -67,7 +67,7 @@ class EffectMovementGenerator : public MovementGenerator
void Initialize(Unit*) {}
void Finalize(Unit*);
void Reset(Unit*) {}
- bool Update(Unit*, const uint32&);
+ bool Update(Unit*, uint32);
MovementGeneratorType GetMovementGeneratorType() { return EFFECT_MOTION_TYPE; }
private:
uint32 m_Id;
diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
index a9d3c404a87..a9d3c404a87 100755..100644
--- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h
index ca370de6ac3..ca370de6ac3 100755..100644
--- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h
diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
index 45c7c7c9ab2..0cb46a11e2e 100755
--- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
@@ -104,7 +104,7 @@ void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T* owner, bool upd
}
template<class T, typename D>
-bool TargetedMovementGeneratorMedium<T,D>::Update(T* owner, const uint32& time_diff)
+bool TargetedMovementGeneratorMedium<T,D>::Update(T* owner, uint32 time_diff)
{
if (!i_target.isValid() || !i_target->IsInWorld())
return false;
@@ -293,10 +293,10 @@ template void TargetedMovementGeneratorMedium<Player,ChaseMovementGenerator<Play
template void TargetedMovementGeneratorMedium<Player,FollowMovementGenerator<Player> >::_setTargetLocation(Player*, bool);
template void TargetedMovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::_setTargetLocation(Creature*, bool);
template void TargetedMovementGeneratorMedium<Creature,FollowMovementGenerator<Creature> >::_setTargetLocation(Creature*, bool);
-template bool TargetedMovementGeneratorMedium<Player,ChaseMovementGenerator<Player> >::Update(Player*, const uint32&);
-template bool TargetedMovementGeneratorMedium<Player,FollowMovementGenerator<Player> >::Update(Player*, const uint32&);
-template bool TargetedMovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::Update(Creature*, const uint32&);
-template bool TargetedMovementGeneratorMedium<Creature,FollowMovementGenerator<Creature> >::Update(Creature*, const uint32&);
+template bool TargetedMovementGeneratorMedium<Player,ChaseMovementGenerator<Player> >::Update(Player*, uint32);
+template bool TargetedMovementGeneratorMedium<Player,FollowMovementGenerator<Player> >::Update(Player*, uint32);
+template bool TargetedMovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::Update(Creature*, uint32);
+template bool TargetedMovementGeneratorMedium<Creature,FollowMovementGenerator<Creature> >::Update(Creature*, uint32);
template void ChaseMovementGenerator<Player>::_reachTarget(Player*);
template void ChaseMovementGenerator<Creature>::_reachTarget(Creature*);
diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h
index f293d5976af..987baa91133 100755
--- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h
@@ -47,7 +47,7 @@ class TargetedMovementGeneratorMedium : public MovementGeneratorMedium< T, D >,
~TargetedMovementGeneratorMedium() { delete i_path; }
public:
- bool Update(T*, const uint32 &);
+ bool Update(T*, uint32);
Unit* GetTarget() const { return i_target.getTarget(); }
void unitSpeedChanged() { i_recalculateTravel = true; }
@@ -114,4 +114,3 @@ class FollowMovementGenerator : public TargetedMovementGeneratorMedium<T, Follow
};
#endif
-
diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
index 22b2a2a450b..d3b63ed6331 100755
--- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
@@ -130,7 +130,7 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature* creature)
return true;
}
-bool WaypointMovementGenerator<Creature>::Update(Creature* creature, const uint32& diff)
+bool WaypointMovementGenerator<Creature>::Update(Creature* creature, uint32 diff)
{
// Waypoint movement can be switched on/off
// This is quite handy for escort quests and other stuff
@@ -241,7 +241,7 @@ void FlightPathMovementGenerator::Reset(Player* player)
init.Launch();
}
-bool FlightPathMovementGenerator::Update(Player* player, const uint32& /*diff*/)
+bool FlightPathMovementGenerator::Update(Player* player, uint32 /*diff*/)
{
uint32 pointId = (uint32)player->movespline->currentPathIdx();
if (pointId > i_currentNode)
diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h
index 5230fe3b0e3..bf3f6f4cae3 100755
--- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h
@@ -68,7 +68,7 @@ class WaypointMovementGenerator<Creature> : public MovementGeneratorMedium< Crea
void Initialize(Creature*);
void Finalize(Creature*);
void Reset(Creature*);
- bool Update(Creature*, const uint32 &diff);
+ bool Update(Creature*, uint32 diff);
void MovementInform(Creature*);
@@ -121,7 +121,7 @@ class FlightPathMovementGenerator : public MovementGeneratorMedium< Player, Flig
void Initialize(Player*);
void Reset(Player*);
void Finalize(Player*);
- bool Update(Player*, const uint32&);
+ bool Update(Player*, uint32);
MovementGeneratorType GetMovementGeneratorType() { return FLIGHT_MOTION_TYPE; }
TaxiPathNodeList const& GetPath() { return *i_path; }
diff --git a/src/server/game/Movement/Spline/MoveSpline.cpp b/src/server/game/Movement/Spline/MoveSpline.cpp
index 1821a78d993..1e96cd00fd3 100644
--- a/src/server/game/Movement/Spline/MoveSpline.cpp
+++ b/src/server/game/Movement/Spline/MoveSpline.cpp
@@ -51,15 +51,15 @@ Location MoveSpline::ComputePosition() const
if (splineflags.final_angle)
c.orientation = facing.angle;
else if (splineflags.final_point)
- c.orientation = atan2(facing.f.y-c.y, facing.f.x-c.x);
+ c.orientation = atan2(facing.f.y - c.y, facing.f.x - c.x);
//nothing to do for MoveSplineFlag::Final_Target flag
}
else
{
- if (!splineflags.hasFlag(MoveSplineFlag::OrientationFixed|MoveSplineFlag::Falling))
+ if (!splineflags.hasFlag(MoveSplineFlag::OrientationFixed | MoveSplineFlag::Falling))
{
Vector3 hermite;
- spline.evaluate_derivative(point_Idx,u,hermite);
+ spline.evaluate_derivative(point_Idx, u, hermite);
c.orientation = atan2(hermite.y, hermite.x);
}
diff --git a/src/server/game/Movement/Spline/MoveSpline.h b/src/server/game/Movement/Spline/MoveSpline.h
index ef5e4bce08b..edeff668e0c 100644
--- a/src/server/game/Movement/Spline/MoveSpline.h
+++ b/src/server/game/Movement/Spline/MoveSpline.h
@@ -41,7 +41,8 @@ namespace Movement
{
public:
typedef Spline<int32> MySpline;
- enum UpdateResult{
+ enum UpdateResult
+ {
Result_None = 0x01,
Result_Arrived = 0x02,
Result_NextCycle = 0x04,
@@ -70,26 +71,26 @@ namespace Movement
void init_spline(const MoveSplineInitArgs& args);
protected:
- const MySpline::ControlArray& getPath() const { return spline.getPoints();}
+ const MySpline::ControlArray& getPath() const { return spline.getPoints(); }
void computeParabolicElevation(float& el) const;
void computeFallElevation(float& el) const;
UpdateResult _updateState(int32& ms_time_diff);
- int32 next_timestamp() const { return spline.length(point_Idx+1);}
- int32 segment_time_elapsed() const { return next_timestamp()-time_passed;}
- int32 timeElapsed() const { return Duration() - time_passed;}
- int32 timePassed() const { return time_passed;}
+ int32 next_timestamp() const { return spline.length(point_Idx+1); }
+ int32 segment_time_elapsed() const { return next_timestamp()-time_passed; }
+ int32 Duration() const { return spline.length(); }
+ int32 timeElapsed() const { return Duration() - time_passed; }
+ int32 timePassed() const { return time_passed; }
public:
- const MySpline& _Spline() const { return spline;}
- int32 _currentSplineIdx() const { return point_Idx;}
+ const MySpline& _Spline() const { return spline; }
+ int32 _currentSplineIdx() const { return point_Idx; }
void _Finalize();
void _Interrupt() { splineflags.done = true;}
public:
- int32 Duration() const { return spline.length();}
void Initialize(const MoveSplineInitArgs&);
- bool Initialized() const { return !spline.empty();}
+ bool Initialized() const { return !spline.empty(); }
explicit MoveSpline();
@@ -111,11 +112,11 @@ namespace Movement
Location ComputePosition() const;
- uint32 GetId() const { return m_Id;}
+ uint32 GetId() const { return m_Id; }
bool Finalized() const { return splineflags.done; }
- bool isCyclic() const { return splineflags.cyclic;}
- const Vector3 FinalDestination() const { return Initialized() ? spline.getPoint(spline.last()) : Vector3();}
- const Vector3 CurrentDestination() const { return Initialized() ? spline.getPoint(point_Idx+1) : Vector3();}
+ bool isCyclic() const { return splineflags.cyclic; }
+ const Vector3 FinalDestination() const { return Initialized() ? spline.getPoint(spline.last()) : Vector3(); }
+ const Vector3 CurrentDestination() const { return Initialized() ? spline.getPoint(point_Idx+1) : Vector3(); }
int32 currentPathIdx() const;
bool onTransport;
diff --git a/src/server/game/Movement/Spline/MoveSplineFlag.h b/src/server/game/Movement/Spline/MoveSplineFlag.h
index a7262182391..f3f436c9d00 100644
--- a/src/server/game/Movement/Spline/MoveSplineFlag.h
+++ b/src/server/game/Movement/Spline/MoveSplineFlag.h
@@ -33,7 +33,8 @@ namespace Movement
class MoveSplineFlag
{
public:
- enum eFlags{
+ enum eFlags
+ {
None = 0x00000000,
// x00-xFF(first byte) used as animation Ids storage in pair with Animation flag
Done = 0x00000100,
@@ -73,8 +74,8 @@ namespace Movement
Mask_Unused = No_Spline|Enter_Cycle|Frozen|Unknown7|Unknown8|Unknown10|Unknown11|Unknown12|Unknown13
};
- inline uint32& raw() { return (uint32&)*this;}
- inline const uint32& raw() const { return (const uint32&)*this;}
+ inline uint32& raw() { return (uint32&)*this; }
+ inline const uint32& raw() const { return (const uint32&)*this; }
MoveSplineFlag() { raw() = 0; }
MoveSplineFlag(uint32 f) { raw() = f; }
@@ -82,21 +83,21 @@ namespace Movement
// Constant interface
- bool isSmooth() const { return raw() & Mask_CatmullRom;}
- bool isLinear() const { return !isSmooth();}
- bool isFacing() const { return raw() & Mask_Final_Facing;}
+ bool isSmooth() const { return raw() & Mask_CatmullRom; }
+ bool isLinear() const { return !isSmooth(); }
+ bool isFacing() const { return raw() & Mask_Final_Facing; }
- uint8 getAnimationId() const { return animId;}
- bool hasAllFlags(uint32 f) const { return (raw() & f) == f;}
- bool hasFlag(uint32 f) const { return (raw() & f) != 0;}
- uint32 operator & (uint32 f) const { return (raw() & f);}
- uint32 operator | (uint32 f) const { return (raw() | f);}
+ uint8 getAnimationId() const { return animId; }
+ bool hasAllFlags(uint32 f) const { return (raw() & f) == f; }
+ bool hasFlag(uint32 f) const { return (raw() & f) != 0; }
+ uint32 operator & (uint32 f) const { return (raw() & f); }
+ uint32 operator | (uint32 f) const { return (raw() | f); }
std::string ToString() const;
// Not constant interface
- void operator &= (uint32 f) { raw() &= f;}
- void operator |= (uint32 f) { raw() |= f;}
+ void operator &= (uint32 f) { raw() &= f; }
+ void operator |= (uint32 f) { raw() |= f; }
void EnableAnimation(uint8 anim) { raw() = (raw() & ~(Mask_Animations | Falling | Parabolic)) | Animation | anim; }
void EnableParabolic() { raw() = (raw() & ~(Mask_Animations | Falling | Animation)) | Parabolic; }
@@ -109,31 +110,31 @@ namespace Movement
void EnableTransportEnter() { raw() = (raw() & ~TransportExit) | TransportEnter; }
void EnableTransportExit() { raw() = (raw() & ~TransportEnter) | TransportExit; }
- uint8 animId : 8;
- bool done : 1;
- bool falling : 1;
- bool no_spline : 1;
- bool parabolic : 1;
- bool walkmode : 1;
- bool flying : 1;
- bool orientationFixed : 1;
- bool final_point : 1;
- bool final_target : 1;
- bool final_angle : 1;
- bool catmullrom : 1;
- bool cyclic : 1;
- bool enter_cycle : 1;
- bool animation : 1;
- bool frozen : 1;
- bool transportEnter: 1;
- bool transportExit : 1;
- bool unknown7 : 1;
- bool unknown8 : 1;
+ uint8 animId : 8;
+ bool done : 1;
+ bool falling : 1;
+ bool no_spline : 1;
+ bool parabolic : 1;
+ bool walkmode : 1;
+ bool flying : 1;
+ bool orientationFixed : 1;
+ bool final_point : 1;
+ bool final_target : 1;
+ bool final_angle : 1;
+ bool catmullrom : 1;
+ bool cyclic : 1;
+ bool enter_cycle : 1;
+ bool animation : 1;
+ bool frozen : 1;
+ bool transportEnter : 1;
+ bool transportExit : 1;
+ bool unknown7 : 1;
+ bool unknown8 : 1;
bool orientationInversed : 1;
- bool unknown10 : 1;
- bool unknown11 : 1;
- bool unknown12 : 1;
- bool unknown13 : 1;
+ bool unknown10 : 1;
+ bool unknown11 : 1;
+ bool unknown12 : 1;
+ bool unknown13 : 1;
};
#if defined( __GNUC__ )
#pragma pack()
diff --git a/src/server/game/Movement/Spline/MovementTypedefs.h b/src/server/game/Movement/Spline/MovementTypedefs.h
index 01c8a5b7e7b..d8fe21ad4e6 100644
--- a/src/server/game/Movement/Spline/MovementTypedefs.h
+++ b/src/server/game/Movement/Spline/MovementTypedefs.h
@@ -54,7 +54,7 @@ namespace Movement
class counter
{
public:
- counter() { init();}
+ counter() { init(); }
void Increase()
{
@@ -64,8 +64,8 @@ namespace Movement
++m_counter;
}
- T NewId() { Increase(); return m_counter;}
- T getCurrent() const { return m_counter;}
+ T NewId() { Increase(); return m_counter; }
+ T getCurrent() const { return m_counter; }
private:
void init() { m_counter = 0; }
diff --git a/src/server/game/Movement/Spline/MovementUtil.cpp b/src/server/game/Movement/Spline/MovementUtil.cpp
index f0ed01c4676..b69d4b39e19 100644
--- a/src/server/game/Movement/Spline/MovementUtil.cpp
+++ b/src/server/game/Movement/Spline/MovementUtil.cpp
@@ -26,31 +26,31 @@ namespace Movement
/// Velocity bounds that makes fall speed limited
float terminalVelocity = 60.148003f;
- float terminalSavefallVelocity = 7.f;
+ float terminalSafefallVelocity = 7.0f;
- const float terminal_length = float(terminalVelocity * terminalVelocity) / (2.f * gravity);
- const float terminal_savefall_length = (terminalSavefallVelocity * terminalSavefallVelocity) / (2.f * gravity);
- const float terminalFallTime = float(terminalVelocity/gravity); // the time that needed to reach terminalVelocity
+ const float terminal_length = float(terminalVelocity * terminalVelocity) / (2.0f * gravity);
+ const float terminal_safefall_length = (terminalSafefallVelocity * terminalSafefallVelocity) / (2.0f * gravity);
+ const float terminalFallTime = float(terminalVelocity / gravity); // the time that needed to reach terminalVelocity
float computeFallTime(float path_length, bool isSafeFall)
{
- if (path_length < 0.f)
- return 0.f;
+ if (path_length < 0.0f)
+ return 0.0f;
float time;
- if ( isSafeFall )
+ if (isSafeFall)
{
- if (path_length >= terminal_savefall_length)
- time = (path_length - terminal_savefall_length)/terminalSavefallVelocity + terminalSavefallVelocity/gravity;
+ if (path_length >= terminal_safefall_length)
+ time = (path_length - terminal_safefall_length) / terminalSafefallVelocity + terminalSafefallVelocity / gravity;
else
- time = sqrtf(2.f * path_length/gravity);
+ time = sqrtf(2.0f * path_length / gravity);
}
else
{
if (path_length >= terminal_length)
- time = (path_length - terminal_length)/terminalVelocity + terminalFallTime;
+ time = (path_length - terminal_length) / terminalVelocity + terminalFallTime;
else
- time = sqrtf(2.f * path_length/gravity);
+ time = sqrtf(2.0f * path_length / gravity);
}
return time;
@@ -61,20 +61,21 @@ namespace Movement
float termVel;
float result;
- if ( isSafeFall )
- termVel = terminalSavefallVelocity;
+ if (isSafeFall)
+ termVel = terminalSafefallVelocity;
else
termVel = terminalVelocity;
- if ( start_velocity > termVel )
+ if (start_velocity > termVel)
start_velocity = termVel;
float terminal_time = terminalFallTime - start_velocity / gravity; // the time that needed to reach terminalVelocity
- if ( t_passed > terminal_time )
+ if (t_passed > terminal_time)
{
- result = terminalVelocity*(t_passed - terminal_time) +
- start_velocity*terminal_time + gravity*terminal_time*terminal_time*0.5f;
+ result = terminalVelocity * (t_passed - terminal_time) +
+ start_velocity * terminal_time +
+ gravity * terminal_time * terminal_time*0.5f;
}
else
result = t_passed * (start_velocity + t_passed * gravity * 0.5f);
@@ -100,7 +101,7 @@ namespace Movement
#define STR(x) #x
- const char * g_MovementFlag_names[]=
+ char const* g_MovementFlag_names[] =
{
STR(Forward ),// 0x00000001,
STR(Backward ),// 0x00000002,
@@ -135,25 +136,25 @@ namespace Movement
STR(Safe_Fall ),// 0x20000000, // Active Rogue Safe Fall Spell (Passive)
STR(Hover ),// 0x40000000
STR(Unknown13 ),// 0x80000000
- STR(Unk1 ),
- STR(Unk2 ),
- STR(Unk3 ),
- STR(Fullspeedturning ),
- STR(Fullspeedpitching ),
- STR(Allow_Pitching ),
- STR(Unk4 ),
- STR(Unk5 ),
- STR(Unk6 ),
- STR(Unk7 ),
- STR(Interp_Move ),
- STR(Interp_Turning ),
- STR(Interp_Pitching ),
- STR(Unk8 ),
- STR(Unk9 ),
- STR(Unk10 ),
+ STR(Unk1 ),
+ STR(Unk2 ),
+ STR(Unk3 ),
+ STR(Fullspeedturning ),
+ STR(Fullspeedpitching ),
+ STR(Allow_Pitching ),
+ STR(Unk4 ),
+ STR(Unk5 ),
+ STR(Unk6 ),
+ STR(Unk7 ),
+ STR(Interp_Move ),
+ STR(Interp_Turning ),
+ STR(Interp_Pitching ),
+ STR(Unk8 ),
+ STR(Unk9 ),
+ STR(Unk10 ),
};
- const char * g_SplineFlag_names[32]=
+ char const* g_SplineFlag_names[32] =
{
STR(AnimBit1 ),// 0x00000001,
STR(AnimBit2 ),// 0x00000002,
@@ -190,11 +191,11 @@ namespace Movement
};
template<class Flags, int N>
- void print_flags(Flags t, const char* (&names)[N], std::string& str)
+ void print_flags(Flags t, char const* (&names)[N], std::string& str)
{
for (int i = 0; i < N; ++i)
{
- if ((t & (Flags)(1 << i)) && names[i] != NULL)
+ if ((t & Flags(1 << i)) && names[i] != NULL)
str.append(" ").append(names[i]);
}
}
@@ -202,7 +203,7 @@ namespace Movement
std::string MoveSplineFlag::ToString() const
{
std::string str;
- print_flags(raw(),g_SplineFlag_names,str);
+ print_flags(raw(), g_SplineFlag_names, str);
return str;
}
}
diff --git a/src/server/game/Movement/Waypoints/Path.h b/src/server/game/Movement/Waypoints/Path.h
index 038958593fb..038958593fb 100755..100644
--- a/src/server/game/Movement/Waypoints/Path.h
+++ b/src/server/game/Movement/Waypoints/Path.h
diff --git a/src/server/game/Movement/Waypoints/WaypointManager.cpp b/src/server/game/Movement/Waypoints/WaypointManager.cpp
index a01e18347f6..a01e18347f6 100755..100644
--- a/src/server/game/Movement/Waypoints/WaypointManager.cpp
+++ b/src/server/game/Movement/Waypoints/WaypointManager.cpp
diff --git a/src/server/game/Movement/Waypoints/WaypointManager.h b/src/server/game/Movement/Waypoints/WaypointManager.h
index df20c513c90..df20c513c90 100755..100644
--- a/src/server/game/Movement/Waypoints/WaypointManager.h
+++ b/src/server/game/Movement/Waypoints/WaypointManager.h
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
index 5e3d37acb71..5e3d37acb71 100755..100644
--- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.h b/src/server/game/OutdoorPvP/OutdoorPvP.h
index e9d5ff9dfdc..e9d5ff9dfdc 100755..100644
--- a/src/server/game/OutdoorPvP/OutdoorPvP.h
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.h
diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
index ce987e25eed..ce987e25eed 100755..100644
--- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h
index 1313e29bfb4..1313e29bfb4 100755..100644
--- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h
+++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h
diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp
index 0d3d97d3996..0d3d97d3996 100755..100644
--- a/src/server/game/Pools/PoolMgr.cpp
+++ b/src/server/game/Pools/PoolMgr.cpp
diff --git a/src/server/game/Pools/PoolMgr.h b/src/server/game/Pools/PoolMgr.h
index be839bf1566..be839bf1566 100755..100644
--- a/src/server/game/Pools/PoolMgr.h
+++ b/src/server/game/Pools/PoolMgr.h
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp
index b58011efe42..1238afe2ee1 100755..100644
--- a/src/server/game/Quests/QuestDef.cpp
+++ b/src/server/game/Quests/QuestDef.cpp
@@ -140,10 +140,9 @@ Quest::Quest(Field* questRecord)
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
OfferRewardEmoteDelay[i] = questRecord[140+i].GetInt32();
- StartScript = questRecord[144].GetUInt32();
- CompleteScript = questRecord[145].GetUInt32();
+ CompleteScript = questRecord[144].GetUInt32();
- // int32 WDBVerified = questRecord[146].GetInt32();
+ // int32 WDBVerified = questRecord[145].GetInt32();
Flags |= SpecialFlags << 20;
if (Flags & QUEST_TRINITY_FLAGS_AUTO_ACCEPT)
diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h
index 58734751cea..61b3de5f327 100755..100644
--- a/src/server/game/Quests/QuestDef.h
+++ b/src/server/game/Quests/QuestDef.h
@@ -120,7 +120,7 @@ enum __QuestGiverStatus
DIALOG_STATUS_REWARD = 10 // yellow dot on minimap
};
-enum __QuestFlags
+enum QuestFlags
{
// Flags used at server and sent to client
QUEST_FLAGS_NONE = 0x00000000,
@@ -150,8 +150,9 @@ enum __QuestFlags
QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT = 0x00200000, // Set by 2 in SpecialFlags from DB (if reequired area explore, spell SPELL_EFFECT_QUEST_COMPLETE casting, table `*_script` command SCRIPT_COMMAND_QUEST_EXPLORED use, set from script)
QUEST_TRINITY_FLAGS_AUTO_ACCEPT = 0x00400000, // Set by 4 in SpecialFlags in DB if the quest is to be auto-accepted.
QUEST_TRINITY_FLAGS_DF_QUEST = 0x00800000, // Set by 8 in SpecialFlags in DB if the quest is used by Dungeon Finder.
+ QUEST_TRINITY_FLAGS_MONTHLY = 0x01000000, // Set by 16 in SpecialFlags in DB if the quest is reset at the begining of the month
- QUEST_TRINITY_FLAGS_DB_ALLOWED = 0xFFFFF | QUEST_TRINITY_FLAGS_REPEATABLE | QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT | QUEST_TRINITY_FLAGS_AUTO_ACCEPT | QUEST_TRINITY_FLAGS_DF_QUEST,
+ QUEST_TRINITY_FLAGS_DB_ALLOWED = 0xFFFFF | QUEST_TRINITY_FLAGS_REPEATABLE | QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT | QUEST_TRINITY_FLAGS_AUTO_ACCEPT | QUEST_TRINITY_FLAGS_DF_QUEST | QUEST_TRINITY_FLAGS_MONTHLY,
// Trinity flags for internal use only
QUEST_TRINITY_FLAGS_DELIVER = 0x04000000, // Internal flag computed only
@@ -243,7 +244,6 @@ class Quest
uint32 GetPointOpt() const { return PointOption; }
uint32 GetIncompleteEmote() const { return EmoteOnIncomplete; }
uint32 GetCompleteEmote() const { return EmoteOnComplete; }
- uint32 GetQuestStartScript() const { return StartScript; }
uint32 GetQuestCompleteScript() const { return CompleteScript; }
bool IsRepeatable() const { return Flags & QUEST_TRINITY_FLAGS_REPEATABLE; }
bool IsAutoAccept() const;
@@ -251,6 +251,7 @@ class Quest
uint32 GetFlags() const { return Flags; }
bool IsDaily() const { return Flags & QUEST_FLAGS_DAILY; }
bool IsWeekly() const { return Flags & QUEST_FLAGS_WEEKLY; }
+ bool IsMonthly() const { return Flags & QUEST_TRINITY_FLAGS_MONTHLY; }
bool IsSeasonal() const { return (ZoneOrSort == -QUEST_SORT_SEASONAL || ZoneOrSort == -QUEST_SORT_SPECIAL || ZoneOrSort == -QUEST_SORT_LUNAR_FESTIVAL || ZoneOrSort == -QUEST_SORT_MIDSUMMER || ZoneOrSort == -QUEST_SORT_BREWFEST || ZoneOrSort == -QUEST_SORT_LOVE_IS_IN_THE_AIR || ZoneOrSort == -QUEST_SORT_NOBLEGARDEN) && !IsRepeatable(); }
bool IsDailyOrWeekly() const { return Flags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY); }
bool IsRaidQuest() const { return Type == QUEST_TYPE_RAID || Type == QUEST_TYPE_RAID_10 || Type == QUEST_TYPE_RAID_25; }
@@ -353,7 +354,6 @@ class Quest
uint32 PointOption;
uint32 EmoteOnIncomplete;
uint32 EmoteOnComplete;
- uint32 StartScript;
uint32 CompleteScript;
};
diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index 3a8dc7c5e63..2294ec0d6a4 100755..100644
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -198,23 +198,24 @@ void ReputationMgr::SendState(FactionState const* faction)
void ReputationMgr::SendInitialReputations()
{
- WorldPacket data(SMSG_INITIALIZE_FACTIONS, (4+128*5));
- data << uint32 (0x00000080);
+ uint8 count = 128;
+ WorldPacket data(SMSG_INITIALIZE_FACTIONS, 4 + count * 5);
+ data << uint32(count);
RepListID a = 0;
for (FactionStateList::iterator itr = _factions.begin(); itr != _factions.end(); ++itr)
{
// fill in absent fields
- for (; a != itr->first; a++)
+ for (; a != itr->first; ++a)
{
- data << uint8 (0x00);
- data << uint32 (0x00000000);
+ data << uint8(0);
+ data << uint32(0);
}
// fill in encountered data
- data << uint8 (itr->second.Flags);
- data << uint32 (itr->second.Standing);
+ data << uint8(itr->second.Flags);
+ data << uint32(itr->second.Standing);
itr->second.needSend = false;
@@ -222,10 +223,10 @@ void ReputationMgr::SendInitialReputations()
}
// fill in absent fields
- for (; a != 128; a++)
+ for (; a != count; ++a)
{
- data << uint8 (0x00);
- data << uint32 (0x00000000);
+ data << uint8(0);
+ data << uint32(0);
}
_player->SendDirectMessage(&data);
diff --git a/src/server/game/Reputation/ReputationMgr.h b/src/server/game/Reputation/ReputationMgr.h
index f950cbb82c2..f950cbb82c2 100755..100644
--- a/src/server/game/Reputation/ReputationMgr.h
+++ b/src/server/game/Reputation/ReputationMgr.h
diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp
index 069ae71b7cb..069ae71b7cb 100755..100644
--- a/src/server/game/Scripting/MapScripts.cpp
+++ b/src/server/game/Scripting/MapScripts.cpp
diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp
index 56a020cad88..a41ebc02808 100755..100644
--- a/src/server/game/Scripting/ScriptLoader.cpp
+++ b/src/server/game/Scripting/ScriptLoader.cpp
@@ -91,7 +91,6 @@ void AddSC_npc_innkeeper();
void AddSC_npcs_special();
void AddSC_npc_taxi();
void AddSC_achievement_scripts();
-void AddSC_event_scripts();
//eastern kingdoms
void AddSC_alterac_valley(); //Alterac Valley
@@ -322,6 +321,7 @@ void AddSC_boss_ayamiss();
void AddSC_boss_ossirian();
void AddSC_instance_ruins_of_ahnqiraj();
void AddSC_boss_cthun(); //Temple of ahn'qiraj
+void AddSC_boss_viscidus();
void AddSC_boss_fankriss();
void AddSC_boss_huhuran();
void AddSC_bug_trio();
@@ -603,6 +603,9 @@ void AddSC_shattrath_city();
void AddSC_terokkar_forest();
void AddSC_zangarmarsh();
+// Events
+void AddSC_event_childrens_week();
+
// battlegrounds
// outdoor pvp
@@ -716,7 +719,6 @@ void AddWorldScripts()
AddSC_npc_taxi();
AddSC_achievement_scripts();
AddSC_chat_log();
- AddSC_event_scripts();
#endif
}
@@ -955,6 +957,7 @@ void AddKalimdorScripts()
AddSC_boss_ossirian();
AddSC_instance_ruins_of_ahnqiraj();
AddSC_boss_cthun(); //Temple of ahn'qiraj
+ AddSC_boss_viscidus();
AddSC_boss_fankriss();
AddSC_boss_huhuran();
AddSC_bug_trio();
@@ -1246,6 +1249,13 @@ void AddNorthrendScripts()
#endif
}
+void AddEventScripts()
+{
+#ifdef SCRIPTS
+ AddSC_event_childrens_week();
+#endif
+}
+
void AddOutdoorPvPScripts()
{
#ifdef SCRIPTS
diff --git a/src/server/game/Scripting/ScriptLoader.h b/src/server/game/Scripting/ScriptLoader.h
index 0db6917a0d4..04ab3215551 100644
--- a/src/server/game/Scripting/ScriptLoader.h
+++ b/src/server/game/Scripting/ScriptLoader.h
@@ -27,6 +27,7 @@ void AddEasternKingdomsScripts();
void AddKalimdorScripts();
void AddOutlandScripts();
void AddNorthrendScripts();
+void AddEventScripts();
void AddBattlegroundScripts();
void AddOutdoorPvPScripts();
void AddCustomScripts();
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index 6682d3c11e3..401b0e1728b 100755..100644
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -160,83 +160,7 @@ class ScriptRegistry
if (!V) \
return R;
-void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* target)
-{
- if (!pSource)
- {
- sLog->outError(LOG_FILTER_TSCR, "DoScriptText entry %i, invalid Source pointer.", iTextEntry);
- return;
- }
-
- if (iTextEntry >= 0)
- {
- sLog->outError(LOG_FILTER_TSCR, "DoScriptText with source entry %u (TypeId=%u, guid=%u) attempts to process text entry %i, but text entry must be negative.", pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry);
- return;
- }
-
- const StringTextData* pData = sScriptSystemMgr->GetTextData(iTextEntry);
-
- if (!pData)
- {
- sLog->outError(LOG_FILTER_TSCR, "DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.", pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry);
- return;
- }
-
- sLog->outDebug(LOG_FILTER_TSCR, "DoScriptText: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", iTextEntry, pData->uiSoundId, pData->uiType, pData->uiLanguage, pData->uiEmote);
-
- if (pData->uiSoundId)
- {
- if (sSoundEntriesStore.LookupEntry(pData->uiSoundId))
- pSource->SendPlaySound(pData->uiSoundId, false);
- else
- sLog->outError(LOG_FILTER_TSCR, "DoScriptText entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId);
- }
-
- if (pData->uiEmote)
- {
- if (pSource->GetTypeId() == TYPEID_UNIT || pSource->GetTypeId() == TYPEID_PLAYER)
- ((Unit*)pSource)->HandleEmoteCommand(pData->uiEmote);
- else
- sLog->outError(LOG_FILTER_TSCR, "DoScriptText entry %i tried to process emote for invalid TypeId (%u).", iTextEntry, pSource->GetTypeId());
- }
-
- switch (pData->uiType)
- {
- case CHAT_TYPE_SAY:
- pSource->MonsterSay(iTextEntry, pData->uiLanguage, target ? target->GetGUID() : 0);
- break;
- case CHAT_TYPE_YELL:
- pSource->MonsterYell(iTextEntry, pData->uiLanguage, target ? target->GetGUID() : 0);
- break;
- case CHAT_TYPE_TEXT_EMOTE:
- pSource->MonsterTextEmote(iTextEntry, target ? target->GetGUID() : 0);
- break;
- case CHAT_TYPE_BOSS_EMOTE:
- pSource->MonsterTextEmote(iTextEntry, target ? target->GetGUID() : 0, true);
- break;
- case CHAT_TYPE_WHISPER:
- {
- if (target && target->GetTypeId() == TYPEID_PLAYER)
- pSource->MonsterWhisper(iTextEntry, target->GetGUID());
- else
- sLog->outError(LOG_FILTER_TSCR, "DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry);
-
- break;
- }
- case CHAT_TYPE_BOSS_WHISPER:
- {
- if (target && target->GetTypeId() == TYPEID_PLAYER)
- pSource->MonsterWhisper(iTextEntry, target->GetGUID(), true);
- else
- sLog->outError(LOG_FILTER_TSCR, "DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry);
- break;
- }
- case CHAT_TYPE_ZONE_YELL:
- pSource->MonsterYellToZone(iTextEntry, pData->uiLanguage, target ? target->GetGUID() : 0);
- break;
- }
-}
ScriptMgr::ScriptMgr()
: _scriptCount(0), _scheduledScripts(0)
@@ -293,14 +217,13 @@ void ScriptMgr::Unload()
SCR_CLEAR(PlayerScript);
SCR_CLEAR(GuildScript);
SCR_CLEAR(GroupScript);
+ SCR_CLEAR(UnitScript);
#undef SCR_CLEAR
}
void ScriptMgr::LoadDatabase()
{
- sScriptSystemMgr->LoadScriptTexts();
- sScriptSystemMgr->LoadScriptTextsCustom();
sScriptSystemMgr->LoadScriptWaypoints();
}
@@ -1416,6 +1339,22 @@ void ScriptMgr::OnGroupDisband(Group* group)
FOREACH_SCRIPT(GroupScript)->OnDisband(group);
}
+// Unit
+void ScriptMgr::ModifyPeriodicDamageAurasTick(Unit* target, Unit* attacker, uint32& damage)
+{
+ FOREACH_SCRIPT(UnitScript)->ModifyPeriodicDamageAurasTick(target, attacker, damage);
+}
+
+void ScriptMgr::ModifyMeleeDamage(Unit* target, Unit* attacker, uint32& damage)
+{
+ FOREACH_SCRIPT(UnitScript)->ModifyMeleeDamage(target, attacker, damage);
+}
+
+void ScriptMgr::ModifySpellDamageTaken(Unit* target, Unit* attacker, int32& damage)
+{
+ FOREACH_SCRIPT(UnitScript)->ModifySpellDamageTaken(target, attacker, damage);
+}
+
SpellScriptLoader::SpellScriptLoader(const char* name)
: ScriptObject(name)
{
@@ -1440,6 +1379,13 @@ FormulaScript::FormulaScript(const char* name)
ScriptRegistry<FormulaScript>::AddScript(this);
}
+UnitScript::UnitScript(const char* name, bool addToScripts)
+ : ScriptObject(name)
+{
+ if (addToScripts)
+ ScriptRegistry<UnitScript>::AddScript(this);
+}
+
WorldMapScript::WorldMapScript(const char* name, uint32 mapId)
: ScriptObject(name), MapScript<Map>(mapId)
{
@@ -1474,7 +1420,7 @@ ItemScript::ItemScript(const char* name)
}
CreatureScript::CreatureScript(const char* name)
- : ScriptObject(name)
+ : UnitScript(name, false)
{
ScriptRegistry<CreatureScript>::AddScript(this);
}
@@ -1552,7 +1498,7 @@ AchievementCriteriaScript::AchievementCriteriaScript(const char* name)
}
PlayerScript::PlayerScript(const char* name)
- : ScriptObject(name)
+ : UnitScript(name, false)
{
ScriptRegistry<PlayerScript>::AddScript(this);
}
@@ -1598,6 +1544,7 @@ template class ScriptRegistry<AchievementCriteriaScript>;
template class ScriptRegistry<PlayerScript>;
template class ScriptRegistry<GuildScript>;
template class ScriptRegistry<GroupScript>;
+template class ScriptRegistry<UnitScript>;
// Undefine utility macros.
#undef GET_SCRIPT_RET
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h
index 947be2b73fe..0f6fd5d018b 100755..100644
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -69,8 +69,6 @@ struct OutdoorPvPData;
#define VISIBLE_RANGE 166.0f //MAX visible range (size of grid)
-// Generic scripting text function.
-void DoScriptText(int32 textEntry, WorldObject* pSource, Unit* target = NULL);
/*
TODO: Add more script type classes.
@@ -394,7 +392,24 @@ class ItemScript : public ScriptObject
virtual bool OnExpire(Player* /*player*/, ItemTemplate const* /*proto*/) { return false; }
};
-class CreatureScript : public ScriptObject, public UpdatableScript<Creature>
+class UnitScript : public ScriptObject
+{
+ protected:
+
+ UnitScript(const char* name, bool addToScripts = true);
+
+ public:
+ // Called when DoT's Tick Damage is being Dealt
+ virtual void ModifyPeriodicDamageAurasTick(Unit* /*target*/, Unit* /*attacker*/, uint32& /*damage*/) { }
+
+ // Called when Melee Damage is being Dealt
+ virtual void ModifyMeleeDamage(Unit* /*target*/, Unit* /*attacker*/, uint32& /*damage*/) { }
+
+ // Called when Spell Damage is being Dealt
+ virtual void ModifySpellDamageTaken(Unit* /*target*/, Unit* /*attacker*/, int32& /*damage*/) { }
+};
+
+class CreatureScript : public UnitScript, public UpdatableScript<Creature>
{
protected:
@@ -656,7 +671,7 @@ class AchievementCriteriaScript : public ScriptObject
virtual bool OnCheck(Player* source, Unit* target) = 0;
};
-class PlayerScript : public ScriptObject
+class PlayerScript : public UnitScript
{
protected:
@@ -1033,6 +1048,12 @@ class ScriptMgr
void OnGroupChangeLeader(Group* group, uint64 newLeaderGuid, uint64 oldLeaderGuid);
void OnGroupDisband(Group* group);
+ public: /* UnitScript */
+
+ void ModifyPeriodicDamageAurasTick(Unit* target, Unit* attacker, uint32& damage);
+ void ModifyMeleeDamage(Unit* target, Unit* attacker, uint32& damage);
+ void ModifySpellDamageTaken(Unit* target, Unit* attacker, int32& damage);
+
public: /* Scheduled scripts */
uint32 IncreaseScheduledScriptsCount() { return ++_scheduledScripts; }
diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp
index 41b41b91808..ea1cf6b1994 100755..100644
--- a/src/server/game/Scripting/ScriptSystem.cpp
+++ b/src/server/game/Scripting/ScriptSystem.cpp
@@ -23,128 +23,6 @@
ScriptPointVector const SystemMgr::_empty;
-void SystemMgr::LoadScriptTexts()
-{
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Script Texts...");
- LoadTrinityStrings("script_texts", TEXT_SOURCE_RANGE, 1+(TEXT_SOURCE_RANGE*2));
-
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Script Texts additional data...");
- uint32 oldMSTime = getMSTime();
-
- // 0 1 2 3
- QueryResult result = WorldDatabase.Query("SELECT entry, sound, type, language, emote FROM script_texts");
-
- if (!result)
- {
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 additional Script Texts data. DB table `script_texts` is empty.");
- return;
- }
-
- uint32 uiCount = 0;
-
- do
- {
- Field* pFields = result->Fetch();
- StringTextData temp;
-
- int32 iId = pFields[0].GetInt32();
- temp.uiSoundId = pFields[1].GetUInt32();
- temp.uiType = pFields[2].GetUInt8();
- temp.uiLanguage = pFields[3].GetUInt8();
- temp.uiEmote = pFields[4].GetUInt16();
-
- if (iId >= 0)
- {
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `script_texts` is not a negative value.", iId);
- continue;
- }
-
- if (iId > TEXT_SOURCE_RANGE || iId <= TEXT_SOURCE_RANGE*2)
- {
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `script_texts` is out of accepted entry range for table.", iId);
- continue;
- }
-
- if (temp.uiSoundId)
- {
- if (!sSoundEntriesStore.LookupEntry(temp.uiSoundId))
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `script_texts` has soundId %u but sound does not exist.", iId, temp.uiSoundId);
- }
-
- if (!GetLanguageDescByID(temp.uiLanguage))
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `script_texts` using Language %u but Language does not exist.", iId, temp.uiLanguage);
-
- if (temp.uiType > CHAT_TYPE_ZONE_YELL)
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `script_texts` has Type %u but this Chat Type does not exist.", iId, temp.uiType);
-
- m_mTextDataMap[iId] = temp;
- ++uiCount;
- }
- while (result->NextRow());
-
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u additional Script Texts data in %u ms", uiCount, GetMSTimeDiffToNow(oldMSTime));
-}
-
-void SystemMgr::LoadScriptTextsCustom()
-{
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Custom Texts...");
- LoadTrinityStrings("custom_texts", TEXT_SOURCE_RANGE*2, 1+(TEXT_SOURCE_RANGE*3));
-
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Custom Texts additional data...");
-
- QueryResult result = WorldDatabase.Query("SELECT entry, sound, type, language, emote FROM custom_texts");
-
- if (!result)
- {
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 additional Custom Texts data. DB table `custom_texts` is empty.");
- return;
- }
-
- uint32 uiCount = 0;
-
- do
- {
- Field* pFields = result->Fetch();
- StringTextData temp;
-
- int32 iId = pFields[0].GetInt32();
- temp.uiSoundId = pFields[1].GetUInt32();
- temp.uiType = pFields[2].GetUInt8();
- temp.uiLanguage = pFields[3].GetUInt8();
- temp.uiEmote = pFields[4].GetUInt16();
-
- if (iId >= 0)
- {
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `custom_texts` is not a negative value.", iId);
- continue;
- }
-
- if (iId > TEXT_SOURCE_RANGE*2 || iId <= TEXT_SOURCE_RANGE*3)
- {
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `custom_texts` is out of accepted entry range for table.", iId);
- continue;
- }
-
- if (temp.uiSoundId)
- {
- if (!sSoundEntriesStore.LookupEntry(temp.uiSoundId))
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `custom_texts` has soundId %u but sound does not exist.", iId, temp.uiSoundId);
- }
-
- if (!GetLanguageDescByID(temp.uiLanguage))
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `custom_texts` using Language %u but Language does not exist.", iId, temp.uiLanguage);
-
- if (temp.uiType > CHAT_TYPE_ZONE_YELL)
- sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `custom_texts` has Type %u but this Chat Type does not exist.", iId, temp.uiType);
-
- m_mTextDataMap[iId] = temp;
- ++uiCount;
- }
- while (result->NextRow());
-
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u additional Custom Texts data.", uiCount);
-}
-
void SystemMgr::LoadScriptWaypoints()
{
uint32 oldMSTime = getMSTime();
diff --git a/src/server/game/Scripting/ScriptSystem.h b/src/server/game/Scripting/ScriptSystem.h
index 4211a63b043..cc65d493f3e 100644
--- a/src/server/game/Scripting/ScriptSystem.h
+++ b/src/server/game/Scripting/ScriptSystem.h
@@ -46,14 +46,6 @@ struct ScriptPointMove
typedef std::vector<ScriptPointMove> ScriptPointVector;
-struct StringTextData
-{
- uint32 uiSoundId;
- uint8 uiType;
- uint32 uiLanguage;
- uint32 uiEmote;
-};
-
class SystemMgr
{
friend class ACE_Singleton<SystemMgr, ACE_Null_Mutex>;
@@ -61,26 +53,11 @@ class SystemMgr
~SystemMgr() {}
public:
- //Maps and lists
- typedef UNORDERED_MAP<int32, StringTextData> TextDataMap;
typedef UNORDERED_MAP<uint32, ScriptPointVector> PointMoveMap;
//Database
- void LoadScriptTexts();
- void LoadScriptTextsCustom();
void LoadScriptWaypoints();
- //Retrive from storage
- StringTextData const* GetTextData(int32 textId) const
- {
- TextDataMap::const_iterator itr = m_mTextDataMap.find(textId);
-
- if (itr == m_mTextDataMap.end())
- return NULL;
-
- return &itr->second;
- }
-
ScriptPointVector const& GetPointMoveList(uint32 creatureEntry) const
{
PointMoveMap::const_iterator itr = m_mPointMoveMap.find(creatureEntry);
@@ -92,7 +69,6 @@ class SystemMgr
}
protected:
- TextDataMap m_mTextDataMap; //additional data for text strings
PointMoveMap m_mPointMoveMap; //coordinates for waypoints
private:
diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp
index 0821be2abb9..0821be2abb9 100755..100644
--- a/src/server/game/Server/Protocol/Opcodes.cpp
+++ b/src/server/game/Server/Protocol/Opcodes.cpp
diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h
index 625ee88a853..625ee88a853 100755..100644
--- a/src/server/game/Server/Protocol/Opcodes.h
+++ b/src/server/game/Server/Protocol/Opcodes.h
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index 0185d4adc9f..0185d4adc9f 100755..100644
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h
index a442bb45a69..a442bb45a69 100755..100644
--- a/src/server/game/Server/WorldSession.h
+++ b/src/server/game/Server/WorldSession.h
diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp
index 8b034299ad6..8b034299ad6 100755..100644
--- a/src/server/game/Server/WorldSocket.cpp
+++ b/src/server/game/Server/WorldSocket.cpp
diff --git a/src/server/game/Server/WorldSocket.h b/src/server/game/Server/WorldSocket.h
index b8080b128f2..b8080b128f2 100755..100644
--- a/src/server/game/Server/WorldSocket.h
+++ b/src/server/game/Server/WorldSocket.h
diff --git a/src/server/game/Server/WorldSocketMgr.cpp b/src/server/game/Server/WorldSocketMgr.cpp
index ed960258c41..ed960258c41 100755..100644
--- a/src/server/game/Server/WorldSocketMgr.cpp
+++ b/src/server/game/Server/WorldSocketMgr.cpp
diff --git a/src/server/game/Server/WorldSocketMgr.h b/src/server/game/Server/WorldSocketMgr.h
index fd7e28485cf..fd7e28485cf 100755..100644
--- a/src/server/game/Server/WorldSocketMgr.h
+++ b/src/server/game/Server/WorldSocketMgr.h
diff --git a/src/server/game/Skills/SkillDiscovery.cpp b/src/server/game/Skills/SkillDiscovery.cpp
index 3eac3d34fd2..3eac3d34fd2 100755..100644
--- a/src/server/game/Skills/SkillDiscovery.cpp
+++ b/src/server/game/Skills/SkillDiscovery.cpp
diff --git a/src/server/game/Skills/SkillDiscovery.h b/src/server/game/Skills/SkillDiscovery.h
index ba5542e0189..ba5542e0189 100755..100644
--- a/src/server/game/Skills/SkillDiscovery.h
+++ b/src/server/game/Skills/SkillDiscovery.h
diff --git a/src/server/game/Skills/SkillExtraItems.cpp b/src/server/game/Skills/SkillExtraItems.cpp
index 9e2648dc943..9e2648dc943 100755..100644
--- a/src/server/game/Skills/SkillExtraItems.cpp
+++ b/src/server/game/Skills/SkillExtraItems.cpp
diff --git a/src/server/game/Skills/SkillExtraItems.h b/src/server/game/Skills/SkillExtraItems.h
index 0cf49021e1c..0cf49021e1c 100755..100644
--- a/src/server/game/Skills/SkillExtraItems.h
+++ b/src/server/game/Skills/SkillExtraItems.h
diff --git a/src/server/game/Spells/Auras/SpellAuraDefines.h b/src/server/game/Spells/Auras/SpellAuraDefines.h
index 6902dd60c80..11e4a28e084 100755..100644
--- a/src/server/game/Spells/Auras/SpellAuraDefines.h
+++ b/src/server/game/Spells/Auras/SpellAuraDefines.h
@@ -59,324 +59,324 @@ enum DAMAGE_ABSORB_TYPE
enum AuraType
{
- SPELL_AURA_NONE = 0,
- SPELL_AURA_BIND_SIGHT = 1,
- SPELL_AURA_MOD_POSSESS = 2,
- SPELL_AURA_PERIODIC_DAMAGE = 3,
- SPELL_AURA_DUMMY = 4,
- SPELL_AURA_MOD_CONFUSE = 5,
- SPELL_AURA_MOD_CHARM = 6,
- SPELL_AURA_MOD_FEAR = 7,
- SPELL_AURA_PERIODIC_HEAL = 8,
- SPELL_AURA_MOD_ATTACKSPEED = 9,
- SPELL_AURA_MOD_THREAT = 10,
- SPELL_AURA_MOD_TAUNT = 11,
- SPELL_AURA_MOD_STUN = 12,
- SPELL_AURA_MOD_DAMAGE_DONE = 13,
- SPELL_AURA_MOD_DAMAGE_TAKEN = 14,
- SPELL_AURA_DAMAGE_SHIELD = 15,
- SPELL_AURA_MOD_STEALTH = 16,
- SPELL_AURA_MOD_STEALTH_DETECT = 17,
- SPELL_AURA_MOD_INVISIBILITY = 18,
- SPELL_AURA_MOD_INVISIBILITY_DETECT = 19,
- SPELL_AURA_OBS_MOD_HEALTH = 20, //20, 21 unofficial
- SPELL_AURA_OBS_MOD_POWER = 21,
- SPELL_AURA_MOD_RESISTANCE = 22,
- SPELL_AURA_PERIODIC_TRIGGER_SPELL = 23,
- SPELL_AURA_PERIODIC_ENERGIZE = 24,
- SPELL_AURA_MOD_PACIFY = 25,
- SPELL_AURA_MOD_ROOT = 26,
- SPELL_AURA_MOD_SILENCE = 27,
- SPELL_AURA_REFLECT_SPELLS = 28,
- SPELL_AURA_MOD_STAT = 29,
- SPELL_AURA_MOD_SKILL = 30,
- SPELL_AURA_MOD_INCREASE_SPEED = 31,
- SPELL_AURA_MOD_INCREASE_MOUNTED_SPEED = 32,
- SPELL_AURA_MOD_DECREASE_SPEED = 33,
- SPELL_AURA_MOD_INCREASE_HEALTH = 34,
- SPELL_AURA_MOD_INCREASE_ENERGY = 35,
- SPELL_AURA_MOD_SHAPESHIFT = 36,
- SPELL_AURA_EFFECT_IMMUNITY = 37,
- SPELL_AURA_STATE_IMMUNITY = 38,
- SPELL_AURA_SCHOOL_IMMUNITY = 39,
- SPELL_AURA_DAMAGE_IMMUNITY = 40,
- SPELL_AURA_DISPEL_IMMUNITY = 41,
- SPELL_AURA_PROC_TRIGGER_SPELL = 42,
- SPELL_AURA_PROC_TRIGGER_DAMAGE = 43,
- SPELL_AURA_TRACK_CREATURES = 44,
- SPELL_AURA_TRACK_RESOURCES = 45,
- SPELL_AURA_46 = 46, // Ignore all Gear test spells
- SPELL_AURA_MOD_PARRY_PERCENT = 47,
- SPELL_AURA_48 = 48, // One periodic spell
- SPELL_AURA_MOD_DODGE_PERCENT = 49,
- SPELL_AURA_MOD_CRITICAL_HEALING_AMOUNT = 50,
- SPELL_AURA_MOD_BLOCK_PERCENT = 51,
- SPELL_AURA_MOD_WEAPON_CRIT_PERCENT = 52,
- SPELL_AURA_PERIODIC_LEECH = 53,
- SPELL_AURA_MOD_HIT_CHANCE = 54,
- SPELL_AURA_MOD_SPELL_HIT_CHANCE = 55,
- SPELL_AURA_TRANSFORM = 56,
- SPELL_AURA_MOD_SPELL_CRIT_CHANCE = 57,
- SPELL_AURA_MOD_INCREASE_SWIM_SPEED = 58,
- SPELL_AURA_MOD_DAMAGE_DONE_CREATURE = 59,
- SPELL_AURA_MOD_PACIFY_SILENCE = 60,
- SPELL_AURA_MOD_SCALE = 61,
- SPELL_AURA_PERIODIC_HEALTH_FUNNEL = 62,
- SPELL_AURA_63 = 63, // old SPELL_AURA_PERIODIC_MANA_FUNNEL
- SPELL_AURA_PERIODIC_MANA_LEECH = 64,
- SPELL_AURA_MOD_CASTING_SPEED_NOT_STACK = 65,
- SPELL_AURA_FEIGN_DEATH = 66,
- SPELL_AURA_MOD_DISARM = 67,
- SPELL_AURA_MOD_STALKED = 68,
- SPELL_AURA_SCHOOL_ABSORB = 69,
- SPELL_AURA_EXTRA_ATTACKS = 70,
- SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL = 71,
- SPELL_AURA_MOD_POWER_COST_SCHOOL_PCT = 72,
- SPELL_AURA_MOD_POWER_COST_SCHOOL = 73,
- SPELL_AURA_REFLECT_SPELLS_SCHOOL = 74,
- SPELL_AURA_MOD_LANGUAGE = 75,
- SPELL_AURA_FAR_SIGHT = 76,
- SPELL_AURA_MECHANIC_IMMUNITY = 77,
- SPELL_AURA_MOUNTED = 78,
- SPELL_AURA_MOD_DAMAGE_PERCENT_DONE = 79,
- SPELL_AURA_MOD_PERCENT_STAT = 80,
- SPELL_AURA_SPLIT_DAMAGE_PCT = 81,
- SPELL_AURA_WATER_BREATHING = 82,
- SPELL_AURA_MOD_BASE_RESISTANCE = 83,
- SPELL_AURA_MOD_REGEN = 84,
- SPELL_AURA_MOD_POWER_REGEN = 85,
- SPELL_AURA_CHANNEL_DEATH_ITEM = 86,
- SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN = 87,
- SPELL_AURA_MOD_HEALTH_REGEN_PERCENT = 88,
- SPELL_AURA_PERIODIC_DAMAGE_PERCENT = 89,
- SPELL_AURA_90 = 90, // old SPELL_AURA_MOD_RESIST_CHANCE
- SPELL_AURA_MOD_DETECT_RANGE = 91,
- SPELL_AURA_PREVENTS_FLEEING = 92,
- SPELL_AURA_MOD_UNATTACKABLE = 93,
- SPELL_AURA_INTERRUPT_REGEN = 94,
- SPELL_AURA_GHOST = 95,
- SPELL_AURA_SPELL_MAGNET = 96,
- SPELL_AURA_MANA_SHIELD = 97,
- SPELL_AURA_MOD_SKILL_TALENT = 98,
- SPELL_AURA_MOD_ATTACK_POWER = 99,
- SPELL_AURA_AURAS_VISIBLE = 100,
- SPELL_AURA_MOD_RESISTANCE_PCT = 101,
- SPELL_AURA_MOD_MELEE_ATTACK_POWER_VERSUS = 102,
- SPELL_AURA_MOD_TOTAL_THREAT = 103,
- SPELL_AURA_WATER_WALK = 104,
- SPELL_AURA_FEATHER_FALL = 105,
- SPELL_AURA_HOVER = 106,
- SPELL_AURA_ADD_FLAT_MODIFIER = 107,
- SPELL_AURA_ADD_PCT_MODIFIER = 108,
- SPELL_AURA_ADD_TARGET_TRIGGER = 109,
- SPELL_AURA_MOD_POWER_REGEN_PERCENT = 110,
- SPELL_AURA_ADD_CASTER_HIT_TRIGGER = 111,
- SPELL_AURA_OVERRIDE_CLASS_SCRIPTS = 112,
- SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN = 113,
- SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN_PCT = 114,
- SPELL_AURA_MOD_HEALING = 115,
- SPELL_AURA_MOD_REGEN_DURING_COMBAT = 116,
- SPELL_AURA_MOD_MECHANIC_RESISTANCE = 117,
- SPELL_AURA_MOD_HEALING_PCT = 118,
- SPELL_AURA_119 = 119, // old SPELL_AURA_SHARE_PET_TRACKING
- SPELL_AURA_UNTRACKABLE = 120,
- SPELL_AURA_EMPATHY = 121,
- SPELL_AURA_MOD_OFFHAND_DAMAGE_PCT = 122,
- SPELL_AURA_MOD_TARGET_RESISTANCE = 123,
- SPELL_AURA_MOD_RANGED_ATTACK_POWER = 124,
- SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN = 125,
- SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN_PCT = 126,
- SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS = 127,
- SPELL_AURA_MOD_POSSESS_PET = 128,
- SPELL_AURA_MOD_SPEED_ALWAYS = 129,
- SPELL_AURA_MOD_MOUNTED_SPEED_ALWAYS = 130,
- SPELL_AURA_MOD_RANGED_ATTACK_POWER_VERSUS = 131,
- SPELL_AURA_MOD_INCREASE_ENERGY_PERCENT = 132,
- SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT = 133,
- SPELL_AURA_MOD_MANA_REGEN_INTERRUPT = 134,
- SPELL_AURA_MOD_HEALING_DONE = 135,
- SPELL_AURA_MOD_HEALING_DONE_PERCENT = 136,
- SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE = 137,
- SPELL_AURA_MOD_MELEE_HASTE = 138,
- SPELL_AURA_FORCE_REACTION = 139,
- SPELL_AURA_MOD_RANGED_HASTE = 140,
- SPELL_AURA_MOD_RANGED_AMMO_HASTE = 141,
- SPELL_AURA_MOD_BASE_RESISTANCE_PCT = 142,
- SPELL_AURA_MOD_RESISTANCE_EXCLUSIVE = 143,
- SPELL_AURA_SAFE_FALL = 144,
- SPELL_AURA_MOD_PET_TALENT_POINTS = 145,
- SPELL_AURA_ALLOW_TAME_PET_TYPE = 146,
- SPELL_AURA_MECHANIC_IMMUNITY_MASK = 147,
- SPELL_AURA_RETAIN_COMBO_POINTS = 148,
- SPELL_AURA_REDUCE_PUSHBACK = 149, // Reduce Pushback
- SPELL_AURA_MOD_SHIELD_BLOCKVALUE_PCT = 150,
- SPELL_AURA_TRACK_STEALTHED = 151, // Track Stealthed
- SPELL_AURA_MOD_DETECTED_RANGE = 152, // Mod Detected Range
- SPELL_AURA_SPLIT_DAMAGE_FLAT = 153, // Split Damage Flat
- SPELL_AURA_MOD_STEALTH_LEVEL = 154, // Stealth Level Modifier
- SPELL_AURA_MOD_WATER_BREATHING = 155, // Mod Water Breathing
- SPELL_AURA_MOD_REPUTATION_GAIN = 156, // Mod Reputation Gain
- SPELL_AURA_PET_DAMAGE_MULTI = 157, // Mod Pet Damage
- SPELL_AURA_MOD_SHIELD_BLOCKVALUE = 158,
- SPELL_AURA_NO_PVP_CREDIT = 159,
- SPELL_AURA_MOD_AOE_AVOIDANCE = 160,
- SPELL_AURA_MOD_HEALTH_REGEN_IN_COMBAT = 161,
- SPELL_AURA_POWER_BURN = 162,
- SPELL_AURA_MOD_CRIT_DAMAGE_BONUS = 163,
- SPELL_AURA_164 = 164,
- SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS = 165,
- SPELL_AURA_MOD_ATTACK_POWER_PCT = 166,
- SPELL_AURA_MOD_RANGED_ATTACK_POWER_PCT = 167,
- SPELL_AURA_MOD_DAMAGE_DONE_VERSUS = 168,
- SPELL_AURA_MOD_CRIT_PERCENT_VERSUS = 169,
- SPELL_AURA_DETECT_AMORE = 170,
- SPELL_AURA_MOD_SPEED_NOT_STACK = 171,
- SPELL_AURA_MOD_MOUNTED_SPEED_NOT_STACK = 172,
- SPELL_AURA_173 = 173, // old SPELL_AURA_ALLOW_CHAMPION_SPELLS
- SPELL_AURA_MOD_SPELL_DAMAGE_OF_STAT_PERCENT = 174, // by defeult intelect, dependent from SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT
- SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT = 175,
- SPELL_AURA_SPIRIT_OF_REDEMPTION = 176,
- SPELL_AURA_AOE_CHARM = 177,
- SPELL_AURA_MOD_DEBUFF_RESISTANCE = 178,
- SPELL_AURA_MOD_ATTACKER_SPELL_CRIT_CHANCE = 179,
- SPELL_AURA_MOD_FLAT_SPELL_DAMAGE_VERSUS = 180,
- SPELL_AURA_181 = 181, // old SPELL_AURA_MOD_FLAT_SPELL_CRIT_DAMAGE_VERSUS - possible flat spell crit damage versus
- SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT = 182,
- SPELL_AURA_MOD_CRITICAL_THREAT = 183,
- SPELL_AURA_MOD_ATTACKER_MELEE_HIT_CHANCE = 184,
- SPELL_AURA_MOD_ATTACKER_RANGED_HIT_CHANCE= 185,
- SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE = 186,
- SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_CHANCE = 187,
- SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_CHANCE = 188,
- SPELL_AURA_MOD_RATING = 189,
- SPELL_AURA_MOD_FACTION_REPUTATION_GAIN = 190,
- SPELL_AURA_USE_NORMAL_MOVEMENT_SPEED = 191,
- SPELL_AURA_MOD_MELEE_RANGED_HASTE = 192,
- SPELL_AURA_MELEE_SLOW = 193,
- SPELL_AURA_MOD_TARGET_ABSORB_SCHOOL = 194,
- SPELL_AURA_MOD_TARGET_ABILITY_ABSORB_SCHOOL = 195,
- SPELL_AURA_MOD_COOLDOWN = 196, // only 24818 Noxious Breath
- SPELL_AURA_MOD_ATTACKER_SPELL_AND_WEAPON_CRIT_CHANCE = 197,
- SPELL_AURA_198 = 198, // old SPELL_AURA_MOD_ALL_WEAPON_SKILLS
- SPELL_AURA_MOD_INCREASES_SPELL_PCT_TO_HIT = 199,
- SPELL_AURA_MOD_XP_PCT = 200,
- SPELL_AURA_FLY = 201,
- SPELL_AURA_IGNORE_COMBAT_RESULT = 202,
- SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_DAMAGE = 203,
- SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_DAMAGE = 204,
- SPELL_AURA_MOD_SCHOOL_CRIT_DMG_TAKEN = 205,
- SPELL_AURA_MOD_INCREASE_VEHICLE_FLIGHT_SPEED = 206,
- SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED = 207,
- SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED = 208,
- SPELL_AURA_MOD_MOUNTED_FLIGHT_SPEED_ALWAYS = 209,
- SPELL_AURA_MOD_VEHICLE_SPEED_ALWAYS = 210,
- SPELL_AURA_MOD_FLIGHT_SPEED_NOT_STACK = 211,
- SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT = 212,
- SPELL_AURA_MOD_RAGE_FROM_DAMAGE_DEALT = 213,
- SPELL_AURA_214 = 214,
- SPELL_AURA_ARENA_PREPARATION = 215,
- SPELL_AURA_HASTE_SPELLS = 216,
- SPELL_AURA_MOD_MELEE_HASTE_2 = 217, // NYI
- SPELL_AURA_HASTE_RANGED = 218,
- SPELL_AURA_MOD_MANA_REGEN_FROM_STAT = 219,
- SPELL_AURA_MOD_RATING_FROM_STAT = 220,
- SPELL_AURA_MOD_DETAUNT = 221,
- SPELL_AURA_222 = 222,
- SPELL_AURA_RAID_PROC_FROM_CHARGE = 223,
- SPELL_AURA_224 = 224,
- SPELL_AURA_RAID_PROC_FROM_CHARGE_WITH_VALUE = 225,
- SPELL_AURA_PERIODIC_DUMMY = 226,
- SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE = 227,
- SPELL_AURA_DETECT_STEALTH = 228,
- SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE = 229,
- SPELL_AURA_230 = 230,
- SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE = 231,
- SPELL_AURA_MECHANIC_DURATION_MOD = 232,
- SPELL_AURA_CHANGE_MODEL_FOR_ALL_HUMANOIDS = 233, // client-side only
- SPELL_AURA_MECHANIC_DURATION_MOD_NOT_STACK = 234,
- SPELL_AURA_MOD_DISPEL_RESIST = 235,
- SPELL_AURA_CONTROL_VEHICLE = 236,
- SPELL_AURA_MOD_SPELL_DAMAGE_OF_ATTACK_POWER = 237,
- SPELL_AURA_MOD_SPELL_HEALING_OF_ATTACK_POWER = 238,
- SPELL_AURA_MOD_SCALE_2 = 239,
- SPELL_AURA_MOD_EXPERTISE = 240,
- SPELL_AURA_FORCE_MOVE_FORWARD = 241,
- SPELL_AURA_MOD_SPELL_DAMAGE_FROM_HEALING = 242,
- SPELL_AURA_MOD_FACTION = 243,
- SPELL_AURA_COMPREHEND_LANGUAGE = 244,
- SPELL_AURA_MOD_AURA_DURATION_BY_DISPEL = 245,
- SPELL_AURA_MOD_AURA_DURATION_BY_DISPEL_NOT_STACK = 246,
- SPELL_AURA_CLONE_CASTER = 247,
- SPELL_AURA_MOD_COMBAT_RESULT_CHANCE = 248,
- SPELL_AURA_CONVERT_RUNE = 249,
- SPELL_AURA_MOD_INCREASE_HEALTH_2 = 250,
- SPELL_AURA_MOD_ENEMY_DODGE = 251,
- SPELL_AURA_MOD_SPEED_SLOW_ALL = 252,
- SPELL_AURA_MOD_BLOCK_CRIT_CHANCE = 253,
- SPELL_AURA_MOD_DISARM_OFFHAND = 254,
- SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT = 255,
- SPELL_AURA_NO_REAGENT_USE = 256,
- SPELL_AURA_MOD_TARGET_RESIST_BY_SPELL_CLASS = 257,
- SPELL_AURA_258 = 258,
- SPELL_AURA_MOD_HOT_PCT = 259,
- SPELL_AURA_SCREEN_EFFECT = 260,
- SPELL_AURA_PHASE = 261,
- SPELL_AURA_ABILITY_IGNORE_AURASTATE = 262,
- SPELL_AURA_ALLOW_ONLY_ABILITY = 263,
- SPELL_AURA_264 = 264,
- SPELL_AURA_265 = 265,
- SPELL_AURA_266 = 266,
- SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL = 267,
+ SPELL_AURA_NONE = 0,
+ SPELL_AURA_BIND_SIGHT = 1,
+ SPELL_AURA_MOD_POSSESS = 2,
+ SPELL_AURA_PERIODIC_DAMAGE = 3,
+ SPELL_AURA_DUMMY = 4,
+ SPELL_AURA_MOD_CONFUSE = 5,
+ SPELL_AURA_MOD_CHARM = 6,
+ SPELL_AURA_MOD_FEAR = 7,
+ SPELL_AURA_PERIODIC_HEAL = 8,
+ SPELL_AURA_MOD_ATTACKSPEED = 9,
+ SPELL_AURA_MOD_THREAT = 10,
+ SPELL_AURA_MOD_TAUNT = 11,
+ SPELL_AURA_MOD_STUN = 12,
+ SPELL_AURA_MOD_DAMAGE_DONE = 13,
+ SPELL_AURA_MOD_DAMAGE_TAKEN = 14,
+ SPELL_AURA_DAMAGE_SHIELD = 15,
+ SPELL_AURA_MOD_STEALTH = 16,
+ SPELL_AURA_MOD_STEALTH_DETECT = 17,
+ SPELL_AURA_MOD_INVISIBILITY = 18,
+ SPELL_AURA_MOD_INVISIBILITY_DETECT = 19,
+ SPELL_AURA_OBS_MOD_HEALTH = 20, // 20, 21 unofficial
+ SPELL_AURA_OBS_MOD_POWER = 21,
+ SPELL_AURA_MOD_RESISTANCE = 22,
+ SPELL_AURA_PERIODIC_TRIGGER_SPELL = 23,
+ SPELL_AURA_PERIODIC_ENERGIZE = 24,
+ SPELL_AURA_MOD_PACIFY = 25,
+ SPELL_AURA_MOD_ROOT = 26,
+ SPELL_AURA_MOD_SILENCE = 27,
+ SPELL_AURA_REFLECT_SPELLS = 28,
+ SPELL_AURA_MOD_STAT = 29,
+ SPELL_AURA_MOD_SKILL = 30,
+ SPELL_AURA_MOD_INCREASE_SPEED = 31,
+ SPELL_AURA_MOD_INCREASE_MOUNTED_SPEED = 32,
+ SPELL_AURA_MOD_DECREASE_SPEED = 33,
+ SPELL_AURA_MOD_INCREASE_HEALTH = 34,
+ SPELL_AURA_MOD_INCREASE_ENERGY = 35,
+ SPELL_AURA_MOD_SHAPESHIFT = 36,
+ SPELL_AURA_EFFECT_IMMUNITY = 37,
+ SPELL_AURA_STATE_IMMUNITY = 38,
+ SPELL_AURA_SCHOOL_IMMUNITY = 39,
+ SPELL_AURA_DAMAGE_IMMUNITY = 40,
+ SPELL_AURA_DISPEL_IMMUNITY = 41,
+ SPELL_AURA_PROC_TRIGGER_SPELL = 42,
+ SPELL_AURA_PROC_TRIGGER_DAMAGE = 43,
+ SPELL_AURA_TRACK_CREATURES = 44,
+ SPELL_AURA_TRACK_RESOURCES = 45,
+ SPELL_AURA_46 = 46, // Ignore all Gear test spells
+ SPELL_AURA_MOD_PARRY_PERCENT = 47,
+ SPELL_AURA_48 = 48, // One periodic spell
+ SPELL_AURA_MOD_DODGE_PERCENT = 49,
+ SPELL_AURA_MOD_CRITICAL_HEALING_AMOUNT = 50,
+ SPELL_AURA_MOD_BLOCK_PERCENT = 51,
+ SPELL_AURA_MOD_WEAPON_CRIT_PERCENT = 52,
+ SPELL_AURA_PERIODIC_LEECH = 53,
+ SPELL_AURA_MOD_HIT_CHANCE = 54,
+ SPELL_AURA_MOD_SPELL_HIT_CHANCE = 55,
+ SPELL_AURA_TRANSFORM = 56,
+ SPELL_AURA_MOD_SPELL_CRIT_CHANCE = 57,
+ SPELL_AURA_MOD_INCREASE_SWIM_SPEED = 58,
+ SPELL_AURA_MOD_DAMAGE_DONE_CREATURE = 59,
+ SPELL_AURA_MOD_PACIFY_SILENCE = 60,
+ SPELL_AURA_MOD_SCALE = 61,
+ SPELL_AURA_PERIODIC_HEALTH_FUNNEL = 62,
+ SPELL_AURA_63 = 63, // old SPELL_AURA_PERIODIC_MANA_FUNNEL
+ SPELL_AURA_PERIODIC_MANA_LEECH = 64,
+ SPELL_AURA_MOD_CASTING_SPEED_NOT_STACK = 65,
+ SPELL_AURA_FEIGN_DEATH = 66,
+ SPELL_AURA_MOD_DISARM = 67,
+ SPELL_AURA_MOD_STALKED = 68,
+ SPELL_AURA_SCHOOL_ABSORB = 69,
+ SPELL_AURA_EXTRA_ATTACKS = 70,
+ SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL = 71,
+ SPELL_AURA_MOD_POWER_COST_SCHOOL_PCT = 72,
+ SPELL_AURA_MOD_POWER_COST_SCHOOL = 73,
+ SPELL_AURA_REFLECT_SPELLS_SCHOOL = 74,
+ SPELL_AURA_MOD_LANGUAGE = 75,
+ SPELL_AURA_FAR_SIGHT = 76,
+ SPELL_AURA_MECHANIC_IMMUNITY = 77,
+ SPELL_AURA_MOUNTED = 78,
+ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE = 79,
+ SPELL_AURA_MOD_PERCENT_STAT = 80,
+ SPELL_AURA_SPLIT_DAMAGE_PCT = 81,
+ SPELL_AURA_WATER_BREATHING = 82,
+ SPELL_AURA_MOD_BASE_RESISTANCE = 83,
+ SPELL_AURA_MOD_REGEN = 84,
+ SPELL_AURA_MOD_POWER_REGEN = 85,
+ SPELL_AURA_CHANNEL_DEATH_ITEM = 86,
+ SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN = 87,
+ SPELL_AURA_MOD_HEALTH_REGEN_PERCENT = 88,
+ SPELL_AURA_PERIODIC_DAMAGE_PERCENT = 89,
+ SPELL_AURA_90 = 90, // old SPELL_AURA_MOD_RESIST_CHANCE
+ SPELL_AURA_MOD_DETECT_RANGE = 91,
+ SPELL_AURA_PREVENTS_FLEEING = 92,
+ SPELL_AURA_MOD_UNATTACKABLE = 93,
+ SPELL_AURA_INTERRUPT_REGEN = 94,
+ SPELL_AURA_GHOST = 95,
+ SPELL_AURA_SPELL_MAGNET = 96,
+ SPELL_AURA_MANA_SHIELD = 97,
+ SPELL_AURA_MOD_SKILL_TALENT = 98,
+ SPELL_AURA_MOD_ATTACK_POWER = 99,
+ SPELL_AURA_AURAS_VISIBLE = 100,
+ SPELL_AURA_MOD_RESISTANCE_PCT = 101,
+ SPELL_AURA_MOD_MELEE_ATTACK_POWER_VERSUS = 102,
+ SPELL_AURA_MOD_TOTAL_THREAT = 103,
+ SPELL_AURA_WATER_WALK = 104,
+ SPELL_AURA_FEATHER_FALL = 105,
+ SPELL_AURA_HOVER = 106,
+ SPELL_AURA_ADD_FLAT_MODIFIER = 107,
+ SPELL_AURA_ADD_PCT_MODIFIER = 108,
+ SPELL_AURA_ADD_TARGET_TRIGGER = 109,
+ SPELL_AURA_MOD_POWER_REGEN_PERCENT = 110,
+ SPELL_AURA_ADD_CASTER_HIT_TRIGGER = 111,
+ SPELL_AURA_OVERRIDE_CLASS_SCRIPTS = 112,
+ SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN = 113,
+ SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN_PCT = 114,
+ SPELL_AURA_MOD_HEALING = 115,
+ SPELL_AURA_MOD_REGEN_DURING_COMBAT = 116,
+ SPELL_AURA_MOD_MECHANIC_RESISTANCE = 117,
+ SPELL_AURA_MOD_HEALING_PCT = 118,
+ SPELL_AURA_119 = 119, // old SPELL_AURA_SHARE_PET_TRACKING
+ SPELL_AURA_UNTRACKABLE = 120,
+ SPELL_AURA_EMPATHY = 121,
+ SPELL_AURA_MOD_OFFHAND_DAMAGE_PCT = 122,
+ SPELL_AURA_MOD_TARGET_RESISTANCE = 123,
+ SPELL_AURA_MOD_RANGED_ATTACK_POWER = 124,
+ SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN = 125,
+ SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN_PCT = 126,
+ SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS = 127,
+ SPELL_AURA_MOD_POSSESS_PET = 128,
+ SPELL_AURA_MOD_SPEED_ALWAYS = 129,
+ SPELL_AURA_MOD_MOUNTED_SPEED_ALWAYS = 130,
+ SPELL_AURA_MOD_RANGED_ATTACK_POWER_VERSUS = 131,
+ SPELL_AURA_MOD_INCREASE_ENERGY_PERCENT = 132,
+ SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT = 133,
+ SPELL_AURA_MOD_MANA_REGEN_INTERRUPT = 134,
+ SPELL_AURA_MOD_HEALING_DONE = 135,
+ SPELL_AURA_MOD_HEALING_DONE_PERCENT = 136,
+ SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE = 137,
+ SPELL_AURA_MOD_MELEE_HASTE = 138,
+ SPELL_AURA_FORCE_REACTION = 139,
+ SPELL_AURA_MOD_RANGED_HASTE = 140,
+ SPELL_AURA_MOD_RANGED_AMMO_HASTE = 141,
+ SPELL_AURA_MOD_BASE_RESISTANCE_PCT = 142,
+ SPELL_AURA_MOD_RESISTANCE_EXCLUSIVE = 143,
+ SPELL_AURA_SAFE_FALL = 144,
+ SPELL_AURA_MOD_PET_TALENT_POINTS = 145,
+ SPELL_AURA_ALLOW_TAME_PET_TYPE = 146,
+ SPELL_AURA_MECHANIC_IMMUNITY_MASK = 147,
+ SPELL_AURA_RETAIN_COMBO_POINTS = 148,
+ SPELL_AURA_REDUCE_PUSHBACK = 149, // Reduce Pushback
+ SPELL_AURA_MOD_SHIELD_BLOCKVALUE_PCT = 150,
+ SPELL_AURA_TRACK_STEALTHED = 151, // Track Stealthed
+ SPELL_AURA_MOD_DETECTED_RANGE = 152, // Mod Detected Range
+ SPELL_AURA_SPLIT_DAMAGE_FLAT = 153, // Split Damage Flat
+ SPELL_AURA_MOD_STEALTH_LEVEL = 154, // Stealth Level Modifier
+ SPELL_AURA_MOD_WATER_BREATHING = 155, // Mod Water Breathing
+ SPELL_AURA_MOD_REPUTATION_GAIN = 156, // Mod Reputation Gain
+ SPELL_AURA_PET_DAMAGE_MULTI = 157, // Mod Pet Damage
+ SPELL_AURA_MOD_SHIELD_BLOCKVALUE = 158,
+ SPELL_AURA_NO_PVP_CREDIT = 159,
+ SPELL_AURA_MOD_AOE_AVOIDANCE = 160,
+ SPELL_AURA_MOD_HEALTH_REGEN_IN_COMBAT = 161,
+ SPELL_AURA_POWER_BURN = 162,
+ SPELL_AURA_MOD_CRIT_DAMAGE_BONUS = 163,
+ SPELL_AURA_164 = 164,
+ SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS = 165,
+ SPELL_AURA_MOD_ATTACK_POWER_PCT = 166,
+ SPELL_AURA_MOD_RANGED_ATTACK_POWER_PCT = 167,
+ SPELL_AURA_MOD_DAMAGE_DONE_VERSUS = 168,
+ SPELL_AURA_MOD_CRIT_PERCENT_VERSUS = 169,
+ SPELL_AURA_DETECT_AMORE = 170,
+ SPELL_AURA_MOD_SPEED_NOT_STACK = 171,
+ SPELL_AURA_MOD_MOUNTED_SPEED_NOT_STACK = 172,
+ SPELL_AURA_173 = 173, // old SPELL_AURA_ALLOW_CHAMPION_SPELLS
+ SPELL_AURA_MOD_SPELL_DAMAGE_OF_STAT_PERCENT = 174, // by defeult intelect, dependent from SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT
+ SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT = 175,
+ SPELL_AURA_SPIRIT_OF_REDEMPTION = 176,
+ SPELL_AURA_AOE_CHARM = 177,
+ SPELL_AURA_MOD_DEBUFF_RESISTANCE = 178,
+ SPELL_AURA_MOD_ATTACKER_SPELL_CRIT_CHANCE = 179,
+ SPELL_AURA_MOD_FLAT_SPELL_DAMAGE_VERSUS = 180,
+ SPELL_AURA_181 = 181, // old SPELL_AURA_MOD_FLAT_SPELL_CRIT_DAMAGE_VERSUS - possible flat spell crit damage versus
+ SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT = 182,
+ SPELL_AURA_MOD_CRITICAL_THREAT = 183,
+ SPELL_AURA_MOD_ATTACKER_MELEE_HIT_CHANCE = 184,
+ SPELL_AURA_MOD_ATTACKER_RANGED_HIT_CHANCE = 185,
+ SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE = 186,
+ SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_CHANCE = 187,
+ SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_CHANCE = 188,
+ SPELL_AURA_MOD_RATING = 189,
+ SPELL_AURA_MOD_FACTION_REPUTATION_GAIN = 190,
+ SPELL_AURA_USE_NORMAL_MOVEMENT_SPEED = 191,
+ SPELL_AURA_MOD_MELEE_RANGED_HASTE = 192,
+ SPELL_AURA_MELEE_SLOW = 193,
+ SPELL_AURA_MOD_TARGET_ABSORB_SCHOOL = 194,
+ SPELL_AURA_MOD_TARGET_ABILITY_ABSORB_SCHOOL = 195,
+ SPELL_AURA_MOD_COOLDOWN = 196, // only 24818 Noxious Breath
+ SPELL_AURA_MOD_ATTACKER_SPELL_AND_WEAPON_CRIT_CHANCE = 197,
+ SPELL_AURA_198 = 198, // old SPELL_AURA_MOD_ALL_WEAPON_SKILLS
+ SPELL_AURA_MOD_INCREASES_SPELL_PCT_TO_HIT = 199,
+ SPELL_AURA_MOD_XP_PCT = 200,
+ SPELL_AURA_FLY = 201,
+ SPELL_AURA_IGNORE_COMBAT_RESULT = 202,
+ SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_DAMAGE = 203,
+ SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_DAMAGE = 204,
+ SPELL_AURA_MOD_SCHOOL_CRIT_DMG_TAKEN = 205,
+ SPELL_AURA_MOD_INCREASE_VEHICLE_FLIGHT_SPEED = 206,
+ SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED = 207,
+ SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED = 208,
+ SPELL_AURA_MOD_MOUNTED_FLIGHT_SPEED_ALWAYS = 209,
+ SPELL_AURA_MOD_VEHICLE_SPEED_ALWAYS = 210,
+ SPELL_AURA_MOD_FLIGHT_SPEED_NOT_STACK = 211,
+ SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT = 212,
+ SPELL_AURA_MOD_RAGE_FROM_DAMAGE_DEALT = 213,
+ SPELL_AURA_214 = 214,
+ SPELL_AURA_ARENA_PREPARATION = 215,
+ SPELL_AURA_HASTE_SPELLS = 216,
+ SPELL_AURA_MOD_MELEE_HASTE_2 = 217, // NYI
+ SPELL_AURA_HASTE_RANGED = 218,
+ SPELL_AURA_MOD_MANA_REGEN_FROM_STAT = 219,
+ SPELL_AURA_MOD_RATING_FROM_STAT = 220,
+ SPELL_AURA_MOD_DETAUNT = 221,
+ SPELL_AURA_222 = 222,
+ SPELL_AURA_RAID_PROC_FROM_CHARGE = 223,
+ SPELL_AURA_224 = 224,
+ SPELL_AURA_RAID_PROC_FROM_CHARGE_WITH_VALUE = 225,
+ SPELL_AURA_PERIODIC_DUMMY = 226,
+ SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE = 227,
+ SPELL_AURA_DETECT_STEALTH = 228,
+ SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE = 229,
+ SPELL_AURA_230 = 230,
+ SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE = 231,
+ SPELL_AURA_MECHANIC_DURATION_MOD = 232,
+ SPELL_AURA_CHANGE_MODEL_FOR_ALL_HUMANOIDS = 233, // client-side only
+ SPELL_AURA_MECHANIC_DURATION_MOD_NOT_STACK = 234,
+ SPELL_AURA_MOD_DISPEL_RESIST = 235,
+ SPELL_AURA_CONTROL_VEHICLE = 236,
+ SPELL_AURA_MOD_SPELL_DAMAGE_OF_ATTACK_POWER = 237,
+ SPELL_AURA_MOD_SPELL_HEALING_OF_ATTACK_POWER = 238,
+ SPELL_AURA_MOD_SCALE_2 = 239,
+ SPELL_AURA_MOD_EXPERTISE = 240,
+ SPELL_AURA_FORCE_MOVE_FORWARD = 241,
+ SPELL_AURA_MOD_SPELL_DAMAGE_FROM_HEALING = 242,
+ SPELL_AURA_MOD_FACTION = 243,
+ SPELL_AURA_COMPREHEND_LANGUAGE = 244,
+ SPELL_AURA_MOD_AURA_DURATION_BY_DISPEL = 245,
+ SPELL_AURA_MOD_AURA_DURATION_BY_DISPEL_NOT_STACK = 246,
+ SPELL_AURA_CLONE_CASTER = 247,
+ SPELL_AURA_MOD_COMBAT_RESULT_CHANCE = 248,
+ SPELL_AURA_CONVERT_RUNE = 249,
+ SPELL_AURA_MOD_INCREASE_HEALTH_2 = 250,
+ SPELL_AURA_MOD_ENEMY_DODGE = 251,
+ SPELL_AURA_MOD_SPEED_SLOW_ALL = 252,
+ SPELL_AURA_MOD_BLOCK_CRIT_CHANCE = 253,
+ SPELL_AURA_MOD_DISARM_OFFHAND = 254,
+ SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT = 255,
+ SPELL_AURA_NO_REAGENT_USE = 256,
+ SPELL_AURA_MOD_TARGET_RESIST_BY_SPELL_CLASS = 257,
+ SPELL_AURA_258 = 258,
+ SPELL_AURA_MOD_HOT_PCT = 259,
+ SPELL_AURA_SCREEN_EFFECT = 260,
+ SPELL_AURA_PHASE = 261,
+ SPELL_AURA_ABILITY_IGNORE_AURASTATE = 262,
+ SPELL_AURA_ALLOW_ONLY_ABILITY = 263,
+ SPELL_AURA_264 = 264,
+ SPELL_AURA_265 = 265,
+ SPELL_AURA_266 = 266,
+ SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL = 267,
SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT = 268,
- SPELL_AURA_MOD_IGNORE_TARGET_RESIST = 269,
- SPELL_AURA_MOD_ABILITY_IGNORE_TARGET_RESIST = 270, // Possibly need swap vs 195 aura used only in 1 spell Chaos Bolt Passive
- SPELL_AURA_MOD_DAMAGE_FROM_CASTER = 271,
- SPELL_AURA_IGNORE_MELEE_RESET = 272,
- SPELL_AURA_X_RAY = 273,
- SPELL_AURA_ABILITY_CONSUME_NO_AMMO = 274,
- SPELL_AURA_MOD_IGNORE_SHAPESHIFT = 275,
- SPELL_AURA_MOD_DAMAGE_DONE_FOR_MECHANIC = 276, // NYI
- SPELL_AURA_MOD_MAX_AFFECTED_TARGETS = 277,
- SPELL_AURA_MOD_DISARM_RANGED = 278,
- SPELL_AURA_INITIALIZE_IMAGES = 279,
+ SPELL_AURA_MOD_IGNORE_TARGET_RESIST = 269,
+ SPELL_AURA_MOD_ABILITY_IGNORE_TARGET_RESIST = 270, // Possibly need swap vs 195 aura used only in 1 spell Chaos Bolt Passive
+ SPELL_AURA_MOD_DAMAGE_FROM_CASTER = 271,
+ SPELL_AURA_IGNORE_MELEE_RESET = 272,
+ SPELL_AURA_X_RAY = 273,
+ SPELL_AURA_ABILITY_CONSUME_NO_AMMO = 274,
+ SPELL_AURA_MOD_IGNORE_SHAPESHIFT = 275,
+ SPELL_AURA_MOD_DAMAGE_DONE_FOR_MECHANIC = 276, // NYI
+ SPELL_AURA_MOD_MAX_AFFECTED_TARGETS = 277,
+ SPELL_AURA_MOD_DISARM_RANGED = 278,
+ SPELL_AURA_INITIALIZE_IMAGES = 279,
SPELL_AURA_MOD_ARMOR_PENETRATION_PCT = 280,
- SPELL_AURA_MOD_HONOR_GAIN_PCT = 281,
- SPELL_AURA_MOD_BASE_HEALTH_PCT = 282,
- SPELL_AURA_MOD_HEALING_RECEIVED = 283, // Possibly only for some spell family class spells
- SPELL_AURA_LINKED = 284,
- SPELL_AURA_MOD_ATTACK_POWER_OF_ARMOR = 285,
- SPELL_AURA_ABILITY_PERIODIC_CRIT = 286,
- SPELL_AURA_DEFLECT_SPELLS = 287,
- SPELL_AURA_IGNORE_HIT_DIRECTION = 288,
- SPELL_AURA_289 = 289,
- SPELL_AURA_MOD_CRIT_PCT = 290,
- SPELL_AURA_MOD_XP_QUEST_PCT = 291,
- SPELL_AURA_OPEN_STABLE = 292,
- SPELL_AURA_OVERRIDE_SPELLS = 293,
- SPELL_AURA_PREVENT_REGENERATE_POWER = 294,
- SPELL_AURA_295 = 295,
- SPELL_AURA_SET_VEHICLE_ID = 296,
- SPELL_AURA_BLOCK_SPELL_FAMILY = 297,
- SPELL_AURA_STRANGULATE = 298,
- SPELL_AURA_299 = 299,
- SPELL_AURA_SHARE_DAMAGE_PCT = 300,
- SPELL_AURA_SCHOOL_HEAL_ABSORB = 301,
- SPELL_AURA_302 = 302,
- SPELL_AURA_MOD_DAMAGE_DONE_VERSUS_AURASTATE = 303,
- SPELL_AURA_MOD_FAKE_INEBRIATE = 304,
- SPELL_AURA_MOD_MINIMUM_SPEED = 305,
- SPELL_AURA_306 = 306,
- SPELL_AURA_HEAL_ABSORB_TEST = 307,
- SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER = 308, // NYI
- SPELL_AURA_309 = 309,
- SPELL_AURA_MOD_CREATURE_AOE_DAMAGE_AVOIDANCE = 310,
- SPELL_AURA_311 = 311,
- SPELL_AURA_312 = 312,
- SPELL_AURA_313 = 313,
- SPELL_AURA_PREVENT_RESURRECTION = 314,
- SPELL_AURA_UNDERWATER_WALKING = 315,
- SPELL_AURA_PERIODIC_HASTE = 316,
- TOTAL_AURAS = 317
+ SPELL_AURA_MOD_HONOR_GAIN_PCT = 281,
+ SPELL_AURA_MOD_BASE_HEALTH_PCT = 282,
+ SPELL_AURA_MOD_HEALING_RECEIVED = 283, // Possibly only for some spell family class spells
+ SPELL_AURA_LINKED = 284,
+ SPELL_AURA_MOD_ATTACK_POWER_OF_ARMOR = 285,
+ SPELL_AURA_ABILITY_PERIODIC_CRIT = 286,
+ SPELL_AURA_DEFLECT_SPELLS = 287,
+ SPELL_AURA_IGNORE_HIT_DIRECTION = 288,
+ SPELL_AURA_289 = 289,
+ SPELL_AURA_MOD_CRIT_PCT = 290,
+ SPELL_AURA_MOD_XP_QUEST_PCT = 291,
+ SPELL_AURA_OPEN_STABLE = 292,
+ SPELL_AURA_OVERRIDE_SPELLS = 293,
+ SPELL_AURA_PREVENT_REGENERATE_POWER = 294,
+ SPELL_AURA_295 = 295,
+ SPELL_AURA_SET_VEHICLE_ID = 296,
+ SPELL_AURA_BLOCK_SPELL_FAMILY = 297,
+ SPELL_AURA_STRANGULATE = 298,
+ SPELL_AURA_299 = 299,
+ SPELL_AURA_SHARE_DAMAGE_PCT = 300,
+ SPELL_AURA_SCHOOL_HEAL_ABSORB = 301,
+ SPELL_AURA_302 = 302,
+ SPELL_AURA_MOD_DAMAGE_DONE_VERSUS_AURASTATE = 303,
+ SPELL_AURA_MOD_FAKE_INEBRIATE = 304,
+ SPELL_AURA_MOD_MINIMUM_SPEED = 305,
+ SPELL_AURA_306 = 306,
+ SPELL_AURA_HEAL_ABSORB_TEST = 307,
+ SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER = 308, // NYI
+ SPELL_AURA_309 = 309,
+ SPELL_AURA_MOD_CREATURE_AOE_DAMAGE_AVOIDANCE = 310,
+ SPELL_AURA_311 = 311,
+ SPELL_AURA_312 = 312,
+ SPELL_AURA_313 = 313,
+ SPELL_AURA_PREVENT_RESURRECTION = 314,
+ SPELL_AURA_UNDERWATER_WALKING = 315,
+ SPELL_AURA_PERIODIC_HASTE = 316,
+ TOTAL_AURAS = 317
};
enum AuraObjectType
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index b29f1498152..260091c9ed7 100755..100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -120,7 +120,7 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleAuraModPacifyAndSilence, // 60 SPELL_AURA_MOD_PACIFY_SILENCE
&AuraEffect::HandleAuraModScale, // 61 SPELL_AURA_MOD_SCALE
&AuraEffect::HandleNoImmediateEffect, // 62 SPELL_AURA_PERIODIC_HEALTH_FUNNEL implemented in AuraEffect::PeriodicTick
- &AuraEffect::HandleNULL, // 63 unused (3.2.0) old SPELL_AURA_PERIODIC_MANA_FUNNEL
+ &AuraEffect::HandleUnused, // 63 unused (3.2.0) old SPELL_AURA_PERIODIC_MANA_FUNNEL
&AuraEffect::HandleNoImmediateEffect, // 64 SPELL_AURA_PERIODIC_MANA_LEECH implemented in AuraEffect::PeriodicTick
&AuraEffect::HandleModCastingSpeed, // 65 SPELL_AURA_MOD_CASTING_SPEED_NOT_STACK
&AuraEffect::HandleFeignDeath, // 66 SPELL_AURA_FEIGN_DEATH
@@ -147,7 +147,7 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleNoImmediateEffect, // 87 SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN implemented in Unit::MeleeDamageBonus and Unit::SpellDamageBonus
&AuraEffect::HandleNoImmediateEffect, // 88 SPELL_AURA_MOD_HEALTH_REGEN_PERCENT implemented in Player::RegenerateHealth
&AuraEffect::HandleNoImmediateEffect, // 89 SPELL_AURA_PERIODIC_DAMAGE_PERCENT
- &AuraEffect::HandleNULL, // 90 unused (3.0.8a) old SPELL_AURA_MOD_RESIST_CHANCE
+ &AuraEffect::HandleUnused, // 90 unused (3.0.8a) old SPELL_AURA_MOD_RESIST_CHANCE
&AuraEffect::HandleNoImmediateEffect, // 91 SPELL_AURA_MOD_DETECT_RANGE implemented in Creature::GetAttackDistance
&AuraEffect::HandlePreventFleeing, // 92 SPELL_AURA_PREVENTS_FLEEING
&AuraEffect::HandleModUnattackable, // 93 SPELL_AURA_MOD_UNATTACKABLE
@@ -176,7 +176,7 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleNoImmediateEffect, //116 SPELL_AURA_MOD_REGEN_DURING_COMBAT
&AuraEffect::HandleNoImmediateEffect, //117 SPELL_AURA_MOD_MECHANIC_RESISTANCE implemented in Unit::MagicSpellHitResult
&AuraEffect::HandleNoImmediateEffect, //118 SPELL_AURA_MOD_HEALING_PCT implemented in Unit::SpellHealingBonus
- &AuraEffect::HandleNULL, //119 unused (3.2.0) old SPELL_AURA_SHARE_PET_TRACKING
+ &AuraEffect::HandleUnused, //119 unused (3.2.0) old SPELL_AURA_SHARE_PET_TRACKING
&AuraEffect::HandleAuraUntrackable, //120 SPELL_AURA_UNTRACKABLE
&AuraEffect::HandleAuraEmpathy, //121 SPELL_AURA_EMPATHY
&AuraEffect::HandleModOffhandDamagePercent, //122 SPELL_AURA_MOD_OFFHAND_DAMAGE_PCT
@@ -230,7 +230,7 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleNULL, //170 SPELL_AURA_DETECT_AMORE various spells that change visual of units for aura target (clientside?)
&AuraEffect::HandleAuraModIncreaseSpeed, //171 SPELL_AURA_MOD_SPEED_NOT_STACK
&AuraEffect::HandleAuraModIncreaseMountedSpeed, //172 SPELL_AURA_MOD_MOUNTED_SPEED_NOT_STACK
- &AuraEffect::HandleNULL, //173 unused (3.2.0) no spells, old SPELL_AURA_ALLOW_CHAMPION_SPELLS only for Proclaim Champion spell
+ &AuraEffect::HandleUnused, //173 unused (3.2.0) no spells, old SPELL_AURA_ALLOW_CHAMPION_SPELLS only for Proclaim Champion spell
&AuraEffect::HandleModSpellDamagePercentFromStat, //174 SPELL_AURA_MOD_SPELL_DAMAGE_OF_STAT_PERCENT implemented in Unit::SpellBaseDamageBonus
&AuraEffect::HandleModSpellHealingPercentFromStat, //175 SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT implemented in Unit::SpellBaseHealingBonus
&AuraEffect::HandleSpiritOfRedemption, //176 SPELL_AURA_SPIRIT_OF_REDEMPTION only for Spirit of Redemption spell, die at aura end
@@ -238,7 +238,7 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleNoImmediateEffect, //178 SPELL_AURA_MOD_DEBUFF_RESISTANCE implemented in Unit::MagicSpellHitResult
&AuraEffect::HandleNoImmediateEffect, //179 SPELL_AURA_MOD_ATTACKER_SPELL_CRIT_CHANCE implemented in Unit::SpellCriticalBonus
&AuraEffect::HandleNoImmediateEffect, //180 SPELL_AURA_MOD_FLAT_SPELL_DAMAGE_VERSUS implemented in Unit::SpellDamageBonus
- &AuraEffect::HandleNULL, //181 unused (3.2.0) old SPELL_AURA_MOD_FLAT_SPELL_CRIT_DAMAGE_VERSUS
+ &AuraEffect::HandleUnused, //181 unused (3.2.0) old SPELL_AURA_MOD_FLAT_SPELL_CRIT_DAMAGE_VERSUS
&AuraEffect::HandleAuraModResistenceOfStatPercent, //182 SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT
&AuraEffect::HandleNULL, //183 SPELL_AURA_MOD_CRITICAL_THREAT only used in 28746 - miscvalue - spell school
&AuraEffect::HandleNoImmediateEffect, //184 SPELL_AURA_MOD_ATTACKER_MELEE_HIT_CHANCE implemented in Unit::RollMeleeOutcomeAgainst
@@ -255,7 +255,7 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleNoImmediateEffect, //195 SPELL_AURA_MOD_TARGET_ABILITY_ABSORB_SCHOOL implemented in Unit::CalcAbsorbResist
&AuraEffect::HandleNULL, //196 SPELL_AURA_MOD_COOLDOWN - flat mod of spell cooldowns
&AuraEffect::HandleNoImmediateEffect, //197 SPELL_AURA_MOD_ATTACKER_SPELL_AND_WEAPON_CRIT_CHANCE implemented in Unit::SpellCriticalBonus Unit::GetUnitCriticalChance
- &AuraEffect::HandleNULL, //198 unused (3.2.0) old SPELL_AURA_MOD_ALL_WEAPON_SKILLS
+ &AuraEffect::HandleUnused, //198 unused (3.2.0) old SPELL_AURA_MOD_ALL_WEAPON_SKILLS
&AuraEffect::HandleNoImmediateEffect, //199 SPELL_AURA_MOD_INCREASES_SPELL_PCT_TO_HIT implemented in Unit::MagicSpellHitResult
&AuraEffect::HandleNoImmediateEffect, //200 SPELL_AURA_MOD_XP_PCT implemented in Player::RewardPlayerAndGroupAtKill
&AuraEffect::HandleAuraAllowFlight, //201 SPELL_AURA_FLY this aura enable flight mode...
@@ -352,25 +352,25 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleAuraOpenStable, //292 SPELL_AURA_OPEN_STABLE
&AuraEffect::HandleAuraOverrideSpells, //293 auras which probably add set of abilities to their target based on it's miscvalue
&AuraEffect::HandleNoImmediateEffect, //294 SPELL_AURA_PREVENT_REGENERATE_POWER implemented in Player::Regenerate(Powers power)
- &AuraEffect::HandleNULL, //295 0 spells in 3.3.5
+ &AuraEffect::HandleUnused, //295 0 spells in 3.3.5
&AuraEffect::HandleAuraSetVehicle, //296 SPELL_AURA_SET_VEHICLE_ID sets vehicle on target
&AuraEffect::HandleNULL, //297 Spirit Burst spells
&AuraEffect::HandleNULL, //298 70569 - Strangulating, maybe prevents talk or cast
- &AuraEffect::HandleNULL, //299 unused
+ &AuraEffect::HandleUnused, //299 unused
&AuraEffect::HandleNoImmediateEffect, //300 SPELL_AURA_SHARE_DAMAGE_PCT implemented in Unit::DealDamage
&AuraEffect::HandleNoImmediateEffect, //301 SPELL_AURA_SCHOOL_HEAL_ABSORB implemented in Unit::CalcHealAbsorb
- &AuraEffect::HandleNULL, //302 0 spells in 3.3.5
+ &AuraEffect::HandleUnused, //302 0 spells in 3.3.5
&AuraEffect::HandleNoImmediateEffect, //303 SPELL_AURA_MOD_DAMAGE_DONE_VERSUS_AURASTATE implemented in Unit::SpellDamageBonus, Unit::MeleeDamageBonus
&AuraEffect::HandleAuraModFakeInebriation, //304 SPELL_AURA_MOD_DRUNK
&AuraEffect::HandleAuraModIncreaseSpeed, //305 SPELL_AURA_MOD_MINIMUM_SPEED
- &AuraEffect::HandleNULL, //306 0 spells in 3.3.5
- &AuraEffect::HandleNULL, //307 0 spells in 3.3.5
+ &AuraEffect::HandleUnused, //306 0 spells in 3.3.5
+ &AuraEffect::HandleUnused, //307 0 spells in 3.3.5
&AuraEffect::HandleNULL, //308 new aura for hunter traps
- &AuraEffect::HandleNULL, //309 0 spells in 3.3.5
+ &AuraEffect::HandleUnused, //309 0 spells in 3.3.5
&AuraEffect::HandleNoImmediateEffect, //310 SPELL_AURA_MOD_CREATURE_AOE_DAMAGE_AVOIDANCE implemented in Spell::CalculateDamageDone
&AuraEffect::HandleNULL, //311 0 spells in 3.3.5
&AuraEffect::HandleNULL, //312 0 spells in 3.3.5
- &AuraEffect::HandleNULL, //313 0 spells in 3.3.5
+ &AuraEffect::HandleUnused, //313 0 spells in 3.3.5
&AuraEffect::HandlePreventResurrection, //314 SPELL_AURA_PREVENT_RESURRECTION todo
&AuraEffect::HandleNoImmediateEffect, //315 SPELL_AURA_UNDERWATER_WALKING todo
&AuraEffect::HandleNoImmediateEffect, //316 SPELL_AURA_PERIODIC_HASTE implemented in AuraEffect::CalculatePeriodic
@@ -417,9 +417,8 @@ void AuraEffect::GetApplicationList(std::list<AuraApplication*> & applicationLis
int32 AuraEffect::CalculateAmount(Unit* caster)
{
- int32 amount;
// default amount calculation
- amount = m_spellInfo->Effects[m_effIndex].CalcValue(caster, &m_baseAmount, NULL);
+ int32 amount = m_spellInfo->Effects[m_effIndex].CalcValue(caster, &m_baseAmount, NULL);
// check item enchant aura cast
if (!amount && caster)
@@ -658,31 +657,18 @@ int32 AuraEffect::CalculateAmount(Unit* caster)
AddPct(amount, m_spellInfo->Effects[EFFECT_2].CalcValue(caster));
}
}
- // Unholy Blight damage over time effect
- else if (GetId() == 50536)
- {
- m_canBeRecalculated = false;
- // we're getting total damage on aura apply, change it to be damage per tick
- amount = int32((float)amount / GetTotalTicks());
- }
break;
case SPELL_AURA_PERIODIC_ENERGIZE:
switch (m_spellInfo->Id)
{
- case 57669: // Replenishment (0.2% from max)
- amount = GetBase()->GetUnitOwner()->GetMaxPower(POWER_MANA) * 0.002f;
- break;
- case 61782: // Infinite Replenishment
- amount = GetBase()->GetUnitOwner()->GetMaxPower(POWER_MANA) * 0.0025f;
- break;
- case 29166: // Innervate
- ApplyPct(amount, float(GetBase()->GetUnitOwner()->GetCreatePowers(POWER_MANA)) / GetTotalTicks());
- break;
- case 48391: // Owlkin Frenzy
- ApplyPct(amount, GetBase()->GetUnitOwner()->GetCreatePowers(POWER_MANA));
- break;
- default:
- break;
+ case 29166: // Innervate
+ ApplyPct(amount, float(GetBase()->GetUnitOwner()->GetCreatePowers(POWER_MANA)) / GetTotalTicks());
+ break;
+ case 48391: // Owlkin Frenzy
+ ApplyPct(amount, GetBase()->GetUnitOwner()->GetCreatePowers(POWER_MANA));
+ break;
+ default:
+ break;
}
break;
case SPELL_AURA_PERIODIC_HEAL:
@@ -3109,9 +3095,10 @@ void AuraEffect::HandleModPossess(AuraApplication const* aurApp, uint8 mode, boo
target->RemoveCharmedBy(caster);
}
-// only one spell has this aura
void AuraEffect::HandleModPossessPet(AuraApplication const* aurApp, uint8 mode, bool apply) const
{
+ // Used by spell "Eyes of the Beast"
+
if (!(mode & AURA_EFFECT_HANDLE_REAL))
return;
@@ -3134,6 +3121,9 @@ void AuraEffect::HandleModPossessPet(AuraApplication const* aurApp, uint8 mode,
if (caster->ToPlayer()->GetPet() != pet)
return;
+ // Must clear current motion or pet leashes back to owner after a few yards
+ // when under spell 'Eyes of the Beast'
+ pet->GetMotionMaster()->Clear();
pet->SetCharmedBy(caster, CHARM_TYPE_POSSESS, aurApp);
}
else
@@ -3144,13 +3134,15 @@ void AuraEffect::HandleModPossessPet(AuraApplication const* aurApp, uint8 mode,
pet->Remove(PET_SAVE_NOT_IN_SLOT, true);
else
{
- // Reinitialize the pet bar and make the pet come back to the owner
+ // Reinitialize the pet bar or it will appear greyed out
caster->ToPlayer()->PetSpellInitialize();
- if (!pet->getVictim())
+
+ // Follow owner only if not fighting or owner didn't click "stay" at new location
+ // This may be confusing because pet bar shows "stay" when under the spell but it retains
+ // the "follow" flag. Player MUST click "stay" while under the spell.
+ if (!pet->getVictim() && !pet->GetCharmInfo()->HasCommandState(COMMAND_STAY))
{
pet->GetMotionMaster()->MoveFollow(caster, PET_FOLLOW_DIST, pet->GetFollowAngle());
- //if (target->GetCharmInfo())
- // target->GetCharmInfo()->SetCommandState(COMMAND_FOLLOW);
}
}
}
@@ -3581,6 +3573,26 @@ void AuraEffect::HandleModMechanicImmunity(AuraApplication const* aurApp, uint8
switch (GetId())
{
+ case 34471: // The Beast Within
+ case 19574: // Bestial Wrath
+ mechanic = IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK;
+ target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_CHARM, apply);
+ target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_DISORIENTED, apply);
+ target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_FEAR, apply);
+ target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_ROOT, apply);
+ target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_SLEEP, apply);
+ target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_SNARE, apply);
+ target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_STUN, apply);
+ target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_FREEZE, apply);
+ target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_KNOCKOUT, apply);
+ target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_POLYMORPH, apply);
+ target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_BANISH, apply);
+ target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_SHACKLE, apply);
+ target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_TURN, apply);
+ target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_HORROR, apply);
+ target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_DAZE, apply);
+ target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_SAPPED, apply);
+ break;
case 42292: // PvP trinket
case 59752: // Every Man for Himself
mechanic = IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK;
@@ -3592,28 +3604,6 @@ void AuraEffect::HandleModMechanicImmunity(AuraApplication const* aurApp, uint8
target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_ROOT, apply);
target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_STUN, apply);
break;
- case 34471: // The Beast Within
- case 19574: // Bestial Wrath
- mechanic = (1 << MECHANIC_SNARE) | (1 << MECHANIC_ROOT)
- | (1 << MECHANIC_FEAR) | (1 << MECHANIC_STUN)
- | (1 << MECHANIC_SLEEP) | (1 << MECHANIC_CHARM)
- | (1 << MECHANIC_SAPPED) | (1 << MECHANIC_HORROR)
- | (1 << MECHANIC_POLYMORPH) | (1 << MECHANIC_DISORIENTED)
- | (1 << MECHANIC_FREEZE) | (1 << MECHANIC_TURN);
-
- target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_SNARE, apply);
- target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_ROOT, apply);
- target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_FEAR, apply);
- target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_STUN, apply);
- target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_SLEEP, apply);
- target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_CHARM, apply);
- target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_SAPPED, apply);
- target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_HORROR, apply);
- target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_POLYMORPH, apply);
- target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_DISORIENTED, apply);
- target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_FREEZE, apply);
- target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_TURN, apply);
- break;
default:
if (GetMiscValue() < 1)
return;
@@ -5463,7 +5453,7 @@ void AuraEffect::HandleAuraLinked(AuraApplication const* aurApp, uint8 mode, boo
{
Unit* target = aurApp->GetTarget();
- uint32 triggeredSpellId = m_spellInfo->Effects[m_effIndex].TriggerSpell;
+ uint32 triggeredSpellId = sSpellMgr->GetSpellIdForDifficulty(m_spellInfo->Effects[m_effIndex].TriggerSpell, target);
SpellInfo const* triggeredSpellInfo = sSpellMgr->GetSpellInfo(triggeredSpellId);
if (!triggeredSpellInfo)
return;
@@ -6179,6 +6169,9 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const
// ignore non positive values (can be result apply spellmods to aura damage
uint32 damage = std::max(GetAmount(), 0);
+ // Script Hook For HandlePeriodicDamageAurasTick -- Allow scripts to change the Damage pre class mitigation calculations
+ sScriptMgr->ModifyPeriodicDamageAurasTick(target, caster, damage);
+
if (GetAuraType() == SPELL_AURA_PERIODIC_DAMAGE)
{
damage = caster->SpellDamageBonusDone(target, GetSpellInfo(), damage, DOT, GetBase()->GetStackAmount());
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index d0d9d417c3e..d0d9d417c3e 100755..100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h
index 85c8992c597..85c8992c597 100755..100644
--- a/src/server/game/Spells/Auras/SpellAuras.h
+++ b/src/server/game/Spells/Auras/SpellAuras.h
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 97f0f350ab0..aa0104da57e 100755..100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -1393,7 +1393,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
if (SpellTargetPosition const* st = sSpellMgr->GetSpellTargetPosition(m_spellInfo->Id))
{
// TODO: fix this check
- if (m_spellInfo->HasEffect(SPELL_EFFECT_TELEPORT_UNITS))
+ if (m_spellInfo->HasEffect(SPELL_EFFECT_TELEPORT_UNITS) || m_spellInfo->HasEffect(SPELL_EFFECT_BIND))
m_targets.SetDst(st->target_X, st->target_Y, st->target_Z, st->target_Orientation, (int32)st->target_mapId);
else if (st->target_mapId == m_caster->GetMapId())
m_targets.SetDst(st->target_X, st->target_Y, st->target_Z, st->target_Orientation);
@@ -4199,12 +4199,12 @@ void Spell::ExecuteLogEffectInterruptCast(uint8 effIndex, Unit* victim, uint32 s
*m_effectExecuteData[effIndex] << uint32(spellId);
}
-void Spell::ExecuteLogEffectDurabilityDamage(uint8 effIndex, Unit* victim, uint32 /*itemslot*/, uint32 damage)
+void Spell::ExecuteLogEffectDurabilityDamage(uint8 effIndex, Unit* victim, int32 itemId, int32 slot)
{
InitEffectExecuteData(effIndex);
m_effectExecuteData[effIndex]->append(victim->GetPackGUID());
- *m_effectExecuteData[effIndex] << uint32(m_spellInfo->Id);
- *m_effectExecuteData[effIndex] << uint32(damage);
+ *m_effectExecuteData[effIndex] << int32(itemId);
+ *m_effectExecuteData[effIndex] << int32(slot);
}
void Spell::ExecuteLogEffectOpenLock(uint8 effIndex, Object* obj)
@@ -4867,17 +4867,12 @@ SpellCastResult Spell::CheckCast(bool strict)
ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_SPELL, m_spellInfo->Id);
if (!conditions.empty() && !sConditionMgr->IsObjectMeetToConditions(condInfo, conditions))
{
- // send error msg to player if condition failed and text message available
- // TODO: using WorldSession::SendNotification is not blizzlike
- if (Player* playerCaster = m_caster->ToPlayer())
+ // mLastFailedCondition can be NULL if there was an error processing the condition in Condition::Meets (i.e. wrong data for ConditionTarget or others)
+ if (condInfo.mLastFailedCondition && condInfo.mLastFailedCondition->ErrorType)
{
- // mLastFailedCondition can be NULL if there was an error processing the condition in Condition::Meets (i.e. wrong data for ConditionTarget or others)
- if (playerCaster->GetSession() && condInfo.mLastFailedCondition
- && condInfo.mLastFailedCondition->ErrorTextId)
- {
- playerCaster->GetSession()->SendNotification(condInfo.mLastFailedCondition->ErrorTextId);
- return SPELL_FAILED_DONT_REPORT;
- }
+ if (condInfo.mLastFailedCondition->ErrorType == SPELL_FAILED_CUSTOM_ERROR)
+ m_customError = SpellCustomErrors(condInfo.mLastFailedCondition->ErrorTextId);
+ return SpellCastResult(condInfo.mLastFailedCondition->ErrorType);
}
if (!condInfo.mLastFailedCondition || !condInfo.mLastFailedCondition->ConditionTarget)
return SPELL_FAILED_CASTER_AURASTATE;
@@ -5615,7 +5610,7 @@ SpellCastResult Spell::CheckCasterAuras() const
dispel_immune |= SpellInfo::GetDispelMask(DispelType(m_spellInfo->Effects[i].MiscValue));
}
// immune movement impairment and loss of control
- if (m_spellInfo->Id == 42292 || m_spellInfo->Id == 59752)
+ if (m_spellInfo->Id == 42292 || m_spellInfo->Id == 59752 || m_spellInfo->Id == 19574)
mechanic_immune = IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK;
}
diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h
index 1f2a468133b..c43ee401780 100755..100644
--- a/src/server/game/Spells/Spell.h
+++ b/src/server/game/Spells/Spell.h
@@ -424,7 +424,7 @@ class Spell
void ExecuteLogEffectTakeTargetPower(uint8 effIndex, Unit* target, uint32 powerType, uint32 powerTaken, float gainMultiplier);
void ExecuteLogEffectExtraAttacks(uint8 effIndex, Unit* victim, uint32 attCount);
void ExecuteLogEffectInterruptCast(uint8 effIndex, Unit* victim, uint32 spellId);
- void ExecuteLogEffectDurabilityDamage(uint8 effIndex, Unit* victim, uint32 itemslot, uint32 damage);
+ void ExecuteLogEffectDurabilityDamage(uint8 effIndex, Unit* victim, int32 itemId, int32 slot);
void ExecuteLogEffectOpenLock(uint8 effIndex, Object* obj);
void ExecuteLogEffectCreateItem(uint8 effIndex, uint32 entry);
void ExecuteLogEffectDestroyItem(uint8 effIndex, uint32 entry);
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 622f3e1517b..8bf164767e8 100755..100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -4983,25 +4983,17 @@ void Spell::EffectReputation(SpellEffIndex effIndex)
Player* player = unitTarget->ToPlayer();
- int32 rep_change = damage;
+ int32 repChange = damage;
- uint32 faction_id = m_spellInfo->Effects[effIndex].MiscValue;
-
- FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction_id);
+ uint32 factionId = m_spellInfo->Effects[effIndex].MiscValue;
+ FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionId);
if (!factionEntry)
return;
- if (RepRewardRate const* repData = sObjectMgr->GetRepRewardRate(faction_id))
- {
- rep_change = int32((float)rep_change * repData->spell_rate);
- }
+ repChange = player->CalculateReputationGain(REPUTATION_SOURCE_SPELL, 0, repChange, factionId);
- // Bonus from spells that increase reputation gain
- float bonus = rep_change * player->GetTotalAuraModifier(SPELL_AURA_MOD_REPUTATION_GAIN) / 100.0f; // 10%
- rep_change += (int32)bonus;
-
- player->GetReputationMgr().ModifyReputation(factionEntry, rep_change);
+ player->GetReputationMgr().ModifyReputation(factionEntry, repChange);
}
void Spell::EffectQuestComplete(SpellEffIndex effIndex)
@@ -5400,11 +5392,11 @@ void Spell::EffectDurabilityDamage(SpellEffIndex effIndex)
int32 slot = m_spellInfo->Effects[effIndex].MiscValue;
- // FIXME: some spells effects have value -1/-2
- // Possibly its mean -1 all player equipped items and -2 all items
+ // -1 means all player equipped items and -2 all items
if (slot < 0)
{
unitTarget->ToPlayer()->DurabilityPointsLossAll(damage, (slot < -1));
+ ExecuteLogEffectDurabilityDamage(effIndex, unitTarget, -1, -1);
return;
}
@@ -5413,9 +5405,10 @@ void Spell::EffectDurabilityDamage(SpellEffIndex effIndex)
return;
if (Item* item = unitTarget->ToPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, slot))
+ {
unitTarget->ToPlayer()->DurabilityPointsLoss(item, damage);
-
- ExecuteLogEffectDurabilityDamage(effIndex, unitTarget, slot, damage);
+ ExecuteLogEffectDurabilityDamage(effIndex, unitTarget, item->GetEntry(), slot);
+ }
}
void Spell::EffectDurabilityDamagePCT(SpellEffIndex effIndex)
@@ -6271,51 +6264,38 @@ void Spell::EffectBind(SpellEffIndex effIndex)
Player* player = unitTarget->ToPlayer();
- uint32 area_id;
- WorldLocation loc;
- if (m_spellInfo->Effects[effIndex].TargetA.GetTarget() == TARGET_DEST_DB || m_spellInfo->Effects[effIndex].TargetB.GetTarget() == TARGET_DEST_DB)
- {
- SpellTargetPosition const* st = sSpellMgr->GetSpellTargetPosition(m_spellInfo->Id);
- if (!st)
- {
- sLog->outError(LOG_FILTER_SPELLS_AURAS, "Spell::EffectBind - unknown teleport coordinates for spell ID %u", m_spellInfo->Id);
- return;
- }
+ WorldLocation homeLoc;
+ uint32 areaId = player->GetAreaId();
- loc.m_mapId = st->target_mapId;
- loc.m_positionX = st->target_X;
- loc.m_positionY = st->target_Y;
- loc.m_positionZ = st->target_Z;
- loc.m_orientation = st->target_Orientation;
- area_id = player->GetAreaId();
- }
+ if (m_spellInfo->Effects[effIndex].MiscValue)
+ areaId = m_spellInfo->Effects[effIndex].MiscValue;
+
+ if (m_targets.HasDst())
+ homeLoc.WorldRelocate(*destTarget);
else
{
- player->GetPosition(&loc);
- area_id = player->GetAreaId();
+ player->GetPosition(&homeLoc);
+ homeLoc.m_mapId = player->GetMapId();
}
- player->SetHomebind(loc, area_id);
+ player->SetHomebind(homeLoc, areaId);
// binding
WorldPacket data(SMSG_BINDPOINTUPDATE, (4+4+4+4+4));
- data << float(loc.m_positionX);
- data << float(loc.m_positionY);
- data << float(loc.m_positionZ);
- data << uint32(loc.m_mapId);
- data << uint32(area_id);
+ data << float(homeLoc.GetPositionX());
+ data << float(homeLoc.GetPositionY());
+ data << float(homeLoc.GetPositionZ());
+ data << uint32(homeLoc.GetMapId());
+ data << uint32(areaId);
player->SendDirectMessage(&data);
- sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "New homebind X : %f", loc.m_positionX);
- sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "New homebind Y : %f", loc.m_positionY);
- sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "New homebind Z : %f", loc.m_positionZ);
- sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "New homebind MapId : %u", loc.m_mapId);
- sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "New homebind AreaId : %u", area_id);
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "EffectBind: New homebind X: %f, Y: %f, Z: %f, MapId: %u, AreaId: %u",
+ homeLoc.GetPositionX(), homeLoc.GetPositionY(), homeLoc.GetPositionZ(), homeLoc.GetMapId(), areaId);
// zone update
data.Initialize(SMSG_PLAYERBOUND, 8+4);
data << uint64(player->GetGUID());
- data << uint32(area_id);
+ data << uint32(areaId);
player->SendDirectMessage(&data);
}
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index be4c522956c..fcfa441455e 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -499,9 +499,14 @@ float SpellEffectInfo::CalcRadius(Unit* caster, Spell* spell) const
if (!HasRadius())
return 0.0f;
- float radius = RadiusEntry->radiusMax;
- if (Player* modOwner = (caster ? caster->GetSpellModOwner() : NULL))
- modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_RADIUS, radius, spell);
+ float radius = RadiusEntry->RadiusMin;
+ if (caster)
+ {
+ radius += RadiusEntry->RadiusPerLevel * caster->getLevel();
+ radius = std::min(radius, RadiusEntry->RadiusMax);
+ if (Player* modOwner = caster->GetSpellModOwner())
+ modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_RADIUS, radius, spell);
+ }
return radius;
}
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 1edb8eab103..3eefd969eed 100755..100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -2439,7 +2439,6 @@ void SpellMgr::LoadSpellAreas()
// 0 1 2 3 4 5 6 7 8 9
QueryResult result = WorldDatabase.Query("SELECT spell, area, quest_start, quest_start_status, quest_end_status, quest_end, aura_spell, racemask, gender, autocast FROM spell_area");
-
if (!result)
{
sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell area requirements. DB table `spell_area` is empty.");
@@ -2979,6 +2978,9 @@ void SpellMgr::LoadDbcDataCorrections()
switch (spellInfo->Id)
{
+ case 53096: // Quetz'lun's Judgment
+ spellInfo->MaxAffectedTargets = 1;
+ break;
case 42730:
spellInfo->EffectTriggerSpell[EFFECT_1] = 42739;
break;
@@ -3313,6 +3315,13 @@ void SpellMgr::LoadDbcDataCorrections()
case 70650: // Death Knight T10 Tank 2P Bonus
spellInfo->EffectApplyAuraName[0] = SPELL_AURA_ADD_PCT_MODIFIER;
break;
+ case 71838: // Drain Life - Bryntroll Normal
+ case 71839: // Drain Life - Bryntroll Heroic
+ spellInfo->AttributesEx2 |= SPELL_ATTR2_CANT_CRIT;
+ break;
+ case 34471: // The Beast Within
+ spellInfo->AttributesEx5 |= SPELL_ATTR5_USABLE_WHILE_CONFUSED | SPELL_ATTR5_USABLE_WHILE_FEARED | SPELL_ATTR5_USABLE_WHILE_STUNNED;
+ break;
// ULDUAR SPELLS
//
case 62374: // Pursued (Flame Leviathan)
diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h
index cec9d4650f5..cec9d4650f5 100755..100644
--- a/src/server/game/Spells/SpellMgr.h
+++ b/src/server/game/Spells/SpellMgr.h
diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp
index f7ab6e22f2e..f7ab6e22f2e 100755..100644
--- a/src/server/game/Spells/SpellScript.cpp
+++ b/src/server/game/Spells/SpellScript.cpp
diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h
index 26dda4d2327..26dda4d2327 100755..100644
--- a/src/server/game/Spells/SpellScript.h
+++ b/src/server/game/Spells/SpellScript.h
diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp
index 89b75fd1695..89b75fd1695 100755..100644
--- a/src/server/game/Texts/CreatureTextMgr.cpp
+++ b/src/server/game/Texts/CreatureTextMgr.cpp
diff --git a/src/server/game/Texts/CreatureTextMgr.h b/src/server/game/Texts/CreatureTextMgr.h
index df6dd7fe4f3..df6dd7fe4f3 100755..100644
--- a/src/server/game/Texts/CreatureTextMgr.h
+++ b/src/server/game/Texts/CreatureTextMgr.h
diff --git a/src/server/game/Tickets/TicketMgr.cpp b/src/server/game/Tickets/TicketMgr.cpp
index 3f0e608ec14..3f0e608ec14 100755..100644
--- a/src/server/game/Tickets/TicketMgr.cpp
+++ b/src/server/game/Tickets/TicketMgr.cpp
diff --git a/src/server/game/Tickets/TicketMgr.h b/src/server/game/Tickets/TicketMgr.h
index 7e6768b96b2..7e6768b96b2 100755..100644
--- a/src/server/game/Tickets/TicketMgr.h
+++ b/src/server/game/Tickets/TicketMgr.h
diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.cpp b/src/server/game/Tools/CharacterDatabaseCleaner.cpp
index f87b81c8be8..0ec56dd17fd 100644
--- a/src/server/game/Tools/CharacterDatabaseCleaner.cpp
+++ b/src/server/game/Tools/CharacterDatabaseCleaner.cpp
@@ -17,6 +17,7 @@
*/
#include "Common.h"
+#include "AchievementMgr.h"
#include "CharacterDatabaseCleaner.h"
#include "World.h"
#include "Database/DatabaseEnv.h"
@@ -34,7 +35,7 @@ void CharacterDatabaseCleaner::CleanDatabase()
uint32 oldMSTime = getMSTime();
// check flags which clean ups are necessary
- QueryResult result = CharacterDatabase.Query("SELECT value FROM worldstates WHERE entry = 20004");
+ QueryResult result = CharacterDatabase.PQuery("SELECT value FROM worldstates WHERE entry = %d", WS_CLEANING_FLAGS);
if (!result)
return;
@@ -59,12 +60,11 @@ void CharacterDatabaseCleaner::CleanDatabase()
// NOTE: In order to have persistentFlags be set in worldstates for the next cleanup,
// you need to define them at least once in worldstates.
flags &= sWorld->getIntConfig(CONFIG_PERSISTENT_CHARACTER_CLEAN_FLAGS);
- CharacterDatabase.DirectPExecute("UPDATE worldstates SET value = %u WHERE entry = 20004", flags);
+ CharacterDatabase.DirectPExecute("UPDATE worldstates SET value = %u WHERE entry = %d", flags, WS_CLEANING_FLAGS);
sWorld->SetCleaningFlags(flags);
sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Cleaned character database in %u ms", GetMSTimeDiffToNow(oldMSTime));
-
}
void CharacterDatabaseCleaner::CheckUnique(const char* column, const char* table, bool (*check)(uint32))
@@ -108,7 +108,7 @@ void CharacterDatabaseCleaner::CheckUnique(const char* column, const char* table
bool CharacterDatabaseCleaner::AchievementProgressCheck(uint32 criteria)
{
- return sAchievementCriteriaStore.LookupEntry(criteria);
+ return sAchievementMgr->GetAchievementCriteria(criteria);
}
void CharacterDatabaseCleaner::CleanCharacterAchievementProgress()
diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp
index 57986243879..23114bda12a 100644
--- a/src/server/game/Tools/PlayerDump.cpp
+++ b/src/server/game/Tools/PlayerDump.cpp
@@ -406,7 +406,6 @@ DumpReturn PlayerDumpReader::LoadDump(std::string const& file, uint32 account, s
if (!fin)
return DUMP_FILE_OPEN_ERROR;
- QueryResult result = QueryResult(NULL);
char newguid[20], chraccount[20], newpetid[20], currpetid[20], lastpetid[20];
// make sure the same guid doesn't already exist and is safe to use
diff --git a/src/server/game/Tools/PlayerDump.h b/src/server/game/Tools/PlayerDump.h
index 321649fc485..321649fc485 100755..100644
--- a/src/server/game/Tools/PlayerDump.h
+++ b/src/server/game/Tools/PlayerDump.h
diff --git a/src/server/game/Weather/Weather.cpp b/src/server/game/Weather/Weather.cpp
index e119ebf5f2e..e119ebf5f2e 100755..100644
--- a/src/server/game/Weather/Weather.cpp
+++ b/src/server/game/Weather/Weather.cpp
diff --git a/src/server/game/Weather/Weather.h b/src/server/game/Weather/Weather.h
index 59bff95d7ea..59bff95d7ea 100755..100644
--- a/src/server/game/Weather/Weather.h
+++ b/src/server/game/Weather/Weather.h
diff --git a/src/server/game/Weather/WeatherMgr.cpp b/src/server/game/Weather/WeatherMgr.cpp
index c96ec1742cf..c96ec1742cf 100755..100644
--- a/src/server/game/Weather/WeatherMgr.cpp
+++ b/src/server/game/Weather/WeatherMgr.cpp
diff --git a/src/server/game/Weather/WeatherMgr.h b/src/server/game/Weather/WeatherMgr.h
index 768cd2dca17..768cd2dca17 100755..100644
--- a/src/server/game/Weather/WeatherMgr.h
+++ b/src/server/game/Weather/WeatherMgr.h
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index be5b005dc27..67693f22267 100755..100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -1655,7 +1655,6 @@ void World::SetInitialWorldSettings()
LoadAutobroadcasts();
///- Load and initialize scripts
- sObjectMgr->LoadQuestStartScripts(); // must be after load Creature/Gameobject(Template/Data) and QuestTemplate
sObjectMgr->LoadQuestEndScripts(); // must be after load Creature/Gameobject(Template/Data) and QuestTemplate
sObjectMgr->LoadSpellScripts(); // must be after load Creature/Gameobject(Template/Data)
sObjectMgr->LoadGameObjectScripts(); // must be after load Creature/Gameobject(Template/Data)
@@ -1780,6 +1779,9 @@ void World::SetInitialWorldSettings()
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Calculate next weekly quest reset time...");
InitWeeklyQuestResetTime();
+ sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Calculate next monthly quest reset time...");
+ InitMonthlyQuestResetTime();
+
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Calculate random battleground reset time...");
InitRandomBGResetTime();
@@ -1935,9 +1937,14 @@ void World::Update(uint32 diff)
m_NextDailyQuestReset += DAY;
}
+ /// Handle weekly quests reset time
if (m_gameTime > m_NextWeeklyQuestReset)
ResetWeeklyQuests();
+ /// Handle monthly quests reset time
+ if (m_gameTime > m_NextMonthlyQuestReset)
+ ResetMonthlyQuests();
+
if (m_gameTime > m_NextRandomBGReset)
ResetRandomBG();
@@ -2727,6 +2734,13 @@ void World::InitDailyQuestResetTime()
m_NextDailyQuestReset = (curTime >= curDayResetTime) ? curDayResetTime + DAY : curDayResetTime;
}
+void World::InitMonthlyQuestResetTime()
+{
+ time_t wstime = uint64(sWorld->getWorldState(WS_MONTHLY_QUEST_RESET_TIME));
+ time_t curtime = time(NULL);
+ m_NextMonthlyQuestReset = wstime < curtime ? curtime : time_t(wstime);
+}
+
void World::InitRandomBGResetTime()
{
time_t bgtime = uint64(sWorld->getWorldState(WS_BG_DAILY_RESET_TIME));
@@ -2817,6 +2831,8 @@ void World::SetPlayerSecurityLimit(AccountTypes _sec)
void World::ResetWeeklyQuests()
{
+ sLog->outInfo(LOG_FILTER_GENERAL, "Weekly quests reset for all characters.");
+
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_QUEST_STATUS_WEEKLY);
CharacterDatabase.Execute(stmt);
@@ -2831,6 +2847,57 @@ void World::ResetWeeklyQuests()
sPoolMgr->ChangeWeeklyQuests();
}
+void World::ResetMonthlyQuests()
+{
+ sLog->outInfo(LOG_FILTER_GENERAL, "Monthly quests reset for all characters.");
+
+ PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_QUEST_STATUS_MONTHLY);
+ CharacterDatabase.Execute(stmt);
+
+ for (SessionMap::const_iterator itr = m_sessions.begin(); itr != m_sessions.end(); ++itr)
+ if (itr->second->GetPlayer())
+ itr->second->GetPlayer()->ResetMonthlyQuestStatus();
+
+ time_t mostRecentQuestTime = 0;
+
+ // generate time
+ time_t curTime = time(NULL);
+ tm localTm = *localtime(&curTime);
+
+ int month = localTm.tm_mon;
+ int year = localTm.tm_year;
+
+ ++month;
+
+ // month 11 is december, next is january (0)
+ if (month > 11)
+ {
+ month = 0;
+ year += 1;
+ }
+
+ // reset time for next month
+ localTm.tm_year = year;
+ localTm.tm_mon = month;
+ localTm.tm_mday = 1; // don't know if we really need config option for day / hour
+ localTm.tm_hour = 0;
+ localTm.tm_min = 0;
+ localTm.tm_sec = 0;
+
+ time_t nextMonthResetTime = mktime(&localTm);
+
+ // last reset time before current moment
+ time_t resetTime = (curTime < nextMonthResetTime) ? nextMonthResetTime - MONTH : nextMonthResetTime;
+
+ // need reset (if we have quest time before last reset time (not processed by some reason)
+ if (mostRecentQuestTime && mostRecentQuestTime <= resetTime)
+ m_NextMonthlyQuestReset = mostRecentQuestTime;
+ else // plan next reset time
+ m_NextMonthlyQuestReset = (curTime >= nextMonthResetTime) ? nextMonthResetTime + MONTH : nextMonthResetTime;
+
+ sWorld->setWorldState(WS_MONTHLY_QUEST_RESET_TIME, uint64(m_NextMonthlyQuestReset));
+}
+
void World::ResetEventSeasonalQuests(uint16 event_id)
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_QUEST_STATUS_SEASONAL);
diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h
index 37c35c58c29..afc2690c10b 100644
--- a/src/server/game/World/World.h
+++ b/src/server/game/World/World.h
@@ -469,9 +469,11 @@ enum RealmZone
enum WorldStates
{
- WS_WEEKLY_QUEST_RESET_TIME = 20002, // Next weekly reset time
- WS_BG_DAILY_RESET_TIME = 20003, // Next daily BG reset time
- WS_GUILD_DAILY_RESET_TIME = 20006, // Next guild cap reset time
+ WS_WEEKLY_QUEST_RESET_TIME = 20002, // Next weekly reset time
+ WS_BG_DAILY_RESET_TIME = 20003, // Next daily BG reset time
+ WS_CLEANING_FLAGS = 20004, // Cleaning Flags
+ WS_GUILD_DAILY_RESET_TIME = 20006, // Next guild cap reset time
+ WS_MONTHLY_QUEST_RESET_TIME = 20007, // Next monthly reset time
};
/// Storage class for commands issued for delayed execution
@@ -742,10 +744,12 @@ class World
void InitDailyQuestResetTime();
void InitWeeklyQuestResetTime();
+ void InitMonthlyQuestResetTime();
void InitRandomBGResetTime();
void InitGuildResetTime();
void ResetDailyQuests();
void ResetWeeklyQuests();
+ void ResetMonthlyQuests();
void ResetRandomBG();
void ResetGuildCap();
private:
@@ -807,6 +811,7 @@ class World
// next daily quests and random bg reset time
time_t m_NextDailyQuestReset;
time_t m_NextWeeklyQuestReset;
+ time_t m_NextMonthlyQuestReset;
time_t m_NextRandomBGReset;
time_t m_NextGuildReset;
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp
index 9269bbb07ee..a57b06a8ab0 100644
--- a/src/server/scripts/Commands/cs_account.cpp
+++ b/src/server/scripts/Commands/cs_account.cpp
@@ -306,6 +306,9 @@ public:
{
handler->SendSysMessage(LANG_COMMAND_WRONGOLDPASSWORD);
handler->SetSentErrorMessage(true);
+ sLog->outInfo(LOG_FILTER_CHARACTER, "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change password.",
+ handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
+ handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow());
return false;
}
@@ -321,6 +324,9 @@ public:
{
case AOR_OK:
handler->SendSysMessage(LANG_COMMAND_PASSWORD);
+ sLog->outInfo(LOG_FILTER_CHARACTER, "Account: %u (IP: %s) Character:[%s] (GUID: %u) Changed Password.",
+ handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
+ handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow());
break;
case AOR_PASS_TOO_LONG:
handler->SendSysMessage(LANG_PASSWORD_TOO_LONG);
diff --git a/src/server/scripts/Commands/cs_achievement.cpp b/src/server/scripts/Commands/cs_achievement.cpp
index 9f5c861c52f..9a84a4c4cbc 100644
--- a/src/server/scripts/Commands/cs_achievement.cpp
+++ b/src/server/scripts/Commands/cs_achievement.cpp
@@ -22,6 +22,7 @@ Comment: All achievement related commands
Category: commandscripts
EndScriptData */
+#include "AchievementMgr.h"
#include "Chat.h"
#include "Language.h"
#include "Player.h"
@@ -69,7 +70,7 @@ public:
return false;
}
- if (AchievementEntry const* achievementEntry = sAchievementStore.LookupEntry(achievementId))
+ if (AchievementEntry const* achievementEntry = sAchievementMgr->GetAchievement(achievementId))
target->CompletedAchievement(achievementEntry);
return true;
diff --git a/src/server/scripts/Commands/cs_disable.cpp b/src/server/scripts/Commands/cs_disable.cpp
index 73ed341a21c..cf0b1f08e53 100644
--- a/src/server/scripts/Commands/cs_disable.cpp
+++ b/src/server/scripts/Commands/cs_disable.cpp
@@ -22,8 +22,9 @@ Comment: All disable related commands
Category: commandscripts
EndScriptData */
-#include "Chat.h"
#include "DisableMgr.h"
+#include "AchievementMgr.h"
+#include "Chat.h"
#include "Language.h"
#include "ObjectMgr.h"
#include "OutdoorPvP.h"
@@ -140,7 +141,7 @@ public:
}
case DISABLE_TYPE_ACHIEVEMENT_CRITERIA:
{
- if (!sAchievementCriteriaStore.LookupEntry(entry))
+ if (!sAchievementMgr->GetAchievementCriteria(entry))
{
handler->PSendSysMessage(LANG_COMMAND_NO_ACHIEVEMENT_CRITERIA_FOUND);
handler->SetSentErrorMessage(true);
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp
index 5e54778b14a..c701c4f350c 100644
--- a/src/server/scripts/Commands/cs_misc.cpp
+++ b/src/server/scripts/Commands/cs_misc.cpp
@@ -937,16 +937,9 @@ public:
//No args required for players
if (handler->GetSession() && AccountMgr::IsPlayerAccount(handler->GetSession()->GetSecurity()))
{
- Player* player = handler->GetSession()->GetPlayer();
- if (player->isInFlight() || player->isInCombat())
- {
- handler->SendSysMessage(LANG_CANT_DO_NOW);
- handler->SetSentErrorMessage(true);
- return false;
- }
-
- //7355: "Stuck"
- player->CastSpell(player, 7355, false);
+ // 7355: "Stuck"
+ if (Player* player = handler->GetSession()->GetPlayer())
+ player->CastSpell(player, 7355, false);
return true;
}
@@ -967,8 +960,13 @@ public:
if (player->isInFlight() || player->isInCombat())
{
- handler->SendSysMessage(LANG_CANT_DO_NOW);
- handler->SetSentErrorMessage(true);
+ SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(7355);
+ if (!spellInfo)
+ return false;
+
+ if (Player* caster = handler->GetSession()->GetPlayer())
+ Spell::SendCastResult(caster, spellInfo, 0, SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW);
+
return false;
}
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp
index c2791c815ad..5b5608f9a26 100644
--- a/src/server/scripts/Commands/cs_reload.cpp
+++ b/src/server/scripts/Commands/cs_reload.cpp
@@ -128,7 +128,6 @@ public:
{ "prospecting_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesProspectingCommand, "", NULL },
{ "quest_end_scripts", SEC_ADMINISTRATOR, true, &HandleReloadQuestEndScriptsCommand, "", NULL },
{ "quest_poi", SEC_ADMINISTRATOR, true, &HandleReloadQuestPOICommand, "", NULL },
- { "quest_start_scripts", SEC_ADMINISTRATOR, true, &HandleReloadQuestStartScriptsCommand, "", NULL },
{ "quest_template", SEC_ADMINISTRATOR, true, &HandleReloadQuestTemplateCommand, "", NULL },
{ "reference_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesReferenceCommand, "", NULL },
{ "reserved_name", SEC_ADMINISTRATOR, true, &HandleReloadReservedNameCommand, "", NULL },
@@ -265,7 +264,6 @@ public:
HandleReloadGameObjectScriptsCommand(handler, "a");
HandleReloadEventScriptsCommand(handler, "a");
HandleReloadQuestEndScriptsCommand(handler, "a");
- HandleReloadQuestStartScriptsCommand(handler, "a");
HandleReloadSpellScriptsCommand(handler, "a");
handler->SendGlobalGMSysMessage("DB tables `*_scripts` reloaded.");
HandleReloadDbScriptStringCommand(handler, "a");
@@ -1065,26 +1063,6 @@ public:
return true;
}
- static bool HandleReloadQuestStartScriptsCommand(ChatHandler* handler, const char* args)
- {
- if (sScriptMgr->IsScriptScheduled())
- {
- handler->SendSysMessage("DB scripts used currently, please attempt reload later.");
- handler->SetSentErrorMessage(true);
- return false;
- }
-
- if (*args != 'a')
- sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Scripts from `quest_start_scripts`...");
-
- sObjectMgr->LoadQuestStartScripts();
-
- if (*args != 'a')
- handler->SendGlobalGMSysMessage("DB table `quest_start_scripts` reloaded.");
-
- return true;
- }
-
static bool HandleReloadSpellScriptsCommand(ChatHandler* handler, const char* args)
{
if (sScriptMgr->IsScriptScheduled())
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp
index 577516383b2..f4a9fcb5060 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp
@@ -78,7 +78,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void UpdateAI(const uint32 diff)
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
index 73fefe210df..4a08801c972 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
@@ -32,10 +32,11 @@ enum Midnight
SAY_MIDNIGHT_KILL = 0,
SAY_APPEAR = 1,
SAY_MOUNT = 2,
- SAY_KILL = 3,
- SAY_DISARMED = 4,
- SAY_DEATH = 5,
- SAY_RANDOM = 6,
+
+ SAY_KILL = 0,
+ SAY_DISARMED = 1,
+ SAY_DEATH = 2,
+ SAY_RANDOM = 3,
SPELL_SHADOWCLEAVE = 29832,
SPELL_INTANGIBLE_PRESENCE = 29833,
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
index 660b8f6c460..1fa5cc9c5af 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
@@ -226,7 +226,6 @@ public:
if (text)
CreatureAI::Talk(text);
-
}
void PrepareEncounter()
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
index 22a26fd4389..84d0cd6b4c4 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
@@ -178,7 +178,7 @@ public:
{
if (!instance)
return;
-
+
instance->SetData(DATA_KAELTHAS_EVENT, IN_PROGRESS);
}
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
index 4d9bd1f2192..dcf70b36df6 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
@@ -113,7 +113,7 @@ public:
for (std::list<uint64>::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr)
{
//Unit* unit = Unit::GetUnit(*me, FelCrystals[i]);
- if (Creature *creature = Unit::GetCreature(*me, *itr))
+ if (Creature* creature = Unit::GetCreature(*me, *itr))
{
if (!creature->isAlive())
creature->Respawn(); // Let the core handle setting death state, etc.
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
index c8bf50c0bcc..c142a0c30d7 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
@@ -150,7 +150,7 @@ public:
HandleGameObject(SelinEncounterDoorGUID, false);
else if (data == NOT_STARTED)
HandleGameObject(SelinEncounterDoorGUID, true);
-
+
Encounter[0] = data;
break;
case DATA_VEXALLUS_EVENT:
@@ -184,7 +184,7 @@ public:
StatuesState = data;
break;
}
-
+
SaveToDB();
}
@@ -245,7 +245,7 @@ public:
OUT_SAVE_INST_DATA_COMPLETE;
return saveStream.str();
}
-
+
void Load(const char* str)
{
if (!str)
@@ -257,7 +257,7 @@ public:
OUT_LOAD_INST_DATA(str);
std::istringstream loadStream(str);
-
+
for (uint32 i = 0; i < MAX_ENCOUNTER; ++i)
{
uint32 tmpState;
@@ -272,7 +272,7 @@ public:
OUT_LOAD_INST_DATA_COMPLETE;
}
-
+
uint64 GetData64(uint32 identifier) const
{
switch (identifier)
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp
index f792b861c99..85a54398511 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp
@@ -28,7 +28,10 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "molten_core.h"
-#define EMOTE_SERVICE -1409000
+enum Emotes
+{
+ EMOTE_SERVICE = 0
+};
enum Spells
{
@@ -76,7 +79,7 @@ class boss_baron_geddon : public CreatureScript
{
me->InterruptNonMeleeSpells(true);
DoCast(me, SPELL_ARMAGEDDON);
- DoScriptText(EMOTE_SERVICE, me);
+ Talk(EMOTE_SERVICE);
return;
}
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp
index 65a630a58f7..42952580d54 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp
@@ -30,7 +30,7 @@ EndScriptData */
enum Texts
{
- EMOTE_FRENZY = -1409001,
+ EMOTE_FRENZY = 0
};
enum Spells
@@ -88,7 +88,7 @@ class boss_magmadar : public CreatureScript
switch (eventId)
{
case EVENT_FRENZY:
- DoScriptText(EMOTE_FRENZY, me);
+ Talk(EMOTE_FRENZY);
DoCast(me, SPELL_FRENZY);
events.ScheduleEvent(EVENT_FRENZY, 15000);
break;
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
index c7d6b31d2ea..043e5b16330 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
@@ -32,17 +32,14 @@ EndScriptData */
enum Texts
{
- SAY_AGGRO = -1409003,
- SAY_SPAWN = -1409004,
- SAY_SLAY = -1409005,
- SAY_SPECIAL = -1409006,
- SAY_DEFEAT = -1409007,
-
- SAY_SUMMON_MAJ = -1409008,
- SAY_ARRIVAL1_RAG = -1409009,
- SAY_ARRIVAL2_MAJ = -1409010,
- SAY_ARRIVAL3_RAG = -1409011,
- SAY_ARRIVAL5_RAG = -1409012,
+ SAY_AGGRO = 0,
+ SAY_SPAWN = 1,
+ SAY_SLAY = 2,
+ SAY_SPECIAL = 3,
+ SAY_DEFEAT = 4,
+
+ SAY_SUMMON_MAJ = 5,
+ SAY_ARRIVAL2_MAJ = 6
};
enum Spells
@@ -84,13 +81,13 @@ class boss_majordomo : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
if (urand(0, 99) < 25)
- DoScriptText(SAY_SLAY, me);
+ Talk(SAY_SLAY);
}
void EnterCombat(Unit* who)
{
BossAI::EnterCombat(who);
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_MAGIC_REFLECTION, 30000);
events.ScheduleEvent(EVENT_DAMAGE_REFLECTION, 15000);
events.ScheduleEvent(EVENT_BLAST_WAVE, 10000);
@@ -111,7 +108,7 @@ class boss_majordomo : public CreatureScript
instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, me->GetEntry(), me);
me->setFaction(35);
me->AI()->EnterEvadeMode();
- DoScriptText(SAY_DEFEAT, me);
+ Talk(SAY_DEFEAT);
_JustDied();
events.ScheduleEvent(EVENT_OUTRO_1, 32000);
return;
@@ -168,7 +165,7 @@ class boss_majordomo : public CreatureScript
instance->instance->SummonCreature(NPC_RAGNAROS, RagnarosSummonPos);
break;
case EVENT_OUTRO_3:
- DoScriptText(SAY_ARRIVAL2_MAJ, me);
+ Talk(SAY_ARRIVAL2_MAJ);
break;
default:
break;
@@ -182,7 +179,7 @@ class boss_majordomo : public CreatureScript
if (action == ACTION_START_RAGNAROS)
{
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
- DoScriptText(SAY_SUMMON_MAJ, me);
+ Talk(SAY_SUMMON_MAJ);
events.ScheduleEvent(EVENT_OUTRO_2, 8000);
events.ScheduleEvent(EVENT_OUTRO_3, 24000);
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index 0cb2bd7f7bc..4a29a7d929b 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -25,6 +25,7 @@
#include "PassiveAI.h"
#include "Player.h"
#include "SpellInfo.h"
+#include "CreatureTextMgr.h"
/*######
##Quest 12848
@@ -32,7 +33,7 @@
#define GCD_CAST 1
-enum eDeathKnightSpells
+enum UnworthyInitiate
{
SPELL_SOUL_PRISON_CHAIN_SELF = 54612,
SPELL_SOUL_PRISON_CHAIN = 54613,
@@ -41,25 +42,24 @@ enum eDeathKnightSpells
SPELL_ICY_TOUCH = 52372,
SPELL_PLAGUE_STRIKE = 52373,
SPELL_BLOOD_STRIKE = 52374,
- SPELL_DEATH_COIL = 52375
-};
+ SPELL_DEATH_COIL = 52375,
-#define EVENT_ICY_TOUCH 1
-#define EVENT_PLAGUE_STRIKE 2
-#define EVENT_BLOOD_STRIKE 3
-#define EVENT_DEATH_COIL 4
+ SAY_EVENT_START = 0,
+ SAY_EVENT_ATTACK = 1,
-//used by 29519, 29520, 29565, 29566, 29567 but signed for 29519
-int32 say_event_start[8] =
-{
- -1609000, -1609001, -1609002, -1609003,
- -1609004, -1609005, -1609006, -1609007
+ EVENT_ICY_TOUCH = 1,
+ EVENT_PLAGUE_STRIKE = 2,
+ EVENT_BLOOD_STRIKE = 3,
+ EVENT_DEATH_COIL = 4
};
-int32 say_event_attack[9] =
+enum UnworthyInitiatePhase
{
- -1609008, -1609009, -1609010, -1609011, -1609012,
- -1609013, -1609014, -1609015, -1609016
+ PHASE_CHAINED,
+ PHASE_TO_EQUIP,
+ PHASE_EQUIPING,
+ PHASE_TO_ATTACK,
+ PHASE_ATTACKING,
};
uint32 acherus_soul_prison[12] =
@@ -87,15 +87,6 @@ uint32 acherus_unworthy_initiate[5] =
29567
};
-enum UnworthyInitiatePhase
-{
- PHASE_CHAINED,
- PHASE_TO_EQUIP,
- PHASE_EQUIPING,
- PHASE_TO_ATTACK,
- PHASE_ATTACKING,
-};
-
class npc_unworthy_initiate : public CreatureScript
{
public:
@@ -155,7 +146,7 @@ public:
me->CastSpell(me, SPELL_DK_INITIATE_VISUAL, true);
if (Player* starter = Unit::GetPlayer(*me, playerGUID))
- DoScriptText(say_event_attack[rand()%9], me, starter);
+ sCreatureTextMgr->SendChat(me, SAY_EVENT_ATTACK, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, starter);
phase = PHASE_TO_ATTACK;
}
@@ -174,7 +165,7 @@ public:
anchor->GetContactPoint(me, anchorX, anchorY, z, 1.0f);
playerGUID = target->GetGUID();
- DoScriptText(say_event_start[rand()%8], me, target);
+ sCreatureTextMgr->SendChat(me, SAY_EVENT_START, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, target);
}
void UpdateAI(const uint32 diff)
@@ -341,15 +332,7 @@ public:
enum eDuelEnums
{
- SAY_DUEL_A = -1609080,
- SAY_DUEL_B = -1609081,
- SAY_DUEL_C = -1609082,
- SAY_DUEL_D = -1609083,
- SAY_DUEL_E = -1609084,
- SAY_DUEL_F = -1609085,
- SAY_DUEL_G = -1609086,
- SAY_DUEL_H = -1609087,
- SAY_DUEL_I = -1609088,
+ SAY_DUEL = 0,
SPELL_DUEL = 52996,
//SPELL_DUEL_TRIGGERED = 52990,
@@ -360,11 +343,6 @@ enum eDuelEnums
FACTION_HOSTILE = 2068
};
-int32 m_auiRandomSay[] =
-{
- SAY_DUEL_A, SAY_DUEL_B, SAY_DUEL_C, SAY_DUEL_D, SAY_DUEL_E, SAY_DUEL_F, SAY_DUEL_G, SAY_DUEL_H, SAY_DUEL_I
-};
-
class npc_death_knight_initiate : public CreatureScript
{
public:
@@ -389,8 +367,7 @@ public:
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15);
- int32 uiSayId = rand()% (sizeof(m_auiRandomSay)/sizeof(int32));
- DoScriptText(m_auiRandomSay[uiSayId], creature, player);
+ sCreatureTextMgr->SendChat(creature, SAY_EVENT_ATTACK, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, player);
player->CastSpell(creature, SPELL_DUEL, false);
player->CastSpell(player, SPELL_DUEL_FLAG, true);
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
index 78fc8d127b2..7ceb86dd980 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
@@ -20,6 +20,7 @@
#include "ScriptedEscortAI.h"
#include "Player.h"
#include "SpellInfo.h"
+#include "CreatureTextMgr.h"
//How to win friends and influence enemies
// texts signed for creature 28939 but used for 28939, 28940, 28610
@@ -30,22 +31,14 @@ enum win_friends
SAY_PERSUADED2 = 3,
SAY_PERSUADED3 = 4,
SAY_PERSUADED4 = 5,
- SAY_PERSUADED6 = 6,
+ SAY_PERSUADED5 = 6,
+ SAY_PERSUADED6 = 7,
+ SAY_PERSUADE_RAND = 8,
SPELL_PERSUASIVE_STRIKE = 52781,
SPELL_THREAT_PULSE = 58111,
QUEST_HOW_TO_WIN_FRIENDS = 12720,
};
-#define SAY_PERSUADED5 "LIES! The pain you are about to endure will be talked about for years to come!"
-
-#define SAY_PERSUADE1 "I'll tear the secrets from your soul! Tell me about the \"Crimson Dawn\" and your life may be spared!"
-#define SAY_PERSUADE2 "Tell me what you know about \"Crimson Dawn\" or the beatings will continue!"
-#define SAY_PERSUADE3 "I'm through being courteous with your kind, human! What is the \"Crimson Dawn\"?"
-#define SAY_PERSUADE4 "Is your life worth so little? Just tell me what I need to know about \"Crimson Dawn\" and I'll end your suffering quickly."
-#define SAY_PERSUADE5 "I can keep this up for a very long time, Scarlet dog! Tell me about the \"Crimson Dawn\"!"
-#define SAY_PERSUADE6 "What is the \"Crimson Dawn\"?"
-#define SAY_PERSUADE7 "\"Crimson Dawn\"! What is it! Speak!"
-
class npc_crusade_persuaded : public CreatureScript
{
public:
@@ -90,30 +83,7 @@ public:
me->SetReactState(REACT_PASSIVE);
DoCastAOE(SPELL_THREAT_PULSE, true);
- switch (urand(1, 7))
- {
- case 1:
- player->Say(SAY_PERSUADE1, LANG_UNIVERSAL);
- break;
- case 2:
- player->Say(SAY_PERSUADE2, LANG_UNIVERSAL);
- break;
- case 3:
- player->Say(SAY_PERSUADE3, LANG_UNIVERSAL);
- break;
- case 4:
- player->Say(SAY_PERSUADE4, LANG_UNIVERSAL);
- break;
- case 5:
- player->Say(SAY_PERSUADE5, LANG_UNIVERSAL);
- break;
- case 6:
- player->Say(SAY_PERSUADE6, LANG_UNIVERSAL);
- break;
- case 7:
- player->Say(SAY_PERSUADE7, LANG_UNIVERSAL);
- break;
- }
+ sCreatureTextMgr->SendChat(me, SAY_PERSUADE_RAND, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, player);
Talk(SAY_CRUSADER);
}
}
@@ -156,7 +126,7 @@ public:
break;
case 5:
- player->Say(SAY_PERSUADED5, LANG_UNIVERSAL);
+ sCreatureTextMgr->SendChat(me, SAY_PERSUADED5, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, player);
speechTimer = 8000;
break;
@@ -171,7 +141,7 @@ public:
++speechCounter;
DoCastAOE(SPELL_THREAT_PULSE, true);
- } else
+ } else
speechTimer -= diff;
return;
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
index 77c1e3bc066..8f410cf62bc 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -1135,7 +1135,7 @@ public:
case 49:
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
- Talk(SAY_LIGHT_OF_DAWN54);
+ temp->AI()->Talk(SAY_LIGHT_OF_DAWN54);
JumpToNextStep(4000);
break;
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
index 78a5f3797d8..2ff3dcd5e32 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
@@ -34,7 +34,7 @@ EndScriptData */
//this texts are already used by 3975 and 3976
enum Says
{
- SAY_LOST_HEAD = 0,
+ SAY_LOST_HEAD = 0,
SAY_PLAYER_DEATH = 1,
SAY_ENTRANCE = 0,
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
index 5d9df239870..27a3aaa3fae 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
@@ -33,8 +33,8 @@ EndScriptData */
enum eEnums
{
- SAY_BOSS_DIE_AD = 0,
- SAY_BOSS_DIE_AS = 0,
+ SAY_BOSS_DIE_AD = 4,
+ SAY_BOSS_DIE_AS = 3,
SAY_ARCHMAGE = 0,
NPC_ASH = 3850,
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
index 467b532163b..5da38e21d2f 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
@@ -83,12 +83,10 @@ public:
/*######
## mob_freed_soul
######*/
-
-//Possibly more of these quotes around.
-#define SAY_ZAPPED0 -1329000
-#define SAY_ZAPPED1 -1329001
-#define SAY_ZAPPED2 -1329002
-#define SAY_ZAPPED3 -1329003
+enum FreedSoul
+{
+ SAY_ZAPPED = 0
+};
class mob_freed_soul : public CreatureScript
{
@@ -106,7 +104,7 @@ public:
void Reset()
{
- DoScriptText(RAND(SAY_ZAPPED0, SAY_ZAPPED1, SAY_ZAPPED2, SAY_ZAPPED3), me);
+ Talk(SAY_ZAPPED);
}
void EnterCombat(Unit* /*who*/) {}
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
index c7db80c7f22..c2dc7123f6d 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
@@ -54,7 +54,7 @@ enum Spells
AURA_SPECTRAL_REALM = 46021,
AURA_SPECTRAL_INVISIBILITY = 44801,
AURA_DEMONIC_VISUAL = 44800,
-
+
SPELL_SPECTRAL_BLAST = 44869,
SPELL_TELEPORT_SPECTRAL = 46019,
SPELL_ARCANE_BUFFET = 45018,
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
index c2552963b0e..b32f9244034 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
@@ -34,7 +34,7 @@ EndScriptData */
enum Yells
{
SAY_KJ_OFFCOMBAT = 0,
-
+
SAY_KALECGOS_ENCOURAGE = 0,
SAY_KALECGOS_READY1 = 1,
SAY_KALECGOS_READY2 = 2,
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
index 17c3f5e8ff4..c5639a68860 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
@@ -29,9 +29,9 @@ EndScriptData */
enum eYells
{
- SAY_AGGRO = -1309011,
- SAY_FEAST_PANTHER = -1309012,
- SAY_DEATH = -1309013,
+ SAY_AGGRO = 0,
+ SAY_FEAST_PANTHER = 1,
+ SAY_DEATH = 2,
};
enum eSpells
@@ -106,7 +106,7 @@ class boss_arlokk : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void JustReachedHome()
@@ -120,7 +120,7 @@ class boss_arlokk : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
me->SetDisplayId(MODEL_ID_NORMAL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
@@ -131,8 +131,8 @@ class boss_arlokk : public CreatureScript
void DoSummonPhanters()
{
- if (Unit* pMarkedTarget = Unit::GetUnit(*me, MarkedTargetGUID))
- DoScriptText(SAY_FEAST_PANTHER, me, pMarkedTarget);
+ if (MarkedTargetGUID)
+ Talk(SAY_FEAST_PANTHER, MarkedTargetGUID);
me->SummonCreature(NPC_ZULIAN_PROWLER, -11532.7998f, -1649.6734f, 41.4800f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
me->SummonCreature(NPC_ZULIAN_PROWLER, -11532.9970f, -1606.4840f, 41.2979f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
index 6cb657f4cff..7d80de88beb 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
@@ -27,23 +27,26 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "zulgurub.h"
-#define SAY_AGGRO -1309020
-#define SAY_FLEEING -1309021
-#define SAY_MINION_DESTROY -1309022 //where does it belong?
-#define SAY_PROTECT_ALTAR -1309023 //where does it belong?
+enum Hakkar
+{
+ SAY_AGGRO = 0,
+ SAY_FLEEING = 1,
+ SAY_MINION_DESTROY = 2, //where does it belong?
+ SAY_PROTECT_ALTAR = 3, //where does it belong?
-#define SPELL_BLOODSIPHON 24322
-#define SPELL_CORRUPTEDBLOOD 24328
-#define SPELL_CAUSEINSANITY 24327 //Not working disabled.
-#define SPELL_WILLOFHAKKAR 24178
-#define SPELL_ENRAGE 24318
+ SPELL_BLOODSIPHON = 24322,
+ SPELL_CORRUPTEDBLOOD = 24328,
+ SPELL_CAUSEINSANITY = 24327, //Not working disabled.
+ SPELL_WILLOFHAKKAR = 24178,
+ SPELL_ENRAGE = 24318,
// The Aspects of all High Priests
-#define SPELL_ASPECT_OF_JEKLIK 24687
-#define SPELL_ASPECT_OF_VENOXIS 24688
-#define SPELL_ASPECT_OF_MARLI 24686
-#define SPELL_ASPECT_OF_THEKAL 24689
-#define SPELL_ASPECT_OF_ARLOKK 24690
+ SPELL_ASPECT_OF_JEKLIK = 24687,
+ SPELL_ASPECT_OF_VENOXIS = 24688,
+ SPELL_ASPECT_OF_MARLI = 24686,
+ SPELL_ASPECT_OF_THEKAL = 24689,
+ SPELL_ASPECT_OF_ARLOKK = 24690
+};
class boss_hakkar : public CreatureScript
{
@@ -108,7 +111,7 @@ class boss_hakkar : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
index 156ccab5eae..3a2da6fdba9 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
@@ -27,22 +27,24 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "zulgurub.h"
-#define SAY_AGGRO -1309002
-#define SAY_RAIN_FIRE -1309003
-#define SAY_DEATH -1309004
-
-#define SPELL_CHARGE 22911
-#define SPELL_SONICBURST 23918
-#define SPELL_SCREECH 6605
-#define SPELL_SHADOW_WORD_PAIN 23952
-#define SPELL_MIND_FLAY 23953
-#define SPELL_CHAIN_MIND_FLAY 26044 //Right ID unknown. So disabled
-#define SPELL_GREATERHEAL 23954
-#define SPELL_BAT_FORM 23966
-
-// Batriders Spell
-
-#define SPELL_BOMB 40332 //Wrong ID but Magmadars bomb is not working...
+enum Jeklik
+{
+ SAY_AGGRO = 0,
+ SAY_RAIN_FIRE = 1,
+ SAY_DEATH = 2,
+
+ SPELL_CHARGE = 22911,
+ SPELL_SONICBURST = 23918,
+ SPELL_SCREECH = 6605,
+ SPELL_SHADOW_WORD_PAIN = 23952,
+ SPELL_MIND_FLAY = 23953,
+ SPELL_CHAIN_MIND_FLAY = 26044, //Right ID unknown. So disabled
+ SPELL_GREATERHEAL = 23954,
+ SPELL_BAT_FORM = 23966,
+
+ // Batriders Spell
+ SPELL_BOMB = 40332 //Wrong ID but Magmadars bomb is not working...
+};
class boss_jeklik : public CreatureScript
{
@@ -91,13 +93,13 @@ class boss_jeklik : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoCast(me, SPELL_BAT_FORM);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_JEKLIK, DONE);
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
index f8d23947e9c..844a2b16800 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
@@ -27,20 +27,23 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "zulgurub.h"
-#define SAY_AGGRO -1309014
+enum Jindo
+{
+ SAY_AGGRO = 1,
-#define SPELL_BRAINWASHTOTEM 24262
-#define SPELL_POWERFULLHEALINGWARD 24309 //We will not use this spell. We will summon a totem by script cause the spell totems will not cast.
-#define SPELL_HEX 24053
-#define SPELL_DELUSIONSOFJINDO 24306
-#define SPELL_SHADEOFJINDO 24308 //We will not use this spell. We will summon a shade by script.
+ SPELL_BRAINWASHTOTEM = 24262,
+ SPELL_POWERFULLHEALINGWARD = 24309, //We will not use this spell. We will summon a totem by script cause the spell totems will not cast.
+ SPELL_HEX = 24053,
+ SPELL_DELUSIONSOFJINDO = 24306,
+ SPELL_SHADEOFJINDO = 24308, //We will not use this spell. We will summon a shade by script.
-//Healing Ward Spell
-#define SPELL_HEAL 38588 //Totems are not working right. Right heal spell ID is 24311 but this spell is not casting...
+ //Healing Ward Spell
+ SPELL_HEAL = 38588, //Totems are not working right. Right heal spell ID is 24311 but this spell is not casting...
-//Shade of Jindo Spell
-#define SPELL_SHADOWSHOCK 19460
-#define SPELL_INVISIBLE 24699
+ //Shade of Jindo Spell
+ SPELL_SHADOWSHOCK = 19460,
+ SPELL_INVISIBLE = 24699
+};
class boss_jindo : public CreatureScript
{
@@ -72,7 +75,7 @@ class boss_jindo : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
index 32831eb047b..9f3aa315efa 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
@@ -27,25 +27,28 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "zulgurub.h"
-#define SAY_AGGRO -1309015
-#define SAY_DING_KILL -1309016
-#define SAY_GRATS_JINDO -1309017
-#define SAY_WATCH -1309018
-#define SAY_WATCH_WHISPER -1309019 //is this text for real? easter egg?
-
-#define SPELL_CHARGE 24408
-#define SPELL_CLEAVE 7160
-#define SPELL_FEAR 29321
-#define SPELL_WHIRLWIND 15589
-#define SPELL_MORTAL_STRIKE 16856
-#define SPELL_ENRAGE 24318
-#define SPELL_WATCH 24314
-#define SPELL_LEVEL_UP 24312
+enum Mandokir
+{
+ SAY_AGGRO = 0,
+ SAY_DING_KILL = 1,
+ SAY_WATCH = 2,
+ SAY_WATCH_WHISPER = 3, //is this text for real? easter egg?
+ SAY_GRATS_JINDO = 0,
+
+ SPELL_CHARGE = 24408,
+ SPELL_CLEAVE = 7160,
+ SPELL_FEAR = 29321,
+ SPELL_WHIRLWIND = 15589,
+ SPELL_MORTAL_STRIKE = 16856,
+ SPELL_ENRAGE = 24318,
+ SPELL_WATCH = 24314,
+ SPELL_LEVEL_UP = 24312,
//Ohgans Spells
-#define SPELL_SUNDERARMOR 24317
+ SPELL_SUNDERARMOR = 24317,
-#define NPC_SPEAKER 11391
+ NPC_SPEAKER = 11391
+};
class boss_mandokir : public CreatureScript
{
@@ -119,17 +122,17 @@ class boss_mandokir : public CreatureScript
if (KillCount == 3)
{
- DoScriptText(SAY_DING_KILL, me);
+ Talk(SAY_DING_KILL);
if (instance)
{
uint64 JindoGUID = instance->GetData64(DATA_JINDO);
if (JindoGUID)
{
- if (Unit* jTemp = Unit::GetUnit(*me, JindoGUID))
+ if (Creature* jTemp = Creature::GetCreature(*me, JindoGUID))
{
if (jTemp->isAlive())
- DoScriptText(SAY_GRATS_JINDO, jTemp);
+ jTemp->AI()->Talk(SAY_GRATS_JINDO);
}
}
}
@@ -141,7 +144,7 @@ class boss_mandokir : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
@@ -205,7 +208,7 @@ class boss_mandokir : public CreatureScript
{
if (Unit* p = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
- DoScriptText(SAY_WATCH, me, p);
+ Talk(SAY_WATCH, p->GetGUID());
DoCast(p, SPELL_WATCH);
WatchTarget = p->GetGUID();
someWatched = true;
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
index 8e0deda1d0b..17b268b92ef 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
@@ -27,19 +27,22 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "zulgurub.h"
-#define SAY_AGGRO -1309005
-#define SAY_TRANSFORM -1309006
-#define SAY_SPIDER_SPAWN -1309007
-#define SAY_DEATH -1309008
+enum Marli
+{
+ SAY_AGGRO = 0,
+ SAY_TRANSFORM = 1,
+ SAY_SPIDER_SPAWN = 2,
+ SAY_DEATH = 3,
-#define SPELL_CHARGE 22911
-#define SPELL_ASPECT_OF_MARLI 24686 // A stun spell
-#define SPELL_ENVOLWINGWEB 24110
-#define SPELL_POISONVOLLEY 24099
-#define SPELL_SPIDER_FORM 24084
+ SPELL_CHARGE = 22911,
+ SPELL_ASPECT_OF_MARLI = 24686, // A stun spell
+ SPELL_ENVOLWINGWEB = 24110,
+ SPELL_POISONVOLLEY = 24099,
+ SPELL_SPIDER_FORM = 24084,
//The Spider Spells
-#define SPELL_LEVELUP 24312 //Not right Spell.
+ SPELL_LEVELUP = 24312 //Not right Spell.
+};
class boss_marli : public CreatureScript
{
@@ -86,12 +89,12 @@ class boss_marli : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_MARLI, DONE);
}
@@ -117,7 +120,7 @@ class boss_marli : public CreatureScript
if (!Spawned && SpawnStartSpiders_Timer <= diff)
{
- DoScriptText(SAY_SPIDER_SPAWN, me);
+ Talk(SAY_SPIDER_SPAWN);
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (!target)
@@ -155,7 +158,7 @@ class boss_marli : public CreatureScript
if (!PhaseTwo && Transform_Timer <= diff)
{
- DoScriptText(SAY_TRANSFORM, me);
+ Talk(SAY_TRANSFORM);
DoCast(me, SPELL_SPIDER_FORM);
const CreatureTemplate* cinfo = me->GetCreatureTemplate();
me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 35)));
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
index 29495f77f2a..3ea5d932ab0 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
@@ -27,11 +27,11 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "zulgurub.h"
-#define SAY_AGGRO -1309009
-#define SAY_DEATH -1309010
-
-enum eSpells
+enum Thekal
{
+ SAY_AGGRO = 0,
+ SAY_DEATH = 1,
+
SPELL_MORTALCLEAVE = 22859,
SPELL_SILENCE = 22666,
SPELL_FRENZY = 8269,
@@ -53,7 +53,7 @@ enum eSpells
SPELL_SINISTERSTRIKE = 15581,
SPELL_GOUGE = 12540,
SPELL_KICK = 15614,
- SPELL_BLIND = 21060,
+ SPELL_BLIND = 21060
};
class boss_thekal : public CreatureScript
@@ -106,12 +106,12 @@ class boss_thekal : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_THEKAL, DONE);
}
diff --git a/src/server/scripts/EasternKingdoms/eversong_woods.cpp b/src/server/scripts/EasternKingdoms/eversong_woods.cpp
index f62273e583d..c5f9522b23d 100644
--- a/src/server/scripts/EasternKingdoms/eversong_woods.cpp
+++ b/src/server/scripts/EasternKingdoms/eversong_woods.cpp
@@ -517,9 +517,12 @@ public:
## npc_infused_crystal
######*/
-#define MOB_ENRAGED_WRAITH 17086
-#define EMOTE -1000283
-#define QUEST_POWERING_OUR_DEFENSES 8490
+enum InfusedCrystal
+{
+ MOB_ENRAGED_WRAITH = 17086,
+ EMOTE = 0,
+ QUEST_POWERING_OUR_DEFENSES = 8490
+};
struct Location
{
@@ -597,7 +600,7 @@ public:
{
if (EndTimer < diff && Progress)
{
- DoScriptText(EMOTE, me);
+ Talk(EMOTE);
Completed = true;
if (PlayerGUID)
if (Player* player = Unit::GetPlayer(*me, PlayerGUID))
diff --git a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp
index c3a725f2f45..5625b6994d7 100644
--- a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp
+++ b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp
@@ -37,11 +37,13 @@ EndContentData */
/*######
## npc_converted_sentry
######*/
+enum ConvertedSentry
+{
+ SAY_CONVERTED = 0,
-#define SAY_CONVERTED_1 -1000188
-#define SAY_CONVERTED_2 -1000189
+ SPELL_CONVERT_CREDIT = 45009
+};
-#define SPELL_CONVERT_CREDIT 45009
class npc_converted_sentry : public CreatureScript
{
@@ -75,11 +77,7 @@ public:
{
if (Timer <= diff)
{
- uint32 i = urand(1, 2);
- if (i == 1)
- DoScriptText(SAY_CONVERTED_1, me);
- else
- DoScriptText(SAY_CONVERTED_2, me);
+ Talk(SAY_CONVERTED);
DoCast(me, SPELL_CONVERT_CREDIT);
if (me->isPet())
diff --git a/src/server/scripts/EasternKingdoms/redridge_mountains.cpp b/src/server/scripts/EasternKingdoms/redridge_mountains.cpp
index f04b0111da7..9fa8ac70eed 100644
--- a/src/server/scripts/EasternKingdoms/redridge_mountains.cpp
+++ b/src/server/scripts/EasternKingdoms/redridge_mountains.cpp
@@ -30,11 +30,11 @@ enum eCorporalKeeshan
{
QUEST_MISSING_IN_ACTION = 219,
- SAY_CORPORAL_1 = -1000464,
- SAY_CORPORAL_2 = -1000465,
- SAY_CORPORAL_3 = -1000466,
- SAY_CORPORAL_4 = -1000467,
- SAY_CORPORAL_5 = -1000468,
+ SAY_CORPORAL_1 = 0,
+ SAY_CORPORAL_2 = 1,
+ SAY_CORPORAL_3 = 2,
+ SAY_CORPORAL_4 = 3,
+ SAY_CORPORAL_5 = 4,
SPELL_MOCKING_BLOW = 21008,
SPELL_SHIELD_BASH = 11972,
@@ -50,7 +50,7 @@ public:
if (quest->GetQuestId() == QUEST_MISSING_IN_ACTION)
{
CAST_AI(npc_corporal_keeshan::npc_corporal_keeshanAI, creature->AI())->Start(true, false, player->GetGUID(), quest);
- DoScriptText(SAY_CORPORAL_1, creature);
+ creature->AI()->Talk(SAY_CORPORAL_1);
}
return false;
@@ -124,23 +124,23 @@ public:
uiPhase = 2;
break;
case 2:
- DoScriptText(SAY_CORPORAL_2, me);
+ Talk(SAY_CORPORAL_2);
uiTimer = 15000;
uiPhase = 3;
break;
case 3:
- DoScriptText(SAY_CORPORAL_3, me);
+ Talk(SAY_CORPORAL_3);
me->SetStandState(UNIT_STAND_STATE_STAND);
SetEscortPaused(false);
uiTimer = 0;
uiPhase = 0;
break;
case 4:
- DoScriptText(SAY_CORPORAL_4, me);
+ Talk(SAY_CORPORAL_4);
uiTimer = 2500;
uiPhase = 5;
case 5:
- DoScriptText(SAY_CORPORAL_5, me);
+ Talk(SAY_CORPORAL_5);
uiTimer = 0;
uiPhase = 0;
}
diff --git a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp
index 905d34221ed..1960d90f28f 100644
--- a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp
+++ b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp
@@ -39,20 +39,19 @@ EndContentData */
enum eErland
{
- SAY_QUESTACCEPT = -1000306,
- SAY_START = -1000307,
- SAY_AGGRO_1 = -1000308,
- SAY_AGGRO_2 = -1000309,
- SAY_LAST = -1000310,
+ SAY_QUESTACCEPT = 0,
+ SAY_START = 1,
+ SAY_AGGRO = 2,
+ SAY_PROGRESS = 3,
+ SAY_LAST = 4,
- SAY_THANKS = -1000311,
- SAY_RANE = -1000312,
- SAY_ANSWER = -1000313,
- SAY_MOVE_QUINN = -1000314,
+ SAY_RANE = 0,
+ SAY_RANE_ANSWER = 5,
+ SAY_MOVE_QUINN = 6,
- SAY_GREETINGS = -1000315,
- SAY_QUINN = -1000316,
- SAY_ON_BYE = -1000317,
+ SAY_QUINN = 7,
+ SAY_QUINN_ANSWER = 0,
+ SAY_BYE = 8,
QUEST_ESCORTING = 435,
NPC_RANE = 1950,
@@ -77,34 +76,34 @@ public:
switch (waypointId)
{
case 1:
- DoScriptText(SAY_START, me, player);
+ Talk(SAY_START, player->GetGUID());
+ break;
+ case 10:
+ Talk(SAY_PROGRESS);
break;
case 13:
- DoScriptText(SAY_LAST, me, player);
+ Talk(SAY_LAST, player->GetGUID());
player->GroupEventHappens(QUEST_ESCORTING, me);
break;
- case 14:
- DoScriptText(SAY_THANKS, me, player);
- break;
case 15:
- if (Unit* Rane = me->FindNearestCreature(NPC_RANE, 20))
- DoScriptText(SAY_RANE, Rane);
+ if (Creature* rane = me->FindNearestCreature(NPC_RANE, 20.0f))
+ rane->AI()->Talk(SAY_RANE);
break;
case 16:
- DoScriptText(SAY_ANSWER, me);
+ Talk(SAY_RANE_ANSWER);
break;
case 17:
- DoScriptText(SAY_MOVE_QUINN, me);
+ Talk(SAY_MOVE_QUINN);
break;
case 24:
- DoScriptText(SAY_GREETINGS, me);
+ Talk(SAY_QUINN);
break;
case 25:
- if (Unit* Quinn = me->FindNearestCreature(NPC_QUINN, 20))
- DoScriptText(SAY_QUINN, Quinn);
+ if (Creature* quinn = me->FindNearestCreature(NPC_QUINN, 20.0f))
+ quinn->AI()->Talk(SAY_QUINN_ANSWER);
break;
case 26:
- DoScriptText(SAY_ON_BYE, me, NULL);
+ Talk(SAY_BYE);
break;
}
}
@@ -113,7 +112,7 @@ public:
void EnterCombat(Unit* who)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2), me, who);
+ Talk(SAY_AGGRO, who->GetGUID());
}
};
@@ -121,7 +120,7 @@ public:
{
if (quest->GetQuestId() == QUEST_ESCORTING)
{
- DoScriptText(SAY_QUESTACCEPT, creature, player);
+ creature->AI()->Talk(SAY_QUESTACCEPT, player->GetGUID());
if (npc_escortAI* pEscortAI = CAST_AI(npc_deathstalker_erland::npc_deathstalker_erlandAI, creature->AI()))
pEscortAI->Start(true, false, player->GetGUID());
diff --git a/src/server/scripts/EasternKingdoms/stormwind_city.cpp b/src/server/scripts/EasternKingdoms/stormwind_city.cpp
index 188b3dcd2b1..47717526aaa 100644
--- a/src/server/scripts/EasternKingdoms/stormwind_city.cpp
+++ b/src/server/scripts/EasternKingdoms/stormwind_city.cpp
@@ -212,7 +212,7 @@ enum eLordGregorLescovar
SAY_LESCOVAR_4 = 2,
SAY_MARZON_1 = 0,
SAY_MARZON_2 = 1,
- SAY_TYRION_2 = 0,
+ SAY_TYRION_2 = 1,
NPC_STORMWIND_ROYAL = 1756,
NPC_MARZON_BLADE = 1755,
@@ -470,8 +470,8 @@ enum eTyrionSpybot
SAY_SPYBOT_3 = 3,
SAY_SPYBOT_4 = 4,
SAY_TYRION_1 = 0,
- SAY_GUARD_1 = 0,
- SAY_LESCOVAR_1 = 0,
+ SAY_GUARD_1 = 1,
+ SAY_LESCOVAR_1 = 3,
NPC_PRIESTESS_TYRIONA = 7779,
NPC_LORD_GREGOR_LESCOVAR = 1754,
diff --git a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp
index 041f5976a6e..22cd971a081 100644
--- a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp
+++ b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp
@@ -37,9 +37,9 @@ EndContentData */
## npc_calvin_montague
######*/
-enum eCalvin
+enum Calvin
{
- SAY_COMPLETE = -1000431,
+ SAY_COMPLETE = 0,
SPELL_DRINK = 2639, // possibly not correct spell (but iconId is correct)
QUEST_590 = 590,
FACTION_HOSTILE = 168
@@ -113,22 +113,22 @@ public:
}
}
- void UpdateAI(const uint32 uiDiff)
+ void UpdateAI(uint32 const diff)
{
if (m_uiPhase)
{
- if (m_uiPhaseTimer <= uiDiff)
+ if (m_uiPhaseTimer <= diff)
m_uiPhaseTimer = 7500;
else
{
- m_uiPhaseTimer -= uiDiff;
+ m_uiPhaseTimer -= diff;
return;
}
switch (m_uiPhase)
{
case 1:
- DoScriptText(SAY_COMPLETE, me);
+ Talk(SAY_COMPLETE);
++m_uiPhase;
break;
case 2:
diff --git a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp
index 1c2f2624b34..79b49b6a438 100644
--- a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp
+++ b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp
@@ -281,13 +281,13 @@ enum eTruuen
QUEST_TOMB_LIGHTBRINGER = 9446,
- SAY_WP_0 = -1800064, //Beware! We are attacked!
- SAY_WP_1 = -1800065, //It must be the purity of the Mark of the Lightbringer that is drawing forth the Scourge to attack us. We must proceed with caution lest we be overwhelmed!
- SAY_WP_2 = -1800066, //This land truly needs to be cleansed by the Light! Let us continue on to the tomb. It isn't far now...
- SAY_WP_3 = -1800067, //Be welcome, friends!
- SAY_WP_4 = -1800068, //Thank you for coming here in remembrance of me. Your efforts in recovering that symbol, while unnecessary, are certainly touching to an old man's heart.
- SAY_WP_5 = -1800069, //Please, rise my friend. Keep the Blessing as a symbol of the strength of the Light and how heroes long gone might once again rise in each of us to inspire.
- SAY_WP_6 = -1800070 //Thank you my friend for making this possible. This is a day that I shall never forget! I think I will stay a while. Please return to High Priestess MacDonnell at the camp. I know that she'll be keenly interested to know of what has transpired here.
+ SAY_WP_0 = 0, //Beware! We are attacked!
+ SAY_WP_1 = 1, //It must be the purity of the Mark of the Lightbringer that is drawing forth the Scourge to attack us. We must proceed with caution lest we be overwhelmed!
+ SAY_WP_2 = 2, //This land truly needs to be cleansed by the Light! Let us continue on to the tomb. It isn't far now...
+ SAY_WP_3 = 0, //Be welcome, friends!
+ SAY_WP_4 = 0, //Thank you for coming here in remembrance of me. Your efforts in recovering that symbol, while unnecessary, are certainly touching to an old man's heart.
+ SAY_WP_5 = 1, //Please, rise my friend. Keep the Blessing as a symbol of the strength of the Light and how heroes long gone might once again rise in each of us to inspire.
+ SAY_WP_6 = 2 //Thank you my friend for making this possible. This is a day that I shall never forget! I think I will stay a while. Please return to High Priestess MacDonnell at the camp. I know that she'll be keenly interested to know of what has transpired here.
};
class npc_anchorite_truuen : public CreatureScript
@@ -339,12 +339,12 @@ public:
switch (waypointId)
{
case 8:
- DoScriptText(SAY_WP_0, me);
+ Talk(SAY_WP_0);
me->SummonCreature(NPC_GHOUL, me->GetPositionX()+7.0f, me->GetPositionY()+7.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000);
me->SummonCreature(NPC_GHOUL, me->GetPositionX()+5.0f, me->GetPositionY()+5.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000);
break;
case 9:
- DoScriptText(SAY_WP_1, me);
+ Talk(SAY_WP_1);
break;
case 14:
me->SummonCreature(NPC_GHOUL, me->GetPositionX()+7.0f, me->GetPositionY()+7.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000);
@@ -353,25 +353,31 @@ public:
me->SummonCreature(NPC_GHOUL, me->GetPositionX()+8.0f, me->GetPositionY()+8.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000);
break;
case 15:
- DoScriptText(SAY_WP_2, me);
+ Talk(SAY_WP_2);
case 21:
Theldanis = GetClosestCreatureWithEntry(me, NPC_THEL_DANIS, 150);
- DoScriptText(SAY_WP_3, Theldanis);
+ if (Theldanis)
+ Theldanis->AI()->Talk(SAY_WP_3);
break;
case 22:
break;
case 23:
Ughost = me->SummonCreature(NPC_GHOST_UTHER, 971.86f, -1825.42f, 81.99f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
- Ughost->SetDisableGravity(true);
- DoScriptText(SAY_WP_4, Ughost, me);
+ if (Ughost)
+ {
+ Ughost->SetDisableGravity(true);
+ Ughost->AI()->Talk(SAY_WP_4, me->GetGUID());
+ }
m_uiChatTimer = 4000;
break;
case 24:
- DoScriptText(SAY_WP_5, Ughost, me);
+ if (Ughost)
+ Ughost->AI()->Talk(SAY_WP_5, me->GetGUID());
m_uiChatTimer = 4000;
break;
case 25:
- DoScriptText(SAY_WP_6, Ughost, me);
+ if (Ughost)
+ Ughost->AI()->Talk(SAY_WP_6, me->GetGUID());
m_uiChatTimer = 4000;
break;
case 26:
diff --git a/src/server/scripts/Events/CMakeLists.txt b/src/server/scripts/Events/CMakeLists.txt
index d8be052d645..00bdaa9cb0c 100644
--- a/src/server/scripts/Events/CMakeLists.txt
+++ b/src/server/scripts/Events/CMakeLists.txt
@@ -11,7 +11,6 @@
set(scripts_STAT_SRCS
${scripts_STAT_SRCS}
Events/childrens_week.cpp
- Events/event.cpp
)
message(" -> Prepared: Events")
diff --git a/src/server/scripts/Events/event.cpp b/src/server/scripts/Events/event.cpp
deleted file mode 100644
index d77ef2b78c1..00000000000
--- a/src/server/scripts/Events/event.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2008-2012 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/>.
- */
-
-void AddSC_event_childrens_week();
-
-void AddSC_event_scripts()
-{
- AddSC_event_childrens_week();
-}
diff --git a/src/server/scripts/Examples/example_creature.cpp b/src/server/scripts/Examples/example_creature.cpp
index 1ef15c0ca61..0baa9814970 100644
--- a/src/server/scripts/Examples/example_creature.cpp
+++ b/src/server/scripts/Examples/example_creature.cpp
@@ -45,17 +45,18 @@ enum Yells
//List of text id's. The text is stored in database, also in a localized version
//(if translation not exist for the textId, default english text will be used)
//Not required to define in this way, but simplify if changes are needed.
- SAY_AGGRO = -1999900,
- SAY_RANDOM_0 = -1999901,
- SAY_RANDOM_1 = -1999902,
- SAY_RANDOM_2 = -1999903,
- SAY_RANDOM_3 = -1999904,
- SAY_RANDOM_4 = -1999905,
- SAY_BERSERK = -1999906,
- SAY_PHASE = -1999907,
- SAY_DANCE = -1999908,
- SAY_SALUTE = -1999909,
- SAY_EVADE = -1999910,
+ //These texts must be added to the creature texts of the npc for which the script is assigned.
+ SAY_AGGRO = 0, // "Let the games begin."
+ SAY_RANDOM = 1, // "I see endless suffering. I see torment. I see rage. I see everything.",
+ // "Muahahahaha",
+ // "These mortal infedels my lord, they have invaded your sanctum and seek to steal your secrets.",
+ // "You are already dead.",
+ // "Where to go? What to do? So many choices that all end in pain, end in death."
+ SAY_BERSERK = 2, // "$N, I sentance you to death!"
+ SAY_PHASE = 3, // "The suffering has just begun!"
+ SAY_DANCE = 4, // "I always thought I was a good dancer."
+ SAY_SALUTE = 5, // "Move out Soldier!"
+ SAY_EVADE = 6 // "Help $N! I'm under attack!"
};
enum Spells
@@ -127,7 +128,7 @@ class example_creature : public CreatureScript
void EnterCombat(Unit* who)
{
//Say some stuff
- DoScriptText(SAY_AGGRO, me, who);
+ Talk(SAY_AGGRO, who->GetGUID());
}
// *** HANDLED FUNCTION ***
@@ -142,7 +143,7 @@ class example_creature : public CreatureScript
// Called when going out of combat. Reset is called just after.
void EnterEvadeMode()
{
- DoScriptText(SAY_EVADE, me);
+ Talk(SAY_EVADE);
}
// *** HANDLED FUNCTION ***
@@ -154,10 +155,10 @@ class example_creature : public CreatureScript
switch (uiTextEmote)
{
case TEXT_EMOTE_DANCE:
- DoScriptText(SAY_DANCE, me);
+ Talk(SAY_DANCE);
break;
case TEXT_EMOTE_SALUTE:
- DoScriptText(SAY_SALUTE, me);
+ Talk(SAY_SALUTE);
break;
}
}
@@ -173,7 +174,7 @@ class example_creature : public CreatureScript
if (m_uiSayTimer <= uiDiff)
{
//Random switch between 5 outcomes
- DoScriptText(RAND(SAY_RANDOM_0, SAY_RANDOM_1, SAY_RANDOM_2, SAY_RANDOM_3, SAY_RANDOM_4), me);
+ Talk(SAY_RANDOM);
m_uiSayTimer = 45000; //Say something agian in 45 seconds
}
@@ -235,7 +236,7 @@ class example_creature : public CreatureScript
if (m_uiBeserkTimer <= uiDiff)
{
//Say our line then cast uber death spell
- DoScriptText(SAY_BERSERK, me, me->getVictim());
+ Talk(SAY_BERSERK, me->getVictim() ? me->getVictim()->GetGUID() : 0);
DoCast(me->getVictim(), SPELL_BERSERK);
//Cast our beserk spell agian in 12 seconds if we didn't kill everyone
@@ -250,7 +251,7 @@ class example_creature : public CreatureScript
{
//Go to next phase
++m_uiPhase;
- DoScriptText(SAY_PHASE, me);
+ Talk(SAY_PHASE);
DoCast(me, SPELL_FRENZY);
}
else
diff --git a/src/server/scripts/Examples/example_escort.cpp b/src/server/scripts/Examples/example_escort.cpp
index 8cf0dad25d2..cd680b31577 100644
--- a/src/server/scripts/Examples/example_escort.cpp
+++ b/src/server/scripts/Examples/example_escort.cpp
@@ -28,6 +28,7 @@ EndScriptData */
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
#include "Player.h"
+#include "CreatureTextMgr.h"
enum eEnums
{
@@ -37,18 +38,18 @@ enum eEnums
SPELL_ELIXIR_OF_FORTITUDE = 3593,
SPELL_BLUE_FIREWORK = 11540,
- SAY_AGGRO1 = -1999910,
- SAY_AGGRO2 = -1999911,
- SAY_WP_1 = -1999912,
- SAY_WP_2 = -1999913,
- SAY_WP_3 = -1999914,
- SAY_WP_4 = -1999915,
- SAY_DEATH_1 = -1999916,
- SAY_DEATH_2 = -1999917,
- SAY_DEATH_3 = -1999918,
- SAY_SPELL = -1999919,
- SAY_RAND_1 = -1999920,
- SAY_RAND_2 = -1999921
+ SAY_AGGRO1 = 0,
+ SAY_AGGRO2 = 1,
+ SAY_WP_1 = 2,
+ SAY_WP_2 = 3,
+ SAY_WP_3 = 4,
+ SAY_WP_4 = 5,
+ SAY_DEATH_1 = 6,
+ SAY_DEATH_2 = 7,
+ SAY_DEATH_3 = 8,
+ SAY_SPELL = 9,
+ SAY_RAND_1 = 10,
+ SAY_RAND_2 = 11
};
#define GOSSIP_ITEM_1 "Click to Test Escort(Attack, Run)"
@@ -83,19 +84,19 @@ class example_escort : public CreatureScript
switch (waypointId)
{
case 1:
- DoScriptText(SAY_WP_1, me);
+ Talk(SAY_WP_1);
break;
case 3:
- DoScriptText(SAY_WP_2, me);
+ Talk(SAY_WP_2);
me->SummonCreature(NPC_FELBOAR, me->GetPositionX()+5.0f, me->GetPositionY()+7.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
break;
case 4:
if (Player* player = GetPlayerForEscort())
{
//pTmpPlayer is the target of the text
- DoScriptText(SAY_WP_3, me, player);
+ Talk(SAY_WP_3, player->GetGUID());
//pTmpPlayer is the source of the text
- DoScriptText(SAY_WP_4, player);
+ sCreatureTextMgr->SendChat(me, SAY_WP_4, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, player);
}
break;
}
@@ -106,10 +107,10 @@ class example_escort : public CreatureScript
if (HasEscortState(STATE_ESCORT_ESCORTING))
{
if (Player* player = GetPlayerForEscort())
- DoScriptText(SAY_AGGRO1, me, player);
+ Talk(SAY_AGGRO1, player->GetGUID());
}
else
- DoScriptText(SAY_AGGRO2, me);
+ Talk(SAY_AGGRO2);
}
void Reset()
@@ -126,13 +127,13 @@ class example_escort : public CreatureScript
{
// not a likely case, code here for the sake of example
if (killer == me)
- DoScriptText(SAY_DEATH_1, me, player);
+ Talk(SAY_DEATH_1, player->GetGUID());
else
- DoScriptText(SAY_DEATH_2, me, player);
+ Talk(SAY_DEATH_2, player->GetGUID());
}
}
else
- DoScriptText(SAY_DEATH_3, me);
+ Talk(SAY_DEATH_3);
}
void UpdateAI(const uint32 uiDiff)
@@ -145,7 +146,7 @@ class example_escort : public CreatureScript
{
if (m_uiDeathCoilTimer <= uiDiff)
{
- DoScriptText(SAY_SPELL, me);
+ Talk(SAY_SPELL);
DoCast(me->getVictim(), SPELL_DEATH_COIL, false);
m_uiDeathCoilTimer = 4000;
}
@@ -161,12 +162,12 @@ class example_escort : public CreatureScript
{
if (me->HasAura(SPELL_ELIXIR_OF_FORTITUDE, 0))
{
- DoScriptText(SAY_RAND_1, me);
+ Talk(SAY_RAND_1);
DoCast(me, SPELL_BLUE_FIREWORK, false);
}
else
{
- DoScriptText(SAY_RAND_2, me);
+ Talk(SAY_RAND_2);
DoCast(me, SPELL_ELIXIR_OF_FORTITUDE, false);
}
diff --git a/src/server/scripts/Examples/example_gossip_codebox.cpp b/src/server/scripts/Examples/example_gossip_codebox.cpp
index 352c43fc1de..b6be4ce3ce1 100644
--- a/src/server/scripts/Examples/example_gossip_codebox.cpp
+++ b/src/server/scripts/Examples/example_gossip_codebox.cpp
@@ -34,9 +34,10 @@ enum eEnums
SPELL_POLYMORPH = 12826,
SPELL_MARK_OF_THE_WILD = 26990,
- SAY_NOT_INTERESTED = -1999922,
- SAY_WRONG = -1999923,
- SAY_CORRECT = -1999924
+ //These texts must be added to the creature texts of the npc for which the script is assigned.
+ SAY_NOT_INTERESTED = 0, // "Normal select, guess you're not interested."
+ SAY_WRONG = 1, // "Wrong!"
+ SAY_CORRECT = 2 // "You're right, you are allowed to see my inner secrets."
};
#define GOSSIP_ITEM_1 "A quiz: what's your name?"
@@ -66,7 +67,8 @@ class example_gossip_codebox : public CreatureScript
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF+2)
{
- DoScriptText(SAY_NOT_INTERESTED, creature);
+ //Read comment in enum
+ creature->AI()->Talk(SAY_NOT_INTERESTED);
player->CLOSE_GOSSIP_MENU();
}
@@ -83,12 +85,14 @@ class example_gossip_codebox : public CreatureScript
case GOSSIP_ACTION_INFO_DEF+1:
if (player->GetName() != code)
{
- DoScriptText(SAY_WRONG, creature);
+ //Read comment in enum
+ creature->AI()->Talk(SAY_WRONG);
creature->CastSpell(player, SPELL_POLYMORPH, true);
}
else
{
- DoScriptText(SAY_CORRECT, creature);
+ //Read comment in enum
+ creature->AI()->Talk(SAY_CORRECT);
creature->CastSpell(player, SPELL_MARK_OF_THE_WILD, true);
}
player->CLOSE_GOSSIP_MENU();
diff --git a/src/server/scripts/Examples/example_misc.cpp b/src/server/scripts/Examples/example_misc.cpp
index 5ff66c4a7ed..68986b44496 100644
--- a/src/server/scripts/Examples/example_misc.cpp
+++ b/src/server/scripts/Examples/example_misc.cpp
@@ -26,11 +26,6 @@ EndScriptData */
#include "ScriptMgr.h"
#include "Player.h"
-enum eSay
-{
- SAY_HI = -1999925
-};
-
class AT_example_areatrigger : public AreaTriggerScript
{
public:
@@ -42,7 +37,7 @@ class AT_example_areatrigger : public AreaTriggerScript
bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/)
{
- DoScriptText(SAY_HI, player);
+ player->Kill(player);
return true;
}
};
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
index 9cc515c1b0d..5c46519ab1c 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
@@ -192,8 +192,8 @@ public:
enum Morridune
{
- SAY_MORRIDUNE_1 = -1048003,
- SAY_MORRIDUNE_2 = -1048004
+ SAY_MORRIDUNE_1 = 0,
+ SAY_MORRIDUNE_2 = 1
};
class npc_morridune : public CreatureScript
@@ -231,7 +231,7 @@ public:
{
npc_morriduneAI(Creature* creature) : npc_escortAI(creature)
{
- DoScriptText(SAY_MORRIDUNE_1, creature);
+ Talk(SAY_MORRIDUNE_1);
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
Start(false, false, 0);
}
@@ -245,7 +245,7 @@ public:
me->SetOrientation(1.775791f);
me->SendMovementFlagUpdate();
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
- DoScriptText(SAY_MORRIDUNE_2, me);
+ Talk(SAY_MORRIDUNE_2);
break;
}
}
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp
index 1c754b78672..0a4779508e9 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp
@@ -21,16 +21,12 @@
enum Spells
{
- SPELL_MIND_BLAST = 15587,
- SPELL_SLEEP = 8399,
-};
+ SPELL_MIND_BLAST = 15587,
+ SPELL_SLEEP = 8399,
-//Id's from ACID
-enum Yells
-{
- SAY_AGGRO = -1048002,
- SAY_SLEEP = -1048001,
- SAY_DEATH = -1048000
+ SAY_AGGRO = 0,
+ SAY_SLEEP = 1,
+ SAY_DEATH = 2
};
class boss_kelris : public CreatureScript
@@ -65,14 +61,14 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(TYPE_KELRIS, IN_PROGRESS);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_KELRIS, DONE);
}
@@ -92,7 +88,7 @@ public:
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
- DoScriptText(SAY_SLEEP, me);
+ Talk(SAY_SLEEP);
DoCast(target, SPELL_SLEEP);
}
sleepTimer = urand(15000, 20000);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
index aa41fa992dc..70c5bc8b986 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
@@ -619,42 +619,6 @@ uint32 hyjalAI::GetInstanceData(uint32 Event)
return 0;
}
-void hyjalAI::Talk(uint32 id)
-{
- std::list<uint8> index;
- for (uint8 i = 0; i < 9; ++i)
- {
- if (Faction == 0) // Alliance
- {
- if (JainaQuotes[i].id == id)
- index.push_back(i);
- }
- else if (Faction == 1) // Horde
- {
- if (ThrallQuotes[i].id == id)
- index.push_back(i);
- }
- }
-
- if (index.empty())
- return; // No quotes found, no use to continue
-
- uint8 ind = *(index.begin()) + rand()%index.size();
-
- int32 YellId = 0;
- if (Faction == 0) // Alliance
- {
- YellId = JainaQuotes[ind].textid;
- }
- else if (Faction == 1) // Horde
- {
- YellId = ThrallQuotes[ind].textid;
- }
-
- if (YellId)
- DoScriptText(YellId, me);
-}
-
void hyjalAI::Retreat()
{
if (instance)
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h
index 68efa94d98b..5fe724c7845 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h
@@ -132,12 +132,6 @@ enum TargetType // Used in the spell
TARGETTYPE_VICTIM = 2,
};
-struct Yells
-{
- uint32 id; // Used to determine the type of yell (attack, rally, etc)
- int32 textid; // The text id to be yelled
-};
-
enum YellId
{
ATTACKED = 0, // Used when attacked and set in combat
@@ -149,32 +143,6 @@ enum YellId
DEATH = 6, // Used on death
};
-const Yells JainaQuotes[]=
-{
- {ATTACKED, -1534000},
- {ATTACKED, -1534001},
- {INCOMING, -1534002},
- {BEGIN, -1534003},
- {RALLY, -1534004},
- {RALLY, -1534005},
- {FAILURE, -1534006},
- {SUCCESS, -1534007},
- {DEATH, -1534008},
-};
-
-const Yells ThrallQuotes[]=
-{
- {ATTACKED, -1534009},
- {ATTACKED, -1534010},
- {INCOMING, -1534011},
- {BEGIN, -1534012},
- {RALLY, -1534013},
- {RALLY, -1534014},
- {FAILURE, -1534015},
- {SUCCESS, -1534016},
- {DEATH, -1534017},
-};
-
struct hyjalAI : public npc_escortAI
{
hyjalAI(Creature* creature);
@@ -215,8 +183,6 @@ struct hyjalAI : public npc_escortAI
uint32 GetInstanceData(uint32 Event); // Gets instance data for this instance, used to check if raid has gotten past a certain point and can access the next phase
- void Talk(uint32 id); // Searches for the appropriate yell and sound and uses it to inform the raid of various things
-
public:
InstanceScript* instance;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp
index 7b468cb7fe5..17cae714b58 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp
@@ -38,15 +38,11 @@ enum Spells
enum Yells
{
- SAY_INTRO = -1595000, //"Prince Arthas Menethil, on this day, a powerful darkness has taken hold of your soul. The death you are destined to visit upon others will this day be your own."
- SAY_AGGRO = -1595001, //"We'll see about that, young prince."
- SAY_TIME_WARP_1 = -1595002, //"Tick tock, tick tock..."
- SAY_TIME_WARP_2 = -1595003, //"Not quick enough!"
- SAY_TIME_WARP_3 = -1595004, //"Let's get this over with. "
- SAY_SLAY_1 = -1595005, //"There is no future for you."
- SAY_SLAY_2 = -1595006, //"This is the hour of our greatest triumph!"
- SAY_SLAY_3 = -1595007, //"You were destined to fail. "
- SAY_DEATH = -1595008 //"*gurgles*"
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ SAY_TIME_WARP = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4
};
class boss_epoch : public CreatureScript
@@ -91,7 +87,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_EPOCH_EVENT, IN_PROGRESS);
@@ -124,7 +120,7 @@ public:
if (uiTimeWarpTimer < diff)
{
- DoScriptText(RAND(SAY_TIME_WARP_1, SAY_TIME_WARP_2, SAY_TIME_WARP_3), me);
+ Talk(SAY_TIME_WARP);
DoCastAOE(SPELL_TIME_WARP);
uiTimeWarpTimer = 25300;
} else uiTimeWarpTimer -= diff;
@@ -134,7 +130,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_EPOCH_EVENT, DONE);
@@ -145,7 +141,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp
index 56d07a49dc4..2e70081fe87 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp
@@ -27,9 +27,9 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1595045,
- SAY_FAIL = -1595046,
- SAY_DEATH = -1595047
+ SAY_AGGRO = 0,
+ SAY_DEATH = 1,
+ SAY_FAIL = 2
};
class boss_infinite_corruptor : public CreatureScript
@@ -59,11 +59,12 @@ public:
void EnterCombat(Unit* /*who*/)
{
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_INFINITE_EVENT, IN_PROGRESS);
}
- void UpdateAI(const uint32 /*diff*/)
+ void UpdateAI(uint32 const /*diff*/)
{
//Return since we have no target
if (!UpdateVictim())
@@ -74,6 +75,7 @@ public:
void JustDied(Unit* /*killer*/)
{
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_INFINITE_EVENT, DONE);
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
index 88b2a766671..b07f4120e97 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
@@ -42,23 +42,15 @@ enum Spells
enum Yells
{
- SAY_INTRO_1 = -1595009,
- SAY_INTRO_2 = -1595010,
- SAY_AGGRO = -1595011,
- SAY_KILL_1 = -1595012,
- SAY_KILL_2 = -1595013,
- SAY_KILL_3 = -1595014,
- SAY_SLAY_1 = -1595015,
- SAY_SLAY_2 = -1595016,
- SAY_SLAY_3 = -1595017,
- SAY_SLAY_4 = -1595018,
- SAY_SLEEP_1 = -1595019,
- SAY_SLEEP_2 = -1595020,
- SAY_30HEALTH = -1595021,
- SAY_15HEALTH = -1595022,
- SAY_ESCAPE_SPEECH_1 = -1595023,
- SAY_ESCAPE_SPEECH_2 = -1595024,
- SAY_OUTRO = -1595025,
+ SAY_AGGRO = 2,
+ SAY_KILL = 3,
+ SAY_SLAY = 4,
+ SAY_SLEEP = 5,
+ SAY_30HEALTH = 6,
+ SAY_15HEALTH = 7,
+ SAY_ESCAPE_SPEECH_1 = 8,
+ SAY_ESCAPE_SPEECH_2 = 9,
+ SAY_OUTRO = 10
};
enum CombatPhases
@@ -116,7 +108,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_MAL_GANIS_EVENT, IN_PROGRESS);
}
@@ -138,13 +130,13 @@ public:
if (!bYelled && HealthBelowPct(30))
{
- DoScriptText(SAY_30HEALTH, me);
+ Talk(SAY_30HEALTH);
bYelled = true;
}
if (!bYelled2 && HealthBelowPct(15))
{
- DoScriptText(SAY_15HEALTH, me);
+ Talk(SAY_15HEALTH);
bYelled2 = true;
}
@@ -187,7 +179,7 @@ public:
if (uiSleepTimer < diff)
{
- DoScriptText(RAND(SAY_SLEEP_1, SAY_SLEEP_2), me);
+ Talk(SAY_SLEEP);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(target, SPELL_SLEEP);
uiSleepTimer = urand(15000, 20000);
@@ -201,7 +193,7 @@ public:
switch (uiOutroStep)
{
case 1:
- DoScriptText(SAY_ESCAPE_SPEECH_1, me);
+ Talk(SAY_ESCAPE_SPEECH_1);
me->GetMotionMaster()->MoveTargetedHome();
++uiOutroStep;
uiOutroTimer = 8000;
@@ -209,12 +201,12 @@ public:
case 2:
me->SetTarget(instance ? instance->GetData64(DATA_ARTHAS) : 0);
me->HandleEmoteCommand(29);
- DoScriptText(SAY_ESCAPE_SPEECH_2, me);
+ Talk(SAY_ESCAPE_SPEECH_2);
++uiOutroStep;
uiOutroTimer = 9000;
break;
case 3:
- DoScriptText(SAY_OUTRO, me);
+ Talk(SAY_OUTRO);
++uiOutroStep;
uiOutroTimer = 16000;
break;
@@ -250,7 +242,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3, SAY_SLAY_4), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp
index 8e80af66379..05d9fe8b5e4 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp
@@ -38,12 +38,10 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1595026,
- SAY_SLAY_1 = -1595027,
- SAY_SLAY_2 = -1595028,
- SAY_SLAY_3 = -1595029,
- SAY_SPAWN = -1595030,
- SAY_DEATH = -1595031
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_SPAWN = 2,
+ SAY_DEATH = 3
};
class boss_meathook : public CreatureScript
@@ -62,7 +60,7 @@ public:
{
instance = creature->GetInstanceScript();
if (instance)
- DoScriptText(SAY_SPAWN, me);
+ Talk(SAY_SPAWN);
}
uint32 uiChainTimer;
@@ -83,7 +81,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_MEATHOOK_EVENT, IN_PROGRESS);
@@ -119,7 +117,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_MEATHOOK_EVENT, DONE);
@@ -130,7 +128,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp
index d23957ddf81..3a490301e47 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp
@@ -40,19 +40,13 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1595032,
- SAY_SPAWN = -1595033,
- SAY_SLAY_1 = -1595034,
- SAY_SLAY_2 = -1595035,
- SAY_SLAY_3 = -1595036,
- SAY_DEATH = -1595037,
- SAY_EXPLODE_GHOUL_1 = -1595038,
- SAY_EXPLODE_GHOUL_2 = -1595039,
- SAY_STEAL_FLESH_1 = -1595040,
- SAY_STEAL_FLESH_2 = -1595041,
- SAY_STEAL_FLESH_3 = -1595042,
- SAY_SUMMON_GHOULS_1 = -1595043,
- SAY_SUMMON_GHOULS_2 = -1595044
+ SAY_AGGRO = 0,
+ SAY_SPAWN = 1,
+ SAY_SLAY = 2,
+ SAY_DEATH = 3,
+ SAY_EXPLODE_GHOUL = 4,
+ SAY_STEAL_FLESH = 5,
+ SAY_SUMMON_GHOULS = 6
};
class boss_salramm : public CreatureScript
@@ -71,7 +65,7 @@ public:
{
instance = creature->GetInstanceScript();
if (instance)
- DoScriptText(SAY_SPAWN, me);
+ Talk(SAY_SPAWN);
}
uint32 uiCurseFleshTimer;
@@ -96,7 +90,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_SALRAMM_EVENT, IN_PROGRESS);
@@ -126,7 +120,7 @@ public:
//Steal Flesh timer
if (uiStealFleshTimer <= diff)
{
- DoScriptText(RAND(SAY_STEAL_FLESH_1, SAY_STEAL_FLESH_2, SAY_STEAL_FLESH_3), me);
+ Talk(SAY_STEAL_FLESH);
if (Unit* random_pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(random_pTarget, SPELL_STEAL_FLESH);
uiStealFleshTimer = 10000;
@@ -135,7 +129,7 @@ public:
//Summon ghouls timer
if (uiSummonGhoulsTimer <= diff)
{
- DoScriptText(RAND(SAY_SUMMON_GHOULS_1, SAY_SUMMON_GHOULS_2), me);
+ Talk(SAY_SUMMON_GHOULS);
if (Unit* random_pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(random_pTarget, SPELL_SUMMON_GHOULS);
uiSummonGhoulsTimer = 10000;
@@ -146,7 +140,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_SALRAMM_EVENT, DONE);
@@ -157,7 +151,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
index 365c5dd7300..4887c8adf62 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
@@ -26,65 +26,84 @@
enum Says
{
- //First Act - Uther and Jaina Dialog
- SAY_PHASE101 = -1595070, //Arthas
- SAY_PHASE102 = -1595071, //Uther
- SAY_PHASE103 = -1595072, //Arthas
- SAY_PHASE104 = -1595073, //Arthas
- SAY_PHASE105 = -1595074, //Uther
- SAY_PHASE106 = -1595075, //Arthas
- SAY_PHASE107 = -1595076, //Uther
- SAY_PHASE108 = -1595077, //Arthas
- SAY_PHASE109 = -1595078, //Arthas
- SAY_PHASE110 = -1595079, //Uther
- SAY_PHASE111 = -1595080, //Arthas
- SAY_PHASE112 = -1595081, //Uther
- SAY_PHASE113 = -1595082, //Jaina
- SAY_PHASE114 = -1595083, //Arthas
- SAY_PHASE115 = -1595084, //Uther
- SAY_PHASE116 = -1595085, //Arthas
- SAY_PHASE117 = -1595086, //Jaina
- SAY_PHASE118 = -1595087, //Arthas
+ //Arthas
+ //First Act
+ SAY_PHASE101 = 0,
+ SAY_PHASE103 = 1,
+ SAY_PHASE104 = 2,
+ SAY_PHASE106 = 3,
+ SAY_PHASE108 = 4,
+ SAY_PHASE110 = 5,
+ SAY_PHASE112 = 6,
+ SAY_PHASE114 = 7,
+ SAY_PHASE116 = 8,
+ SAY_PHASE118 = 9,
+
//Second Act - City Streets
- SAY_PHASE201 = -1595088, //Arthas
- SAY_PHASE202 = -1595089, //Cityman
- SAY_PHASE203 = -1595090, //Arthas
- SAY_PHASE204 = -1595091, //Crazyman
- SAY_PHASE205 = -1595092, //Arthas
- SAY_PHASE206 = -1595009, //Malganis
- SAY_PHASE207 = -1595010, //Malganis
- SAY_PHASE208 = -1595093, //Arthas
- SAY_PHASE209 = -1595094, //Arthas
- SAY_PHASE210 = -1595095, //Arthas
+ SAY_PHASE201 = 10,
+ SAY_PHASE203 = 11,
+ SAY_PHASE205 = 12,
+ SAY_PHASE208 = 13,
+ SAY_PHASE209 = 14,
+ SAY_PHASE210 = 15,
+
//Third Act - Town Hall
- SAY_PHASE301 = -1595096, //Arthas
- SAY_PHASE302 = -1595097, //Drakonian
- SAY_PHASE303 = -1595098, //Arthas
- SAY_PHASE304 = -1595099, //Arthas
- SAY_PHASE305 = -1595100, //Drakonian
- SAY_PHASE306 = -1595101, //Arthas
- SAY_PHASE307 = -1595102, //Arthas
- SAY_PHASE308 = -1595103, //Arthas
- SAY_PHASE309 = -1595104, //Arthas
- SAY_PHASE310 = -1595105, //Arthas
- SAY_PHASE311 = -1595106, //Arthas
- SAY_PHASE312 = -1595107, //Arthas
- SAY_PHASE313 = -1595108, //Arthas
- SAY_PHASE314 = -1595000, //Epoch
- SAY_PHASE315 = -1595109, //Arthas
+ SAY_PHASE301 = 16,
+ SAY_PHASE303 = 17,
+ SAY_PHASE304 = 18,
+ SAY_PHASE306 = 19,
+ SAY_PHASE307 = 20,
+ SAY_PHASE308 = 21,
+ SAY_PHASE309 = 22,
+ SAY_PHASE310 = 23,
+ SAY_PHASE311 = 24,
+ SAY_PHASE312 = 25,
+ SAY_PHASE313 = 26,
+ SAY_PHASE315 = 27,
+
//Fourth Act - Fire Corridor
- SAY_PHASE401 = -1595110, //Arthas
- SAY_PHASE402 = -1595111, //Arthas
- SAY_PHASE403 = -1595112, //Arthas
- SAY_PHASE404 = -1595113, //Arthas
- SAY_PHASE405 = -1595114, //Arthas
- SAY_PHASE406 = -1595115, //Arthas
- SAY_PHASE407 = -1595116, //Arthas
+ SAY_PHASE401 = 28,
+ SAY_PHASE402 = 29,
+ SAY_PHASE403 = 30,
+ SAY_PHASE404 = 31,
+ SAY_PHASE405 = 32,
+ SAY_PHASE406 = 33,
+ SAY_PHASE407 = 34,
+
//Fifth Act - Mal'Ganis Fight
- SAY_PHASE501 = -1595117, //Arthas
- SAY_PHASE502 = -1595118, //Arthas
- SAY_PHASE503 = -1595119, //Arthas
- SAY_PHASE504 = -1595120, //Arthas
+ SAY_PHASE501 = 35,
+ SAY_PHASE502 = 36,
+ SAY_PHASE503 = 37,
+ SAY_PHASE504 = 38,
+
+ //Malganis
+ SAY_PHASE206 = 0,
+ SAY_PHASE207 = 1,
+
+ //Epoch
+ SAY_PHASE314 = 0,
+
+ //Uther
+ SAY_PHASE102 = 0,
+ SAY_PHASE105 = 1,
+ SAY_PHASE107 = 2,
+ SAY_PHASE109 = 3,
+ SAY_PHASE111 = 4,
+ SAY_PHASE115 = 5,
+
+ //Jaina
+ SAY_PHASE113 = 0,
+ SAY_PHASE117 = 1,
+
+ //Cityman
+ SAY_PHASE202 = 0,
+
+ //Crazyman
+ SAY_PHASE204 = 0,
+
+ //Drakonian
+ SAY_PHASE302 = 0,
+ SAY_PHASE305 = 1,
};
enum NPCs
@@ -250,27 +269,27 @@ public:
ai->Start(true, true, player->GetGUID(), 0, false, false);
ai->SetDespawnAtEnd(false);
ai->bStepping = false;
- ai->uiStep = 1;
+ ai->step = 1;
break;
case GOSSIP_ACTION_INFO_DEF+1:
ai->bStepping = true;
- ai->uiStep = 24;
+ ai->step = 24;
break;
case GOSSIP_ACTION_INFO_DEF+2:
ai->SetHoldState(false);
ai->bStepping = false;
- ai->uiStep = 61;
+ ai->step = 61;
break;
case GOSSIP_ACTION_INFO_DEF+3:
ai->SetHoldState(false);
break;
case GOSSIP_ACTION_INFO_DEF+4:
ai->bStepping = true;
- ai->uiStep = 84;
+ ai->step = 84;
break;
case GOSSIP_ACTION_INFO_DEF+5:
ai->bStepping = true;
- ai->uiStep = 85;
+ ai->step = 85;
break;
}
player->CLOSE_GOSSIP_MENU();
@@ -285,7 +304,7 @@ public:
if (ai && ai->bStepping == false)
{
- switch (ai->uiGossipStep)
+ switch (ai->gossipStep)
{
case 0: //This one is a workaround since the very beggining of the script is wrong.
{
@@ -339,46 +358,46 @@ public:
InstanceScript* instance;
bool bStepping;
- uint32 uiStep;
- uint32 uiPhaseTimer;
- uint32 uiGossipStep;
- uint32 uiPlayerFaction;
- uint32 uiBossEvent;
- uint32 uiWave;
-
- uint64 uiUtherGUID;
- uint64 uiJainaGUID;
- uint64 uiCitymenGUID[2];
- uint64 uiWaveGUID[ENCOUNTER_WAVES_MAX_SPAWNS];
- uint64 uiInfiniteDraconianGUID[ENCOUNTER_DRACONIAN_NUMBER];
- uint64 uiStalkerGUID;
-
- uint64 uiBossGUID; //uiMeathookGUID || uiSalrammGUID
- uint64 uiEpochGUID;
- uint64 uiMalganisGUID;
- uint64 uiInfiniteGUID;
-
- uint32 uiExorcismTimer;
+ uint32 step;
+ uint32 phaseTimer;
+ uint32 gossipStep;
+ uint32 playerFaction;
+ uint32 bossEvent;
+ uint32 wave;
+
+ uint64 utherGUID;
+ uint64 jainaGUID;
+ uint64 citymenGUID[2];
+ uint64 waveGUID[ENCOUNTER_WAVES_MAX_SPAWNS];
+ uint64 infiniteDraconianGUID[ENCOUNTER_DRACONIAN_NUMBER];
+ uint64 stalkerGUID;
+
+ uint64 bossGUID;
+ uint64 epochGUID;
+ uint64 malganisGUID;
+ uint64 infiniteGUID;
+
+ uint32 exorcismTimer;
void Reset()
{
- uiUtherGUID = 0;
- uiJainaGUID = 0;
+ utherGUID = 0;
+ jainaGUID = 0;
for (uint8 i = 0; i < 2; ++i)
- uiCitymenGUID[i] = 0;
+ citymenGUID[i] = 0;
for (uint8 i = 0; i < ENCOUNTER_WAVES_MAX_SPAWNS; ++i)
- uiWaveGUID[i] = 0;
+ waveGUID[i] = 0;
for (uint8 i = 0; i < ENCOUNTER_DRACONIAN_NUMBER; ++i)
- uiInfiniteDraconianGUID[i] = 0;
+ infiniteDraconianGUID[i] = 0;
- uiStalkerGUID = 0;
- uiBossGUID = 0;
- uiEpochGUID = 0;
- uiMalganisGUID = 0;
- uiInfiniteGUID = 0;
+ stalkerGUID = 0;
+ bossGUID = 0;
+ epochGUID = 0;
+ malganisGUID = 0;
+ infiniteGUID = 0;
if (instance) {
instance->SetData(DATA_ARTHAS_EVENT, NOT_STARTED);
@@ -386,15 +405,15 @@ public:
{
case NOT_STARTED:
bStepping = true;
- uiStep = 0;
+ step = 0;
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
- uiBossEvent = DATA_MEATHOOK_EVENT;
- uiGossipStep = 0;
+ bossEvent = DATA_MEATHOOK_EVENT;
+ gossipStep = 0;
break;
}
- uiPhaseTimer = 1000;
- uiExorcismTimer = 7300;
- uiWave = 0;
+ phaseTimer = 1000;
+ exorcismTimer = 7300;
+ wave = 0;
}
}
@@ -423,7 +442,7 @@ public:
temp->SetReactState(REACT_PASSIVE);
temp->GetMotionMaster()->MovePoint(0, RiftAndSpawnsLocations[i][1], RiftAndSpawnsLocations[i][2], RiftAndSpawnsLocations[i][3]);
if ((uint32)RiftAndSpawnsLocations[i][0] == NPC_EPOCH)
- uiEpochGUID = temp->GetGUID();
+ epochGUID = temp->GetGUID();
}
}
}
@@ -447,8 +466,8 @@ public:
void JumpToNextStep(uint32 uiTimer)
{
- uiPhaseTimer = uiTimer;
- ++uiStep;
+ phaseTimer = uiTimer;
+ ++step;
}
void WaypointReached(uint32 waypointId)
@@ -470,74 +489,74 @@ public:
bStepping = true;
break;
case 7:
- if (Unit* pCityman0 = me->SummonCreature(NPC_CITY_MAN, 2091.977f, 1275.021f, 140.757f, 0.558f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000))
- uiCitymenGUID[0] = pCityman0->GetGUID();
- if (Unit* pCityman1 = me->SummonCreature(NPC_CITY_MAN2, 2093.514f, 1275.842f, 140.408f, 3.801f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000))
- uiCitymenGUID[1] = pCityman1->GetGUID();
+ if (Unit* cityman0 = me->SummonCreature(NPC_CITY_MAN, 2091.977f, 1275.021f, 140.757f, 0.558f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000))
+ citymenGUID[0] = cityman0->GetGUID();
+ if (Unit* cityman1 = me->SummonCreature(NPC_CITY_MAN2, 2093.514f, 1275.842f, 140.408f, 3.801f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000))
+ citymenGUID[1] = cityman1->GetGUID();
break;
case 8:
- uiGossipStep = 1;
+ gossipStep = 1;
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
SetHoldState(true);
break;
case 12:
SetRun(true);
- DoScriptText(SAY_PHASE210, me);
- if (Unit* pDisguised0 = me->SummonCreature(NPC_CITY_MAN3, 2398.14f, 1207.81f, 134.04f, 5.155249f, TEMPSUMMON_DEAD_DESPAWN, 180000))
+ Talk(SAY_PHASE210);
+ if (Unit* disguised0 = me->SummonCreature(NPC_CITY_MAN3, 2398.14f, 1207.81f, 134.04f, 5.155249f, TEMPSUMMON_DEAD_DESPAWN, 180000))
{
- uiInfiniteDraconianGUID[0] = pDisguised0->GetGUID();
- if (Unit* pDisguised1 = me->SummonCreature(NPC_CITY_MAN4, 2403.22f, 1205.54f, 134.04f, 3.311264f, TEMPSUMMON_DEAD_DESPAWN, 180000))
+ infiniteDraconianGUID[0] = disguised0->GetGUID();
+ if (Unit* disguised1 = me->SummonCreature(NPC_CITY_MAN4, 2403.22f, 1205.54f, 134.04f, 3.311264f, TEMPSUMMON_DEAD_DESPAWN, 180000))
{
- uiInfiniteDraconianGUID[1] = pDisguised1->GetGUID();
+ infiniteDraconianGUID[1] = disguised1->GetGUID();
- if (Unit* pDisguised2 = me->SummonCreature(NPC_CITY_MAN, 2400.82f, 1201.69f, 134.01f, 1.534082f, TEMPSUMMON_DEAD_DESPAWN, 180000))
+ if (Unit* disguised2 = me->SummonCreature(NPC_CITY_MAN, 2400.82f, 1201.69f, 134.01f, 1.534082f, TEMPSUMMON_DEAD_DESPAWN, 180000))
{
- uiInfiniteDraconianGUID[2] = pDisguised2->GetGUID();
- pDisguised0->SetTarget(uiInfiniteDraconianGUID[1]);
- pDisguised1->SetTarget(uiInfiniteDraconianGUID[0]);
- pDisguised2->SetTarget(uiInfiniteDraconianGUID[1]);
+ infiniteDraconianGUID[2] = disguised2->GetGUID();
+ disguised0->SetTarget(infiniteDraconianGUID[1]);
+ disguised1->SetTarget(infiniteDraconianGUID[0]);
+ disguised2->SetTarget(infiniteDraconianGUID[1]);
}
}
}
break;
case 20:
- uiGossipStep = 2;
+ gossipStep = 2;
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
SetRun(false);
SetHoldState(true);
break;
case 21:
- DoScriptText(SAY_PHASE301, me);
+ Talk(SAY_PHASE301);
break;
case 25:
SetRun(false);
- SpawnTimeRift(0, &uiInfiniteDraconianGUID[0]);
- DoScriptText(SAY_PHASE307, me);
+ SpawnTimeRift(0, &infiniteDraconianGUID[0]);
+ Talk(SAY_PHASE307);
break;
case 29:
SetRun(false);
- SpawnTimeRift(5, &uiInfiniteDraconianGUID[0]);
- SpawnTimeRift(8, &uiInfiniteDraconianGUID[2]);
- DoScriptText(SAY_PHASE309, me);
+ SpawnTimeRift(5, &infiniteDraconianGUID[0]);
+ SpawnTimeRift(8, &infiniteDraconianGUID[2]);
+ Talk(SAY_PHASE309);
SetHoldState(true);
bStepping = true;
break;
case 31:
SetRun(false);
- SpawnTimeRift(11, &uiInfiniteDraconianGUID[0]);
- SpawnTimeRift(14, &uiInfiniteDraconianGUID[2]);
- DoScriptText(SAY_PHASE311, me);
+ SpawnTimeRift(11, &infiniteDraconianGUID[0]);
+ SpawnTimeRift(14, &infiniteDraconianGUID[2]);
+ Talk(SAY_PHASE311);
SetHoldState(true);
bStepping = true;
break;
case 32:
- DoScriptText(SAY_PHASE401, me);
+ Talk(SAY_PHASE401);
break;
case 34:
- DoScriptText(SAY_PHASE402, me);
+ Talk(SAY_PHASE402);
break;
case 35:
- DoScriptText(SAY_PHASE403, me);
+ Talk(SAY_PHASE403);
break;
case 36:
if (instance)
@@ -547,23 +566,23 @@ public:
case 45:
SetRun(true);
SetDespawnAtFar(false);
- uiGossipStep = 4;
+ gossipStep = 4;
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
SetHoldState(true);
break;
case 47:
SetRun(false);
- DoScriptText(SAY_PHASE405, me);
+ Talk(SAY_PHASE405);
break;
case 48:
SetRun(true);
- DoScriptText(SAY_PHASE406, me);
+ Talk(SAY_PHASE406);
break;
case 53:
- DoScriptText(SAY_PHASE407, me);
+ Talk(SAY_PHASE407);
break;
case 54:
- uiGossipStep = 5;
+ gossipStep = 5;
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
SetHoldState(true);
break;
@@ -578,18 +597,18 @@ public:
if (bStepping)
{
- if (uiPhaseTimer <= diff)
+ if (phaseTimer <= diff)
{
- switch (uiStep)
+ switch (step)
{
//After reset
case 0:
{
- Unit* pJaina = GetClosestCreatureWithEntry(me, NPC_JAINA, 50.0f);
- if (!pJaina)
- pJaina = me->SummonCreature(NPC_JAINA, 1895.48f, 1292.66f, 143.706f, 0.023475f, TEMPSUMMON_DEAD_DESPAWN, 180000);
- if (pJaina)
- uiJainaGUID = pJaina->GetGUID();
+ Unit* jaina = GetClosestCreatureWithEntry(me, NPC_JAINA, 50.0f);
+ if (!jaina)
+ jaina = me->SummonCreature(NPC_JAINA, 1895.48f, 1292.66f, 143.706f, 0.023475f, TEMPSUMMON_DEAD_DESPAWN, 180000);
+ if (jaina)
+ jainaGUID = jaina->GetGUID();
bStepping = false;
JumpToNextStep(0);
break;
@@ -597,24 +616,24 @@ public:
//After waypoint 0
case 1:
me->SetWalk(false);
- if (Unit* pUther = me->SummonCreature(NPC_UTHER, 1794.357f, 1272.183f, 140.558f, 1.37f, TEMPSUMMON_DEAD_DESPAWN, 180000))
+ if (Unit* uther = me->SummonCreature(NPC_UTHER, 1794.357f, 1272.183f, 140.558f, 1.37f, TEMPSUMMON_DEAD_DESPAWN, 180000))
{
- uiUtherGUID = pUther->GetGUID();
- pUther->SetWalk(false);
- pUther->GetMotionMaster()->MovePoint(0, 1897.018f, 1287.487f, 143.481f);
- pUther->SetTarget(me->GetGUID());
- me->SetTarget(uiUtherGUID);
+ utherGUID = uther->GetGUID();
+ uther->SetWalk(false);
+ uther->GetMotionMaster()->MovePoint(0, 1897.018f, 1287.487f, 143.481f);
+ uther->SetTarget(me->GetGUID());
+ me->SetTarget(utherGUID);
}
JumpToNextStep(17000);
break;
case 2:
- DoScriptText(SAY_PHASE101, me);
+ Talk(SAY_PHASE101);
JumpToNextStep(2000);
break;
case 3:
- if (Creature* pUther = Unit::GetCreature(*me, uiUtherGUID))
+ if (Creature* uther = Unit::GetCreature(*me, utherGUID))
{
- DoScriptText(SAY_PHASE102, pUther);
+ uther->AI()->Talk(SAY_PHASE102);
}
JumpToNextStep(8000);
break;
@@ -622,90 +641,90 @@ public:
SetEscortPaused(false);
bStepping = false;
SetRun(false);
- DoScriptText(SAY_PHASE103, me);
+ Talk(SAY_PHASE103);
JumpToNextStep(0);
break;
//After waypoint 1
case 5:
- if (Creature* pJaina = Unit::GetCreature(*me, uiJainaGUID))
- pJaina->SetTarget(me->GetGUID());
- DoScriptText(SAY_PHASE104, me);
+ if (Creature* jaina = Unit::GetCreature(*me, jainaGUID))
+ jaina->SetTarget(me->GetGUID());
+ Talk(SAY_PHASE104);
JumpToNextStep(10000);
break;
case 6:
- if (Creature* pUther = Unit::GetCreature(*me, uiUtherGUID))
- DoScriptText(SAY_PHASE105, pUther);
+ if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_PHASE105);
JumpToNextStep(1000);
break;
case 7:
- DoScriptText(SAY_PHASE106, me);
+ Talk(SAY_PHASE106);
JumpToNextStep(4000);
break;
case 8:
- if (Creature* pUther = Unit::GetCreature(*me, uiUtherGUID))
- DoScriptText(SAY_PHASE107, pUther);
+ if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_PHASE107);
JumpToNextStep(6000);
break;
case 9:
- DoScriptText(SAY_PHASE108, me);
+ Talk(SAY_PHASE108);
JumpToNextStep(4000);
break;
case 10:
- if (Creature* pUther = Unit::GetCreature(*me, uiUtherGUID))
- DoScriptText(SAY_PHASE109, pUther);
+ if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_PHASE109);
JumpToNextStep(8000);
break;
case 11:
- DoScriptText(SAY_PHASE110, me);
+ Talk(SAY_PHASE110);
JumpToNextStep(4000);
break;
case 12:
- if (Creature* pUther = Unit::GetCreature(*me, uiUtherGUID))
- DoScriptText(SAY_PHASE111, pUther);
+ if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_PHASE111);
JumpToNextStep(4000);
break;
case 13:
- DoScriptText(SAY_PHASE112, me);
+ Talk(SAY_PHASE112);
JumpToNextStep(11000);
break;
case 14:
- if (Creature* pJaina = Unit::GetCreature(*me, uiJainaGUID))
- DoScriptText(SAY_PHASE113, pJaina);
+ if (Creature* jaina = Unit::GetCreature(*me, jainaGUID))
+ jaina->AI()->Talk(SAY_PHASE113);
JumpToNextStep(3000);
break;
case 15:
- DoScriptText(SAY_PHASE114, me);
+ Talk(SAY_PHASE114);
JumpToNextStep(9000);
break;
case 16:
- if (Creature* pUther = Unit::GetCreature(*me, uiUtherGUID))
- DoScriptText(SAY_PHASE115, pUther);
+ if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_PHASE115);
JumpToNextStep(4000);
break;
case 17:
- if (Creature* pUther = Unit::GetCreature(*me, uiUtherGUID))
+ if (Creature* uther = Unit::GetCreature(*me, utherGUID))
{
- pUther->SetWalk(true);
- pUther->GetMotionMaster()->MovePoint(0, 1794.357f, 1272.183f, 140.558f);
+ uther->SetWalk(true);
+ uther->GetMotionMaster()->MovePoint(0, 1794.357f, 1272.183f, 140.558f);
}
JumpToNextStep(1000);
break;
case 18:
- if (Creature* pJaina = Unit::GetCreature(*me, uiJainaGUID))
+ if (Creature* jaina = Unit::GetCreature(*me, jainaGUID))
{
- me->SetTarget(uiJainaGUID);
- pJaina->SetWalk(true);
- pJaina->GetMotionMaster()->MovePoint(0, 1794.357f, 1272.183f, 140.558f);
+ me->SetTarget(jainaGUID);
+ jaina->SetWalk(true);
+ jaina->GetMotionMaster()->MovePoint(0, 1794.357f, 1272.183f, 140.558f);
}
JumpToNextStep(1000);
break;
case 19:
- DoScriptText(SAY_PHASE116, me);
+ Talk(SAY_PHASE116);
JumpToNextStep(1000);
break;
case 20:
- if (Creature* pJaina = Unit::GetCreature(*me, uiJainaGUID))
- DoScriptText(SAY_PHASE117, pJaina);
+ if (Creature* jaina = Unit::GetCreature(*me, jainaGUID))
+ jaina->AI()->Talk(SAY_PHASE117);
JumpToNextStep(3000);
break;
case 21:
@@ -716,8 +735,8 @@ public:
break;
//After waypoint 3
case 22:
- DoScriptText(SAY_PHASE118, me);
- me->SetTarget(uiJainaGUID);
+ Talk(SAY_PHASE118);
+ me->SetTarget(jainaGUID);
JumpToNextStep(10000);
break;
case 23:
@@ -725,11 +744,11 @@ public:
bStepping = false;
SetRun(true);
- if (Creature* pJaina = Unit::GetCreature(*me, uiJainaGUID))
- pJaina->DisappearAndDie();
+ if (Creature* jaina = Unit::GetCreature(*me, jainaGUID))
+ jaina->DisappearAndDie();
- if (Creature* pUther = Unit::GetCreature(*me, uiUtherGUID))
- pUther->DisappearAndDie();
+ if (Creature* uther = Unit::GetCreature(*me, utherGUID))
+ uther->DisappearAndDie();
me->SetTarget(0);
JumpToNextStep(0);
@@ -738,13 +757,13 @@ public:
case 24:
if (Unit* pStalker = me->SummonCreature(NPC_INVIS_TARGET, 2026.469f, 1287.088f, 143.596f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 14000))
{
- uiStalkerGUID = pStalker->GetGUID();
- me->SetTarget(uiStalkerGUID);
+ stalkerGUID = pStalker->GetGUID();
+ me->SetTarget(stalkerGUID);
}
JumpToNextStep(1000);
break;
case 25:
- DoScriptText(SAY_PHASE201, me);
+ Talk(SAY_PHASE201);
JumpToNextStep(12000);
break;
case 26:
@@ -756,24 +775,24 @@ public:
break;
//After waypoint 9
case 27:
- me->SetTarget(uiCitymenGUID[0]);
- if (Creature* pCityman = Unit::GetCreature(*me, uiCitymenGUID[0]))
+ me->SetTarget(citymenGUID[0]);
+ if (Creature* cityman = Unit::GetCreature(*me, citymenGUID[0]))
{
- pCityman->SetTarget(me->GetGUID());
- pCityman->SetWalk(true);
- pCityman->GetMotionMaster()->MovePoint(0, 2088.625f, 1279.191f, 140.743f);
+ cityman->SetTarget(me->GetGUID());
+ cityman->SetWalk(true);
+ cityman->GetMotionMaster()->MovePoint(0, 2088.625f, 1279.191f, 140.743f);
}
JumpToNextStep(2000);
break;
case 28:
- if (Creature* pCityman = Unit::GetCreature(*me, uiCitymenGUID[0]))
- DoScriptText(SAY_PHASE202, pCityman);
+ if (Creature* cityman = Unit::GetCreature(*me, citymenGUID[0]))
+ cityman->AI()->Talk(SAY_PHASE202);
JumpToNextStep(4000);
break;
case 29:
SetEscortPaused(false);
bStepping = false;
- DoScriptText(SAY_PHASE203, me);
+ Talk(SAY_PHASE203);
JumpToNextStep(0);
break;
//After waypoint 10
@@ -784,13 +803,13 @@ public:
case 31:
SetEscortPaused(false);
bStepping = false;
- if (Creature* pCityman1 = Unit::GetCreature(*me, uiCitymenGUID[1]))
+ if (Creature* cityman1 = Unit::GetCreature(*me, citymenGUID[1]))
{
- DoScriptText(SAY_PHASE204, pCityman1);
- pCityman1->SetTarget(me->GetGUID());
- if (Creature* pCityman0 = Unit::GetCreature(*me, uiCitymenGUID[0]))
- pCityman0->Kill(pCityman0);
- me->SetTarget(uiCitymenGUID[1]);
+ cityman1->AI()->Talk(SAY_PHASE204);
+ cityman1->SetTarget(me->GetGUID());
+ if (Creature* cityman0 = Unit::GetCreature(*me, citymenGUID[0]))
+ cityman0->Kill(cityman0);
+ me->SetTarget(citymenGUID[1]);
}
JumpToNextStep(0);
break;
@@ -800,75 +819,75 @@ public:
JumpToNextStep(1000);
break;
case 33:
- if (Creature* pCityman1 = Unit::GetCreature(*me, uiCitymenGUID[1]))
- pCityman1->Kill(pCityman1);
+ if (Creature* cityman1 = Unit::GetCreature(*me, citymenGUID[1]))
+ cityman1->Kill(cityman1);
JumpToNextStep(1000);
break;
case 34:
if (Unit* pStalker = me->SummonCreature(NPC_INVIS_TARGET, 2081.447f, 1287.770f, 141.3241f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 10000))
{
- uiStalkerGUID = pStalker->GetGUID();
- me->SetTarget(uiStalkerGUID);
+ stalkerGUID = pStalker->GetGUID();
+ me->SetTarget(stalkerGUID);
}
- DoScriptText(SAY_PHASE205, me);
+ Talk(SAY_PHASE205);
JumpToNextStep(3000);
break;
case 35:
if (Unit* pStalkerM = me->SummonCreature(NPC_INVIS_TARGET, 2117.349f, 1288.624f, 136.271f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 60000))
{
- uiStalkerGUID = pStalkerM->GetGUID();
- me->SetTarget(uiStalkerGUID);
+ stalkerGUID = pStalkerM->GetGUID();
+ me->SetTarget(stalkerGUID);
}
JumpToNextStep(1000);
break;
case 36:
- if (Creature* pMalganis = me->SummonCreature(NPC_MAL_GANIS, 2117.349f, 1288.624f, 136.271f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 60000))
+ if (Creature* malganis = me->SummonCreature(NPC_MAL_GANIS, 2117.349f, 1288.624f, 136.271f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 60000))
{
- if (Creature* pStalkerM = Unit::GetCreature(*me, uiStalkerGUID))
- pMalganis->CastSpell(pStalkerM, 63793, false);
+ if (Creature* pStalkerM = Unit::GetCreature(*me, stalkerGUID))
+ malganis->CastSpell(pStalkerM, 63793, false);
- uiMalganisGUID = pMalganis->GetGUID();
- DoScriptText(SAY_PHASE206, pMalganis);
- pMalganis->SetTarget(me->GetGUID());
- pMalganis->SetReactState(REACT_PASSIVE);
+ malganisGUID = malganis->GetGUID();
+ malganis->AI()->Talk(SAY_PHASE206);
+ malganis->SetTarget(me->GetGUID());
+ malganis->SetReactState(REACT_PASSIVE);
}
JumpToNextStep(11000);
break;
case 37:
- if (Creature* pMalganis = Unit::GetCreature(*me, uiMalganisGUID))
+ if (Creature* malganis = Unit::GetCreature(*me, malganisGUID))
{
- Creature* pZombie = GetClosestCreatureWithEntry(pMalganis, NPC_CITY_MAN, 100.0f);
+ Creature* pZombie = GetClosestCreatureWithEntry(malganis, NPC_CITY_MAN, 100.0f);
if (!pZombie)
- pZombie = GetClosestCreatureWithEntry(pMalganis, NPC_CITY_MAN2, 100.0f);
+ pZombie = GetClosestCreatureWithEntry(malganis, NPC_CITY_MAN2, 100.0f);
if (pZombie)
pZombie->UpdateEntry(NPC_ZOMBIE, 0);
else //There's no one else to transform
- uiStep++;
+ step++;
}
else
- uiStep++;
- uiPhaseTimer = 500;
+ step++;
+ phaseTimer = 500;
break;
case 38:
- if (Creature* pMalganis = Unit::GetCreature(*me, uiMalganisGUID))
- DoScriptText(SAY_PHASE207, pMalganis);
+ if (Creature* malganis = Unit::GetCreature(*me, malganisGUID))
+ malganis->AI()->Talk(SAY_PHASE207);
JumpToNextStep(17000);
break;
case 39:
- if (Creature* pMalganis = Unit::GetCreature(*me, uiMalganisGUID))
- pMalganis->SetVisible(false);
- DoScriptText(SAY_PHASE208, me);
+ if (Creature* malganis = Unit::GetCreature(*me, malganisGUID))
+ malganis->SetVisible(false);
+ Talk(SAY_PHASE208);
JumpToNextStep(7000);
break;
case 40:
if (Unit* pStalker = me->SummonCreature(NPC_INVIS_TARGET, 2081.447f, 1287.770f, 141.3241f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 10000))
{
- uiStalkerGUID = pStalker->GetGUID();
- me->SetTarget(uiStalkerGUID);
+ stalkerGUID = pStalker->GetGUID();
+ me->SetTarget(stalkerGUID);
}
- DoScriptText(SAY_PHASE209, me);
+ Talk(SAY_PHASE209);
- uiBossEvent = DATA_MEATHOOK_EVENT;
+ bossEvent = DATA_MEATHOOK_EVENT;
if (instance)
instance->SetData(DATA_ARTHAS_EVENT, IN_PROGRESS);
@@ -884,10 +903,10 @@ public:
case 53:
case 55:
case 57:
- if (instance->GetData(uiBossEvent) != DONE)
+ if (instance->GetData(bossEvent) != DONE)
{
- SpawnWaveGroup(uiWave, uiWaveGUID);
- uiWave++;
+ SpawnWaveGroup(wave, waveGUID);
+ wave++;
}
JumpToNextStep(500);
break;
@@ -899,16 +918,16 @@ public:
case 54:
case 56:
case 58:
- if (instance->GetData(uiBossEvent) != DONE)
+ if (instance->GetData(bossEvent) != DONE)
{
uint32 mobCounter = 0;
uint32 deadCounter = 0;
for (uint8 i = 0; i < ENCOUNTER_WAVES_MAX_SPAWNS; ++i)
{
- if (uiWaveGUID[i] == 0)
+ if (waveGUID[i] == 0)
break;
++mobCounter;
- Unit* temp = Unit::GetCreature(*me, uiWaveGUID[i]);
+ Unit* temp = Unit::GetCreature(*me, waveGUID[i]);
if (!temp || temp->isDead())
++deadCounter;
}
@@ -916,24 +935,24 @@ public:
if (mobCounter <= deadCounter) //If group is dead
JumpToNextStep(1000);
else
- uiPhaseTimer = 1000;
+ phaseTimer = 1000;
}
else
JumpToNextStep(500);
break;
case 49: //Summon Boss
case 59:
- if (instance->GetData(uiBossEvent) != DONE)
+ if (instance->GetData(bossEvent) != DONE)
{
uint32 uiBossID = 0;
- if (uiBossEvent == DATA_MEATHOOK_EVENT)
+ if (bossEvent == DATA_MEATHOOK_EVENT)
uiBossID = NPC_MEATHOOK;
- else if (uiBossEvent == DATA_SALRAMM_EVENT)
+ else if (bossEvent == DATA_SALRAMM_EVENT)
uiBossID = NPC_SALRAMM;
if (Unit* pBoss = me->SummonCreature(uiBossID, 2232.19f, 1331.933f, 126.662f, 3.15f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900000))
{
- uiBossGUID = pBoss->GetGUID();
+ bossGUID = pBoss->GetGUID();
pBoss->SetWalk(true);
pBoss->GetMotionMaster()->MovePoint(0, 2194.110f, 1332.00f, 130.00f);
}
@@ -944,42 +963,42 @@ public:
case 60:
if (instance)
{
- if (instance->GetData(uiBossEvent) == DONE)
+ if (instance->GetData(bossEvent) == DONE)
{
JumpToNextStep(1000);
- if (uiBossEvent == DATA_MEATHOOK_EVENT)
- uiBossEvent = DATA_SALRAMM_EVENT;
- else if (uiBossEvent == DATA_SALRAMM_EVENT)
+ if (bossEvent == DATA_MEATHOOK_EVENT)
+ bossEvent = DATA_SALRAMM_EVENT;
+ else if (bossEvent == DATA_SALRAMM_EVENT)
{
SetHoldState(false);
bStepping = false;
- uiBossEvent = DATA_EPOCH_EVENT;
+ bossEvent = DATA_EPOCH_EVENT;
}
}
- else if (instance->GetData(uiBossEvent) == FAIL)
+ else if (instance->GetData(bossEvent) == FAIL)
npc_escortAI::EnterEvadeMode();
else
- uiPhaseTimer = 10000;
+ phaseTimer = 10000;
}
break;
//After Gossip 2 (waypoint 22)
case 61:
me->SetReactState(REACT_AGGRESSIVE);
- if (Creature* pDisguised0 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[0]))
- pDisguised0->SetTarget(me->GetGUID());
- if (Creature* pDisguised1 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[1]))
- pDisguised1->SetTarget(me->GetGUID());
- if (Creature* pDisguised2 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[2]))
- pDisguised2->SetTarget(me->GetGUID());
+ if (Creature* disguised0 = Unit::GetCreature(*me, infiniteDraconianGUID[0]))
+ disguised0->SetTarget(me->GetGUID());
+ if (Creature* disguised1 = Unit::GetCreature(*me, infiniteDraconianGUID[1]))
+ disguised1->SetTarget(me->GetGUID());
+ if (Creature* disguised2 = Unit::GetCreature(*me, infiniteDraconianGUID[2]))
+ disguised2->SetTarget(me->GetGUID());
JumpToNextStep(1000);
break;
case 62:
- if (Creature* pDisguised0 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[0]))
- DoScriptText(SAY_PHASE302, pDisguised0);
+ if (Creature* disguised0 = Unit::GetCreature(*me, infiniteDraconianGUID[0]))
+ disguised0->AI()->Talk(SAY_PHASE302);
JumpToNextStep(7000);
break;
case 63:
- DoScriptText(SAY_PHASE303, me);
+ Talk(SAY_PHASE303);
SetHoldState(false);
bStepping = false;
JumpToNextStep(0);
@@ -990,46 +1009,46 @@ public:
JumpToNextStep(1000);
break;
case 65:
- if (Creature* pDisguised0 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[0]))
- pDisguised0->HandleEmoteCommand(11);
+ if (Creature* disguised0 = Unit::GetCreature(*me, infiniteDraconianGUID[0]))
+ disguised0->HandleEmoteCommand(11);
JumpToNextStep(1000);
break;
case 66:
- DoScriptText(SAY_PHASE304, me);
+ Talk(SAY_PHASE304);
JumpToNextStep(2000);
break;
case 67:
- if (Creature* pDisguised0 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[0]))
- DoScriptText(SAY_PHASE305, pDisguised0);
+ if (Creature* disguised0 = Unit::GetCreature(*me, infiniteDraconianGUID[0]))
+ disguised0->AI()->Talk(SAY_PHASE305);
JumpToNextStep(1000);
break;
case 68:
- if (Creature* pDisguised2 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[2]))
+ if (Creature* disguised2 = Unit::GetCreature(*me, infiniteDraconianGUID[2]))
{
- pDisguised2->UpdateEntry(NPC_INFINITE_HUNTER, 0);
+ disguised2->UpdateEntry(NPC_INFINITE_HUNTER, 0);
//Make them unattackable
- pDisguised2->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
- pDisguised2->SetReactState(REACT_PASSIVE);
+ disguised2->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
+ disguised2->SetReactState(REACT_PASSIVE);
}
JumpToNextStep(2000);
break;
case 69:
- if (Creature* pDisguised1 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[1]))
+ if (Creature* disguised1 = Unit::GetCreature(*me, infiniteDraconianGUID[1]))
{
- pDisguised1->UpdateEntry(NPC_INFINITE_AGENT, 0);
+ disguised1->UpdateEntry(NPC_INFINITE_AGENT, 0);
//Make them unattackable
- pDisguised1->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
- pDisguised1->SetReactState(REACT_PASSIVE);
+ disguised1->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
+ disguised1->SetReactState(REACT_PASSIVE);
}
JumpToNextStep(2000);
break;
case 70:
- if (Creature* pDisguised0 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[0]))
+ if (Creature* disguised0 = Unit::GetCreature(*me, infiniteDraconianGUID[0]))
{
- pDisguised0->UpdateEntry(NPC_INFINITE_ADVERSARY, 0);
+ disguised0->UpdateEntry(NPC_INFINITE_ADVERSARY, 0);
//Make them unattackable
- pDisguised0->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
- pDisguised0->SetReactState(REACT_PASSIVE);
+ disguised0->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
+ disguised0->SetReactState(REACT_PASSIVE);
}
JumpToNextStep(2000);
break;
@@ -1040,7 +1059,7 @@ public:
case 77:
//Make cratures attackable
for (uint32 i = 0; i< ENCOUNTER_DRACONIAN_NUMBER; ++i)
- if (Creature* temp = Unit::GetCreature(*me, uiInfiniteDraconianGUID[i]))
+ if (Creature* temp = Unit::GetCreature(*me, infiniteDraconianGUID[i]))
{
temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
temp->SetReactState(REACT_AGGRESSIVE);
@@ -1051,12 +1070,12 @@ public:
case 74:
case 76:
if (me->isInCombat())
- uiPhaseTimer = 1000;
+ phaseTimer = 1000;
else
{
- if (uiStep == 72) DoScriptText(SAY_PHASE308, me);
- if (uiStep == 74) DoScriptText(SAY_PHASE308, me);
- if (uiStep == 76) DoScriptText(SAY_PHASE310, me);
+ if (step == 72) Talk(SAY_PHASE308);
+ if (step == 74) Talk(SAY_PHASE308);
+ if (step == 76) Talk(SAY_PHASE310);
SetHoldState(false);
bStepping = false;
SetRun(true);
@@ -1065,44 +1084,44 @@ public:
break;
case 78:
if (me->isInCombat())
- uiPhaseTimer = 1000;
+ phaseTimer = 1000;
else
{
- DoScriptText(SAY_PHASE312, me);
+ Talk(SAY_PHASE312);
JumpToNextStep(5000);
}
break;
case 79:
- DoScriptText(SAY_PHASE313, me);
+ Talk(SAY_PHASE313);
JumpToNextStep(1000);
break;
case 80:
if (instance)
if (instance->GetData(DATA_EPOCH_EVENT) != DONE)
{
- SpawnTimeRift(17, &uiEpochGUID);
- if (Creature* pEpoch = Unit::GetCreature(*me, uiEpochGUID))
- DoScriptText(SAY_PHASE314, pEpoch);
- me->SetTarget(uiEpochGUID);
+ SpawnTimeRift(17, &epochGUID);
+ if (Creature* epoch = Unit::GetCreature(*me, epochGUID))
+ epoch->AI()->Talk(SAY_PHASE314);
+ me->SetTarget(epochGUID);
}
JumpToNextStep(18000);
break;
case 81:
if (instance)
if (instance->GetData(DATA_EPOCH_EVENT) != DONE)
- DoScriptText(SAY_PHASE315, me);
+ Talk(SAY_PHASE315);
JumpToNextStep(6000);
break;
case 82:
if (instance)
if (instance->GetData(DATA_EPOCH_EVENT) != DONE)
{
- if (Creature* pEpoch = Unit::GetCreature(*me, uiEpochGUID))
+ if (Creature* epoch = Unit::GetCreature(*me, epochGUID))
{
//Make Epoch attackable
- pEpoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
- pEpoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- pEpoch->SetReactState(REACT_AGGRESSIVE);
+ epoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
+ epoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ epoch->SetReactState(REACT_AGGRESSIVE);
}
}
@@ -1113,31 +1132,31 @@ public:
{
if (instance->GetData(DATA_EPOCH_EVENT) == DONE)
{
- uiGossipStep = 3;
+ gossipStep = 3;
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
bStepping = false;
- uiBossEvent = DATA_MAL_GANIS_EVENT;
+ bossEvent = DATA_MAL_GANIS_EVENT;
JumpToNextStep(15000);
}
else if (instance->GetData(DATA_EPOCH_EVENT) == FAIL)
npc_escortAI::EnterEvadeMode();
else
- uiPhaseTimer = 10000;
+ phaseTimer = 10000;
}
break;
//After Gossip 4
case 84:
- DoScriptText(SAY_PHASE404, me);
+ Talk(SAY_PHASE404);
SetHoldState(false);
bStepping = false;
break;
//After Gossip 5
case 85:
- DoScriptText(SAY_PHASE501, me);
- if (Creature* pMalganis = me->SummonCreature(NPC_MAL_GANIS, 2296.665f, 1502.362f, 128.362f, 4.961f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900000))
+ Talk(SAY_PHASE501);
+ if (Creature* malganis = me->SummonCreature(NPC_MAL_GANIS, 2296.665f, 1502.362f, 128.362f, 4.961f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900000))
{
- uiMalganisGUID = pMalganis->GetGUID();
- pMalganis->SetReactState(REACT_PASSIVE);
+ malganisGUID = malganis->GetGUID();
+ malganis->SetReactState(REACT_PASSIVE);
}
if (instance)
if (GameObject* pGate = instance->instance->GetGameObject(instance->GetData64(DATA_MAL_GANIS_GATE_1)))
@@ -1148,15 +1167,15 @@ public:
break;
//After waypoint 55
case 86:
- DoScriptText(SAY_PHASE502, me);
+ Talk(SAY_PHASE502);
JumpToNextStep(6000);
- me->SetTarget(uiMalganisGUID);
+ me->SetTarget(malganisGUID);
break;
case 87:
- if (Creature* pMalganis = Unit::GetCreature(*me, uiMalganisGUID))
+ if (Creature* malganis = Unit::GetCreature(*me, malganisGUID))
{
- pMalganis->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_UNK_6 | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_UNK_15);
- pMalganis->SetReactState(REACT_AGGRESSIVE);
+ malganis->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_UNK_6 | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_UNK_15);
+ malganis->SetReactState(REACT_AGGRESSIVE);
}
JumpToNextStep(1000);
break;
@@ -1171,14 +1190,14 @@ public:
else if (instance->GetData(DATA_MAL_GANIS_EVENT) == FAIL)
npc_escortAI::EnterEvadeMode();
else
- uiPhaseTimer = 10000;
+ phaseTimer = 10000;
}
break;
//After waypoint 56
case 89:
SetRun(true);
- me->SetTarget(uiMalganisGUID);
- DoScriptText(SAY_PHASE503, me);
+ me->SetTarget(malganisGUID);
+ Talk(SAY_PHASE503);
JumpToNextStep(7000);
break;
case 90:
@@ -1187,23 +1206,23 @@ public:
instance->SetData(DATA_ARTHAS_EVENT, DONE); //Rewards: Achiev & Chest ;D
me->SetTarget(instance->GetData64(DATA_MAL_GANIS_GATE_2)); //Look behind
}
- DoScriptText(SAY_PHASE504, me);
+ Talk(SAY_PHASE504);
bStepping = false;
break;
}
- } else uiPhaseTimer -= diff;
+ } else phaseTimer -= diff;
}
//Battling skills
if (!me->getVictim())
return;
- if (uiExorcismTimer < diff)
+ if (exorcismTimer < diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_EXORCISM_N);
- uiExorcismTimer = 7300;
- } else uiExorcismTimer -= diff;
+ exorcismTimer = 7300;
+ } else exorcismTimer -= diff;
if (HealthBelowPct(40))
DoCast(me, SPELL_HOLY_LIGHT);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp
index 161ea4ba8b7..bcf48ccd7be 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp
@@ -29,13 +29,12 @@ EndScriptData */
enum eEnums
{
- SAY_ENTER = -1269012,
- SAY_AGGRO = -1269013,
- SAY_BANISH = -1269014,
- SAY_SLAY1 = -1269015,
- SAY_SLAY2 = -1269016,
- SAY_DEATH = -1269017,
- EMOTE_FRENZY = -1269018,
+ SAY_ENTER = 0,
+ SAY_AGGRO = 1,
+ SAY_BANISH = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
+ EMOTE_FRENZY = 5,
SPELL_CLEAVE = 40504,
SPELL_TIME_STOP = 31422,
@@ -76,7 +75,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void MoveInLineOfSight(Unit* who)
@@ -86,7 +85,7 @@ public:
{
if (me->IsWithinDistInMap(who, 20.0f))
{
- DoScriptText(SAY_BANISH, me);
+ Talk(SAY_BANISH);
me->DealDamage(who, who->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
}
}
@@ -96,7 +95,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
{
@@ -107,7 +106,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -133,7 +132,7 @@ public:
//Frenzy
if (Frenzy_Timer <= diff)
{
- DoScriptText(EMOTE_FRENZY, me);
+ Talk(EMOTE_FRENZY);
DoCast(me, SPELL_ENRAGE);
Frenzy_Timer = 20000+rand()%15000;
} else Frenzy_Timer -= diff;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp
index 8fc7f31e766..244e22149fc 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp
@@ -29,12 +29,11 @@ EndScriptData */
enum eEnums
{
- SAY_ENTER = -1269006,
- SAY_AGGRO = -1269007,
- SAY_BANISH = -1269008,
- SAY_SLAY1 = -1269009,
- SAY_SLAY2 = -1269010,
- SAY_DEATH = -1269011,
+ SAY_ENTER = 0,
+ SAY_AGGRO = 1,
+ SAY_BANISH = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
SPELL_ARCANE_BLAST = 31457,
H_SPELL_ARCANE_BLAST = 38538,
@@ -78,7 +77,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void MoveInLineOfSight(Unit* who)
@@ -88,7 +87,7 @@ public:
{
if (me->IsWithinDistInMap(who, 20.0f))
{
- DoScriptText(SAY_BANISH, me);
+ Talk(SAY_BANISH);
me->DealDamage(who, who->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
}
}
@@ -98,12 +97,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_RIFT, SPECIAL);
@@ -133,7 +132,7 @@ public:
//Time Lapse
if (TimeLapse_Timer <= diff)
{
- DoScriptText(SAY_BANISH, me);
+ Talk(SAY_BANISH);
DoCast(me, SPELL_TIME_LAPSE);
TimeLapse_Timer = 15000+rand()%10000;
} else TimeLapse_Timer -= diff;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp
index 0256a099580..02a9f4742b3 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp
@@ -29,12 +29,11 @@ EndScriptData */
enum eEnums
{
- SAY_ENTER = -1269000,
- SAY_AGGRO = -1269001,
- SAY_BANISH = -1269002,
- SAY_SLAY1 = -1269003,
- SAY_SLAY2 = -1269004,
- SAY_DEATH = -1269005,
+ SAY_ENTER = 0,
+ SAY_AGGRO = 1,
+ SAY_BANISH = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
SPELL_HASTE = 31458,
SPELL_MORTAL_WOUND = 31464,
@@ -77,17 +76,17 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_RIFT, SPECIAL);
@@ -100,7 +99,7 @@ public:
{
if (me->IsWithinDistInMap(who, 20.0f))
{
- DoScriptText(SAY_BANISH, me);
+ Talk(SAY_BANISH);
me->DealDamage(who, who->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp
index 8ca14d72b94..5d9eaeac7b9 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp
@@ -36,29 +36,32 @@ EndContentData */
#include "Player.h"
#include "SpellInfo.h"
-#define SAY_ENTER -1269020 //where does this belong?
-#define SAY_INTRO -1269021
-#define SAY_WEAK75 -1269022
-#define SAY_WEAK50 -1269023
-#define SAY_WEAK25 -1269024
-#define SAY_DEATH -1269025
-#define SAY_WIN -1269026
-#define SAY_ORCS_ENTER -1269027
-#define SAY_ORCS_ANSWER -1269028
+enum MedivhBm
+{
+ SAY_ENTER = 0, //where does this belong?
+ SAY_INTRO = 1,
+ SAY_WEAK75 = 2,
+ SAY_WEAK50 = 3,
+ SAY_WEAK25 = 4,
+ SAY_DEATH = 5,
+ SAY_WIN = 6,
+ SAY_ORCS_ENTER = 7,
+ SAY_ORCS_ANSWER = 8,
-#define SPELL_CHANNEL 31556
-#define SPELL_PORTAL_RUNE 32570 //aura(portal on ground effect)
+ SPELL_CHANNEL = 31556,
+ SPELL_PORTAL_RUNE = 32570, //aura(portal on ground effect)
-#define SPELL_BLACK_CRYSTAL 32563 //aura
-#define SPELL_PORTAL_CRYSTAL 32564 //summon
+ SPELL_BLACK_CRYSTAL = 32563, //aura
+ SPELL_PORTAL_CRYSTAL = 32564, //summon
-#define SPELL_BANISH_PURPLE 32566 //aura
-#define SPELL_BANISH_GREEN 32567 //aura
+ SPELL_BANISH_PURPLE = 32566, //aura
+ SPELL_BANISH_GREEN = 32567, //aura
-#define SPELL_CORRUPT 31326
-#define SPELL_CORRUPT_AEONUS 37853
+ SPELL_CORRUPT = 31326,
+ SPELL_CORRUPT_AEONUS = 37853,
-#define C_COUNCIL_ENFORCER 17023
+ C_COUNCIL_ENFORCER = 17023
+};
class npc_medivh_bm : public CreatureScript
{
@@ -111,7 +114,7 @@ public:
if (instance->GetData(TYPE_MEDIVH) == IN_PROGRESS || instance->GetData(TYPE_MEDIVH) == DONE)
return;
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
instance->SetData(TYPE_MEDIVH, IN_PROGRESS);
DoCast(me, SPELL_CHANNEL, false);
Check_Timer = 5000;
@@ -162,7 +165,7 @@ public:
if (killer->GetEntry() == me->GetEntry())
return;
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void UpdateAI(const uint32 diff)
@@ -195,17 +198,17 @@ public:
if (Life25 && pct <= 25)
{
- DoScriptText(SAY_WEAK25, me);
+ Talk(SAY_WEAK25);
Life25 = false;
}
else if (Life50 && pct <= 50)
{
- DoScriptText(SAY_WEAK50, me);
+ Talk(SAY_WEAK50);
Life50 = false;
}
else if (Life75 && pct <= 75)
{
- DoScriptText(SAY_WEAK75, me);
+ Talk(SAY_WEAK75);
Life75 = false;
}
@@ -220,7 +223,7 @@ public:
if (instance->GetData(TYPE_RIFT) == DONE)
{
- DoScriptText(SAY_WIN, me);
+ Talk(SAY_WIN);
Check_Timer = 0;
if (me->HasAura(SPELL_CHANNEL))
@@ -363,11 +366,13 @@ public:
};
-#define SAY_SAAT_WELCOME -1269019
+enum Saat
+{
+ SPELL_CHRONO_BEACON = 34975,
+ ITEM_CHRONO_BEACON = 24289
+};
#define GOSSIP_ITEM_OBTAIN "[PH] Obtain Chrono-Beacon"
-#define SPELL_CHRONO_BEACON 34975
-#define ITEM_CHRONO_BEACON 24289
class npc_saat : public CreatureScript
{
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp
index 96cfba0007b..3398395aca6 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp
@@ -27,19 +27,25 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "old_hillsbrad.h"
-#define SAY_ENTER -1560000
-#define SAY_TAUNT1 -1560001
-#define SAY_TAUNT2 -1560002
-#define SAY_SLAY1 -1560003
-#define SAY_SLAY2 -1560004
-#define SAY_DEATH -1560005
-
-#define SPELL_HOLY_LIGHT 29427
-#define SPELL_CLEANSE 29380
-#define SPELL_HAMMER_OF_JUSTICE 13005
-#define SPELL_HOLY_SHIELD 31904
-#define SPELL_DEVOTION_AURA 8258
-#define SPELL_CONSECRATION 38385
+/*######################
+# boss_captain_skarloc #
+#######################*/
+
+enum CaptainSkarloc
+{
+ SAY_ENTER = 0,
+ SAY_TAUNT1 = 1,
+ SAY_TAUNT2 = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
+
+ SPELL_HOLY_LIGHT = 29427,
+ SPELL_CLEANSE = 29380,
+ SPELL_HAMMER_OF_JUSTICE = 13005,
+ SPELL_HOLY_SHIELD = 31904,
+ SPELL_DEVOTION_AURA = 8258,
+ SPELL_CONSECRATION = 38385
+};
class boss_captain_skarloc : public CreatureScript
{
@@ -80,18 +86,18 @@ public:
void EnterCombat(Unit* /*who*/)
{
//This is not correct. Should taunt Thrall before engage in combat
- DoScriptText(SAY_TAUNT1, me);
- DoScriptText(SAY_TAUNT2, me);
+ Talk(SAY_TAUNT1);
+ Talk(SAY_TAUNT2);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance && instance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS)
instance->SetData(TYPE_THRALL_PART1, DONE);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp
index ab0f10bdfe0..00204300a51 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp
@@ -27,21 +27,23 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "old_hillsbrad.h"
-#define SAY_ENTER1 -1560013
-#define SAY_ENTER2 -1560014
-#define SAY_ENTER3 -1560015
-#define SAY_AGGRO1 -1560016
-#define SAY_AGGRO2 -1560017
-#define SAY_SLAY1 -1560018
-#define SAY_SLAY2 -1560019
-#define SAY_BREATH1 -1560020
-#define SAY_BREATH2 -1560021
-#define SAY_DEATH -1560022
-
-#define SPELL_SAND_BREATH 31914
-#define SPELL_IMPENDING_DEATH 31916
-#define SPELL_MAGIC_DISRUPTION_AURA 33834
-#define SPELL_WING_BUFFET 31475
+/*###################
+# boss_epoch_hunter #
+####################*/
+
+enum EpochHunter
+{
+ SAY_ENTER = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_BREATH = 3,
+ SAY_DEATH = 4,
+
+ SPELL_SAND_BREATH = 31914,
+ SPELL_IMPENDING_DEATH = 31916,
+ SPELL_MAGIC_DISRUPTION_AURA = 33834,
+ SPELL_WING_BUFFET = 31475
+};
class boss_epoch_hunter : public CreatureScript
{
@@ -77,17 +79,17 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2), me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance && instance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS)
instance->SetData(TYPE_THRALL_PART4, DONE);
@@ -107,7 +109,7 @@ public:
DoCast(me->getVictim(), SPELL_SAND_BREATH);
- DoScriptText(RAND(SAY_BREATH1, SAY_BREATH2), me);
+ Talk(SAY_BREATH);
SandBreath_Timer = urand(10000, 20000);
} else SandBreath_Timer -= diff;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp
index 534c831814e..22036899d64 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp
@@ -56,18 +56,20 @@ public:
## boss_lieutenant_drake
######*/
-#define SAY_ENTER -1560006
-#define SAY_AGGRO -1560007
-#define SAY_SLAY1 -1560008
-#define SAY_SLAY2 -1560009
-#define SAY_MORTAL -1560010
-#define SAY_SHOUT -1560011
-#define SAY_DEATH -1560012
-
-#define SPELL_WHIRLWIND 31909
-#define SPELL_HAMSTRING 9080
-#define SPELL_MORTAL_STRIKE 31911
-#define SPELL_FRIGHTENING_SHOUT 33789
+enum LieutenantDrake
+{
+ SAY_ENTER = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_MORTAL = 3,
+ SAY_SHOUT = 4,
+ SAY_DEATH = 5,
+
+ SPELL_WHIRLWIND = 31909,
+ SPELL_HAMSTRING = 9080,
+ SPELL_MORTAL_STRIKE = 31911,
+ SPELL_FRIGHTENING_SHOUT = 33789
+};
struct Location
{
@@ -135,17 +137,17 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void UpdateAI(const uint32 diff)
@@ -171,7 +173,7 @@ public:
//Fear
if (Fear_Timer <= diff)
{
- DoScriptText(SAY_SHOUT, me);
+ Talk(SAY_SHOUT);
DoCast(me->getVictim(), SPELL_FRIGHTENING_SHOUT);
Fear_Timer = 25000+rand()%10000;
} else Fear_Timer -= diff;
@@ -179,7 +181,7 @@ public:
//Mortal Strike
if (MortalStrike_Timer <= diff)
{
- DoScriptText(SAY_MORTAL, me);
+ Talk(SAY_MORTAL);
DoCast(me->getVictim(), SPELL_MORTAL_STRIKE);
MortalStrike_Timer = 20000+rand()%10000;
} else MortalStrike_Timer -= diff;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
index 2000d8a52f8..fe41ff521d8 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
@@ -36,12 +36,14 @@ EndContentData */
#include "old_hillsbrad.h"
#include "Player.h"
-#define QUEST_ENTRY_HILLSBRAD 10282
-#define QUEST_ENTRY_DIVERSION 10283
-#define QUEST_ENTRY_ESCAPE 10284
-#define QUEST_ENTRY_RETURN 10285
-#define ITEM_ENTRY_BOMBS 25853
-
+enum Erozion
+{
+ QUEST_ENTRY_HILLSBRAD = 10282,
+ QUEST_ENTRY_DIVERSION = 10283,
+ QUEST_ENTRY_ESCAPE = 10284,
+ QUEST_ENTRY_RETURN = 10285,
+ ITEM_ENTRY_BOMBS = 25853
+};
#define GOSSIP_HELLO_EROZION1 "I need a pack of Incendiary Bombs."
#define GOSSIP_HELLO_EROZION2 "[PH] Teleport please, i'm tired."
@@ -98,97 +100,85 @@ public:
######*/
//Thrall texts
-#define SAY_TH_START_EVENT_PART1 -1560023
-#define SAY_TH_ARMORY -1560024
-#define SAY_TH_SKARLOC_MEET -1560025
-#define SAY_TH_SKARLOC_TAUNT -1560026
-#define SAY_TH_START_EVENT_PART2 -1560027
-#define SAY_TH_MOUNTS_UP -1560028
-#define SAY_TH_CHURCH_END -1560029
-#define SAY_TH_MEET_TARETHA -1560030
-#define SAY_TH_EPOCH_WONDER -1560031
-#define SAY_TH_EPOCH_KILL_TARETHA -1560032
-#define SAY_TH_EVENT_COMPLETE -1560033
-
-#define SAY_TH_RANDOM_LOW_HP1 -1560034
-#define SAY_TH_RANDOM_LOW_HP2 -1560035
-
-#define SAY_TH_RANDOM_DIE1 -1560036
-#define SAY_TH_RANDOM_DIE2 -1560037
-
-#define SAY_TH_RANDOM_AGGRO1 -1560038
-#define SAY_TH_RANDOM_AGGRO2 -1560039
-#define SAY_TH_RANDOM_AGGRO3 -1560040
-#define SAY_TH_RANDOM_AGGRO4 -1560041
-
-#define SAY_TH_RANDOM_KILL1 -1560042
-#define SAY_TH_RANDOM_KILL2 -1560043
-#define SAY_TH_RANDOM_KILL3 -1560044
-
-#define SAY_TH_LEAVE_COMBAT1 -1560045
-#define SAY_TH_LEAVE_COMBAT2 -1560046
-#define SAY_TH_LEAVE_COMBAT3 -1560047
-
-//Taretha texts
-#define SAY_TA_FREE -1560048
-#define SAY_TA_ESCAPED -1560049
-
-//Misc for Thrall
-#define SPELL_STRIKE 14516
-#define SPELL_SHIELD_BLOCK 12169
-#define SPELL_SUMMON_EROZION_IMAGE 33954 //if thrall dies during escort?
+enum ThrallOldHillsbrad
+{
+ SAY_TH_START_EVENT_PART1 = 0,
+ SAY_TH_ARMORY = 1,
+ SAY_TH_SKARLOC_MEET = 2,
+ SAY_TH_SKARLOC_TAUNT = 3,
+ SAY_TH_START_EVENT_PART2 = 4,
+ SAY_TH_MOUNTS_UP = 5,
+ SAY_TH_CHURCH_END = 6,
+ SAY_TH_MEET_TARETHA = 7,
+ SAY_TH_EPOCH_WONDER = 8,
+ SAY_TH_EPOCH_KILL_TARETHA = 9,
+ SAY_TH_EVENT_COMPLETE = 10,
+
+ SAY_TH_RANDOM_LOW_HP = 11,
+ SAY_TH_RANDOM_DIE = 12,
+ SAY_TH_RANDOM_AGGRO = 13,
+ SAY_TH_RANDOM_KILL = 14,
+ SAY_TH_LEAVE_COMBAT = 15,
+
+ //Taretha texts
+ SAY_TA_FREE = 0,
+ SAY_TA_ESCAPED = 1,
+
+ //Misc for Thrall
+ SPELL_STRIKE = 14516,
+ SPELL_SHIELD_BLOCK = 12169,
+ SPELL_SUMMON_EROZION_IMAGE = 33954, //if thrall dies during escort?
+
+ THRALL_WEAPON_ITEM = 927,
+ THRALL_WEAPON_INFO = 218169346,
+ THRALL_SHIELD_ITEM = 2129,
+ THRALL_SHIELD_INFO = 234948100,
+ THRALL_MODEL_UNEQUIPPED = 17292,
+ THRALL_MODEL_EQUIPPED = 18165,
+
+ //Misc Creature entries
+ ENTRY_ARMORER = 18764,
+ ENTRY_SCARLOC = 17862,
+
+ MOB_ENTRY_RIFLE = 17820,
+ MOB_ENTRY_WARDEN = 17833,
+ MOB_ENTRY_VETERAN = 17860,
+ MOB_ENTRY_WATCHMAN = 17814,
+ MOB_ENTRY_SENTRY = 17815,
+
+ MOB_ENTRY_BARN_GUARDSMAN = 18092,
+ MOB_ENTRY_BARN_PROTECTOR = 18093,
+ MOB_ENTRY_BARN_LOOKOUT = 18094,
+
+ MOB_ENTRY_CHURCH_GUARDSMAN = 23175,
+ MOB_ENTRY_CHURCH_PROTECTOR = 23179,
+ MOB_ENTRY_CHURCH_LOOKOUT = 23177,
+
+ MOB_ENTRY_INN_GUARDSMAN = 23176,
+ MOB_ENTRY_INN_PROTECTOR = 23180,
+ MOB_ENTRY_INN_LOOKOUT = 23178,
+
+ SKARLOC_MOUNT = 18798,
+ SKARLOC_MOUNT_MODEL = 18223,
+ EROZION_ENTRY = 18723,
+ ENTRY_EPOCH = 18096,
+
+ GOSSIP_ID_START = 9568,
+ GOSSIP_ID_SKARLOC1 = 9614, //I'm glad Taretha is alive. We now must find a way to free her...
+ GOSSIP_ID_SKARLOC2 = 9579, //What do you mean by this? Is Taretha in danger?
+ GOSSIP_ID_SKARLOC3 = 9580,
+ GOSSIP_ID_TARREN = 9597, //tarren mill is beyond these trees
+ GOSSIP_ID_COMPLETE = 9578 //Thank you friends, I owe my freedom to you. Where is Taretha? I hoped to see her
+};
#define SPEED_WALK (0.5f)
#define SPEED_RUN (1.0f)
#define SPEED_MOUNT (1.6f)
-#define THRALL_WEAPON_ITEM 927
-#define THRALL_WEAPON_INFO 218169346
-#define THRALL_SHIELD_ITEM 2129
-#define THRALL_SHIELD_INFO 234948100
-#define THRALL_MODEL_UNEQUIPPED 17292
-#define THRALL_MODEL_EQUIPPED 18165
-
-//Misc Creature entries
-#define ENTRY_ARMORER 18764
-#define ENTRY_SCARLOC 17862
-
-#define MOB_ENTRY_RIFLE 17820
-#define MOB_ENTRY_WARDEN 17833
-#define MOB_ENTRY_VETERAN 17860
-#define MOB_ENTRY_WATCHMAN 17814
-#define MOB_ENTRY_SENTRY 17815
-
-#define MOB_ENTRY_BARN_GUARDSMAN 18092
-#define MOB_ENTRY_BARN_PROTECTOR 18093
-#define MOB_ENTRY_BARN_LOOKOUT 18094
-
-#define MOB_ENTRY_CHURCH_GUARDSMAN 23175
-#define MOB_ENTRY_CHURCH_PROTECTOR 23179
-#define MOB_ENTRY_CHURCH_LOOKOUT 23177
-
-#define MOB_ENTRY_INN_GUARDSMAN 23176
-#define MOB_ENTRY_INN_PROTECTOR 23180
-#define MOB_ENTRY_INN_LOOKOUT 23178
-
-#define SKARLOC_MOUNT 18798
-#define SKARLOC_MOUNT_MODEL 18223
-#define EROZION_ENTRY 18723
-#define ENTRY_EPOCH 18096
-
//gossip items
-#define GOSSIP_ID_START 9568
-#define GOSSIP_ID_SKARLOC1 9614 //I'm glad Taretha is alive. We now must find a way to free her...
#define GOSSIP_ITEM_SKARLOC1 "Taretha cannot see you, Thrall."
-#define GOSSIP_ID_SKARLOC2 9579 //What do you mean by this? Is Taretha in danger?
#define GOSSIP_ITEM_SKARLOC2 "The situation is rather complicated, Thrall. It would be best for you to head into the mountains now, before more of Blackmoore's men show up. We'll make sure Taretha is safe."
-#define GOSSIP_ID_SKARLOC3 9580
-
-#define GOSSIP_ID_TARREN 9597 //tarren mill is beyond these trees
#define GOSSIP_ITEM_TARREN "We're ready, Thrall."
-
-#define GOSSIP_ID_COMPLETE 9578 //Thank you friends, I owe my freedom to you. Where is Taretha? I hoped to see her
-
#define GOSSIP_ITEM_WALKING "[PH] Start walking."
class npc_thrall_old_hillsbrad : public CreatureScript
@@ -215,7 +205,7 @@ public:
instance->SetData(TYPE_THRALL_PART1, IN_PROGRESS);
}
- DoScriptText(SAY_TH_START_EVENT_PART1, creature);
+ creature->AI()->Talk(SAY_TH_START_EVENT_PART1);
if (npc_escortAI* pEscortAI = CAST_AI(npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI, creature->AI()))
pEscortAI->Start(true, true, player->GetGUID());
@@ -236,7 +226,7 @@ public:
if (instance)
instance->SetData(TYPE_THRALL_PART2, IN_PROGRESS);
- DoScriptText(SAY_TH_START_EVENT_PART2, creature);
+ creature->AI()->Talk(SAY_TH_START_EVENT_PART2);
CAST_AI(npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI, creature->AI())->StartWP();
break;
@@ -311,7 +301,7 @@ public:
me->SummonCreature(18764, 2181.87f, 112.46f, 89.45f, 0.26f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
break;
case 9:
- DoScriptText(SAY_TH_ARMORY, me);
+ Talk(SAY_TH_ARMORY);
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, THRALL_WEAPON_ITEM);
//me->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO, THRALL_WEAPON_INFO);
//me->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+1, 781);
@@ -344,7 +334,7 @@ public:
me->SummonCreature(MOB_ENTRY_VETERAN, 2104.18f, 194.82f, 65.18f, 5.75f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
break;
case 29:
- DoScriptText(SAY_TH_SKARLOC_MEET, me);
+ Talk(SAY_TH_SKARLOC_MEET);
me->SummonCreature(ENTRY_SCARLOC, 2036.48f, 271.22f, 63.43f, 5.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
//temporary, skarloc should rather be triggered to walk up to thrall
break;
@@ -354,7 +344,7 @@ public:
SetRun(false);
break;
case 31:
- DoScriptText(SAY_TH_MOUNTS_UP, me);
+ Talk(SAY_TH_MOUNTS_UP);
DoMount();
SetRun();
break;
@@ -400,7 +390,7 @@ public:
me->SummonCreature(MOB_ENTRY_CHURCH_GUARDSMAN, 2627.22f, 649.00f, 56.03f, 4.34f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000);
break;
case 84:
- DoScriptText(SAY_TH_CHURCH_END, me);
+ Talk(SAY_TH_CHURCH_END);
SetRun();
break;
case 91:
@@ -416,20 +406,20 @@ public:
case 94:
if (uint64 TarethaGUID = instance->GetData64(DATA_TARETHA))
{
- if (Unit* Taretha = Unit::GetUnit(*me, TarethaGUID))
- DoScriptText(SAY_TA_ESCAPED, Taretha, me);
+ if (Creature* Taretha = Creature::GetCreature(*me, TarethaGUID))
+ Taretha->AI()->Talk(SAY_TA_ESCAPED, me->GetGUID());
}
break;
case 95:
- DoScriptText(SAY_TH_MEET_TARETHA, me);
+ Talk(SAY_TH_MEET_TARETHA);
instance->SetData(TYPE_THRALL_PART3, DONE);
SetEscortPaused(true);
break;
case 96:
- DoScriptText(SAY_TH_EPOCH_WONDER, me);
+ Talk(SAY_TH_EPOCH_WONDER);
break;
case 97:
- DoScriptText(SAY_TH_EPOCH_KILL_TARETHA, me);
+ Talk(SAY_TH_EPOCH_KILL_TARETHA);
SetRun();
break;
case 98:
@@ -485,7 +475,7 @@ public:
}
if (HasEscortState(STATE_ESCORT_ESCORTING))
{
- DoScriptText(RAND(SAY_TH_LEAVE_COMBAT1, SAY_TH_LEAVE_COMBAT2, SAY_TH_LEAVE_COMBAT3), me);
+ Talk(SAY_TH_LEAVE_COMBAT);
}
}
void StartWP()
@@ -505,7 +495,7 @@ public:
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_TH_RANDOM_AGGRO1, SAY_TH_RANDOM_AGGRO2, SAY_TH_RANDOM_AGGRO3, SAY_TH_RANDOM_AGGRO4), me);
+ Talk(SAY_TH_RANDOM_AGGRO);
if (me->IsMounted())
{
DoUnmount();
@@ -532,7 +522,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_TH_RANDOM_KILL1, SAY_TH_RANDOM_KILL2, SAY_TH_RANDOM_KILL3), me);
+ Talk(SAY_TH_RANDOM_KILL);
}
void JustDied(Unit* slayer)
{
@@ -543,7 +533,7 @@ public:
if (slayer == me)
return;
- DoScriptText(RAND(SAY_TH_RANDOM_DIE1, SAY_TH_RANDOM_DIE2), me);
+ Talk(SAY_TH_RANDOM_DIE);
}
void UpdateAI(const uint32 diff)
@@ -556,7 +546,7 @@ public:
//TODO: add his abilities'n-crap here
if (!LowHp && HealthBelowPct(20))
{
- DoScriptText(RAND(SAY_TH_RANDOM_LOW_HP1, SAY_TH_RANDOM_LOW_HP2), me);
+ Talk(SAY_TH_RANDOM_LOW_HP);
LowHp = true;
}
}
@@ -567,10 +557,13 @@ public:
/*######
## npc_taretha
######*/
+enum Taretha
+{
+ GOSSIP_ID_EPOCH1 = 9610, //Thank you for helping Thrall escape, friends. Now I only hope
+ GOSSIP_ID_EPOCH2 = 9613 //Yes, friends. This man was no wizard of
+};
-#define GOSSIP_ID_EPOCH1 9610 //Thank you for helping Thrall escape, friends. Now I only hope
#define GOSSIP_ITEM_EPOCH1 "Strange wizard?"
-#define GOSSIP_ID_EPOCH2 9613 //Yes, friends. This man was no wizard of
#define GOSSIP_ITEM_EPOCH2 "We'll get you out. Taretha. Don't worry. I doubt the wizard would wander too far away."
class npc_taretha : public CreatureScript
@@ -638,7 +631,7 @@ public:
switch (waypointId)
{
case 6:
- DoScriptText(SAY_TA_FREE, me);
+ Talk(SAY_TA_FREE);
break;
case 7:
me->HandleEmoteCommand(EMOTE_ONESHOT_CHEER);
diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp
index 44f9aa1184a..b3690ab14c7 100644
--- a/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp
@@ -26,16 +26,19 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
-#define SAY_AGGRO -1129000
-#define SAY_SUMMON60 -1129001
-#define SAY_SUMMON30 -1129002
-#define SAY_HP -1129003
-#define SAY_KILL -1129004
-
-#define SPELL_AMNENNARSWRATH 13009
-#define SPELL_FROSTBOLT 15530
-#define SPELL_FROST_NOVA 15531
-#define SPELL_FROST_SPECTRES 12642
+enum AmnennarTheColdbringer
+{
+ SAY_AGGRO = 0,
+ SAY_SUMMON60 = 1,
+ SAY_SUMMON30 = 2,
+ SAY_HP = 3,
+ SAY_KILL = 4,
+
+ SPELL_AMNENNARSWRATH = 13009,
+ SPELL_FROSTBOLT = 15530,
+ SPELL_FROST_NOVA = 15531,
+ SPELL_FROST_SPECTRES = 12642
+};
class boss_amnennar_the_coldbringer : public CreatureScript
{
@@ -70,12 +73,12 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(SAY_KILL, me);
+ Talk(SAY_KILL);
}
void UpdateAI(const uint32 diff)
@@ -105,20 +108,20 @@ public:
if (!Spectrals60 && HealthBelowPct(60))
{
- DoScriptText(SAY_SUMMON60, me);
+ Talk(SAY_SUMMON60);
DoCast(me->getVictim(), SPELL_FROST_SPECTRES);
Spectrals60 = true;
}
if (!Hp && HealthBelowPct(50))
{
- DoScriptText(SAY_HP, me);
+ Talk(SAY_HP);
Hp = true;
}
if (!Spectrals30 && HealthBelowPct(30))
{
- DoScriptText(SAY_SUMMON30, me);
+ Talk(SAY_SUMMON30);
DoCast(me->getVictim(), SPELL_FROST_SPECTRES);
Spectrals30 = true;
}
diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
index 7b3cd9f9900..b0953c73e57 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
@@ -33,20 +33,23 @@ EndContentData */
#include "razorfen_kraul.h"
#include "Player.h"
-#define SAY_READY -1047000
-#define SAY_POINT -1047001
-#define SAY_AGGRO1 -1047002
-#define SAY_BLUELEAF -1047003
-#define SAY_DANGER -1047004
-#define SAY_BAD -1047005
-#define SAY_THINK -1047006
-#define SAY_SOON -1047007
-#define SAY_FINALY -1047008
-#define SAY_WIN -1047009
-#define SAY_END -1047010
-
-#define QUEST_WILLIX_THE_IMPORTER 1144
-#define ENTRY_BOAR 4514
+enum Willix
+{
+ SAY_READY = 0,
+ SAY_POINT = 1,
+ SAY_AGGRO1 = 2,
+ SAY_BLUELEAF = 3,
+ SAY_DANGER = 4,
+ SAY_BAD = 5,
+ SAY_THINK = 6,
+ SAY_SOON = 7,
+ SAY_FINALY = 8,
+ SAY_WIN = 9,
+ SAY_END = 10,
+
+ QUEST_WILLIX_THE_IMPORTER = 1144,
+ ENTRY_BOAR = 4514
+};
class npc_willix : public CreatureScript
{
@@ -58,7 +61,7 @@ public:
if (quest->GetQuestId() == QUEST_WILLIX_THE_IMPORTER)
{
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
- DoScriptText(SAY_READY, creature, player);
+ creature->AI()->Talk(SAY_READY, player->GetGUID());
creature->setFaction(113);
}
@@ -84,43 +87,43 @@ public:
{
case 3:
me->HandleEmoteCommand(EMOTE_STATE_POINT);
- DoScriptText(SAY_POINT, me, player);
+ Talk(SAY_POINT, player->GetGUID());
break;
case 4:
me->SummonCreature(ENTRY_BOAR, 2137.66f, 1843.98f, 48.08f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
break;
case 8:
- DoScriptText(SAY_BLUELEAF, me, player);
+ Talk(SAY_BLUELEAF, player->GetGUID());
break;
case 9:
- DoScriptText(SAY_DANGER, me, player);
+ Talk(SAY_DANGER, player->GetGUID());
break;
case 13:
- DoScriptText(SAY_BAD, me, player);
+ Talk(SAY_BAD, player->GetGUID());
break;
case 14:
me->SummonCreature(ENTRY_BOAR, 2078.91f, 1704.54f, 56.77f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
break;
case 25:
- DoScriptText(SAY_THINK, me, player);
+ Talk(SAY_THINK, player->GetGUID());
break;
case 31:
- DoScriptText(SAY_SOON, me, player);
+ Talk(SAY_SOON, player->GetGUID());
break;
case 42:
- DoScriptText(SAY_FINALY, me, player);
+ Talk(SAY_FINALY, player->GetGUID());
break;
case 43:
me->SummonCreature(ENTRY_BOAR, 1956.43f, 1596.97f, 81.75f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
break;
case 45:
- DoScriptText(SAY_WIN, me, player);
+ Talk(SAY_WIN, player->GetGUID());
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
if (player->GetTypeId() == TYPEID_PLAYER)
CAST_PLR(player)->GroupEventHappens(QUEST_WILLIX_THE_IMPORTER, me);
break;
case 46:
- DoScriptText(SAY_END, me, player);
+ Talk(SAY_END, player->GetGUID());
break;
}
}
@@ -129,7 +132,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO1, me, NULL);
+ Talk(SAY_AGGRO1);
}
void JustSummoned(Creature* summoned)
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
index 40d4d5d54b4..7dd395770db 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
@@ -29,7 +29,7 @@ EndScriptData */
enum Yells
{
- EMOTE_TARGET = -1509002
+ EMOTE_TARGET = 0
};
class boss_buru : public CreatureScript
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp
index 4abbf99d4ef..5f5b958fb9b 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp
@@ -21,8 +21,8 @@
enum Texts
{
- EMOTE_AGGRO = -1509000,
- EMOTE_MANA_FULL = -1509001
+ EMOTE_AGGRO = 0,
+ EMOTE_MANA_FULL = 1
};
enum Spells
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
index da67f93f968..1ffd74eddf3 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
@@ -23,22 +23,22 @@
enum Yells
{
// The time of our retribution is at hand! Let darkness reign in the hearts of our enemies! Sound: 8645 Emote: 35
- SAY_ANDOROV_INTRO = -1509003, // Before for the first wave
- SAY_ANDOROV_ATTACK = -1509004, // Beginning the event
- SAY_ANDOROV_WAVE_1 = -1509001, // When the first wave comes text: Kill first, ask questions later... Incoming! emote: 45 sound: 8653
- SAY_WAVE3 = -1509005,
- SAY_WAVE4 = -1509006,
- SAY_WAVE5 = -1509007,
- SAY_WAVE6 = -1509008,
- SAY_WAVE7 = -1509009,
- SAY_INTRO = -1509010,
- SAY_UNK1 = -1509011,
- SAY_UNK2 = -1509012,
- SAY_UNK3 = -1509013,
- SAY_DEATH = -1509014,
- SAY_CHANGEAGGRO = -1509015,
- SAY_KILLS_ANDOROV = -1509016,
- SAY_COMPLETE_QUEST = -1509017 // Yell when realm complete quest 8743 for world event
+ SAY_ANDOROV_INTRO = 0, // Before for the first wave
+ SAY_ANDOROV_ATTACK = 1, // Beginning the event
+
+ SAY_WAVE3 = 0,
+ SAY_WAVE4 = 1,
+ SAY_WAVE5 = 2,
+ SAY_WAVE6 = 3,
+ SAY_WAVE7 = 4,
+ SAY_INTRO = 5,
+ SAY_UNK1 = 6,
+ SAY_UNK2 = 7,
+ SAY_UNK3 = 8,
+ SAY_DEATH = 9,
+ SAY_CHANGEAGGRO = 10,
+ SAY_KILLS_ANDOROV = 11,
+ SAY_COMPLETE_QUEST = 12 // Yell when realm complete quest 8743 for world event
// Warriors, Captains, continue the fight! Sound: 8640
};
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
index 6b569bbd3e5..c97f8a0495f 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
@@ -58,8 +58,6 @@ EndScriptData */
* - the current phase is stored in the instance data to be easily shared between the eye and cthun.
*/
-#define PI 3.14
-
enum Phases
{
PHASE_NOT_STARTED = 0,
@@ -76,24 +74,6 @@ enum Phases
PHASE_CTHUN_DONE = 6,
};
-enum Creatures
-{
- MOB_CTHUN_PORTAL = 15896,
-
- // ***** Main Phase 1 ********
- BOSS_EYE_OF_CTHUN = 15589,
- MOB_CLAW_TENTACLE = 15725,
- MOB_EYE_TENTACLE = 15726,
- MOB_SMALL_PORTAL = 15904,
-
- // ***** Main Phase 2 ********
- MOB_BODY_OF_CTHUN = 15809,
- MOB_GIANT_CLAW_TENTACLE = 15728,
- MOB_GIANT_EYE_TENTACLE = 15334,
- MOB_FLESH_TENTACLE = 15802,
- MOB_GIANT_PORTAL = 15910,
-};
-
enum Spells
{
// ***** Main Phase 1 ********
@@ -142,7 +122,7 @@ enum Actions
enum Yells
{
//Text emote
- EMOTE_WEAKENED = -1531011,
+ EMOTE_WEAKENED = 0,
// ****** Out of Combat ******
// Random Wispers - No txt only sound
@@ -712,7 +692,7 @@ public:
{
instance->SetData(DATA_CTHUN_PHASE, PHASE_CTHUN_WEAK);
- DoScriptText(EMOTE_WEAKENED, me);
+ Talk(EMOTE_WEAKENED);
PhaseTimer = 45000;
DoCast(me, SPELL_PURPLE_COLORATION, true);
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp
index 83af40c57f2..ab4968e3bf7 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp
@@ -26,15 +26,18 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
-#define EMOTE_GENERIC_FRENZY_KILL -1000001
-#define EMOTE_GENERIC_BERSERK -1000004
-
-#define SPELL_FRENZY 26051
-#define SPELL_BERSERK 26068
-#define SPELL_POISONBOLT 26052
-#define SPELL_NOXIOUSPOISON 26053
-#define SPELL_WYVERNSTING 26180
-#define SPELL_ACIDSPIT 26050
+enum Huhuran
+{
+ EMOTE_FRENZY_KILL = 0,
+ EMOTE_BERSERK = 1,
+
+ SPELL_FRENZY = 26051,
+ SPELL_BERSERK = 26068,
+ SPELL_POISONBOLT = 26052,
+ SPELL_NOXIOUSPOISON = 26053,
+ SPELL_WYVERNSTING = 26180,
+ SPELL_ACIDSPIT = 26050
+};
class boss_huhuran : public CreatureScript
{
@@ -87,7 +90,7 @@ public:
if (!Frenzy && Frenzy_Timer <= diff)
{
DoCast(me, SPELL_FRENZY);
- DoScriptText(EMOTE_GENERIC_FRENZY_KILL, me);
+ Talk(EMOTE_FRENZY_KILL);
Frenzy = true;
PoisonBolt_Timer = 3000;
Frenzy_Timer = urand(25000, 35000);
@@ -136,7 +139,7 @@ public:
if (!Berserk && HealthBelowPct(31))
{
me->InterruptNonMeleeSpells(false);
- DoScriptText(EMOTE_GENERIC_BERSERK, me);
+ Talk(EMOTE_BERSERK);
DoCast(me, SPELL_BERSERK);
Berserk = true;
}
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp
index 02554bbe6b3..2ac9358b976 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp
@@ -26,17 +26,20 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
-#define SAY_AGGRO -1531008
-#define SAY_SLAY -1531009
-#define SAY_DEATH -1531010
+enum Sartura
+{
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
-#define SPELL_WHIRLWIND 26083
-#define SPELL_ENRAGE 28747 //Not sure if right ID.
-#define SPELL_ENRAGEHARD 28798
+ SPELL_WHIRLWIND = 26083,
+ SPELL_ENRAGE = 28747, //Not sure if right ID.
+ SPELL_ENRAGEHARD = 28798,
//Guard Spell
-#define SPELL_WHIRLWINDADD 26038
-#define SPELL_KNOCKBACK 26027
+ SPELL_WHIRLWINDADD = 26038,
+ SPELL_KNOCKBACK = 26027
+};
class boss_sartura : public CreatureScript
{
@@ -82,17 +85,17 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(SAY_SLAY, me);
+ Talk(SAY_SLAY);
}
void UpdateAI(const uint32 diff)
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
index 917c790f42b..99a304e3726 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
@@ -29,19 +29,18 @@ EndScriptData */
#include "Group.h"
#include "Player.h"
-#define SAY_AGGRO1 -1531000
-#define SAY_AGGRO2 -1531001
-#define SAY_AGGRO3 -1531002
-#define SAY_SLAY1 -1531003
-#define SAY_SLAY2 -1531004
-#define SAY_SLAY3 -1531005
-#define SAY_SPLIT -1531006
-#define SAY_DEATH -1531007
-
-#define SPELL_ARCANE_EXPLOSION 25679
-#define SPELL_EARTH_SHOCK 26194
-#define SPELL_TRUE_FULFILLMENT 785
-#define SPELL_BLINK 28391
+enum Skeram
+{
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_SPLIT = 2,
+ SAY_DEATH = 3,
+
+ SPELL_ARCANE_EXPLOSION = 25679,
+ SPELL_EARTH_SHOCK = 26194,
+ SPELL_TRUE_FULFILLMENT = 785,
+ SPELL_BLINK = 28391
+};
class ov_mycoordinates
{
@@ -104,20 +103,20 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
if (!IsImage)
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void EnterCombat(Unit* /*who*/)
{
if (IsImage || Images75)
return;
- DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3), me);
+ Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
@@ -209,7 +208,7 @@ public:
void DoSplit(int atPercent /* 75 50 25 */)
{
- DoScriptText(SAY_SPLIT, me);
+ Talk(SAY_SPLIT);
ov_mycoordinates *place1 = new ov_mycoordinates(-8340.782227f, 2083.814453f, 125.648788f, 0);
ov_mycoordinates *place2 = new ov_mycoordinates(-8341.546875f, 2118.504639f, 133.058151f, 0);
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
index d0e97bc36c8..c97fd40929a 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -16,18 +15,293 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_Viscidus
-SD%Complete: 0
-SDComment: place holder
-SDCategory: Temple of Ahn'Qiraj
-EndScriptData */
-
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "SpellInfo.h"
+#include "temple_of_ahnqiraj.h"
+
+enum Spells
+{
+ SPELL_POISON_SHOCK = 25993,
+ SPELL_POISONBOLT_VOLLEY = 25991,
+ SPELL_TOXIN = 26575,
+ SPELL_VISCIDUS_SLOWED = 26034,
+ SPELL_VISCIDUS_SLOWED_MORE = 26036,
+ SPELL_VISCIDUS_FREEZE = 25937,
+ SPELL_REJOIN_VISCIDUS = 25896,
+ SPELL_VISCIDUS_EXPLODE = 25938,
+ SPELL_VISCIDUS_SUICIDE = 26003,
+ SPELL_VISCIDUS_SHRINKS = 25893, // Removed from client, in world.spell_dbc
+
+ SPELL_MEMBRANE_VISCIDUS = 25994, // damage reduction spell - removed from DBC
+ SPELL_VISCIDUS_WEAKNESS = 25926, // aura which procs at damage - should trigger the slow spells - removed from DBC
+ SPELL_VISCIDUS_GROWS = 25897, // removed from DBC
+ SPELL_SUMMON_GLOBS = 25885, // summons npc 15667 using spells from 25865 to 25884; All spells have target coords - removed from DBC
+ SPELL_VISCIDUS_TELEPORT = 25904, // removed from DBC
+};
+
+enum Events
+{
+ EVENT_POISONBOLT_VOLLEY = 1,
+ EVENT_POISON_SHOCK = 2,
+ EVENT_RESET_PHASE = 3
+};
+
+enum Phases
+{
+ PHASE_FROST = 1,
+ PHASE_MELEE = 2,
+ PHASE_GLOB = 3
+};
+
+enum Emotes
+{
+ EMOTE_SLOW = 0,
+ EMOTE_FREEZE = 1,
+ EMOTE_FROZEN = 2,
+
+ EMOTE_CRACK = 3,
+ EMOTE_SHATTER = 4,
+ EMOTE_EXPLODE = 5
+};
+
+enum HitCounter
+{
+ HITCOUNTER_SLOW = 100,
+ HITCOUNTER_SLOW_MORE = 150,
+ HITCOUNTER_FREEZE = 200,
+
+ HITCOUNTER_CRACK = 50,
+ HITCOUNTER_SHATTER = 100,
+ HITCOUNTER_EXPLODE = 150,
+};
+
+enum MovePoints
+{
+ ROOM_CENTER = 1
+};
+
+Position const ViscidusCoord = { -7992.36f, 908.19f, -52.62f, 1.68f }; // TODO: Visci isn't in room middle
+float const RoomRadius = 40.0f; // TODO: Not sure if its correct
+
+class boss_viscidus : public CreatureScript
+{
+ public:
+ boss_viscidus() : CreatureScript("boss_viscidus") { }
+
+ struct boss_viscidusAI : public BossAI
+ {
+ boss_viscidusAI(Creature* creature) : BossAI(creature, DATA_VISCIDUS) { }
+
+ void Reset()
+ {
+ _Reset();
+ _hitcounter = 0;
+ _phase = PHASE_FROST;
+ }
+
+ void DamageTaken(Unit* attacker, uint32& /*damage*/)
+ {
+ if (_phase != PHASE_MELEE)
+ return;
+
+ ++_hitcounter;
+
+ if (attacker->HasUnitState(UNIT_STATE_MELEE_ATTACKING) && _hitcounter >= HITCOUNTER_EXPLODE)
+ {
+ Talk(EMOTE_EXPLODE);
+ events.Reset();
+ _phase = PHASE_GLOB;
+ DoCast(me, SPELL_VISCIDUS_EXPLODE);
+ me->SetVisible(false);
+ me->RemoveAura(SPELL_TOXIN);
+ me->RemoveAura(SPELL_VISCIDUS_FREEZE);
+
+ uint8 NumGlobes = me->GetHealthPct() / 5.0f;
+ for (uint8 i = 0; i < NumGlobes; ++i)
+ {
+ float Angle = i * 2 * M_PI / NumGlobes;
+ float X = ViscidusCoord.GetPositionX() + std::cos(Angle) * RoomRadius;
+ float Y = ViscidusCoord.GetPositionY() + std::sin(Angle) * RoomRadius;
+ float Z = -35.0f;
+
+ if (TempSummon* Glob = me->SummonCreature(NPC_GLOB_OF_VISCIDUS, X, Y, Z))
+ {
+ Glob->UpdateAllowedPositionZ(X, Y, Z);
+ Glob->NearTeleportTo(X, Y, Z, 0.0f);
+ Glob->GetMotionMaster()->MovePoint(ROOM_CENTER, ViscidusCoord);
+ }
+ }
+ }
+ else if (_hitcounter == HITCOUNTER_SHATTER)
+ Talk(EMOTE_SHATTER);
+ else if (_hitcounter == HITCOUNTER_CRACK)
+ Talk(EMOTE_CRACK);
+ }
+
+ void SpellHit(Unit* /*caster*/, SpellInfo const* spell)
+ {
+ if ((spell->GetSchoolMask() & SPELL_SCHOOL_MASK_FROST) && _phase == PHASE_FROST && me->GetHealthPct() > 5.0f)
+ {
+ ++_hitcounter;
+
+ if (_hitcounter >= HITCOUNTER_FREEZE)
+ {
+ _hitcounter = 0;
+ Talk(EMOTE_FROZEN);
+ _phase = PHASE_MELEE;
+ DoCast(me, SPELL_VISCIDUS_FREEZE);
+ me->RemoveAura(SPELL_VISCIDUS_SLOWED_MORE);
+ events.ScheduleEvent(EVENT_RESET_PHASE, 15000);
+ }
+ else if (_hitcounter >= HITCOUNTER_SLOW_MORE)
+ {
+ Talk(EMOTE_FREEZE);
+ me->RemoveAura(SPELL_VISCIDUS_SLOWED);
+ DoCast(me, SPELL_VISCIDUS_SLOWED_MORE);
+ }
+ else if (_hitcounter >= HITCOUNTER_SLOW)
+ {
+ Talk(EMOTE_SLOW);
+ DoCast(me, SPELL_VISCIDUS_SLOWED);
+ }
+ }
+ }
+
+ void EnterCombat(Unit* /*who*/)
+ {
+ _EnterCombat();
+ events.Reset();
+ InitSpells();
+ }
+
+ void InitSpells()
+ {
+ DoCast(me, SPELL_TOXIN);
+ events.ScheduleEvent(EVENT_POISONBOLT_VOLLEY, urand(10000, 15000));
+ events.ScheduleEvent(EVENT_POISON_SHOCK, urand(7000, 12000));
+ }
+
+ void EnterEvadeMode()
+ {
+ summons.DespawnAll();
+ ScriptedAI::EnterEvadeMode();
+ }
+
+ void JustDied(Unit* /*killer*/)
+ {
+ DoCast(me, SPELL_VISCIDUS_SUICIDE);
+ summons.DespawnAll();
+ }
+
+ void UpdateAI(uint32 const diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ if (_phase == PHASE_GLOB && summons.empty())
+ {
+ DoResetThreat();
+ me->NearTeleportTo(ViscidusCoord.GetPositionX(),
+ ViscidusCoord.GetPositionY(),
+ ViscidusCoord.GetPositionZ(),
+ ViscidusCoord.GetOrientation());
+
+ _hitcounter = 0;
+ _phase = PHASE_FROST;
+ InitSpells();
+ me->SetVisible(true);
+ }
+
+ events.Update(diff);
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_POISONBOLT_VOLLEY:
+ DoCast(me, SPELL_POISONBOLT_VOLLEY);
+ events.ScheduleEvent(EVENT_POISONBOLT_VOLLEY, urand(10000, 15000));
+ break;
+ case EVENT_POISON_SHOCK:
+ DoCast(me, SPELL_POISON_SHOCK);
+ events.ScheduleEvent(EVENT_POISON_SHOCK, urand(7000, 12000));
+ break;
+ case EVENT_RESET_PHASE:
+ _hitcounter = 0;
+ _phase = PHASE_FROST;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (_phase != PHASE_GLOB)
+ DoMeleeAttackIfReady();
+ }
+
+ private:
+ uint8 _hitcounter;
+ Phases _phase;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_viscidusAI(creature);
+ }
+};
+
+class npc_glob_of_viscidus : public CreatureScript
+{
+ public:
+ npc_glob_of_viscidus() : CreatureScript("boss_glob_of_viscidus") { }
+
+ struct npc_glob_of_viscidusAI : public ScriptedAI
+ {
+ npc_glob_of_viscidusAI(Creature* creature) : ScriptedAI(creature) { }
+
+ void JustDied(Unit* /*killer*/)
+ {
+ InstanceScript* Instance = me->GetInstanceScript();
+ if (!Instance)
+ return;
+
+ if (Creature* Viscidus = me->GetMap()->GetCreature(Instance->GetData64(DATA_VISCIDUS)))
+ {
+ if (BossAI* ViscidusAI = dynamic_cast<BossAI*>(Viscidus->GetAI()))
+ ViscidusAI->SummonedCreatureDespawn(me);
+
+ if (Viscidus->isAlive() && Viscidus->GetHealthPct() < 5.0f)
+ {
+ Viscidus->SetVisible(true);
+ Viscidus->getVictim()->Kill(Viscidus);
+ }
+ else
+ {
+ Viscidus->SetHealth(Viscidus->GetHealth() - Viscidus->GetMaxHealth() / 20);
+ Viscidus->GetAI()->DoCast(Viscidus, SPELL_VISCIDUS_SHRINKS);
+ }
+ }
+ }
-#define SPELL_POISON_SHOCK 25993
-#define SPELL_POISONBOLT_VOLLEY 25991
+ void MovementInform(uint32 /*type*/, uint32 id)
+ {
+ if (id == ROOM_CENTER)
+ {
+ DoCast(me, SPELL_REJOIN_VISCIDUS);
+ ((TempSummon*)me)->UnSummon();
+ }
+ }
+ };
-#define SPELL_TOXIN_CLOUD 25989
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_glob_of_viscidusAI(creature);
+ }
+};
+void AddSC_boss_viscidus()
+{
+ new boss_viscidus();
+ new npc_glob_of_viscidus();
+}
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp
index c8a1ff63925..3efdcd0dcf6 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp
@@ -29,71 +29,86 @@ EndScriptData */
class instance_temple_of_ahnqiraj : public InstanceMapScript
{
-public:
- instance_temple_of_ahnqiraj() : InstanceMapScript("instance_temple_of_ahnqiraj", 531) { }
+ public:
+ instance_temple_of_ahnqiraj() : InstanceMapScript("instance_temple_of_ahnqiraj", 531) { }
- InstanceScript* GetInstanceScript(InstanceMap* map) const
- {
- return new instance_temple_of_ahnqiraj_InstanceMapScript(map);
- }
+ InstanceScript* GetInstanceScript(InstanceMap* map) const
+ {
+ return new instance_temple_of_ahnqiraj_InstanceMapScript(map);
+ }
- struct instance_temple_of_ahnqiraj_InstanceMapScript : public InstanceScript
- {
- instance_temple_of_ahnqiraj_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ struct instance_temple_of_ahnqiraj_InstanceMapScript : public InstanceScript
+ {
+ instance_temple_of_ahnqiraj_InstanceMapScript(Map* map) : InstanceScript(map) {}
- //If Vem is dead...
- bool IsBossDied[3];
+ //If Vem is dead...
+ bool IsBossDied[3];
- //Storing Skeram, Vem and Kri.
- uint64 SkeramGUID;
- uint64 VemGUID;
- uint64 KriGUID;
- uint64 VeklorGUID;
- uint64 VeknilashGUID;
+ //Storing Skeram, Vem and Kri.
+ uint64 SkeramGUID;
+ uint64 VemGUID;
+ uint64 KriGUID;
+ uint64 VeklorGUID;
+ uint64 VeknilashGUID;
+ uint64 ViscidusGUID;
- uint32 BugTrioDeathCount;
+ uint32 BugTrioDeathCount;
- uint32 CthunPhase;
+ uint32 CthunPhase;
- void Initialize()
- {
- IsBossDied[0] = false;
- IsBossDied[1] = false;
- IsBossDied[2] = false;
+ void Initialize()
+ {
+ IsBossDied[0] = false;
+ IsBossDied[1] = false;
+ IsBossDied[2] = false;
- SkeramGUID = 0;
- VemGUID = 0;
- KriGUID = 0;
- VeklorGUID = 0;
- VeknilashGUID = 0;
+ SkeramGUID = 0;
+ VemGUID = 0;
+ KriGUID = 0;
+ VeklorGUID = 0;
+ VeknilashGUID = 0;
+ ViscidusGUID = 0;
- BugTrioDeathCount = 0;
+ BugTrioDeathCount = 0;
- CthunPhase = 0;
- }
+ CthunPhase = 0;
+ }
- void OnCreatureCreate(Creature* creature)
- {
- switch (creature->GetEntry())
+ void OnCreatureCreate(Creature* creature)
{
- case 15263: SkeramGUID = creature->GetGUID(); break;
- case 15544: VemGUID = creature->GetGUID(); break;
- case 15511: KriGUID = creature->GetGUID(); break;
- case 15276: VeklorGUID = creature->GetGUID(); break;
- case 15275: VeknilashGUID = creature->GetGUID(); break;
+ switch (creature->GetEntry())
+ {
+ case NPC_SKERAM:
+ SkeramGUID = creature->GetGUID();
+ break;
+ case NPC_VEM:
+ VemGUID = creature->GetGUID();
+ break;
+ case NPC_KRI:
+ KriGUID = creature->GetGUID();
+ break;
+ case NPC_VEKLOR:
+ VeklorGUID = creature->GetGUID();
+ break;
+ case NPC_VEKNILASH:
+ VeknilashGUID = creature->GetGUID();
+ break;
+ case NPC_VISCIDUS:
+ ViscidusGUID = creature->GetGUID();
+ break;
+ }
}
- }
- bool IsEncounterInProgress() const
- {
- //not active in AQ40
- return false;
- }
+ bool IsEncounterInProgress() const
+ {
+ //not active in AQ40
+ return false;
+ }
- uint32 GetData(uint32 type) const
- {
- switch (type)
+ uint32 GetData(uint32 type) const
{
+ switch (type)
+ {
case DATA_VEMISDEAD:
if (IsBossDied[0])
return 1;
@@ -114,14 +129,14 @@ public:
case DATA_CTHUN_PHASE:
return CthunPhase;
+ }
+ return 0;
}
- return 0;
- }
- uint64 GetData64(uint32 identifier) const
- {
- switch (identifier)
+ uint64 GetData64(uint32 identifier) const
{
+ switch (identifier)
+ {
case DATA_SKERAM:
return SkeramGUID;
case DATA_VEM:
@@ -132,14 +147,16 @@ public:
return VeklorGUID;
case DATA_VEKNILASH:
return VeknilashGUID;
- }
- return 0;
- } // end GetData64
+ case DATA_VISCIDUS:
+ return ViscidusGUID;
+ }
+ return 0;
+ } // end GetData64
- void SetData(uint32 type, uint32 data)
- {
- switch (type)
+ void SetData(uint32 type, uint32 data)
{
+ switch (type)
+ {
case DATA_VEM_DEATH:
IsBossDied[0] = true;
break;
@@ -159,9 +176,9 @@ public:
case DATA_CTHUN_PHASE:
CthunPhase = data;
break;
+ }
}
- }
- };
+ };
};
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h
index 13c3d56d14c..f154ccf2c5d 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h
@@ -19,19 +19,45 @@
#ifndef DEF_TEMPLE_OF_AHNQIRAJ_H
#define DEF_TEMPLE_OF_AHNQIRAJ_H
-#define DATA_SKERAM 1
-#define DATA_KRI 2
-#define DATA_VEM 3
-#define DATA_VEMISDEAD 4
-#define DATA_VEM_DEATH 5
-#define DATA_VEKLOR 6
-#define DATA_VEKLORISDEAD 7
-#define DATA_VEKLOR_DEATH 8
-#define DATA_VEKNILASH 9
-#define DATA_VEKNILASHISDEAD 10
-#define DATA_VEKNILASH_DEATH 11
-#define DATA_BUG_TRIO_DEATH 14
+enum DataTypes
+{
+ DATA_SKERAM = 1,
+ DATA_KRI = 2,
+ DATA_VEM = 3,
+ DATA_VEMISDEAD = 4,
+ DATA_VEM_DEATH = 5,
+ DATA_VEKLOR = 6,
+ DATA_VEKLORISDEAD = 7,
+ DATA_VEKLOR_DEATH = 8,
+ DATA_VEKNILASH = 9,
+ DATA_VEKNILASHISDEAD = 10,
+ DATA_VEKNILASH_DEATH = 11,
+ DATA_BUG_TRIO_DEATH = 14,
+ DATA_CTHUN_PHASE = 20,
+ DATA_VISCIDUS = 21
+};
-#define DATA_CTHUN_PHASE 20
+enum Creatures
+{
+ BOSS_EYE_OF_CTHUN = 15589,
+ MOB_CTHUN_PORTAL = 15896,
+ MOB_CLAW_TENTACLE = 15725,
+ MOB_EYE_TENTACLE = 15726,
+ MOB_SMALL_PORTAL = 15904,
+ MOB_BODY_OF_CTHUN = 15809,
+ MOB_GIANT_CLAW_TENTACLE = 15728,
+ MOB_GIANT_EYE_TENTACLE = 15334,
+ MOB_FLESH_TENTACLE = 15802,
+ MOB_GIANT_PORTAL = 15910,
+
+ NPC_VISCIDUS = 15299,
+ NPC_GLOB_OF_VISCIDUS = 15667,
+
+ NPC_SKERAM = 15263,
+ NPC_VEM = 15544,
+ NPC_KRI = 15511,
+ NPC_VEKLOR = 15276,
+ NPC_VEKNILASH = 15275
+};
#endif
diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
index e1a3c3aeb45..6cc8d5931d3 100644
--- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
+++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
@@ -37,35 +37,32 @@ EndContentData */
## npc_disciple_of_naralex
######*/
-enum eEnums
+enum Enums
{
- //say
- SAY_MAKE_PREPARATIONS = -1043001,
- SAY_TEMPLE_OF_PROMISE = -1043002,
- SAY_MUST_CONTINUE = -1043003,
- SAY_BANISH_THE_SPIRITS = -1043004,
- SAY_CAVERNS_PURIFIED = -1043005,
- SAY_BEYOND_THIS_CORRIDOR = -1043006,
- SAY_EMERALD_DREAM = -1043007,
- SAY_MUTANUS_THE_DEVOURER = -1043012,
- SAY_NARALEX_AWAKES = -1043014,
- SAY_THANK_YOU = -1043015,
- SAY_FAREWELL = -1043016,
- SAY_ATTACKED = -1043017,
- //yell
- SAY_AT_LAST = -1043000,
- SAY_I_AM_AWAKE = -1043013,
- //emote
- EMOTE_AWAKENING_RITUAL = -1043008,
- EMOTE_TROUBLED_SLEEP = -1043009,
- EMOTE_WRITHE_IN_AGONY = -1043010,
- EMOTE_HORRENDOUS_VISION = -1043011,
- //spell
+ SAY_AT_LAST = 0,
+ SAY_MAKE_PREPARATIONS = 1,
+ SAY_TEMPLE_OF_PROMISE = 2,
+ SAY_MUST_CONTINUE = 3,
+ SAY_BANISH_THE_SPIRITS = 4,
+ SAY_CAVERNS_PURIFIED = 5,
+ SAY_BEYOND_THIS_CORRIDOR = 6,
+ SAY_EMERALD_DREAM = 7,
+ EMOTE_AWAKENING_RITUAL = 8,
+ EMOTE_TROUBLED_SLEEP = 0,
+ EMOTE_WRITHE_IN_AGONY = 1,
+ EMOTE_HORRENDOUS_VISION = 2,
+ SAY_MUTANUS_THE_DEVOURER = 9,
+ SAY_I_AM_AWAKE = 3,
+ SAY_NARALEX_AWAKES = 10,
+ SAY_THANK_YOU = 4,
+ SAY_FAREWELL = 5,
+ SAY_ATTACKED = 11,
+
SPELL_MARK_OF_THE_WILD_RANK_2 = 5232,
SPELL_SERPENTINE_CLEANSING = 6270,
SPELL_NARALEXS_AWAKENING = 6271,
SPELL_FLIGHT_FORM = 33943,
- //npc entry
+
NPC_DEVIATE_RAVAGER = 3636,
NPC_DEVIATE_VIPER = 5755,
NPC_DEVIATE_MOCCASIN = 5762,
@@ -76,7 +73,6 @@ enum eEnums
#define GOSSIP_ID_START_1 698 //Naralex sleeps again!
#define GOSSIP_ID_START_2 699 //The fanglords are dead!
#define GOSSIP_ITEM_NARALEX "Let the event begin!"
-#define ACHIEVEMENT_WAILING_CAVERNS 630
class npc_disciple_of_naralex : public CreatureScript
{
@@ -98,7 +94,7 @@ public:
if (instance)
instance->SetData(TYPE_NARALEX_EVENT, IN_PROGRESS);
- DoScriptText(SAY_MAKE_PREPARATIONS, creature);
+ creature->AI()->Talk(SAY_MAKE_PREPARATIONS);
creature->setFaction(250);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
@@ -125,7 +121,7 @@ public:
if (!instance->GetData(TYPE_NARALEX_YELLED))
{
- DoScriptText(SAY_AT_LAST, creature);
+ creature->AI()->Talk(SAY_AT_LAST);
instance->SetData(TYPE_NARALEX_YELLED, 1);
}
}
@@ -167,7 +163,7 @@ public:
instance->SetData(TYPE_NARALEX_PART1, IN_PROGRESS);
break;
case 5:
- DoScriptText(SAY_MUST_CONTINUE, me);
+ Talk(SAY_MUST_CONTINUE);
instance->SetData(TYPE_NARALEX_PART1, DONE);
break;
case 11:
@@ -176,7 +172,7 @@ public:
instance->SetData(TYPE_NARALEX_PART2, IN_PROGRESS);
break;
case 19:
- DoScriptText(SAY_BEYOND_THIS_CORRIDOR, me);
+ Talk(SAY_BEYOND_THIS_CORRIDOR);
break;
case 24:
eventProgress = 1;
@@ -193,7 +189,7 @@ public:
void EnterCombat(Unit* who)
{
- DoScriptText(SAY_ATTACKED, me, who);
+ Talk(SAY_ATTACKED, who->GetGUID());
}
void JustDied(Unit* /*slayer*/)
@@ -230,7 +226,7 @@ public:
if (eventProgress == 1)
{
++eventProgress;
- DoScriptText(SAY_TEMPLE_OF_PROMISE, me);
+ Talk(SAY_TEMPLE_OF_PROMISE);
me->SummonCreature(NPC_DEVIATE_RAVAGER, -82.1763f, 227.874f, -93.3233f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
me->SummonCreature(NPC_DEVIATE_RAVAGER, -72.9506f, 216.645f, -93.6756f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
}
@@ -239,7 +235,7 @@ public:
if (eventProgress == 1)
{
++eventProgress;
- DoScriptText(SAY_BANISH_THE_SPIRITS, me);
+ Talk(SAY_BANISH_THE_SPIRITS);
DoCast(me, SPELL_SERPENTINE_CLEANSING);
//CAST_AI(npc_escort::npc_escortAI, me->AI())->SetCanDefend(false);
eventTimer = 30000;
@@ -251,7 +247,7 @@ public:
if (eventProgress == 2)
{
//CAST_AI(npc_escort::npc_escortAI, me->AI())->SetCanDefend(true);
- DoScriptText(SAY_CAVERNS_PURIFIED, me);
+ Talk(SAY_CAVERNS_PURIFIED);
instance->SetData(TYPE_NARALEX_PART2, DONE);
if (me->HasAura(SPELL_SERPENTINE_CLEANSING))
me->RemoveAura(SPELL_SERPENTINE_CLEANSING);
@@ -263,7 +259,7 @@ public:
++eventProgress;
eventTimer = 4000;
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- DoScriptText(SAY_EMERALD_DREAM, me);
+ Talk(SAY_EMERALD_DREAM);
}
else
if (eventProgress == 2)
@@ -273,7 +269,7 @@ public:
//CAST_AI(npc_escort::npc_escortAI, me->AI())->SetCanDefend(false);
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
DoCast(naralex, SPELL_NARALEXS_AWAKENING, true);
- DoScriptText(EMOTE_AWAKENING_RITUAL, me);
+ Talk(EMOTE_AWAKENING_RITUAL);
}
else
if (eventProgress == 3)
@@ -281,7 +277,7 @@ public:
++eventProgress;
eventTimer = 15000;
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
- DoScriptText(EMOTE_TROUBLED_SLEEP, naralex);
+ naralex->AI()->Talk(EMOTE_TROUBLED_SLEEP);
me->SummonCreature(NPC_DEVIATE_MOCCASIN, 135.943f, 199.701f, -103.529f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000);
me->SummonCreature(NPC_DEVIATE_MOCCASIN, 151.08f, 221.13f, -103.609f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000);
me->SummonCreature(NPC_DEVIATE_MOCCASIN, 128.007f, 227.428f, -97.421f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000);
@@ -292,7 +288,7 @@ public:
++eventProgress;
eventTimer = 30000;
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
- DoScriptText(EMOTE_WRITHE_IN_AGONY, naralex);
+ naralex->AI()->Talk(EMOTE_WRITHE_IN_AGONY);
me->SummonCreature(NPC_NIGHTMARE_ECTOPLASM, 133.413f, 207.188f, -102.469f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000);
me->SummonCreature(NPC_NIGHTMARE_ECTOPLASM, 142.857f, 218.645f, -102.905f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000);
me->SummonCreature(NPC_NIGHTMARE_ECTOPLASM, 105.102f, 227.211f, -102.752f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000);
@@ -306,9 +302,9 @@ public:
{
++eventProgress;
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
- DoScriptText(EMOTE_HORRENDOUS_VISION, naralex);
+ naralex->AI()->Talk(EMOTE_HORRENDOUS_VISION);
me->SummonCreature(NPC_MUTANUS_THE_DEVOURER, 150.872f, 262.905f, -103.503f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
- DoScriptText(SAY_MUTANUS_THE_DEVOURER, me);
+ Talk(SAY_MUTANUS_THE_DEVOURER);
instance->SetData(TYPE_MUTANUS_THE_DEVOURER, IN_PROGRESS);
}
else
@@ -318,23 +314,12 @@ public:
eventTimer = 3000;
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
{
- AchievementEntry const* AchievWC = sAchievementStore.LookupEntry(ACHIEVEMENT_WAILING_CAVERNS);
- if (AchievWC)
- {
- Map* map = me->GetMap();
- if (map && map->IsDungeon())
- {
- Map::PlayerList const &players = map->GetPlayers();
- for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- itr->getSource()->CompletedAchievement(AchievWC);
- }
- }
if (me->HasAura(SPELL_NARALEXS_AWAKENING))
me->RemoveAura(SPELL_NARALEXS_AWAKENING);
naralex->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_I_AM_AWAKE, naralex);
+ naralex->AI()->Talk(SAY_I_AM_AWAKE);
}
- DoScriptText(SAY_NARALEX_AWAKES, me);
+ Talk(SAY_NARALEX_AWAKES);
}
else
if (eventProgress == 7)
@@ -342,7 +327,7 @@ public:
++eventProgress;
eventTimer = 6000;
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
- DoScriptText(SAY_THANK_YOU, naralex);
+ naralex->AI()->Talk(SAY_THANK_YOU);
}
else
if (eventProgress == 8)
@@ -351,7 +336,7 @@ public:
eventTimer = 8000;
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
{
- DoScriptText(SAY_FAREWELL, naralex);
+ naralex->AI()->Talk(SAY_FAREWELL);
naralex->AddAura(SPELL_FLIGHT_FORM, naralex);
}
SetRun();
diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
index f288db920f4..0a948e4a5f0 100644
--- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
+++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
@@ -242,16 +242,16 @@ private:
enum weegliSpells
{
- SPELL_BOMB = 8858,
- SPELL_GOBLIN_LAND_MINE = 21688,
- SPELL_SHOOT = 6660,
- SPELL_WEEGLIS_BARREL = 10772
+ SPELL_BOMB = 8858,
+ SPELL_GOBLIN_LAND_MINE = 21688,
+ SPELL_SHOOT = 6660,
+ SPELL_WEEGLIS_BARREL = 10772
};
enum weegliSays
{
- SAY_WEEGLI_OHNO = -1209000,
- SAY_WEEGLI_OK_I_GO = -1209001
+ SAY_WEEGLI_OHNO = 0,
+ SAY_WEEGLI_OK_I_GO = 1
};
#define GOSSIP_WEEGLI "[PH] Please blow up the door."
@@ -363,7 +363,7 @@ public:
if (instance->GetData(EVENT_PYRAMID) == PYRAMID_CAGES_OPEN)
{
instance->SetData(EVENT_PYRAMID, PYRAMID_ARRIVED_AT_STAIR);
- DoScriptText(SAY_WEEGLI_OHNO, me);
+ Talk(SAY_WEEGLI_OHNO);
me->SetHomePosition(1882.69f, 1272.28f, 41.87f, 0);
}
else
@@ -388,7 +388,7 @@ public:
me->setFaction(FACTION_FRIENDLY);
me->GetMotionMaster()->MovePoint(0, 1858.57f, 1146.35f, 14.745f);
me->SetHomePosition(1858.57f, 1146.35f, 14.745f, 3.85f); // in case he gets interrupted
- DoScriptText(SAY_WEEGLI_OK_I_GO, me);
+ Talk(SAY_WEEGLI_OK_I_GO);
destroyingDoor=true;
}
}
diff --git a/src/server/scripts/Kalimdor/ashenvale.cpp b/src/server/scripts/Kalimdor/ashenvale.cpp
index 0e44da371d6..40ac1609fee 100644
--- a/src/server/scripts/Kalimdor/ashenvale.cpp
+++ b/src/server/scripts/Kalimdor/ashenvale.cpp
@@ -97,7 +97,7 @@ class npc_torek : public CreatureScript
me->SummonCreature(ENTRY_SILVERWING_WARRIOR, 1778.73f, -2049.50f, 109.83f, 1.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
break;
case 20:
- DoScriptText(SAY_WIN, me, player);
+ Talk(SAY_WIN, player->GetGUID());
Completed = true;
player->GroupEventHappens(QUEST_TOREK_ASSULT, me);
break;
@@ -269,16 +269,16 @@ class npc_ruul_snowhoof : public CreatureScript
enum Muglash
{
- SAY_MUG_START1 = -1800054,
- SAY_MUG_START2 = -1800055,
- SAY_MUG_BRAZIER = -1800056,
- SAY_MUG_BRAZIER_WAIT = -1800057,
- SAY_MUG_ON_GUARD = -1800058,
- SAY_MUG_REST = -1800059,
- SAY_MUG_DONE = -1800060,
- SAY_MUG_GRATITUDE = -1800061,
- SAY_MUG_PATROL = -1800062,
- SAY_MUG_RETURN = -1800063,
+ SAY_MUG_START1 = 0,
+ SAY_MUG_START2 = 1,
+ SAY_MUG_BRAZIER = 2,
+ SAY_MUG_BRAZIER_WAIT = 3,
+ SAY_MUG_ON_GUARD = 4,
+ SAY_MUG_REST = 5,
+ SAY_MUG_DONE = 6,
+ SAY_MUG_GRATITUDE = 7,
+ SAY_MUG_PATROL = 8,
+ SAY_MUG_RETURN = 9,
QUEST_VORSHA = 6641,
@@ -337,10 +337,10 @@ class npc_muglash : public CreatureScript
switch (waypointId)
{
case 0:
- DoScriptText(SAY_MUG_START2, me, player);
+ Talk(SAY_MUG_START2, player->GetGUID());
break;
case 24:
- DoScriptText(SAY_MUG_BRAZIER, me, player);
+ Talk(SAY_MUG_BRAZIER, player->GetGUID());
if (GameObject* go = GetClosestGameObjectWithEntry(me, GO_NAGA_BRAZIER, INTERACTION_DISTANCE*2))
{
@@ -349,14 +349,14 @@ class npc_muglash : public CreatureScript
}
break;
case 25:
- DoScriptText(SAY_MUG_GRATITUDE, me);
+ Talk(SAY_MUG_GRATITUDE);
player->GroupEventHappens(QUEST_VORSHA, me);
break;
case 26:
- DoScriptText(SAY_MUG_PATROL, me);
+ Talk(SAY_MUG_PATROL);
break;
case 27:
- DoScriptText(SAY_MUG_RETURN, me);
+ Talk(SAY_MUG_RETURN);
break;
}
}
@@ -368,7 +368,7 @@ class npc_muglash : public CreatureScript
if (HasEscortState(STATE_ESCORT_PAUSED))
{
if (urand(0, 1))
- DoScriptText(SAY_MUG_ON_GUARD, me, player);
+ Talk(SAY_MUG_ON_GUARD, player->GetGUID());
return;
}
}
@@ -406,7 +406,7 @@ class npc_muglash : public CreatureScript
break;
case 4:
SetEscortPaused(false);
- DoScriptText(SAY_MUG_DONE, me);
+ Talk(SAY_MUG_DONE);
break;
}
}
@@ -445,7 +445,7 @@ class npc_muglash : public CreatureScript
{
if (npc_muglashAI* pEscortAI = CAST_AI(npc_muglashAI, creature->AI()))
{
- DoScriptText(SAY_MUG_START1, creature);
+ creature->AI()->Talk(SAY_MUG_START1);
creature->setFaction(113);
pEscortAI->Start(true, false, player->GetGUID());
@@ -466,7 +466,7 @@ class go_naga_brazier : public GameObjectScript
{
if (npc_muglash::npc_muglashAI* pEscortAI = CAST_AI(npc_muglash::npc_muglashAI, creature->AI()))
{
- DoScriptText(SAY_MUG_BRAZIER_WAIT, creature);
+ creature->AI()->Talk(SAY_MUG_BRAZIER_WAIT);
pEscortAI->IsBrazierExtinguished = true;
return false;
diff --git a/src/server/scripts/Kalimdor/azshara.cpp b/src/server/scripts/Kalimdor/azshara.cpp
index 213918db338..b38d1ac2c3b 100644
--- a/src/server/scripts/Kalimdor/azshara.cpp
+++ b/src/server/scripts/Kalimdor/azshara.cpp
@@ -195,12 +195,10 @@ enum RizzleSprysprocketData
SPELL_PERIODIC_DEPTH_CHARGE = 39912,
SPELL_GIVE_SOUTHFURY_MOONSTONE = 39886,
- SAY_RIZZLE_START = -1000351,
- MSG_ESCAPE_NOTICE = -1000352,
- SAY_RIZZLE_GRENADE = -1000353,
- SAY_RIZZLE_GRENADE_BACKFIRE = -1000354, // Not used
- SAY_RIZZLE_FINAL = -1000355,
- SAY_RIZZLE_FINAL2 = -1000356, // Not used
+ SAY_RIZZLE_START = 0,
+ SAY_RIZZLE_GRENADE = 1,
+ SAY_RIZZLE_FINAL = 2,
+ MSG_ESCAPE_NOTICE = 3
};
#define GOSSIP_GET_MOONSTONE "Hand over the Southfury moonstone and I'll let you go."
@@ -366,7 +364,7 @@ public:
if (!player)
return;
- SendText(MSG_ESCAPE_NOTICE, player);
+ Talk(MSG_ESCAPE_NOTICE, player->GetGUID());
DoCast(me, SPELL_PERIODIC_DEPTH_CHARGE);
me->SetUnitMovementFlags(MOVEMENTFLAG_HOVER | MOVEMENTFLAG_SWIMMING);
me->SetSpeed(MOVE_RUN, 0.85f, true);
@@ -389,7 +387,7 @@ public:
Player* player = Unit::GetPlayer(*me, PlayerGUID);
if (player)
{
- DoScriptText(SAY_RIZZLE_GRENADE, me, player);
+ Talk(SAY_RIZZLE_GRENADE, player->GetGUID());
DoCast(player, SPELL_RIZZLE_FROST_GRENADE, true);
}
GrenadeTimer = 30000;
@@ -406,7 +404,7 @@ public:
if (me->IsWithinDist(player, 10) && me->GetPositionX() > player->GetPositionX() && !Reached)
{
- DoScriptText(SAY_RIZZLE_FINAL, me);
+ Talk(SAY_RIZZLE_FINAL);
me->SetUInt32Value(UNIT_NPC_FLAGS, 1);
me->setFaction(35);
me->GetMotionMaster()->MoveIdle();
@@ -434,7 +432,7 @@ public:
if (who->GetTypeId() == TYPEID_PLAYER && CAST_PLR(who)->GetQuestStatus(QUEST_CHASING_THE_MOONSTONE) == QUEST_STATUS_INCOMPLETE)
{
PlayerGUID = who->GetGUID();
- DoScriptText(SAY_RIZZLE_START, me);
+ Talk(SAY_RIZZLE_START);
DoCast(who, SPELL_RIZZLE_BLACKJACK, false);
return;
}
diff --git a/src/server/scripts/Kalimdor/azuremyst_isle.cpp b/src/server/scripts/Kalimdor/azuremyst_isle.cpp
index 96e67c8de47..3f1ae0fa3bf 100644
--- a/src/server/scripts/Kalimdor/azuremyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/azuremyst_isle.cpp
@@ -47,15 +47,9 @@ EndContentData */
enum draeneiSurvivor
{
- SAY_HEAL1 = -1000176,
- SAY_HEAL2 = -1000177,
- SAY_HEAL3 = -1000178,
- SAY_HEAL4 = -1000179,
+ SAY_HEAL = 0,
- SAY_HELP1 = -1000180,
- SAY_HELP2 = -1000181,
- SAY_HELP3 = -1000182,
- SAY_HELP4 = -1000183,
+ SAY_HELP = 1,
SPELL_IRRIDATION = 35046,
SPELL_STUNNED = 28630
@@ -108,7 +102,7 @@ public:
if (CanSayHelp && who->GetTypeId() == TYPEID_PLAYER && me->IsFriendlyTo(who) && me->IsWithinDistInMap(who, 25.0f))
{
//Random switch between 4 texts
- DoScriptText(RAND(SAY_HELP1, SAY_HELP2, SAY_HELP3, SAY_HELP4), me, who);
+ Talk(SAY_HELP, who->GetGUID());
SayHelpTimer = 20000;
CanSayHelp = false;
@@ -140,7 +134,7 @@ public:
if (Player* player = Unit::GetPlayer(*me, pCaster))
{
- DoScriptText(RAND(SAY_HEAL1, SAY_HEAL2, SAY_HEAL3, SAY_HEAL4), me, player);
+ Talk(SAY_HEAL, player->GetGUID());
player->TalkedToCreature(me->GetEntry(), me->GetGUID());
}
@@ -181,9 +175,9 @@ public:
enum Overgrind
{
- SAY_TEXT = -1000184,
- SAY_EMOTE = -1000185,
- ATTACK_YELL = -1000186,
+ SAY_TEXT = 0,
+ SAY_EMOTE = 1,
+ ATTACK_YELL = 2,
AREA_COVE = 3579,
AREA_ISLE = 3639,
@@ -257,7 +251,7 @@ public:
void EnterCombat(Unit* who)
{
- DoScriptText(ATTACK_YELL, me, who);
+ Talk(ATTACK_YELL, who->GetGUID());
}
void UpdateAI(const uint32 diff)
@@ -266,8 +260,8 @@ public:
{
if (EmoteTimer <= diff)
{
- DoScriptText(SAY_TEXT, me);
- DoScriptText(SAY_EMOTE, me);
+ Talk(SAY_TEXT);
+ Talk(SAY_EMOTE);
EmoteTimer = urand(120000, 150000);
} else EmoteTimer -= diff;
}
@@ -338,12 +332,12 @@ public:
enum Magwin
{
- SAY_START = -1000111,
- SAY_AGGRO = -1000112,
- SAY_PROGRESS = -1000113,
- SAY_END1 = -1000114,
- SAY_END2 = -1000115,
- EMOTE_HUG = -1000116,
+ SAY_START = 0,
+ SAY_AGGRO = 1,
+ SAY_PROGRESS = 2,
+ SAY_END1 = 3,
+ SAY_END2 = 4,
+ EMOTE_HUG = 5,
QUEST_A_CRY_FOR_SAY_HELP = 9528
};
@@ -380,17 +374,17 @@ public:
switch (waypointId)
{
case 0:
- DoScriptText(SAY_START, me, player);
+ Talk(SAY_START, player->GetGUID());
break;
case 17:
- DoScriptText(SAY_PROGRESS, me, player);
+ Talk(SAY_PROGRESS, player->GetGUID());
break;
case 28:
- DoScriptText(SAY_END1, me, player);
+ Talk(SAY_END1, player->GetGUID());
break;
case 29:
- DoScriptText(EMOTE_HUG, me, player);
- DoScriptText(SAY_END2, me, player);
+ Talk(EMOTE_HUG, player->GetGUID());
+ Talk(SAY_END2, player->GetGUID());
player->GroupEventHappens(QUEST_A_CRY_FOR_SAY_HELP, me);
break;
}
@@ -399,7 +393,7 @@ public:
void EnterCombat(Unit* who)
{
- DoScriptText(SAY_AGGRO, me, who);
+ Talk(SAY_AGGRO, who->GetGUID());
}
void Reset() {}
@@ -417,15 +411,15 @@ enum Geezle
SPELL_TREE_DISGUISE = 30298,
- GEEZLE_SAY_1 = -1000629,
- SPARK_SAY_2 = -1000630,
- SPARK_SAY_3 = -1000631,
- GEEZLE_SAY_4 = -1000632,
- SPARK_SAY_5 = -1000633,
- SPARK_SAY_6 = -1000634,
- GEEZLE_SAY_7 = -1000635,
+ GEEZLE_SAY_1 = 0,
+ SPARK_SAY_2 = 3,
+ SPARK_SAY_3 = 4,
+ GEEZLE_SAY_4 = 1,
+ SPARK_SAY_5 = 5,
+ SPARK_SAY_6 = 6,
+ GEEZLE_SAY_7 = 2,
- EMOTE_SPARK = -1000636,
+ EMOTE_SPARK = 7,
MOB_SPARK = 17243,
GO_NAGA_FLAG = 181694
@@ -479,41 +473,49 @@ public:
uint32 NextStep(uint8 Step)
{
Creature* Spark = Unit::GetCreature(*me, SparkGUID);
+ if (!Spark)
+ return 99999999;
switch (Step)
{
case 0:
- if (Spark)
- Spark->GetMotionMaster()->MovePoint(0, -5080.70f, -11253.61f, 0.56f);
+ Spark->GetMotionMaster()->MovePoint(0, -5080.70f, -11253.61f, 0.56f);
me->GetMotionMaster()->MovePoint(0, -5092.26f, -11252, 0.71f);
- return 9000; // NPCs are walking up to fire
+ return 9000;
case 1:
DespawnNagaFlag(true);
- DoScriptText(EMOTE_SPARK, Spark);
+ Spark->AI()->Talk(EMOTE_SPARK);
return 1000;
case 2:
- DoScriptText(GEEZLE_SAY_1, me, Spark);
- if (Spark)
- {
- Spark->SetInFront(me);
- me->SetInFront(Spark);
- }
+ Talk(GEEZLE_SAY_1, SparkGUID);
+ Spark->SetInFront(me);
+ me->SetInFront(Spark);
return 5000;
- case 3: DoScriptText(SPARK_SAY_2, Spark); return 7000;
- case 4: DoScriptText(SPARK_SAY_3, Spark); return 8000;
- case 5: DoScriptText(GEEZLE_SAY_4, me, Spark); return 8000;
- case 6: DoScriptText(SPARK_SAY_5, Spark); return 9000;
- case 7: DoScriptText(SPARK_SAY_6, Spark); return 8000;
- case 8: DoScriptText(GEEZLE_SAY_7, me, Spark); return 2000;
+ case 3:
+ Spark->AI()->Talk(SPARK_SAY_2);
+ return 7000;
+ case 4:
+ Spark->AI()->Talk(SPARK_SAY_3);
+ return 8000;
+ case 5:
+ Talk(GEEZLE_SAY_4, SparkGUID);
+ return 8000;
+ case 6:
+ Spark->AI()->Talk(SPARK_SAY_5);
+ return 9000;
+ case 7:
+ Spark->AI()->Talk(SPARK_SAY_6);
+ return 8000;
+ case 8:
+ Talk(GEEZLE_SAY_7, SparkGUID);
+ return 2000;
case 9:
me->GetMotionMaster()->MoveTargetedHome();
- if (Spark)
- Spark->GetMotionMaster()->MovePoint(0, SparkPos);
+ Spark->GetMotionMaster()->MovePoint(0, SparkPos);
CompleteQuest();
return 9000;
case 10:
- if (Spark)
- Spark->DisappearAndDie();
+ Spark->DisappearAndDie();
DespawnNagaFlag(false);
me->DisappearAndDie();
default: return 99999999;
@@ -658,9 +660,7 @@ enum BristlelimbCage
NPC_STILLPINE_CAPITIVE = 17375,
GO_BRISTELIMB_CAGE = 181714,
- CAPITIVE_SAY_1 = -1000474,
- CAPITIVE_SAY_2 = -1000475,
- CAPITIVE_SAY_3 = -1000476,
+ CAPITIVE_SAY = 0,
POINT_INIT = 1,
EVENT_DESPAWN = 1,
@@ -673,9 +673,7 @@ class npc_stillpine_capitive : public CreatureScript
struct npc_stillpine_capitiveAI : public ScriptedAI
{
- npc_stillpine_capitiveAI(Creature* creature) : ScriptedAI(creature)
- {
- }
+ npc_stillpine_capitiveAI(Creature* creature) : ScriptedAI(creature) {}
void Reset()
{
@@ -693,7 +691,7 @@ class npc_stillpine_capitive : public CreatureScript
{
if (owner)
{
- DoScriptText(RAND(CAPITIVE_SAY_1, CAPITIVE_SAY_2, CAPITIVE_SAY_3), me, owner);
+ Talk(CAPITIVE_SAY, owner->GetGUID());
_player = owner;
}
Position pos;
diff --git a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp
index 339cd02c2e3..3b77ee34275 100644
--- a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp
@@ -158,7 +158,7 @@ enum Stillpine
NPC_PRINCESS_STILLPINE = 17682,
GO_PRINCESS_STILLPINES_CAGE = 181928,
SPELL_OPENING_PRINCESS_STILLPINE_CREDIT = 31003,
- SAY_DIRECTION = -1800074
+ SAY_DIRECTION = 0
};
class go_princess_stillpines_cage : public GameObjectScript
@@ -191,7 +191,7 @@ public:
{
if (type == POINT_MOTION_TYPE && id == 1)
{
- DoScriptText(SAY_DIRECTION, me);
+ Talk(SAY_DIRECTION);
me->DespawnOrUnsummon();
}
}
diff --git a/src/server/scripts/Kalimdor/boss_azuregos.cpp b/src/server/scripts/Kalimdor/boss_azuregos.cpp
index 3b431d55a2c..7bc2e96e0dc 100644
--- a/src/server/scripts/Kalimdor/boss_azuregos.cpp
+++ b/src/server/scripts/Kalimdor/boss_azuregos.cpp
@@ -28,7 +28,7 @@ EndScriptData */
enum Say
{
- SAY_TELEPORT = -1000100
+ SAY_TELEPORT = 0
};
enum Spells
@@ -89,7 +89,7 @@ public:
if (TeleportTimer <= diff)
{
- DoScriptText(SAY_TELEPORT, me);
+ Talk(SAY_TELEPORT);
ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList();
ThreatContainer::StorageType::const_iterator i = threatlist.begin();
for (i = threatlist.begin(); i != threatlist.end(); ++i)
diff --git a/src/server/scripts/Kalimdor/darkshore.cpp b/src/server/scripts/Kalimdor/darkshore.cpp
index 5d10076c114..921cc6aaf97 100644
--- a/src/server/scripts/Kalimdor/darkshore.cpp
+++ b/src/server/scripts/Kalimdor/darkshore.cpp
@@ -43,23 +43,12 @@ EndContentData */
enum Kerlonian
{
- SAY_KER_START = -1000434,
-
- EMOTE_KER_SLEEP_1 = -1000435,
- EMOTE_KER_SLEEP_2 = -1000436,
- EMOTE_KER_SLEEP_3 = -1000437,
-
- SAY_KER_SLEEP_1 = -1000438,
- SAY_KER_SLEEP_2 = -1000439,
- SAY_KER_SLEEP_3 = -1000440,
- SAY_KER_SLEEP_4 = -1000441,
-
- EMOTE_KER_AWAKEN = -1000445,
-
- SAY_KER_ALERT_1 = -1000442,
- SAY_KER_ALERT_2 = -1000443,
-
- SAY_KER_END = -1000444,
+ SAY_KER_START = 0,
+ EMOTE_KER_SLEEP = 1,
+ SAY_KER_SLEEP = 2,
+ SAY_KER_ALERT_1 = 3,
+ SAY_KER_END = 4,
+ EMOTE_KER_AWAKEN = 5,
SPELL_SLEEP_VISUAL = 25148,
SPELL_AWAKEN = 17536,
@@ -81,7 +70,7 @@ public:
if (npc_kerlonianAI* pKerlonianAI = CAST_AI(npc_kerlonian::npc_kerlonianAI, creature->AI()))
{
creature->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_KER_START, creature, player);
+ creature->AI()->Talk(SAY_KER_START, player->GetGUID());
pKerlonianAI->StartFollow(player, FACTION_KER_ESCORTEE, quest);
}
}
@@ -118,7 +107,7 @@ public:
if (player->GetQuestStatus(QUEST_SLEEPER_AWAKENED) == QUEST_STATUS_INCOMPLETE)
player->GroupEventHappens(QUEST_SLEEPER_AWAKENED, me);
- DoScriptText(SAY_KER_END, me);
+ Talk(SAY_KER_END);
}
SetFollowComplete();
@@ -136,9 +125,9 @@ public:
{
SetFollowPaused(true);
- DoScriptText(RAND(EMOTE_KER_SLEEP_1, EMOTE_KER_SLEEP_2, EMOTE_KER_SLEEP_3), me);
+ Talk(EMOTE_KER_SLEEP);
- DoScriptText(RAND(SAY_KER_SLEEP_1, SAY_KER_SLEEP_2, SAY_KER_SLEEP_3, SAY_KER_SLEEP_4), me);
+ Talk(SAY_KER_SLEEP);
me->SetStandState(UNIT_STAND_STATE_SLEEP);
DoCast(me, SPELL_SLEEP_VISUAL, false);
@@ -149,7 +138,7 @@ public:
me->RemoveAurasDueToSpell(SPELL_SLEEP_VISUAL);
me->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(EMOTE_KER_AWAKEN, me);
+ Talk(EMOTE_KER_AWAKEN);
SetFollowPaused(false);
}
@@ -187,19 +176,19 @@ public:
enum Remtravel
{
- SAY_REM_START = -1000327,
- SAY_REM_AGGRO = -1000328,
- SAY_REM_RAMP1_1 = -1000329,
- SAY_REM_RAMP1_2 = -1000330,
- SAY_REM_BOOK = -1000331,
- SAY_REM_TENT1_1 = -1000332,
- SAY_REM_TENT1_2 = -1000333,
- SAY_REM_MOSS = -1000334,
- EMOTE_REM_MOSS = -1000335,
- SAY_REM_MOSS_PROGRESS = -1000336,
- SAY_REM_PROGRESS = -1000337,
- SAY_REM_REMEMBER = -1000338,
- EMOTE_REM_END = -1000339,
+ SAY_REM_START = 0,
+ SAY_REM_AGGRO = 1,
+ SAY_REM_RAMP1_1 = 2,
+ SAY_REM_RAMP1_2 = 3,
+ SAY_REM_BOOK = 4,
+ SAY_REM_TENT1_1 = 5,
+ SAY_REM_TENT1_2 = 6,
+ SAY_REM_MOSS = 7,
+ EMOTE_REM_MOSS = 8,
+ SAY_REM_MOSS_PROGRESS = 9,
+ SAY_REM_PROGRESS = 10,
+ SAY_REM_REMEMBER = 11,
+ EMOTE_REM_END = 12,
FACTION_ESCORTEE = 10,
QUEST_ABSENT_MINDED_PT2 = 731,
@@ -242,40 +231,40 @@ public:
switch (waypointId)
{
case 0:
- DoScriptText(SAY_REM_START, me, player);
+ Talk(SAY_REM_START, player->GetGUID());
break;
case 5:
- DoScriptText(SAY_REM_RAMP1_1, me, player);
+ Talk(SAY_REM_RAMP1_1, player->GetGUID());
break;
case 6:
DoSpawnCreature(NPC_GRAVEL_SCOUT, -10.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
DoSpawnCreature(NPC_GRAVEL_BONE, -10.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break;
case 9:
- DoScriptText(SAY_REM_RAMP1_2, me, player);
+ Talk(SAY_REM_RAMP1_2, player->GetGUID());
break;
case 14:
//depend quest rewarded?
- DoScriptText(SAY_REM_BOOK, me, player);
+ Talk(SAY_REM_BOOK, player->GetGUID());
break;
case 15:
- DoScriptText(SAY_REM_TENT1_1, me, player);
+ Talk(SAY_REM_TENT1_1, player->GetGUID());
break;
case 16:
DoSpawnCreature(NPC_GRAVEL_SCOUT, -10.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
DoSpawnCreature(NPC_GRAVEL_BONE, -10.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break;
case 17:
- DoScriptText(SAY_REM_TENT1_2, me, player);
+ Talk(SAY_REM_TENT1_2, player->GetGUID());
break;
case 26:
- DoScriptText(SAY_REM_MOSS, me, player);
+ Talk(SAY_REM_MOSS, player->GetGUID());
break;
case 27:
- DoScriptText(EMOTE_REM_MOSS, me, player);
+ Talk(EMOTE_REM_MOSS, player->GetGUID());
break;
case 28:
- DoScriptText(SAY_REM_MOSS_PROGRESS, me, player);
+ Talk(SAY_REM_MOSS_PROGRESS, player->GetGUID());
break;
case 29:
DoSpawnCreature(NPC_GRAVEL_SCOUT, -15.0f, 3.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
@@ -283,13 +272,13 @@ public:
DoSpawnCreature(NPC_GRAVEL_GEO, -15.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break;
case 31:
- DoScriptText(SAY_REM_PROGRESS, me, player);
+ Talk(SAY_REM_PROGRESS, player->GetGUID());
break;
case 41:
- DoScriptText(SAY_REM_REMEMBER, me, player);
+ Talk(SAY_REM_REMEMBER, player->GetGUID());
break;
case 42:
- DoScriptText(EMOTE_REM_END, me, player);
+ Talk(EMOTE_REM_END, player->GetGUID());
player->GroupEventHappens(QUEST_ABSENT_MINDED_PT2, me);
break;
}
@@ -301,7 +290,7 @@ public:
void EnterCombat(Unit* who)
{
if (urand(0, 1))
- DoScriptText(SAY_REM_AGGRO, me, who);
+ Talk(SAY_REM_AGGRO, who->GetGUID());
}
void JustSummoned(Creature* /*pSummoned*/)
@@ -319,8 +308,8 @@ public:
enum Threshwackonator
{
- EMOTE_START = -1000325, //signed for 4966
- SAY_AT_CLOSE = -1000326, //signed for 4966
+ EMOTE_START = 0,
+ SAY_AT_CLOSE = 1,
QUEST_GYROMAST_REV = 2078,
NPC_GELKAK = 6667,
FACTION_HOSTILE = 14
@@ -342,7 +331,7 @@ public:
if (npc_threshwackonatorAI* pThreshAI = CAST_AI(npc_threshwackonator::npc_threshwackonatorAI, creature->AI()))
{
- DoScriptText(EMOTE_START, creature);
+ creature->AI()->Talk(EMOTE_START);
pThreshAI->StartFollow(player);
}
}
@@ -378,7 +367,7 @@ public:
{
if (me->IsWithinDistInMap(who, 10.0f))
{
- DoScriptText(SAY_AT_CLOSE, who);
+ Talk(SAY_AT_CLOSE, who->GetGUID());
DoAtEnd();
}
}
diff --git a/src/server/scripts/Kalimdor/desolace.cpp b/src/server/scripts/Kalimdor/desolace.cpp
index 30a87ef0197..8c56714e614 100644
--- a/src/server/scripts/Kalimdor/desolace.cpp
+++ b/src/server/scripts/Kalimdor/desolace.cpp
@@ -40,9 +40,7 @@ EndContentData */
enum DyingKodo
{
// signed for 9999
- SAY_SMEED_HOME_1 = -1000348,
- SAY_SMEED_HOME_2 = -1000349,
- SAY_SMEED_HOME_3 = -1000350,
+ SAY_SMEED_HOME = 0,
QUEST_KODO = 5561,
@@ -134,7 +132,8 @@ public:
if (me->IsWithinDistInMap(who, 10.0f))
{
- DoScriptText(RAND(SAY_SMEED_HOME_1, SAY_SMEED_HOME_2, SAY_SMEED_HOME_3), who);
+ if (Creature* talker = who->ToCreature())
+ talker->AI()->Talk(SAY_SMEED_HOME);
//spell have no implemented effect (dummy), so useful to notify spellHit
DoCast(me, SPELL_KODO_KOMBO_GOSSIP, true);
diff --git a/src/server/scripts/Kalimdor/durotar.cpp b/src/server/scripts/Kalimdor/durotar.cpp
index 83111829c9e..04e65693154 100644
--- a/src/server/scripts/Kalimdor/durotar.cpp
+++ b/src/server/scripts/Kalimdor/durotar.cpp
@@ -28,7 +28,7 @@
enum LazyPeonYells
{
- SAY_SPELL_HIT = -1000600 //Ow! OK, I''ll get back to work, $N!'
+ SAY_SPELL_HIT = 0
};
enum LazyPeon
@@ -77,7 +77,7 @@ public:
&& CAST_PLR(caster)->GetQuestStatus(QUEST_LAZY_PEONS) == QUEST_STATUS_INCOMPLETE)
{
caster->ToPlayer()->KilledMonsterCredit(me->GetEntry(), me->GetGUID());
- DoScriptText(SAY_SPELL_HIT, me, caster);
+ Talk(SAY_SPELL_HIT, caster->GetGUID());
me->RemoveAllAuras();
if (GameObject* Lumberpile = me->FindNearestGameObject(GO_LUMBERPILE, 20))
me->GetMotionMaster()->MovePoint(1, Lumberpile->GetPositionX()-1, Lumberpile->GetPositionY(), Lumberpile->GetPositionZ());
diff --git a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp
index 6ab9b653c5d..018b39c58e8 100644
--- a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp
+++ b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp
@@ -138,22 +138,16 @@ class mobs_risen_husk_spirit : public CreatureScript
enum TheramoreGuard
{
- SAY_QUEST1 = -1000641,
- SAY_QUEST2 = -1000642,
- SAY_QUEST3 = -1000643,
- SAY_QUEST4 = -1000644,
- SAY_QUEST5 = -1000645,
- SAY_QUEST6 = -1000646,
- SAY_QUEST7 = -1000647,
- SAY_QUEST8 = -1000648,
- SAY_QUEST9 = -1000649,
-
- QUEST_DISCREDITING_THE_DESERTERS = 11133,
-
- NPC_THERAMORE_GUARD = 4979,
-
- SPELL_DOCTORED_LEAFLET = 42725,
- SPELL_PROPAGANDIZED = 42246,
+ QUEST_DISCREDITING_THE_DESERTERS = 11133,
+
+ NPC_THERAMORE_GUARD = 4979,
+
+ SPELL_DOCTORED_LEAFLET = 42725,
+ SPELL_PROPAGANDIZED = 42246,
+
+ SAY_QUEST1 = 0,
+ SAY_QUEST2 = 1,
+ SAY_QUEST3 = 2
};
#define GOSSIP_ITEM_THERAMORE_GUARD "You look like an intelligent person. Why don't you read one of these leaflets and give it some thought?"
@@ -181,7 +175,7 @@ public:
{
player->CLOSE_GOSSIP_MENU();
player->KilledMonsterCredit(NPC_THERAMORE_GUARD, 0);
- DoScriptText(SAY_QUEST1, creature);
+ creature->AI()->Talk(SAY_QUEST1);
creature->CastSpell(creature, SPELL_DOCTORED_LEAFLET, false);
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
CAST_AI(npc_theramore_guard::npc_theramore_guardAI, creature->AI())->YellTimer = 4000;
@@ -220,12 +214,12 @@ public:
switch (Step)
{
case 0:
- DoScriptText(RAND(SAY_QUEST2, SAY_QUEST3, SAY_QUEST4, SAY_QUEST5, SAY_QUEST6), me);
+ Talk(SAY_QUEST2);
YellTimer = 3000;
++Step;
break;
case 1:
- DoScriptText(RAND(SAY_QUEST7, SAY_QUEST8, SAY_QUEST9), me);
+ Talk(SAY_QUEST3);
me->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH);
Step = 0;
bYellTimer = false;
@@ -328,12 +322,11 @@ public:
enum Hendel
{
- // looks like all this text ids are wrong.
- SAY_PROGRESS_1_TER = -1000411, // signed for 3568
- SAY_PROGRESS_2_HEN = -1000412, // signed for 3568
- SAY_PROGRESS_3_TER = -1000413,
- SAY_PROGRESS_4_TER = -1000414,
- EMOTE_SURRENDER = -1000415,
+ SAY_PROGRESS_1_TER = 0,
+ SAY_PROGRESS_2_HEN = 1,
+ SAY_PROGRESS_3_TER = 2,
+ SAY_PROGRESS_4_TER = 3,
+ EMOTE_SURRENDER = 4,
QUEST_MISSING_DIPLO_PT16 = 1324,
FACTION_HOSTILE = 168, //guessed, may be different
@@ -391,7 +384,7 @@ public:
if (Player* player = pDoneBy->GetCharmerOrOwnerPlayerOrPlayerItself())
player->GroupEventHappens(QUEST_MISSING_DIPLO_PT16, me);
- DoScriptText(EMOTE_SURRENDER, me);
+ Talk(EMOTE_SURRENDER);
EnterEvadeMode();
}
}
@@ -407,8 +400,8 @@ Position const MovePosition = {-2967.030f, -3872.1799f, 35.620f, 0.0f};
enum Zelfrax
{
- SAY_ZELFRAX = -1000472,
- SAY_ZELFRAX_2 = -1000473
+ SAY_ZELFRAX1 = 0,
+ SAY_ZELFRAX2 = 1
};
class npc_zelfrax : public CreatureScript
@@ -461,8 +454,8 @@ public:
{
SetCombatMovement(false);
me->GetMotionMaster()->MovePoint(0, MovePosition);
- DoScriptText(SAY_ZELFRAX, me);
- DoScriptText(SAY_ZELFRAX_2, me);
+ Talk(SAY_ZELFRAX1);
+ Talk(SAY_ZELFRAX2);
}
void UpdateAI(uint32 const /*Diff*/)
@@ -484,16 +477,16 @@ enum Stinky
{
QUEST_STINKYS_ESCAPE_H = 1270,
QUEST_STINKYS_ESCAPE_A = 1222,
- SAY_QUEST_ACCEPTED = -1000507,
- SAY_STAY_1 = -1000508,
- SAY_STAY_2 = -1000509,
- SAY_STAY_3 = -1000510,
- SAY_STAY_4 = -1000511,
- SAY_STAY_5 = -1000512,
- SAY_STAY_6 = -1000513,
- SAY_QUEST_COMPLETE = -1000514,
- SAY_ATTACKED_1 = -1000515,
- EMOTE_DISAPPEAR = -1000516
+ SAY_QUEST_ACCEPTED = 0,
+ SAY_STAY_1 = 1,
+ SAY_STAY_2 = 2,
+ SAY_STAY_3 = 3,
+ SAY_STAY_4 = 4,
+ SAY_STAY_5 = 5,
+ SAY_STAY_6 = 6,
+ SAY_QUEST_COMPLETE = 7,
+ SAY_ATTACKED_1 = 8,
+ EMOTE_DISAPPEAR = 9
};
class npc_stinky : public CreatureScript
@@ -514,7 +507,7 @@ public:
{
creature->setFaction(FACTION_ESCORT_N_NEUTRAL_ACTIVE);
creature->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_QUEST_ACCEPTED, creature);
+ creature->AI()->Talk(SAY_QUEST_ACCEPTED);
pEscortAI->Start(false, false, player->GetGUID());
}
}
@@ -534,29 +527,29 @@ public:
switch (waypointId)
{
case 7:
- DoScriptText(SAY_STAY_1, me, player);
+ Talk(SAY_STAY_1, player->GetGUID());
break;
case 11:
- DoScriptText(SAY_STAY_2, me, player);
+ Talk(SAY_STAY_2, player->GetGUID());
break;
case 25:
- DoScriptText(SAY_STAY_3, me, player);
+ Talk(SAY_STAY_3, player->GetGUID());
break;
case 26:
- DoScriptText(SAY_STAY_4, me, player);
+ Talk(SAY_STAY_4, player->GetGUID());
break;
case 27:
- DoScriptText(SAY_STAY_5, me, player);
+ Talk(SAY_STAY_5, player->GetGUID());
break;
case 28:
- DoScriptText(SAY_STAY_6, me, player);
+ Talk(SAY_STAY_6, player->GetGUID());
me->SetStandState(UNIT_STAND_STATE_KNEEL);
break;
case 29:
me->SetStandState(UNIT_STAND_STATE_STAND);
break;
case 37:
- DoScriptText(SAY_QUEST_COMPLETE, me, player);
+ Talk(SAY_QUEST_COMPLETE, player->GetGUID());
me->SetSpeed(MOVE_RUN, 1.2f, true);
me->SetWalk(false);
if (player->GetQuestStatus(QUEST_STINKYS_ESCAPE_H))
@@ -565,14 +558,14 @@ public:
player->GroupEventHappens(QUEST_STINKYS_ESCAPE_A, me);
break;
case 39:
- DoScriptText(EMOTE_DISAPPEAR, me);
+ Talk(EMOTE_DISAPPEAR);
break;
}
}
void EnterCombat(Unit* who)
{
- DoScriptText(SAY_ATTACKED_1, me, who);
+ Talk(SAY_ATTACKED_1, who->GetGUID());
}
void Reset() {}
diff --git a/src/server/scripts/Kalimdor/feralas.cpp b/src/server/scripts/Kalimdor/feralas.cpp
index df4345b3aae..148f53c9e57 100644
--- a/src/server/scripts/Kalimdor/feralas.cpp
+++ b/src/server/scripts/Kalimdor/feralas.cpp
@@ -75,12 +75,10 @@ public:
enum OOX
{
- //signed for 7806
- SAY_OOX_START = -1000287,
- SAY_OOX_AGGRO1 = -1000288,
- SAY_OOX_AGGRO2 = -1000289,
- SAY_OOX_AMBUSH = -1000290,
- SAY_OOX_END = -1000292,
+ SAY_OOX_START = 0,
+ SAY_OOX_AGGRO = 1,
+ SAY_OOX_AMBUSH = 2,
+ SAY_OOX_END = 3,
NPC_YETI = 7848,
NPC_GORILLA = 5260,
@@ -103,7 +101,7 @@ public:
{
if (quest->GetQuestId() == QUEST_RESCUE_OOX22FE)
{
- DoScriptText(SAY_OOX_START, creature);
+ creature->AI()->Talk(SAY_OOX_START);
//change that the npc is not lying dead on the ground
creature->SetStandState(UNIT_STAND_STATE_STAND);
@@ -135,28 +133,28 @@ public:
{
// First Ambush(3 Yetis)
case 11:
- DoScriptText(SAY_OOX_AMBUSH, me);
+ Talk(SAY_OOX_AMBUSH);
me->SummonCreature(NPC_YETI, -4841.01f, 1593.91f, 73.42f, 3.98f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
me->SummonCreature(NPC_YETI, -4837.61f, 1568.58f, 78.21f, 3.13f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
me->SummonCreature(NPC_YETI, -4841.89f, 1569.95f, 76.53f, 0.68f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
break;
//Second Ambush(3 Gorillas)
case 21:
- DoScriptText(SAY_OOX_AMBUSH, me);
+ Talk(SAY_OOX_AMBUSH);
me->SummonCreature(NPC_GORILLA, -4595.81f, 2005.99f, 53.08f, 3.74f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
me->SummonCreature(NPC_GORILLA, -4597.53f, 2008.31f, 52.70f, 3.78f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
me->SummonCreature(NPC_GORILLA, -4599.37f, 2010.59f, 52.77f, 3.84f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
break;
//Third Ambush(4 Gnolls)
case 30:
- DoScriptText(SAY_OOX_AMBUSH, me);
+ Talk(SAY_OOX_AMBUSH);
me->SummonCreature(NPC_WOODPAW_REAVER, -4425.14f, 2075.87f, 47.77f, 3.77f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
me->SummonCreature(NPC_WOODPAW_BRUTE, -4426.68f, 2077.98f, 47.57f, 3.77f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
me->SummonCreature(NPC_WOODPAW_MYSTIC, -4428.33f, 2080.24f, 47.43f, 3.87f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
me->SummonCreature(NPC_WOODPAW_ALPHA, -4430.04f, 2075.54f, 46.83f, 3.81f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
break;
case 37:
- DoScriptText(SAY_OOX_END, me);
+ Talk(SAY_OOX_END);
// Award quest credit
if (Player* player = GetPlayerForEscort())
player->GroupEventHappens(QUEST_RESCUE_OOX22FE, me);
@@ -174,7 +172,7 @@ public:
{
//For an small probability the npc says something when he get aggro
if (urand(0, 9) > 7)
- DoScriptText(RAND(SAY_OOX_AGGRO1, SAY_OOX_AGGRO2), me);
+ Talk(SAY_OOX_AGGRO);
}
void JustSummoned(Creature* summoned)
diff --git a/src/server/scripts/Kalimdor/moonglade.cpp b/src/server/scripts/Kalimdor/moonglade.cpp
index 6d93e074e79..f438275b82a 100644
--- a/src/server/scripts/Kalimdor/moonglade.cpp
+++ b/src/server/scripts/Kalimdor/moonglade.cpp
@@ -37,6 +37,9 @@ EndContentData */
#include "ScriptedGossip.h"
#include "Player.h"
#include "SpellInfo.h"
+#include "Cell.h"
+#include "CellImpl.h"
+#include "GridNotifiers.h"
/*######
## npc_bunthen_plainswind
@@ -275,14 +278,8 @@ enum ClintarSpirit
{
ASPECT_RAVEN = 22915,
- //from -1000292 to -1000287 are signed for 7806. but all this texts ids wrong.
- CLINTAR_SPIRIT_SAY_START = -1000286,
- CLINTAR_SPIRIT_SAY_UNDER_ATTACK_1 = -1000287,
- CLINTAR_SPIRIT_SAY_UNDER_ATTACK_2 = -1000288,
- CLINTAR_SPIRIT_SAY_GET_ONE = -1000289,
- CLINTAR_SPIRIT_SAY_GET_TWO = -1000290,
- CLINTAR_SPIRIT_SAY_GET_THREE = -1000291,
- CLINTAR_SPIRIT_SAY_GET_FINAL = -1000292
+ // Texts for EnterCombat, the event and the end of the event are missing
+ CLINTAR_SPIRIT_SAY_START = 0,
};
class npc_clintar_spirit : public CreatureScript
@@ -325,6 +322,28 @@ public:
}
}
+ void IsSummonedBy(Unit* /*summoner*/)
+ {
+ std::list<Player*> playerOnQuestList;
+ Trinity::AnyPlayerInObjectRangeCheck checker(me, 5.0f);
+ Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(me, playerOnQuestList, checker);
+ me->VisitNearbyWorldObject(5.0f, searcher);
+ for (std::list<Player*>::const_iterator itr = playerOnQuestList.begin(); itr != playerOnQuestList.end(); ++itr)
+ {
+ // Check if found player target has active quest
+ if (Player* player = (*itr))
+ {
+ if (player->GetQuestStatus(10965) == QUEST_STATUS_INCOMPLETE)
+ {
+ StartEvent(player);
+ break;
+ }
+ }
+ else
+ break;
+ }
+ }
+
void JustDied(Unit* /*killer*/)
{
if (!PlayerGUID)
@@ -350,15 +369,6 @@ public:
npc_escortAI::EnterEvadeMode();
}
- void EnterCombat(Unit* who)
- {
- switch (urand(0, 1))
- {
- case 0: DoScriptText(CLINTAR_SPIRIT_SAY_UNDER_ATTACK_1, me, who); break;
- case 1: DoScriptText(CLINTAR_SPIRIT_SAY_UNDER_ATTACK_2, me, who); break;
- }
- }
-
void StartEvent(Player* player)
{
if (player && player->GetQuestStatus(10965) == QUEST_STATUS_INCOMPLETE)
@@ -373,7 +383,7 @@ public:
return;
}
- void UpdateAI(const uint32 diff)
+ void UpdateAI(uint32 const diff)
{
npc_escortAI::UpdateAI(diff);
@@ -410,7 +420,7 @@ public:
switch (Step)
{
case 0:
- me->Say(CLINTAR_SPIRIT_SAY_START, 0, PlayerGUID);
+ Talk(CLINTAR_SPIRIT_SAY_START, PlayerGUID);
EventTimer = 8000;
Step = 1;
break;
@@ -429,7 +439,7 @@ public:
break;
case 1:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
- DoScriptText(CLINTAR_SPIRIT_SAY_GET_ONE, me, player);
+ // Needs text
EventOnWait = false;
break;
}
@@ -452,7 +462,7 @@ public:
switch (Step)
{
case 0:
- DoScriptText(CLINTAR_SPIRIT_SAY_GET_TWO, me, player);
+ // Needs text
EventTimer = 15000;
Step = 1;
break;
@@ -496,7 +506,7 @@ public:
switch (Step)
{
case 0:
- DoScriptText(CLINTAR_SPIRIT_SAY_GET_THREE, me, player);
+ // Needs text
EventTimer = 4000;
Step = 1;
break;
@@ -510,7 +520,7 @@ public:
{
case 0:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 2);
- DoScriptText(CLINTAR_SPIRIT_SAY_GET_FINAL, me, player);
+ // Needs text
player->CompleteQuest(10965);
EventTimer = 1500;
Step = 1;
@@ -548,30 +558,6 @@ public:
};
/*####
-# npc_clintar_dreamwalker
-####*/
-
-enum Clintar
-{
- CLINTAR_SPIRIT = 22916
-};
-
-class npc_clintar_dreamwalker : public CreatureScript
-{
-public:
- npc_clintar_dreamwalker() : CreatureScript("npc_clintar_dreamwalker") { }
-
- bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
- {
- if (quest->GetQuestId() == 10965)
- if (Creature* clintar_spirit = creature->SummonCreature(CLINTAR_SPIRIT, ClintarSpiritSummon, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 100000))
- CAST_AI(npc_clintar_spirit::npc_clintar_spiritAI, clintar_spirit->AI())->StartEvent(player);
- return true;
- }
-
-};
-
-/*####
# npc_omen
####*/
@@ -722,7 +708,6 @@ void AddSC_moonglade()
new npc_bunthen_plainswind();
new npc_great_bear_spirit();
new npc_silva_filnaveth();
- new npc_clintar_dreamwalker();
new npc_clintar_spirit();
new npc_omen();
new npc_giant_spotlight();
diff --git a/src/server/scripts/Kalimdor/mulgore.cpp b/src/server/scripts/Kalimdor/mulgore.cpp
index 8ed26b8cf38..a86f891c6c0 100644
--- a/src/server/scripts/Kalimdor/mulgore.cpp
+++ b/src/server/scripts/Kalimdor/mulgore.cpp
@@ -76,10 +76,9 @@ public:
enum KyleFrenzied
{
- //emote signed for 7780 but propably thats wrong id.
- EMOTE_SEE_LUNCH = -1000340,
- EMOTE_EAT_LUNCH = -1000341,
- EMOTE_DANCE = -1000342,
+ EMOTE_SEE_LUNCH = 0,
+ EMOTE_EAT_LUNCH = 1,
+ EMOTE_DANCE = 2,
SPELL_LUNCH = 42222,
NPC_KYLE_FRENZIED = 23616,
@@ -134,7 +133,7 @@ public:
}
EventActive = true;
- DoScriptText(EMOTE_SEE_LUNCH, me);
+ Talk(EMOTE_SEE_LUNCH);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_CREATURE_SPECIAL);
}
}
@@ -173,7 +172,7 @@ public:
}
break;
case 2:
- DoScriptText(EMOTE_EAT_LUNCH, me);
+ Talk(EMOTE_EAT_LUNCH);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING);
break;
case 3:
@@ -184,7 +183,7 @@ public:
break;
case 4:
EventTimer = 30000;
- DoScriptText(EMOTE_DANCE, me);
+ Talk(EMOTE_DANCE);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_DANCESPECIAL);
break;
case 5:
diff --git a/src/server/scripts/Kalimdor/silithus.cpp b/src/server/scripts/Kalimdor/silithus.cpp
index df7d3b1ee89..f9b16b907eb 100644
--- a/src/server/scripts/Kalimdor/silithus.cpp
+++ b/src/server/scripts/Kalimdor/silithus.cpp
@@ -230,56 +230,56 @@ public:
####*/
enum EternalBoard
{
- QUEST_A_PAWN_ON_THE_ETERNAL_BOARD = 8519,
-
- FACTION_HOSTILE = 14,
- FACTION_FRIENDLY = 35,
-
- C_ANACHRONOS = 15381,
- C_FANDRAL_STAGHELM = 15382,
- C_ARYGOS = 15380,
- C_MERITHRA = 15378,
- C_CAELESTRASZ = 15379,
-
- ANACHRONOS_SAY_1 = -1350000,
- ANACHRONOS_SAY_2 = -1350001,
- ANACHRONOS_SAY_3 = -1350002,
- ANACHRONOS_SAY_4 = -1350003,
- ANACHRONOS_SAY_5 = -1350004,
- ANACHRONOS_SAY_6 = -1350005,
- ANACHRONOS_SAY_7 = -1350006,
- ANACHRONOS_SAY_8 = -1350007,
- ANACHRONOS_SAY_9 = -1350008,
- ANACHRONOS_SAY_10 = -1350009,
- ANACHRONOS_EMOTE_1 = -1350010,
- ANACHRONOS_EMOTE_2 = -1350011,
- ANACHRONOS_EMOTE_3 = -1350012,
-
- FANDRAL_SAY_1 = -1350013,
- FANDRAL_SAY_2 = -1350014,
- FANDRAL_SAY_3 = -1350015,
- FANDRAL_SAY_4 = -1350016,
- FANDRAL_SAY_5 = -1350017,
- FANDRAL_SAY_6 = -1350018,
- FANDRAL_EMOTE_1 = -1350019,
- FANDRAL_EMOTE_2 = -1350020,
-
- CAELESTRASZ_SAY_1 = -1350021,
- CAELESTRASZ_SAY_2 = -1350022,
- CAELESTRASZ_YELL_1 = -1350023,
-
- ARYGOS_SAY_1 = -1350024,
- ARYGOS_YELL_1 = -1350025,
- ARYGOS_EMOTE_1 = -1350026,
-
- MERITHRA_SAY_1 = -1350027,
- MERITHRA_SAY_2 = -1350028,
- MERITHRA_YELL_1 = -1350029,
- MERITHRA_EMOTE_1 = -1350030,
-
- GO_GATE_OF_AHN_QIRAJ = 176146,
- GO_GLYPH_OF_AHN_QIRAJ = 176148,
- GO_ROOTS_OF_AHN_QIRAJ = 176147
+ QUEST_A_PAWN_ON_THE_ETERNAL_BOARD = 8519,
+
+ FACTION_HOSTILE = 14,
+ FACTION_FRIENDLY = 35,
+
+ C_ANACHRONOS = 15381,
+ C_FANDRAL_STAGHELM = 15382,
+ C_ARYGOS = 15380,
+ C_MERITHRA = 15378,
+ C_CAELESTRASZ = 15379,
+
+ ANACHRONOS_SAY_1 = 0,
+ ANACHRONOS_SAY_2 = 1,
+ ANACHRONOS_SAY_3 = 2,
+ ANACHRONOS_SAY_4 = 3,
+ ANACHRONOS_SAY_5 = 4,
+ ANACHRONOS_SAY_6 = 5,
+ ANACHRONOS_SAY_7 = 6,
+ ANACHRONOS_SAY_8 = 7,
+ ANACHRONOS_SAY_9 = 8,
+ ANACHRONOS_SAY_10 = 9,
+ ANACHRONOS_EMOTE_1 = 10,
+ ANACHRONOS_EMOTE_2 = 11,
+ ANACHRONOS_EMOTE_3 = 12,
+
+ FANDRAL_SAY_1 = 0,
+ FANDRAL_SAY_2 = 1,
+ FANDRAL_SAY_3 = 2,
+ FANDRAL_SAY_4 = 3,
+ FANDRAL_SAY_5 = 4,
+ FANDRAL_SAY_6 = 5,
+ FANDRAL_EMOTE_1 = 6,
+ FANDRAL_EMOTE_2 = 7,
+
+ CAELESTRASZ_SAY_1 = 0,
+ CAELESTRASZ_SAY_2 = 1,
+ CAELESTRASZ_YELL_1 = 2,
+
+ ARYGOS_SAY_1 = 0,
+ ARYGOS_YELL_1 = 1,
+ ARYGOS_EMOTE_1 = 2,
+
+ MERITHRA_SAY_1 = 0,
+ MERITHRA_SAY_2 = 1,
+ MERITHRA_YELL_1 = 2,
+ MERITHRA_EMOTE_1 = 3,
+
+ GO_GATE_OF_AHN_QIRAJ = 176146,
+ GO_GLYPH_OF_AHN_QIRAJ = 176148,
+ GO_ROOTS_OF_AHN_QIRAJ = 176147
};
/*#####
# Quest: A Pawn on the Eternal Board
@@ -530,10 +530,10 @@ public:
if (!player)
return;
- Unit* Fandral = player->FindNearestCreature(C_FANDRAL_STAGHELM, 100.0f, me);
- Unit* Arygos = player->FindNearestCreature(C_ARYGOS, 100.0f, me);
- Unit* Caelestrasz = player->FindNearestCreature(C_CAELESTRASZ, 100.0f, me);
- Unit* Merithra = player->FindNearestCreature(C_MERITHRA, 100.0f, me);
+ Creature* Fandral = player->FindNearestCreature(C_FANDRAL_STAGHELM, 100.0f, me);
+ Creature* Arygos = player->FindNearestCreature(C_ARYGOS, 100.0f, me);
+ Creature* Caelestrasz = player->FindNearestCreature(C_CAELESTRASZ, 100.0f, me);
+ Creature* Merithra = player->FindNearestCreature(C_MERITHRA, 100.0f, me);
if (!Fandral || !Arygos || !Caelestrasz || !Merithra)
return;
@@ -544,35 +544,35 @@ public:
switch (AnimationCount)
{
case 0:
- DoScriptText(ANACHRONOS_SAY_1, me, Fandral);
+ Talk(ANACHRONOS_SAY_1,Fandral->GetGUID());
break;
case 1:
Fandral->SetTarget(me->GetGUID());
- DoScriptText(FANDRAL_SAY_1, Fandral, me);
+ Fandral->AI()->Talk(FANDRAL_SAY_1, me->GetGUID());
break;
case 2:
Fandral->SetTarget(0);
- DoScriptText(MERITHRA_EMOTE_1, Merithra);
+ Merithra->AI()->Talk(MERITHRA_EMOTE_1);
break;
case 3:
- DoScriptText(MERITHRA_SAY_1, Merithra);
+ Merithra->AI()->Talk(MERITHRA_SAY_1);
break;
case 4:
- DoScriptText(ARYGOS_EMOTE_1, Arygos);
+ Arygos->AI()->Talk(ARYGOS_EMOTE_1);
break;
case 5:
Caelestrasz->SetTarget(Fandral->GetGUID());
- DoScriptText(CAELESTRASZ_SAY_1, Caelestrasz);
+ Caelestrasz->AI()->Talk(CAELESTRASZ_SAY_1);
break;
case 6:
- DoScriptText(MERITHRA_SAY_2, Merithra);
+ Merithra->AI()->Talk(MERITHRA_SAY_2);
break;
case 7:
Caelestrasz->SetTarget(0);
Merithra->GetMotionMaster()->MoveCharge(-8065, 1530, 2.61f, 10);
break;
case 8:
- DoScriptText(MERITHRA_YELL_1, Merithra);
+ Merithra->AI()->Talk(MERITHRA_YELL_1);
break;
case 9:
Merithra->CastSpell(Merithra, 25105, true);
@@ -591,7 +591,7 @@ public:
case 13:
break;
case 14:
- DoScriptText(ARYGOS_SAY_1, Arygos);
+ Arygos->AI()->Talk(ARYGOS_SAY_1);
Merithra->SetVisible(false);
break;
case 15:
@@ -599,7 +599,7 @@ public:
Merithra->GetMotionMaster()->MoveCharge(-8034.535f, 1535.14f, 2.61f, 42);
break;
case 16:
- DoScriptText(ARYGOS_YELL_1, Arygos);
+ Arygos->AI()->Talk(ARYGOS_YELL_1);
break;
case 17:
Arygos->CastSpell(Arygos, 25107, true);
@@ -618,7 +618,7 @@ public:
case 21:
break;
case 22:
- DoScriptText(CAELESTRASZ_SAY_2, Caelestrasz, Fandral);
+ Caelestrasz->AI()->Talk(CAELESTRASZ_SAY_2, Fandral->GetGUID());
break;
case 23:
Caelestrasz->GetMotionMaster()->MoveCharge(-8065, 1530, 2.61f, 10);
@@ -626,7 +626,7 @@ public:
Arygos->GetMotionMaster()->MoveCharge(-8034.535f, 1535.14f, 2.61f, 10);
break;
case 24:
- DoScriptText(CAELESTRASZ_YELL_1, Caelestrasz);
+ Caelestrasz->AI()->Talk(CAELESTRASZ_YELL_1);
break;
case 25:
Caelestrasz->CastSpell(Caelestrasz, 25106, true);
@@ -640,16 +640,16 @@ public:
Caelestrasz->CastSpell(Caelestrasz, 54293, false);
break;
case 28:
- DoScriptText(ANACHRONOS_SAY_2, me, Fandral);
+ Talk(ANACHRONOS_SAY_2, Fandral->GetGUID());
break;
case 29:
Caelestrasz->GetMotionMaster()->MoveCharge(-8095, 1530, 50, 42);
- DoScriptText(FANDRAL_SAY_2, Fandral, me);
+ Fandral->AI()->Talk(FANDRAL_SAY_2);
break;
case 30:
break;
case 31:
- DoScriptText(ANACHRONOS_SAY_3, me, Fandral);
+ Talk(ANACHRONOS_SAY_3, Fandral->GetGUID());
break;
case 32:
Caelestrasz->SetVisible(false);
@@ -658,7 +658,7 @@ public:
me->GetMotionMaster()->MoveCharge(-8113, 1525, 2.77f, 8);
break;//both run to the gate
case 33:
- DoScriptText(ANACHRONOS_SAY_4, me);
+ Talk(ANACHRONOS_SAY_4);
Caelestrasz->GetMotionMaster()->MoveCharge(-8050, 1473, 65, 15);
break; //Text: sands will stop
case 34:
@@ -678,43 +678,43 @@ public:
me->SummonGameObject(GO_GLYPH_OF_AHN_QIRAJ, -8130, 1525, 17.5f, 0, 0, 0, 0, 0, 0);
break;
case 39:
- DoScriptText(ANACHRONOS_SAY_5, me, Fandral);
+ Talk(ANACHRONOS_SAY_5, Fandral->GetGUID());
break;
case 40:
Fandral->CastSpell(me, 25167, true);
break;
case 41:
Fandral->SummonGameObject(GO_ROOTS_OF_AHN_QIRAJ, -8130, 1525, 17.5f, 0, 0, 0, 0, 0, 0);
- DoScriptText(FANDRAL_SAY_3, Fandral);
+ Fandral->AI()->Talk(FANDRAL_SAY_3);
break;
case 42:
me->CastStop();
- DoScriptText(FANDRAL_EMOTE_1, Fandral);
+ Fandral->AI()->Talk(FANDRAL_EMOTE_1);
break;
case 43:
Fandral->CastStop();
break;
case 44:
- DoScriptText(ANACHRONOS_SAY_6, me);
+ Talk(ANACHRONOS_SAY_6);
break;
case 45:
- DoScriptText(ANACHRONOS_SAY_7, me);
+ Talk(ANACHRONOS_SAY_7);
break;
case 46:
- DoScriptText(ANACHRONOS_SAY_8, me);
+ Talk(ANACHRONOS_SAY_8);
me->GetMotionMaster()->MoveCharge(-8110, 1527, 2.77f, 4);
break;
case 47:
- DoScriptText(ANACHRONOS_EMOTE_1, me);
+ Talk(ANACHRONOS_EMOTE_1);
break;
case 48:
- DoScriptText(FANDRAL_SAY_4, Fandral, me);
+ Fandral->AI()->Talk(FANDRAL_SAY_4, me->GetGUID());
break;
case 49:
- DoScriptText(FANDRAL_SAY_5, Fandral, me);
+ Fandral->AI()->Talk(FANDRAL_SAY_5, me->GetGUID());
break;
case 50:
- DoScriptText(FANDRAL_EMOTE_2, Fandral);
+ Fandral->AI()->Talk(FANDRAL_EMOTE_2);
Fandral->CastSpell(-8127, 1525, 17.5f, 33806, true);
break;
case 51:
@@ -734,19 +734,19 @@ public:
}
case 52:
Fandral->GetMotionMaster()->MoveCharge(-8028.75f, 1538.795f, 2.61f, 4);
- DoScriptText(ANACHRONOS_SAY_9, me, Fandral);
+ Fandral->AI()->Talk(ANACHRONOS_SAY_9, me->GetGUID());
break;
case 53:
- DoScriptText(FANDRAL_SAY_6, Fandral);
+ Fandral->AI()->Talk(FANDRAL_SAY_6);
break;
case 54:
- DoScriptText(ANACHRONOS_EMOTE_2, me);
+ Talk(ANACHRONOS_EMOTE_2);
break;
case 55:
Fandral->SetVisible(false);
break;
case 56:
- DoScriptText(ANACHRONOS_EMOTE_3, me);
+ Talk(ANACHRONOS_EMOTE_3);
me->GetMotionMaster()->MoveCharge(-8116, 1522, 3.65f, 4);
break;
case 57:
@@ -760,7 +760,7 @@ public:
break;
case 60:
if (player)
- DoScriptText(ANACHRONOS_SAY_10, me, player);
+ Talk(ANACHRONOS_SAY_10, player->GetGUID());
me->GetMotionMaster()->MoveCharge(-8113.46f, 1524.16f, 2.89f, 4);
break;
case 61:
@@ -782,7 +782,7 @@ public:
me->SetVisible(false);
if (Creature* AnachronosQuestTrigger = (Unit::GetCreature(*me, AnachronosQuestTriggerGUID)))
{
- DoScriptText(ARYGOS_YELL_1, me);
+ Talk(ARYGOS_YELL_1);
AnachronosQuestTrigger->AI()->EnterEvadeMode();
eventEnd=true;
}
@@ -1054,7 +1054,7 @@ public:
{
if (!Announced && AnnounceTimer <= diff)
{
- DoScriptText(WavesInfo[WaveCount].WaveTextId, me);
+ Talk(WavesInfo[WaveCount].WaveTextId);
Announced = true;
} else AnnounceTimer -= diff;
diff --git a/src/server/scripts/Kalimdor/stonetalon_mountains.cpp b/src/server/scripts/Kalimdor/stonetalon_mountains.cpp
index 5cf6d141805..033274f8561 100644
--- a/src/server/scripts/Kalimdor/stonetalon_mountains.cpp
+++ b/src/server/scripts/Kalimdor/stonetalon_mountains.cpp
@@ -101,9 +101,9 @@ enum Kaya
NPC_GRIMTOTEM_BRUTE = 11912,
NPC_GRIMTOTEM_SORCERER = 11913,
- SAY_START = -1000357,
- SAY_AMBUSH = -1000358,
- SAY_END = -1000359,
+ SAY_START = 0,
+ SAY_AMBUSH = 1,
+ SAY_END = 2,
QUEST_PROTECT_KAYA = 6523
};
@@ -126,14 +126,14 @@ public:
switch (waypointId)
{
case 16:
- DoScriptText(SAY_AMBUSH, me);
+ Talk(SAY_AMBUSH);
me->SummonCreature(NPC_GRIMTOTEM_BRUTE, -48.53f, -503.34f, -46.31f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
me->SummonCreature(NPC_GRIMTOTEM_RUFFIAN, -38.85f, -503.77f, -45.90f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
me->SummonCreature(NPC_GRIMTOTEM_SORCERER, -36.37f, -496.23f, -45.71f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break;
case 18:
me->SetInFront(player);
- DoScriptText(SAY_END, me, player);
+ Talk(SAY_END);
player->GroupEventHappens(QUEST_PROTECT_KAYA, me);
break;
}
@@ -154,7 +154,7 @@ public:
if (npc_escortAI* pEscortAI = CAST_AI(npc_kaya_flathoof::npc_kaya_flathoofAI, creature->AI()))
pEscortAI->Start(true, false, player->GetGUID());
- DoScriptText(SAY_START, creature);
+ creature->AI()->Talk(SAY_START);
creature->setFaction(113);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
diff --git a/src/server/scripts/Kalimdor/tanaris.cpp b/src/server/scripts/Kalimdor/tanaris.cpp
index 7341ccb1e2c..b7644395571 100644
--- a/src/server/scripts/Kalimdor/tanaris.cpp
+++ b/src/server/scripts/Kalimdor/tanaris.cpp
@@ -47,7 +47,7 @@ EndContentData */
enum Aquementas
{
- AGGRO_YELL_AQUE = -1000350,
+ AGGRO_YELL_AQUE = 0,
SPELL_AQUA_JET = 13586,
SPELL_FROST_SHOCK = 15089
@@ -101,7 +101,7 @@ public:
void EnterCombat(Unit* who)
{
- DoScriptText(AGGRO_YELL_AQUE, me, who);
+ Talk(AGGRO_YELL_AQUE, who->GetGUID());
}
void UpdateAI(const uint32 diff)
@@ -427,13 +427,11 @@ public:
enum Npc00X17
{
- //texts are signed for 7806
- SAY_OOX_START = -1000287,
- SAY_OOX_AGGRO1 = -1000288,
- SAY_OOX_AGGRO2 = -1000289,
- SAY_OOX_AMBUSH = -1000290,
- SAY_OOX17_AMBUSH_REPLY = -1000291,
- SAY_OOX_END = -1000292,
+ SAY_OOX_START = 0,
+ SAY_OOX_AGGRO = 1,
+ SAY_OOX_AMBUSH = 2,
+ SAY_OOX17_AMBUSH_REPLY = 0,
+ SAY_OOX_END = 3,
Q_OOX17 = 648,
SPAWN_FIRST = 7803,
@@ -454,7 +452,7 @@ public:
creature->SetFullHealth();
creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
- DoScriptText(SAY_OOX_START, creature);
+ creature->AI()->Talk(SAY_OOX_START);
if (npc_escortAI* pEscortAI = CAST_AI(npc_OOX17::npc_OOX17AI, creature->AI()))
pEscortAI->Start(true, false, player->GetGUID());
@@ -481,18 +479,18 @@ public:
me->SummonCreature(SPAWN_FIRST, -8350.96f, -4445.79f, 10.10f, 6.20f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
me->SummonCreature(SPAWN_FIRST, -8355.96f, -4447.79f, 10.10f, 6.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
me->SummonCreature(SPAWN_FIRST, -8353.96f, -4442.79f, 10.10f, 6.08f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- DoScriptText(SAY_OOX_AMBUSH, me);
+ Talk(SAY_OOX_AMBUSH);
break;
case 56:
me->SummonCreature(SPAWN_SECOND_1, -7510.07f, -4795.50f, 9.35f, 6.06f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
me->SummonCreature(SPAWN_SECOND_2, -7515.07f, -4797.50f, 9.35f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
me->SummonCreature(SPAWN_SECOND_2, -7518.07f, -4792.50f, 9.35f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- DoScriptText(SAY_OOX_AMBUSH, me);
- if (Unit* scoff = me->FindNearestCreature(SPAWN_SECOND_2, 30))
- DoScriptText(SAY_OOX17_AMBUSH_REPLY, scoff);
+ Talk(SAY_OOX_AMBUSH);
+ if (Creature* scoff = me->FindNearestCreature(SPAWN_SECOND_2, 30))
+ scoff->AI()->Talk(SAY_OOX17_AMBUSH_REPLY);
break;
case 86:
- DoScriptText(SAY_OOX_END, me);
+ Talk(SAY_OOX_END);
player->GroupEventHappens(Q_OOX17, me);
break;
}
@@ -503,7 +501,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_OOX_AGGRO1, SAY_OOX_AGGRO2), me);
+ Talk(SAY_OOX_AGGRO);
}
void JustSummoned(Creature* summoned)
@@ -519,14 +517,13 @@ public:
enum Tooga
{
- SAY_TOOG_THIRST = -1000391,
- SAY_TOOG_WORRIED = -1000392,
- SAY_TOOG_POST_1 = -1000393,
- SAY_TORT_POST_2 = -1000394,
- SAY_TOOG_POST_3 = -1000395,
- SAY_TORT_POST_4 = -1000396,
- SAY_TOOG_POST_5 = -1000397,
- SAY_TORT_POST_6 = -1000398,
+ SAY_TOOG_WORRIED = 0,
+ SAY_TOOG_POST_1 = 1,
+ SAY_TORT_POST_2 = 0,
+ SAY_TOOG_POST_3 = 2,
+ SAY_TORT_POST_4 = 1,
+ SAY_TOOG_POST_5 = 3,
+ SAY_TORT_POST_6 = 2,
QUEST_TOOGA = 1560,
NPC_TORTA = 6015,
@@ -617,8 +614,8 @@ public:
{
PostEventTimer = 5000;
- Unit* pTorta = Unit::GetUnit(*me, TortaGUID);
- if (!pTorta || !pTorta->isAlive())
+ Creature* torta = Creature::GetCreature(*me, TortaGUID);
+ if (!torta || !torta->isAlive())
{
//something happened, so just complete
SetFollowComplete();
@@ -628,22 +625,22 @@ public:
switch (PhasePostEvent)
{
case 1:
- DoScriptText(SAY_TOOG_POST_1, me);
+ Talk(SAY_TOOG_POST_1);
break;
case 2:
- DoScriptText(SAY_TORT_POST_2, pTorta);
+ torta->AI()->Talk(SAY_TORT_POST_2);
break;
case 3:
- DoScriptText(SAY_TOOG_POST_3, me);
+ Talk(SAY_TOOG_POST_3);
break;
case 4:
- DoScriptText(SAY_TORT_POST_4, pTorta);
+ torta->AI()->Talk(SAY_TORT_POST_4);
break;
case 5:
- DoScriptText(SAY_TOOG_POST_5, me);
+ Talk(SAY_TOOG_POST_5);
break;
case 6:
- DoScriptText(SAY_TORT_POST_6, pTorta);
+ torta->AI()->Talk(SAY_TORT_POST_6);
me->GetMotionMaster()->MovePoint(POINT_ID_TO_WATER, ToWaterLoc);
break;
}
@@ -661,7 +658,7 @@ public:
CheckSpeechTimer = 5000;
if (urand(0, 9) > 8)
- DoScriptText(RAND(SAY_TOOG_THIRST, SAY_TOOG_WORRIED), me);
+ Talk(SAY_TOOG_WORRIED);
}
else
CheckSpeechTimer -= Diff;
diff --git a/src/server/scripts/Kalimdor/teldrassil.cpp b/src/server/scripts/Kalimdor/teldrassil.cpp
index 6c1993d6447..dfd42d132d8 100644
--- a/src/server/scripts/Kalimdor/teldrassil.cpp
+++ b/src/server/scripts/Kalimdor/teldrassil.cpp
@@ -38,8 +38,8 @@ EndContentData */
enum Mist
{
- SAY_AT_HOME = -1000323,
- EMOTE_AT_HOME = -1000324,
+ SAY_AT_HOME = 0,
+ EMOTE_AT_HOME = 1,
QUEST_MIST = 938,
NPC_ARYNIA = 3519,
FACTION_DARNASSUS = 79
@@ -78,7 +78,7 @@ public:
{
if (me->IsWithinDistInMap(who, 10.0f))
{
- DoScriptText(SAY_AT_HOME, who);
+ Talk(SAY_AT_HOME, who->GetGUID());
DoComplete();
}
}
@@ -86,7 +86,7 @@ public:
void DoComplete()
{
- DoScriptText(EMOTE_AT_HOME, me);
+ Talk(EMOTE_AT_HOME);
Player* player = GetLeaderForFollower();
if (player && player->GetQuestStatus(QUEST_MIST) == QUEST_STATUS_INCOMPLETE)
diff --git a/src/server/scripts/Kalimdor/the_barrens.cpp b/src/server/scripts/Kalimdor/the_barrens.cpp
index 8a24f696a23..9417e7993f7 100644
--- a/src/server/scripts/Kalimdor/the_barrens.cpp
+++ b/src/server/scripts/Kalimdor/the_barrens.cpp
@@ -83,17 +83,14 @@ public:
enum Gilthares
{
- SAY_GIL_START = -1000370,
- SAY_GIL_AT_LAST = -1000371,
- SAY_GIL_PROCEED = -1000372,
- SAY_GIL_FREEBOOTERS = -1000373,
- SAY_GIL_AGGRO_1 = -1000374,
- SAY_GIL_AGGRO_2 = -1000375,
- SAY_GIL_AGGRO_3 = -1000376,
- SAY_GIL_AGGRO_4 = -1000377,
- SAY_GIL_ALMOST = -1000378,
- SAY_GIL_SWEET = -1000379,
- SAY_GIL_FREED = -1000380,
+ SAY_GIL_START = 0,
+ SAY_GIL_AT_LAST = 1,
+ SAY_GIL_PROCEED = 2,
+ SAY_GIL_FREEBOOTERS = 3,
+ SAY_GIL_AGGRO = 4,
+ SAY_GIL_ALMOST = 5,
+ SAY_GIL_SWEET = 6,
+ SAY_GIL_FREED = 7,
QUEST_FREE_FROM_HOLD = 898,
AREA_MERCHANT_COAST = 391,
@@ -112,7 +109,7 @@ public:
creature->setFaction(FACTION_ESCORTEE);
creature->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_GIL_START, creature, player);
+ creature->AI()->Talk(SAY_GIL_START, player->GetGUID());
if (npc_giltharesAI* pEscortAI = CAST_AI(npc_gilthares::npc_giltharesAI, creature->AI()))
pEscortAI->Start(false, false, player->GetGUID(), quest);
@@ -140,22 +137,22 @@ public:
switch (waypointId)
{
case 16:
- DoScriptText(SAY_GIL_AT_LAST, me, player);
+ Talk(SAY_GIL_AT_LAST, player->GetGUID());
break;
case 17:
- DoScriptText(SAY_GIL_PROCEED, me, player);
+ Talk(SAY_GIL_PROCEED, player->GetGUID());
break;
case 18:
- DoScriptText(SAY_GIL_FREEBOOTERS, me, player);
+ Talk(SAY_GIL_FREEBOOTERS, player->GetGUID());
break;
case 37:
- DoScriptText(SAY_GIL_ALMOST, me, player);
+ Talk(SAY_GIL_ALMOST,player->GetGUID());
break;
case 47:
- DoScriptText(SAY_GIL_SWEET, me, player);
+ Talk(SAY_GIL_SWEET, player->GetGUID());
break;
case 53:
- DoScriptText(SAY_GIL_FREED, me, player);
+ Talk(SAY_GIL_FREED, player->GetGUID());
player->GroupEventHappens(QUEST_FREE_FROM_HOLD, me);
break;
}
@@ -171,7 +168,7 @@ public:
if (who->GetTypeId() != TYPEID_PLAYER && me->GetAreaId() == AREA_MERCHANT_COAST)
{
//appears to be pretty much random (possible only if escorter not in combat with who yet?)
- DoScriptText(RAND(SAY_GIL_AGGRO_1, SAY_GIL_AGGRO_2, SAY_GIL_AGGRO_3, SAY_GIL_AGGRO_4), me, who);
+ Talk(SAY_GIL_AGGRO, who->GetGUID());
}
}
};
@@ -324,11 +321,11 @@ enum TwiggyFlathead
NPC_BIG_WILL = 6238,
NPC_AFFRAY_CHALLENGER = 6240,
- SAY_BIG_WILL_READY = -1000123,
- SAY_TWIGGY_FLATHEAD_BEGIN = -1000124,
- SAY_TWIGGY_FLATHEAD_FRAY = -1000125,
- SAY_TWIGGY_FLATHEAD_DOWN = -1000126,
- SAY_TWIGGY_FLATHEAD_OVER = -1000127,
+ SAY_BIG_WILL_READY = 0,
+ SAY_TWIGGY_FLATHEAD_BEGIN = 0,
+ SAY_TWIGGY_FLATHEAD_FRAY = 1,
+ SAY_TWIGGY_FLATHEAD_DOWN = 2,
+ SAY_TWIGGY_FLATHEAD_OVER = 3
};
Position const AffrayChallengerLoc[6] =
@@ -412,7 +409,7 @@ public:
return;
if (!pWarrior->isAlive() && pWarrior->GetQuestStatus(1719) == QUEST_STATUS_INCOMPLETE) {
- DoScriptText(SAY_TWIGGY_FLATHEAD_DOWN, me);
+ Talk(SAY_TWIGGY_FLATHEAD_DOWN);
pWarrior->FailQuest(1719);
for (uint8 i = 0; i < 6; ++i) // unsummon challengers
@@ -441,7 +438,7 @@ public:
if (x >= -1684 && x <= -1674 && y >= -4334 && y <= -4324) {
pWarrior->AreaExploredOrEventHappens(1719);
- DoScriptText(SAY_TWIGGY_FLATHEAD_BEGIN, me, pWarrior);
+ Talk(SAY_TWIGGY_FLATHEAD_BEGIN, pWarrior->GetGUID());
for (uint8 i = 0; i < 6; ++i)
{
@@ -470,7 +467,7 @@ public:
Creature* creature = Unit::GetCreature((*me), AffrayChallenger[i]);
if ((!creature || (!creature->isAlive())) && !ChallengerDown[i])
{
- DoScriptText(SAY_TWIGGY_FLATHEAD_DOWN, me);
+ Talk(SAY_TWIGGY_FLATHEAD_DOWN);
ChallengerDown[i] = true;
}
}
@@ -482,7 +479,7 @@ public:
{
if (Wave < 6 && AffrayChallenger[Wave] && !EventBigWill)
{
- DoScriptText(SAY_TWIGGY_FLATHEAD_FRAY, me);
+ Talk(SAY_TWIGGY_FLATHEAD_FRAY);
Creature* creature = Unit::GetCreature((*me), AffrayChallenger[Wave]);
if (creature && (creature->isAlive()))
{
@@ -512,7 +509,7 @@ public:
Creature* creature = Unit::GetCreature((*me), BigWill);
if (!creature || !creature->isAlive())
{
- DoScriptText(SAY_TWIGGY_FLATHEAD_OVER, me);
+ Talk(SAY_TWIGGY_FLATHEAD_OVER);
Reset();
}
}
@@ -530,14 +527,14 @@ public:
enum Wizzlecrank
{
- SAY_START = -1000298,
- SAY_STARTUP1 = -1000299,
- SAY_STARTUP2 = -1000300,
- SAY_MERCENARY = -1000301,
- SAY_PROGRESS_1 = -1000302,
- SAY_PROGRESS_2 = -1000303,
- SAY_PROGRESS_3 = -1000304,
- SAY_END = -1000305,
+ SAY_MERCENARY = 0,
+ SAY_START = 0,
+ SAY_STARTUP1 = 1,
+ SAY_STARTUP2 = 2,
+ SAY_PROGRESS_1 = 3,
+ SAY_PROGRESS_2 = 4,
+ SAY_PROGRESS_3 = 5,
+ SAY_END = 6,
QUEST_ESCAPE = 863,
FACTION_RATCHET = 637,
@@ -581,7 +578,7 @@ public:
switch (waypointId)
{
case 0:
- DoScriptText(SAY_STARTUP1, me);
+ Talk(SAY_STARTUP1);
break;
case 9:
SetRun(false);
@@ -589,7 +586,7 @@ public:
case 17:
if (Creature* temp = me->SummonCreature(NPC_MERCENARY, 1128.489f, -3037.611f, 92.701f, 1.472f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000))
{
- DoScriptText(SAY_MERCENARY, temp);
+ temp->AI()->Talk(SAY_MERCENARY);
me->SummonCreature(NPC_MERCENARY, 1160.172f, -2980.168f, 97.313f, 3.690f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
}
break;
@@ -609,10 +606,10 @@ public:
switch (PointId)
{
case 9:
- DoScriptText(SAY_STARTUP2, me, player);
+ Talk(SAY_STARTUP2, player->GetGUID());
break;
case 18:
- DoScriptText(SAY_PROGRESS_1, me, player);
+ Talk(SAY_PROGRESS_1, player->GetGUID());
SetRun();
break;
}
@@ -638,13 +635,13 @@ public:
switch (PostEventCount)
{
case 0:
- DoScriptText(SAY_PROGRESS_2, me);
+ Talk(SAY_PROGRESS_2);
break;
case 1:
- DoScriptText(SAY_PROGRESS_3, me);
+ Talk(SAY_PROGRESS_3);
break;
case 2:
- DoScriptText(SAY_END, me);
+ Talk(SAY_END);
break;
case 3:
if (Player* player = GetPlayerForEscort())
diff --git a/src/server/scripts/Kalimdor/thousand_needles.cpp b/src/server/scripts/Kalimdor/thousand_needles.cpp
index 7667a8b312c..53751cb8278 100644
--- a/src/server/scripts/Kalimdor/thousand_needles.cpp
+++ b/src/server/scripts/Kalimdor/thousand_needles.cpp
@@ -44,7 +44,7 @@ EndContentData */
enum Kanati
{
- SAY_KAN_START = -1000410,
+ SAY_KAN_START = 0,
QUEST_PROTECT_KANATI = 4966,
NPC_GALAK_ASS = 10720
@@ -82,7 +82,7 @@ public:
switch (waypointId)
{
case 0:
- DoScriptText(SAY_KAN_START, me);
+ Talk(SAY_KAN_START);
DoSpawnGalak();
break;
case 1:
@@ -112,11 +112,11 @@ public:
enum Lakota
{
- SAY_LAKO_START = -1000365,
- SAY_LAKO_LOOK_OUT = -1000366,
- SAY_LAKO_HERE_COME = -1000367,
- SAY_LAKO_MORE = -1000368,
- SAY_LAKO_END = -1000369,
+ SAY_LAKO_START = 0,
+ SAY_LAKO_LOOK_OUT = 1,
+ SAY_LAKO_HERE_COME = 2,
+ SAY_LAKO_MORE = 3,
+ SAY_LAKO_END = 4,
QUEST_FREE_AT_LAST = 4904,
NPC_GRIM_BANDIT = 10758,
@@ -146,7 +146,7 @@ public:
{
if (quest->GetQuestId() == QUEST_FREE_AT_LAST)
{
- DoScriptText(SAY_LAKO_START, creature, player);
+ creature->AI()->Talk(SAY_LAKO_START, player->GetGUID());
creature->setFaction(FACTION_ESCORTEE_LAKO);
if (npc_lakota_windsongAI* pEscortAI = CAST_AI(npc_lakota_windsong::npc_lakota_windsongAI, creature->AI()))
@@ -171,15 +171,15 @@ public:
switch (waypointId)
{
case 8:
- DoScriptText(SAY_LAKO_LOOK_OUT, me);
+ Talk(SAY_LAKO_LOOK_OUT);
DoSpawnBandits(ID_AMBUSH_1);
break;
case 14:
- DoScriptText(SAY_LAKO_HERE_COME, me);
+ Talk(SAY_LAKO_HERE_COME);
DoSpawnBandits(ID_AMBUSH_2);
break;
case 21:
- DoScriptText(SAY_LAKO_MORE, me);
+ Talk(SAY_LAKO_MORE);
DoSpawnBandits(ID_AMBUSH_3);
break;
case 45:
@@ -204,9 +204,9 @@ public:
enum Packa
{
- SAY_START = -1000362,
- SAY_WYVERN = -1000363,
- SAY_COMPLETE = -1000364,
+ SAY_START = 0,
+ SAY_WYVERN = 1,
+ SAY_COMPLETE = 2,
QUEST_HOMEWARD = 4770,
NPC_WYVERN = 4107,
@@ -229,7 +229,7 @@ public:
{
if (quest->GetQuestId() == QUEST_HOMEWARD)
{
- DoScriptText(SAY_START, creature, player);
+ creature->AI()->Talk(SAY_START, player->GetGUID());
creature->setFaction(FACTION_ESCORTEE);
if (npc_paoka_swiftmountainAI* pEscortAI = CAST_AI(npc_paoka_swiftmountain::npc_paoka_swiftmountainAI, creature->AI()))
@@ -254,11 +254,11 @@ public:
switch (waypointId)
{
case 15:
- DoScriptText(SAY_WYVERN, me);
+ Talk(SAY_WYVERN);
DoSpawnWyvern();
break;
case 26:
- DoScriptText(SAY_COMPLETE, me);
+ Talk(SAY_COMPLETE);
break;
case 27:
if (Player* player = GetPlayerForEscort())
diff --git a/src/server/scripts/Kalimdor/ungoro_crater.cpp b/src/server/scripts/Kalimdor/ungoro_crater.cpp
index e00ea566c8f..801855e7249 100644
--- a/src/server/scripts/Kalimdor/ungoro_crater.cpp
+++ b/src/server/scripts/Kalimdor/ungoro_crater.cpp
@@ -37,12 +37,12 @@ EndContentData */
enum AmeData
{
- SAY_READY = -1000517,
- SAY_AGGRO1 = -1000518,
- SAY_SEARCH = -1000519,
- SAY_AGGRO2 = -1000520,
- SAY_AGGRO3 = -1000521,
- SAY_FINISH = -1000522,
+ SAY_READY = 0,
+ SAY_AGGRO1 = 1,
+ SAY_SEARCH = 2,
+ SAY_AGGRO2 = 3,
+ SAY_AGGRO3 = 4,
+ SAY_FINISH = 5,
SPELL_DEMORALIZINGSHOUT = 13730,
@@ -62,7 +62,7 @@ public:
if (quest->GetQuestId() == QUEST_CHASING_AME)
{
CAST_AI(npc_escortAI, (creature->AI()))->Start(false, false, player->GetGUID());
- DoScriptText(SAY_READY, creature, player);
+ creature->AI()->Talk(SAY_READY, player->GetGUID());
creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
// Change faction so mobs attack
creature->setFaction(113);
@@ -89,21 +89,21 @@ public:
{
case 19:
me->SummonCreature(ENTRY_STOMPER, -6391.69f, -1730.49f, -272.83f, 4.96f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- DoScriptText(SAY_AGGRO1, me, player);
+ Talk(SAY_AGGRO1, player->GetGUID());
break;
case 28:
- DoScriptText(SAY_SEARCH, me, player);
+ Talk(SAY_SEARCH, player->GetGUID());
break;
case 38:
me->SummonCreature(ENTRY_TARLORD, -6370.75f, -1382.84f, -270.51f, 6.06f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- DoScriptText(SAY_AGGRO2, me, player);
+ Talk(SAY_AGGRO2, player->GetGUID());
break;
case 49:
me->SummonCreature(ENTRY_TARLORD1, -6324.44f, -1181.05f, -270.17f, 4.34f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- DoScriptText(SAY_AGGRO3, me, player);
+ Talk(SAY_AGGRO3, player->GetGUID());
break;
case 55:
- DoScriptText(SAY_FINISH, me, player);
+ Talk(SAY_FINISH, player->GetGUID());
player->GroupEventHappens(QUEST_CHASING_AME, me);
break;
}
@@ -147,27 +147,20 @@ public:
enum Ringo
{
- SAY_RIN_START_1 = -1000416,
- SAY_RIN_START_2 = -1000417,
-
- SAY_FAINT_1 = -1000418,
- SAY_FAINT_2 = -1000419,
- SAY_FAINT_3 = -1000420,
- SAY_FAINT_4 = -1000421,
-
- SAY_WAKE_1 = -1000422,
- SAY_WAKE_2 = -1000423,
- SAY_WAKE_3 = -1000424,
- SAY_WAKE_4 = -1000425,
-
- SAY_RIN_END_1 = -1000426,
- SAY_SPR_END_2 = -1000427,
- SAY_RIN_END_3 = -1000428,
- EMOTE_RIN_END_4 = -1000429,
- EMOTE_RIN_END_5 = -1000430,
- SAY_RIN_END_6 = -1000431, // signed for 6784
- SAY_SPR_END_7 = -1000432,
- EMOTE_RIN_END_8 = -1000433,
+ SAY_RIN_START = 0,
+
+ SAY_FAINT = 1,
+
+ SAY_WAKE = 2,
+
+ SAY_RIN_END_1 = 3,
+ SAY_SPR_END_2 = 0,
+ SAY_RIN_END_3 = 4,
+ EMOTE_RIN_END_4 = 5,
+ EMOTE_RIN_END_5 = 6,
+ SAY_RIN_END_6 = 7,
+ SAY_SPR_END_7 = 1,
+ EMOTE_RIN_END_8 = 8,
SPELL_REVIVE_RINGO = 15591,
QUEST_A_LITTLE_HELP = 4491,
@@ -184,10 +177,10 @@ public:
{
if (quest->GetQuestId() == QUEST_A_LITTLE_HELP)
{
- if (npc_ringoAI* pRingoAI = CAST_AI(npc_ringo::npc_ringoAI, creature->AI()))
+ if (npc_ringoAI* ringoAI = CAST_AI(npc_ringo::npc_ringoAI, creature->AI()))
{
creature->SetStandState(UNIT_STAND_STATE_STAND);
- pRingoAI->StartFollow(player, FACTION_ESCORTEE, quest);
+ ringoAI->StartFollow(player, FACTION_ESCORTEE, quest);
}
}
@@ -249,7 +242,7 @@ public:
{
SetFollowPaused(true);
- DoScriptText(RAND(SAY_FAINT_1, SAY_FAINT_2, SAY_FAINT_3, SAY_FAINT_4), me);
+ Talk(SAY_FAINT);
}
//what does actually happen here? Emote? Aura?
@@ -263,7 +256,7 @@ public:
if (HasFollowState(STATE_FOLLOW_POSTEVENT))
return;
- DoScriptText(RAND(SAY_WAKE_1, SAY_WAKE_2, SAY_WAKE_3, SAY_WAKE_4), me);
+ Talk(SAY_WAKE);
SetFollowPaused(false);
}
@@ -276,8 +269,8 @@ public:
{
if (EndEventTimer <= Diff)
{
- Unit* pSpraggle = Unit::GetUnit(*me, SpraggleGUID);
- if (!pSpraggle || !pSpraggle->isAlive())
+ Creature* spraggle = Creature::GetCreature(*me, SpraggleGUID);
+ if (!spraggle || !spraggle->isAlive())
{
SetFollowComplete();
return;
@@ -286,37 +279,37 @@ public:
switch (EndEventProgress)
{
case 1:
- DoScriptText(SAY_RIN_END_1, me);
+ Talk(SAY_RIN_END_1);
EndEventTimer = 3000;
break;
case 2:
- DoScriptText(SAY_SPR_END_2, pSpraggle);
+ spraggle->AI()->Talk(SAY_SPR_END_2);
EndEventTimer = 5000;
break;
case 3:
- DoScriptText(SAY_RIN_END_3, me);
+ Talk(SAY_RIN_END_3);
EndEventTimer = 1000;
break;
case 4:
- DoScriptText(EMOTE_RIN_END_4, me);
+ Talk(EMOTE_RIN_END_4);
SetFaint();
EndEventTimer = 9000;
break;
case 5:
- DoScriptText(EMOTE_RIN_END_5, me);
+ Talk(EMOTE_RIN_END_5);
ClearFaint();
EndEventTimer = 1000;
break;
case 6:
- DoScriptText(SAY_RIN_END_6, me);
+ Talk(SAY_RIN_END_6);
EndEventTimer = 3000;
break;
case 7:
- DoScriptText(SAY_SPR_END_7, pSpraggle);
+ spraggle->AI()->Talk(SAY_SPR_END_7);
EndEventTimer = 10000;
break;
case 8:
- DoScriptText(EMOTE_RIN_END_8, me);
+ Talk(EMOTE_RIN_END_8);
EndEventTimer = 5000;
break;
case 9:
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
index 3bc91855d36..11ef00775d0 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
@@ -44,17 +44,12 @@ enum Creatures
// not in db
enum Yells
{
- SAY_INTRO = -1601010,
- SAY_AGGRO = -1601000,
- SAY_SLAY_1 = -1601001,
- SAY_SLAY_2 = -1601002,
- SAY_SLAY_3 = -1601003,
- SAY_LOCUST_1 = -1601005,
- SAY_LOCUST_2 = -1601006,
- SAY_LOCUST_3 = -1601007,
- SAY_SUBMERGE_1 = -1601008,
- SAY_SUBMERGE_2 = -1601009,
- SAY_DEATH = -1601004
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_LOCUST = 3,
+ SAY_SUBMERGE = 4,
+ SAY_INTRO = 5
};
enum
@@ -161,7 +156,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DelayTimer = 0;
if (instance)
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
@@ -338,7 +333,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
Summons.DespawnAll();
if (instance)
instance->SetData(DATA_ANUBARAK_EVENT, DONE);
@@ -348,7 +343,7 @@ public:
{
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
void JustSummoned(Creature* summon)
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp
index 1acc3b77a61..4c817fa9465 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp
@@ -61,19 +61,12 @@ enum Mobs
enum Yells
{
- SAY_AGGRO = -1601011,
- SAY_SLAY_1 = -1601012,
- SAY_SLAY_2 = -1601013,
- SAY_DEATH = -1601014,
- //Not in db
- SAY_SEND_GROUP_1 = -1601020,
- SAY_SEND_GROUP_2 = -1601021,
- SAY_SEND_GROUP_3 = -1601022,
- SAY_SWARM_1 = -1601015,
- SAY_SWARM_2 = -1601016,
- SAY_PREFIGHT_1 = -1601017,
- SAY_PREFIGHT_2 = -1601018,
- SAY_PREFIGHT_3 = -1601019
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SWARM = 3,
+ SAY_PREFIGHT = 4,
+ SAY_SEND_GROUP = 5
};
const Position SpawnPoint[] =
@@ -117,7 +110,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
Summon();
uiSummonTimer = 15*IN_MILLISECONDS;
@@ -180,7 +173,7 @@ public:
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_KRIKTHIR_THE_GATEWATCHER_EVENT, DONE);
@@ -191,7 +184,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustSummoned(Creature* summoned)
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
index e20b08c515e..6d4b4bc9379 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
@@ -23,30 +23,25 @@
#include "CellImpl.h"
#include "obsidian_sanctum.h"
-enum eEnums
+enum Enums
{
//Sartharion Yell
- SAY_SARTHARION_AGGRO = -1615018,
- SAY_SARTHARION_BERSERK = -1615019,
- SAY_SARTHARION_BREATH = -1615020,
- SAY_SARTHARION_CALL_SHADRON = -1615021,
- SAY_SARTHARION_CALL_TENEBRON = -1615022,
- SAY_SARTHARION_CALL_VESPERON = -1615023,
- SAY_SARTHARION_DEATH = -1615024,
- SAY_SARTHARION_SPECIAL_1 = -1615025,
- SAY_SARTHARION_SPECIAL_2 = -1615026,
- SAY_SARTHARION_SPECIAL_3 = -1615027,
- SAY_SARTHARION_SPECIAL_4 = -1615028,
- SAY_SARTHARION_SLAY_1 = -1615029,
- SAY_SARTHARION_SLAY_2 = -1615030,
- SAY_SARTHARION_SLAY_3 = -1615031,
-
- WHISPER_LAVA_CHURN = -1615032,
-
- WHISPER_SHADRON_DICIPLE = -1615008,
- WHISPER_VESPERON_DICIPLE = -1615041,
- WHISPER_HATCH_EGGS = -1615017,
- WHISPER_OPEN_PORTAL = -1615042, // whisper, shared by two dragons
+ SAY_SARTHARION_AGGRO = 0,
+ SAY_SARTHARION_BERSERK = 1,
+ SAY_SARTHARION_BREATH = 2,
+ SAY_SARTHARION_CALL_SHADRON = 3,
+ SAY_SARTHARION_CALL_TENEBRON = 4,
+ SAY_SARTHARION_CALL_VESPERON = 5,
+ SAY_SARTHARION_DEATH = 6,
+ SAY_SARTHARION_SPECIAL = 7,
+ SAY_SARTHARION_SLAY = 8,
+ WHISPER_LAVA_CHURN = 9,
+
+ WHISPER_HATCH_EGGS = 6,
+ WHISPER_OPEN_PORTAL = 6, // whisper, shared by two dragons
+
+ WHISPER_SHADRON_DICIPLE = 7,
+ WHISPER_VESPERON_DICIPLE = 7,
//Sartharion Spells
SPELL_BERSERK = 61632, // Increases the caster's attack speed by 150% and all damage it deals by 500% for 5 min.
@@ -357,7 +352,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_SARTHARION_AGGRO, me);
+ Talk(SAY_SARTHARION_AGGRO);
DoZoneInCombat();
if (instance)
@@ -369,7 +364,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_SARTHARION_DEATH, me);
+ Talk(SAY_SARTHARION_DEATH);
if (instance)
{
@@ -389,7 +384,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SARTHARION_SLAY_1, SAY_SARTHARION_SLAY_2, SAY_SARTHARION_SLAY_3), me);
+ Talk(SAY_SARTHARION_SLAY);
}
// me->ResetLootMode() is called from Reset()
@@ -511,7 +506,7 @@ public:
break;
}
- DoScriptText(iTextId, me);
+ Talk(iTextId);
}
}
}
@@ -527,7 +522,7 @@ public:
if (!PlayerList.isEmpty())
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (i->getSource() && i->getSource()->isAlive())
- DoScriptText(WHISPER_LAVA_CHURN, me, i->getSource());
+ Talk(WHISPER_LAVA_CHURN, i->getSource()->GetGUID());
}
}
@@ -566,7 +561,7 @@ public:
if (!m_bIsBerserk && !HealthAbovePct(35)
&& ((pTene && pTene->isAlive()) || (pShad && pShad->isAlive()) || (pVesp && pVesp->isAlive())))
{
- DoScriptText(SAY_SARTHARION_BERSERK, me);
+ Talk(SAY_SARTHARION_BERSERK);
DoCast(me, SPELL_BERSERK);
m_bIsBerserk = true;
}
@@ -624,7 +619,7 @@ public:
// flame breath
if (m_uiFlameBreathTimer <= uiDiff)
{
- DoScriptText(SAY_SARTHARION_BREATH, me);
+ Talk(SAY_SARTHARION_BREATH);
DoCast(me->getVictim(), RAID_MODE(SPELL_FLAME_BREATH, SPELL_FLAME_BREATH_H));
m_uiFlameBreathTimer = urand(25000, 35000);
}
@@ -657,7 +652,7 @@ public:
CastLavaStrikeOnTarget(target);
if (urand(0, 5) == 0)
- DoScriptText(RAND(SAY_SARTHARION_SPECIAL_1, SAY_SARTHARION_SPECIAL_2, SAY_SARTHARION_SPECIAL_3), me);
+ Talk(SAY_SARTHARION_SPECIAL);
}
m_uiLavaStrikeTimer = (m_bIsSoftEnraged ? urand(1400, 2000) : urand(5000, 20000));
}
@@ -701,38 +696,32 @@ public:
enum TeneText
{
- SAY_TENEBRON_AGGRO = -1615009,
- SAY_TENEBRON_SLAY_1 = -1615010,
- SAY_TENEBRON_SLAY_2 = -1615011,
- SAY_TENEBRON_DEATH = -1615012,
- SAY_TENEBRON_BREATH = -1615013,
- SAY_TENEBRON_RESPOND = -1615014,
- SAY_TENEBRON_SPECIAL_1 = -1615015,
- SAY_TENEBRON_SPECIAL_2 = -1615016
+ SAY_TENEBRON_AGGRO = 0,
+ SAY_TENEBRON_SLAY = 1,
+ SAY_TENEBRON_DEATH = 2,
+ SAY_TENEBRON_BREATH = 3,
+ SAY_TENEBRON_RESPOND = 4,
+ SAY_TENEBRON_SPECIAL = 5
};
enum ShadText
{
- SAY_SHADRON_AGGRO = -1615000,
- SAY_SHADRON_SLAY_1 = -1615001,
- SAY_SHADRON_SLAY_2 = -1615002,
- SAY_SHADRON_DEATH = -1615003,
- SAY_SHADRON_BREATH = -1615004,
- SAY_SHADRON_RESPOND = -1615005,
- SAY_SHADRON_SPECIAL_1 = -1615006,
- SAY_SHADRON_SPECIAL_2 = -1615007
+ SAY_SHADRON_AGGRO = 0,
+ SAY_SHADRON_SLAY = 1,
+ SAY_SHADRON_DEATH = 2,
+ SAY_SHADRON_BREATH = 3,
+ SAY_SHADRON_RESPOND = 4,
+ SAY_SHADRON_SPECIAL = 5
};
enum VespText
{
- SAY_VESPERON_AGGRO = -1615033,
- SAY_VESPERON_SLAY_1 = -1615034,
- SAY_VESPERON_SLAY_2 = -1615035,
- SAY_VESPERON_DEATH = -1615036,
- SAY_VESPERON_BREATH = -1615037,
- SAY_VESPERON_RESPOND = -1615038,
- SAY_VESPERON_SPECIAL_1 = -1615039,
- SAY_VESPERON_SPECIAL_2 = -1615040
+ SAY_VESPERON_AGGRO = 0,
+ SAY_VESPERON_SLAY = 1,
+ SAY_VESPERON_DEATH = 2,
+ SAY_VESPERON_BREATH = 3,
+ SAY_VESPERON_RESPOND = 4,
+ SAY_VESPERON_SPECIAL = 5,
};
//to control each dragons common abilities
@@ -829,7 +818,7 @@ struct dummy_dragonAI : public ScriptedAI
if (!PlayerList.isEmpty())
{
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
- DoScriptText(iTextId, me, i->getSource());
+ Talk(iTextId, i->getSource()->GetGUID());
}
}
}
@@ -943,7 +932,7 @@ struct dummy_dragonAI : public ScriptedAI
break;
}
- DoScriptText(iTextId, me);
+ Talk(iTextId);
me->RemoveAurasDueToSpell(uiSpellId);
@@ -1019,13 +1008,13 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_TENEBRON_AGGRO, me);
+ Talk(SAY_TENEBRON_AGGRO);
DoZoneInCombat();
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_TENEBRON_SLAY_1, SAY_TENEBRON_SLAY_2), me);
+ Talk(SAY_TENEBRON_SLAY);
}
void UpdateAI(const uint32 uiDiff)
@@ -1060,7 +1049,7 @@ public:
// shadow breath
if (m_uiShadowBreathTimer <= uiDiff)
{
- DoScriptText(SAY_TENEBRON_BREATH, me);
+ Talk(SAY_TENEBRON_BREATH);
DoCast(me->getVictim(), RAID_MODE(SPELL_SHADOW_BREATH, SPELL_SHADOW_BREATH_H));
m_uiShadowBreathTimer = urand(20000, 25000);
}
@@ -1114,13 +1103,13 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_SHADRON_AGGRO, me);
+ Talk(SAY_SHADRON_AGGRO);
DoZoneInCombat();
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SHADRON_SLAY_1, SAY_SHADRON_SLAY_2), me);
+ Talk(SAY_SHADRON_SLAY);
}
void UpdateAI(const uint32 uiDiff)
@@ -1164,7 +1153,7 @@ public:
// shadow breath
if (m_uiShadowBreathTimer <= uiDiff)
{
- DoScriptText(SAY_SHADRON_BREATH, me);
+ Talk(SAY_SHADRON_BREATH);
DoCast(me->getVictim(), RAID_MODE(SPELL_SHADOW_BREATH, SPELL_SHADOW_BREATH_H));
m_uiShadowBreathTimer = urand(20000, 25000);
}
@@ -1212,13 +1201,13 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_VESPERON_AGGRO, me);
+ Talk(SAY_VESPERON_AGGRO);
DoZoneInCombat();
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_VESPERON_SLAY_1, SAY_VESPERON_SLAY_2), me);
+ Talk(SAY_VESPERON_SLAY);
}
void UpdateAI(const uint32 uiDiff)
@@ -1259,7 +1248,7 @@ public:
// shadow breath
if (m_uiShadowBreathTimer <= uiDiff)
{
- DoScriptText(SAY_VESPERON_BREATH, me);
+ Talk(SAY_VESPERON_BREATH);
DoCast(me->getVictim(), RAID_MODE(SPELL_SHADOW_BREATH, SPELL_SHADOW_BREATH_H));
m_uiShadowBreathTimer = urand(20000, 25000);
}
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
index d77c84b2978..3c20acf34a6 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
@@ -27,10 +27,34 @@ EndScriptData */
#include "SpellScript.h"
#include "trial_of_the_champion.h"
#include "ScriptedEscortAI.h"
-
-enum eSpells
+/*
+enum Yells
+{
+ // Eadric the Pure
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ EMOTE_RADIANCE = 2,
+ EMOTE_HAMMER_RIGHTEOUS = 3,
+ SAY_HAMMER_RIGHTEOUS = 4,
+ SAY_KILL_PLAYER = 5,
+ SAY_DEFEATED = 6,
+
+ // Argent Confessor Paletress
+ SAY_INTRO_1 = 0,
+ SAY_INTRO_2 = 1,
+ SAY_AGGRO = 2,
+ SAY_MEMORY_SUMMON = 3,
+ SAY_MEMORY_DEATH = 4,
+ SAY_KILL_PLAYER = 5,
+ SAY_DEFEATED = 6,
+
+ // Memory of X
+ EMOTE_WAKING_NIGHTMARE = 0
+};
+*/
+enum Spells
{
- //Eadric
+ // Eadric the Pure
SPELL_EADRIC_ACHIEVEMENT = 68197,
SPELL_HAMMER_JUSTICE = 66863,
SPELL_HAMMER_RIGHTEOUS = 66867,
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
index c56d44ceb08..c1a2f9c07d2 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
@@ -27,7 +27,7 @@ EndScriptData */
#include "ScriptedEscortAI.h"
#include "trial_of_the_champion.h"
-enum eSpells
+enum Spells
{
//phase 1
SPELL_PLAGUE_STRIKE = 67884,
@@ -61,13 +61,13 @@ enum eSpells
SPELL_KILL_CREDIT = 68663
};
-enum eModels
+enum Models
{
MODEL_SKELETON = 29846,
MODEL_GHOST = 21300
};
-enum ePhases
+enum Phases
{
PHASE_UNDEAD = 1,
PHASE_SKELETON = 2,
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp
index ffda3d12e2f..9c0b894bfa7 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp
@@ -33,6 +33,18 @@ EndContentData */
#include "Vehicle.h"
#include "Player.h"
+enum Yells
+{
+ SAY_INTRO_1 = 0,
+ SAY_INTRO_2 = 1,
+ SAY_INTRO_3 = 2,
+ SAY_AGGRO = 3,
+ SAY_PHASE_2 = 4,
+ SAY_PHASE_3 = 5,
+ SAY_KILL_PLAYER = 6,
+ SAY_DEATH = 7
+};
+
#define GOSSIP_START_EVENT1 "I'm ready to start challenge."
#define GOSSIP_START_EVENT2 "I'm ready for the next challenge."
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h
index cb3a43acdd0..6116a150334 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h
@@ -19,7 +19,7 @@
#ifndef DEF_TOC_H
#define DEF_TOC_H
-enum eData
+enum Data
{
BOSS_GRAND_CHAMPIONS,
BOSS_ARGENT_CHALLENGE_E,
@@ -46,7 +46,7 @@ enum Data64
DATA_GRAND_CHAMPION_3
};
-enum eNpcs
+enum CreatureIds
{
// Horde Champions
NPC_MOKRA = 35572,
@@ -78,7 +78,7 @@ enum eNpcs
NPC_ARELAS = 35005
};
-enum eGameObjects
+enum GameObjects
{
GO_MAIN_GATE = 195647,
@@ -92,7 +92,7 @@ enum eGameObjects
GO_PALETRESS_LOOT_H = 195324
};
-enum eVehicles
+enum Vehicles
{
//Grand Champions Alliance Vehicles
VEHICLE_MARSHAL_JACOB_ALERIUS_MOUNT = 35637,
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
index f618d0e04e7..a9dc9cf394d 100755..100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
@@ -25,6 +25,7 @@
#include "ScriptedCreature.h"
#include "trial_of_the_crusader.h"
#include "SpellScript.h"
+#include "SpellAuraEffects.h"
#include <limits>
enum Yells
@@ -53,54 +54,54 @@ enum Summons
enum BossSpells
{
- SPELL_FREEZE_SLASH = 66012,
- SPELL_PENETRATING_COLD = 66013,
- SPELL_LEECHING_SWARM = 66118,
- SPELL_LEECHING_HEAL = 66125,
- SPELL_LEECHING_DAMAGE = 66240,
- SPELL_MARK = 67574,
- SPELL_SPIKE_CALL = 66169,
- SPELL_SUBMERGE_ANUBARAK = 65981,
- SPELL_CLEAR_ALL_DEBUFFS = 34098,
- SPELL_EMERGE_ANUBARAK = 65982,
- SPELL_SUMMON_BEATLES = 66339,
- SPELL_SUMMON_BURROWER = 66332,
+ SPELL_FREEZE_SLASH = 66012,
+ SPELL_PENETRATING_COLD = 66013,
+ SPELL_LEECHING_SWARM = 66118,
+ SPELL_LEECHING_SWARM_HEAL = 66125,
+ SPELL_LEECHING_SWARM_DMG = 66240,
+ SPELL_MARK = 67574,
+ SPELL_SPIKE_CALL = 66169,
+ SPELL_SUBMERGE_ANUBARAK = 65981,
+ SPELL_CLEAR_ALL_DEBUFFS = 34098,
+ SPELL_EMERGE_ANUBARAK = 65982,
+ SPELL_SUMMON_BEATLES = 66339,
+ SPELL_SUMMON_BURROWER = 66332,
// Burrow
- SPELL_CHURNING_GROUND = 66969,
+ SPELL_CHURNING_GROUND = 66969,
// Scarab
- SPELL_DETERMINATION = 66092,
- SPELL_ACID_MANDIBLE = 65774, //Passive - Triggered
+ SPELL_DETERMINATION = 66092,
+ SPELL_ACID_MANDIBLE = 65774, //Passive - Triggered
// Burrower
- SPELL_SPIDER_FRENZY = 66128,
- SPELL_EXPOSE_WEAKNESS = 67720, //Passive - Triggered
- SPELL_SHADOW_STRIKE = 66134,
- SPELL_SUBMERGE_EFFECT = 68394,
- SPELL_AWAKENED = 66311,
- SPELL_EMERGE_EFFECT = 65982,
+ SPELL_SPIDER_FRENZY = 66128,
+ SPELL_EXPOSE_WEAKNESS = 67720, //Passive - Triggered
+ SPELL_SHADOW_STRIKE = 66134,
+ SPELL_SUBMERGE_EFFECT = 68394,
+ SPELL_AWAKENED = 66311,
+ SPELL_EMERGE_EFFECT = 65982,
- SPELL_PERSISTENT_DIRT = 68048,
+ SPELL_PERSISTENT_DIRT = 68048,
- SUMMON_SCARAB = NPC_SCARAB,
- SUMMON_FROSTSPHERE = NPC_FROST_SPHERE,
- SPELL_BERSERK = 26662,
+ SUMMON_SCARAB = NPC_SCARAB,
+ SUMMON_FROSTSPHERE = NPC_FROST_SPHERE,
+ SPELL_BERSERK = 26662,
//Frost Sphere
- SPELL_FROST_SPHERE = 67539,
- SPELL_PERMAFROST = 66193,
- SPELL_PERMAFROST_VISUAL = 65882,
- SPELL_PERMAFROST_MODEL = 66185,
+ SPELL_FROST_SPHERE = 67539,
+ SPELL_PERMAFROST = 66193,
+ SPELL_PERMAFROST_VISUAL = 65882,
+ SPELL_PERMAFROST_MODEL = 66185,
//Spike
- SPELL_SUMMON_SPIKE = 66169,
- SPELL_SPIKE_SPEED1 = 65920,
- SPELL_SPIKE_TRAIL = 65921,
- SPELL_SPIKE_SPEED2 = 65922,
- SPELL_SPIKE_SPEED3 = 65923,
- SPELL_SPIKE_FAIL = 66181,
- SPELL_SPIKE_TELE = 66170
+ SPELL_SUMMON_SPIKE = 66169,
+ SPELL_SPIKE_SPEED1 = 65920,
+ SPELL_SPIKE_TRAIL = 65921,
+ SPELL_SPIKE_SPEED2 = 65922,
+ SPELL_SPIKE_SPEED3 = 65923,
+ SPELL_SPIKE_FAIL = 66181,
+ SPELL_SPIKE_TELE = 66170
};
#define SPELL_PERMAFROST_HELPER RAID_MODE<uint32>(66193, 67855, 67856, 67857)
@@ -841,6 +842,49 @@ class spell_impale : public SpellScriptLoader
}
};
+class spell_anubarak_leeching_swarm : public SpellScriptLoader
+{
+ public:
+ spell_anubarak_leeching_swarm() : SpellScriptLoader("spell_anubarak_leeching_swarm") { }
+
+ class spell_anubarak_leeching_swarm_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_anubarak_leeching_swarm_AuraScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_LEECHING_SWARM_DMG) || !sSpellMgr->GetSpellInfo(SPELL_LEECHING_SWARM_HEAL))
+ return false;
+ return true;
+ }
+
+ void HandleEffectPeriodic(AuraEffect const* aurEff)
+ {
+ Unit* caster = GetCaster();
+ if (Unit* target = GetTarget())
+ {
+ int32 lifeLeeched = target->CountPctFromCurHealth(aurEff->GetAmount());
+ if (lifeLeeched < 250)
+ lifeLeeched = 250;
+ // Damage
+ caster->CastCustomSpell(target, SPELL_LEECHING_SWARM_DMG, &lifeLeeched, 0, 0, false);
+ // Heal
+ caster->CastCustomSpell(caster, SPELL_LEECHING_SWARM_HEAL, &lifeLeeched, 0, 0, false);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_anubarak_leeching_swarm_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_anubarak_leeching_swarm_AuraScript();
+ }
+};
+
void AddSC_boss_anubarak_trial()
{
new boss_anubarak_trial();
@@ -850,4 +894,5 @@ void AddSC_boss_anubarak_trial()
new mob_frost_sphere();
new spell_impale();
+ new spell_anubarak_leeching_swarm();
}
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
index a99aa373602..a99aa373602 100755..100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
index e2068cabb95..e2068cabb95 100755..100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
index 2d09feef089..2d09feef089 100755..100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
index 01d3bcbfe90..01d3bcbfe90 100755..100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
index fb084ec1e3c..fb084ec1e3c 100755..100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
index b4d35afa8fb..b4d35afa8fb 100755..100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
index 6ce56958d60..1ad776a0b46 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
@@ -36,12 +36,11 @@ enum Spells
//not in db
enum Yells
{
- SAY_AGGRO = -1600000,
- SAY_KILL = -1600001,
- SAY_DEATH = -1600002,
- SAY_NECRO_ADD = -1600003,
- SAY_REUBBLE_1 = -1600004,
- SAY_REUBBLE_2 = -1600005
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_DEATH = 2,
+ SAY_NECRO_ADD = 3,
+ SAY_REUBBLE = 4
};
enum Creatures
@@ -123,7 +122,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
Phase = PHASE_1;
uiCrystalHandlerTimer = 30*IN_MILLISECONDS;
uiTimer = 1*IN_MILLISECONDS;
@@ -159,7 +158,7 @@ public:
{
if (uiCrystalHandlerTimer <= diff)
{
- DoScriptText(SAY_NECRO_ADD, me);
+ Talk(SAY_NECRO_ADD);
Creature* pCrystalHandler = me->SummonCreature(CREATURE_CRYSTAL_HANDLER, CrystalHandlerSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20*IN_MILLISECONDS);
pCrystalHandler->GetMotionMaster()->MovePoint(0, AddDestinyPoint);
uiCrystalHandlerTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS);
@@ -181,7 +180,7 @@ public:
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_NOVOS_EVENT, DONE);
lSummons.DespawnAll();
@@ -191,7 +190,7 @@ public:
{
if (victim == me)
return;
- DoScriptText(SAY_KILL, me);
+ Talk(SAY_KILL);
}
void JustSummoned(Creature* summon)
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp
index 79739280055..4cbabe2449a 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp
@@ -44,14 +44,11 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1600011,
- SAY_KILL_1 = -1600012,
- SAY_KILL_2 = -1600013,
- SAY_FLESH_1 = -1600014,
- SAY_FLESH_2 = -1600015,
- SAY_SKELETON_1 = -1600016,
- SAY_SKELETON_2 = -1600017,
- SAY_DEATH = -1600018
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_FLESH = 2,
+ SAY_SKELETON = 3,
+ SAY_DEATH = 4
};
enum Models
{
@@ -104,7 +101,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_THARON_JA_EVENT, IN_PROGRESS);
@@ -150,7 +147,7 @@ public:
case GOING_FLESH:
if (uiPhaseTimer < diff)
{
- DoScriptText(RAND(SAY_FLESH_1, SAY_FLESH_2), me);
+ Talk(SAY_FLESH);
me->SetDisplayId(MODEL_FLESH);
std::list<Unit*> playerList;
@@ -200,7 +197,7 @@ public:
case GOING_SKELETAL:
if (uiPhaseTimer < diff)
{
- DoScriptText(RAND(SAY_SKELETON_1, SAY_SKELETON_2), me);
+ Talk(SAY_SKELETON);
me->DeMorph();
Phase = SKELETAL;
uiPhaseTimer = 20*IN_MILLISECONDS;
@@ -224,12 +221,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
+ Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
{
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
index d8c720b6f95..60001e048a3 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
@@ -39,11 +39,11 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1600006,
- SAY_KILL = -1600007,
- SAY_CONSUME = -1600008,
- SAY_EXPLODE = -1600009,
- SAY_DEATH = -1600010
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_CONSUME = 2,
+ SAY_EXPLODE = 3,
+ SAY_DEATH = 4
};
enum Creatures
@@ -102,7 +102,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_TROLLGORE_EVENT, IN_PROGRESS);
@@ -124,7 +124,7 @@ public:
if (uiConsumeTimer <= diff)
{
- DoScriptText(SAY_CONSUME, me);
+ Talk(SAY_CONSUME);
DoCast(SPELL_CONSUME);
uiConsumeTimer = 15*IN_MILLISECONDS;
} else uiConsumeTimer -= diff;
@@ -151,7 +151,7 @@ public:
if (uiExplodeCorpseTimer <= diff)
{
DoCast(SPELL_CORPSE_EXPLODE);
- DoScriptText(SAY_EXPLODE, me);
+ Talk(SAY_EXPLODE);
uiExplodeCorpseTimer = urand(15*IN_MILLISECONDS, 19*IN_MILLISECONDS);
} else uiExplodeCorpseTimer -= diff;
@@ -160,7 +160,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
lSummons.DespawnAll();
@@ -180,7 +180,7 @@ public:
{
if (victim == me)
return;
- DoScriptText(SAY_KILL, me);
+ Talk(SAY_KILL);
}
void JustSummoned(Creature* summon)
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp
index b790ed518d5..1940ff4e2af 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp
@@ -23,12 +23,11 @@
enum Yells
{
- SAY_AGGRO = -1632001,
- SAY_SLAY_1 = -1632002,
- SAY_SLAY_2 = -1632003,
- SAY_DEATH = -1632004,
- SAY_SOUL_STORM = -1632005,
- SAY_CORRUPT_SOUL = -1632006,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SOUL_STORM = 3,
+ SAY_CORRUPT_SOUL = 4,
};
enum Spells
@@ -98,7 +97,7 @@ class boss_bronjahm : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
me->RemoveAurasDueToSpell(SPELL_SOULSTORM_CHANNEL);
instance->SetBossState(DATA_BRONJAHM, IN_PROGRESS);
@@ -106,7 +105,7 @@ class boss_bronjahm : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
instance->SetBossState(DATA_BRONJAHM, DONE);
}
@@ -114,7 +113,7 @@ class boss_bronjahm : public CreatureScript
void KilledUnit(Unit* who)
{
if (who->GetTypeId() == TYPEID_PLAYER)
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/)
@@ -163,13 +162,13 @@ class boss_bronjahm : public CreatureScript
case EVENT_CORRUPT_SOUL:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
{
- DoScriptText(SAY_CORRUPT_SOUL, me);
+ Talk(SAY_CORRUPT_SOUL);
DoCast(target, SPELL_CORRUPT_SOUL);
}
events.ScheduleEvent(EVENT_CORRUPT_SOUL, urand(25000, 35000), 0, PHASE_1);
break;
case EVENT_SOULSTORM:
- DoScriptText(SAY_SOUL_STORM, me);
+ Talk(SAY_SOUL_STORM);
me->CastSpell(me, SPELL_SOULSTORM_VISUAL, true);
me->CastSpell(me, SPELL_SOULSTORM, false);
break;
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp
index 714e5df6444..248fe3c6eb0 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp
@@ -29,40 +29,32 @@
enum Yells
{
- SAY_FACE_ANGER_AGGRO = -1632010,
- SAY_FACE_DESIRE_AGGRO = -1632011,
- SAY_FACE_ANGER_SLAY_1 = -1632012,
- SAY_FACE_SORROW_SLAY_1 = -1632013,
- SAY_FACE_DESIRE_SLAY_1 = -1632014,
- SAY_FACE_ANGER_SLAY_2 = -1632015,
- SAY_FACE_SORROW_SLAY_2 = -1632016,
- SAY_FACE_DESIRE_SLAY_2 = -1632017,
- SAY_FACE_SORROW_DEATH = -1632019,
- SAY_FACE_DESIRE_DEATH = -1632020,
- EMOTE_MIRRORED_SOUL = -1632021,
- EMOTE_UNLEASH_SOUL = -1632022,
- SAY_FACE_ANGER_UNLEASH_SOUL = -1632023,
- SAY_FACE_SORROW_UNLEASH_SOUL = -1632024,
- SAY_FACE_DESIRE_UNLEASH_SOUL = -1632025,
- EMOTE_WAILING_SOUL = -1632026,
- SAY_FACE_ANGER_WAILING_SOUL = -1632027,
- SAY_FACE_DESIRE_WAILING_SOUL = -1632028,
-
- SAY_JAINA_OUTRO = -1632029,
- SAY_SYLVANAS_OUTRO = -1632030,
+ SAY_FACE_AGGRO = 0,
+ SAY_FACE_ANGER_SLAY = 1,
+ SAY_FACE_SORROW_SLAY = 2,
+ SAY_FACE_DESIRE_SLAY = 3,
+ SAY_FACE_DEATH = 4,
+ EMOTE_MIRRORED_SOUL = 5,
+ EMOTE_UNLEASH_SOUL = 6,
+ SAY_FACE_UNLEASH_SOUL = 7,
+ EMOTE_WAILING_SOUL = 8,
+ SAY_FACE_WAILING_SOUL = 9,
+
+ SAY_JAINA_OUTRO = 0,
+ SAY_SYLVANAS_OUTRO = 0
};
enum Spells
{
- SPELL_PHANTOM_BLAST = 68982,
- H_SPELL_PHANTOM_BLAST = 70322,
- SPELL_MIRRORED_SOUL = 69051,
- SPELL_WELL_OF_SOULS = 68820,
- SPELL_UNLEASHED_SOULS = 68939,
- SPELL_WAILING_SOULS_STARTING = 68912, // Initial spell cast at begining of wailing souls phase
- SPELL_WAILING_SOULS_BEAM = 68875, // the beam visual
- SPELL_WAILING_SOULS = 68873, // the actual spell
- H_SPELL_WAILING_SOULS = 70324,
+ SPELL_PHANTOM_BLAST = 68982,
+ H_SPELL_PHANTOM_BLAST = 70322,
+ SPELL_MIRRORED_SOUL = 69051,
+ SPELL_WELL_OF_SOULS = 68820,
+ SPELL_UNLEASHED_SOULS = 68939,
+ SPELL_WAILING_SOULS_STARTING = 68912, // Initial spell cast at begining of wailing souls phase
+ SPELL_WAILING_SOULS_BEAM = 68875, // the beam visual
+ SPELL_WAILING_SOULS = 68873, // the actual spell
+ H_SPELL_WAILING_SOULS = 70324,
// 68871, 68873, 68875, 68876, 68899, 68912, 70324,
// 68899 trigger 68871
};
@@ -157,7 +149,7 @@ class boss_devourer_of_souls : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_FACE_ANGER_AGGRO, SAY_FACE_DESIRE_AGGRO), me);
+ Talk(SAY_FACE_AGGRO);
if (!me->FindNearestCreature(NPC_CRUCIBLE_OF_SOULS, 60)) // Prevent double spawn
instance->instance->SummonCreature(NPC_CRUCIBLE_OF_SOULS, CrucibleSummonPos);
@@ -196,20 +188,20 @@ class boss_devourer_of_souls : public CreatureScript
switch (me->GetDisplayId())
{
case DISPLAY_ANGER:
- textId = RAND(SAY_FACE_ANGER_SLAY_1, SAY_FACE_ANGER_SLAY_2);
+ textId = SAY_FACE_ANGER_SLAY;
break;
case DISPLAY_SORROW:
- textId = RAND(SAY_FACE_SORROW_SLAY_1, SAY_FACE_SORROW_SLAY_2);
+ textId = SAY_FACE_SORROW_SLAY;
break;
case DISPLAY_DESIRE:
- textId = RAND(SAY_FACE_DESIRE_SLAY_1, SAY_FACE_DESIRE_SLAY_2);
+ textId = SAY_FACE_DESIRE_SLAY;
break;
default:
break;
}
if (textId)
- DoScriptText(textId, me);
+ Talk(textId);
}
void JustDied(Unit* /*killer*/)
@@ -218,7 +210,7 @@ class boss_devourer_of_souls : public CreatureScript
Position spawnPoint = {5618.139f, 2451.873f, 705.854f, 0};
- DoScriptText(RAND(SAY_FACE_SORROW_DEATH, SAY_FACE_DESIRE_DEATH), me);
+ Talk(SAY_FACE_DEATH);
instance->SetData(DATA_DEVOURER_EVENT, DONE);
@@ -234,9 +226,9 @@ class boss_devourer_of_souls : public CreatureScript
{
summon->GetMotionMaster()->MovePoint(0, outroPositions[i].movePosition);
if (summon->GetEntry() == NPC_JAINA_PART2)
- DoScriptText(SAY_JAINA_OUTRO, summon);
+ summon->AI()->Talk(SAY_JAINA_OUTRO);
else if (summon->GetEntry() == NPC_SYLVANAS_PART2)
- DoScriptText(SAY_SYLVANAS_OUTRO, summon);
+ summon->AI()->Talk(SAY_SYLVANAS_OUTRO);
}
}
}
@@ -279,7 +271,7 @@ class boss_devourer_of_souls : public CreatureScript
{
mirroredSoulTarget = target->GetGUID();
DoCast(target, SPELL_MIRRORED_SOUL);
- DoScriptText(EMOTE_MIRRORED_SOUL, me);
+ Talk(EMOTE_MIRRORED_SOUL);
}
events.ScheduleEvent(EVENT_MIRRORED_SOUL, urand(15000, 30000));
break;
@@ -292,8 +284,8 @@ class boss_devourer_of_souls : public CreatureScript
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_UNLEASHED_SOULS);
me->SetDisplayId(DISPLAY_SORROW);
- DoScriptText(RAND(SAY_FACE_ANGER_UNLEASH_SOUL, SAY_FACE_SORROW_UNLEASH_SOUL, SAY_FACE_DESIRE_UNLEASH_SOUL), me);
- DoScriptText(EMOTE_UNLEASH_SOUL, me);
+ Talk(SAY_FACE_UNLEASH_SOUL);
+ Talk(EMOTE_UNLEASH_SOUL);
events.ScheduleEvent(EVENT_UNLEASHED_SOULS, 30000);
events.ScheduleEvent(EVENT_FACE_ANGER, 5000);
break;
@@ -303,8 +295,8 @@ class boss_devourer_of_souls : public CreatureScript
case EVENT_WAILING_SOULS:
me->SetDisplayId(DISPLAY_DESIRE);
- DoScriptText(RAND(SAY_FACE_ANGER_WAILING_SOUL, SAY_FACE_DESIRE_WAILING_SOUL), me);
- DoScriptText(EMOTE_WAILING_SOUL, me);
+ Talk(SAY_FACE_WAILING_SOUL);
+ Talk(EMOTE_WAILING_SOUL);
DoCast(me, SPELL_WAILING_SOULS_STARTING);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp
index 2f89d3bd503..895efd84580 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp
@@ -42,21 +42,21 @@ enum Events
enum Yells
{
- SAY_JAINA_INTRO_1 = -1632040,
- SAY_JAINA_INTRO_2 = -1632041,
- SAY_JAINA_INTRO_3 = -1632042,
- SAY_JAINA_INTRO_4 = -1632043,
- SAY_JAINA_INTRO_5 = -1632044,
- SAY_JAINA_INTRO_6 = -1632045,
- SAY_JAINA_INTRO_7 = -1632046,
- SAY_JAINA_INTRO_8 = -1632047,
-
- SAY_SYLVANAS_INTRO_1 = -1632050,
- SAY_SYLVANAS_INTRO_2 = -1632051,
- SAY_SYLVANAS_INTRO_3 = -1632052,
- SAY_SYLVANAS_INTRO_4 = -1632053,
- SAY_SYLVANAS_INTRO_5 = -1632054,
- SAY_SYLVANAS_INTRO_6 = -1632055,
+ SAY_JAINA_INTRO_1 = 0,
+ SAY_JAINA_INTRO_2 = 1,
+ SAY_JAINA_INTRO_3 = 2,
+ SAY_JAINA_INTRO_4 = 3,
+ SAY_JAINA_INTRO_5 = 4,
+ SAY_JAINA_INTRO_6 = 5,
+ SAY_JAINA_INTRO_7 = 6,
+ SAY_JAINA_INTRO_8 = 7,
+
+ SAY_SYLVANAS_INTRO_1 = 0,
+ SAY_SYLVANAS_INTRO_2 = 1,
+ SAY_SYLVANAS_INTRO_3 = 2,
+ SAY_SYLVANAS_INTRO_4 = 3,
+ SAY_SYLVANAS_INTRO_5 = 4,
+ SAY_SYLVANAS_INTRO_6 = 5,
};
enum eSylvanas
@@ -120,32 +120,32 @@ public:
switch (events.ExecuteEvent())
{
case EVENT_INTRO_1:
- DoScriptText(SAY_SYLVANAS_INTRO_1, me);
+ Talk(SAY_SYLVANAS_INTRO_1);
events.ScheduleEvent(EVENT_INTRO_2, 11500);
break;
case EVENT_INTRO_2:
- DoScriptText(SAY_SYLVANAS_INTRO_2, me);
+ Talk(SAY_SYLVANAS_INTRO_2);
events.ScheduleEvent(EVENT_INTRO_3, 10500);
break;
case EVENT_INTRO_3:
- DoScriptText(SAY_SYLVANAS_INTRO_3, me);
+ Talk(SAY_SYLVANAS_INTRO_3);
events.ScheduleEvent(EVENT_INTRO_4, 9500);
break;
case EVENT_INTRO_4:
- DoScriptText(SAY_SYLVANAS_INTRO_4, me);
+ Talk(SAY_SYLVANAS_INTRO_4);
events.ScheduleEvent(EVENT_INTRO_5, 10500);
break;
case EVENT_INTRO_5:
- DoScriptText(SAY_SYLVANAS_INTRO_5, me);
+ Talk(SAY_SYLVANAS_INTRO_5);
events.ScheduleEvent(EVENT_INTRO_6, 9500);
break;
case EVENT_INTRO_6:
- DoScriptText(SAY_SYLVANAS_INTRO_6, me);
+ Talk(SAY_SYLVANAS_INTRO_6);
// End of Intro
phase = PHASE_NORMAL;
break;
@@ -246,42 +246,42 @@ public:
switch (events.ExecuteEvent())
{
case EVENT_INTRO_1:
- DoScriptText(SAY_JAINA_INTRO_1, me);
+ Talk(SAY_JAINA_INTRO_1);
events.ScheduleEvent(EVENT_INTRO_2, 8000);
break;
case EVENT_INTRO_2:
- DoScriptText(SAY_JAINA_INTRO_2, me);
+ Talk(SAY_JAINA_INTRO_2);
events.ScheduleEvent(EVENT_INTRO_3, 8500);
break;
case EVENT_INTRO_3:
- DoScriptText(SAY_JAINA_INTRO_3, me);
+ Talk(SAY_JAINA_INTRO_3);
events.ScheduleEvent(EVENT_INTRO_4, 8000);
break;
case EVENT_INTRO_4:
- DoScriptText(SAY_JAINA_INTRO_4, me);
+ Talk(SAY_JAINA_INTRO_4);
events.ScheduleEvent(EVENT_INTRO_5, 10000);
break;
case EVENT_INTRO_5:
- DoScriptText(SAY_JAINA_INTRO_5, me);
+ Talk(SAY_JAINA_INTRO_5);
events.ScheduleEvent(EVENT_INTRO_6, 8000);
break;
case EVENT_INTRO_6:
- DoScriptText(SAY_JAINA_INTRO_6, me);
+ Talk(SAY_JAINA_INTRO_6);
events.ScheduleEvent(EVENT_INTRO_7, 12000);
break;
case EVENT_INTRO_7:
- DoScriptText(SAY_JAINA_INTRO_7, me);
+ Talk(SAY_JAINA_INTRO_7);
events.ScheduleEvent(EVENT_INTRO_8, 8000);
break;
case EVENT_INTRO_8:
- DoScriptText(SAY_JAINA_INTRO_8, me);
+ Talk(SAY_JAINA_INTRO_8);
// End of Intro
phase = PHASE_NORMAL;
break;
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp
index 4df13d32bf8..bb3028518ec 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp
@@ -21,12 +21,11 @@
enum Yells
{
- SAY_AGGRO = -1668050,
- SAY_SLAY_1 = -1668051,
- SAY_SLAY_2 = -1668052,
- SAY_DEATH = -1668053,
- SAY_IMPENDING_DESPAIR = -1668054,
- SAY_DEFILING_HORROR = -1668055,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_IMPENDING_DESPAIR = 3,
+ SAY_DEFILING_HORROR = 4,
};
enum Spells
@@ -74,7 +73,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_FALRIC_EVENT, IN_PROGRESS);
@@ -85,7 +84,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_FALRIC_EVENT, DONE);
@@ -93,7 +92,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -116,7 +115,7 @@ public:
case EVENT_IMPENDING_DESPAIR:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
{
- DoScriptText(SAY_IMPENDING_DESPAIR, me);
+ Talk(SAY_IMPENDING_DESPAIR);
DoCast(target, SPELL_IMPENDING_DESPAIR);
}
events.ScheduleEvent(EVENT_IMPENDING_DESPAIR, 13000);
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp
index 8334a199791..697e8cfb664 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp
@@ -21,12 +21,10 @@
enum Yells
{
- SAY_AGGRO = -1668060,
- SAY_SLAY_1 = -1668061,
- SAY_SLAY_2 = -1668062,
- SAY_DEATH = -1668063,
- SAY_CORRUPTED_FLESH_1 = -1668064,
- SAY_CORRUPTED_FLESH_2 = -1668065,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_CORRUPTED_FLESH = 3
};
enum Spells
@@ -70,7 +68,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_MARWYN_EVENT, IN_PROGRESS);
@@ -82,7 +80,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_MARWYN_EVENT, DONE);
@@ -90,7 +88,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -115,7 +113,7 @@ public:
events.ScheduleEvent(EVENT_WELL_OF_CORRUPTION, 13000);
break;
case EVENT_CORRUPTED_FLESH:
- DoScriptText(RAND(SAY_CORRUPTED_FLESH_1, SAY_CORRUPTED_FLESH_2), me);
+ Talk(SAY_CORRUPTED_FLESH);
DoCast(SPELL_CORRUPTED_FLESH);
events.ScheduleEvent(EVENT_CORRUPTED_FLESH, 20000);
break;
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
index 4f80fd746ee..c1a3a432407 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
@@ -23,52 +23,54 @@
enum Yells
{
- SAY_JAINA_INTRO_1 = -1668001,
- SAY_JAINA_INTRO_2 = -1668002,
- SAY_JAINA_INTRO_3 = -1668003,
- SAY_JAINA_INTRO_4 = -1668004,
- SAY_UTHER_INTRO_A2_1 = -1668005,
- SAY_JAINA_INTRO_5 = -1668006,
- SAY_UTHER_INTRO_A2_2 = -1668007,
- SAY_JAINA_INTRO_6 = -1668008,
- SAY_UTHER_INTRO_A2_3 = -1668009,
- SAY_JAINA_INTRO_7 = -1668010,
- SAY_UTHER_INTRO_A2_4 = -1668011,
- SAY_JAINA_INTRO_8 = -1668012,
- SAY_UTHER_INTRO_A2_5 = -1668013,
- SAY_JAINA_INTRO_9 = -1668014,
- SAY_UTHER_INTRO_A2_6 = -1668015,
- SAY_UTHER_INTRO_A2_7 = -1668016,
- SAY_JAINA_INTRO_10 = -1668017,
- SAY_UTHER_INTRO_A2_8 = -1668018,
- SAY_JAINA_INTRO_11 = -1668019,
- SAY_UTHER_INTRO_A2_9 = -1668020,
-
- SAY_SYLVANAS_INTRO_1 = -1668021,
- SAY_SYLVANAS_INTRO_2 = -1668022,
- SAY_SYLVANAS_INTRO_3 = -1668023,
- SAY_UTHER_INTRO_H2_1 = -1668024,
- SAY_SYLVANAS_INTRO_4 = -1668025,
- SAY_UTHER_INTRO_H2_2 = -1668026,
- SAY_SYLVANAS_INTRO_5 = -1668027,
- SAY_UTHER_INTRO_H2_3 = -1668028,
- SAY_SYLVANAS_INTRO_6 = -1668029,
- SAY_UTHER_INTRO_H2_4 = -1668030,
- SAY_SYLVANAS_INTRO_7 = -1668031,
- SAY_UTHER_INTRO_H2_5 = -1668032,
- SAY_UTHER_INTRO_H2_6 = -1668033,
- SAY_SYLVANAS_INTRO_8 = -1668034,
- SAY_UTHER_INTRO_H2_7 = -1668035,
-
- SAY_LK_INTRO_1 = -1668036,
- SAY_LK_INTRO_2 = -1668037,
- SAY_LK_INTRO_3 = -1668038,
- SAY_FALRIC_INTRO_1 = -1668039,
- SAY_MARWYN_INTRO_1 = -1668040,
- SAY_FALRIC_INTRO_2 = -1668041,
-
- SAY_JAINA_INTRO_END = -1668042,
- SAY_SYLVANAS_INTRO_END = -1668043,
+ SAY_JAINA_INTRO_1 = 0,
+ SAY_JAINA_INTRO_2 = 1,
+ SAY_JAINA_INTRO_3 = 2,
+ SAY_JAINA_INTRO_4 = 3,
+ SAY_JAINA_INTRO_5 = 4,
+ SAY_JAINA_INTRO_6 = 5,
+ SAY_JAINA_INTRO_7 = 6,
+ SAY_JAINA_INTRO_8 = 7,
+ SAY_JAINA_INTRO_9 = 8,
+ SAY_JAINA_INTRO_10 = 9,
+ SAY_JAINA_INTRO_11 = 10,
+ SAY_JAINA_INTRO_END = 11,
+
+ SAY_SYLVANAS_INTRO_1 = 0,
+ SAY_SYLVANAS_INTRO_2 = 1,
+ SAY_SYLVANAS_INTRO_3 = 2,
+ SAY_SYLVANAS_INTRO_4 = 3,
+ SAY_SYLVANAS_INTRO_5 = 4,
+ SAY_SYLVANAS_INTRO_6 = 5,
+ SAY_SYLVANAS_INTRO_7 = 6,
+ SAY_SYLVANAS_INTRO_8 = 7,
+ SAY_SYLVANAS_INTRO_END = 8,
+
+ SAY_UTHER_INTRO_A2_1 = 0,
+ SAY_UTHER_INTRO_A2_2 = 1,
+ SAY_UTHER_INTRO_A2_3 = 2,
+ SAY_UTHER_INTRO_A2_4 = 3,
+ SAY_UTHER_INTRO_A2_5 = 4,
+ SAY_UTHER_INTRO_A2_6 = 5,
+ SAY_UTHER_INTRO_A2_7 = 6,
+ SAY_UTHER_INTRO_A2_8 = 7,
+ SAY_UTHER_INTRO_A2_9 = 8,
+ SAY_UTHER_INTRO_H2_1 = 9,
+ SAY_UTHER_INTRO_H2_2 = 10,
+ SAY_UTHER_INTRO_H2_3 = 11,
+ SAY_UTHER_INTRO_H2_4 = 12,
+ SAY_UTHER_INTRO_H2_5 = 13,
+ SAY_UTHER_INTRO_H2_6 = 14,
+ SAY_UTHER_INTRO_H2_7 = 15,
+
+ SAY_LK_INTRO_1 = 0,
+ SAY_LK_INTRO_2 = 1,
+ SAY_LK_INTRO_3 = 2,
+
+ SAY_FALRIC_INTRO_1 = 5,
+ SAY_FALRIC_INTRO_2 = 6,
+
+ SAY_MARWYN_INTRO_1 = 4
};
enum Events
@@ -214,8 +216,8 @@ public:
}
InstanceScript* instance;
- uint64 uiUther;
- uint64 uiLichKing;
+ uint64 utherGUID;
+ uint64 lichkingGUID;
EventMap events;
@@ -223,8 +225,8 @@ public:
{
events.Reset();
- uiUther = 0;
- uiLichKing = 0;
+ utherGUID = 0;
+ lichkingGUID = 0;
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
me->SetStandState(UNIT_STAND_STATE_STAND);
@@ -260,11 +262,11 @@ public:
// A2 Intro Events
case EVENT_INTRO_A2_1:
- DoScriptText(SAY_JAINA_INTRO_3, me);
+ Talk(SAY_JAINA_INTRO_3);
events.ScheduleEvent(EVENT_INTRO_A2_2, 5000);
break;
case EVENT_INTRO_A2_2:
- DoScriptText(SAY_JAINA_INTRO_4, me);
+ Talk(SAY_JAINA_INTRO_4);
events.ScheduleEvent(EVENT_INTRO_A2_3, 10000);
break;
case EVENT_INTRO_A2_3:
@@ -274,197 +276,197 @@ public:
break;
case EVENT_INTRO_A2_4:
// spawn UTHER during speach 2
- if (Creature* pUther = me->SummonCreature(NPC_UTHER, UtherSpawnPos, TEMPSUMMON_MANUAL_DESPAWN))
+ if (Creature* uther = me->SummonCreature(NPC_UTHER, UtherSpawnPos, TEMPSUMMON_MANUAL_DESPAWN))
{
- pUther->GetMotionMaster()->MoveIdle();
- pUther->SetReactState(REACT_PASSIVE); // be sure he will not aggro arthas
- uiUther = pUther->GetGUID();
+ uther->GetMotionMaster()->MoveIdle();
+ uther->SetReactState(REACT_PASSIVE); // be sure he will not aggro arthas
+ utherGUID = uther->GetGUID();
}
events.ScheduleEvent(EVENT_INTRO_A2_5, 2000);
break;
case EVENT_INTRO_A2_5:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_A2_1, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_A2_1);
events.ScheduleEvent(EVENT_INTRO_A2_6, 3000);
break;
case EVENT_INTRO_A2_6:
- DoScriptText(SAY_JAINA_INTRO_5, me);
+ Talk(SAY_JAINA_INTRO_5);
events.ScheduleEvent(EVENT_INTRO_A2_7, 6000);
break;
case EVENT_INTRO_A2_7:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_A2_2, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_A2_2);
events.ScheduleEvent(EVENT_INTRO_A2_8, 6500);
break;
case EVENT_INTRO_A2_8:
- DoScriptText(SAY_JAINA_INTRO_6, me);
+ Talk(SAY_JAINA_INTRO_6);
events.ScheduleEvent(EVENT_INTRO_A2_9, 2000);
break;
case EVENT_INTRO_A2_9:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_A2_3, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_A2_3);
events.ScheduleEvent(EVENT_INTRO_A2_10, 9000);
break;
case EVENT_INTRO_A2_10:
- DoScriptText(SAY_JAINA_INTRO_7, me);
+ Talk(SAY_JAINA_INTRO_7);
events.ScheduleEvent(EVENT_INTRO_A2_11, 5000);
break;
case EVENT_INTRO_A2_11:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_A2_4, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_A2_4);
events.ScheduleEvent(EVENT_INTRO_A2_12, 11000);
break;
case EVENT_INTRO_A2_12:
- DoScriptText(SAY_JAINA_INTRO_8, me);
+ Talk(SAY_JAINA_INTRO_8);
events.ScheduleEvent(EVENT_INTRO_A2_13, 4000);
break;
case EVENT_INTRO_A2_13:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_A2_5, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_A2_5);
events.ScheduleEvent(EVENT_INTRO_A2_14, 12500);
break;
case EVENT_INTRO_A2_14:
- DoScriptText(SAY_JAINA_INTRO_9, me);
+ Talk(SAY_JAINA_INTRO_9);
events.ScheduleEvent(EVENT_INTRO_A2_15, 10000);
break;
case EVENT_INTRO_A2_15:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_A2_6, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_A2_6);
events.ScheduleEvent(EVENT_INTRO_A2_16, 22000);
break;
case EVENT_INTRO_A2_16:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_A2_7, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_A2_7);
events.ScheduleEvent(EVENT_INTRO_A2_17, 4000);
break;
case EVENT_INTRO_A2_17:
- DoScriptText(SAY_JAINA_INTRO_10, me);
+ Talk(SAY_JAINA_INTRO_10);
events.ScheduleEvent(EVENT_INTRO_A2_18, 2000);
break;
case EVENT_INTRO_A2_18:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
{
- pUther->HandleEmoteCommand(EMOTE_ONESHOT_NO);
- DoScriptText(SAY_UTHER_INTRO_A2_8, pUther);
+ uther->HandleEmoteCommand(EMOTE_ONESHOT_NO);
+ uther->AI()->Talk(SAY_UTHER_INTRO_A2_8);
}
events.ScheduleEvent(EVENT_INTRO_A2_19, 11000);
break;
case EVENT_INTRO_A2_19:
- DoScriptText(SAY_JAINA_INTRO_11, me);
+ Talk(SAY_JAINA_INTRO_11);
events.ScheduleEvent(EVENT_INTRO_LK_1, 2000);
break;
// H2 Intro Events
case EVENT_INTRO_H2_1:
- DoScriptText(SAY_SYLVANAS_INTRO_1, me);
+ Talk(SAY_SYLVANAS_INTRO_1);
events.ScheduleEvent(EVENT_INTRO_H2_2, 8000);
break;
case EVENT_INTRO_H2_2:
- DoScriptText(SAY_SYLVANAS_INTRO_2, me);
+ Talk(SAY_SYLVANAS_INTRO_2);
events.ScheduleEvent(EVENT_INTRO_H2_3, 6000);
break;
case EVENT_INTRO_H2_3:
- DoScriptText(SAY_SYLVANAS_INTRO_3, me);
+ Talk(SAY_SYLVANAS_INTRO_3);
// TODO: she's doing some kind of spell casting emote
events.ScheduleEvent(EVENT_INTRO_H2_4, 6000);
break;
case EVENT_INTRO_H2_4:
// spawn UTHER during speach 2
- if (Creature* pUther = me->SummonCreature(NPC_UTHER, UtherSpawnPos, TEMPSUMMON_MANUAL_DESPAWN))
+ if (Creature* uther = me->SummonCreature(NPC_UTHER, UtherSpawnPos, TEMPSUMMON_MANUAL_DESPAWN))
{
- pUther->GetMotionMaster()->MoveIdle();
- pUther->SetReactState(REACT_PASSIVE); // be sure he will not aggro arthas
- uiUther = pUther->GetGUID();
+ uther->GetMotionMaster()->MoveIdle();
+ uther->SetReactState(REACT_PASSIVE); // be sure he will not aggro arthas
+ utherGUID = uther->GetGUID();
}
events.ScheduleEvent(EVENT_INTRO_H2_5, 2000);
break;
case EVENT_INTRO_H2_5:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_H2_1, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_H2_1);
events.ScheduleEvent(EVENT_INTRO_H2_6, 11000);
break;
case EVENT_INTRO_H2_6:
- DoScriptText(SAY_SYLVANAS_INTRO_4, me);
+ Talk(SAY_SYLVANAS_INTRO_4);
events.ScheduleEvent(EVENT_INTRO_H2_7, 3000);
break;
case EVENT_INTRO_H2_7:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_H2_2, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_H2_2);
events.ScheduleEvent(EVENT_INTRO_H2_8, 6000);
break;
case EVENT_INTRO_H2_8:
- DoScriptText(SAY_SYLVANAS_INTRO_5, me);
+ Talk(SAY_SYLVANAS_INTRO_5);
events.ScheduleEvent(EVENT_INTRO_H2_9, 5000);
break;
case EVENT_INTRO_H2_9:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_H2_3, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_H2_3);
events.ScheduleEvent(EVENT_INTRO_H2_10, 19000);
break;
case EVENT_INTRO_H2_10:
- DoScriptText(SAY_SYLVANAS_INTRO_6, me);
+ Talk(SAY_SYLVANAS_INTRO_6);
events.ScheduleEvent(EVENT_INTRO_H2_11, 1500);
break;
case EVENT_INTRO_H2_11:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_H2_4, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_H2_4);
events.ScheduleEvent(EVENT_INTRO_H2_12, 19500);
break;
case EVENT_INTRO_H2_12:
- DoScriptText(SAY_SYLVANAS_INTRO_7, me);
+ Talk(SAY_SYLVANAS_INTRO_7);
events.ScheduleEvent(EVENT_INTRO_H2_13, 2000);
break;
case EVENT_INTRO_H2_13:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
{
- pUther->HandleEmoteCommand(EMOTE_ONESHOT_NO);
- DoScriptText(SAY_UTHER_INTRO_H2_5, pUther);
+ uther->HandleEmoteCommand(EMOTE_ONESHOT_NO);
+ uther->AI()->Talk(SAY_UTHER_INTRO_H2_5);
}
events.ScheduleEvent(EVENT_INTRO_H2_14, 12000);
break;
case EVENT_INTRO_H2_14:
- if (Creature* pUther = me->GetCreature(*me, uiUther))
- DoScriptText(SAY_UTHER_INTRO_H2_6, pUther);
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
+ uther->AI()->Talk(SAY_UTHER_INTRO_H2_6);
events.ScheduleEvent(EVENT_INTRO_H2_15, 8000);
break;
case EVENT_INTRO_H2_15:
- DoScriptText(SAY_SYLVANAS_INTRO_8, me);
+ Talk(SAY_SYLVANAS_INTRO_8);
events.ScheduleEvent(EVENT_INTRO_LK_1, 2000);
break;
// Remaining Intro Events common for both faction
case EVENT_INTRO_LK_1:
// Spawn LK in front of door, and make him move to the sword.
- if (Creature* pLichKing = me->SummonCreature(NPC_LICH_KING_EVENT, LichKingSpawnPos, TEMPSUMMON_MANUAL_DESPAWN))
+ if (Creature* lichking = me->SummonCreature(NPC_LICH_KING_EVENT, LichKingSpawnPos, TEMPSUMMON_MANUAL_DESPAWN))
{
- pLichKing->GetMotionMaster()->MovePoint(0, LichKingMoveThronePos);
- pLichKing->SetReactState(REACT_PASSIVE);
- uiLichKing = pLichKing->GetGUID();
+ lichking->GetMotionMaster()->MovePoint(0, LichKingMoveThronePos);
+ lichking->SetReactState(REACT_PASSIVE);
+ lichkingGUID = lichking->GetGUID();
}
- if (Creature* pUther = me->GetCreature(*me, uiUther))
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
{
if (instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
- DoScriptText(SAY_UTHER_INTRO_A2_9, pUther);
+ uther->AI()->Talk(SAY_UTHER_INTRO_A2_9);
else
- DoScriptText(SAY_UTHER_INTRO_H2_7, pUther);
+ uther->AI()->Talk(SAY_UTHER_INTRO_H2_7);
}
events.ScheduleEvent(EVENT_INTRO_LK_2, 11000);
break;
case EVENT_INTRO_LK_2:
- if (Creature* pLichKing = me->GetCreature(*me, uiLichKing))
- DoScriptText(SAY_LK_INTRO_1, pLichKing);
+ if (Creature* lichking = me->GetCreature(*me, lichkingGUID))
+ lichking->AI()->Talk(SAY_LK_INTRO_1);
events.ScheduleEvent(EVENT_INTRO_LK_3, 2000);
break;
case EVENT_INTRO_LK_3:
// The Lich King banishes Uther to the abyss.
- if (Creature* pUther = me->GetCreature(*me, uiUther))
+ if (Creature* uther = me->GetCreature(*me, utherGUID))
{
- pUther->DisappearAndDie();
- uiUther = 0;
+ uther->DisappearAndDie();
+ utherGUID = 0;
}
// He steps forward and removes the runeblade from the heap of skulls.
@@ -473,8 +475,8 @@ public:
break;
case EVENT_INTRO_LK_4:
- if (Creature* pLichKing = me->GetCreature(*me, uiLichKing))
- DoScriptText(SAY_LK_INTRO_2, pLichKing);
+ if (Creature* lichking = me->GetCreature(*me, lichkingGUID))
+ lichking->AI()->Talk(SAY_LK_INTRO_2);
events.ScheduleEvent(EVENT_INTRO_LK_5, 10000);
break;
@@ -485,41 +487,41 @@ public:
if (Creature* pMarwyn = me->GetCreature(*me, instance->GetData64(DATA_MARWYN)))
pMarwyn->SetVisible(true);
- if (Creature* pLichKing = me->GetCreature(*me, uiLichKing))
+ if (Creature* lichking = me->GetCreature(*me, lichkingGUID))
{
- pLichKing->GetMotionMaster()->MovePoint(0, LichKingSpawnPos);
- DoScriptText(SAY_LK_INTRO_3, pLichKing);
+ lichking->GetMotionMaster()->MovePoint(0, LichKingSpawnPos);
+ lichking->AI()->Talk(SAY_LK_INTRO_3);
}
events.ScheduleEvent(EVENT_INTRO_LK_6, 8000);
break;
case EVENT_INTRO_LK_6:
- if (Creature* pFalric = me->GetCreature(*me, instance->GetData64(DATA_FALRIC)))
- DoScriptText(SAY_FALRIC_INTRO_1, pFalric);
+ if (Creature* falric = me->GetCreature(*me, instance->GetData64(DATA_FALRIC)))
+ falric->AI()->Talk(SAY_FALRIC_INTRO_1);
events.ScheduleEvent(EVENT_INTRO_LK_7, 2000);
break;
case EVENT_INTRO_LK_7:
- if (Creature* pMarwyn = me->GetCreature(*me, instance->GetData64(DATA_MARWYN)))
- DoScriptText(SAY_MARWYN_INTRO_1, pMarwyn);
+ if (Creature* marwyn = me->GetCreature(*me, instance->GetData64(DATA_MARWYN)))
+ marwyn->AI()->Talk(SAY_MARWYN_INTRO_1);
events.ScheduleEvent(EVENT_INTRO_LK_8, 2000);
break;
case EVENT_INTRO_LK_8:
- if (Creature* pFalric = me->GetCreature(*me, instance->GetData64(DATA_FALRIC)))
- DoScriptText(SAY_FALRIC_INTRO_2, pFalric);
+ if (Creature* falric = me->GetCreature(*me, instance->GetData64(DATA_FALRIC)))
+ falric->AI()->Talk(SAY_FALRIC_INTRO_2);
events.ScheduleEvent(EVENT_INTRO_LK_9, 5000);
break;
case EVENT_INTRO_LK_9:
if (instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
- DoScriptText(SAY_JAINA_INTRO_END, me);
+ Talk(SAY_JAINA_INTRO_END);
else
- DoScriptText(SAY_SYLVANAS_INTRO_END, me);
+ Talk(SAY_SYLVANAS_INTRO_END);
me->GetMotionMaster()->MovePoint(0, LichKingSpawnPos);
// TODO: Loralen/Koreln shall run also
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp
index cdc21eb25ec..e8557482420 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp
@@ -23,15 +23,15 @@
enum Yells
{
- SAY_AGGRO = 0,
- SAY_PHASE2 = 1,
- SAY_PHASE3 = 2,
- SAY_DEATH = 3,
- SAY_SLAY = 4,
- SAY_THROW_SARONITE = 5,
- SAY_CAST_DEEP_FREEZE = 6,
-
- SAY_TYRANNUS_DEATH = -1658007, // todo
+ SAY_AGGRO = 0,
+ SAY_PHASE2 = 1,
+ SAY_PHASE3 = 2,
+ SAY_DEATH = 3,
+ SAY_SLAY = 4,
+ SAY_THROW_SARONITE = 5,
+ SAY_CAST_DEEP_FREEZE = 6,
+
+ SAY_TYRANNUS_DEATH = 0
};
enum Spells
@@ -48,16 +48,6 @@ enum Spells
#define SPELL_PERMAFROST_HELPER RAID_MODE<uint32>(68786, 70336)
#define SPELL_FORGE_BLADE_HELPER RAID_MODE<uint32>(68774, 70334)
-enum Events
-{
- EVENT_THROW_SARONITE = 1,
- EVENT_CHILLING_WAVE = 2,
- EVENT_DEEP_FREEZE = 3,
- EVENT_JUMP = 4,
- EVENT_FORGING = 5,
- EVENT_RESUME_ATTACK = 6,
-};
-
enum Phases
{
PHASE_ONE = 1,
@@ -82,6 +72,15 @@ Position const southForgePos = {639.257f, -210.1198f, 529.015f, 0.523599f};
class boss_garfrost : public CreatureScript
{
+enum Events
+{
+ EVENT_THROW_SARONITE = 1,
+ EVENT_CHILLING_WAVE = 2,
+ EVENT_DEEP_FREEZE = 3,
+ EVENT_JUMP = 4,
+ EVENT_FORGING = 5,
+ EVENT_RESUME_ATTACK = 6,
+};
public:
boss_garfrost() : CreatureScript("boss_garfrost") { }
@@ -130,7 +129,7 @@ class boss_garfrost : public CreatureScript
Talk(SAY_DEATH);
if (Creature* tyrannus = me->GetCreature(*me, instance->GetData64(DATA_TYRANNUS)))
- DoScriptText(SAY_TYRANNUS_DEATH, tyrannus);
+ tyrannus->AI()->Talk(SAY_TYRANNUS_DEATH);
instance->SetBossState(DATA_GARFROST, DONE);
}
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
index 41cfc300958..ed196d2cd0c 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
@@ -48,33 +48,30 @@ enum Spells
enum Yells
{
// Krick
- SAY_KRICK_AGGRO = -1658010,
- SAY_KRICK_SLAY_1 = -1658011,
- SAY_KRICK_SLAY_2 = -1658012,
- SAY_KRICK_BARRAGE_1 = -1658013,
- SAY_KRICK_BARRAGE_2 = -1658014,
- SAY_KRICK_POISON_NOVA = -1658015,
- SAY_KRICK_CHASE_1 = -1658016,
- SAY_KRICK_CHASE_2 = -1658017,
- SAY_KRICK_CHASE_3 = -1658018,
+ SAY_KRICK_AGGRO = 0,
+ SAY_KRICK_SLAY = 1,
+ SAY_KRICK_BARRAGE_1 = 2,
+ SAY_KRICK_BARRAGE_2 = 3,
+ SAY_KRICK_POISON_NOVA = 4,
+ SAY_KRICK_CHASE = 5,
+ SAY_KRICK_OUTRO_1 = 6,
+ SAY_KRICK_OUTRO_3 = 7,
+ SAY_KRICK_OUTRO_5 = 8,
+ SAY_KRICK_OUTRO_8 = 9,
// Ick
- SAY_ICK_POISON_NOVA = -1658020,
- SAY_ICK_CHASE_1 = -1658021,
+ SAY_ICK_POISON_NOVA = 0,
+ SAY_ICK_CHASE_1 = 1,
// OUTRO
- SAY_KRICK_OUTRO_1 = -1658030,
- SAY_JAYNA_OUTRO_2 = -1658031,
- SAY_SYLVANAS_OUTRO_2 = -1658032,
- SAY_KRICK_OUTRO_3 = -1658033,
- SAY_JAYNA_OUTRO_4 = -1658034,
- SAY_SYLVANAS_OUTRO_4 = -1658035,
- SAY_KRICK_OUTRO_5 = -1658036,
- SAY_TYRANNUS_OUTRO_7 = -1658037,
- SAY_KRICK_OUTRO_8 = -1658038,
- SAY_TYRANNUS_OUTRO_9 = -1658039,
- SAY_JAYNA_OUTRO_10 = -1658040,
- SAY_SYLVANAS_OUTRO_10 = -1658041,
+ SAY_JAYNA_OUTRO_2 = 0,
+ SAY_JAYNA_OUTRO_4 = 1,
+ SAY_JAYNA_OUTRO_10 = 2,
+ SAY_SYLVANAS_OUTRO_2 = 0,
+ SAY_SYLVANAS_OUTRO_4 = 1,
+ SAY_SYLVANAS_OUTRO_10 = 2,
+ SAY_TYRANNUS_OUTRO_7 = 1,
+ SAY_TYRANNUS_OUTRO_9 = 2,
};
enum Events
@@ -167,7 +164,7 @@ class boss_ick : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
if (Creature* krick = GetKrick())
- DoScriptText(SAY_KRICK_AGGRO, krick);
+ krick->AI()->Talk(SAY_KRICK_AGGRO);
events.ScheduleEvent(EVENT_MIGHTY_KICK, 20000);
events.ScheduleEvent(EVENT_TOXIC_WASTE, 5000);
@@ -250,8 +247,8 @@ class boss_ick : public CreatureScript
case EVENT_EXPLOSIVE_BARRAGE:
if (Creature* krick = GetKrick())
{
- DoScriptText(SAY_KRICK_BARRAGE_1, krick);
- DoScriptText(SAY_KRICK_BARRAGE_2, krick);
+ krick->AI()->Talk(SAY_KRICK_BARRAGE_1);
+ krick->AI()->Talk(SAY_KRICK_BARRAGE_2);
krick->CastSpell(krick, SPELL_EXPLOSIVE_BARRAGE_KRICK, true);
DoCast(me, SPELL_EXPLOSIVE_BARRAGE_ICK);
}
@@ -259,14 +256,14 @@ class boss_ick : public CreatureScript
break;
case EVENT_POISON_NOVA:
if (Creature* krick = GetKrick())
- DoScriptText(SAY_KRICK_POISON_NOVA, krick);
+ krick->AI()->Talk(SAY_KRICK_POISON_NOVA);
- DoScriptText(SAY_ICK_POISON_NOVA, me);
+ Talk(SAY_ICK_POISON_NOVA);
DoCast(me, SPELL_POISON_NOVA);
break;
case EVENT_PURSUIT:
if (Creature* krick = GetKrick())
- DoScriptText(RAND(SAY_KRICK_CHASE_1, SAY_KRICK_CHASE_2, SAY_KRICK_CHASE_3), krick);
+ krick->AI()->Talk(SAY_KRICK_CHASE);
DoCast(me, SPELL_PURSUIT);
break;
default:
@@ -328,7 +325,7 @@ class boss_krick : public CreatureScript
if (victim == me)
return;
- DoScriptText(RAND(SAY_KRICK_SLAY_1, SAY_KRICK_SLAY_2), me);
+ Talk(SAY_KRICK_SLAY);
}
void JustSummoned(Creature* summon)
@@ -362,7 +359,7 @@ class boss_krick : public CreatureScript
if (type != POINT_MOTION_TYPE || id != POINT_KRICK_INTRO)
return;
- DoScriptText(SAY_KRICK_OUTRO_1, me);
+ Talk(SAY_KRICK_OUTRO_1);
_phase = PHASE_OUTRO;
_events.Reset();
_events.ScheduleEvent(EVENT_OUTRO_1, 1000);
@@ -404,28 +401,28 @@ class boss_krick : public CreatureScript
jainaOrSylvanas->SetFacingToObject(me);
me->SetFacingToObject(jainaOrSylvanas);
if (_instanceScript->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
- DoScriptText(SAY_JAYNA_OUTRO_2, jainaOrSylvanas);
+ jainaOrSylvanas->AI()->Talk(SAY_JAYNA_OUTRO_2);
else
- DoScriptText(SAY_SYLVANAS_OUTRO_2, jainaOrSylvanas);
+ jainaOrSylvanas->AI()->Talk(SAY_SYLVANAS_OUTRO_2);
}
_events.ScheduleEvent(EVENT_OUTRO_3, 5000);
break;
case EVENT_OUTRO_3:
- DoScriptText(SAY_KRICK_OUTRO_3, me);
+ Talk(SAY_KRICK_OUTRO_3);
_events.ScheduleEvent(EVENT_OUTRO_4, 18000);
break;
case EVENT_OUTRO_4:
if (Creature* jainaOrSylvanas = ObjectAccessor::GetCreature(*me, _outroNpcGUID))
{
if (_instanceScript->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
- DoScriptText(SAY_JAYNA_OUTRO_4, jainaOrSylvanas);
+ jainaOrSylvanas->AI()->Talk(SAY_JAYNA_OUTRO_4);
else
- DoScriptText(SAY_SYLVANAS_OUTRO_4, jainaOrSylvanas);
+ jainaOrSylvanas->AI()->Talk(SAY_SYLVANAS_OUTRO_4);
}
_events.ScheduleEvent(EVENT_OUTRO_5, 5000);
break;
case EVENT_OUTRO_5:
- DoScriptText(SAY_KRICK_OUTRO_5, me);
+ Talk(SAY_KRICK_OUTRO_5);
_events.ScheduleEvent(EVENT_OUTRO_6, 1000);
break;
case EVENT_OUTRO_6:
@@ -439,7 +436,7 @@ class boss_krick : public CreatureScript
break;
case EVENT_OUTRO_7:
if (Creature* tyrannus = ObjectAccessor::GetCreature(*me, _tyrannusGUID))
- DoScriptText(SAY_TYRANNUS_OUTRO_7, tyrannus);
+ tyrannus->AI()->Talk(SAY_TYRANNUS_OUTRO_7);
_events.ScheduleEvent(EVENT_OUTRO_8, 5000);
break;
case EVENT_OUTRO_8:
@@ -450,7 +447,7 @@ class boss_krick : public CreatureScript
_events.ScheduleEvent(EVENT_OUTRO_9, 2000);
break;
case EVENT_OUTRO_9:
- DoScriptText(SAY_KRICK_OUTRO_8, me);
+ Talk(SAY_KRICK_OUTRO_8);
// TODO: Tyrannus starts killing Krick.
// there shall be some visual spell effect
if (Creature* tyrannus = ObjectAccessor::GetCreature(*me, _tyrannusGUID))
@@ -472,16 +469,16 @@ class boss_krick : public CreatureScript
break;
case EVENT_OUTRO_12:
if (Creature* tyrannus = ObjectAccessor::GetCreature(*me, _tyrannusGUID))
- DoScriptText(SAY_TYRANNUS_OUTRO_9, tyrannus);
+ tyrannus->AI()->Talk(SAY_TYRANNUS_OUTRO_9);
_events.ScheduleEvent(EVENT_OUTRO_13, 2000);
break;
case EVENT_OUTRO_13:
if (Creature* jainaOrSylvanas = ObjectAccessor::GetCreature(*me, _outroNpcGUID))
{
if (_instanceScript->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
- DoScriptText(SAY_JAYNA_OUTRO_10, jainaOrSylvanas);
+ jainaOrSylvanas->AI()->Talk(SAY_JAYNA_OUTRO_10);
else
- DoScriptText(SAY_SYLVANAS_OUTRO_10, jainaOrSylvanas);
+ jainaOrSylvanas->AI()->Talk(SAY_SYLVANAS_OUTRO_10);
}
// End of OUTRO. for now...
_events.ScheduleEvent(EVENT_OUTRO_END, 3000);
@@ -636,19 +633,18 @@ class spell_krick_pursuit : public SpellScriptLoader
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
- if (GetCaster()->GetTypeId() != TYPEID_UNIT)
- return;
-
- Unit* caster = GetCaster();
- CreatureAI* ickAI = caster->ToCreature()->AI();
- if (Unit* target = ickAI->SelectTarget(SELECT_TARGET_RANDOM, 0, 200.0f, true))
- {
- DoScriptText(SAY_ICK_CHASE_1, caster, target);
- caster->AddAura(GetSpellInfo()->Id, target);
- CAST_AI(boss_ick::boss_ickAI, ickAI)->SetTempThreat(caster->getThreatManager().getThreat(target));
- caster->AddThreat(target, float(GetEffectValue()));
- target->AddThreat(caster, float(GetEffectValue()));
- }
+ if (GetCaster())
+ if (Creature* ick = GetCaster()->ToCreature())
+ {
+ if (Unit* target = ick->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0, 200.0f, true))
+ {
+ ick->AI()->Talk(SAY_ICK_CHASE_1, target->GetGUID());
+ ick->AddAura(GetSpellInfo()->Id, target);
+ CAST_AI(boss_ick::boss_ickAI, ick->AI())->SetTempThreat(ick->getThreatManager().getThreat(target));
+ ick->AddThreat(target, float(GetEffectValue()));
+ target->AddThreat(ick, float(GetEffectValue()));
+ }
+ }
}
void Register()
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
index 44d9230a8d2..51eca327810 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
@@ -25,32 +25,36 @@
enum Yells
{
- SAY_AMBUSH_1 = -1658050,
- SAY_AMBUSH_2 = -1658051,
- SAY_GAUNTLET_START = -1658052,
- SAY_TYRANNUS_INTRO_1 = -1658053,
- SAY_GORKUN_INTRO_2 = -1658054,
- SAY_TYRANNUS_INTRO_3 = -1658055,
-
- SAY_AGGRO = -1658056,
- SAY_SLAY_1 = -1658057,
- SAY_SLAY_2 = -1658058,
- SAY_DEATH = -1658059,
- SAY_MARK_RIMEFANG_1 = -1658060,
- SAY_MARK_RIMEFANG_2 = -1658061,
- SAY_DARK_MIGHT_1 = -1658062,
- SAY_DARK_MIGHT_2 = -1658063,
-
- SAY_GORKUN_OUTRO_1 = -1658064,
- SAY_GORKUN_OUTRO_2 = -1658065,
- SAY_JAYNA_OUTRO_3 = -1658066,
- SAY_SYLVANAS_OUTRO_3 = -1658067,
- SAY_JAYNA_OUTRO_4 = -1658068,
- SAY_SYLVANAS_OUTRO_4 = -1658069,
- SAY_JAYNA_OUTRO_5 = -1658070,
+ //Gorkun
+ SAY_GORKUN_INTRO_2 = 0,
+ SAY_GORKUN_OUTRO_1 = 1,
+ SAY_GORKUN_OUTRO_2 = 2,
+
+ //Tyrannus
+ SAY_AMBUSH_1 = 3,
+ SAY_AMBUSH_2 = 4,
+ SAY_GAUNTLET_START = 5,
+ SAY_TYRANNUS_INTRO_1 = 6,
+ SAY_TYRANNUS_INTRO_3 = 7,
+ SAY_AGGRO = 8,
+ SAY_SLAY = 9,
+ SAY_DEATH = 10,
+ SAY_MARK_RIMEFANG_1 = 11,
+ SAY_MARK_RIMEFANG_2 = 12,
+ SAY_DARK_MIGHT_1 = 13,
+ SAY_DARK_MIGHT_2 = 14,
+
+ //Jaina
+ SAY_JAYNA_OUTRO_3 = 3,
+ SAY_JAYNA_OUTRO_4 = 4,
+ SAY_JAYNA_OUTRO_5 = 5,
+
+ //Sylvanas
+ SAY_SYLVANAS_OUTRO_3 = 3,
+ SAY_SYLVANAS_OUTRO_4 = 4
};
-enum Spells
+enum Spelsl
{
SPELL_OVERLORD_BRAND = 69172,
SPELL_OVERLORD_BRAND_HEAL = 69190,
@@ -156,7 +160,7 @@ class boss_tyrannus : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void AttackStart(Unit* victim)
@@ -180,12 +184,12 @@ class boss_tyrannus : public CreatureScript
void KilledUnit(Unit* victim)
{
if (victim->GetTypeId() == TYPEID_PLAYER)
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
instance->SetBossState(DATA_TYRANNUS, DONE);
// Prevent corpse despawning
@@ -201,7 +205,7 @@ class boss_tyrannus : public CreatureScript
{
if (actionId == ACTION_START_INTRO)
{
- DoScriptText(SAY_TYRANNUS_INTRO_1, me);
+ Talk(SAY_TYRANNUS_INTRO_1);
events.SetPhase(PHASE_INTRO);
events.ScheduleEvent(EVENT_INTRO_1, 14000, 0, PHASE_INTRO);
events.ScheduleEvent(EVENT_INTRO_2, 22000, 0, PHASE_INTRO);
@@ -223,10 +227,10 @@ class boss_tyrannus : public CreatureScript
switch (eventId)
{
case EVENT_INTRO_1:
- //DoScriptText(SAY_GORKUN_INTRO_2, pGorkunOrVictus);
+ //Talk(SAY_GORKUN_INTRO_2, pGorkunOrVictus);
break;
case EVENT_INTRO_2:
- DoScriptText(SAY_TYRANNUS_INTRO_3, me);
+ Talk(SAY_TYRANNUS_INTRO_3);
break;
case EVENT_INTRO_3:
me->ExitVehicle();
@@ -254,16 +258,16 @@ class boss_tyrannus : public CreatureScript
events.ScheduleEvent(EVENT_UNHOLY_POWER, 1000);
break;
case EVENT_UNHOLY_POWER:
- DoScriptText(SAY_DARK_MIGHT_1, me);
- DoScriptText(SAY_DARK_MIGHT_2, me);
+ Talk(SAY_DARK_MIGHT_1);
+ Talk(SAY_DARK_MIGHT_2);
DoCast(me, SPELL_UNHOLY_POWER);
events.ScheduleEvent(EVENT_FORCEFUL_SMASH, urand(40000, 48000));
break;
case EVENT_MARK_OF_RIMEFANG:
- DoScriptText(SAY_MARK_RIMEFANG_1, me);
+ Talk(SAY_MARK_RIMEFANG_1);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
{
- DoScriptText(SAY_MARK_RIMEFANG_2, me, target);
+ Talk(SAY_MARK_RIMEFANG_2, target->GetGUID());
DoCast(target, SPELL_MARK_OF_RIMEFANG);
}
events.ScheduleEvent(EVENT_MARK_OF_RIMEFANG, urand(24000, 26000));
diff --git a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp
index 595331d99d7..a7933fed046 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp
@@ -38,16 +38,12 @@ enum Spells
//Yells
enum Yells
{
- SAY_AGGRO = -1604000,
- SAY_SLAY_1 = -1604001,
- SAY_SLAY_2 = -1604002,
- SAY_SLAY_3 = -1604003,
- SAY_DEATH = -1604004,
- SAY_SUMMON_RHINO_1 = -1604005,
- SAY_SUMMON_RHINO_2 = -1604006,
- SAY_SUMMON_RHINO_3 = -1604007,
- SAY_TRANSFORM_1 = -1604008, //Phase change
- SAY_TRANSFORM_2 = -1604009
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SUMMON_RHINO = 3,
+ SAY_TRANSFORM_1 = 4,
+ SAY_TRANSFORM_2 = 5
};
enum Displays
@@ -125,7 +121,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_GAL_DARAH_EVENT, IN_PROGRESS);
@@ -146,7 +142,7 @@ public:
me->SetDisplayId(DISPLAY_RHINO);
Phase = RHINO;
uiPhaseCounter = 0;
- DoScriptText(SAY_TRANSFORM_1, me);
+ Talk(SAY_TRANSFORM_1);
uiTransformationTimer = 5*IN_MILLISECONDS;
bStartOfTransformation = true;
me->ClearUnitState(UNIT_STATE_STUNNED|UNIT_STATE_ROOT);
@@ -169,7 +165,7 @@ public:
if (uiStampedeTimer <= diff)
{
DoCast(me, SPELL_STAMPEDE);
- DoScriptText(RAND(SAY_SUMMON_RHINO_1, SAY_SUMMON_RHINO_2, SAY_SUMMON_RHINO_3), me);
+ Talk(SAY_SUMMON_RHINO);
uiStampedeTimer = 15*IN_MILLISECONDS;
} else uiStampedeTimer -= diff;
@@ -189,7 +185,7 @@ public:
me->SetDisplayId(DISPLAY_TROLL);
Phase = TROLL;
uiPhaseCounter = 0;
- DoScriptText(SAY_TRANSFORM_2, me);
+ Talk(SAY_TRANSFORM_2);
uiTransformationTimer = 9*IN_MILLISECONDS;
bStartOfTransformation = true;
me->ClearUnitState(UNIT_STATE_STUNNED|UNIT_STATE_ROOT);
@@ -268,7 +264,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_GAL_DARAH_EVENT, DONE);
@@ -279,7 +275,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp
index 45c55f7ec9b..d5e10aedd70 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp
@@ -34,14 +34,12 @@ enum eSpells
enum eSays
{
- SAY_AGGRO = -1604010,
- //SAY_SLAY_1 = -1604011, // not in db
- SAY_SLAY_2 = -1604012,
- SAY_SLAY_3 = -1604013,
- SAY_DEATH = -1604014,
- SAY_TRANSFORM = -1604015,
- SAY_QUAKE = -1604016,
- EMOTE_TRANSFORM = -1604017
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_TRANSFORM = 3,
+ SAY_QUAKE = 4,
+ EMOTE_TRANSFORM = 5
};
#define DATA_LESS_RABI 1
@@ -86,7 +84,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoCast(me, SPELL_MOJO_FRENZY, true);
if (instance)
@@ -107,7 +105,7 @@ public:
if (uiGroundTremorTimer <= uiDiff)
{
- DoScriptText(SAY_QUAKE, me);
+ Talk(SAY_QUAKE);
if (bPhase)
DoCast(me->getVictim(), SPELL_QUAKE, true);
else
@@ -135,8 +133,8 @@ public:
if (!bPhase && uiTransformationTImer <= uiDiff)
{
- DoScriptText(EMOTE_TRANSFORM, me);
- DoScriptText(SAY_TRANSFORM, me);
+ Talk(EMOTE_TRANSFORM);
+ Talk(SAY_TRANSFORM);
DoCast(me, SPELL_TRANSFORMATION, false);
uiTransformationTImer = 10*IN_MILLISECONDS;
} else uiTransformationTImer -= uiDiff;
@@ -154,7 +152,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_MOORABI_EVENT, DONE);
@@ -165,7 +163,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
index f35228d44d9..cdbce68e337 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
@@ -35,13 +35,12 @@ enum Spells
//Yell
enum Yells
{
- SAY_AGGRO = -1604017,
- SAY_SLAY_1 = -1604018,
- SAY_SLAY_2 = -1604019,
- SAY_SLAY_3 = -1604020,
- SAY_DEATH = -1604021,
- SAY_SUMMON_SNAKES = -1604022,
- SAY_SUMMON_CONSTRICTORS = -1604023
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SUMMON_SNAKES = 3,
+ SAY_SUMMON_CONSTRICTORS = 4,
+ EMOTE_NOVA = 5
};
//Creatures
@@ -117,7 +116,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_SLAD_RAN_EVENT, IN_PROGRESS);
@@ -132,6 +131,7 @@ public:
if (uiPoisonNovaTimer <= diff)
{
DoCast(me->getVictim(), SPELL_POISON_NOVA);
+ Talk(EMOTE_NOVA);
uiPoisonNovaTimer = 15*IN_MILLISECONDS;
} else uiPoisonNovaTimer -= diff;
@@ -163,13 +163,13 @@ public:
if (uiPhase == 0 && HealthBelowPct(30))
{
- DoScriptText(SAY_SUMMON_SNAKES, me);
+ Talk(SAY_SUMMON_SNAKES);
uiPhase = 1;
}
if (uiPhase == 1 && HealthBelowPct(25))
{
- DoScriptText(SAY_SUMMON_CONSTRICTORS, me);
+ Talk(SAY_SUMMON_CONSTRICTORS);
uiPhase = 2;
}
@@ -178,7 +178,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
lSummons.DespawnAll();
if (instance)
@@ -187,7 +187,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
void JustSummoned(Creature* summoned)
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
index 0d092ec86b2..2b240bc93d8 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
@@ -37,6 +37,7 @@ enum Texts
SAY_WIPE = 9,
SAY_BERSERK = 10,
SAY_DEATH = 11,
+ EMOTE_BERSERK_RAID = 12
};
enum Spells
@@ -336,7 +337,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
switch (eventId)
{
case EVENT_BERSERK:
- DoScriptText(EMOTE_GENERIC_BERSERK_RAID, me);
+ Talk(EMOTE_BERSERK_RAID);
Talk(SAY_BERSERK);
DoCast(me, SPELL_BERSERK);
break;
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
index 9ee4bcea4d9..9ee4bcea4d9 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp
index 9c0f2139b1b..9c0f2139b1b 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
index 8e7f891663e..8e7f891663e 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
index 263d70c6a50..263d70c6a50 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
index 4727504a4bd..4727504a4bd 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
index a12a38b2f62..96cabfed918 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
@@ -36,6 +36,7 @@ enum Texts
// A flaw of mortality...
SAY_BERSERK = 9, // Enough! I tire of these games!
SAY_DEATH = 10, // Free...at last...
+ EMOTE_BERSERK_RAID = 11
};
enum Spells
@@ -440,7 +441,7 @@ class boss_sindragosa : public CreatureScript
switch (eventId)
{
case EVENT_BERSERK:
- DoScriptText(EMOTE_GENERIC_BERSERK_RAID, me);
+ Talk(EMOTE_BERSERK_RAID);
Talk(SAY_BERSERK);
DoCast(me, SPELL_BERSERK);
break;
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
index 4e117d9f3e3..4e117d9f3e3 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
index 7ff995d4bcf..7ff995d4bcf 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
index 89d7b0f764d..89d7b0f764d 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp
index 8901a61e79d..61ce8817b17 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp
@@ -19,11 +19,14 @@
#include "ScriptedCreature.h"
#include "naxxramas.h"
-#define SAY_GREET RAND(-1533000, -1533004, -1533005, -1533006, -1533007)
-#define SAY_AGGRO RAND(-1533001, -1533002, -1533003)
-#define SAY_SLAY -1533008
+enum Anubrekhan
+{
+ SAY_AGGRO = 0,
+ SAY_GREET = 1,
+ SAY_SLAY = 2,
-#define MOB_CRYPT_GUARD 16573
+ MOB_CRYPT_GUARD = 16573
+};
const Position GuardSummonPos = {3333.72f, -3476.30f, 287.1f, 6.2801f};
@@ -97,7 +100,7 @@ public:
if (victim->GetTypeId() == TYPEID_PLAYER)
victim->CastSpell(victim, SPELL_SUMMON_CORPSE_SCARABS_PLR, true, NULL, NULL, me->GetGUID());
- DoScriptText(SAY_SLAY, me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
@@ -111,7 +114,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_IMPALE, urand(10000, 20000));
events.ScheduleEvent(EVENT_LOCUST, 90000);
events.ScheduleEvent(EVENT_BERSERK, 600000);
@@ -124,7 +127,7 @@ public:
{
if (!hasTaunted && me->IsWithinDistInMap(who, 60.0f) && who->GetTypeId() == TYPEID_PLAYER)
{
- DoScriptText(SAY_GREET, me);
+ Talk(SAY_GREET);
hasTaunted = true;
}
ScriptedAI::MoveInLineOfSight(who);
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp
index a75f87e91af..58db1d9caea 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp
@@ -22,14 +22,10 @@
enum Yells
{
- SAY_GREET = -1533009,
- SAY_AGGRO_1 = -1533010,
- SAY_AGGRO_2 = -1533011,
- SAY_AGGRO_3 = -1533012,
- SAY_AGGRO_4 = -1533013,
- SAY_SLAY_1 = -1533014,
- SAY_SLAY_2 = -1533015,
- SAY_DEATH = -1533016
+ SAY_GREET = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_DEATH = 3
};
enum Spells
@@ -71,7 +67,7 @@ class boss_faerlina : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3, SAY_AGGRO_4), me);
+ Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_POISON, urand(10000, 15000));
events.ScheduleEvent(EVENT_FIRE, urand(6000, 18000));
events.ScheduleEvent(EVENT_FRENZY, urand(60000, 80000));
@@ -88,7 +84,7 @@ class boss_faerlina : public CreatureScript
{
if (!_introDone && who->GetTypeId() == TYPEID_PLAYER)
{
- DoScriptText(SAY_GREET, me);
+ Talk(SAY_GREET);
_introDone = true;
}
@@ -98,13 +94,13 @@ class boss_faerlina : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
if (!urand(0, 2))
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void SpellHit(Unit* caster, SpellInfo const* spell)
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp
index 29a0a11af9b..7785044e7d1 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp
@@ -73,17 +73,14 @@ const uint32 SPELL_SECONDARY_H[]= {0, 57464, 0, 57465};
const uint32 SPELL_PUNISH[] = {0, 57381, 0, 57377};
#define SPELL_BERSERK 26662
-// used by 16063, 16064, 16065, 30549, but signed for 16063
-const int32 SAY_AGGRO[] = {-1533051, -1533044, -1533065, -1533058};
-const int32 SAY_TAUNT[3][4] ={ {-1533052, -1533045, -1533071, -1533059},
- {-1533053, -1533046, -1533072, -1533060},
- {-1533054, -1533047, -1533073, -1533061}, };
-const int32 SAY_SPECIAL[] = {-1533055, -1533048, -1533070, -1533062};
-const int32 SAY_SLAY[] = {-1533056, -1533049, -1533068, -1533063};
-const int32 SAY_DEATH[] = {-1533057, -1533050, -1533074, -1533064};
-
-#define SAY_BARON_AGGRO RAND(-1533065, -1533066, -1533067)
-#define SAY_BARON_SLAY RAND(-1533068, -1533069)
+enum FourHorsemen
+{
+ SAY_AGGRO = 0,
+ SAY_TAUNT = 1,
+ SAY_SPECIAL = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4
+};
class boss_four_horsemen : public CreatureScript
{
@@ -295,12 +292,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
if (!(rand()%5))
- {
- if (id == HORSEMEN_BARON)
- DoScriptText(SAY_BARON_SLAY, me);
- else
- DoScriptText(SAY_SLAY[id], me);
- }
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
@@ -321,17 +313,13 @@ public:
instance->DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 59450);
}
- DoScriptText(SAY_DEATH[id], me);
+ Talk(SAY_DEATH);
}
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
-
- if (id == HORSEMEN_BARON)
- DoScriptText(SAY_BARON_AGGRO, me);
- else
- DoScriptText(SAY_AGGRO[id], me);
+ Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_MARK, 15000);
events.ScheduleEvent(EVENT_CAST, 20000+rand()%5000);
@@ -360,13 +348,13 @@ public:
{
case EVENT_MARK:
if (!(rand()%5))
- DoScriptText(SAY_SPECIAL[id], me);
+ Talk(SAY_SPECIAL);
DoCastAOE(SPELL_MARK[id]);
events.ScheduleEvent(EVENT_MARK, 15000);
break;
case EVENT_CAST:
if (!(rand()%5))
- DoScriptText(SAY_TAUNT[rand()%3][id], me);
+ Talk(SAY_TAUNT);
if (caster)
{
@@ -379,7 +367,7 @@ public:
events.ScheduleEvent(EVENT_CAST, 15000);
break;
case EVENT_BERSERK:
- DoScriptText(SAY_SPECIAL[id], me);
+ Talk(SAY_SPECIAL);
DoCast(me, EVENT_BERSERK);
break;
}
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
index d335d36e112..14043f00939 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
@@ -24,10 +24,10 @@
enum Yells
{
- SAY_SPEECH = -1533040,
- SAY_KILL = -1533041,
- SAY_DEATH = -1533042,
- SAY_TELEPORT = -1533043
+ SAY_SPEECH = 0,
+ SAY_KILL = 1,
+ SAY_DEATH = 2,
+ SAY_TELEPORT = 3
};
//Gothik
@@ -209,7 +209,7 @@ class boss_gothik : public CreatureScript
waveCount = 0;
events.ScheduleEvent(EVENT_SUMMON, 30000);
DoTeleportTo(PosPlatform);
- DoScriptText(SAY_SPEECH, me);
+ Talk(SAY_SPEECH);
if (instance)
instance->SetData(DATA_GOTHIK_GATE, GO_STATE_READY);
}
@@ -239,7 +239,7 @@ class boss_gothik : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
if (!(rand()%5))
- DoScriptText(SAY_KILL, me);
+ Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
@@ -247,7 +247,7 @@ class boss_gothik : public CreatureScript
LiveTriggerGUID.clear();
DeadTriggerGUID.clear();
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE);
}
@@ -452,7 +452,7 @@ class boss_gothik : public CreatureScript
else
{
phaseTwo = true;
- DoScriptText(SAY_TELEPORT, me);
+ Talk(SAY_TELEPORT);
DoTeleportTo(PosGroundLiveSide);
me->SetReactState(REACT_AGGRESSIVE);
DummyEntryCheckPredicate pred;
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
index e7126ba7e33..8be4ac6b8b6 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
@@ -21,14 +21,17 @@
#include "naxxramas.h"
#include "Player.h"
-#define SAY_AGGRO RAND(-1533109, -1533110, -1533111)
-#define SAY_SLAY -1533112
-#define SAY_TAUNT RAND(-1533113, -1533114, -1533115, -1533116, -1533117)
-#define SAY_DEATH -1533118
-
-#define SPELL_SPELL_DISRUPTION 29310
-#define SPELL_DECREPIT_FEVER RAID_MODE(29998, 55011)
-#define SPELL_PLAGUE_CLOUD 29350
+enum Heigan
+{
+ SPELL_DECREPIT_FEVER = 29998, // 25-man: 55011
+ SPELL_SPELL_DISRUPTION = 29310,
+ SPELL_PLAGUE_CLOUD = 29350,
+
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_TAUNT = 2,
+ SAY_DEATH = 3
+};
enum Events
{
@@ -70,7 +73,7 @@ public:
void KilledUnit(Unit* who)
{
if (!(rand()%5))
- DoScriptText(SAY_SLAY, me);
+ Talk(SAY_SLAY);
if (who->GetTypeId() == TYPEID_PLAYER)
safetyDance = false;
}
@@ -92,13 +95,13 @@ public:
void JustDied(Unit* /*killer*/)
{
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
EnterPhase(PHASE_FIGHT);
safetyDance = true;
}
@@ -114,12 +117,16 @@ public:
events.ScheduleEvent(EVENT_FEVER, urand(15000, 20000));
events.ScheduleEvent(EVENT_PHASE, 90000);
events.ScheduleEvent(EVENT_ERUPT, 15000);
+ me->GetMotionMaster()->MoveChase(me->getVictim());
}
else
{
float x, y, z, o;
me->GetHomePosition(x, y, z, o);
- me->NearTeleportTo(x, y, z, o);
+ me->NearTeleportTo(x, y, z, o - G3D::halfPi());
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MoveIdle();
+ me->SetTarget(0);
DoCastAOE(SPELL_PLAGUE_CLOUD);
events.ScheduleEvent(EVENT_PHASE, 45000);
events.ScheduleEvent(EVENT_ERUPT, 8000);
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
index 9167db45d20..183fb40e5a0 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
@@ -33,32 +33,23 @@ EndScriptData */
enum Yells
{
//when shappiron dies. dialog between kel and lich king (in this order)
- SAY_SAPP_DIALOG1 = -1533084, //not used
- SAY_SAPP_DIALOG2_LICH = -1533085, //not used
- SAY_SAPP_DIALOG3 = -1533086, //not used
- SAY_SAPP_DIALOG4_LICH = -1533087, //not used
- SAY_SAPP_DIALOG5 = -1533088, //not used
- SAY_CAT_DIED = -1533089, //when cat dies, not used
+ SAY_SAPP_DIALOG1 = 0, //not used
+ SAY_SAPP_DIALOG2_LICH = 1, //not used
+ SAY_SAPP_DIALOG3 = 2, //not used
+ SAY_SAPP_DIALOG4_LICH = 3, //not used
+ SAY_SAPP_DIALOG5 = 4, //not used
+ SAY_CAT_DIED = 5, //when cat dies, not used
//when each of the 4 wing bosses dies
- SAY_TAUNT1 = -1533090, //not used
- SAY_TAUNT2 = -1533091, //not used
- SAY_TAUNT3 = -1533092, //not used
- SAY_TAUNT4 = -1533093, //not used
- SAY_SUMMON_MINIONS = -1533105, //start of phase 1
- SAY_AGGRO_1 = -1533094, //start of phase 2
- SAY_AGGRO_2 = -1533095,
- SAY_AGGRO_3 = -1533096,
- SAY_SLAY_1 = -1533097,
- SAY_SLAY_2 = -1533098,
- SAY_DEATH = -1533099,
- SAY_CHAIN_1 = -1533100,
- SAY_CHAIN_2 = -1533101,
- SAY_FROST_BLAST = -1533102,
- SAY_SPECIAL_1 = -1533106,
- SAY_SPECIAL_2 = -1533107,
- SAY_SPECIAL_3 = -1533108,
- SAY_REQUEST_AID = -1533103, //start of phase 3
- SAY_ANSWER_REQUEST = -1533104 //lich king answer
+ SAY_TAUNT = 6,
+ SAY_AGGRO = 7,
+ SAY_SLAY = 8,
+ SAY_DEATH = 9,
+ SAY_CHAIN = 10,
+ SAY_FROST_BLAST = 11,
+ SAY_REQUEST_AID = 12, //start of phase 3
+ SAY_ANSWER_REQUEST = 13, //lich king answer
+ SAY_SUMMON_MINIONS = 14, //start of phase 1
+ SAY_SPECIAL = 15
};
enum Events
@@ -341,13 +332,13 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
std::map<uint64, float>::const_iterator itr;
for (itr = chained.begin(); itr != chained.end(); ++itr)
@@ -370,7 +361,7 @@ public:
pPortal->ResetDoorOrButton();
}
DoCast(me, SPELL_KELTHUZAD_CHANNEL, false);
- DoScriptText(SAY_SUMMON_MINIONS, me);
+ Talk(SAY_SUMMON_MINIONS);
Phase = 1;
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NOT_SELECTABLE);
me->SetFloatValue(UNIT_FIELD_COMBATREACH, 4);
@@ -435,7 +426,7 @@ public:
break;
case EVENT_PHASE:
events.Reset();
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
spawns.DespawnAll();
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NOT_SELECTABLE);
me->CastStop();
@@ -464,10 +455,10 @@ public:
if (HealthBelowPct(45))
{
Phase = 3;
- DoScriptText(SAY_REQUEST_AID, me);
+ Talk(SAY_REQUEST_AID);
//here Lich King should respond to KelThuzad but I don't know which Creature to make talk
//so for now just make Kelthuzad says it.
- DoScriptText(SAY_ANSWER_REQUEST, me);
+ Talk(SAY_ANSWER_REQUEST);
for (uint8 i = 0; i <= 3; ++i)
{
@@ -523,7 +514,7 @@ public:
}
}
if (!chained.empty())
- DoScriptText(RAND(SAY_CHAIN_1, SAY_CHAIN_2), me);
+ Talk(SAY_CHAIN);
events.RepeatEvent(urand(100000, 180000));
break;
}
@@ -627,7 +618,7 @@ public:
std::vector<Unit*>::const_iterator itr = unitList.begin();
advance(itr, rand()%unitList.size());
DoCast(*itr, SPELL_MANA_DETONATION);
- DoScriptText(RAND(SAY_SPECIAL_1, SAY_SPECIAL_2, SAY_SPECIAL_3), me);
+ Talk(SAY_SPECIAL);
}
events.RepeatEvent(urand(20000, 50000));
@@ -642,7 +633,7 @@ public:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, RAID_MODE(1, 0), 0, true))
DoCast(target, SPELL_FROST_BLAST);
if (rand()%2)
- DoScriptText(SAY_FROST_BLAST, me);
+ Talk(SAY_FROST_BLAST);
events.RepeatEvent(urand(30000, 90000));
break;
default:
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp
index d106b99ace0..b670e36fa96 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp
@@ -19,21 +19,25 @@
#include "ScriptedCreature.h"
#include "naxxramas.h"
-#define SAY_AGGRO RAND(-1533075, -1533076, -1533077)
-#define SAY_SUMMON -1533078
-#define SAY_SLAY RAND(-1533079, -1533080)
-#define SAY_DEATH -1533081
+enum Noth
+{
+ SAY_AGGRO = 0,
+ SAY_SUMMON = 1,
+ SAY_SLAY = 2,
+ SAY_DEATH = 3,
-#define SOUND_DEATH 8848
+ SOUND_DEATH = 8848,
-#define SPELL_CURSE_PLAGUEBRINGER RAID_MODE(29213, 54835)
-#define SPELL_BLINK RAND(29208, 29209, 29210, 29211)
-#define SPELL_CRIPPLE RAID_MODE(29212, 54814)
-#define SPELL_TELEPORT 29216
+ SPELL_CURSE_PLAGUEBRINGER = 29213, // 25-man: 54835
+ SPELL_CRIPPLE = 29212, // 25-man: 54814
+ SPELL_TELEPORT = 29216,
-#define MOB_WARRIOR 16984
-#define MOB_CHAMPION 16983
-#define MOB_GUARDIAN 16981
+ MOB_WARRIOR = 16984,
+ MOB_CHAMPION = 16983,
+ MOB_GUARDIAN = 16981
+};
+
+#define SPELL_BLINK RAND(29208, 29209, 29210, 29211)
// Teleport position of Noth on his balcony
#define TELE_X 2631.370f
@@ -90,7 +94,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
balconyCount = 0;
EnterPhaseGround();
}
@@ -115,7 +119,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
if (!(rand()%5))
- DoScriptText(SAY_SLAY, me);
+ Talk(SAY_SLAY);
}
void JustSummoned(Creature* summon)
@@ -128,7 +132,7 @@ public:
void JustDied(Unit* /*killer*/)
{
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void SummonUndead(uint32 entry, uint32 num)
@@ -157,7 +161,7 @@ public:
events.ScheduleEvent(EVENT_CURSE, urand(50000, 60000));
return;
case EVENT_WARRIOR:
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
SummonUndead(MOB_WARRIOR, RAID_MODE(2, 3));
events.ScheduleEvent(EVENT_WARRIOR, 30000);
return;
@@ -178,7 +182,7 @@ public:
waveCount = 0;
return;
case EVENT_WAVE:
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
switch (balconyCount)
{
case 0: SummonUndead(MOB_CHAMPION, RAID_MODE(2, 4)); break;
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp
index b1b57836a89..d4b3f5ddce0 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp
@@ -30,12 +30,11 @@ enum Spells
enum Yells
{
- SAY_AGGRO_1 = -1533017,
- SAY_AGGRO_2 = -1533018,
- SAY_SLAY = -1533019,
- SAY_DEATH = -1533020,
- EMOTE_BERSERK = -1533021,
- EMOTE_ENRAGE = -1533022,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ EMOTE_BERSERK = 3,
+ EMOTE_ENRAGE = 4
};
enum Events
@@ -78,20 +77,20 @@ public:
void KilledUnit(Unit* /*Victim*/)
{
if (!(rand()%5))
- DoScriptText(SAY_SLAY, me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
Enraged = false;
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2), me);
+ Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_HATEFUL, 1000);
events.ScheduleEvent(EVENT_BERSERK, 360000);
@@ -137,7 +136,7 @@ public:
}
case EVENT_BERSERK:
DoCast(me, SPELL_BERSERK, true);
- DoScriptText(EMOTE_BERSERK, me);
+ Talk(EMOTE_BERSERK);
events.ScheduleEvent(EVENT_SLIME, 2000);
break;
case EVENT_SLIME:
@@ -150,7 +149,7 @@ public:
if (!Enraged && HealthBelowPct(5))
{
DoCast(me, SPELL_FRENZY, true);
- DoScriptText(EMOTE_ENRAGE, me);
+ Talk(EMOTE_ENRAGE);
Enraged = true;
}
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp
index 5a8f004788d..aebd7fdc19c 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp
@@ -17,45 +17,45 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
-#include "naxxramas.h"
#include "Player.h"
#include "SpellInfo.h"
+#include "naxxramas.h"
-#define EMOTE_BREATH -1533082
-#define EMOTE_ENRAGE -1533083
-
-#define SPELL_FROST_AURA RAID_MODE(28531, 55799)
-#define SPELL_CLEAVE 19983
-#define SPELL_TAIL_SWEEP RAID_MODE(55697, 55696)
-#define SPELL_SUMMON_BLIZZARD 28560
-#define SPELL_LIFE_DRAIN RAID_MODE(28542, 55665)
-#define SPELL_ICEBOLT 28522
-#define SPELL_FROST_BREATH 29318
-#define SPELL_FROST_EXPLOSION 28524
-#define SPELL_FROST_MISSILE 30101
-#define SPELL_BERSERK 26662
-#define SPELL_DIES 29357
-
-#define SPELL_CHILL RAID_MODE(28547, 55699)
-
-#define MOB_BLIZZARD 16474
-#define GO_ICEBLOCK 181247
+enum Yells
+{
+ EMOTE_AIR_PHASE = 0,
+ EMOTE_GROUND_PHASE = 1,
+ EMOTE_BREATH = 2,
+ EMOTE_ENRAGE = 3
+};
-#define ACHIEVEMENT_THE_HUNDRED_CLUB RAID_MODE(2146, 2147)
-#define MAX_FROST_RESISTANCE 100
+enum Spells
+{
+ SPELL_FROST_AURA = 28531,
+ SPELL_CLEAVE = 19983,
+ SPELL_TAIL_SWEEP = 55697,
+ SPELL_SUMMON_BLIZZARD = 28560,
+ SPELL_LIFE_DRAIN = 28542,
+ SPELL_ICEBOLT = 28522,
+ SPELL_FROST_BREATH = 29318,
+ SPELL_FROST_EXPLOSION = 28524,
+ SPELL_FROST_MISSILE = 30101,
+ SPELL_BERSERK = 26662,
+ SPELL_DIES = 29357,
+ SPELL_CHILL = 28547,
+};
enum Phases
{
- PHASE_NULL = 0,
+ PHASE_NULL = 0,
PHASE_BIRTH,
PHASE_GROUND,
- PHASE_FLIGHT,
+ PHASE_FLIGHT
};
enum Events
{
- EVENT_NONE,
- EVENT_BERSERK,
+ EVENT_BERSERK = 1,
EVENT_CLEAVE,
EVENT_TAIL,
EVENT_DRAIN,
@@ -67,342 +67,362 @@ enum Events
EVENT_EXPLOSION,
EVENT_LAND,
EVENT_GROUND,
- EVENT_BIRTH,
+ EVENT_BIRTH
+};
+
+enum Misc
+{
+ NPC_BLIZZARD = 16474,
+ GO_ICEBLOCK = 181247,
+
+ // The Hundred Club
+ DATA_THE_HUNDRED_CLUB = 21462147,
+ MAX_FROST_RESISTANCE = 100
};
typedef std::map<uint64, uint64> IceBlockMap;
class boss_sapphiron : public CreatureScript
{
-public:
- boss_sapphiron() : CreatureScript("boss_sapphiron") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new boss_sapphironAI (creature);
- }
-
- struct boss_sapphironAI : public BossAI
- {
- boss_sapphironAI(Creature* creature) : BossAI(creature, BOSS_SAPPHIRON)
- , phase(PHASE_NULL)
+ public:
+ boss_sapphiron() : CreatureScript("boss_sapphiron") { }
+
+ struct boss_sapphironAI : public BossAI
{
- map = me->GetMap();
- }
+ boss_sapphironAI(Creature* creature) : BossAI(creature, BOSS_SAPPHIRON)
+ , _phase(PHASE_NULL)
+ {
+ _map = me->GetMap();
+ }
- Phases phase;
- uint32 iceboltCount;
- IceBlockMap iceblocks;
+ void InitializeAI()
+ {
+ float x, y, z;
+ me->GetPosition(x, y, z);
+ me->SummonGameObject(GO_BIRTH, x, y, z, 0, 0, 0, 0, 0, 0);
+ me->SetVisible(false);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetReactState(REACT_PASSIVE);
+
+ BossAI::InitializeAI();
+ }
- bool CanTheHundredClub; // needed for achievement: The Hundred Club(2146, 2147)
- uint32 CheckFrostResistTimer;
- Map* map;
+ void Reset()
+ {
+ _Reset();
- void InitializeAI()
- {
- float x, y, z;
- me->GetPosition(x, y, z);
- me->SummonGameObject(GO_BIRTH, x, y, z, 0, 0, 0, 0, 0, 0);
- me->SetVisible(false);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->SetReactState(REACT_PASSIVE);
-
- ScriptedAI::InitializeAI();
- }
+ if (_phase == PHASE_FLIGHT)
+ ClearIceBlock();
- void Reset()
- {
- _Reset();
+ _phase = PHASE_NULL;
- if (phase == PHASE_FLIGHT)
- ClearIceBlock();
+ _canTheHundredClub = true;
+ _checkFrostResistTimer = 5 * IN_MILLISECONDS;
+ }
- phase = PHASE_NULL;
+ void EnterCombat(Unit* /*who*/)
+ {
+ _EnterCombat();
- CanTheHundredClub = true;
- CheckFrostResistTimer = 5000;
- }
+ me->CastSpell(me, SPELL_FROST_AURA, true);
- void EnterCombat(Unit* /*who*/)
- {
- _EnterCombat();
+ events.ScheduleEvent(EVENT_BERSERK, 15 * MINUTE * IN_MILLISECONDS);
+ EnterPhaseGround();
- me->CastSpell(me, SPELL_FROST_AURA, true);
+ CheckPlayersFrostResist();
+ }
- events.ScheduleEvent(EVENT_BERSERK, 15*60000);
- EnterPhaseGround();
+ void SpellHitTarget(Unit* target, SpellInfo const* spell)
+ {
+ if (spell->Id == SPELL_ICEBOLT)
+ {
+ IceBlockMap::iterator itr = _iceblocks.find(target->GetGUID());
+ if (itr != _iceblocks.end() && !itr->second)
+ {
+ if (GameObject* iceblock = me->SummonGameObject(GO_ICEBLOCK, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, 0, 0, 0, 0, 25000))
+ itr->second = iceblock->GetGUID();
+ }
+ }
+ }
- CheckPlayersFrostResist();
- }
+ void JustDied(Unit* /*killer*/)
+ {
+ _JustDied();
+ me->CastSpell(me, SPELL_DIES, true);
- void SpellHitTarget(Unit* target, const SpellInfo* spell)
- {
- if (spell->Id == SPELL_ICEBOLT)
+ CheckPlayersFrostResist();
+ }
+
+ void MovementInform(uint32 /*type*/, uint32 id)
+ {
+ if (id == 1)
+ events.ScheduleEvent(EVENT_LIFTOFF, 0);
+ }
+
+ void DoAction(int32 const param)
{
- IceBlockMap::iterator itr = iceblocks.find(target->GetGUID());
- if (itr != iceblocks.end() && !itr->second)
+ if (param == DATA_SAPPHIRON_BIRTH)
{
- if (GameObject* iceblock = me->SummonGameObject(GO_ICEBLOCK, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, 0, 0, 0, 0, 25000))
- itr->second = iceblock->GetGUID();
+ _phase = PHASE_BIRTH;
+ events.ScheduleEvent(EVENT_BIRTH, 23 * IN_MILLISECONDS);
}
}
- }
-
- void JustDied(Unit* /*killer*/)
- {
- _JustDied();
- me->CastSpell(me, SPELL_DIES, true);
- CheckPlayersFrostResist();
- if (CanTheHundredClub)
+ void CheckPlayersFrostResist()
{
- AchievementEntry const* AchievTheHundredClub = sAchievementStore.LookupEntry(ACHIEVEMENT_THE_HUNDRED_CLUB);
- if (AchievTheHundredClub)
+ if (_canTheHundredClub && _map && _map->IsRaid())
{
- if (map && map->IsDungeon())
+ Map::PlayerList const &players = _map->GetPlayers();
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
- Map::PlayerList const &players = map->GetPlayers();
- for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- itr->getSource()->CompletedAchievement(AchievTheHundredClub);
+ if (itr->getSource()->GetResistance(SPELL_SCHOOL_FROST) > MAX_FROST_RESISTANCE)
+ {
+ _canTheHundredClub = false;
+ break;
+ }
}
}
}
- }
-
- void MovementInform(uint32, uint32 id)
- {
- if (id == 1)
- events.ScheduleEvent(EVENT_LIFTOFF, 0);
- }
- void DoAction(const int32 param)
- {
- if (param == DATA_SAPPHIRON_BIRTH)
+ void EnterPhaseGround()
{
- phase = PHASE_BIRTH;
- events.ScheduleEvent(EVENT_BIRTH, 23000);
+ _phase = PHASE_GROUND;
+ me->SetReactState(REACT_AGGRESSIVE);
+ events.SetPhase(PHASE_GROUND);
+ events.ScheduleEvent(EVENT_CLEAVE, urand(5, 15) * IN_MILLISECONDS, 0, PHASE_GROUND);
+ events.ScheduleEvent(EVENT_TAIL, urand(5, 15) * IN_MILLISECONDS, 0, PHASE_GROUND);
+ events.ScheduleEvent(EVENT_DRAIN, 24 * IN_MILLISECONDS, 0, PHASE_GROUND);
+ events.ScheduleEvent(EVENT_BLIZZARD, urand(5, 10) * IN_MILLISECONDS, 0, PHASE_GROUND);
+ events.ScheduleEvent(EVENT_FLIGHT, 45 * IN_MILLISECONDS);
}
- }
- void CheckPlayersFrostResist()
- {
- if (CanTheHundredClub && map && map->IsDungeon())
+ void ClearIceBlock()
{
- Map::PlayerList const &players = map->GetPlayers();
- for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (IceBlockMap::const_iterator itr = _iceblocks.begin(); itr != _iceblocks.end(); ++itr)
{
- if (itr->getSource()->GetResistance(SPELL_SCHOOL_FROST) > MAX_FROST_RESISTANCE)
- {
- CanTheHundredClub = false;
- break;
- }
+ if (Player* player = ObjectAccessor::GetPlayer(*me, itr->first))
+ player->RemoveAura(SPELL_ICEBOLT);
+
+ if (GameObject* go = ObjectAccessor::GetGameObject(*me, itr->second))
+ go->Delete();
}
+ _iceblocks.clear();
}
- }
- void EnterPhaseGround()
- {
- phase = PHASE_GROUND;
- me->SetReactState(REACT_AGGRESSIVE);
- events.SetPhase(PHASE_GROUND);
- events.ScheduleEvent(EVENT_CLEAVE, 5000+rand()%10000, 0, PHASE_GROUND);
- events.ScheduleEvent(EVENT_TAIL, 5000+rand()%10000, 0, PHASE_GROUND);
- events.ScheduleEvent(EVENT_DRAIN, 24000, 0, PHASE_GROUND);
- events.ScheduleEvent(EVENT_BLIZZARD, 5000+rand()%5000, 0, PHASE_GROUND);
- events.ScheduleEvent(EVENT_FLIGHT, 45000);
- }
-
- void ClearIceBlock()
- {
- for (IceBlockMap::const_iterator itr = iceblocks.begin(); itr != iceblocks.end(); ++itr)
+ uint32 GetData(uint32 data) const
{
- if (Player* player = Unit::GetPlayer(*me, itr->first))
- player->RemoveAura(SPELL_ICEBOLT);
- if (GameObject* go = GameObject::GetGameObject(*me, itr->second))
- go->Delete();
+ if (data == DATA_THE_HUNDRED_CLUB)
+ return _canTheHundredClub;
+
+ return 0;
}
- iceblocks.clear();
- }
- void UpdateAI(const uint32 diff)
- {
- if (!phase)
- return;
+ void UpdateAI(uint32 const diff)
+ {
+ if (!_phase)
+ return;
- events.Update(diff);
+ events.Update(diff);
- if ((phase != PHASE_BIRTH && !UpdateVictim()) || !CheckInRoom())
- return;
+ if ((_phase != PHASE_BIRTH && !UpdateVictim()) || !CheckInRoom())
+ return;
- if (CanTheHundredClub)
- {
- if (CheckFrostResistTimer <= diff)
+ if (_canTheHundredClub)
{
- CheckPlayersFrostResist();
- CheckFrostResistTimer = (rand() % 5 + 5) * 1000;
- } else CheckFrostResistTimer -= diff;
- }
+ if (_checkFrostResistTimer <= diff)
+ {
+ CheckPlayersFrostResist();
+ _checkFrostResistTimer = 5 * IN_MILLISECONDS;
+ }
+ else
+ _checkFrostResistTimer -= diff;
+ }
- if (phase == PHASE_GROUND)
- {
- while (uint32 eventId = events.ExecuteEvent())
+ if (_phase == PHASE_GROUND)
{
- switch (eventId)
+ while (uint32 eventId = events.ExecuteEvent())
{
- case EVENT_BERSERK:
- DoScriptText(EMOTE_ENRAGE, me);
- DoCast(me, SPELL_BERSERK);
- return;
- case EVENT_CLEAVE:
- DoCast(me->getVictim(), SPELL_CLEAVE);
- events.ScheduleEvent(EVENT_CLEAVE, 5000+rand()%10000, 0, PHASE_GROUND);
- return;
- case EVENT_TAIL:
- DoCastAOE(SPELL_TAIL_SWEEP);
- events.ScheduleEvent(EVENT_TAIL, 5000+rand()%10000, 0, PHASE_GROUND);
- return;
- case EVENT_DRAIN:
- DoCastAOE(SPELL_LIFE_DRAIN);
- events.ScheduleEvent(EVENT_DRAIN, 24000, 0, PHASE_GROUND);
- return;
- case EVENT_BLIZZARD:
+ switch (eventId)
{
- //DoCastAOE(SPELL_SUMMON_BLIZZARD);
- if (Creature* summon = DoSummon(MOB_BLIZZARD, me, 0.0f, urand(25000, 30000), TEMPSUMMON_TIMED_DESPAWN))
- summon->GetMotionMaster()->MoveRandom(40);
- events.ScheduleEvent(EVENT_BLIZZARD, RAID_MODE(20000, 7000), 0, PHASE_GROUND);
- break;
- }
- case EVENT_FLIGHT:
- if (HealthAbovePct(10))
- {
- phase = PHASE_FLIGHT;
- events.SetPhase(PHASE_FLIGHT);
- me->SetReactState(REACT_PASSIVE);
- me->AttackStop();
- float x, y, z, o;
- me->GetHomePosition(x, y, z, o);
- me->GetMotionMaster()->MovePoint(1, x, y, z);
+ case EVENT_BERSERK:
+ Talk(EMOTE_ENRAGE);
+ DoCast(me, SPELL_BERSERK);
+ return;
+ case EVENT_CLEAVE:
+ DoCastVictim(SPELL_CLEAVE);
+ events.ScheduleEvent(EVENT_CLEAVE, urand(5, 15) * IN_MILLISECONDS, 0, PHASE_GROUND);
+ return;
+ case EVENT_TAIL:
+ DoCastAOE(SPELL_TAIL_SWEEP);
+ events.ScheduleEvent(EVENT_TAIL, urand(5, 15) * IN_MILLISECONDS, 0, PHASE_GROUND);
+ return;
+ case EVENT_DRAIN:
+ DoCastAOE(SPELL_LIFE_DRAIN);
+ events.ScheduleEvent(EVENT_DRAIN, 24 * IN_MILLISECONDS, 0, PHASE_GROUND);
return;
+ case EVENT_BLIZZARD:
+ {
+ //DoCastAOE(SPELL_SUMMON_BLIZZARD);
+ if (Creature* summon = DoSummon(NPC_BLIZZARD, me, 0.0f, urand(25, 30) * IN_MILLISECONDS, TEMPSUMMON_TIMED_DESPAWN))
+ summon->GetMotionMaster()->MoveRandom(40);
+ events.ScheduleEvent(EVENT_BLIZZARD, RAID_MODE(20, 7) * IN_MILLISECONDS, 0, PHASE_GROUND);
+ break;
}
- break;
+ case EVENT_FLIGHT:
+ if (HealthAbovePct(10))
+ {
+ _phase = PHASE_FLIGHT;
+ events.SetPhase(PHASE_FLIGHT);
+ me->SetReactState(REACT_PASSIVE);
+ me->AttackStop();
+ float x, y, z, o;
+ me->GetHomePosition(x, y, z, o);
+ me->GetMotionMaster()->MovePoint(1, x, y, z);
+ return;
+ }
+ break;
+ }
}
- }
- DoMeleeAttackIfReady();
- }
- else
- {
- if (uint32 eventId = events.ExecuteEvent())
+ DoMeleeAttackIfReady();
+ }
+ else
{
- switch (eventId)
+ if (uint32 eventId = events.ExecuteEvent())
{
- case EVENT_LIFTOFF:
- me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
- me->SetDisableGravity(true);
- me->SendMovementFlagUpdate();
- events.ScheduleEvent(EVENT_ICEBOLT, 1500);
- iceboltCount = RAID_MODE(2, 3);
- return;
- case EVENT_ICEBOLT:
+ switch (eventId)
{
- std::vector<Unit*> targets;
- std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin();
- for (; i != me->getThreatManager().getThreatList().end(); ++i)
- if ((*i)->getTarget()->GetTypeId() == TYPEID_PLAYER && !(*i)->getTarget()->HasAura(SPELL_ICEBOLT))
- targets.push_back((*i)->getTarget());
-
- if (targets.empty())
- iceboltCount = 0;
- else
+ case EVENT_LIFTOFF:
+ Talk(EMOTE_AIR_PHASE);
+ me->SetDisableGravity(true);
+ me->SendMovementFlagUpdate();
+ events.ScheduleEvent(EVENT_ICEBOLT, 1500);
+ _iceboltCount = RAID_MODE(2, 3);
+ return;
+ case EVENT_ICEBOLT:
{
- std::vector<Unit*>::const_iterator itr = targets.begin();
- advance(itr, rand()%targets.size());
- iceblocks.insert(std::make_pair((*itr)->GetGUID(), 0));
- DoCast(*itr, SPELL_ICEBOLT);
- --iceboltCount;
+ std::vector<Unit*> targets;
+ std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin();
+ for (; i != me->getThreatManager().getThreatList().end(); ++i)
+ if ((*i)->getTarget()->GetTypeId() == TYPEID_PLAYER && !(*i)->getTarget()->HasAura(SPELL_ICEBOLT))
+ targets.push_back((*i)->getTarget());
+
+ if (targets.empty())
+ _iceboltCount = 0;
+ else
+ {
+ std::vector<Unit*>::const_iterator itr = targets.begin();
+ advance(itr, rand()%targets.size());
+ _iceblocks.insert(std::make_pair((*itr)->GetGUID(), 0));
+ DoCast(*itr, SPELL_ICEBOLT);
+ --_iceboltCount;
+ }
+
+ if (_iceboltCount)
+ events.ScheduleEvent(EVENT_ICEBOLT, 1 * IN_MILLISECONDS);
+ else
+ events.ScheduleEvent(EVENT_BREATH, 1 * IN_MILLISECONDS);
+ return;
}
-
- if (iceboltCount)
- events.ScheduleEvent(EVENT_ICEBOLT, 1000);
- else
- events.ScheduleEvent(EVENT_BREATH, 1000);
- return;
- }
- case EVENT_BREATH:
- {
- DoScriptText(EMOTE_BREATH, me);
- DoCastAOE(SPELL_FROST_MISSILE);
- events.ScheduleEvent(EVENT_EXPLOSION, 8000);
- return;
+ case EVENT_BREATH:
+ {
+ Talk(EMOTE_BREATH);
+ DoCastAOE(SPELL_FROST_MISSILE);
+ events.ScheduleEvent(EVENT_EXPLOSION, 8 * IN_MILLISECONDS);
+ return;
+ }
+ case EVENT_EXPLOSION:
+ CastExplosion();
+ ClearIceBlock();
+ events.ScheduleEvent(EVENT_LAND, 3 * IN_MILLISECONDS);
+ return;
+ case EVENT_LAND:
+ me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
+ Talk(EMOTE_GROUND_PHASE);
+ me->SetDisableGravity(false);
+ me->SendMovementFlagUpdate();
+ events.ScheduleEvent(EVENT_GROUND, 1500);
+ return;
+ case EVENT_GROUND:
+ EnterPhaseGround();
+ return;
+ case EVENT_BIRTH:
+ me->SetVisible(true);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetReactState(REACT_AGGRESSIVE);
+ return;
}
- case EVENT_EXPLOSION:
- CastExplosion();
- ClearIceBlock();
- events.ScheduleEvent(EVENT_LAND, 3000);
- return;
- case EVENT_LAND:
- me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
- me->SetDisableGravity(false);
- me->SendMovementFlagUpdate();
- events.ScheduleEvent(EVENT_GROUND, 1500);
- return;
- case EVENT_GROUND:
- EnterPhaseGround();
- return;
- case EVENT_BIRTH:
- me->SetVisible(true);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->SetReactState(REACT_AGGRESSIVE);
- return;
}
- }//if (uint32 eventId = events.ExecuteEvent())
- }//if (phase == PHASE_GROUND)
- }
+ }
+ }
- void CastExplosion()
- {
- DoZoneInCombat(); // make sure everyone is in threatlist
- std::vector<Unit*> targets;
- std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin();
- for (; i != me->getThreatManager().getThreatList().end(); ++i)
+ void CastExplosion()
{
- Unit* target = (*i)->getTarget();
- if (target->GetTypeId() != TYPEID_PLAYER)
- continue;
-
- if (target->HasAura(SPELL_ICEBOLT))
+ DoZoneInCombat(); // make sure everyone is in threatlist
+ std::vector<Unit*> targets;
+ std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin();
+ for (; i != me->getThreatManager().getThreatList().end(); ++i)
{
- target->ApplySpellImmune(0, IMMUNITY_ID, SPELL_FROST_EXPLOSION, true);
- targets.push_back(target);
- continue;
- }
+ Unit* target = (*i)->getTarget();
+ if (target->GetTypeId() != TYPEID_PLAYER)
+ continue;
- for (IceBlockMap::const_iterator itr = iceblocks.begin(); itr != iceblocks.end(); ++itr)
- {
- if (GameObject* go = GameObject::GetGameObject(*me, itr->second))
+ if (target->HasAura(SPELL_ICEBOLT))
{
- if (go->IsInBetween(me, target, 2.0f)
- && me->GetExactDist2d(target->GetPositionX(), target->GetPositionY()) - me->GetExactDist2d(go->GetPositionX(), go->GetPositionY()) < 5.0f)
+ target->ApplySpellImmune(0, IMMUNITY_ID, SPELL_FROST_EXPLOSION, true);
+ targets.push_back(target);
+ continue;
+ }
+
+ for (IceBlockMap::const_iterator itr = _iceblocks.begin(); itr != _iceblocks.end(); ++itr)
+ {
+ if (GameObject* go = GameObject::GetGameObject(*me, itr->second))
{
- target->ApplySpellImmune(0, IMMUNITY_ID, SPELL_FROST_EXPLOSION, true);
- targets.push_back(target);
- break;
+ if (go->IsInBetween(me, target, 2.0f)
+ && me->GetExactDist2d(target->GetPositionX(), target->GetPositionY()) - me->GetExactDist2d(go->GetPositionX(), go->GetPositionY()) < 5.0f)
+ {
+ target->ApplySpellImmune(0, IMMUNITY_ID, SPELL_FROST_EXPLOSION, true);
+ targets.push_back(target);
+ break;
+ }
}
}
}
+
+ me->CastSpell(me, SPELL_FROST_EXPLOSION, true);
+
+ for (std::vector<Unit*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
+ (*itr)->ApplySpellImmune(0, IMMUNITY_ID, SPELL_FROST_EXPLOSION, false);
}
- me->CastSpell(me, SPELL_FROST_EXPLOSION, true);
+ private:
+ Phases _phase;
+ uint32 _iceboltCount;
+ IceBlockMap _iceblocks;
+ bool _canTheHundredClub;
+ uint32 _checkFrostResistTimer;
+ Map* _map;
+ };
- for (std::vector<Unit*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
- (*itr)->ApplySpellImmune(0, IMMUNITY_ID, SPELL_FROST_EXPLOSION, false);
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_sapphironAI (creature);
}
- };
+};
+class achievement_the_hundred_club : public AchievementCriteriaScript
+{
+ public:
+ achievement_the_hundred_club() : AchievementCriteriaScript("achievement_the_hundred_club") { }
+
+ bool OnCheck(Player* /*source*/, Unit* target)
+ {
+ return target && target->GetAI()->GetData(DATA_THE_HUNDRED_CLUB);
+ }
};
void AddSC_boss_sapphiron()
{
new boss_sapphiron();
+ new achievement_the_hundred_club();
}
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
index 482f8a1200d..c86cf1e9f28 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
@@ -24,9 +24,9 @@
//Stalagg
enum StalaggYells
{
- SAY_STAL_AGGRO = -1533023, //not used
- SAY_STAL_SLAY = -1533024, //not used
- SAY_STAL_DEATH = -1533025 //not used
+ SAY_STAL_AGGRO = 0,
+ SAY_STAL_SLAY = 1,
+ SAY_STAL_DEATH = 2
};
enum StalagSpells
@@ -40,9 +40,9 @@ enum StalagSpells
//Feugen
enum FeugenYells
{
- SAY_FEUG_AGGRO = -1533026, //not used
- SAY_FEUG_SLAY = -1533027, //not used
- SAY_FEUG_DEATH = -1533028 //not used
+ SAY_FEUG_AGGRO = 0,
+ SAY_FEUG_SLAY = 1,
+ SAY_FEUG_DEATH = 2
};
enum FeugenSpells
@@ -67,17 +67,12 @@ enum ThaddiusActions
//Thaddius
enum ThaddiusYells
{
- SAY_GREET = -1533029, //not used
- SAY_AGGRO_1 = -1533030,
- SAY_AGGRO_2 = -1533031,
- SAY_AGGRO_3 = -1533032,
- SAY_SLAY = -1533033,
- SAY_ELECT = -1533034, //not used
- SAY_DEATH = -1533035,
- SAY_SCREAM1 = -1533036, //not used
- SAY_SCREAM2 = -1533037, //not used
- SAY_SCREAM3 = -1533038, //not used
- SAY_SCREAM4 = -1533039 //not used
+ SAY_GREET = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_ELECT = 3,
+ SAY_DEATH = 4,
+ SAY_SCREAM = 5
};
enum ThaddiusSpells
@@ -155,13 +150,13 @@ public:
void KilledUnit(Unit* /*victim*/)
{
if (!(rand()%5))
- DoScriptText(SAY_SLAY, me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void DoAction(const int32 action)
@@ -198,7 +193,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_SHIFT, 30000);
events.ScheduleEvent(EVENT_CHAIN, urand(10000, 20000));
events.ScheduleEvent(EVENT_BERSERK, 360000);
@@ -315,13 +310,21 @@ public:
magneticPullTimer = 20000;
}
+ void KilledUnit(Unit* /*victim*/)
+ {
+ if (!(rand()%5))
+ Talk(SAY_STAL_SLAY);
+ }
+
void EnterCombat(Unit* /*who*/)
{
+ Talk(SAY_STAL_AGGRO);
DoCast(SPELL_STALAGG_TESLA);
}
void JustDied(Unit* /*killer*/)
{
+ Talk(SAY_STAL_DEATH);
if (instance)
if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS)))
if (pThaddius->AI())
@@ -399,13 +402,21 @@ public:
staticFieldTimer = 5000;
}
+ void KilledUnit(Unit* /*victim*/)
+ {
+ if (!(rand()%5))
+ Talk(SAY_FEUG_SLAY);
+ }
+
void EnterCombat(Unit* /*who*/)
{
+ Talk(SAY_FEUG_AGGRO);
DoCast(SPELL_FEUGEN_TESLA);
}
void JustDied(Unit* /*killer*/)
{
+ Talk(SAY_FEUG_DEATH);
if (instance)
if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS)))
if (pThaddius->AI())
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
index 80a5336a30c..2d89e5db0f0 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
@@ -38,10 +38,10 @@ enum Adds
enum Yells
{
- SAY_AGGRO = -1576010,
- SAY_DEATH = -1576011,
- SAY_RIFT = -1576012,
- SAY_SHIELD = -1576013
+ SAY_AGGRO = 0,
+ SAY_DEATH = 1,
+ SAY_RIFT = 2,
+ SAY_SHIELD = 3
};
enum RiftSpells
@@ -96,7 +96,7 @@ class boss_anomalus : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_ANOMALUS_EVENT, IN_PROGRESS);
@@ -104,7 +104,7 @@ class boss_anomalus : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_ANOMALUS_EVENT, DONE);
@@ -155,7 +155,7 @@ class boss_anomalus : public CreatureScript
if ((Phase == 0) && HealthBelowPct(50))
{
Phase = 1;
- DoScriptText(SAY_SHIELD, me);
+ Talk(SAY_SHIELD);
DoCast(me, SPELL_RIFT_SHIELD);
if (Creature* Rift = me->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[urand(0, 5)], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000))
{
@@ -163,7 +163,7 @@ class boss_anomalus : public CreatureScript
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
Rift->AI()->AttackStart(target);
uiChaoticRiftGUID = Rift->GetGUID();
- DoScriptText(SAY_RIFT, me);
+ Talk(SAY_RIFT);
}
}
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
index bbd86ec6a9f..c110a4a3e85 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
@@ -40,11 +40,11 @@ enum Spells
enum Yells
{
//Yell
- SAY_AGGRO = -1576040,
- SAY_SLAY = -1576041,
- SAY_ENRAGE = -1576042,
- SAY_DEATH = -1576043,
- SAY_CRYSTAL_NOVA = -1576044
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_ENRAGE = 2,
+ SAY_DEATH = 3,
+ SAY_CRYSTAL_NOVA = 4
};
enum Misc
@@ -100,7 +100,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoCastAOE(SPELL_INTENSE_COLD);
if (instance)
@@ -109,7 +109,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_KERISTRASZA_EVENT, DONE);
@@ -117,7 +117,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(SAY_SLAY, me);
+ Talk(SAY_SLAY);
}
bool CheckContainmentSpheres(bool remove_prison = false)
@@ -174,7 +174,7 @@ public:
if (!bEnrage && HealthBelowPct(25))
{
- DoScriptText(SAY_ENRAGE, me);
+ Talk(SAY_ENRAGE);
DoCast(me, SPELL_ENRAGE);
bEnrage = true;
}
@@ -193,7 +193,7 @@ public:
if (uiCrystalChainsCrystalizeTimer <= diff)
{
- DoScriptText(SAY_CRYSTAL_NOVA, me);
+ Talk(SAY_CRYSTAL_NOVA);
if (IsHeroic())
DoCast(me, SPELL_CRYSTALIZE);
else if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp
index 317a9845e87..c8d3cc6416c 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp
@@ -43,12 +43,11 @@ enum Creatures
enum Yells
{
- SAY_AGGRO = -1576000,
- SAY_KILL = -1576001,
- SAY_DEATH = -1576002,
- SAY_MERGE = -1576003,
- SAY_SPLIT_1 = -1576004,
- SAY_SPLIT_2 = -1576005,
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_DEATH = 2,
+ SAY_MERGE = 3,
+ SAY_SPLIT = 4
};
#define ACTION_MAGUS_DEAD 1
@@ -122,7 +121,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_MAGUS_TELESTRA_EVENT, IN_PROGRESS);
@@ -130,7 +129,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_MAGUS_TELESTRA_EVENT, DONE);
@@ -138,7 +137,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(SAY_KILL, me);
+ Talk(SAY_KILL);
}
void DoAction(int32 const action)
@@ -251,7 +250,7 @@ public:
uiArcaneMagusGUID = 0;
bIsWaitingToAppear = true;
uiIsWaitingToAppearTimer = 4*IN_MILLISECONDS;
- DoScriptText(SAY_MERGE, me);
+ Talk(SAY_MERGE);
}
else
return;
@@ -270,7 +269,7 @@ public:
bFireMagusDead = false;
bFrostMagusDead = false;
bArcaneMagusDead = false;
- DoScriptText(RAND(SAY_SPLIT_1, SAY_SPLIT_2), me);
+ Talk(SAY_SPLIT);
return;
}
@@ -287,7 +286,7 @@ public:
bFireMagusDead = false;
bFrostMagusDead = false;
bArcaneMagusDead = false;
- DoScriptText(RAND(SAY_SPLIT_1, SAY_SPLIT_2), me);
+ Talk(SAY_SPLIT);
return;
}
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp b/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp
index 38808bc718d..1af1edcdf71 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp
@@ -26,17 +26,15 @@ Script Data End */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
-#define SPELL_BATTLE_SHOUT 31403
-#define SPELL_CHARGE 60067
-#define SPELL_FRIGHTENING_SHOUT 19134
-#define SPELL_WHIRLWIND_1 38619
-#define SPELL_WHIRLWIND_2 38618
+enum CommanderStoutbeard
+{
+ SPELL_BATTLE_SHOUT = 31403,
+ SPELL_CHARGE = 60067,
+ SPELL_FRIGHTENING_SHOUT = 19134,
+ SPELL_WHIRLWIND_1 = 38619,
+ SPELL_WHIRLWIND_2 = 38618
+};
-//not used
-//Yell
-#define SAY_AGGRO -1576021
-#define SAY_KILL -1576022
-#define SAY_DEATH -1576023
class boss_commander_stoutbeard : public CreatureScript
{
@@ -53,10 +51,6 @@ public:
boss_commander_stoutbeardAI(Creature* creature) : ScriptedAI(creature) {}
void Reset() {}
- void EnterCombat(Unit* /*who*/)
- {
- DoScriptText(SAY_AGGRO, me);
- }
void AttackStart(Unit* /*who*/) {}
void MoveInLineOfSight(Unit* /*who*/) {}
void UpdateAI(const uint32 /*diff*/)
@@ -67,10 +61,6 @@ public:
DoMeleeAttackIfReady();
}
- void JustDied(Unit* /*killer*/)
- {
- DoScriptText(SAY_DEATH, me);
- }
};
};
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp
index 035e1a9a6df..60f9a3ddc9a 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp
@@ -31,18 +31,11 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1578005,
- SAY_KILL_1 = -1578006,
- SAY_KILL_2 = -1578007,
- SAY_KILL_3 = -1578008,
- SAY_DEATH = -1578009,
- SAY_PULL_1 = -1578010,
- SAY_PULL_2 = -1578011,
- SAY_PULL_3 = -1578012,
- SAY_PULL_4 = -1578013,
- SAY_STOMP_1 = -1578014,
- SAY_STOMP_2 = -1578015,
- SAY_STOMP_3 = -1578016
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_DEATH = 2,
+ SAY_PULL = 3,
+ SAY_STOMP = 4
};
enum DrakosAchievement
@@ -85,7 +78,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
@@ -122,7 +115,7 @@ public:
events.ScheduleEvent(EVENT_MAGIC_PULL, 15000);
break;
case EVENT_STOMP:
- DoScriptText(RAND(SAY_STOMP_1, SAY_STOMP_2, SAY_STOMP_3), me);
+ Talk(SAY_STOMP);
DoCast(SPELL_THUNDERING_STOMP);
events.ScheduleEvent(EVENT_STOMP, 17000);
break;
@@ -136,7 +129,7 @@ public:
{
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
// start achievement timer (kill Eregos within 20 min)
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
@@ -144,7 +137,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2, SAY_KILL_3), me);
+ Talk(SAY_KILL);
}
private:
bool postPull;
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
index 4bbb4c1a5ed..b17c471c81b 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
@@ -34,9 +34,12 @@ enum Events
enum Says
{
- SAY_AGGRO = 0,
- SAY_ENRAGE = 1,
- SAY_DEATH = 2
+ SAY_SPAWN = 0,
+ SAY_AGGRO = 1,
+ SAY_ENRAGE = 2,
+ SAY_KILL = 3,
+ SAY_DEATH = 4,
+ SAY_SHIELD = 5,
};
enum Spells
@@ -101,6 +104,11 @@ public:
DoAction(ACTION_SET_NORMAL_EVENTS);
}
+ void KilledUnit(Unit* /*victim*/)
+ {
+ Talk(SAY_KILL);
+ }
+
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
@@ -176,6 +184,7 @@ public:
events.Reset();
_phase = (me->GetHealthPct() < 60.0f && me->GetHealthPct() > 20.0f) ? PHASE_FIRST_PLANAR : PHASE_SECOND_PLANAR;
+ Talk(SAY_SHIELD);
DoCast(SPELL_PLANAR_SHIFT);
// not sure about the amount, and if we should despawn previous spawns (dragon trashs)
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
index 51e476785ff..ffd5e53e787 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
@@ -45,11 +45,14 @@ enum Spells
enum Yells
{
- SAY_AGGRO_1 = -1578000,
- SAY_AGGRO_2 = -1578001,
- SAY_AGGRO_3 = -1578002,
- SAY_AGGRO_4 = -1578003,
- SAY_TELEPORT = -1578004,
+ SAY_SUMMON_1 = 0,
+ SAY_SUMMON_2 = 1,
+ SAY_SUMMON_3 = 2,
+ SAY_AGGRO = 3,
+ EMOTE_ARCANE_EXPLOSION = 4,
+ SAY_ARCANE_EXPLOSION = 5,
+ SAY_DEATH = 6,
+ SAY_PLAYER_KILL = 7
};
enum eCreature
@@ -84,11 +87,6 @@ static uint32 TeleportSpells[]=
SPELL_SUMMON_MENAGERIE, SPELL_SUMMON_MENAGERIE_2, SPELL_SUMMON_MENAGERIE_3
};
-static int32 SayAggro[]=
-{
- SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3, SAY_AGGRO_4
-};
-
class boss_urom : public CreatureScript
{
public:
@@ -153,7 +151,7 @@ public:
{
if (me->Attack(who, true))
{
- DoScriptText(SayAggro[3], me);
+ Talk(SAY_AGGRO);
me->SetInCombatWith(who);
who->SetInCombatWith(me);
@@ -209,6 +207,22 @@ public:
{
SetPosition(i);
me->SummonCreature(Group[group[instance->GetData(DATA_UROM_PLATAFORM)]].entry[i], x, y, me->GetPositionZ(), me->GetOrientation());
+
+ // teleport to next platform and spawn adds
+ switch (instance->GetData(DATA_UROM_PLATAFORM))
+ {
+ case 1:
+ Talk(SAY_SUMMON_1);
+ break;
+ case 2:
+ Talk(SAY_SUMMON_2);
+ break;
+ case 3:
+ Talk(SAY_SUMMON_3);
+ break;
+ default:
+ break;
+ }
}
}
@@ -217,13 +231,17 @@ public:
if (!instance || instance->GetData(DATA_UROM_PLATAFORM) > 2)
return;
- DoScriptText(SayAggro[instance->GetData(DATA_UROM_PLATAFORM)], me);
+ Talk(instance->GetData(DATA_UROM_PLATAFORM) < 5 ? instance->GetData(DATA_UROM_PLATAFORM) : 0);
DoCast(TeleportSpells[instance->GetData(DATA_UROM_PLATAFORM)]);
}
+ void KilledUnit(Unit* /*victim*/)
+ {
+ Talk(SAY_PLAYER_KILL);
+ }
+
void UpdateAI(const uint32 uiDiff)
{
- //Return since we have no target
if (!UpdateVictim())
return;
@@ -233,7 +251,6 @@ public:
if (teleportTimer <= uiDiff)
{
me->InterruptNonMeleeSpells(false);
- DoScriptText(SAY_TELEPORT, me);
me->GetMotionMaster()->MoveIdle();
DoCast(SPELL_TELEPORT);
teleportTimer = urand(30000, 35000);
@@ -262,6 +279,9 @@ public:
me->GetMotionMaster()->MoveChase(me->getVictim(), 0, 0);
me->SetUnitMovementFlags(MOVEMENTFLAG_WALKING);
+ Talk(EMOTE_ARCANE_EXPLOSION);
+ Talk(SAY_ARCANE_EXPLOSION);
+
canCast = false;
canGoBack = false;
arcaneExplosionTimer = 9000;
@@ -291,6 +311,7 @@ public:
void JustDied(Unit* /*killer*/)
{
_JustDied();
+ Talk(SAY_DEATH);
DoCast(me, SPELL_DEATH_SPELL, true); // we cast the spell as triggered or the summon effect does not occur
}
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp
index 33e6e2846e4..a7dae9aba78 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp
@@ -29,7 +29,7 @@ EndScriptData */
#include "Player.h"
#include "SpellInfo.h"
-enum eEnums
+enum Enums
{
SAY_AGGRO = 0,
SAY_FORGE = 1,
@@ -62,7 +62,7 @@ enum eEnums
MAX_GOLEM = 2,
- ACHIEVEMENT_SHATTER_RESISTANT = 2042
+ DATA_SHATTER_RESISTANT = 2042
};
/*######
@@ -152,21 +152,6 @@ public:
if (instance)
instance->SetData(TYPE_VOLKHAN, DONE);
-
- if (IsHeroic() && GolemsShattered < 5)
- {
- AchievementEntry const* AchievShatterResistant = sAchievementStore.LookupEntry(ACHIEVEMENT_SHATTER_RESISTANT);
- if (AchievShatterResistant)
- {
- Map* map = me->GetMap();
- if (map && map->IsDungeon())
- {
- Map::PlayerList const &players = map->GetPlayers();
- for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- itr->getSource()->CompletedAchievement(AchievShatterResistant);
- }
- }
- }
}
void KilledUnit(Unit* /*victim*/)
@@ -233,6 +218,14 @@ public:
}
}
+ uint32 GetData(uint32 data) const
+ {
+ if (data == DATA_SHATTER_RESISTANT)
+ return GolemsShattered;
+
+ return 0;
+ }
+
void UpdateAI(const uint32 uiDiff)
{
if (!UpdateVictim())
@@ -461,8 +454,20 @@ public:
};
};
+class achievement_shatter_resistant : public AchievementCriteriaScript
+{
+ public:
+ achievement_shatter_resistant() : AchievementCriteriaScript("achievement_shatter_resistant") { }
+
+ bool OnCheck(Player* /*source*/, Unit* target)
+ {
+ return target && target->GetAI()->GetData(DATA_SHATTER_RESISTANT) < 5;
+ }
+};
+
void AddSC_boss_volkhan()
{
new boss_volkhan();
new mob_molten_golem();
+ new achievement_shatter_resistant();
}
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
index 93bea92503c..747bd699c81 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
@@ -45,10 +45,10 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1599007,
- SAY_KILL = -1599008,
- SAY_DEATH = -1599009,
- SAY_SHATTER = -1599010
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_DEATH = 2,
+ SAY_SHATTER = 3
};
class boss_krystallus : public CreatureScript
@@ -93,7 +93,7 @@ public:
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_KRYSTALLUS_EVENT, IN_PROGRESS);
@@ -146,7 +146,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_KRYSTALLUS_EVENT, DONE);
@@ -156,7 +156,7 @@ public:
{
if (victim == me)
return;
- DoScriptText(SAY_KILL, me);
+ Talk(SAY_KILL);
}
void SpellHitTarget(Unit* /*target*/, const SpellInfo* pSpell)
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp
index 8d113bce226..4511b8b0f1e 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp
@@ -40,13 +40,10 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1599000,
- SAY_SLAY_1 = -1599001,
- SAY_SLAY_2 = -1599002,
- SAY_SLAY_3 = -1599003,
- SAY_SLAY_4 = -1599004,
- SAY_DEATH = -1599005,
- SAY_STUN = -1599006
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_STUN = 3
};
enum Achievements
@@ -94,7 +91,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
{
@@ -138,7 +135,7 @@ public:
if (ShockOfSorrowTimer <= diff)
{
DoResetThreat();
- DoScriptText(SAY_STUN, me);
+ Talk(SAY_STUN);
DoCast(me, SPELL_SHOCK_OF_SORROW_N);
ShockOfSorrowTimer = urand(20000, 30000);
} else ShockOfSorrowTimer -= diff;
@@ -160,7 +157,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_MAIDEN_OF_GRIEF_EVENT, DONE);
@@ -171,7 +168,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3, SAY_SLAY_4), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp
index c3e815f57dd..326779661cc 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp
@@ -44,11 +44,9 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1599011,
- SAY_SLAY_1 = -1599012,
- SAY_SLAY_2 = -1599013,
- SAY_SLAY_3 = -1599014,
- SAY_DEATH = -1599015
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2
};
#define EMOTE_GENERIC_FRENZY -1000002
@@ -132,7 +130,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
uiEncounterTimer = 0;
@@ -217,7 +215,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
lSummons.DespawnAll();
if (instance)
@@ -227,7 +225,7 @@ public:
{
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
void DoAction(int32 const action)
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp
index 3c03508a14c..6b51d923517 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp
@@ -24,68 +24,62 @@
enum Texts
{
- SAY_KILL_1 = -1599016,
- SAY_KILL_2 = -1599017,
- SAY_KILL_3 = -1599018,
- SAY_LOW_HEALTH = -1599019,
- SAY_DEATH = -1599020,
- SAY_PLAYER_DEATH_1 = -1599021,
- SAY_PLAYER_DEATH_2 = -1599022,
- SAY_PLAYER_DEATH_3 = -1599023,
- SAY_ESCORT_START = -1599024,
-
- SAY_SPAWN_DWARF = -1599025,
- SAY_SPAWN_TROGG = -1599026,
- SAY_SPAWN_OOZE = -1599027,
- SAY_SPAWN_EARTHEN = -1599028,
-
- SAY_EVENT_INTRO_1 = -1599029,
- SAY_EVENT_INTRO_2 = -1599030,
- SAY_EVENT_INTRO_3_ABED = -1599031,
-
- SAY_EVENT_A_1 = -1599032,
- SAY_EVENT_A_2_KADD = -1599033,
- SAY_EVENT_A_3 = -1599034,
-
- SAY_EVENT_B_1 = -1599035,
- SAY_EVENT_B_2_MARN = -1599036,
- SAY_EVENT_B_3 = -1599037,
-
- SAY_EVENT_C_1 = -1599038,
- SAY_EVENT_C_2_ABED = -1599039,
- SAY_EVENT_C_3 = -1599040,
-
- SAY_EVENT_D_1 = -1599041,
- SAY_EVENT_D_2_ABED = -1599042,
- SAY_EVENT_D_3 = -1599043,
- SAY_EVENT_D_4_ABED = -1599044,
-
- SAY_EVENT_END_01 = -1599045,
- SAY_EVENT_END_02 = -1599046,
- SAY_EVENT_END_03_ABED = -1599047,
- SAY_EVENT_END_04 = -1599048,
- SAY_EVENT_END_05_ABED = -1599049,
- SAY_EVENT_END_06 = -1599050,
- SAY_EVENT_END_07_ABED = -1599051,
- SAY_EVENT_END_08 = -1599052,
- SAY_EVENT_END_09_KADD = -1599053,
- SAY_EVENT_END_10 = -1599054,
- SAY_EVENT_END_11_KADD = -1599055,
- SAY_EVENT_END_12 = -1599056,
- SAY_EVENT_END_13_KADD = -1599057,
- SAY_EVENT_END_14 = -1599058,
- SAY_EVENT_END_15_MARN = -1599059,
- SAY_EVENT_END_16 = -1599060,
- SAY_EVENT_END_17_MARN = -1599061,
- SAY_EVENT_END_18 = -1599062,
- SAY_EVENT_END_19_MARN = -1599063,
- SAY_EVENT_END_20 = -1599064,
- SAY_EVENT_END_21_ABED = -1599065,
-
- SAY_VICTORY_SJONNIR_1 = -1599066,
- SAY_VICTORY_SJONNIR_2 = -1599067,
-
- SAY_ENTRANCE_MEET = -1599068,
+ SAY_KILL = 0,
+ SAY_LOW_HEALTH = 1,
+ SAY_DEATH = 2,
+ SAY_PLAYER_DEATH = 3,
+ SAY_ESCORT_START = 4,
+
+ SAY_SPAWN_DWARF = 5,
+ SAY_SPAWN_TROGG = 6,
+ SAY_SPAWN_OOZE = 7,
+ SAY_SPAWN_EARTHEN = 8,
+
+ SAY_EVENT_INTRO_1 = 9,
+ SAY_EVENT_INTRO_2 = 10,
+ SAY_EVENT_A_1 = 11,
+ SAY_EVENT_A_3 = 12,
+ SAY_EVENT_B_1 = 13,
+ SAY_EVENT_B_3 = 14,
+ SAY_EVENT_C_1 = 15,
+ SAY_EVENT_C_3 = 16,
+ SAY_EVENT_D_1 = 17,
+ SAY_EVENT_D_3 = 18,
+
+ SAY_EVENT_END_01 = 19,
+ SAY_EVENT_END_02 = 20,
+ SAY_EVENT_END_04 = 21,
+ SAY_EVENT_END_06 = 22,
+ SAY_EVENT_END_08 = 23,
+ SAY_EVENT_END_10 = 24,
+ SAY_EVENT_END_12 = 25,
+ SAY_EVENT_END_14 = 26,
+ SAY_EVENT_END_16 = 27,
+ SAY_EVENT_END_18 = 28,
+ SAY_EVENT_END_20 = 29,
+
+ SAY_VICTORY_SJONNIR_1 = 30,
+ SAY_VICTORY_SJONNIR_2 = 31,
+ SAY_ENTRANCE_MEET = 32,
+
+ SAY_EVENT_INTRO_3_ABED = 0,
+ SAY_EVENT_C_2_ABED = 1,
+ SAY_EVENT_D_2_ABED = 2,
+ SAY_EVENT_D_4_ABED = 3,
+ SAY_EVENT_END_03_ABED = 4,
+ SAY_EVENT_END_05_ABED = 5,
+ SAY_EVENT_END_07_ABED = 6,
+ SAY_EVENT_END_21_ABED = 7,
+
+ SAY_EVENT_A_2_KADD = 0,
+ SAY_EVENT_END_09_KADD = 1,
+ SAY_EVENT_END_11_KADD = 2,
+ SAY_EVENT_END_13_KADD = 3,
+
+ SAY_EVENT_B_2_MARN = 0,
+ SAY_EVENT_END_15_MARN = 1,
+ SAY_EVENT_END_17_MARN = 2,
+ SAY_EVENT_END_19_MARN = 3,
TEXT_ID_START = 13100,
TEXT_ID_PROGRESS = 13101
@@ -363,12 +357,12 @@ public:
}
break;
case 13:
- DoScriptText(SAY_EVENT_INTRO_1, me);
+ Talk(SAY_EVENT_INTRO_1);
SetEscortPaused(true);
JumpToNextStep(20000);
break;
case 17:
- DoScriptText(SAY_EVENT_INTRO_2, me);
+ Talk(SAY_EVENT_INTRO_2);
if (instance)
instance->HandleGameObject(instance->GetData64(DATA_GO_TRIBUNAL_CONSOLE), true);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
@@ -452,7 +446,7 @@ public:
instance->SetData(DATA_BRANN_EVENT, IN_PROGRESS);
}
bIsBattle = false;
- DoScriptText(SAY_ESCORT_START, me);
+ Talk(SAY_ESCORT_START);
SetRun(true);
JumpToNextStep(0);
break;
@@ -463,21 +457,21 @@ public:
case 5:
if (instance)
if (Creature* temp = (Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))))
- DoScriptText(SAY_EVENT_INTRO_3_ABED, temp);
+ temp->AI()->Talk(SAY_EVENT_INTRO_3_ABED);
JumpToNextStep(8500);
break;
case 6:
- DoScriptText(SAY_EVENT_A_1, me);
+ Talk(SAY_EVENT_A_1);
JumpToNextStep(6500);
break;
case 7:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK)))
- DoScriptText(SAY_EVENT_A_2_KADD, temp);
+ temp->AI()->Talk(SAY_EVENT_A_2_KADD);
JumpToNextStep(12500);
break;
case 8:
- DoScriptText(SAY_EVENT_A_3, me);
+ Talk(SAY_EVENT_A_3);
if (instance)
instance->HandleGameObject(instance->GetData64(DATA_GO_KADDRAK), true);
if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID))
@@ -490,18 +484,18 @@ public:
JumpToNextStep(20000);
break;
case 10:
- DoScriptText(SAY_EVENT_B_1, me);
+ Talk(SAY_EVENT_B_1);
JumpToNextStep(6000);
break;
case 11:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK)))
- DoScriptText(SAY_EVENT_B_2_MARN, temp);
+ temp->AI()->Talk(SAY_EVENT_B_2_MARN);
SpawnDwarf(1);
JumpToNextStep(20000);
break;
case 12:
- DoScriptText(SAY_EVENT_B_3, me);
+ Talk(SAY_EVENT_B_3);
if (instance)
instance->HandleGameObject(instance->GetData64(DATA_GO_MARNAK), true);
if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID))
@@ -517,7 +511,7 @@ public:
JumpToNextStep(20000);
break;
case 15:
- DoScriptText(SAY_EVENT_C_1, me);
+ Talk(SAY_EVENT_C_1);
SpawnDwarf(1);
JumpToNextStep(10000);
break;
@@ -528,12 +522,12 @@ public:
case 17:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
- DoScriptText(SAY_EVENT_C_2_ABED, temp);
+ temp->AI()->Talk(SAY_EVENT_C_2_ABED);
SpawnDwarf(1);
JumpToNextStep(20000);
break;
case 18:
- DoScriptText(SAY_EVENT_C_3, me);
+ Talk(SAY_EVENT_C_3);
if (instance)
instance->HandleGameObject(instance->GetData64(DATA_GO_ABEDNEUM), true);
if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID))
@@ -549,14 +543,14 @@ public:
JumpToNextStep(15000);
break;
case 21:
- DoScriptText(SAY_EVENT_D_1, me);
+ Talk(SAY_EVENT_D_1);
SpawnDwarf(3);
JumpToNextStep(20000);
break;
case 22:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
- DoScriptText(SAY_EVENT_D_2_ABED, temp);
+ temp->AI()->Talk(SAY_EVENT_D_2_ABED);
SpawnDwarf(1);
JumpToNextStep(5000);
break;
@@ -565,7 +559,7 @@ public:
JumpToNextStep(15000);
break;
case 24:
- DoScriptText(SAY_EVENT_D_3, me);
+ Talk(SAY_EVENT_D_3);
SpawnDwarf(3);
JumpToNextStep(5000);
break;
@@ -580,13 +574,13 @@ public:
case 27:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
- DoScriptText(SAY_EVENT_D_4_ABED, temp);
+ temp->AI()->Talk(SAY_EVENT_D_4_ABED);
SpawnDwarf(1);
JumpToNextStep(10000);
break;
case 28:
me->SetReactState(REACT_DEFENSIVE);
- DoScriptText(SAY_EVENT_END_01, me);
+ Talk(SAY_EVENT_END_01);
me->SetStandState(UNIT_STAND_STATE_STAND);
if (instance)
instance->HandleGameObject(instance->GetData64(DATA_GO_SKY_FLOOR), true);
@@ -597,7 +591,7 @@ public:
JumpToNextStep(6500);
break;
case 29:
- DoScriptText(SAY_EVENT_END_02, me);
+ Talk(SAY_EVENT_END_02);
if (instance)
instance->SetData(DATA_BRANN_EVENT, DONE);
me->CastSpell(me, SPELL_REWARD_ACHIEVEMENT, true);
@@ -606,97 +600,97 @@ public:
case 30:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
- DoScriptText(SAY_EVENT_END_03_ABED, temp);
+ temp->AI()->Talk(SAY_EVENT_END_03_ABED);
JumpToNextStep(8500);
break;
case 31:
- DoScriptText(SAY_EVENT_END_04, me);
+ Talk(SAY_EVENT_END_04);
JumpToNextStep(11500);
break;
case 32:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
- DoScriptText(SAY_EVENT_END_05_ABED, temp);
+ temp->AI()->Talk(SAY_EVENT_END_05_ABED);
JumpToNextStep(11500);
break;
case 33:
- DoScriptText(SAY_EVENT_END_06, me);
+ Talk(SAY_EVENT_END_06);
JumpToNextStep(4500);
break;
case 34:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
- DoScriptText(SAY_EVENT_END_07_ABED, temp);
+ temp->AI()->Talk(SAY_EVENT_END_07_ABED);
JumpToNextStep(22500);
break;
case 35:
- DoScriptText(SAY_EVENT_END_08, me);
+ Talk(SAY_EVENT_END_08);
JumpToNextStep(7500);
break;
case 36:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK)))
- DoScriptText(SAY_EVENT_END_09_KADD, temp);
+ temp->AI()->Talk(SAY_EVENT_END_09_KADD);
JumpToNextStep(18500);
break;
case 37:
- DoScriptText(SAY_EVENT_END_10, me);
+ Talk(SAY_EVENT_END_10);
JumpToNextStep(5500);
break;
case 38:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK)))
- DoScriptText(SAY_EVENT_END_11_KADD, temp);
+ temp->AI()->Talk(SAY_EVENT_END_11_KADD);
JumpToNextStep(20500);
break;
case 39:
- DoScriptText(SAY_EVENT_END_12, me);
+ Talk(SAY_EVENT_END_12);
JumpToNextStep(2500);
break;
case 40:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK)))
- DoScriptText(SAY_EVENT_END_13_KADD, temp);
+ temp->AI()->Talk(SAY_EVENT_END_13_KADD);
JumpToNextStep(19500);
break;
case 41:
- DoScriptText(SAY_EVENT_END_14, me);
+ Talk(SAY_EVENT_END_14);
JumpToNextStep(10500);
break;
case 42:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK)))
- DoScriptText(SAY_EVENT_END_15_MARN, temp);
+ temp->AI()->Talk(SAY_EVENT_END_15_MARN);
JumpToNextStep(6500);
break;
case 43:
- DoScriptText(SAY_EVENT_END_16, me);
+ Talk(SAY_EVENT_END_16);
JumpToNextStep(6500);
break;
case 44:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK)))
- DoScriptText(SAY_EVENT_END_17_MARN, temp);
+ temp->AI()->Talk(SAY_EVENT_END_17_MARN);
JumpToNextStep(25500);
break;
case 45:
- DoScriptText(SAY_EVENT_END_18, me);
+ Talk(SAY_EVENT_END_18);
JumpToNextStep(23500);
break;
case 46:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK)))
- DoScriptText(SAY_EVENT_END_19_MARN, temp);
+ temp->AI()->Talk(SAY_EVENT_END_19_MARN);
JumpToNextStep(3500);
break;
case 47:
- DoScriptText(SAY_EVENT_END_20, me);
+ Talk(SAY_EVENT_END_20);
JumpToNextStep(8500);
break;
case 48:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
- DoScriptText(SAY_EVENT_END_21_ABED, temp);
+ temp->AI()->Talk(SAY_EVENT_END_21_ABED);
JumpToNextStep(5500);
break;
case 49:
@@ -723,7 +717,7 @@ public:
if (!bIsLowHP && HealthBelowPct(30))
{
- DoScriptText(SAY_LOW_HEALTH, me);
+ Talk(SAY_LOW_HEALTH);
bIsLowHP = true;
}
else if (bIsLowHP && !HealthBelowPct(30))
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp
index 92e56d4dd9a..db8c7f38ef7 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp
@@ -18,7 +18,7 @@
/* ScriptData
SDName: Assembly of Iron encounter
SD%Complete: 60%
-SDComment: Runes need DB support, chain lightning won't cast, supercharge won't cast (target error?) - it worked before during debugging.
+SDComment: chain lightning won't cast, supercharge don't work (auras don't stack from different casters)
SDCategory: Ulduar - Ulduar
EndScriptData */
@@ -33,6 +33,7 @@ enum AssemblySpells
// General
SPELL_SUPERCHARGE = 61920,
SPELL_BERSERK = 47008, // Hard enrage, don't know the correct ID.
+ SPELL_KILL_CREDIT = 65195, // spell_dbc
// Steelbreaker
SPELL_HIGH_VOLTAGE = 61890,
@@ -45,12 +46,9 @@ enum AssemblySpells
SPELL_SHIELD_OF_RUNES = 62274,
SPELL_SHIELD_OF_RUNES_BUFF = 62277,
SPELL_SUMMON_RUNE_OF_POWER = 63513,
- SPELL_RUNE_OF_POWER = 61974,
SPELL_RUNE_OF_DEATH = 62269,
SPELL_RUNE_OF_SUMMONING = 62273, // This is the spell that summons the rune
- SPELL_RUNE_OF_SUMMONING_VIS = 62019, // Visual
SPELL_RUNE_OF_SUMMONING_SUMMON = 62020, // Spell that summons
- SPELL_LIGHTNING_ELEMENTAL_PASSIVE = 62052,
// Stormcaller Brundir
SPELL_CHAIN_LIGHTNING = 61879,
@@ -59,7 +57,7 @@ enum AssemblySpells
SPELL_LIGHTNING_TENDRILS_10M = 61887,
SPELL_LIGHTNING_TENDRILS_25M = 63486,
SPELL_LIGHTNING_TENDRILS_VISUAL = 61883,
- SPELL_STORMSHIELD = 64187,
+ SPELL_STORMSHIELD = 64187
};
enum AssemblyEvents
@@ -88,115 +86,50 @@ enum AssemblyEvents
EVENT_ENDFLIGHT = 15,
EVENT_GROUND = 16,
EVENT_LAND = 17,
- EVENT_MOVE_POSITION = 18,
+ EVENT_MOVE_POSITION = 18
};
enum AssemblyActions
{
- ACTION_STEELBREAKER = 0,
- ACTION_MOLGEIM = 1,
- ACTION_BRUNDIR = 2,
- ACTION_ADD_CHARGE = 3,
+ ACTION_SUPERCHARGE = 1,
+ ACTION_ADD_CHARGE = 2
};
enum AssemblyYells
{
- SAY_STEELBREAKER_AGGRO = -1603020,
- SAY_STEELBREAKER_SLAY_1 = -1603021,
- SAY_STEELBREAKER_SLAY_2 = -1603022,
- SAY_STEELBREAKER_POWER = -1603023,
- SAY_STEELBREAKER_DEATH_1 = -1603024,
- SAY_STEELBREAKER_DEATH_2 = -1603025,
- SAY_STEELBREAKER_BERSERK = -1603026,
-
- SAY_MOLGEIM_AGGRO = -1603030,
- SAY_MOLGEIM_SLAY_1 = -1603031,
- SAY_MOLGEIM_SLAY_2 = -1603032,
- SAY_MOLGEIM_RUNE_DEATH = -1603033,
- SAY_MOLGEIM_SUMMON = -1603034,
- SAY_MOLGEIM_DEATH_1 = -1603035,
- SAY_MOLGEIM_DEATH_2 = -1603036,
- SAY_MOLGEIM_BERSERK = -1603037,
-
- SAY_BRUNDIR_AGGRO = -1603040,
- SAY_BRUNDIR_SLAY_1 = -1603041,
- SAY_BRUNDIR_SLAY_2 = -1603042,
- SAY_BRUNDIR_SPECIAL = -1603043,
- SAY_BRUNDIR_FLIGHT = -1603044,
- SAY_BRUNDIR_DEATH_1 = -1603045,
- SAY_BRUNDIR_DEATH_2 = -1603046,
- SAY_BRUNDIR_BERSERK = -1603047,
+ SAY_STEELBREAKER_AGGRO = 0,
+ SAY_STEELBREAKER_SLAY = 1,
+ SAY_STEELBREAKER_POWER = 2,
+ SAY_STEELBREAKER_DEATH = 3,
+ SAY_STEELBREAKER_ENCOUNTER_DEFEATED = 4,
+ SAY_STEELBREAKER_BERSERK = 5,
+
+ SAY_MOLGEIM_AGGRO = 0,
+ SAY_MOLGEIM_SLAY = 1,
+ SAY_MOLGEIM_RUNE_DEATH = 2,
+ SAY_MOLGEIM_SUMMON = 3,
+ SAY_MOLGEIM_DEATH = 4,
+ SAY_MOLGEIM_ENCOUNTER_DEFEATED = 5,
+ SAY_MOLGEIM_BERSERK = 6,
+
+ SAY_BRUNDIR_AGGRO = 0,
+ SAY_BRUNDIR_SLAY = 1,
+ SAY_BRUNDIR_SPECIAL = 2,
+ SAY_BRUNDIR_FLIGHT = 3,
+ SAY_BRUNDIR_DEATH = 4,
+ SAY_BRUNDIR_ENCOUNTER_DEFEATED = 5,
+ SAY_BRUNDIR_BERSERK = 6,
+ EMOTE_BRUNDIR_OVERLOAD = 7
};
enum AssemblyNPCs
{
- NPC_WORLD_TRIGGER = 22515,
+ NPC_WORLD_TRIGGER = 22515
};
-#define EMOTE_OVERLOAD "Stormcaller Brundir begins to Overload!" // Move it to DB
#define FLOOR_Z 427.28f
#define FINAL_FLIGHT_Z 435.0f
-bool IsEncounterComplete(InstanceScript* instance, Creature* me)
-{
- if (!instance || !me)
- return false;
-
- for (uint8 i = 0; i < 3; ++i)
- {
- uint64 guid = instance->GetData64(BOSS_STEELBREAKER + i);
- if (!guid)
- return false;
-
- if (Creature* boss = ObjectAccessor::GetCreature(*me, guid))
- {
- if (boss->isAlive())
- return false;
- }
- else
- return false;
- }
-
- return true;
-}
-
-void RespawnEncounter(InstanceScript* instance, Creature* me)
-{
- for (uint8 i = 0; i < 3; ++i)
- {
- uint64 guid = instance->GetData64(BOSS_STEELBREAKER + i);
- if (!guid)
- continue;
-
- if (Creature* boss = ObjectAccessor::GetCreature(*me, guid))
- {
- if (!boss->isAlive())
- {
- boss->Respawn();
- boss->GetMotionMaster()->MoveTargetedHome();
- }
- }
- }
-}
-
-void StartEncounter(InstanceScript* instance, Creature* me, Unit* /*target*/)
-{
- if (instance->GetBossState(BOSS_ASSEMBLY_OF_IRON) == IN_PROGRESS)
- return; // Prevent recursive calls
-
- instance->SetBossState(BOSS_ASSEMBLY_OF_IRON, IN_PROGRESS);
-
- for (uint8 i = 0; i < 3; ++i)
- {
- uint64 guid = instance->GetData64(BOSS_STEELBREAKER + i);
- if (!guid)
- continue;
-
- if (Creature* boss = ObjectAccessor::GetCreature(*me, guid))
- boss->SetInCombatWithZone();
- }
-}
-
class boss_steelbreaker : public CreatureScript
{
public:
@@ -204,12 +137,8 @@ class boss_steelbreaker : public CreatureScript
struct boss_steelbreakerAI : public BossAI
{
- boss_steelbreakerAI(Creature* creature) : BossAI(creature, BOSS_ASSEMBLY_OF_IRON)
- {
- instance = me->GetInstanceScript();
- }
+ boss_steelbreakerAI(Creature* creature) : BossAI(creature, BOSS_ASSEMBLY_OF_IRON) { }
- InstanceScript* instance;
uint32 phase;
void Reset()
@@ -217,14 +146,12 @@ class boss_steelbreaker : public CreatureScript
_Reset();
phase = 0;
me->RemoveAllAuras();
- RespawnEncounter(instance, me);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* /*who*/)
{
- StartEncounter(instance, me, who);
- DoScriptText(SAY_STEELBREAKER_AGGRO, me);
- DoZoneInCombat();
+ _EnterCombat();
+ Talk(SAY_STEELBREAKER_AGGRO);
DoCast(me, SPELL_HIGH_VOLTAGE);
events.SetPhase(++phase);
events.ScheduleEvent(EVENT_BERSERK, 900000);
@@ -235,8 +162,8 @@ class boss_steelbreaker : public CreatureScript
{
switch (action)
{
- case ACTION_STEELBREAKER:
- me->SetHealth(me->GetMaxHealth());
+ case ACTION_SUPERCHARGE:
+ me->SetFullHealth();
me->AddAura(SPELL_SUPERCHARGE, me);
events.SetPhase(++phase);
events.RescheduleEvent(EVENT_FUSION_PUNCH, 15000);
@@ -253,29 +180,33 @@ class boss_steelbreaker : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- DoScriptText(RAND(SAY_STEELBREAKER_DEATH_1, SAY_STEELBREAKER_DEATH_2), me);
- if (IsEncounterComplete(instance, me))
+ _JustDied();
+
+ if (instance->GetBossState(BOSS_ASSEMBLY_OF_IRON) == DONE)
{
- instance->SetBossState(BOSS_ASSEMBLY_OF_IRON, DONE);
- instance->SetBossState(BOSS_STEELBREAKER, DONE);
- instance->SetBossState(BOSS_MOLGEIM, DONE);
- instance->SetBossState(BOSS_BRUNDIR, DONE);
+ DoCastAOE(SPELL_KILL_CREDIT);
+ Talk(SAY_STEELBREAKER_ENCOUNTER_DEFEATED);
}
else
+ {
me->SetLootRecipient(NULL);
+ Talk(SAY_STEELBREAKER_DEATH);
+ //DoCastAOE(SPELL_SUPERCHARGE, true);
- if (Creature* Brundir = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_BRUNDIR)))
- if (Brundir->isAlive())
- Brundir->AI()->DoAction(ACTION_BRUNDIR);
+ if (Creature* Brundir = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_BRUNDIR)))
+ if (Brundir->isAlive())
+ Brundir->AI()->DoAction(ACTION_SUPERCHARGE);
- if (Creature* Molgeim = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_MOLGEIM)))
- if (Molgeim->isAlive())
- Molgeim->AI()->DoAction(ACTION_MOLGEIM);
+ if (Creature* Molgeim = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MOLGEIM)))
+ if (Molgeim->isAlive())
+ Molgeim->AI()->DoAction(ACTION_SUPERCHARGE);
+ }
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_STEELBREAKER_SLAY_1, SAY_STEELBREAKER_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_STEELBREAKER_SLAY);
if (phase == 3)
DoCast(me, SPELL_ELECTRICAL_CHARGE);
@@ -296,7 +227,7 @@ class boss_steelbreaker : public CreatureScript
switch (eventId)
{
case EVENT_BERSERK:
- DoScriptText(SAY_STEELBREAKER_BERSERK, me);
+ Talk(SAY_STEELBREAKER_BERSERK);
DoCast(SPELL_BERSERK);
events.CancelEvent(EVENT_BERSERK);
break;
@@ -311,7 +242,7 @@ class boss_steelbreaker : public CreatureScript
events.ScheduleEvent(EVENT_STATIC_DISRUPTION, urand(20000, 40000));
break;
case EVENT_OVERWHELMING_POWER:
- DoScriptText(SAY_STEELBREAKER_POWER, me);
+ Talk(SAY_STEELBREAKER_POWER);
DoCastVictim(SPELL_OVERWHELMING_POWER);
events.ScheduleEvent(EVENT_OVERWHELMING_POWER, RAID_MODE(60000, 35000));
break;
@@ -335,12 +266,8 @@ class boss_runemaster_molgeim : public CreatureScript
struct boss_runemaster_molgeimAI : public BossAI
{
- boss_runemaster_molgeimAI(Creature* creature) : BossAI(creature, BOSS_ASSEMBLY_OF_IRON)
- {
- instance = me->GetInstanceScript();
- }
+ boss_runemaster_molgeimAI(Creature* creature) : BossAI(creature, BOSS_ASSEMBLY_OF_IRON) { }
- InstanceScript* instance;
uint32 phase;
void Reset()
@@ -348,14 +275,12 @@ class boss_runemaster_molgeim : public CreatureScript
_Reset();
phase = 0;
me->RemoveAllAuras();
- RespawnEncounter(instance, me);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* /*who*/)
{
- StartEncounter(instance, me, who);
- DoScriptText(SAY_MOLGEIM_AGGRO, me);
- DoZoneInCombat();
+ _EnterCombat();
+ Talk(SAY_MOLGEIM_AGGRO);
events.SetPhase(++phase);
events.ScheduleEvent(EVENT_BERSERK, 900000);
events.ScheduleEvent(EVENT_SHIELD_OF_RUNES, 30000);
@@ -366,8 +291,9 @@ class boss_runemaster_molgeim : public CreatureScript
{
switch (action)
{
- case ACTION_MOLGEIM:
- me->SetHealth(me->GetMaxHealth());
+ case ACTION_SUPERCHARGE:
+ {
+ me->SetFullHealth();
me->AddAura(SPELL_SUPERCHARGE, me);
events.SetPhase(++phase);
events.RescheduleEvent(EVENT_SHIELD_OF_RUNES, 27000);
@@ -376,35 +302,40 @@ class boss_runemaster_molgeim : public CreatureScript
events.RescheduleEvent(EVENT_RUNE_OF_DEATH, 30000);
if (phase >= 3)
events.RescheduleEvent(EVENT_RUNE_OF_SUMMONING, urand(20000, 30000));
- break;
+ break;
+ }
}
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(RAND(SAY_MOLGEIM_DEATH_1, SAY_MOLGEIM_DEATH_2), me);
- if (IsEncounterComplete(instance, me))
+ _JustDied();
+
+ if (instance->GetBossState(BOSS_ASSEMBLY_OF_IRON) == DONE)
{
- instance->SetBossState(BOSS_ASSEMBLY_OF_IRON, DONE);
- instance->SetBossState(BOSS_STEELBREAKER, DONE);
- instance->SetBossState(BOSS_MOLGEIM, DONE);
- instance->SetBossState(BOSS_BRUNDIR, DONE);
+ DoCastAOE(SPELL_KILL_CREDIT);
+ Talk(SAY_MOLGEIM_ENCOUNTER_DEFEATED);
}
else
+ {
me->SetLootRecipient(NULL);
+ Talk(SAY_MOLGEIM_DEATH);
+ //DoCastAOE(SPELL_SUPERCHARGE, true);
- if (Creature* Brundir = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_BRUNDIR)))
- if (Brundir->isAlive())
- Brundir->AI()->DoAction(ACTION_BRUNDIR);
+ if (Creature* Brundir = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_BRUNDIR)))
+ if (Brundir->isAlive())
+ Brundir->AI()->DoAction(ACTION_SUPERCHARGE);
- if (Creature* Steelbreaker = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_STEELBREAKER)))
- if (Steelbreaker->isAlive())
- Steelbreaker->AI()->DoAction(ACTION_STEELBREAKER);
+ if (Creature* Steelbreaker = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_STEELBREAKER)))
+ if (Steelbreaker->isAlive())
+ Steelbreaker->AI()->DoAction(ACTION_SUPERCHARGE);
+ }
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_MOLGEIM_SLAY_1, SAY_MOLGEIM_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_MOLGEIM_SLAY);
}
void UpdateAI(uint32 const diff)
@@ -422,28 +353,27 @@ class boss_runemaster_molgeim : public CreatureScript
switch (eventId)
{
case EVENT_BERSERK:
- DoScriptText(SAY_MOLGEIM_BERSERK, me);
+ Talk(SAY_MOLGEIM_BERSERK);
DoCast(SPELL_BERSERK);
events.CancelEvent(EVENT_BERSERK);
break;
case EVENT_RUNE_OF_POWER:
{
- Unit* target = NULL;
+ Unit* target = me;
switch (urand(0, 2))
{
- case 0:
- target = me;
- break;
case 1:
- if (Creature* Steelbreaker = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_STEELBREAKER)))
+ if (Creature* Steelbreaker = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_STEELBREAKER)))
if (Steelbreaker->isAlive())
target = Steelbreaker;
break;
case 2:
- if (Creature* Brundir = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_STEELBREAKER)))
+ if (Creature* Brundir = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_STEELBREAKER)))
if (Brundir->isAlive())
target = Brundir;
break;
+ default:
+ break;
}
DoCast(target, SPELL_SUMMON_RUNE_OF_POWER);
events.ScheduleEvent(EVENT_RUNE_OF_POWER, 60000);
@@ -454,13 +384,13 @@ class boss_runemaster_molgeim : public CreatureScript
events.ScheduleEvent(EVENT_SHIELD_OF_RUNES, urand(27000, 34000));
break;
case EVENT_RUNE_OF_DEATH:
- DoScriptText(SAY_MOLGEIM_RUNE_DEATH, me);
+ Talk(SAY_MOLGEIM_RUNE_DEATH);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_RUNE_OF_DEATH);
events.ScheduleEvent(EVENT_RUNE_OF_DEATH, urand(30000, 40000));
break;
case EVENT_RUNE_OF_SUMMONING:
- DoScriptText(SAY_MOLGEIM_SUMMON, me);
+ Talk(SAY_MOLGEIM_SUMMON);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_RUNE_OF_SUMMONING);
events.ScheduleEvent(EVENT_RUNE_OF_SUMMONING, urand(30000, 45000));
@@ -478,93 +408,6 @@ class boss_runemaster_molgeim : public CreatureScript
}
};
-class mob_rune_of_power : public CreatureScript
-{
- public:
- mob_rune_of_power() : CreatureScript("mob_rune_of_power") { }
-
- struct mob_rune_of_powerAI : public ScriptedAI
- {
- mob_rune_of_powerAI(Creature* creature) : ScriptedAI(creature)
- {
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->setFaction(16); // Same faction as bosses
- DoCast(SPELL_RUNE_OF_POWER);
-
- me->DespawnOrUnsummon(60000);
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_rune_of_powerAI(creature);
- }
-};
-
-class mob_lightning_elemental : public CreatureScript
-{
- public:
- mob_lightning_elemental() : CreatureScript("mob_lightning_elemental") { }
-
- struct mob_lightning_elementalAI : public ScriptedAI
- {
- mob_lightning_elementalAI(Creature* creature) : ScriptedAI(creature)
- {
- me->SetInCombatWithZone();
- me->AddAura(SPELL_LIGHTNING_ELEMENTAL_PASSIVE, me);
- }
-
- // Nothing to do here, just let the creature chase players and procflags == 2 on the applied aura will trigger explosion
- };
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_lightning_elementalAI(creature);
- }
-};
-
-class mob_rune_of_summoning : public CreatureScript
-{
- public:
- mob_rune_of_summoning() : CreatureScript("mob_rune_of_summoning") { }
-
- struct mob_rune_of_summoningAI : public ScriptedAI
- {
- mob_rune_of_summoningAI(Creature* creature) : ScriptedAI(creature)
- {
- me->AddAura(SPELL_RUNE_OF_SUMMONING_VIS, me);
- summonCount = 0;
- summonTimer = 2000;
- }
-
- uint32 summonCount;
- uint32 summonTimer;
-
- void UpdateAI(uint32 const diff)
- {
- if (summonTimer <= diff)
- SummonLightningElemental();
- else
- summonTimer -= diff;
- }
-
- void SummonLightningElemental()
- {
- me->CastSpell(me, SPELL_RUNE_OF_SUMMONING_SUMMON, false);
- if (++summonCount == 10) // TODO: Find out if this amount is right
- me->DespawnOrUnsummon();
- else
- summonTimer = 2000; // TODO: Find out of timer is right
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_rune_of_summoningAI(creature);
- }
-};
-
class boss_stormcaller_brundir : public CreatureScript
{
public:
@@ -572,12 +415,8 @@ class boss_stormcaller_brundir : public CreatureScript
struct boss_stormcaller_brundirAI : public BossAI
{
- boss_stormcaller_brundirAI(Creature* creature) : BossAI(creature, BOSS_ASSEMBLY_OF_IRON)
- {
- instance = me->GetInstanceScript();
- }
+ boss_stormcaller_brundirAI(Creature* creature) : BossAI(creature, BOSS_ASSEMBLY_OF_IRON) { }
- InstanceScript* instance;
uint32 phase;
void Reset()
@@ -587,15 +426,13 @@ class boss_stormcaller_brundir : public CreatureScript
me->RemoveAllAuras();
me->SetDisableGravity(false);
me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_INTERRUPT, false); // Should be interruptable unless overridden by spell (Overload)
- me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, false); // Reset immumity, Brundir should be stunnable by default
- RespawnEncounter(instance, me);
+ me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, false); // Reset immumity, Brundir should be stunnable by default
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* /*who*/)
{
- StartEncounter(instance, me, who);
- DoScriptText(SAY_BRUNDIR_AGGRO, me);
- DoZoneInCombat();
+ _EnterCombat();
+ Talk(SAY_BRUNDIR_AGGRO);
events.SetPhase(++phase);
events.ScheduleEvent(EVENT_MOVE_POSITION, 1000);
events.ScheduleEvent(EVENT_BERSERK, 900000);
@@ -607,8 +444,9 @@ class boss_stormcaller_brundir : public CreatureScript
{
switch (action)
{
- case ACTION_BRUNDIR:
- me->SetHealth(me->GetMaxHealth());
+ case ACTION_SUPERCHARGE:
+ {
+ me->SetFullHealth();
me->AddAura(SPELL_SUPERCHARGE, me);
events.SetPhase(++phase);
events.RescheduleEvent(EVENT_CHAIN_LIGHTNING, urand(7000, 12000));
@@ -619,42 +457,46 @@ class boss_stormcaller_brundir : public CreatureScript
{
DoCast(me, SPELL_STORMSHIELD);
events.RescheduleEvent(EVENT_LIGHTNING_TENDRILS, urand(50000, 60000));
- me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); // Apply immumity to stuns
+ me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); // Apply immumity to stuns
}
- break;
-
+ break;
+ }
}
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(RAND(SAY_BRUNDIR_DEATH_1, SAY_BRUNDIR_DEATH_2), me);
- if (IsEncounterComplete(instance, me))
+ _JustDied();
+
+ if (instance->GetBossState(BOSS_ASSEMBLY_OF_IRON) == DONE)
{
- instance->SetBossState(BOSS_ASSEMBLY_OF_IRON, DONE);
- instance->SetBossState(BOSS_STEELBREAKER, DONE);
- instance->SetBossState(BOSS_MOLGEIM, DONE);
- instance->SetBossState(BOSS_BRUNDIR, DONE);
+ DoCastAOE(SPELL_KILL_CREDIT);
+ Talk(SAY_BRUNDIR_ENCOUNTER_DEFEATED);
}
else
+ {
me->SetLootRecipient(NULL);
+ Talk(SAY_BRUNDIR_DEATH);
+ //DoCastAOE(SPELL_SUPERCHARGE, true);
- if (Creature* Molgeim = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_MOLGEIM)))
- if (Molgeim->isAlive())
- Molgeim->AI()->DoAction(ACTION_MOLGEIM);
+ if (Creature* Molgeim = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MOLGEIM)))
+ if (Molgeim->isAlive())
+ Molgeim->AI()->DoAction(ACTION_SUPERCHARGE);
- if (Creature* Steelbreaker = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_STEELBREAKER)))
- if (Steelbreaker->isAlive())
- Steelbreaker->AI()->DoAction(ACTION_STEELBREAKER);
+ if (Creature* Steelbreaker = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_STEELBREAKER)))
+ if (Steelbreaker->isAlive())
+ Steelbreaker->AI()->DoAction(ACTION_SUPERCHARGE);
+ }
// Prevent to have Brundir somewhere in the air when he die in Air phase
if (me->GetPositionZ() > FLOOR_Z)
me->GetMotionMaster()->MoveFall();
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_BRUNDIR_SLAY_1, SAY_BRUNDIR_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_BRUNDIR_SLAY);
}
void UpdateAI(uint32 const diff)
@@ -672,7 +514,7 @@ class boss_stormcaller_brundir : public CreatureScript
switch (eventId)
{
case EVENT_BERSERK:
- DoScriptText(SAY_BRUNDIR_BERSERK, me);
+ Talk(SAY_BRUNDIR_BERSERK);
DoCast(SPELL_BERSERK);
events.CancelEvent(EVENT_BERSERK);
break;
@@ -682,8 +524,8 @@ class boss_stormcaller_brundir : public CreatureScript
events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, urand(7000, 10000));
break;
case EVENT_OVERLOAD:
- me->MonsterTextEmote(EMOTE_OVERLOAD, 0, true);
- DoScriptText(SAY_BRUNDIR_SPECIAL, me);
+ Talk(EMOTE_BRUNDIR_OVERLOAD);
+ Talk(SAY_BRUNDIR_SPECIAL);
DoCast(SPELL_OVERLOAD);
events.ScheduleEvent(EVENT_OVERLOAD, urand(60000, 120000));
break;
@@ -692,7 +534,7 @@ class boss_stormcaller_brundir : public CreatureScript
events.ScheduleEvent(EVENT_LIGHTNING_WHIRL, urand(15000, 20000));
break;
case EVENT_LIGHTNING_TENDRILS:
- DoScriptText(SAY_BRUNDIR_FLIGHT, me);
+ Talk(SAY_BRUNDIR_FLIGHT);
DoCast(RAID_MODE(SPELL_LIGHTNING_TENDRILS_10M, SPELL_LIGHTNING_TENDRILS_25M));
DoCast(SPELL_LIGHTNING_TENDRILS_VISUAL);
me->AttackStop();
@@ -798,7 +640,7 @@ class spell_assembly_meltdown : public SpellScriptLoader
void HandleInstaKill(SpellEffIndex /*effIndex*/)
{
if (InstanceScript* instance = GetCaster()->GetInstanceScript())
- if (Creature* Steelbreaker = ObjectAccessor::GetCreature(*GetCaster(), instance->GetData64(BOSS_STEELBREAKER)))
+ if (Creature* Steelbreaker = ObjectAccessor::GetCreature(*GetCaster(), instance->GetData64(DATA_STEELBREAKER)))
Steelbreaker->AI()->DoAction(ACTION_ADD_CHARGE);
}
@@ -814,14 +656,53 @@ class spell_assembly_meltdown : public SpellScriptLoader
}
};
+class spell_assembly_rune_of_summoning : public SpellScriptLoader
+{
+ public:
+ spell_assembly_rune_of_summoning() : SpellScriptLoader("spell_assembly_rune_of_summoning") { }
+
+ class spell_assembly_rune_of_summoning_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_assembly_rune_of_summoning_AuraScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_RUNE_OF_SUMMONING_SUMMON))
+ return false;
+ return true;
+ }
+
+ void HandlePeriodic(AuraEffect const* aurEff)
+ {
+ PreventDefaultAction();
+ GetTarget()->CastSpell(GetTarget(), SPELL_RUNE_OF_SUMMONING_SUMMON, true, NULL, aurEff, GetTarget()->isSummon() ? GetTarget()->ToTempSummon()->GetSummonerGUID() : 0);
+ }
+
+ void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (TempSummon* summ = GetTarget()->ToTempSummon())
+ summ->DespawnOrUnsummon(1);
+ }
+
+ void Register()
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_assembly_rune_of_summoning_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
+ OnEffectRemove += AuraEffectRemoveFn(spell_assembly_rune_of_summoning_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_assembly_rune_of_summoning_AuraScript();
+ }
+};
+
void AddSC_boss_assembly_of_iron()
{
new boss_steelbreaker();
new boss_runemaster_molgeim();
new boss_stormcaller_brundir();
- new mob_lightning_elemental();
- new mob_rune_of_summoning();
- new mob_rune_of_power();
new spell_shield_of_runes();
new spell_assembly_meltdown();
+ new spell_assembly_rune_of_summoning();
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp
index bfe158051b1..bd063877d39 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp
@@ -76,16 +76,12 @@ enum AuriayaEvents
enum AuriayaYells
{
- // Yells
- SAY_AGGRO = -1603050,
- SAY_SLAY_1 = -1603051,
- SAY_SLAY_2 = -1603052,
- SAY_DEATH = -1603053,
- SAY_BERSERK = -1603054,
-
- // Emotes
- EMOTE_FEAR = -1603055,
- EMOTE_DEFENDER = -1603056,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_BERSERK = 3,
+ EMOTE_FEAR = 4,
+ EMOTE_DEFENDER = 5
};
enum AuriayaActions
@@ -121,7 +117,7 @@ class boss_auriaya : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_SCREECH, urand(45000, 65000));
events.ScheduleEvent(EVENT_BLAST, urand(20000, 25000));
@@ -131,9 +127,10 @@ class boss_auriaya : public CreatureScript
events.ScheduleEvent(EVENT_BERSERK, 600000);
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_SLAY);
}
void JustSummoned(Creature* summoned)
@@ -206,8 +203,8 @@ class boss_auriaya : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
_JustDied();
+ Talk(SAY_DEATH);
}
void UpdateAI(uint32 const diff)
@@ -229,7 +226,7 @@ class boss_auriaya : public CreatureScript
events.ScheduleEvent(EVENT_SCREECH, urand(40000, 60000));
break;
case EVENT_TERRIFYING:
- DoScriptText(EMOTE_FEAR, me);
+ Talk(EMOTE_FEAR);
DoCast(SPELL_TERRIFYING_SCREECH);
events.ScheduleEvent(EVENT_TERRIFYING, urand(20000, 30000));
break;
@@ -238,7 +235,7 @@ class boss_auriaya : public CreatureScript
events.ScheduleEvent(EVENT_BLAST, urand(25000, 35000));
break;
case EVENT_DEFENDER:
- DoScriptText(EMOTE_DEFENDER, me);
+ Talk(EMOTE_DEFENDER);
DoCast(SPELL_DEFENDER_TRIGGER);
if (Creature* trigger = me->FindNearestCreature(NPC_FERAL_DEFENDER_TRIGGER, 15.0f, true))
DoCast(trigger, SPELL_ACTIVATE_DEFENDER, true);
@@ -262,7 +259,7 @@ class boss_auriaya : public CreatureScript
break;
case EVENT_BERSERK:
DoCast(me, SPELL_BERSERK, true);
- DoScriptText(SAY_BERSERK, me);
+ Talk(SAY_BERSERK);
events.CancelEvent(EVENT_BERSERK);
break;
}
@@ -296,17 +293,17 @@ class npc_auriaya_seeping_trigger : public CreatureScript
instance = me->GetInstanceScript();
}
- void Reset()
- {
- me->DespawnOrUnsummon(600000);
- DoCast(me, SPELL_SEEPING_ESSENCE);
- }
+ void Reset()
+ {
+ me->DespawnOrUnsummon(600000);
+ DoCast(me, SPELL_SEEPING_ESSENCE);
+ }
- void UpdateAI(uint32 const /*diff*/)
- {
- if (instance->GetBossState(BOSS_AURIAYA) != IN_PROGRESS)
- me->DespawnOrUnsummon();
- }
+ void UpdateAI(uint32 const /*diff*/)
+ {
+ if (instance->GetBossState(BOSS_AURIAYA) != IN_PROGRESS)
+ me->DespawnOrUnsummon();
+ }
private:
InstanceScript* instance;
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
index a26f5763472..921d67d6d65 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
@@ -141,9 +141,6 @@ enum Vehicles
VEHICLE_DEMOLISHER = 33109,
};
-#define EMOTE_PURSUE "Flame Leviathan pursues $N."
-#define EMOTE_OVERLOAD "Flame Leviathan's circuits overloaded."
-#define EMOTE_REPAIR "Automatic repair sequence initiated."
#define DATA_SHUTOUT 29112912 // 2911, 2912 are achievement IDs
#define DATA_ORBIT_ACHIEVEMENTS 1
#define VEHICLE_SPAWNS 5
@@ -151,22 +148,21 @@ enum Vehicles
enum Yells
{
- SAY_AGGRO = -1603060,
- SAY_SLAY = -1603061,
- SAY_DEATH = -1603062,
- SAY_TARGET_1 = -1603063,
- SAY_TARGET_2 = -1603064,
- SAY_TARGET_3 = -1603065,
- SAY_HARDMODE = -1603066,
- SAY_TOWER_NONE = -1603067,
- SAY_TOWER_FROST = -1603068,
- SAY_TOWER_FLAME = -1603069,
- SAY_TOWER_NATURE = -1603070,
- SAY_TOWER_STORM = -1603071,
- SAY_PLAYER_RIDING = -1603072,
- SAY_OVERLOAD_1 = -1603073,
- SAY_OVERLOAD_2 = -1603074,
- SAY_OVERLOAD_3 = -1603075,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_TARGET = 3,
+ SAY_HARDMODE = 4,
+ SAY_TOWER_NONE = 5,
+ SAY_TOWER_FROST = 6,
+ SAY_TOWER_FLAME = 7,
+ SAY_TOWER_NATURE = 8,
+ SAY_TOWER_STORM = 9,
+ SAY_PLAYER_RIDING = 10,
+ SAY_OVERLOAD = 11,
+ EMOTE_PURSUE = 12,
+ EMOTE_OVERLOAD = 13,
+ EMOTE_REPAIR = 14
};
enum MiscellanousData
@@ -179,15 +175,8 @@ enum MiscellanousData
FOUR_SEATS = 4,
};
-Position const Center[]=
-{
- {354.8771f, -12.90240f, 409.803650f, 0.0f},
-};
-
-Position const InfernoStart[]=
-{
- {390.93f, -13.91f, 409.81f, 0.0f},
-};
+Position const Center = { 354.8771f, -12.90240f, 409.803650f, 0.0f };
+Position const InfernoStart = { 390.93f, -13.91f, 409.81f, 0.0f };
Position const PosSiege[VEHICLE_SPAWNS] =
{
@@ -320,12 +309,12 @@ class boss_flame_leviathan : public CreatureScript
}
if (!towerOfLife && !towerOfFrost && !towerOfFlames && !towerOfStorms)
- DoScriptText(SAY_TOWER_NONE, me);
+ Talk(SAY_TOWER_NONE);
else
- DoScriptText(SAY_HARDMODE, me);
+ Talk(SAY_HARDMODE);
}
else
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void JustDied(Unit* /*killer*/)
@@ -334,7 +323,7 @@ class boss_flame_leviathan : public CreatureScript
// Set Field Flags 67108928 = 64 | 67108864 = UNIT_FLAG_UNK_6 | UNIT_FLAG_SKINNABLE
// Set DynFlags 12
// Set NPCFlags 0
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void SpellHit(Unit* /*caster*/, SpellInfo const* spell)
@@ -397,7 +386,7 @@ class boss_flame_leviathan : public CreatureScript
switch (eventId)
{
case EVENT_PURSUE:
- DoScriptText(RAND(SAY_TARGET_1, SAY_TARGET_2, SAY_TARGET_3), me);
+ Talk(SAY_TARGET);
DoCast(SPELL_PURSUED); // Will select target in spellscript
events.ScheduleEvent(EVENT_PURSUE, 35*IN_MILLISECONDS);
break;
@@ -420,8 +409,8 @@ class boss_flame_leviathan : public CreatureScript
events.ScheduleEvent(EVENT_SUMMON, 2*IN_MILLISECONDS);
break;
case EVENT_SHUTDOWN:
- DoScriptText(RAND(SAY_OVERLOAD_1, SAY_OVERLOAD_2, SAY_OVERLOAD_3), me);
- me->MonsterTextEmote(EMOTE_OVERLOAD, 0, true);
+ Talk(SAY_OVERLOAD);
+ Talk(EMOTE_OVERLOAD);
me->CastSpell(me, SPELL_SYSTEMS_SHUTDOWN, true);
if (Shutout)
Shutout = false;
@@ -429,7 +418,7 @@ class boss_flame_leviathan : public CreatureScript
events.DelayEvents(20 * IN_MILLISECONDS, 0);
break;
case EVENT_REPAIR:
- me->MonsterTextEmote(EMOTE_REPAIR, 0, true);
+ Talk(EMOTE_REPAIR);
me->ClearUnitState(UNIT_STATE_STUNNED | UNIT_STATE_ROOT);
events.ScheduleEvent(EVENT_SHUTDOWN, 150*IN_MILLISECONDS);
events.CancelEvent(EVENT_REPAIR);
@@ -440,12 +429,12 @@ class boss_flame_leviathan : public CreatureScript
if (Creature* thorim = DoSummon(NPC_THORIM_BEACON, me, float(urand(20, 60)), 20000, TEMPSUMMON_TIMED_DESPAWN))
thorim->GetMotionMaster()->MoveRandom(100);
}
- DoScriptText(SAY_TOWER_STORM, me);
+ Talk(SAY_TOWER_STORM);
events.CancelEvent(EVENT_THORIM_S_HAMMER);
break;
case EVENT_MIMIRON_S_INFERNO: // Tower of Flames
- me->SummonCreature(NPC_MIMIRON_BEACON, InfernoStart->GetPositionX(), InfernoStart->GetPositionY(), InfernoStart->GetPositionZ());
- DoScriptText(SAY_TOWER_FLAME, me);
+ me->SummonCreature(NPC_MIMIRON_BEACON, InfernoStart);
+ Talk(SAY_TOWER_FLAME);
events.CancelEvent(EVENT_MIMIRON_S_INFERNO);
break;
case EVENT_HODIR_S_FURY: // Tower of Frost
@@ -454,11 +443,11 @@ class boss_flame_leviathan : public CreatureScript
if (Creature* hodir = DoSummon(NPC_HODIR_BEACON, me, 50, 0))
hodir->GetMotionMaster()->MoveRandom(100);
}
- DoScriptText(SAY_TOWER_FROST, me);
+ Talk(SAY_TOWER_FROST);
events.CancelEvent(EVENT_HODIR_S_FURY);
break;
case EVENT_FREYA_S_WARD: // Tower of Nature
- DoScriptText(SAY_TOWER_NATURE, me);
+ Talk(SAY_TOWER_NATURE);
for (int32 i = 0; i < 4; ++i)
me->SummonCreature(NPC_FREYA_BEACON, FreyaBeacons[i]);
@@ -529,8 +518,8 @@ class boss_flame_leviathan : public CreatureScript
case ACTION_MOVE_TO_CENTER_POSITION: // Triggered by 2 Collossus near door
if (!me->isDead())
{
- me->SetHomePosition(Center->GetPositionX(), Center->GetPositionY(), Center->GetPositionZ(), 0);
- me->GetMotionMaster()->MoveCharge(Center->GetPositionX(), Center->GetPositionY(), Center->GetPositionZ()); //position center
+ me->SetHomePosition(Center);
+ me->GetMotionMaster()->MoveCharge(Center.GetPositionX(), Center.GetPositionY(), Center.GetPositionZ()); // position center
me->SetReactState(REACT_AGGRESSIVE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED);
return;
@@ -593,8 +582,8 @@ class boss_flame_leviathan_seat : public CreatureScript
{
if (!apply)
return;
- else
- DoScriptText(SAY_PLAYER_RIDING, me);
+ else if (Creature* leviathan = me->GetVehicleCreatureBase())
+ leviathan->AI()->Talk(SAY_PLAYER_RIDING);
if (Creature* turret = me->GetVehicleKit()->GetPassenger(SEAT_TURRET)->ToCreature())
{
@@ -887,7 +876,7 @@ class npc_colossus : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- if (me->GetHomePosition().IsInDist(Center, 50.f))
+ if (me->GetHomePosition().IsInDist(&Center, 50.f))
instance->SetData(DATA_COLOSSUS, instance->GetData(DATA_COLOSSUS)+1);
}
@@ -1187,7 +1176,7 @@ class npc_lorekeeper : public CreatureScript
if (Creature* Branz = creature->FindNearestCreature(NPC_BRANZ_BRONZBEARD, 1000, true))
{
Delorah->GetMotionMaster()->MovePoint(0, Branz->GetPositionX()-4, Branz->GetPositionY(), Branz->GetPositionZ());
- //TODO DoScriptText(xxxx, Delorah, Branz); when reached at branz
+ //TODO Delorah->AI()->Talk(xxxx, Branz->GetGUID()); when reached at branz
}
}
}
@@ -1700,7 +1689,7 @@ class spell_pursue : public SpellScriptLoader
{
if (IS_PLAYER_GUID(itr->second.Passenger))
{
- caster->MonsterTextEmote(EMOTE_PURSUE, itr->second.Passenger, true);
+ caster->AI()->Talk(EMOTE_PURSUE, itr->second.Passenger);
return;
}
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
index f60922c426c..b894706e0bf 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
@@ -27,34 +27,23 @@
enum FreyaYells
{
// Freya
- SAY_AGGRO = -1603180,
- SAY_AGGRO_WITH_ELDER = -1603181,
- SAY_SLAY_1 = -1603182,
- SAY_SLAY_2 = -1603183,
- SAY_DEATH = -1603184,
- SAY_BERSERK = -1603185,
- SAY_SUMMON_CONSERVATOR = -1603186,
- SAY_SUMMON_TRIO = -1603187,
- SAY_SUMMON_LASHERS = -1603188,
- SAY_YS_HELP = -1603189,
-
- // Elder Brightleaf
- SAY_BRIGHTLEAF_AGGRO = -1603190,
- SAY_BRIGHTLEAF_SLAY_1 = -1603191,
- SAY_BRIGHTLEAF_SLAY_2 = -1603192,
- SAY_BRIGHTLEAF_DEATH = -1603193,
-
- // Elder Ironbranch
- SAY_IRONBRANCH_AGGRO = -1603194,
- SAY_IRONBRANCH_SLAY_1 = -1603195,
- SAY_IRONBRANCH_SLAY_2 = -1603196,
- SAY_IRONBRANCH_DEATH = -1603197,
-
- // Elder Stonebark
- SAY_STONEBARK_AGGRO = -1603198,
- SAY_STONEBARK_SLAY_1 = -1603199,
- SAY_STONEBARK_SLAY_2 = -1603200,
- SAY_STONEBARK_DEATH = -1603201,
+ SAY_AGGRO = 0,
+ SAY_AGGRO_WITH_ELDER = 1,
+ SAY_SLAY = 2,
+ SAY_DEATH = 3,
+ SAY_BERSERK = 4,
+ SAY_SUMMON_CONSERVATOR = 5,
+ SAY_SUMMON_TRIO = 6,
+ SAY_SUMMON_LASHERS = 7,
+ EMOTE_LIFEBINDERS_GIFT = 8,
+ EMOTE_ALLIES_OF_NATURE = 9,
+ EMOTE_GROUND_TREMOR = 10,
+ EMOTE_IRON_ROOTS = 11,
+
+ // Elder Brightleaf / Elder Ironbranch / Elder Stonebark
+ SAY_ELDER_AGGRO = 0,
+ SAY_ELDER_SLAY = 1,
+ SAY_ELDER_DEATH = 2
};
enum FreyaSpells
@@ -143,7 +132,7 @@ enum FreyaSpells
// Nature Bomb
SPELL_NATURE_BOMB = 64587,
SPELL_OBJECT_BOMB = 64600,
- SPELL_SUMMON_NATURE_BOMB = 64606,
+ SPELL_SUMMON_NATURE_BOMB = 64604,
// Unstable Sun Beam
SPELL_UNSTABLE_SUN_BEAM = 62211,
@@ -159,7 +148,7 @@ enum FreyaSpells
// Attuned To Nature spells
SPELL_ATTUNED_TO_NATURE_2_DOSE_REDUCTION = 62524,
SPELL_ATTUNED_TO_NATURE_10_DOSE_REDUCTION = 62525,
- SPELL_ATTUNED_TO_NATURE_25_DOSE_REDUCTION = 62521,
+ SPELL_ATTUNED_TO_NATURE_25_DOSE_REDUCTION = 62521
};
enum FreyaNpcs
@@ -177,13 +166,13 @@ enum FreyaNpcs
NPC_IRON_ROOTS = 33088,
NPC_STRENGTHENED_IRON_ROOTS = 33168,
- OBJECT_NATURE_BOMB = 194902,
+ OBJECT_NATURE_BOMB = 194902
};
enum FreyaActions
{
ACTION_ELDER_DEATH = 1,
- ACTION_ELDER_FREYA_KILLED = 2,
+ ACTION_ELDER_FREYA_KILLED = 2
};
enum FreyaEvents
@@ -211,13 +200,16 @@ enum FreyaEvents
// Elder Brightleaf
EVENT_SOLAR_FLARE = 15,
EVENT_UNSTABLE_SUN_BEAM = 16,
- EVENT_FLUX = 17,
+ EVENT_FLUX = 17
};
-#define WAVE_TIME 60000 // Normal wave is one minute
-#define TIME_DIFFERENCE 10000 // If difference between waveTime and WAVE_TIME is bigger then TIME_DIFFERENCE, schedule EVENT_WAVE in 10 seconds
-#define DATA_GETTING_BACK_TO_NATURE 1
-#define DATA_KNOCK_ON_WOOD 2
+enum Misc
+{
+ WAVE_TIME = 60000, // Normal wave is one minute
+ TIME_DIFFERENCE = 10000, // If difference between waveTime and WAVE_TIME is bigger then TIME_DIFFERENCE, schedule EVENT_WAVE in 10 seconds
+ DATA_GETTING_BACK_TO_NATURE = 1,
+ DATA_KNOCK_ON_WOOD = 2
+};
class npc_iron_roots : public CreatureScript
{
@@ -273,9 +265,7 @@ class boss_freya : public CreatureScript
struct boss_freyaAI : public BossAI
{
- boss_freyaAI(Creature* creature) : BossAI(creature, BOSS_FREYA)
- {
- }
+ boss_freyaAI(Creature* creature) : BossAI(creature, BOSS_FREYA) { }
uint64 ElementalGUID[3][2];
@@ -316,9 +306,10 @@ class boss_freya : public CreatureScript
random[n] = false;
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_SLAY);
}
void DamageTaken(Unit* who, uint32& damage)
@@ -369,9 +360,9 @@ class boss_freya : public CreatureScript
}
if (elderCount == 0)
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
else
- DoScriptText(SAY_AGGRO_WITH_ELDER, me);
+ Talk(SAY_AGGRO_WITH_ELDER);
me->CastCustomSpell(SPELL_ATTUNED_TO_NATURE, SPELLVALUE_AURA_STACK, 150, me, true);
@@ -409,7 +400,7 @@ class boss_freya : public CreatureScript
switch (eventId)
{
case EVENT_ENRAGE:
- DoScriptText(SAY_BERSERK, me);
+ Talk(SAY_BERSERK);
DoCast(me, SPELL_ENRAGE);
break;
case EVENT_SUNBEAM:
@@ -418,17 +409,9 @@ class boss_freya : public CreatureScript
events.ScheduleEvent(EVENT_SUNBEAM, urand(10000, 15000));
break;
case EVENT_NATURE_BOMB:
- {
- // On every player
- std::list<Player*> PlayerList;
- Trinity::AnyPlayerInObjectRangeCheck checker(me, 50.0f);
- Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(me, PlayerList, checker);
- me->VisitNearbyWorldObject(50.0f, searcher);
- for (std::list<Player*>::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
- (*itr)->CastSpell(*itr, SPELL_SUMMON_NATURE_BOMB, true);
+ DoCastAOE(SPELL_SUMMON_NATURE_BOMB, true);
events.ScheduleEvent(EVENT_NATURE_BOMB, urand(10000, 12000));
break;
- }
case EVENT_UNSTABLE_ENERGY:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
DoCast(target, SPELL_FREYA_UNSTABLE_SUNBEAM, true);
@@ -442,15 +425,18 @@ class boss_freya : public CreatureScript
events.ScheduleEvent(EVENT_NATURE_BOMB, urand(10000, 20000));
break;
case EVENT_EONAR_GIFT:
+ Talk(EMOTE_LIFEBINDERS_GIFT);
DoCast(me, SPELL_SUMMON_EONAR_GIFT);
events.ScheduleEvent(EVENT_EONAR_GIFT, urand(40000, 50000));
break;
case EVENT_STRENGTHENED_IRON_ROOTS:
+ Talk(EMOTE_IRON_ROOTS);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true, -SPELL_ROOTS_FREYA))
target->CastSpell(target, SPELL_ROOTS_FREYA, true); // This must be casted by Target self
events.ScheduleEvent(EVENT_STRENGTHENED_IRON_ROOTS, urand(12000, 20000));
break;
case EVENT_GROUND_TREMOR:
+ Talk(EMOTE_GROUND_TREMOR);
DoCastAOE(SPELL_FREYA_GROUND_TREMOR);
events.ScheduleEvent(EVENT_GROUND_TREMOR, urand(25000, 28000));
break;
@@ -573,20 +559,21 @@ class boss_freya : public CreatureScript
switch (GetWaveId())
{
case 0:
- DoScriptText(SAY_SUMMON_LASHERS, me);
+ Talk(SAY_SUMMON_LASHERS);
for (uint8 n = 0; n < 10; ++n)
DoCast(SPELL_SUMMON_LASHERS);
break;
case 1:
- DoScriptText(SAY_SUMMON_TRIO, me);
+ Talk(SAY_SUMMON_TRIO);
DoCast(SPELL_SUMMON_TRIO);
trioWaveCount++;
break;
case 2:
- DoScriptText(SAY_SUMMON_CONSERVATOR, me);
+ Talk(SAY_SUMMON_CONSERVATOR);
DoCast(SPELL_SUMMON_ANCIENT_CONSERVATOR);
break;
}
+ Talk(EMOTE_ALLIES_OF_NATURE);
waveCount++;
}
@@ -602,7 +589,7 @@ class boss_freya : public CreatureScript
me->CastSpell((Unit*)NULL, summonSpell[me->GetMap()->GetDifficulty()][elderCount], true);
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
me->SetReactState(REACT_PASSIVE);
_JustDied();
me->RemoveAllAuras();
@@ -705,17 +692,18 @@ class boss_elder_brightleaf : public CreatureScript
lumberjack = false;
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_BRIGHTLEAF_SLAY_1, SAY_BRIGHTLEAF_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_ELDER_SLAY);
}
void JustDied(Unit* killer)
{
_JustDied();
- DoScriptText(SAY_BRIGHTLEAF_DEATH, me);
+ Talk(SAY_ELDER_DEATH);
- if (killer && killer->GetTypeId() == TYPEID_PLAYER)
+ if (killer->GetTypeId() == TYPEID_PLAYER)
{
if (Creature* Ironbranch = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_IRONBRANCH)))
Ironbranch->AI()->DoAction(ACTION_ELDER_DEATH);
@@ -729,7 +717,7 @@ class boss_elder_brightleaf : public CreatureScript
{
_EnterCombat();
if (!me->HasAura(SPELL_DRAINED_OF_POWER))
- DoScriptText(SAY_BRIGHTLEAF_AGGRO, me);
+ Talk(SAY_ELDER_AGGRO);
}
void UpdateAI(uint32 const diff)
@@ -825,17 +813,18 @@ class boss_elder_stonebark : public CreatureScript
lumberjack = false;
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_STONEBARK_SLAY_1, SAY_STONEBARK_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_ELDER_SLAY);
}
void JustDied(Unit* killer)
{
_JustDied();
- DoScriptText(SAY_STONEBARK_DEATH, me);
+ Talk(SAY_ELDER_DEATH);
- if (killer && killer->GetTypeId() == TYPEID_PLAYER)
+ if (killer->GetTypeId() == TYPEID_PLAYER)
{
if (Creature* Ironbranch = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_IRONBRANCH)))
Ironbranch->AI()->DoAction(ACTION_ELDER_DEATH);
@@ -849,7 +838,7 @@ class boss_elder_stonebark : public CreatureScript
{
_EnterCombat();
if (!me->HasAura(SPELL_DRAINED_OF_POWER))
- DoScriptText(SAY_STONEBARK_AGGRO, me);
+ Talk(SAY_ELDER_AGGRO);
}
void DamageTaken(Unit* who, uint32& damage)
@@ -951,17 +940,18 @@ class boss_elder_ironbranch : public CreatureScript
lumberjack = false;
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_IRONBRANCH_SLAY_1, SAY_IRONBRANCH_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_ELDER_SLAY);
}
void JustDied(Unit* killer)
{
_JustDied();
- DoScriptText(SAY_IRONBRANCH_DEATH, me);
+ Talk(SAY_ELDER_DEATH);
- if (killer && killer->GetTypeId() == TYPEID_PLAYER)
+ if (killer->GetTypeId() == TYPEID_PLAYER)
{
if (Creature* Brightleaf = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_BRIGHTLEAF)))
Brightleaf->AI()->DoAction(ACTION_ELDER_DEATH);
@@ -975,7 +965,7 @@ class boss_elder_ironbranch : public CreatureScript
{
_EnterCombat();
if (!me->HasAura(SPELL_DRAINED_OF_POWER))
- DoScriptText(SAY_IRONBRANCH_AGGRO, me);
+ Talk(SAY_ELDER_AGGRO);
}
void UpdateAI(uint32 const diff)
@@ -1530,19 +1520,17 @@ class npc_unstable_sun_beam : public CreatureScript
class spell_freya_attuned_to_nature_dose_reduction : public SpellScriptLoader
{
public:
- spell_freya_attuned_to_nature_dose_reduction() : SpellScriptLoader("spell_freya_attuned_to_nature_dose_reduction")
- {
- }
+ spell_freya_attuned_to_nature_dose_reduction() : SpellScriptLoader("spell_freya_attuned_to_nature_dose_reduction") { }
class spell_freya_attuned_to_nature_dose_reduction_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_freya_attuned_to_nature_dose_reduction_SpellScript)
+ PrepareSpellScript(spell_freya_attuned_to_nature_dose_reduction_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
Unit* target = GetHitUnit();
- SpellInfo const* spellInfo = GetSpellInfo();
- switch (spellInfo->Id)
+
+ switch (GetSpellInfo()->Id)
{
case SPELL_ATTUNED_TO_NATURE_2_DOSE_REDUCTION:
if (target->HasAura(GetEffectValue()))
@@ -1579,9 +1567,7 @@ class spell_freya_attuned_to_nature_dose_reduction : public SpellScriptLoader
class spell_freya_iron_roots : public SpellScriptLoader
{
public:
- spell_freya_iron_roots() : SpellScriptLoader("spell_freya_iron_roots")
- {
- }
+ spell_freya_iron_roots() : SpellScriptLoader("spell_freya_iron_roots") { }
class spell_freya_iron_roots_SpellScript : public SpellScript
{
@@ -1614,80 +1600,44 @@ class spell_freya_iron_roots : public SpellScriptLoader
class achievement_getting_back_to_nature : public AchievementCriteriaScript
{
public:
- achievement_getting_back_to_nature() : AchievementCriteriaScript("achievement_getting_back_to_nature")
- {
- }
+ achievement_getting_back_to_nature() : AchievementCriteriaScript("achievement_getting_back_to_nature") { }
bool OnCheck(Player* /*player*/, Unit* target)
{
- if (!target)
- return false;
-
- if (Creature* Freya = target->ToCreature())
- if (Freya->AI()->GetData(DATA_GETTING_BACK_TO_NATURE) >= 25)
- return true;
-
- return false;
+ return target && target->GetAI()->GetData(DATA_GETTING_BACK_TO_NATURE) >= 25;
}
};
class achievement_knock_on_wood : public AchievementCriteriaScript
{
public:
- achievement_knock_on_wood() : AchievementCriteriaScript("achievement_knock_on_wood")
- {
- }
+ achievement_knock_on_wood() : AchievementCriteriaScript("achievement_knock_on_wood") { }
bool OnCheck(Player* /*player*/, Unit* target)
{
- if (!target)
- return false;
-
- if (Creature* Freya = target->ToCreature())
- if (Freya->AI()->GetData(DATA_KNOCK_ON_WOOD) >= 1)
- return true;
-
- return false;
+ return target && target->GetAI()->GetData(DATA_KNOCK_ON_WOOD) >= 1;
}
};
class achievement_knock_knock_on_wood : public AchievementCriteriaScript
{
public:
- achievement_knock_knock_on_wood() : AchievementCriteriaScript("achievement_knock_knock_on_wood")
- {
- }
+ achievement_knock_knock_on_wood() : AchievementCriteriaScript("achievement_knock_knock_on_wood") { }
bool OnCheck(Player* /*player*/, Unit* target)
{
- if (!target)
- return false;
-
- if (Creature* Freya = target->ToCreature())
- if (Freya->AI()->GetData(DATA_KNOCK_ON_WOOD) >= 2)
- return true;
-
- return false;
+ return target && target->GetAI()->GetData(DATA_KNOCK_ON_WOOD) >= 2;
}
};
class achievement_knock_knock_knock_on_wood : public AchievementCriteriaScript
{
public:
- achievement_knock_knock_knock_on_wood() : AchievementCriteriaScript("achievement_knock_knock_knock_on_wood")
- {
- }
+ achievement_knock_knock_knock_on_wood() : AchievementCriteriaScript("achievement_knock_knock_knock_on_wood") { }
bool OnCheck(Player* /*player*/, Unit* target)
{
- if (!target)
- return false;
-
- if (Creature* Freya = target->ToCreature())
- if (Freya->AI()->GetData(DATA_KNOCK_ON_WOOD) == 3)
- return true;
-
- return false;
+ return target && target->GetAI()->GetData(DATA_KNOCK_ON_WOOD) == 3;
}
};
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
index 1232c1b9051..43d203daedf 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
@@ -24,21 +24,22 @@
enum VezaxYells
{
- SAY_AGGRO = -1603290,
- SAY_SLAY_1 = -1603291,
- SAY_SLAY_2 = -1603292,
- SAY_SURGE_OF_DARKNESS = -1603293,
- SAY_DEATH = -1603294,
- SAY_BERSERK = -1603295,
- SAY_HARDMODE = -1603296,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_SURGE_OF_DARKNESS = 2,
+ SAY_DEATH = 3,
+ SAY_BERSERK = 4,
+ SAY_HARDMODE = 5,
};
enum VezaxEmotes
{
- EMOTE_VAPORS = -1603289,
- EMOTE_ANIMUS = -1603297,
- EMOTE_BARRIER = -1603298,
- EMOTE_SURGE_OF_DARKNESS = -1603299,
+ EMOTE_ANIMUS = 6,
+ EMOTE_BARRIER = 7,
+ EMOTE_SURGE_OF_DARKNESS = 8,
+
+ // Saronite Vapor
+ EMOTE_VAPORS = 9
};
enum VezaxSpells
@@ -122,7 +123,7 @@ class boss_general_vezax : public CreatureScript
{
_EnterCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoCast(me, SPELL_AURA_OF_DESPAIR);
CheckShamanisticRage();
@@ -173,8 +174,8 @@ class boss_general_vezax : public CreatureScript
break;
}
case EVENT_SURGE_OF_DARKNESS:
- DoScriptText(EMOTE_SURGE_OF_DARKNESS, me);
- DoScriptText(SAY_SURGE_OF_DARKNESS, me);
+ Talk(EMOTE_SURGE_OF_DARKNESS);
+ Talk(SAY_SURGE_OF_DARKNESS);
DoCast(me, SPELL_SURGE_OF_DARKNESS);
events.ScheduleEvent(EVENT_SURGE_OF_DARKNESS, urand(50000, 70000));
break;
@@ -183,8 +184,8 @@ class boss_general_vezax : public CreatureScript
events.ScheduleEvent(EVENT_SARONITE_VAPORS, urand(30000, 35000));
if (++vaporCount == 6 && smellSaronite)
{
- DoScriptText(SAY_HARDMODE, me);
- DoScriptText(EMOTE_BARRIER, me);
+ Talk(SAY_HARDMODE);
+ Talk(EMOTE_BARRIER);
summons.DespawnAll();
DoCast(me, SPELL_SARONITE_BARRIER);
DoCast(SPELL_SUMMON_SARONITE_ANIMUS);
@@ -194,7 +195,7 @@ class boss_general_vezax : public CreatureScript
}
break;
case EVENT_BERSERK:
- DoScriptText(SAY_BERSERK, me);
+ Talk(SAY_BERSERK);
DoCast(me, SPELL_BERSERK);
break;
}
@@ -209,15 +210,16 @@ class boss_general_vezax : public CreatureScript
shadowDodger = false;
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_AURA_OF_DESPAIR);
}
@@ -316,7 +318,6 @@ class boss_saronite_animus : public CreatureScript
boss_saronite_animusAI(Creature* creature) : ScriptedAI(creature)
{
instance = me->GetInstanceScript();
- DoScriptText(EMOTE_BARRIER, me);
}
void Reset()
@@ -378,7 +379,7 @@ class npc_saronite_vapors : public CreatureScript
{
npc_saronite_vaporsAI(Creature* creature) : ScriptedAI(creature)
{
- DoScriptText(EMOTE_VAPORS, me);
+ Talk(EMOTE_VAPORS);
instance = me->GetInstanceScript();
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);
me->ApplySpellImmune(0, IMMUNITY_ID, 49560, true); // Death Grip jump effect
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
index c9fe1c5b707..8247236016c 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
@@ -32,18 +32,15 @@
enum HodirYells
{
- SAY_AGGRO = -1603210,
- SAY_SLAY_1 = -1603211,
- SAY_SLAY_2 = -1603212,
- SAY_FLASH_FREEZE = -1603213,
- SAY_STALACTITE = -1603214,
- SAY_DEATH = -1603215,
- SAY_BERSERK = -1603216,
- SAY_YS_HELP = -1603217,
- SAY_HARD_MODE_FAILED = -1603218,
-
- EMOTE_FREEZE = -1603209,
- EMOTE_BLOWS = -1603219,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_FLASH_FREEZE = 2,
+ SAY_STALACTITE = 3,
+ SAY_DEATH = 4,
+ SAY_BERSERK = 5,
+ SAY_HARD_MODE_FAILED = 6,
+ EMOTE_FREEZE = 7,
+ EMOTE_BLOWS = 8
};
enum HodirSpells
@@ -70,6 +67,8 @@ enum HodirSpells
SPELL_ICE_SHARD = 62457,
SPELL_ICE_SHARD_HIT = 65370,
+ SPELL_KILL_CREDIT = 64899,
+
// Druids
SPELL_WRATH = 62793,
SPELL_STARLIGHT = 62807,
@@ -329,7 +328,7 @@ class boss_hodir : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoCast(me, SPELL_BITING_COLD, true);
gettingColdInHereTimer = 1000;
@@ -346,10 +345,10 @@ class boss_hodir : public CreatureScript
events.ScheduleEvent(EVENT_BERSERK, 480000);
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- if (!urand(0, 3))
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_SLAY);
}
void DamageTaken(Unit* /*who*/, uint32& damage)
@@ -357,7 +356,7 @@ class boss_hodir : public CreatureScript
if (damage >= me->GetHealth())
{
damage = 0;
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (iCouldSayThatThisCacheWasRare)
instance->SetData(DATA_HODIR_RARE_CACHE, 1);
@@ -376,6 +375,8 @@ class boss_hodir : public CreatureScript
me->setFaction(35);
me->DespawnOrUnsummon(10000);
+ DoCastAOE(SPELL_KILL_CREDIT);
+
_JustDied();
}
}
@@ -404,8 +405,8 @@ class boss_hodir : public CreatureScript
events.ScheduleEvent(EVENT_ICICLE, RAID_MODE(5500, 3500));
break;
case EVENT_FLASH_FREEZE:
- DoScriptText(SAY_FLASH_FREEZE, me);
- DoScriptText(EMOTE_FREEZE, me);
+ Talk(SAY_FLASH_FREEZE);
+ Talk(EMOTE_FREEZE);
for (uint8 n = 0; n < RAID_MODE(2, 3); ++n)
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
target->CastSpell(target, SPELL_ICICLE_SNOWDRIFT, true);
@@ -424,19 +425,19 @@ class boss_hodir : public CreatureScript
break;
}
case EVENT_BLOWS:
- DoScriptText(SAY_STALACTITE, me);
- DoScriptText(EMOTE_BLOWS, me);
+ Talk(SAY_STALACTITE);
+ Talk(EMOTE_BLOWS);
DoCast(me, SPELL_FROZEN_BLOWS);
events.ScheduleEvent(EVENT_BLOWS, urand(60000, 65000));
break;
case EVENT_RARE_CACHE:
- DoScriptText(SAY_HARD_MODE_FAILED, me);
+ Talk(SAY_HARD_MODE_FAILED);
iCouldSayThatThisCacheWasRare = false;
instance->SetData(DATA_HODIR_RARE_CACHE, 0);
events.CancelEvent(EVENT_RARE_CACHE);
break;
case EVENT_BERSERK:
- DoScriptText(SAY_BERSERK, me);
+ Talk(SAY_BERSERK);
DoCast(me, SPELL_BERSERK, true);
events.CancelEvent(EVENT_BERSERK);
break;
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
index c0fb4e3ecc8..c8789d680ed 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
@@ -24,16 +24,14 @@
enum Yells
{
- SAY_AGGRO = -1603220,
- SAY_SLAY_1 = -1603221,
- SAY_SLAY_2 = -1603222,
- SAY_DEATH = -1603223,
- SAY_SUMMON = -1603224,
- SAY_SLAG_POT = -1603225,
- SAY_SCORCH_1 = -1603226,
- SAY_SCORCH_2 = -1603227,
- SAY_BERSERK = -1603228,
- EMOTE_JETS = -1603229,
+ SAY_AGGRO = 0,
+ SAY_SUMMON = 1,
+ SAY_SLAG_POT = 2,
+ SAY_SCORCH = 3,
+ SAY_SLAY = 4,
+ SAY_BERSERK = 5,
+ SAY_DEATH = 6,
+ EMOTE_JETS = 7
};
enum Spells
@@ -135,7 +133,7 @@ class boss_ignis : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_JET, 30000);
events.ScheduleEvent(EVENT_SCORCH, 25000);
events.ScheduleEvent(EVENT_SLAG_POT, 35000);
@@ -151,7 +149,7 @@ class boss_ignis : public CreatureScript
void JustDied(Unit* /*killer*/)
{
_JustDied();
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
uint32 GetData(uint32 type) const
@@ -162,10 +160,10 @@ class boss_ignis : public CreatureScript
return 0;
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* who)
{
- if (!urand(0, 4))
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_SLAY);
}
void JustSummoned(Creature* summon)
@@ -210,14 +208,14 @@ class boss_ignis : public CreatureScript
switch (eventId)
{
case EVENT_JET:
- me->MonsterTextEmote(EMOTE_JETS, 0, true);
+ Talk(EMOTE_JETS);
DoCast(me, SPELL_FLAME_JETS);
events.ScheduleEvent(EVENT_JET, urand(35000, 40000));
break;
case EVENT_SLAG_POT:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
- DoScriptText(SAY_SLAG_POT, me);
+ Talk(SAY_SLAG_POT);
_slagPotGUID = target->GetGUID();
DoCast(target, SPELL_GRAB);
events.DelayEvents(3000);
@@ -252,14 +250,14 @@ class boss_ignis : public CreatureScript
}
break;
case EVENT_SCORCH:
- DoScriptText(RAND(SAY_SCORCH_1, SAY_SCORCH_2), me);
+ Talk(SAY_SCORCH);
if (Unit* target = me->getVictim())
me->SummonCreature(NPC_GROUND_SCORCH, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 45000);
DoCast(SPELL_SCORCH);
events.ScheduleEvent(EVENT_SCORCH, 25000);
break;
case EVENT_CONSTRUCT:
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
DoSummon(NPC_IRON_CONSTRUCT, ConstructSpawnPosition[urand(0, CONSTRUCT_SPAWN_POINTS - 1)], 30000, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT);
DoCast(SPELL_STRENGHT);
DoCast(me, SPELL_ACTIVATE_CONSTRUCT);
@@ -267,7 +265,7 @@ class boss_ignis : public CreatureScript
break;
case EVENT_BERSERK:
DoCast(me, SPELL_BERSERK, true);
- DoScriptText(SAY_BERSERK, me);
+ Talk(SAY_BERSERK);
break;
}
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
index 9c77bb298a5..c1fc0a81989 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
@@ -30,34 +30,40 @@ SDComment: TODO: Achievements
SDCategory: Ulduar
EndScriptData */
-#define SPELL_ARM_DEAD_DAMAGE RAID_MODE(63629, 63979)
-#define SPELL_TWO_ARM_SMASH RAID_MODE(63356, 64003)
-#define SPELL_ONE_ARM_SMASH RAID_MODE(63573, 64006)
-#define SPELL_ARM_SWEEP RAID_MODE(63766, 63983)
-#define SPELL_STONE_SHOUT RAID_MODE(63716, 64005)
-#define SPELL_PETRIFY_BREATH RAID_MODE(62030, 63980)
-#define SPELL_STONE_GRIP RAID_MODE(62166, 63981)
-#define SPELL_STONE_GRIP_CANCEL 65594
-#define SPELL_SUMMON_RUBBLE 63633
-#define SPELL_FALLING_RUBBLE 63821
-#define SPELL_ARM_ENTER_VEHICLE 65343
-#define SPELL_ARM_ENTER_VISUAL 64753
-
-#define SPELL_SUMMON_FOCUSED_EYEBEAM 63342
-#define SPELL_FOCUSED_EYEBEAM_PERIODIC RAID_MODE(63347, 63977)
-#define SPELL_FOCUSED_EYEBEAM_VISUAL 63369
-#define SPELL_FOCUSED_EYEBEAM_VISUAL_LEFT 63676
-#define SPELL_FOCUSED_EYEBEAM_VISUAL_RIGHT 63702
-
-// Passive
-#define SPELL_KOLOGARN_REDUCE_PARRY 64651
-#define SPELL_KOLOGARN_PACIFY 63726
-#define SPELL_KOLOGARN_UNK_0 65219 // Not found in DBC
-
-#define SPELL_BERSERK 47008 // guess
-
-#define NPC_RUBBLE_STALKER 33809
-#define NPC_ARM_SWEEP_STALKER 33661
+enum Spells
+{
+ SPELL_ARM_DEAD_DAMAGE = 63629,
+ SPELL_TWO_ARM_SMASH = 63356,
+ SPELL_ONE_ARM_SMASH = 63573,
+ SPELL_ARM_SWEEP = 63766,
+ SPELL_STONE_SHOUT = 63716,
+ SPELL_PETRIFY_BREATH = 62030,
+ SPELL_STONE_GRIP = 62166,
+ SPELL_STONE_GRIP_CANCEL = 65594,
+ SPELL_SUMMON_RUBBLE = 63633,
+ SPELL_FALLING_RUBBLE = 63821,
+ SPELL_ARM_ENTER_VEHICLE = 65343,
+ SPELL_ARM_ENTER_VISUAL = 64753,
+
+ SPELL_SUMMON_FOCUSED_EYEBEAM = 63342,
+ SPELL_FOCUSED_EYEBEAM_PERIODIC = 63347,
+ SPELL_FOCUSED_EYEBEAM_VISUAL = 63369,
+ SPELL_FOCUSED_EYEBEAM_VISUAL_LEFT = 63676,
+ SPELL_FOCUSED_EYEBEAM_VISUAL_RIGHT = 63702,
+
+ // Passive
+ SPELL_KOLOGARN_REDUCE_PARRY = 64651,
+ SPELL_KOLOGARN_PACIFY = 63726,
+ SPELL_KOLOGARN_UNK_0 = 65219, // Not found in DBC
+
+ SPELL_BERSERK = 47008 // guess
+};
+
+enum NPCs
+{
+ NPC_RUBBLE_STALKER = 33809,
+ NPC_ARM_SWEEP_STALKER = 33661
+};
enum Events
{
@@ -76,15 +82,15 @@ enum Events
enum Yells
{
- SAY_AGGRO = -1603230,
- SAY_SLAY_1 = -1603231,
- SAY_SLAY_2 = -1603232,
- SAY_LEFT_ARM_GONE = -1603233,
- SAY_RIGHT_ARM_GONE = -1603234,
- SAY_SHOCKWAVE = -1603235,
- SAY_GRAB_PLAYER = -1603236,
- SAY_DEATH = -1603237,
- SAY_BERSERK = -1603238,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_LEFT_ARM_GONE = 2,
+ SAY_RIGHT_ARM_GONE = 3,
+ SAY_SHOCKWAVE = 4,
+ SAY_GRAB_PLAYER = 5,
+ SAY_DEATH = 6,
+ SAY_BERSERK = 7,
+ EMOTE_STONE_GRIP = 8
};
class boss_kologarn : public CreatureScript
@@ -113,7 +119,7 @@ class boss_kologarn : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_MELEE_CHECK, 6000);
events.ScheduleEvent(EVENT_SMASH, 5000);
@@ -138,7 +144,7 @@ class boss_kologarn : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
DoCast(SPELL_KOLOGARN_PACIFY);
me->GetMotionMaster()->MoveTargetedHome();
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
@@ -146,9 +152,10 @@ class boss_kologarn : public CreatureScript
_JustDied();
}
- void KilledUnit(Unit* /*who*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_SLAY);
}
void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply)
@@ -160,7 +167,7 @@ class boss_kologarn : public CreatureScript
if (!apply && isEncounterInProgress)
{
who->ToCreature()->DisappearAndDie();
- DoScriptText(SAY_LEFT_ARM_GONE, me);
+ Talk(SAY_LEFT_ARM_GONE);
events.ScheduleEvent(EVENT_RESPAWN_LEFT_ARM, 40000);
}
}
@@ -171,7 +178,7 @@ class boss_kologarn : public CreatureScript
if (!apply && isEncounterInProgress)
{
who->ToCreature()->DisappearAndDie();
- DoScriptText(SAY_RIGHT_ARM_GONE, me);
+ Talk(SAY_RIGHT_ARM_GONE);
events.ScheduleEvent(EVENT_RESPAWN_RIGHT_ARM, 40000);
}
}
@@ -272,7 +279,7 @@ class boss_kologarn : public CreatureScript
break;
case EVENT_ENRAGE:
DoCast(SPELL_BERSERK);
- DoScriptText(SAY_BERSERK, me);
+ Talk(SAY_BERSERK);
break;
case EVENT_RESPAWN_LEFT_ARM:
case EVENT_RESPAWN_RIGHT_ARM:
@@ -290,11 +297,12 @@ class boss_kologarn : public CreatureScript
if (right)
{
DoCast(SPELL_STONE_GRIP);
- DoScriptText(SAY_GRAB_PLAYER, me);
+ Talk(SAY_GRAB_PLAYER);
+ Talk(EMOTE_STONE_GRIP);
}
events.ScheduleEvent(EVENT_STONE_GRIP, 25 * IN_MILLISECONDS);
+ break;
}
- break;
case EVENT_FOCUSED_EYEBEAM:
if (Unit* eyebeamTargetUnit = SelectTarget(SELECT_TARGET_FARTHEST, 0, 0, true))
{
@@ -404,12 +412,12 @@ class spell_ulduar_stone_grip_cast_target : public SpellScriptLoader
}
// For subsequent effects
- m_unitList = unitList;
+ _unitList = unitList;
}
void FillTargetsSubsequential(std::list<WorldObject*>& unitList)
{
- unitList = m_unitList;
+ unitList = _unitList;
}
void Register()
@@ -419,8 +427,9 @@ class spell_ulduar_stone_grip_cast_target : public SpellScriptLoader
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_ulduar_stone_grip_cast_target_SpellScript::FillTargetsSubsequential, EFFECT_2, TARGET_UNIT_SRC_AREA_ENEMY);
}
+ private:
// Shared between effects
- std::list<WorldObject*> m_unitList;
+ std::list<WorldObject*> _unitList;
};
SpellScript* GetSpellScript() const
@@ -625,10 +634,10 @@ class spell_kologarn_summon_focused_eyebeam : public SpellScriptLoader
{
PrepareSpellScript(spell_kologarn_summon_focused_eyebeam_SpellScript);
- void HandleForceCast(SpellEffIndex eff)
+ void HandleForceCast(SpellEffIndex effIndex)
{
- PreventHitDefaultEffect(eff);
- GetCaster()->CastSpell(GetCaster(), GetSpellInfo()->Effects[eff].TriggerSpell, true);
+ PreventHitDefaultEffect(effIndex);
+ GetCaster()->CastSpell(GetCaster(), GetSpellInfo()->Effects[effIndex].TriggerSpell, true);
}
void Register()
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
index 6a4a5255293..b5c907af7f0 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
@@ -35,8 +35,7 @@ enum Yells
SAY_V07TRON_ACTIVATE = 11,
SAY_V07TRON_SLAY = 12,
SAY_V07TRON_DEATH = 13,
- SAY_BERSERK = 14,
- SAY_YS_HELP = 15
+ SAY_BERSERK = 14
};
enum Spells
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
index 5ea2678adfe..5f560ed8dd4 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
@@ -27,15 +27,22 @@
enum Says
{
- SAY_GREET = -1603260,
- SAY_GROUND_PHASE = -1603261,
- SAY_AGGRO_1 = -1603262,
- SAY_AGGRO_2 = -1603263,
- SAY_AGGRO_3 = -1603264,
- SAY_TURRETS = -1603265,
- EMOTE_HARPOON = -1603266,
- EMOTE_BREATH = -1603267,
- EMOTE_PERMA = -1603268,
+ // Expedition Commander
+ SAY_INTRO = 0,
+ SAY_GROUND_PHASE = 1,
+ SAY_AGGRO_2 = 2,
+
+ // Expedition Engineer
+ SAY_AGGRO_1 = 0,
+ SAY_AGGRO_3 = 1,
+ SAY_TURRETS = 2, // unused
+
+ // Razorscale Controller
+ EMOTE_HARPOON = 0,
+
+ // Razorscale
+ EMOTE_PERMA = 0,
+ EMOTE_BREATH = 1
};
enum Spells
@@ -245,7 +252,7 @@ class boss_razorscale_controller : public CreatureScript
switch (eventId)
{
case EVENT_BUILD_HARPOON_1:
- DoScriptText(EMOTE_HARPOON, me);
+ Talk(EMOTE_HARPOON);
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_1, PosHarpoon[0].GetPositionX(), PosHarpoon[0].GetPositionY(), PosHarpoon[0].GetPositionZ(), 4.790f, 0.0f, 0.0f, 0.0f, 0.0f, uint32(me->GetRespawnTime())))
{
if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f)) //only nearest broken harpoon
@@ -255,7 +262,7 @@ class boss_razorscale_controller : public CreatureScript
}
return;
case EVENT_BUILD_HARPOON_2:
- DoScriptText(EMOTE_HARPOON, me);
+ Talk(EMOTE_HARPOON);
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_2, PosHarpoon[1].GetPositionX(), PosHarpoon[1].GetPositionY(), PosHarpoon[1].GetPositionZ(), 4.659f, 0, 0, 0, 0, uint32(me->GetRespawnTime())))
{
if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
@@ -264,7 +271,7 @@ class boss_razorscale_controller : public CreatureScript
}
return;
case EVENT_BUILD_HARPOON_3:
- DoScriptText(EMOTE_HARPOON, me);
+ Talk(EMOTE_HARPOON);
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_3, PosHarpoon[2].GetPositionX(), PosHarpoon[2].GetPositionY(), PosHarpoon[2].GetPositionZ(), 5.382f, 0, 0, 0, 0, uint32(me->GetRespawnTime())))
{
if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
@@ -274,7 +281,7 @@ class boss_razorscale_controller : public CreatureScript
}
return;
case EVENT_BUILD_HARPOON_4:
- DoScriptText(EMOTE_HARPOON, me);
+ Talk(EMOTE_HARPOON);
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_4, PosHarpoon[3].GetPositionX(), PosHarpoon[3].GetPositionY(), PosHarpoon[3].GetPositionZ(), 4.266f, 0, 0, 0, 0, uint32(me->GetRespawnTime())))
{
if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
@@ -444,7 +451,7 @@ class boss_razorscale : public CreatureScript
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED | UNIT_FLAG_PACIFIED);
me->RemoveAllAuras();
me->SetReactState(REACT_AGGRESSIVE);
- DoScriptText(EMOTE_BREATH, me, 0);
+ Talk(EMOTE_BREATH);
DoCastAOE(SPELL_FLAMEBREATH);
events.CancelEvent(EVENT_BREATH);
return;
@@ -468,7 +475,7 @@ class boss_razorscale : public CreatureScript
events.ScheduleEvent(EVENT_FLAME, 10000, 0, PHASE_PERMAGROUND);
return;
case EVENT_BREATH:
- me->MonsterTextEmote(EMOTE_BREATH, 0, true);
+ Talk(EMOTE_BREATH);
DoCastVictim(SPELL_FLAMEBREATH);
events.ScheduleEvent(EVENT_BREATH, 20000, 0, PHASE_PERMAGROUND);
return;
@@ -522,7 +529,7 @@ class boss_razorscale : public CreatureScript
void EnterPermaGround()
{
- me->MonsterTextEmote(EMOTE_PERMA, 0, true);
+ Talk(EMOTE_PERMA);
phase = PHASE_PERMAGROUND;
events.SetPhase(PHASE_PERMAGROUND);
me->SetCanFly(false);
@@ -608,7 +615,7 @@ class npc_expedition_commander : public CreatureScript
{
if (!Greet && me->IsWithinDistInMap(who, 10.0f) && who->GetTypeId() == TYPEID_PLAYER)
{
- DoScriptText(SAY_GREET, me);
+ Talk(SAY_INTRO);
Greet = true;
}
}
@@ -623,7 +630,7 @@ class npc_expedition_commander : public CreatureScript
switch (action)
{
case ACTION_GROUND_PHASE:
- DoScriptText(SAY_GROUND_PHASE, me);
+ Talk(SAY_GROUND_PHASE);
break;
case ACTION_COMMANDER_RESET:
summons.clear();
@@ -653,7 +660,7 @@ class npc_expedition_commander : public CreatureScript
Engineer[n]->SetHomePosition(PosEngRepair[n]);
Engineer[n]->GetMotionMaster()->MoveTargetedHome();
}
- Engineer[0]->MonsterYell(SAY_AGGRO_3, LANG_UNIVERSAL, 0);
+ Engineer[0]->AI()->Talk(SAY_AGGRO_3);
Phase = 3;
AttackStartTimer = 14000;
break;
@@ -672,7 +679,7 @@ class npc_expedition_commander : public CreatureScript
Engineer[n]->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING);
for (uint8 n = 0; n < 4; ++n)
Defender[n]->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H);
- me->MonsterYell(SAY_AGGRO_2, LANG_UNIVERSAL, 0);
+ Talk(SAY_AGGRO_2);
AttackStartTimer = 16000;
Phase = 5;
break;
@@ -682,7 +689,7 @@ class npc_expedition_commander : public CreatureScript
Razorscale->AI()->DoAction(ACTION_EVENT_START);
me->SetInCombatWith(Razorscale);
}
- Engineer[0]->MonsterYell(SAY_AGGRO_1, LANG_UNIVERSAL, 0);
+ Engineer[0]->AI()->Talk(SAY_AGGRO_1);
Phase = 6;
break;
}
@@ -1077,7 +1084,7 @@ class achievement_quick_shave : public AchievementCriteriaScript
bool OnCheck(Player* /*source*/, Unit* target)
{
- if (target)
+ if (target)
if (Creature* razorscale = target->ToCreature())
if (razorscale->AI()->GetData(DATA_QUICK_SHAVE))
return true;
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp
index 084cd3e0f86..82845d10b8c 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp
@@ -21,83 +21,80 @@
enum Yells
{
- SAY_AGGRO_1 = -1603270,
- SAY_AGGRO_2 = -1603271,
- SAY_SPECIAL_1 = -1603272,
- SAY_SPECIAL_2 = -1603273,
- SAY_SPECIAL_3 = -1603274,
- SAY_JUMPDOWN = -1603275,
- SAY_SLAY_1 = -1603276,
- SAY_SLAY_2 = -1603277,
- SAY_BERSERK = -1603278,
- SAY_WIPE = -1603279,
- SAY_DEATH = -1603280,
- SAY_END_NORMAL_1 = -1603281,
- SAY_END_NORMAL_2 = -1603282,
- SAY_END_NORMAL_3 = -1603283,
- SAY_END_HARD_1 = -1603284,
- SAY_END_HARD_2 = -1603285,
- SAY_END_HARD_3 = -1603286,
- SAY_YS_HELP = -1603287,
+ SAY_AGGRO = 0,
+ SAY_SPECIAL_1 = 1,
+ SAY_SPECIAL_2 = 2,
+ SAY_SPECIAL_3 = 3,
+ SAY_JUMPDOWN = 4,
+ SAY_SLAY = 5,
+ SAY_BERSERK = 6,
+ SAY_WIPE = 7,
+ SAY_DEATH = 8,
+ SAY_END_NORMAL_1 = 9,
+ SAY_END_NORMAL_2 = 10,
+ SAY_END_NORMAL_3 = 11,
+ SAY_END_HARD_1 = 12,
+ SAY_END_HARD_2 = 13,
+ SAY_END_HARD_3 = 14
};
class boss_thorim : public CreatureScript
{
-public:
- boss_thorim() : CreatureScript("boss_thorim") { }
+ public:
+ boss_thorim() : CreatureScript("boss_thorim") { }
- CreatureAI* GetAI(Creature* creature) const
- {
- return GetUlduarAI<boss_thorimAI>(creature);
- }
-
- struct boss_thorimAI : public BossAI
- {
- boss_thorimAI(Creature* creature) : BossAI(creature, BOSS_THORIM)
+ struct boss_thorimAI : public BossAI
{
- }
+ boss_thorimAI(Creature* creature) : BossAI(creature, BOSS_THORIM)
+ {
+ }
- void Reset()
- {
- _Reset();
- }
+ void Reset()
+ {
+ _Reset();
+ }
- void EnterEvadeMode()
- {
- DoScriptText(SAY_WIPE, me);
- _EnterEvadeMode();
- }
+ void EnterEvadeMode()
+ {
+ Talk(SAY_WIPE);
+ _EnterEvadeMode();
+ }
- void KilledUnit(Unit* /*victim*/)
- {
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
- }
+ void KilledUnit(Unit* who)
+ {
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_SLAY);
+ }
- void JustDied(Unit* /*killer*/)
- {
- DoScriptText(SAY_DEATH, me);
- _JustDied();
- }
+ void JustDied(Unit* /*killer*/)
+ {
+ Talk(SAY_DEATH);
+ _JustDied();
+ }
- void EnterCombat(Unit* /*who*/)
- {
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2), me);
- _EnterCombat();
- }
+ void EnterCombat(Unit* /*who*/)
+ {
+ Talk(SAY_AGGRO);
+ _EnterCombat();
+ }
- void UpdateAI(const uint32 diff)
- {
- if (!UpdateVictim())
- return;
- //SPELLS TODO:
+ void UpdateAI(uint32 const diff)
+ {
+ if (!UpdateVictim())
+ return;
+ //SPELLS TODO:
- //
- DoMeleeAttackIfReady();
+ //
+ DoMeleeAttackIfReady();
- EnterEvadeIfOutOfCombatArea(diff);
- }
- };
+ EnterEvadeIfOutOfCombatArea(diff);
+ }
+ };
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return GetUlduarAI<boss_thorimAI>(creature);
+ }
};
void AddSC_boss_thorim()
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
index 30f60da178a..09ab35d6589 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
@@ -157,15 +157,18 @@ enum XT002Data
enum Yells
{
- SAY_AGGRO = -1603300,
- SAY_HEART_OPENED = -1603301,
- SAY_HEART_CLOSED = -1603302,
- SAY_TYMPANIC_TANTRUM = -1603303,
- SAY_SLAY_1 = -1603304,
- SAY_SLAY_2 = -1603305,
- SAY_BERSERK = -1603306,
- SAY_DEATH = -1603307,
- SAY_SUMMON = -1603308,
+ SAY_AGGRO = 0,
+ SAY_HEART_OPENED = 1,
+ SAY_HEART_CLOSED = 2,
+ SAY_TYMPANIC_TANTRUM = 3,
+ SAY_SLAY = 4,
+ SAY_BERSERK = 5,
+ SAY_DEATH = 6,
+ SAY_SUMMON = 7,
+ EMOTE_HEART_OPENED = 8,
+ EMOTE_HEART_CLOSED = 9,
+ EMOTE_TYMPANIC_TANTRUM = 10,
+ EMOTE_SCRAPBOT = 11
};
enum AchievementCredits
@@ -223,7 +226,7 @@ class boss_xt002 : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
_EnterCombat();
events.ScheduleEvent(EVENT_ENRAGE, TIMER_ENRAGE);
@@ -248,14 +251,15 @@ class boss_xt002 : public CreatureScript
}
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* who)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
_JustDied();
}
@@ -292,7 +296,8 @@ class boss_xt002 : public CreatureScript
events.ScheduleEvent(EVENT_GRAVITY_BOMB, TIMER_GRAVITY_BOMB);
break;
case EVENT_TYMPANIC_TANTRUM:
- DoScriptText(SAY_TYMPANIC_TANTRUM, me);
+ Talk(SAY_TYMPANIC_TANTRUM);
+ Talk(EMOTE_TYMPANIC_TANTRUM);
DoCast(SPELL_TYMPANIC_TANTRUM);
events.ScheduleEvent(EVENT_TYMPANIC_TANTRUM, urand(TIMER_TYMPANIC_TANTRUM_MIN, TIMER_TYMPANIC_TANTRUM_MAX));
break;
@@ -300,7 +305,7 @@ class boss_xt002 : public CreatureScript
SetPhaseOne();
break;
case EVENT_ENRAGE:
- DoScriptText(SAY_BERSERK, me);
+ Talk(SAY_BERSERK);
DoCast(me, SPELL_ENRAGE);
break;
case EVENT_ENTER_HARD_MODE:
@@ -325,6 +330,7 @@ class boss_xt002 : public CreatureScript
if (me->GetHealthPct() > (25 * (4 - _heartExposed)))
++_heartExposed;
+ Talk(EMOTE_SCRAPBOT);
_healthRecovered = true;
}
}
@@ -359,7 +365,8 @@ class boss_xt002 : public CreatureScript
void ExposeHeart()
{
- DoScriptText(SAY_HEART_OPENED, me);
+ Talk(SAY_HEART_OPENED);
+ Talk(EMOTE_HEART_OPENED);
DoCast(me, SPELL_SUBMERGE); // WIll make creature untargetable
me->AttackStop();
@@ -391,7 +398,8 @@ class boss_xt002 : public CreatureScript
void SetPhaseOne()
{
- DoScriptText(SAY_HEART_CLOSED, me);
+ Talk(SAY_HEART_CLOSED);
+ Talk(EMOTE_HEART_CLOSED);
DoCast(me, SPELL_STAND);
me->SetReactState(REACT_AGGRESSIVE);
@@ -928,7 +936,8 @@ class spell_xt002_heart_overload_periodic : public SpellScriptLoader
}
}
- DoScriptText(SAY_SUMMON, caster->GetVehicleBase());
+ if (Creature* base = caster->GetVehicleCreatureBase())
+ base->AI()->Talk(SAY_SUMMON);
}
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp
index 58ba125b994..20d6a7a40da 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp
@@ -43,18 +43,6 @@ enum Sara
enum YoggSaron_Yells
{
- SAY_PHASE2_1 = -1603330,
- SAY_PHASE2_2 = -1603331,
- SAY_PHASE2_3 = -1603332,
- SAY_PHASE2_4 = -1603333,
- SAY_PHASE2_5 = -1603334,
- SAY_PHASE3 = -1603335,
- SAY_VISION = -1603336,
- SAY_SLAY_1 = -1603337,
- SAY_SLAY_2 = -1603338,
- WHISP_INSANITY_1 = -1603339,
- WHISP_INSANITY_2 = -1603340,
- SAY_DEATH = -1603341,
};
enum
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
index 7d3b943f7b0..b334b8dcbed 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
@@ -34,6 +34,14 @@ static DoorData const doorData[] =
{0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE },
};
+MinionData const minionData[] =
+{
+ { NPC_STEELBREAKER, BOSS_ASSEMBLY_OF_IRON },
+ { NPC_MOLGEIM, BOSS_ASSEMBLY_OF_IRON },
+ { NPC_BRUNDIR, BOSS_ASSEMBLY_OF_IRON },
+ { 0, 0, }
+};
+
class instance_ulduar : public InstanceMapScript
{
public:
@@ -43,8 +51,6 @@ class instance_ulduar : public InstanceMapScript
{
instance_ulduar_InstanceMapScript(InstanceMap* map) : InstanceScript(map) { }
- std::string m_strInstData;
-
// Creatures
uint64 LeviathanGUID;
uint64 IgnisGUID;
@@ -99,6 +105,7 @@ class instance_ulduar : public InstanceMapScript
{
SetBossNumber(MAX_ENCOUNTER);
LoadDoorData(doorData);
+ LoadMinionData(minionData);
IgnisGUID = 0;
RazorscaleGUID = 0;
RazorscaleController = 0;
@@ -202,18 +209,24 @@ class instance_ulduar : public InstanceMapScript
case NPC_XT_TOY_PILE:
for (uint8 i = 0; i < 4; ++i)
if (!XTToyPileGUIDs[i])
+ {
XTToyPileGUIDs[i] = creature->GetGUID();
+ break;
+ }
break;
// Assembly of Iron
case NPC_STEELBREAKER:
AssemblyGUIDs[0] = creature->GetGUID();
+ AddMinion(creature, true);
break;
case NPC_MOLGEIM:
AssemblyGUIDs[1] = creature->GetGUID();
+ AddMinion(creature, true);
break;
case NPC_BRUNDIR:
AssemblyGUIDs[2] = creature->GetGUID();
+ AddMinion(creature, true);
break;
// Freya's Keeper
@@ -314,10 +327,25 @@ class instance_ulduar : public InstanceMapScript
{
switch (creature->GetEntry())
{
+ case NPC_XT_TOY_PILE:
+ for (uint8 i = 0; i < 4; ++i)
+ if (XTToyPileGUIDs[i] == creature->GetGUID())
+ {
+ XTToyPileGUIDs[i] = 0;
+ break;
+ }
+ break;
+ case NPC_STEELBREAKER:
+ case NPC_MOLGEIM:
+ case NPC_BRUNDIR:
+ AddMinion(creature, false);
+ break;
case NPC_BRANN_BRONZBEARD_ALG:
if (BrannBronzebeardAlgGUID == creature->GetGUID())
BrannBronzebeardAlgGUID = 0;
break;
+ default:
+ break;
}
}
@@ -707,11 +735,11 @@ class instance_ulduar : public InstanceMapScript
return RazorHarpoonGUIDs[3];
// Assembly of Iron
- case BOSS_STEELBREAKER:
+ case DATA_STEELBREAKER:
return AssemblyGUIDs[0];
- case BOSS_MOLGEIM:
+ case DATA_MOLGEIM:
return AssemblyGUIDs[1];
- case BOSS_BRUNDIR:
+ case DATA_BRUNDIR:
return AssemblyGUIDs[2];
// Freya's Keepers
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
index 858a82bbe57..4dff89f7b2c 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
@@ -25,28 +25,25 @@ extern Position const AlgalonLandPos;
enum UlduarBosses
{
- MAX_ENCOUNTER = 20,
+ MAX_ENCOUNTER = 17,
BOSS_LEVIATHAN = 0,
BOSS_IGNIS = 1,
BOSS_RAZORSCALE = 2,
BOSS_XT002 = 3,
BOSS_ASSEMBLY_OF_IRON = 4,
- BOSS_STEELBREAKER = 5,
- BOSS_MOLGEIM = 6,
- BOSS_BRUNDIR = 7,
- BOSS_KOLOGARN = 8,
- BOSS_AURIAYA = 9,
- BOSS_MIMIRON = 10,
- BOSS_HODIR = 11,
- BOSS_THORIM = 12,
- BOSS_FREYA = 13,
- BOSS_BRIGHTLEAF = 14,
- BOSS_IRONBRANCH = 15,
- BOSS_STONEBARK = 16,
- BOSS_VEZAX = 17,
- BOSS_YOGGSARON = 18,
- BOSS_ALGALON = 19,
+ BOSS_KOLOGARN = 5,
+ BOSS_AURIAYA = 6,
+ BOSS_MIMIRON = 7,
+ BOSS_HODIR = 8,
+ BOSS_THORIM = 9,
+ BOSS_FREYA = 10,
+ BOSS_BRIGHTLEAF = 11,
+ BOSS_IRONBRANCH = 12,
+ BOSS_STONEBARK = 13,
+ BOSS_VEZAX = 14,
+ BOSS_YOGGSARON = 15,
+ BOSS_ALGALON = 16,
};
enum UlduarNPCs
@@ -207,6 +204,11 @@ enum UlduarData
DATA_TOY_PILE_2,
DATA_TOY_PILE_3,
+ // Assembly of Iron
+ DATA_STEELBREAKER,
+ DATA_MOLGEIM,
+ DATA_BRUNDIR,
+
// Hodir
DATA_HODIR_RARE_CACHE,
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
index aaa95631792..4fe56b346b2 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
@@ -29,14 +29,14 @@ EndScriptData */
enum Yells
{
//Yells Ingvar
- YELL_AGGRO_1 = -1574005,
- YELL_AGGRO_2 = -1574006,
+ YELL_AGGRO_1 = 0,
+ YELL_AGGRO_2 = 1,
- YELL_DEAD_1 = -1574007,
- YELL_DEAD_2 = -1574008,
+ YELL_DEAD_1 = 2,
+ YELL_DEAD_2 = 3,
- YELL_KILL_1 = -1574009,
- YELL_KILL_2 = -1574010,
+ YELL_KILL_1 = 4,
+ YELL_KILL_2 = 5,
};
enum Creatures
@@ -151,7 +151,7 @@ public:
events.SetPhase(PHASE_EVENT);
events.ScheduleEvent(EVENT_SUMMON_BANSHEE, 3 * IN_MILLISECONDS, 0, PHASE_EVENT);
- DoScriptText(YELL_DEAD_1, me);
+ Talk(YELL_DEAD_1);
}
if (events.GetPhaseMask() & (1 << PHASE_EVENT))
@@ -164,13 +164,13 @@ public:
me->UpdateEntry(MOB_INGVAR_UNDEAD);
events.ScheduleEvent(EVENT_JUST_TRANSFORMED, 2 * IN_MILLISECONDS, 0, PHASE_EVENT);
- DoScriptText(YELL_AGGRO_2, me);
+ Talk(YELL_AGGRO_2);
}
void EnterCombat(Unit* /*who*/)
{
if (!bIsUndead)
- DoScriptText(YELL_AGGRO_1, me);
+ Talk(YELL_AGGRO_1);
if (instance)
instance->SetData(DATA_INGVAR_EVENT, IN_PROGRESS);
@@ -180,7 +180,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(YELL_DEAD_2, me);
+ Talk(YELL_DEAD_2);
if (instance)
{
@@ -201,10 +201,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- if (bIsUndead)
- DoScriptText(YELL_KILL_1, me);
- else
- DoScriptText(YELL_KILL_2, me);
+ Talk(bIsUndead ? YELL_KILL_1 : YELL_KILL_2);
}
void UpdateAI(const uint32 diff)
@@ -329,7 +326,7 @@ public:
{
me->GetMotionMaster()->MovePoint(1, x, y, z+15);
- // DoScriptText(YELL_RESSURECT, me);
+ // Talk(YELL_RESSURECT);
}
}
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp
index 7c977250e79..aad4c9989c1 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp
@@ -29,18 +29,18 @@ EndScriptData */
enum eEnums
{
//signed for 24200, but used by 24200, 27390
- YELL_SKARVALD_AGGRO = -1574011,
- YELL_SKARVALD_DAL_DIED = -1574012,
- YELL_SKARVALD_SKA_DIEDFIRST = -1574013,
- YELL_SKARVALD_KILL = -1574014,
- YELL_SKARVALD_DAL_DIEDFIRST = -1574015,
+ YELL_SKARVALD_AGGRO = 0,
+ YELL_SKARVALD_DAL_DIED = 1,
+ YELL_SKARVALD_SKA_DIEDFIRST = 2,
+ YELL_SKARVALD_KILL = 3,
+ YELL_SKARVALD_DAL_DIEDFIRST = 4,
//signed for 24201, but used by 24201, 27389
- YELL_DALRONN_AGGRO = -1574016,
- YELL_DALRONN_SKA_DIED = -1574017,
- YELL_DALRONN_DAL_DIEDFIRST = -1574018,
- YELL_DALRONN_KILL = -1574019,
- YELL_DALRONN_SKA_DIEDFIRST = -1574020,
+ YELL_DALRONN_AGGRO = 0,
+ YELL_DALRONN_SKA_DIED = 1,
+ YELL_DALRONN_DAL_DIEDFIRST = 2,
+ YELL_DALRONN_KILL = 3,
+ YELL_DALRONN_SKA_DIEDFIRST = 4,
//Spells of Skarvald and his Ghost
MOB_SKARVALD_THE_CONSTRUCTOR = 24200,
@@ -123,7 +123,7 @@ public:
{
if (!ghost && instance)
{
- DoScriptText(YELL_SKARVALD_AGGRO, me);
+ Talk(YELL_SKARVALD_AGGRO);
Unit* dalronn = Unit::GetUnit(*me, instance->GetData64(DATA_DALRONN));
if (dalronn && dalronn->isAlive() && !dalronn->getVictim())
@@ -151,13 +151,13 @@ public:
{
if (dalronn->isDead())
{
- DoScriptText(YELL_SKARVALD_DAL_DIED, me);
+ Talk(YELL_SKARVALD_DAL_DIED);
instance->SetData(DATA_SKARVALD_DALRONN_EVENT, DONE);
}
else
{
- DoScriptText(YELL_SKARVALD_SKA_DIEDFIRST, me);
+ Talk(YELL_SKARVALD_SKA_DIEDFIRST);
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
//DoCast(me, SPELL_SUMMON_SKARVALD_GHOST, true);
@@ -176,7 +176,7 @@ public:
{
if (!ghost)
{
- DoScriptText(YELL_SKARVALD_KILL, me);
+ Talk(YELL_SKARVALD_KILL);
}
}
@@ -211,7 +211,7 @@ public:
{
if (Response_Timer <= diff)
{
- DoScriptText(YELL_SKARVALD_DAL_DIEDFIRST, me);
+ Talk(YELL_SKARVALD_DAL_DIEDFIRST);
Response_Timer = 0;
} else Response_Timer -= diff;
@@ -310,14 +310,14 @@ public:
{
if (skarvald->isDead())
{
- DoScriptText(YELL_DALRONN_SKA_DIED, me);
+ Talk(YELL_DALRONN_SKA_DIED);
if (instance)
instance->SetData(DATA_SKARVALD_DALRONN_EVENT, DONE);
}
else
{
- DoScriptText(YELL_DALRONN_DAL_DIEDFIRST, me);
+ Talk(YELL_DALRONN_DAL_DIEDFIRST);
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
//DoCast(me, SPELL_SUMMON_DALRONN_GHOST, true);
@@ -336,7 +336,7 @@ public:
{
if (!ghost)
{
- DoScriptText(YELL_DALRONN_KILL, me);
+ Talk(YELL_DALRONN_KILL);
}
}
@@ -355,7 +355,7 @@ public:
{
if (AggroYell_Timer <= diff)
{
- DoScriptText(YELL_DALRONN_AGGRO, me);
+ Talk(YELL_DALRONN_AGGRO);
AggroYell_Timer = 0;
} else AggroYell_Timer -= diff;
@@ -382,7 +382,7 @@ public:
{
if (Response_Timer <= diff)
{
- DoScriptText(YELL_DALRONN_SKA_DIEDFIRST, me);
+ Talk(YELL_DALRONN_SKA_DIEDFIRST);
Response_Timer = 0;
} else Response_Timer -= diff;
}
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp
index 8cbfe4bafb4..d2772514edf 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp
@@ -47,10 +47,9 @@ enum OrbSpells
//not in db
enum Yells
{
- SAY_AGGRO = -1575000,
- SAY_SLAY_1 = -1575001,
- SAY_SLAY_2 = -1575002,
- SAY_DEATH = -1575003
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1
+ //SAY_DEATH = 2 Missing in database
};
enum Creatures
@@ -155,7 +154,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void AttackStart(Unit* who)
@@ -212,7 +211,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ //Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_GORTOK_PALEHOOF_EVENT, DONE);
Creature* temp = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_MOB_ORB) : 0);
@@ -222,7 +221,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void NextPhase()
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
index 63898e57c08..45bab11c46a 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
@@ -34,16 +34,13 @@ Script Data End */
//Yell
enum eYells
{
- SAY_AGGRO = -1575004,
- SAY_KILL_1 = -1575005,
- SAY_KILL_2 = -1575006,
- EMOTE_RANGE = -1575007, //Skadi
- SAY_DEATH = -1575008,
- SAY_DRAKE_DEATH = -1575009,
- EMOTE_BREATH = -1575010, //Grauf
- SAY_DRAKE_BREATH_1 = -1575011,
- SAY_DRAKE_BREATH_2 = -1575012,
- SAY_DRAKE_BREATH_3 = -1575013,
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ EMOTE_RANGE = 2,
+ SAY_DEATH = 3,
+ SAY_DRAKE_DEATH = 4,
+ EMOTE_BREATH = 5,
+ SAY_DRAKE_BREATH = 6
};
static Position SpawnLoc = {468.931f, -513.555f, 104.723f, 0};
@@ -230,7 +227,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
@@ -297,7 +294,7 @@ public:
}
me->GetMotionMaster()->MoveJump(Location[4].GetPositionX(), Location[4].GetPositionY(), Location[4].GetPositionZ(), 5.0f, 10.0f);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
- DoScriptText(SAY_DRAKE_DEATH, me);
+ Talk(SAY_DRAKE_DEATH);
m_uiCrushTimer = 8000;
m_uiPoisonedSpearTimer = 10000;
m_uiWhirlwindTimer = 20000;
@@ -319,7 +316,7 @@ public:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
if (!m_bSaidEmote)
{
- DoScriptText(EMOTE_RANGE, me);
+ Talk(EMOTE_RANGE);
m_bSaidEmote = true;
}
}
@@ -360,8 +357,8 @@ public:
break;
case 3:
me->GetMotionMaster()->MovePoint(0, Location[69].GetPositionX(), Location[69].GetPositionY(), Location[69].GetPositionZ());
- DoScriptText(RAND(SAY_DRAKE_BREATH_1, SAY_DRAKE_BREATH_2), me);
- DoScriptText(EMOTE_BREATH, me);
+ Talk(SAY_DRAKE_BREATH);
+ Talk(EMOTE_BREATH);
m_uiMovementTimer = 2500;
break;
case 4:
@@ -413,7 +410,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
Summons.DespawnAll();
if (instance)
instance->SetData(DATA_SKADI_THE_RUTHLESS_EVENT, DONE);
@@ -421,7 +418,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
+ Talk(SAY_KILL);
}
void SpawnMobs()
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
index 0278125deb3..96cfee7c2b8 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
@@ -55,16 +55,13 @@ enum Spells
//not in db
enum Yells
{
- SAY_AGGRO = -1575028,
- SAY_SLAY_1 = -1575029,
- SAY_SLAY_2 = -1575030,
- SAY_SLAY_3 = -1575031,
- SAY_SLAY_4 = -1575032,
- SAY_DEATH = -1575033,
- SAY_SUMMON_BJORN = -1575034,
- SAY_SUMMON_HALDOR = -1575035,
- SAY_SUMMON_RANULF = -1575036,
- SAY_SUMMON_TORGYN = -1575037
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SUMMON_BJORN = 3,
+ SAY_SUMMON_HALDOR = 4,
+ SAY_SUMMON_RANULF = 5,
+ SAY_SUMMON_TORGYN = 6
};
enum Creatures
@@ -190,7 +187,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_KING_YMIRON_EVENT, IN_PROGRESS);
@@ -216,7 +213,7 @@ public:
{
if (m_uiPause_Timer <= diff)
{
- DoScriptText(ActiveBoat[m_uiActiveOrder[m_uiActivedNumber]].say, me);
+ Talk(ActiveBoat[m_uiActiveOrder[m_uiActivedNumber]].say);
DoCast(me, SPELL_CHANNEL_YMIRON_TO_SPIRIT); // should be on spirit
if (Creature* temp = me->SummonCreature(ActiveBoat[m_uiActiveOrder[m_uiActivedNumber]].npc, ActiveBoat[m_uiActiveOrder[m_uiActivedNumber]].SpawnX, ActiveBoat[m_uiActiveOrder[m_uiActivedNumber]].SpawnY, ActiveBoat[m_uiActiveOrder[m_uiActivedNumber]].SpawnZ, ActiveBoat[m_uiActiveOrder[m_uiActivedNumber]].SpawnO, TEMPSUMMON_CORPSE_DESPAWN, 0))
{
@@ -370,7 +367,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
DespawnBoatGhosts(m_uiActivedCreatureGUID);
DespawnBoatGhosts(m_uiOrbGUID);
@@ -381,7 +378,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3, SAY_SLAY_4), me);
+ Talk(SAY_SLAY);
}
void DespawnBoatGhosts(uint64 m_uiCreatureGUID)
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp
index 96e0bc66bd1..8a5e25e4487 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp
@@ -19,7 +19,10 @@
#include "ScriptedCreature.h"
#include "vault_of_archavon.h"
-#define EMOTE_BERSERK -1590002
+enum
+{
+ EMOTE_BERSERK = 0
+};
//Spells Archavon
#define SPELL_ROCK_SHARDS 58678
@@ -109,7 +112,7 @@ class boss_archavon : public CreatureScript
break;
case EVENT_BERSERK:
DoCast(me, SPELL_BERSERK);
- DoScriptText(EMOTE_BERSERK, me);
+ Talk(EMOTE_BERSERK);
break;
default:
break;
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp
index 903280d317a..b61bb20389d 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp
@@ -37,9 +37,9 @@ enum Spells
enum BossEmotes
{
- EMOTE_OVERCHARGE = -1590000,
- EMOTE_MINION_RESPAWN = -1590001,
- EMOTE_BERSERK = -1590002,
+ EMOTE_OVERCHARGE = 0,
+ EMOTE_MINION_RESPAWN = 1,
+ EMOTE_BERSERK = 2
};
enum Events
@@ -146,14 +146,14 @@ class boss_emalon : public CreatureScript
{
minion->CastSpell(me, SPELL_OVERCHARGED, true);
minion->SetFullHealth();
- DoScriptText(EMOTE_OVERCHARGE, me);
+ Talk(EMOTE_OVERCHARGE);
events.ScheduleEvent(EVENT_OVERCHARGE, 45000);
}
}
break;
case EVENT_BERSERK:
DoCast(me, SPELL_BERSERK);
- DoScriptText(EMOTE_BERSERK, me);
+ Talk(EMOTE_BERSERK);
break;
default:
break;
@@ -198,7 +198,7 @@ class mob_tempest_minion : public CreatureScript
if (emalon->isAlive())
{
emalon->SummonCreature(MOB_TEMPEST_MINION, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
- DoScriptText(EMOTE_MINION_RESPAWN, me);
+ Talk(EMOTE_MINION_RESPAWN);
}
}
}
@@ -244,7 +244,7 @@ class mob_tempest_minion : public CreatureScript
{
DoCast(me, SPELL_OVERCHARGED_BLAST);
me->DespawnOrUnsummon();
- DoScriptText(EMOTE_MINION_RESPAWN, me);
+ Talk(EMOTE_MINION_RESPAWN);
}
}
}
diff --git a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp
index b4ce402e7de..7b1b9e96baf 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp
@@ -34,16 +34,13 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1608000,
- SAY_SLAY_1 = -1608001,
- SAY_SLAY_2 = -1608002,
- SAY_SLAY_3 = -1608003,
- SAY_DEATH = -1608004,
- SAY_SPAWN = -1608005,
- SAY_DISRUPTION = -1608006,
- SAY_BREATH_ATTACK = -1608007,
- SAY_SPECIAL_ATTACK_1 = -1608008,
- SAY_SPECIAL_ATTACK_2 = -1608009
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SPAWN = 3,
+ SAY_DISRUPTION = 4,
+ SAY_BREATH_ATTACK = 5,
+ SAY_SPECIAL_ATTACK = 6
};
class boss_cyanigosa : public CreatureScript
@@ -84,7 +81,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_CYANIGOSA_EVENT, IN_PROGRESS);
@@ -144,7 +141,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_CYANIGOSA_EVENT, DONE);
@@ -154,7 +151,7 @@ public:
{
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
index bd59b731c3c..15cd12140cf 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
@@ -34,14 +34,12 @@ enum Spells
enum Yells
{
- SAY_AGGRO = -1608010,
- SAY_SLAY_1 = -1608011,
- SAY_SLAY_2 = -1608012,
- SAY_SLAY_3 = -1608013,
- SAY_DEATH = -1608014,
- SAY_SPAWN = -1608015,
- SAY_ADD_KILLED = -1608016,
- SAY_BOTH_ADDS_KILLED = -1608017
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SPAWN = 3,
+ SAY_ADD_KILLED = 4,
+ SAY_BOTH_ADDS_KILLED = 5
};
class boss_erekem : public CreatureScript
@@ -125,7 +123,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoCast(me, SPELL_EARTH_SHIELD);
if (instance)
@@ -209,7 +207,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
{
@@ -230,7 +228,7 @@ public:
{
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
uint64 GetChainHealTargetGUID()
diff --git a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
index cea00417233..fba7efe43ab 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
@@ -40,15 +40,13 @@ enum IchoronCreatures
enum Yells
{
- SAY_AGGRO = -1608018,
- SAY_SLAY_1 = -1608019,
- SAY_SLAY_2 = -1608020,
- SAY_SLAY_3 = -1608021,
- SAY_DEATH = -1608022,
- SAY_SPAWN = -1608023,
- SAY_ENRAGE = -1608024,
- SAY_SHATTER = -1608025,
- SAY_BUBBLE = -1608026
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SPAWN = 3,
+ SAY_ENRAGE = 4,
+ SAY_SHATTER = 5,
+ SAY_BUBBLE = 6
};
enum Actions
@@ -120,7 +118,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoCast(me, SPELL_PROTECTIVE_BUBBLE);
@@ -189,7 +187,7 @@ public:
if (!HealthBelowPct(25))
{
- DoScriptText(SAY_BUBBLE, me);
+ Talk(SAY_BUBBLE);
DoCast(me, SPELL_PROTECTIVE_BUBBLE, true);
}
@@ -214,7 +212,7 @@ public:
if (!bIsFrenzy && HealthBelowPct(25) && !bIsExploded)
{
- DoScriptText(SAY_ENRAGE, me);
+ Talk(SAY_ENRAGE);
DoCast(me, SPELL_FRENZY, true);
bIsFrenzy = true;
}
@@ -227,7 +225,7 @@ public:
{
if (!me->HasAura(SPELL_PROTECTIVE_BUBBLE, 0))
{
- DoScriptText(SAY_SHATTER, me);
+ Talk(SAY_SHATTER);
DoCast(me, SPELL_WATER_BLAST);
DoCast(me, SPELL_DRAINED);
bIsExploded = true;
@@ -277,7 +275,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (bIsExploded)
{
@@ -326,7 +324,7 @@ public:
{
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
index 58d7b59c7dd..429b2ac32ea 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
@@ -22,41 +22,38 @@
enum Spells
{
- SPELL_ARCANE_BARRAGE_VOLLEY = 54202,
- SPELL_ARCANE_BARRAGE_VOLLEY_H = 59483,
- SPELL_ARCANE_BUFFET = 54226,
- SPELL_ARCANE_BUFFET_H = 59485,
- SPELL_SUMMON_ETHEREAL_SPHERE_1 = 54102,
- SPELL_SUMMON_ETHEREAL_SPHERE_2 = 54137,
- SPELL_SUMMON_ETHEREAL_SPHERE_3 = 54138,
+ SPELL_ARCANE_BARRAGE_VOLLEY = 54202,
+ SPELL_ARCANE_BARRAGE_VOLLEY_H = 59483,
+ SPELL_ARCANE_BUFFET = 54226,
+ SPELL_ARCANE_BUFFET_H = 59485,
+ SPELL_SUMMON_ETHEREAL_SPHERE_1 = 54102,
+ SPELL_SUMMON_ETHEREAL_SPHERE_2 = 54137,
+ SPELL_SUMMON_ETHEREAL_SPHERE_3 = 54138,
};
enum NPCs
{
- NPC_ETHEREAL_SPHERE = 29271,
- //NPC_ETHEREAL_SPHERE2 = 32582, // heroic only?
+ NPC_ETHEREAL_SPHERE = 29271,
+ //NPC_ETHEREAL_SPHERE2 = 32582, // heroic only?
};
enum CreatureSpells
{
- SPELL_ARCANE_POWER = 54160,
- H_SPELL_ARCANE_POWER = 59474,
- SPELL_SUMMON_PLAYERS = 54164,
- SPELL_POWER_BALL_VISUAL = 54141,
+ SPELL_ARCANE_POWER = 54160,
+ H_SPELL_ARCANE_POWER = 59474,
+ SPELL_SUMMON_PLAYERS = 54164,
+ SPELL_POWER_BALL_VISUAL = 54141,
};
enum Yells
{
- SAY_AGGRO = -1608027,
- SAY_SLAY_1 = -1608028,
- SAY_SLAY_2 = -1608029,
- SAY_SLAY_3 = -1608030,
- SAY_DEATH = -1608031,
- SAY_SPAWN = -1608032,
- SAY_CHARGED = -1608033,
- SAY_REPEAT_SUMMON_1 = -1608034,
- SAY_REPEAT_SUMMON_2 = -1608035,
- SAY_SUMMON_ENERGY = -1608036
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SPAWN = 3,
+ SAY_CHARGED = 4,
+ SAY_REPEAT_SUMMON = 5,
+ SAY_SUMMON_ENERGY = 6
};
class boss_xevozz : public CreatureScript
@@ -139,7 +136,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
{
if (GameObject* pDoor = instance->instance->GetGameObject(instance->GetData64(DATA_XEVOZZ_CELL)))
@@ -182,7 +179,7 @@ public:
if (uiSummonEtherealSphere_Timer < uiDiff)
{
- DoScriptText(SAY_SPAWN, me);
+ Talk(SAY_SPAWN);
DoCast(me, SPELL_SUMMON_ETHEREAL_SPHERE_1);
if (IsHeroic()) // extra one for heroic
me->SummonCreature(NPC_ETHEREAL_SPHERE, me->GetPositionX()-5+rand()%10, me->GetPositionY()-5+rand()%10, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 40000);
@@ -197,7 +194,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
DespawnSphere();
@@ -220,7 +217,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
index 408a7083383..5216ae9f08d 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
@@ -38,14 +38,12 @@ enum ZuramatCreatures
enum Yells
{
- SAY_AGGRO = -1608037,
- SAY_SLAY_1 = -1608038,
- SAY_SLAY_2 = -1608039,
- SAY_SLAY_3 = -1608040,
- SAY_DEATH = -1608041,
- SAY_SPAWN = -1608042,
- SAY_SHIELD = -1608043,
- SAY_WHISPER = -1608044
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_SPAWN = 3,
+ SAY_SHIELD = 4,
+ SAY_WHISPER = 5
};
#define DATA_VOID_DANCE 2153
@@ -106,7 +104,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
{
if (GameObject* pDoor = instance->instance->GetGameObject(instance->GetData64(DATA_ZURAMAT_CELL)))
@@ -168,7 +166,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
{
@@ -190,7 +188,7 @@ public:
if (victim == me)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
void JustSummoned(Creature* summon)
diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
index 5e3bbc01025..c1c93c789de 100644
--- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
+++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
@@ -16,6 +16,7 @@
*/
#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
#include "InstanceScript.h"
#include "violet_hold.h"
#include "Player.h"
@@ -94,7 +95,7 @@ const Position MiddleRoomPortalSaboLocation = {1896.622925f, 804.854126f, 38.504
//Cyanigosa's prefight event data
enum Yells
{
- CYANIGOSA_SAY_SPAWN = -1608005
+ CYANIGOSA_SAY_SPAWN = 0
};
enum Spells
@@ -742,7 +743,7 @@ public:
{
case 1:
pCyanigosa->CastSpell(pCyanigosa, CYANIGOSA_BLUE_AURA, false);
- DoScriptText(CYANIGOSA_SAY_SPAWN, pCyanigosa);
+ pCyanigosa->AI()->Talk(CYANIGOSA_SAY_SPAWN);
uiCyanigosaEventTimer = 7*IN_MILLISECONDS;
++uiCyanigosaEventPhase;
break;
diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
index c73cb97f2d1..5e326af9891 100644
--- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
+++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
@@ -125,7 +125,7 @@ enum Spells
enum eSinclari
{
- SAY_SINCLARI_1 = -1608045
+ SAY_SINCLARI_1 = 0
};
float FirstPortalWPs [6][3] =
@@ -353,7 +353,7 @@ public:
switch (uiPhase)
{
case 1:
- DoScriptText(SAY_SINCLARI_1, me);
+ Talk(SAY_SINCLARI_1);
uiTimer = 4000;
uiPhase = 2;
break;
diff --git a/src/server/scripts/Northrend/borean_tundra.cpp b/src/server/scripts/Northrend/borean_tundra.cpp
index 6eed82991b8..3f20a3d32bc 100644
--- a/src/server/scripts/Northrend/borean_tundra.cpp
+++ b/src/server/scripts/Northrend/borean_tundra.cpp
@@ -29,7 +29,6 @@ npc_corastrasza
npc_jenny
npc_sinkhole_kill_credit
npc_khunok_the_behemoth
-npc_scourge_prisoner
mob_nerubar_victim
npc_keristrasza
npc_nesingwary_trapper
@@ -67,26 +66,26 @@ public:
{
npc_sinkhole_kill_creditAI(Creature* creature) : ScriptedAI(creature){}
- uint32 uiPhaseTimer;
- uint8 Phase;
+ uint32 phaseTimer;
+ uint8 phase;
uint64 casterGuid;
void Reset()
{
- uiPhaseTimer = 500;
- Phase = 0;
+ phaseTimer = 500;
+ phase = 0;
casterGuid = 0;
}
void SpellHit(Unit* caster, const SpellInfo* spell)
{
- if (Phase)
+ if (phase)
return;
if (spell->Id == SPELL_SET_CART && caster->GetTypeId() == TYPEID_PLAYER
&& CAST_PLR(caster)->GetQuestStatus(11897) == QUEST_STATUS_INCOMPLETE)
{
- Phase = 1;
+ phase = 1;
casterGuid = caster->GetGUID();
}
}
@@ -95,32 +94,32 @@ public:
void UpdateAI(const uint32 diff)
{
- if (!Phase)
+ if (!phase)
return;
- if (uiPhaseTimer <= diff)
+ if (phaseTimer <= diff)
{
- switch (Phase)
+ switch (phase)
{
case 1:
DoCast(me, SPELL_EXPLODE_CART, true);
DoCast(me, SPELL_SUMMON_CART, true);
if (GameObject* cart = me->FindNearestGameObject(188160, 3))
cart->SetUInt32Value(GAMEOBJECT_FACTION, 14);
- uiPhaseTimer = 3000;
- Phase = 2;
+ phaseTimer = 3000;
+ phase = 2;
break;
case 2:
if (GameObject* cart = me->FindNearestGameObject(188160, 3))
cart->UseDoorOrButton();
DoCast(me, SPELL_EXPLODE_CART, true);
- uiPhaseTimer = 3000;
- Phase = 3;
+ phaseTimer = 3000;
+ phase = 3;
break;
case 3:
DoCast(me, SPELL_EXPLODE_CART, true);
- uiPhaseTimer = 2000;
- Phase = 4;
+ phaseTimer = 2000;
+ phase = 4;
case 5:
DoCast(me, SPELL_SUMMON_WORM, true);
if (Unit* worm = me->FindNearestCreature(26250, 3))
@@ -128,8 +127,8 @@ public:
worm->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
worm->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE);
}
- uiPhaseTimer = 1000;
- Phase = 6;
+ phaseTimer = 1000;
+ phase = 6;
break;
case 6:
DoCast(me, SPELL_EXPLODE_CART, true);
@@ -138,21 +137,21 @@ public:
me->Kill(worm);
worm->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
}
- uiPhaseTimer = 2000;
- Phase = 7;
+ phaseTimer = 2000;
+ phase = 7;
break;
case 7:
DoCast(me, SPELL_EXPLODE_CART, true);
if (Player* caster = Unit::GetPlayer(*me, casterGuid))
caster->KilledMonster(me->GetCreatureTemplate(), me->GetGUID());
- uiPhaseTimer = 5000;
- Phase = 8;
+ phaseTimer = 5000;
+ phase = 8;
break;
case 8:
EnterEvadeMode();
break;
}
- } else uiPhaseTimer -= diff;
+ } else phaseTimer -= diff;
}
@@ -387,41 +386,6 @@ public:
};
/*######
-## npc_scourge_prisoner
-######*/
-
-enum eScourgePrisoner
-{
- GO_SCOURGE_CAGE = 187867
-};
-
-class npc_scourge_prisoner : public CreatureScript
-{
-public:
- npc_scourge_prisoner() : CreatureScript("npc_scourge_prisoner") { }
-
- struct npc_scourge_prisonerAI : public ScriptedAI
- {
- npc_scourge_prisonerAI(Creature* creature) : ScriptedAI (creature){}
-
- void Reset()
- {
- me->SetReactState(REACT_PASSIVE);
-
- if (GameObject* go = me->FindNearestGameObject(GO_SCOURGE_CAGE, 5.0f))
- if (go->GetGoState() == GO_STATE_ACTIVE)
- go->SetGoState(GO_STATE_READY);
- }
-
- };
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new npc_scourge_prisonerAI(creature);
- }
-};
-
-/*######
## npc_jenny
######*/
@@ -583,14 +547,14 @@ public:
npc_nesingwary_trapperAI(Creature* creature) : ScriptedAI(creature) { creature->SetVisible(false); }
uint64 go_caribouGUID;
- uint8 Phase;
- uint32 uiPhaseTimer;
+ uint8 phase;
+ uint32 phaseTimer;
void Reset()
{
me->SetVisible(false);
- uiPhaseTimer = 2500;
- Phase = 1;
+ phaseTimer = 2500;
+ phase = 1;
go_caribouGUID = 0;
}
@@ -614,41 +578,41 @@ public:
void UpdateAI(const uint32 diff)
{
- if (uiPhaseTimer <= diff)
+ if (phaseTimer <= diff)
{
- switch (Phase)
+ switch (phase)
{
case 1:
me->SetVisible(true);
- uiPhaseTimer = 2000;
- Phase = 2;
+ phaseTimer = 2000;
+ phase = 2;
break;
case 2:
if (GameObject* go_fur = me->FindNearestGameObject(GO_HIGH_QUALITY_FUR, 11.0f))
me->GetMotionMaster()->MovePoint(0, go_fur->GetPositionX(), go_fur->GetPositionY(), go_fur->GetPositionZ());
- uiPhaseTimer = 1500;
- Phase = 3;
+ phaseTimer = 1500;
+ phase = 3;
break;
case 3:
- //DoScriptText(SAY_NESINGWARY_1, me);
- uiPhaseTimer = 2000;
- Phase = 4;
+ //Talk(SAY_NESINGWARY_1);
+ phaseTimer = 2000;
+ phase = 4;
break;
case 4:
me->HandleEmoteCommand(EMOTE_ONESHOT_LOOT);
- uiPhaseTimer = 1000;
- Phase = 5;
+ phaseTimer = 1000;
+ phase = 5;
break;
case 5:
me->HandleEmoteCommand(EMOTE_ONESHOT_NONE);
- uiPhaseTimer = 500;
- Phase = 6;
+ phaseTimer = 500;
+ phase = 6;
break;
case 6:
if (GameObject* go_fur = me->FindNearestGameObject(GO_HIGH_QUALITY_FUR, 11.0f))
go_fur->Delete();
- uiPhaseTimer = 500;
- Phase = 7;
+ phaseTimer = 500;
+ phase = 7;
break;
case 7:
{
@@ -663,16 +627,16 @@ public:
break;
}
}
- Phase = 8;
- uiPhaseTimer = 1000;
+ phase = 8;
+ phaseTimer = 1000;
}
break;
case 8:
DoCast(me, SPELL_TRAPPED, true);
- Phase = 0;
+ phase = 0;
break;
}
- } else uiPhaseTimer -= diff;
+ } else phaseTimer -= diff;
}
};
@@ -694,12 +658,12 @@ enum eLurgglbr
FACTION_ESCORTEE_A = 774,
FACTION_ESCORTEE_H = 775,
-};
-/*#define SAY_WP_1_LUR_START -1571004
-#define SAY_WP_1_LUR_END -1571005
-#define SAY_WP_41_LUR_START -1571006
-#define SAY_WP_41_LUR_END -1571007*/
+ SAY_START_1 = 0,
+ SAY_START_2 = 1,
+ SAY_END_1 = 2,
+ SAY_END_2 = 3
+};
class npc_lurgglbr : public CreatureScript
{
@@ -746,12 +710,12 @@ public:
switch (IntroPhase)
{
case 1:
- //DoScriptText(SAY_WP_1_LUR_START, me);
+ Talk(SAY_START_1);
IntroPhase = 2;
IntroTimer = 7500;
break;
case 2:
- //DoScriptText(SAY_WP_1_LUR_END, me);
+ Talk(SAY_END_1);
IntroPhase = 3;
IntroTimer = 7500;
break;
@@ -761,12 +725,12 @@ public:
IntroTimer = 0;
break;
case 4:
- //DoScriptText(SAY_WP_41_LUR_START, me);
+ Talk(SAY_START_2);
IntroPhase = 5;
IntroTimer = 8000;
break;
case 5:
- //DoScriptText(SAY_WP_41_LUR_END, me);
+ Talk(SAY_END_2);
IntroPhase = 6;
IntroTimer = 2500;
break;
@@ -951,26 +915,30 @@ enum eThassarian
NPC_GENERAL_ARLOS = 25250,
NPC_LERYSSA = 25251,
- SAY_TALBOT_1 = -1571004,
- SAY_LICH_1 = -1571005,
- SAY_TALBOT_2 = -1571006,
- SAY_THASSARIAN_1 = -1571007,
- SAY_THASSARIAN_2 = -1571008,
- SAY_LICH_2 = -1571009,
- SAY_THASSARIAN_3 = -1571010,
- SAY_TALBOT_3 = -1571011,
- SAY_LICH_3 = -1571012,
- SAY_TALBOT_4 = -1571013,
- SAY_ARLOS_1 = -1571014,
- SAY_ARLOS_2 = -1571015,
- SAY_LERYSSA_1 = -1571016,
- SAY_THASSARIAN_4 = -1571017,
- SAY_LERYSSA_2 = -1571018,
- SAY_THASSARIAN_5 = -1571019,
- SAY_LERYSSA_3 = -1571020,
- SAY_THASSARIAN_6 = -1571021,
- SAY_LERYSSA_4 = -1571022,
- SAY_THASSARIAN_7 = -1571023,
+ SAY_THASSARIAN_1 = 0,
+ SAY_THASSARIAN_2 = 1,
+ SAY_THASSARIAN_3 = 2,
+ SAY_THASSARIAN_4 = 3,
+ SAY_THASSARIAN_5 = 4,
+ SAY_THASSARIAN_6 = 5,
+ SAY_THASSARIAN_7 = 6,
+
+ SAY_TALBOT_1 = 0,
+ SAY_TALBOT_2 = 1,
+ SAY_TALBOT_3 = 2,
+ SAY_TALBOT_4 = 3,
+
+ SAY_LICH_1 = 0,
+ SAY_LICH_2 = 1,
+ SAY_LICH_3 = 2,
+
+ SAY_ARLOS_1 = 0,
+ SAY_ARLOS_2 = 1,
+
+ SAY_LERYSSA_1 = 0,
+ SAY_LERYSSA_2 = 1,
+ SAY_LERYSSA_3 = 2,
+ SAY_LERYSSA_4 = 3
};
#define GOSSIP_ITEM_T "Let's do this, Thassarian. It's now or never."
@@ -982,40 +950,38 @@ public:
struct npc_thassarianAI : public npc_escortAI
{
- npc_thassarianAI(Creature* creature) : npc_escortAI(creature)
- {
- }
+ npc_thassarianAI(Creature* creature) : npc_escortAI(creature) {}
- uint64 uiArthas;
- uint64 uiTalbot;
- uint64 uiLeryssa;
- uint64 uiArlos;
+ uint64 arthasGUID;
+ uint64 talbotGUID;
+ uint64 leryssaGUID;
+ uint64 arlosGUID;
- bool bArthasInPosition;
- bool bArlosInPosition;
- bool bLeryssaInPosition;
- bool bTalbotInPosition;
+ bool arthasInPosition;
+ bool arlosInPosition;
+ bool leryssaInPosition;
+ bool talbotInPosition;
- uint32 uiPhase;
- uint32 uiPhaseTimer;
+ uint32 phase;
+ uint32 phaseTimer;
void Reset()
{
me->RestoreFaction();
me->RemoveStandFlags(UNIT_STAND_STATE_SIT);
- uiArthas = 0;
- uiTalbot = 0;
- uiLeryssa = 0;
- uiArlos = 0;
+ arthasGUID = 0;
+ talbotGUID = 0;
+ leryssaGUID = 0;
+ arlosGUID = 0;
- bArthasInPosition = false;
- bArlosInPosition = false;
- bLeryssaInPosition = false;
- bTalbotInPosition = false;
+ arthasInPosition = false;
+ arlosInPosition = false;
+ leryssaInPosition = false;
+ talbotInPosition = false;
- uiPhase = 0;
- uiPhaseTimer = 0;
+ phase = 0;
+ phaseTimer = 0;
}
void WaypointReached(uint32 waypointId)
@@ -1028,25 +994,25 @@ public:
{
case 3:
SetEscortPaused(true);
- if (Creature* pArthas = me->SummonCreature(NPC_IMAGE_LICH_KING, 3730.313f, 3518.689f, 473.324f, 1.562f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000))
+ if (Creature* arthas = me->SummonCreature(NPC_IMAGE_LICH_KING, 3730.313f, 3518.689f, 473.324f, 1.562f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000))
{
- uiArthas = pArthas->GetGUID();
- pArthas->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- pArthas->SetReactState(REACT_PASSIVE);
- pArthas->SetWalk(true);
- pArthas->GetMotionMaster()->MovePoint(0, 3737.374756f, 3564.841309f, 477.433014f);
+ arthasGUID = arthas->GetGUID();
+ arthas->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ arthas->SetReactState(REACT_PASSIVE);
+ arthas->SetWalk(true);
+ arthas->GetMotionMaster()->MovePoint(0, 3737.374756f, 3564.841309f, 477.433014f);
}
- if (Creature* pTalbot = me->SummonCreature(NPC_COUNSELOR_TALBOT, 3747.23f, 3614.936f, 473.321f, 4.462012f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000))
+ if (Creature* talbot = me->SummonCreature(NPC_COUNSELOR_TALBOT, 3747.23f, 3614.936f, 473.321f, 4.462012f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000))
{
- uiTalbot = pTalbot->GetGUID();
- pTalbot->SetWalk(true);
- pTalbot->GetMotionMaster()->MovePoint(0, 3738.000977f, 3568.882080f, 477.433014f);
+ talbotGUID = talbot->GetGUID();
+ talbot->SetWalk(true);
+ talbot->GetMotionMaster()->MovePoint(0, 3738.000977f, 3568.882080f, 477.433014f);
}
me->SetWalk(false);
break;
case 4:
SetEscortPaused(true);
- uiPhase = 7;
+ phase = 7;
break;
}
}
@@ -1055,173 +1021,173 @@ public:
{
npc_escortAI::UpdateAI(uiDiff);
- if (bArthasInPosition && bTalbotInPosition)
+ if (arthasInPosition && talbotInPosition)
{
- uiPhase = 1;
- bArthasInPosition = false;
- bTalbotInPosition = false;
+ phase = 1;
+ arthasInPosition = false;
+ talbotInPosition = false;
}
- if (bArlosInPosition && bLeryssaInPosition)
+ if (arlosInPosition && leryssaInPosition)
{
- bArlosInPosition = false;
- bLeryssaInPosition = false;
- DoScriptText(SAY_THASSARIAN_1, me);
+ arlosInPosition = false;
+ leryssaInPosition = false;
+ Talk(SAY_THASSARIAN_1);
SetEscortPaused(false);
}
- if (uiPhaseTimer <= uiDiff)
+ if (phaseTimer <= uiDiff)
{
- Creature* pTalbot = me->GetCreature(*me, uiTalbot);
- Creature* pArthas = me->GetCreature(*me, uiArthas);
- switch (uiPhase)
+ Creature* talbot = me->GetCreature(*me, talbotGUID);
+ Creature* arthas = me->GetCreature(*me, arthasGUID);
+ switch (phase)
{
case 1:
- if (pTalbot)
- pTalbot->SetStandState(UNIT_STAND_STATE_KNEEL);
- uiPhaseTimer = 3000;
- ++uiPhase;
+ if (talbot)
+ talbot->SetStandState(UNIT_STAND_STATE_KNEEL);
+ phaseTimer = 3000;
+ ++phase;
break;
case 2:
- if (pTalbot)
+ if (talbot)
{
- pTalbot->UpdateEntry(NPC_PRINCE_VALANAR, ALLIANCE);
- pTalbot->setFaction(14);
- pTalbot->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- pTalbot->SetReactState(REACT_PASSIVE);
+ talbot->UpdateEntry(NPC_PRINCE_VALANAR, ALLIANCE);
+ talbot->setFaction(14);
+ talbot->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ talbot->SetReactState(REACT_PASSIVE);
}
- uiPhaseTimer = 5000;
- ++uiPhase;
+ phaseTimer = 5000;
+ ++phase;
break;
case 3:
- if (pTalbot)
- DoScriptText(SAY_TALBOT_1, pTalbot);
- uiPhaseTimer = 5000;
- ++uiPhase;
+ if (talbot)
+ talbot->AI()->Talk(SAY_TALBOT_1);
+ phaseTimer = 5000;
+ ++phase;
break;
case 4:
- if (pArthas)
- DoScriptText(SAY_LICH_1, pArthas);
- uiPhaseTimer = 5000;
- ++uiPhase;
+ if (arthas)
+ arthas->AI()->Talk(SAY_LICH_1);
+ phaseTimer = 5000;
+ ++phase;
break;
case 5:
- if (pTalbot)
- DoScriptText(SAY_TALBOT_2, pTalbot);
- uiPhaseTimer = 5000;
- ++uiPhase;
+ if (talbot)
+ talbot->AI()->Talk(SAY_TALBOT_2);
+ phaseTimer = 5000;
+ ++phase;
break;
case 6:
- if (Creature* pArlos = me->SummonCreature(NPC_GENERAL_ARLOS, 3745.527100f, 3615.655029f, 473.321533f, 4.447805f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000))
+ if (Creature* arlos = me->SummonCreature(NPC_GENERAL_ARLOS, 3745.527100f, 3615.655029f, 473.321533f, 4.447805f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000))
{
- uiArlos = pArlos->GetGUID();
- pArlos->SetWalk(true);
- pArlos->GetMotionMaster()->MovePoint(0, 3735.570068f, 3572.419922f, 477.441010f);
+ arlosGUID = arlos->GetGUID();
+ arlos->SetWalk(true);
+ arlos->GetMotionMaster()->MovePoint(0, 3735.570068f, 3572.419922f, 477.441010f);
}
- if (Creature* pLeryssa = me->SummonCreature(NPC_LERYSSA, 3749.654541f, 3614.959717f, 473.323486f, 4.524959f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000))
+ if (Creature* leryssa = me->SummonCreature(NPC_LERYSSA, 3749.654541f, 3614.959717f, 473.323486f, 4.524959f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000))
{
- uiLeryssa = pLeryssa->GetGUID();
- pLeryssa->SetWalk(false);
- pLeryssa->SetReactState(REACT_PASSIVE);
- pLeryssa->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- pLeryssa->GetMotionMaster()->MovePoint(0, 3741.969971f, 3571.439941f, 477.441010f);
+ leryssaGUID = leryssa->GetGUID();
+ leryssa->SetWalk(false);
+ leryssa->SetReactState(REACT_PASSIVE);
+ leryssa->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ leryssa->GetMotionMaster()->MovePoint(0, 3741.969971f, 3571.439941f, 477.441010f);
}
- uiPhaseTimer = 2000;
- uiPhase = 0;
+ phaseTimer = 2000;
+ phase = 0;
break;
case 7:
- DoScriptText(SAY_THASSARIAN_2, me);
- uiPhaseTimer = 5000;
- ++uiPhase;
+ Talk(SAY_THASSARIAN_2);
+ phaseTimer = 5000;
+ ++phase;
break;
case 8:
- if (pArthas && pTalbot)
+ if (arthas && talbot)
{
- pArthas->SetInFront(me); //The client doesen't update with the new orientation :l
- pTalbot->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_LICH_2, pArthas);
+ arthas->SetInFront(me); //The client doesen't update with the new orientation :l
+ talbot->SetStandState(UNIT_STAND_STATE_STAND);
+ arthas->AI()->Talk(SAY_LICH_2);
}
- uiPhaseTimer = 5000;
- uiPhase = 9;
+ phaseTimer = 5000;
+ phase = 9;
break;
case 9:
- DoScriptText(SAY_THASSARIAN_3, me);
- uiPhaseTimer = 5000;
- uiPhase = 10;
+ Talk(SAY_THASSARIAN_3);
+ phaseTimer = 5000;
+ phase = 10;
break;
case 10:
- if (pTalbot)
- DoScriptText(SAY_TALBOT_3, pTalbot);
- uiPhaseTimer = 5000;
- uiPhase = 11;
+ if (talbot)
+ talbot->AI()->Talk(SAY_TALBOT_3);
+ phaseTimer = 5000;
+ phase = 11;
break;
case 11:
- if (pArthas)
- DoScriptText(SAY_LICH_3, pArthas);
- uiPhaseTimer = 5000;
- uiPhase = 12;
+ if (arthas)
+ arthas->AI()->Talk(SAY_LICH_3);
+ phaseTimer = 5000;
+ phase = 12;
break;
case 12:
- if (pTalbot)
- DoScriptText(SAY_TALBOT_4, pTalbot);
- uiPhaseTimer = 2000;
- uiPhase = 13;
+ if (talbot)
+ talbot->AI()->Talk(SAY_TALBOT_4);
+ phaseTimer = 2000;
+ phase = 13;
break;
case 13:
- if (pArthas)
- pArthas->RemoveFromWorld();
- ++uiPhase;
+ if (arthas)
+ arthas->RemoveFromWorld();
+ ++phase;
break;
case 14:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- if (pTalbot)
+ if (talbot)
{
- pTalbot->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- pTalbot->SetReactState(REACT_AGGRESSIVE);
- pTalbot->CastSpell(me, SPELL_SHADOW_BOLT, false);
+ talbot->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ talbot->SetReactState(REACT_AGGRESSIVE);
+ talbot->CastSpell(me, SPELL_SHADOW_BOLT, false);
}
- uiPhaseTimer = 1500;
- ++uiPhase;
+ phaseTimer = 1500;
+ ++phase;
break;
case 15:
me->SetReactState(REACT_AGGRESSIVE);
- AttackStart(pTalbot);
- uiPhase = 0;
+ AttackStart(talbot);
+ phase = 0;
break;
case 16:
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
- uiPhaseTimer = 20000;
- ++uiPhase;
+ phaseTimer = 20000;
+ ++phase;
break;
case 17:
- if (Creature* pLeryssa = me->GetCreature(*me, uiLeryssa))
- pLeryssa->RemoveFromWorld();
- if (Creature* pArlos= me->GetCreature(*me, uiArlos))
- pArlos->RemoveFromWorld();
- if (pTalbot)
- pTalbot->RemoveFromWorld();
+ if (Creature* leryssa = me->GetCreature(*me, leryssaGUID))
+ leryssa->RemoveFromWorld();
+ if (Creature* arlos= me->GetCreature(*me, arlosGUID))
+ arlos->RemoveFromWorld();
+ if (talbot)
+ talbot->RemoveFromWorld();
me->RemoveStandFlags(UNIT_STAND_STATE_SIT);
SetEscortPaused(false);
- uiPhaseTimer = 0;
- uiPhase = 0;
+ phaseTimer = 0;
+ phase = 0;
}
- } else uiPhaseTimer -= uiDiff;
+ } else phaseTimer -= uiDiff;
if (!UpdateVictim())
return;
@@ -1231,17 +1197,17 @@ public:
void JustDied(Unit* /*killer*/)
{
- if (Creature* pTalbot = me->GetCreature(*me, uiTalbot))
- pTalbot->RemoveFromWorld();
+ if (Creature* talbot = me->GetCreature(*me, talbotGUID))
+ talbot->RemoveFromWorld();
- if (Creature* pLeryssa = me->GetCreature(*me, uiLeryssa))
- pLeryssa->RemoveFromWorld();
+ if (Creature* leryssa = me->GetCreature(*me, leryssaGUID))
+ leryssa->RemoveFromWorld();
- if (Creature* pArlos = me->GetCreature(*me, uiArlos))
- pArlos->RemoveFromWorld();
+ if (Creature* arlos = me->GetCreature(*me, arlosGUID))
+ arlos->RemoveFromWorld();
- if (Creature* pArthas = me->GetCreature(*me, uiArthas))
- pArthas->RemoveFromWorld();
+ if (Creature* arthas = me->GetCreature(*me, arthasGUID))
+ arthas->RemoveFromWorld();
}
};
@@ -1302,7 +1268,7 @@ public:
if (me->isSummon())
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
- CAST_AI(npc_thassarian::npc_thassarianAI, CAST_CRE(summoner)->AI())->bArthasInPosition = true;
+ CAST_AI(npc_thassarian::npc_thassarianAI, CAST_CRE(summoner)->AI())->arthasInPosition = true;
}
};
@@ -1334,7 +1300,7 @@ public:
me->CastSpell(me, SPELL_STUN, true);
if (me->isSummon())
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
- CAST_AI(npc_thassarian::npc_thassarianAI, CAST_CRE(summoner)->AI())->bArlosInPosition = true;
+ CAST_AI(npc_thassarian::npc_thassarianAI, CAST_CRE(summoner)->AI())->arlosInPosition = true;
}
};
@@ -1366,23 +1332,23 @@ public:
creature->RestoreFaction();
}
- uint64 LeryssaGUID;
- uint64 ArlosGUID;
+ uint64 leryssaGUID;
+ uint64 arlosGUID;
bool bCheck;
- uint32 uiShadowBoltTimer;
- uint32 uiDeflectionTimer;
- uint32 uiSoulBlastTimer;
+ uint32 shadowBoltTimer;
+ uint32 deflectionTimer;
+ uint32 soulBlastTimer;
void Reset()
{
- LeryssaGUID = 0;
- ArlosGUID = 0;
+ leryssaGUID = 0;
+ arlosGUID = 0;
bCheck = false;
- uiShadowBoltTimer = urand(5000, 12000);
- uiDeflectionTimer = urand(20000, 25000);
- uiSoulBlastTimer = urand (12000, 18000);
+ shadowBoltTimer = urand(5000, 12000);
+ deflectionTimer = urand(20000, 25000);
+ soulBlastTimer = urand (12000, 18000);
}
void MovementInform(uint32 uiType, uint32 /*uiId*/)
{
@@ -1391,17 +1357,17 @@ public:
if (me->isSummon())
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
- CAST_AI(npc_thassarian::npc_thassarianAI, CAST_CRE(summoner)->AI())->bTalbotInPosition = true;
+ CAST_AI(npc_thassarian::npc_thassarianAI, CAST_CRE(summoner)->AI())->talbotInPosition = true;
}
void UpdateAI(const uint32 uiDiff)
{
if (bCheck)
{
- if (Creature* pLeryssa = me->FindNearestCreature(NPC_LERYSSA, 50.0f, true))
- LeryssaGUID = pLeryssa->GetGUID();
- if (Creature* pArlos = me->FindNearestCreature(NPC_GENERAL_ARLOS, 50.0f, true))
- ArlosGUID = pArlos->GetGUID();
+ if (Creature* leryssa = me->FindNearestCreature(NPC_LERYSSA, 50.0f, true))
+ leryssaGUID = leryssa->GetGUID();
+ if (Creature* arlos = me->FindNearestCreature(NPC_GENERAL_ARLOS, 50.0f, true))
+ arlosGUID = arlos->GetGUID();
bCheck = false;
}
@@ -1410,23 +1376,23 @@ public:
if (me->GetAreaId() == 4125)
{
- if (uiShadowBoltTimer <= uiDiff)
+ if (shadowBoltTimer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_SHADOW_BOLT);
- uiShadowBoltTimer = urand(5000, 12000);
- } else uiShadowBoltTimer -= uiDiff;
+ shadowBoltTimer = urand(5000, 12000);
+ } else shadowBoltTimer -= uiDiff;
- if (uiDeflectionTimer <= uiDiff)
+ if (deflectionTimer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_DEFLECTION);
- uiDeflectionTimer = urand(20000, 25000);
- } else uiDeflectionTimer -= uiDiff;
+ deflectionTimer = urand(20000, 25000);
+ } else deflectionTimer -= uiDiff;
- if (uiSoulBlastTimer <= uiDiff)
+ if (soulBlastTimer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_SOUL_BLAST);
- uiSoulBlastTimer = urand (12000, 18000);
- } else uiSoulBlastTimer -= uiDiff;
+ soulBlastTimer = urand (12000, 18000);
+ } else soulBlastTimer -= uiDiff;
}
DoMeleeAttackIfReady();
@@ -1434,22 +1400,22 @@ public:
void JustDied(Unit* killer)
{
- if (!LeryssaGUID || !ArlosGUID)
+ if (!leryssaGUID || !arlosGUID)
return;
- Creature* pLeryssa = Unit::GetCreature(*me, LeryssaGUID);
- Creature* pArlos = Unit::GetCreature(*me, ArlosGUID);
- if (!pLeryssa || !pArlos)
+ Creature* leryssa = Unit::GetCreature(*me, leryssaGUID);
+ Creature* arlos = Unit::GetCreature(*me, arlosGUID);
+ if (!leryssa || !arlos)
return;
- DoScriptText(SAY_ARLOS_1, pArlos);
- DoScriptText(SAY_ARLOS_2, pArlos);
- DoScriptText(SAY_LERYSSA_1, pLeryssa);
- pArlos->Kill(pArlos, false);
- pLeryssa->RemoveAura(SPELL_STUN);
- pLeryssa->ClearUnitState(UNIT_STATE_STUNNED);
- pLeryssa->SetWalk(false);
- pLeryssa->GetMotionMaster()->MovePoint(0, 3722.114502f, 3564.201660f, 477.441437f);
+ arlos->AI()->Talk(SAY_ARLOS_1);
+ arlos->AI()->Talk(SAY_ARLOS_2);
+ leryssa->AI()->Talk(SAY_LERYSSA_1);
+ arlos->Kill(arlos, false);
+ leryssa->RemoveAura(SPELL_STUN);
+ leryssa->ClearUnitState(UNIT_STATE_STUNNED);
+ leryssa->SetWalk(false);
+ leryssa->GetMotionMaster()->MovePoint(0, 3722.114502f, 3564.201660f, 477.441437f);
if (Player* player = killer->ToPlayer())
player->RewardPlayerAndGroupAtEvent(NPC_PRINCE_VALANAR, 0);
@@ -1476,33 +1442,33 @@ public:
npc_leryssaAI(Creature* creature) : ScriptedAI(creature)
{
bDone = false;
- Phase = 0;
- uiPhaseTimer = 0;
+ phase = 0;
+ phaseTimer = 0;
creature->RemoveStandFlags(UNIT_STAND_STATE_SIT);
}
bool bDone;
- uint32 Phase;
- uint32 uiPhaseTimer;
+ uint32 phase;
+ uint32 phaseTimer;
- void MovementInform(uint32 uiType, uint32 /*uiId*/)
+ void MovementInform(uint32 type, uint32 /*uiId*/)
{
- if (uiType != POINT_MOTION_TYPE)
+ if (type != POINT_MOTION_TYPE)
return;
if (!bDone)
{
- if (Creature* pTalbot = me->FindNearestCreature(NPC_PRINCE_VALANAR, 50.0f, true))
- CAST_AI(npc_counselor_talbot::npc_counselor_talbotAI, pTalbot->GetAI())->bCheck = true;
+ if (Creature* talbot = me->FindNearestCreature(NPC_PRINCE_VALANAR, 50.0f, true))
+ CAST_AI(npc_counselor_talbot::npc_counselor_talbotAI, talbot->GetAI())->bCheck = true;
me->AddUnitState(UNIT_STATE_STUNNED);
me->CastSpell(me, SPELL_STUN, true);
if (me->isSummon())
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
- CAST_AI(npc_thassarian::npc_thassarianAI, summoner->GetAI())->bLeryssaInPosition = true;
+ CAST_AI(npc_thassarian::npc_thassarianAI, summoner->GetAI())->leryssaInPosition = true;
bDone = true;
}
else
@@ -1511,8 +1477,8 @@ public:
if (me->isSummon())
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
summoner->SetStandState(UNIT_STAND_STATE_SIT);
- uiPhaseTimer = 1500;
- Phase = 1;
+ phaseTimer = 1500;
+ phase = 1;
}
}
@@ -1520,59 +1486,63 @@ public:
{
ScriptedAI::UpdateAI(uiDiff);
- if (uiPhaseTimer <= uiDiff)
+ if (phaseTimer <= uiDiff)
{
- switch (Phase)
+ switch (phase)
{
case 1:
if (me->isSummon())
- if (Unit* pThassarian = me->ToTempSummon()->GetSummoner())
- DoScriptText(SAY_THASSARIAN_4, pThassarian);
- uiPhaseTimer = 5000;
- ++Phase;
+ if (Unit* summoner = me->ToTempSummon()->GetSummoner())
+ if (Creature* thassarian = summoner->ToCreature())
+ thassarian->AI()->Talk(SAY_THASSARIAN_4);
+ phaseTimer = 5000;
+ ++phase;
break;
case 2:
- DoScriptText(SAY_LERYSSA_2, me);
- uiPhaseTimer = 5000;
- ++Phase;
+ Talk(SAY_LERYSSA_2);
+ phaseTimer = 5000;
+ ++phase;
break;
case 3:
if (me->isSummon())
- if (Unit* pThassarian = me->ToTempSummon()->GetSummoner())
- DoScriptText(SAY_THASSARIAN_5, pThassarian);
- uiPhaseTimer = 5000;
- ++Phase;
+ if (Unit* summoner = me->ToTempSummon()->GetSummoner())
+ if (Creature* thassarian = summoner->ToCreature())
+ thassarian->AI()->Talk(SAY_THASSARIAN_5);
+ phaseTimer = 5000;
+ ++phase;
break;
case 4:
- DoScriptText(SAY_LERYSSA_3, me);
- uiPhaseTimer = 5000;
- ++Phase;
+ Talk(SAY_LERYSSA_3);
+ phaseTimer = 5000;
+ ++phase;
break;
case 5:
if (me->isSummon())
- if (Unit* pThassarian = me->ToTempSummon()->GetSummoner())
- DoScriptText(SAY_THASSARIAN_6, pThassarian);
- uiPhaseTimer = 5000;
- ++Phase;
+ if (Unit* summoner = me->ToTempSummon()->GetSummoner())
+ if (Creature* thassarian = summoner->ToCreature())
+ thassarian->AI()->Talk(SAY_THASSARIAN_6);
+ phaseTimer = 5000;
+ ++phase;
break;
case 6:
- DoScriptText(SAY_LERYSSA_4, me);
- uiPhaseTimer = 5000;
- ++Phase;
+ Talk(SAY_LERYSSA_4);
+ phaseTimer = 5000;
+ ++phase;
break;
case 7:
if (me->isSummon())
- if (Unit* pThassarian = me->ToTempSummon()->GetSummoner())
- {
- DoScriptText(SAY_THASSARIAN_7, pThassarian);
- CAST_AI(npc_thassarian::npc_thassarianAI, pThassarian->GetAI())->uiPhase = 16;
- }
- uiPhaseTimer = 5000;
- Phase = 0;
+ if (Unit* summoner = me->ToTempSummon()->GetSummoner())
+ if (Creature* thassarian = summoner->ToCreature())
+ {
+ thassarian->AI()->Talk(SAY_THASSARIAN_7);
+ CAST_AI(npc_thassarian::npc_thassarianAI, thassarian->GetAI())->phase = 16;
+ }
+ phaseTimer = 5000;
+ phase = 0;
break;
}
- } else uiPhaseTimer -= uiDiff;
+ } else phaseTimer -= uiDiff;
if (!UpdateVictim())
return;
@@ -1676,13 +1646,13 @@ enum eImprisionedBerylSorcerer
NPC_IMPRISONED_BERYL_SORCERER = 25478,
- SAY_IMPRISIONED_BERYL_1 = -1571024,
- SAY_IMPRISIONED_BERYL_2 = -1571025,
- SAY_IMPRISIONED_BERYL_3 = -1571026,
- SAY_IMPRISIONED_BERYL_4 = -1571027,
- SAY_IMPRISIONED_BERYL_5 = -1571028,
- SAY_IMPRISIONED_BERYL_6 = -1571029,
- SAY_IMPRISIONED_BERYL_7 = -1571030,
+ SAY_IMPRISIONED_BERYL_1 = 0,
+ SAY_IMPRISIONED_BERYL_2 = 1,
+ SAY_IMPRISIONED_BERYL_3 = 2,
+ SAY_IMPRISIONED_BERYL_4 = 3,
+ SAY_IMPRISIONED_BERYL_5 = 4,
+ SAY_IMPRISIONED_BERYL_6 = 5,
+ SAY_IMPRISIONED_BERYL_7 = 6
};
class npc_imprisoned_beryl_sorcerer : public CreatureScript
@@ -1745,25 +1715,25 @@ public:
switch (step)
{
case 1:
- DoScriptText(SAY_IMPRISIONED_BERYL_1, me);
+ Talk(SAY_IMPRISIONED_BERYL_1);
break;
case 2:
- DoScriptText(SAY_IMPRISIONED_BERYL_2, me, caster);
+ Talk(SAY_IMPRISIONED_BERYL_2, caster->GetGUID());
break;
case 3:
- DoScriptText(SAY_IMPRISIONED_BERYL_3, me);
+ Talk(SAY_IMPRISIONED_BERYL_3);
break;
case 4:
- DoScriptText(SAY_IMPRISIONED_BERYL_4, me);
+ Talk(SAY_IMPRISIONED_BERYL_4);
break;
case 5:
- DoScriptText(SAY_IMPRISIONED_BERYL_5, me);
+ Talk(SAY_IMPRISIONED_BERYL_5);
break;
case 6:
- DoScriptText(SAY_IMPRISIONED_BERYL_6, me, caster);
+ Talk(SAY_IMPRISIONED_BERYL_6, caster->GetGUID());
break;
case 7:
- DoScriptText(SAY_IMPRISIONED_BERYL_7, me);
+ Talk(SAY_IMPRISIONED_BERYL_7);
caster->KilledMonsterCredit(NPC_IMPRISONED_BERYL_SORCERER, 0);
break;
}
@@ -1780,18 +1750,16 @@ public:
/*######
## npc_mootoo_the_younger
######*/
-enum Script_Texts_Mootoo_the_Younger
+enum MootooTheYounger
{
- SAY_1 =-1750040,
- SAY_2 =-1750041,
- SAY_3 =-1750042,
- SAY_4 =-1750043,
- SAY_5 =-1750044
-};
-enum Mootoo_the_Younger_Entries
-{
- NPC_MOOTOO_THE_YOUNGER =25504,
- QUEST_ESCAPING_THE_MIST =11664
+ SAY_1 = 0,
+ SAY_2 = 1,
+ SAY_3 = 2,
+ SAY_4 = 3,
+ SAY_5 = 4,
+
+ NPC_MOOTOO_THE_YOUNGER = 25504,
+ QUEST_ESCAPING_THE_MIST = 11664
};
class npc_mootoo_the_younger : public CreatureScript
@@ -1813,7 +1781,7 @@ public:
break;
}
creature->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_1, creature);
+ creature->AI()->Talk(SAY_1);
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
}
return true;
@@ -1844,19 +1812,19 @@ public:
{
case 10:
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
- DoScriptText(SAY_2, me);
+ Talk(SAY_2);
break;
case 12:
- DoScriptText(SAY_3, me);
+ Talk(SAY_3);
me->HandleEmoteCommand(EMOTE_ONESHOT_LOOT);
break;
case 16:
- DoScriptText(SAY_4, me);
+ Talk(SAY_4);
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
break;
case 20:
me->SetPhaseMask(1, true);
- DoScriptText(SAY_5, me);
+ Talk(SAY_5);
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
player->GroupEventHappens(QUEST_ESCAPING_THE_MIST, me);
SetRun(true);
@@ -1875,15 +1843,13 @@ public:
## npc_bonker_togglevolt
######*/
-enum Bonker_Togglevolt_Entries
-{
- NPC_BONKER_TOGGLEVOLT = 25589,
- QUEST_GET_ME_OUTA_HERE = 11673
-};
-enum Script_Texts_Bonker_Togglevolt
+enum BonkerTogglevolt
{
- SAY_bonker_1 = -1700002,
- SAY_bonker_2 = -1700003
+ NPC_BONKER_TOGGLEVOLT = 25589,
+ QUEST_GET_ME_OUTA_HERE = 11673,
+
+ SAY_BONKER_1 = 0,
+ SAY_BONKER_2 = 1
};
class npc_bonker_togglevolt : public CreatureScript
@@ -1896,7 +1862,7 @@ public:
if (quest->GetQuestId() == QUEST_GET_ME_OUTA_HERE)
{
creature->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_bonker_2, creature, player);
+ creature->AI()->Talk(SAY_BONKER_2, player->GetGUID());
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, player->GetGUID());
}
return true;
@@ -1925,7 +1891,7 @@ public:
{
if (Bonker_agro == 0)
{
- DoScriptText(SAY_bonker_1, me);
+ Talk(SAY_BONKER_1);
Bonker_agro++;
}
DoMeleeAttackIfReady();
@@ -2343,10 +2309,10 @@ enum eHiddenCultist
NPC_SALTY_JOHN_THORPE = 25248,
NPC_GUARD_MITCHELLS = 25828,
- SAY_HIDDEN_CULTIST_1 = -1571044,
- SAY_HIDDEN_CULTIST_2 = -1571045,
- SAY_HIDDEN_CULTIST_3 = -1571046,
- SAY_HIDDEN_CULTIST_4 = -1571047
+ SAY_HIDDEN_CULTIST_1 = 0,
+ SAY_HIDDEN_CULTIST_2 = 1,
+ SAY_HIDDEN_CULTIST_3 = 2,
+ SAY_HIDDEN_CULTIST_4 = 3
};
const char* GOSSIP_ITEM_TOM_HEGGER = "What do you know about the Cult of the Damned?";
@@ -2428,17 +2394,17 @@ public:
{
case NPC_SALTY_JOHN_THORPE:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
- DoScriptText(SAY_HIDDEN_CULTIST_1, me);
+ Talk(SAY_HIDDEN_CULTIST_1);
uiEventTimer = 5000;
uiEventPhase = 2;
break;
case NPC_GUARD_MITCHELLS:
- DoScriptText(SAY_HIDDEN_CULTIST_2, me);
+ Talk(SAY_HIDDEN_CULTIST_2);
uiEventTimer = 5000;
uiEventPhase = 2;
break;
case NPC_TOM_HEGGER:
- DoScriptText(SAY_HIDDEN_CULTIST_3, me);
+ Talk(SAY_HIDDEN_CULTIST_3);
uiEventTimer = 5000;
uiEventPhase = 2;
break;
@@ -2448,7 +2414,7 @@ public:
switch (me->GetEntry())
{
case NPC_SALTY_JOHN_THORPE:
- DoScriptText(SAY_HIDDEN_CULTIST_4, me);
+ Talk(SAY_HIDDEN_CULTIST_4);
if (Player* player = me->GetPlayer(*me, uiPlayerGUID))
{
me->SetInFront(player);
@@ -2548,7 +2514,6 @@ void AddSC_borean_tundra()
new npc_corastrasza();
new npc_iruk();
new mob_nerubar_victim();
- new npc_scourge_prisoner();
new npc_jenny();
new npc_fezzix_geartwist();
new npc_nesingwary_trapper();
diff --git a/src/server/scripts/Northrend/grizzly_hills.cpp b/src/server/scripts/Northrend/grizzly_hills.cpp
index 0363e0c892d..8bcc255b343 100644
--- a/src/server/scripts/Northrend/grizzly_hills.cpp
+++ b/src/server/scripts/Northrend/grizzly_hills.cpp
@@ -21,6 +21,7 @@
#include "ScriptedEscortAI.h"
#include "Player.h"
#include "SpellInfo.h"
+#include "CreatureTextMgr.h"
/*######
## Quest 12027: Mr. Floppy's Perilous Adventure
@@ -37,19 +38,19 @@ enum eFloppy
SPELL_MRFLOPPY = 47184, //vehicle aura
- SAY_WORGHAGGRO1 = -1800001, //Um... I think one of those wolves is back...
- SAY_WORGHAGGRO2 = -1800002, //He's going for Mr. Floppy!
- SAY_WORGRAGGRO3 = -1800003, //Oh, no! Look, it's another wolf, and it's a biiiiiig one!
- SAY_WORGRAGGRO4 = -1800004, //He's gonna eat Mr. Floppy! You gotta help Mr. Floppy! You just gotta!
- SAY_RANDOMAGGRO = -1800005, //There's a big meanie attacking Mr. Floppy! Help!
- SAY_VICTORY1 = -1800006, //Let's get out of here before more wolves find us!
- SAY_VICTORY2 = -1800007, //Don't go toward the light, Mr. Floppy!
- SAY_VICTORY3 = -1800008, //Mr. Floppy, you're ok! Thank you so much for saving Mr. Floppy!
- SAY_VICTORY4 = -1800009, //I think I see the camp! We're almost home, Mr. Floppy! Let's go!
- TEXT_EMOTE_WP1 = -1800010, //Mr. Floppy revives
- TEXT_EMOTE_AGGRO = -1800011, //The Ravenous Worg chomps down on Mr. Floppy
- SAY_QUEST_ACCEPT = -1800012, //Are you ready, Mr. Floppy? Stay close to me and watch out for those wolves!
- SAY_QUEST_COMPLETE = -1800013 //Thank you for helping me get back to the camp. Go tell Walter that I'm safe now!
+ SAY_WORGHAGGRO1 = 0, //Um... I think one of those wolves is back...
+ SAY_WORGHAGGRO2 = 1, //He's going for Mr. Floppy!
+ SAY_WORGRAGGRO3 = 2, //Oh, no! Look, it's another wolf, and it's a biiiiiig one!
+ SAY_WORGRAGGRO4 = 3, //He's gonna eat Mr. Floppy! You gotta help Mr. Floppy! You just gotta!
+ SAY_RANDOMAGGRO = 4, //There's a big meanie attacking Mr. Floppy! Help!
+ SAY_VICTORY1 = 5, //Let's get out of here before more wolves find us!
+ SAY_VICTORY2 = 6, //Don't go toward the light, Mr. Floppy!
+ SAY_VICTORY3 = 7, //Mr. Floppy, you're ok! Thank you so much for saving Mr. Floppy!
+ SAY_VICTORY4 = 8, //I think I see the camp! We're almost home, Mr. Floppy! Let's go!
+ TEXT_EMOTE_WP1 = 9, //Mr. Floppy revives
+ TEXT_EMOTE_AGGRO = 10, //The Ravenous Worg chomps down on Mr. Floppy
+ SAY_QUEST_ACCEPT = 11, //Are you ready, Mr. Floppy? Stay close to me and watch out for those wolves!
+ SAY_QUEST_COMPLETE = 12 //Thank you for helping me get back to the camp. Go tell Walter that I'm safe now!
};
//emily
@@ -92,7 +93,7 @@ public:
case 10:
if (Unit::GetCreature(*me, MrfloppyGUID))
{
- DoScriptText(SAY_WORGHAGGRO1, me);
+ Talk(SAY_WORGHAGGRO1);
me->SummonCreature(NPC_HUNGRY_WORG, me->GetPositionX()+5, me->GetPositionY()+2, me->GetPositionZ()+1, 3.229f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000);
}
break;
@@ -103,7 +104,7 @@ public:
case 17:
if (Creature* Mrfloppy = Unit::GetCreature(*me, MrfloppyGUID))
Mrfloppy->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
- DoScriptText(SAY_WORGRAGGRO3, me);
+ Talk(SAY_WORGRAGGRO3);
if (Creature* RWORG = me->SummonCreature(NPC_RAVENOUS_WORG, me->GetPositionX()+10, me->GetPositionY()+8, me->GetPositionZ()+2, 3.229f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000))
{
RWORG->setFaction(35);
@@ -141,7 +142,7 @@ public:
Mrfloppy->ExitVehicle();
RWORG->setFaction(14);
RWORG->GetMotionMaster()->MovePoint(0, RWORG->GetPositionX()+10, RWORG->GetPositionY()+80, RWORG->GetPositionZ());
- DoScriptText(SAY_VICTORY2, me);
+ Talk(SAY_VICTORY2);
}
}
break;
@@ -155,7 +156,7 @@ public:
me->GetMotionMaster()->MovePoint(0, Mrfloppy->GetPositionX(), Mrfloppy->GetPositionY(), Mrfloppy->GetPositionZ());
Mrfloppy->setDeathState(ALIVE);
Mrfloppy->GetMotionMaster()->MoveFollow(me, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
- DoScriptText(SAY_VICTORY3, me);
+ Talk(SAY_VICTORY3);
}
}
break;
@@ -164,12 +165,12 @@ public:
{
Completed = true;
player->GroupEventHappens(QUEST_PERILOUS_ADVENTURE, me);
- DoScriptText(SAY_QUEST_COMPLETE, me, player);
+ Talk(SAY_QUEST_COMPLETE, player->GetGUID());
}
me->SetWalk(false);
break;
case 25:
- DoScriptText(SAY_VICTORY4, me);
+ Talk(SAY_VICTORY4);
break;
case 27:
me->DisappearAndDie();
@@ -181,7 +182,7 @@ public:
void EnterCombat(Unit* /*Who*/)
{
- DoScriptText(SAY_RANDOMAGGRO, me);
+ Talk(SAY_RANDOMAGGRO);
}
void Reset()
@@ -209,7 +210,7 @@ public:
{
if (quest->GetQuestId() == QUEST_PERILOUS_ADVENTURE)
{
- DoScriptText(SAY_QUEST_ACCEPT, creature);
+ creature->AI()->Talk(SAY_QUEST_ACCEPT);
if (Creature* Mrfloppy = GetClosestCreatureWithEntry(creature, NPC_MRFLOPPY, 180.0f))
Mrfloppy->GetMotionMaster()->MoveFollow(creature, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
@@ -248,13 +249,13 @@ public:
switch (Who->GetEntry())
{
case NPC_HUNGRY_WORG:
- DoScriptText(SAY_WORGHAGGRO2, Emily);
+ Emily->AI()->Talk(SAY_WORGHAGGRO2);
break;
case NPC_RAVENOUS_WORG:
- DoScriptText(SAY_WORGRAGGRO4, Emily);
+ Emily->AI()->Talk(SAY_WORGRAGGRO4);
break;
default:
- DoScriptText(SAY_RANDOMAGGRO, Emily);
+ Emily->AI()->Talk(SAY_RANDOMAGGRO);
}
}
}
@@ -461,12 +462,10 @@ public:
enum eSkirmisher
{
- SPELL_RENEW_SKIRMISHER = 48812,
- CREDIT_NPC = 27466,
+ SPELL_RENEW_SKIRMISHER = 48812,
+ CREDIT_NPC = 27466,
- RANDOM_SAY_1 = -1800044, //Ahh..better..
- RANDOM_SAY_2 = -1800045, //Whoa.. i nearly died there. Thank you, $Race!
- RANDOM_SAY_3 = -1800046 //Thank you. $Class!
+ RANDOM_SAY = 0,
};
class npc_wounded_skirmisher : public CreatureScript
@@ -500,7 +499,7 @@ public:
&& caster->ToPlayer()->GetQuestStatus(12288) == QUEST_STATUS_INCOMPLETE)
{
caster->ToPlayer()->KilledMonsterCredit(CREDIT_NPC, 0);
- DoScriptText(RAND(RANDOM_SAY_1, RANDOM_SAY_2, RANDOM_SAY_3), caster);
+ sCreatureTextMgr->SendChat(me, RANDOM_SAY, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, caster->ToPlayer());
if (me->IsStandState())
me->GetMotionMaster()->MovePoint(1, me->GetPositionX()+7, me->GetPositionY()+7, me->GetPositionZ());
else
@@ -593,16 +592,12 @@ public:
/*Venture co. Straggler - when you cast Smoke Bomb, he will yell and run away*/
enum eSmokeEmOut
{
- SAY_SEO1 = -1603535,
- SAY_SEO2 = -1603536,
- SAY_SEO3 = -1603537,
- SAY_SEO4 = -1603538,
- SAY_SEO5 = -1603539,
- QUEST_SMOKE_EM_OUT_A = 12323,
- QUEST_SMOKE_EM_OUT_H = 12324,
- SPELL_SMOKE_BOMB = 49075,
- SPELL_CHOP = 43410,
- SPELL_VENTURE_STRAGGLER_CREDIT = 49093,
+ SAY_SEO = 0,
+ QUEST_SMOKE_EM_OUT_A = 12323,
+ QUEST_SMOKE_EM_OUT_H = 12324,
+ SPELL_SMOKE_BOMB = 49075,
+ SPELL_CHOP = 43410,
+ SPELL_VENTURE_STRAGGLER_CREDIT = 49093,
};
class npc_venture_co_straggler : public CreatureScript
@@ -644,7 +639,7 @@ class npc_venture_co_straggler : public CreatureScript
++uiTimer;
break;
case 1:
- DoScriptText(RAND(SAY_SEO1, SAY_SEO2, SAY_SEO3, SAY_SEO4, SAY_SEO5), me);
+ Talk(SAY_SEO);
me->GetMotionMaster()->MovePoint(0, me->GetPositionX()-7, me->GetPositionY()-5, me->GetPositionZ());
uiRunAwayTimer = 2500;
++uiTimer;
diff --git a/src/server/scripts/Northrend/icecrown.cpp b/src/server/scripts/Northrend/icecrown.cpp
index 030df23028c..e08a9173715 100644
--- a/src/server/scripts/Northrend/icecrown.cpp
+++ b/src/server/scripts/Northrend/icecrown.cpp
@@ -494,6 +494,378 @@ class npc_tournament_training_dummy : public CreatureScript
};
+// Battle for Crusaders' Pinnacle
+enum BlessedBanner
+{
+ SPELL_BLESSING_OF_THE_CRUSADE = 58026,
+ SPELL_THREAT_PULSE = 58113,
+ SPELL_CRUSADERS_SPIRE_VICTORY = 58084,
+ SPELL_TORCH = 58121,
+
+ NPC_BLESSED_BANNER = 30891,
+ NPC_CRUSADER_LORD_DALFORS = 31003,
+ NPC_ARGENT_BATTLE_PRIEST = 30919,
+ NPC_ARGENT_MASON = 30900,
+ NPC_REANIMATED_CAPTAIN = 30986,
+ NPC_SCOURGE_DRUDGE = 30984,
+ NPC_HIDEOUS_PLAGEBRINGER = 30987,
+ NPC_HALOF_THE_DEATHBRINGER = 30989,
+ NPC_LK = 31013,
+
+ BANNER_SAY = 0, // "The Blessed Banner of the Crusade has been planted.\n Defend the banner from all attackers!"
+ DALFORS_SAY_PRE_1 = 0, // "BY THE LIGHT! Those damned monsters! Look at what they've done to our people!"
+ DALFORS_SAY_PRE_2 = 1, // "Burn it down, boys. Burn it all down."
+ DALFORS_SAY_START = 2, // "Let 'em come. They'll pay for what they've done!"
+ DALFORS_YELL_FINISHED = 3, // "We've done it, lads! We've taken the pinnacle from the Scourge! Report to Father Gustav at once and tell him the good news! We're gonna get to buildin' and settin' up! Go!"
+ LK_TALK_1 = 0, // "Leave no survivors!"
+ LK_TALK_2 = 1, // "Cower before my terrible creations!"
+ LK_TALK_3 = 2, // "Feast my children! Feast upon the flesh of the living!"
+ LK_TALK_4 = 3, // "Lay down your arms and surrender your souls!"
+
+ EVENT_SPAWN = 1,
+ EVENT_INTRO_1 = 2,
+ EVENT_INTRO_2 = 3,
+ EVENT_INTRO_3 = 4,
+ EVENT_MASON_ACTION = 5,
+ EVENT_START_FIGHT = 6,
+ EVENT_WAVE_SPAWN = 7,
+ EVENT_HALOF = 8,
+ EVENT_ENDED = 9,
+};
+
+Position const DalforsPos[3] =
+{
+ {6458.703f, 403.858f, 490.498f, 3.1205f}, // Dalfors spawn point
+ {6422.950f, 423.335f, 510.451f, 0.0f}, // Dalfors intro pos
+ {6426.343f, 420.515f, 508.650f, 0.0f}, // Dalfors fight pos
+};
+
+Position const Priest1Pos[2] =
+{
+ {6462.025f, 403.681f, 489.721f, 3.1007f}, // priest1 spawn point
+ {6421.480f, 423.576f, 510.781f, 5.7421f}, // priest1 intro pos
+};
+
+Position const Priest2Pos[2] =
+{
+ {6463.969f, 407.198f, 489.240f, 2.2689f}, // priest2 spawn point
+ {6419.778f, 421.404f, 510.972f, 5.7421f}, // priest2 intro pos
+};
+
+Position const Priest3Pos[2] =
+{
+ {6464.371f, 400.944f, 489.186f, 6.1610f}, // priest3 spawn point
+ {6423.516f, 425.782f, 510.774f, 5.7421f}, // priest3 intro pos
+};
+
+Position const Mason1Pos[3] =
+{
+ {6462.929f, 409.826f, 489.392f, 3.0968f}, // mason1 spawn point
+ {6428.163f, 421.960f, 508.297f, 0.0f}, // mason1 intro pos
+ {6414.335f, 454.904f, 511.395f, 2.8972f}, // mason1 action pos
+};
+
+Position const Mason2Pos[3] =
+{
+ {6462.650f, 405.670f, 489.576f, 2.9414f}, // mason2 spawn point
+ {6426.250f, 419.194f, 508.219f, 0.0f}, // mason2 intro pos
+ {6415.014f, 446.849f, 511.395f, 3.1241f}, // mason2 action pos
+};
+
+Position const Mason3Pos[3] =
+{
+ {6462.646f, 401.218f, 489.601f, 2.7864f}, // mason3 spawn point
+ {6423.855f, 416.598f, 508.305f, 0.0f}, // mason3 intro pos
+ {6417.070f, 438.824f, 511.395f, 3.6651f}, // mason3 action pos
+};
+
+class npc_blessed_banner : public CreatureScript
+{
+public:
+ npc_blessed_banner() : CreatureScript("npc_blessed_banner") { }
+
+ struct npc_blessed_bannerAI : public Scripted_NoMovementAI
+ {
+ npc_blessed_bannerAI(Creature* creature) : Scripted_NoMovementAI(creature) , Summons(me)
+ {
+ HalofSpawned = false;
+ PhaseCount = 0;
+ Summons.DespawnAll();
+ }
+
+ EventMap events;
+
+ bool HalofSpawned;
+
+ uint32 PhaseCount;
+
+ SummonList Summons;
+
+ uint64 guidDalfors;
+ uint64 guidPriest[3];
+ uint64 guidMason[3];
+ uint64 guidHalof;
+
+ void Reset()
+ {
+ me->setRegeneratingHealth(false);
+ DoCast(SPELL_THREAT_PULSE);
+ me->AI()->Talk(BANNER_SAY);
+ events.ScheduleEvent(EVENT_SPAWN,3000);
+ }
+
+ void EnterCombat(Unit* /*who*/) {}
+
+ void MoveInLineOfSight(Unit* /*who*/) {}
+
+ void JustSummoned(Creature* Summoned)
+ {
+ Summons.Summon(Summoned);
+ }
+
+ void JustDied(Unit* /*killer*/)
+ {
+ Summons.DespawnAll();
+ me->DespawnOrUnsummon();
+ }
+
+ void UpdateAI(uint32 const diff)
+ {
+ events.Update(diff);
+
+ switch (events.ExecuteEvent())
+ {
+ case EVENT_SPAWN:
+ {
+ if (Creature* Dalfors = DoSummon(NPC_CRUSADER_LORD_DALFORS, DalforsPos[0]))
+ {
+ guidDalfors = Dalfors->GetGUID();
+ Dalfors->GetMotionMaster()->MovePoint(0, DalforsPos[1]);
+ }
+ if (Creature* Priest1 = DoSummon(NPC_ARGENT_BATTLE_PRIEST, Priest1Pos[0]))
+ {
+ guidPriest[0] = Priest1->GetGUID();
+ Priest1->GetMotionMaster()->MovePoint(0, Priest1Pos[1]);
+ }
+ if (Creature* Priest2 = DoSummon(NPC_ARGENT_BATTLE_PRIEST, Priest2Pos[0]))
+ {
+ guidPriest[1] = Priest2->GetGUID();
+ Priest2->GetMotionMaster()->MovePoint(0, Priest2Pos[1]);
+ }
+ if (Creature* Priest3 = DoSummon(NPC_ARGENT_BATTLE_PRIEST, Priest3Pos[0]))
+ {
+ guidPriest[2] = Priest3->GetGUID();
+ Priest3->GetMotionMaster()->MovePoint(0, Priest3Pos[1]);
+ }
+ if (Creature* Mason1 = DoSummon(NPC_ARGENT_MASON, Mason1Pos[0]))
+ {
+ guidMason[0] = Mason1->GetGUID();
+ Mason1->GetMotionMaster()->MovePoint(0, Mason1Pos[1]);
+ }
+ if (Creature* Mason2 = DoSummon(NPC_ARGENT_MASON, Mason2Pos[0]))
+ {
+ guidMason[1] = Mason2->GetGUID();
+ Mason2->GetMotionMaster()->MovePoint(0, Mason2Pos[1]);
+ }
+ if (Creature* Mason3 = DoSummon(NPC_ARGENT_MASON, Mason3Pos[0]))
+ {
+ guidMason[2] = Mason3->GetGUID();
+ Mason3->GetMotionMaster()->MovePoint(0, Mason3Pos[1]);
+ }
+ events.ScheduleEvent(EVENT_INTRO_1,15000);
+ }
+ break;
+ case EVENT_INTRO_1:
+ {
+ if (Creature* Dalfors = me->GetCreature(*me,guidDalfors))
+ Dalfors->AI()->Talk(DALFORS_SAY_PRE_1);
+ events.ScheduleEvent(EVENT_INTRO_2,5000);
+ }
+ break;
+ case EVENT_INTRO_2:
+ {
+ if (Creature* Dalfors = me->GetCreature(*me,guidDalfors))
+ {
+ Dalfors->SetFacingTo(6.215f);
+ Dalfors->AI()->Talk(DALFORS_SAY_PRE_2);
+ }
+ events.ScheduleEvent(EVENT_INTRO_3,5000);
+ }
+ break;
+ case EVENT_INTRO_3:
+ {
+ if (Creature* Dalfors = me->GetCreature(*me,guidDalfors))
+ {
+ Dalfors->GetMotionMaster()->MovePoint(0, DalforsPos[2]);
+ Dalfors->SetHomePosition(DalforsPos[2]);
+ }
+ if (Creature* Priest1 = me->GetCreature(*me,guidPriest[0]))
+ {
+ Priest1->SetFacingTo(5.7421f);
+ Priest1->SetHomePosition(Priest1Pos[1]);
+ }
+ if (Creature* Priest2 = me->GetCreature(*me,guidPriest[1]))
+ {
+ Priest2->SetFacingTo(5.7421f);
+ Priest2->SetHomePosition(Priest2Pos[1]);
+ }
+ if (Creature* Priest3 = me->GetCreature(*me,guidPriest[2]))
+ {
+ Priest3->SetFacingTo(5.7421f);
+ Priest3->SetHomePosition(Priest3Pos[1]);
+ }
+ if (Creature* Mason1 = me->GetCreature(*me,guidMason[0]))
+ {
+ Mason1->GetMotionMaster()->MovePoint(0, Mason1Pos[2]);
+ Mason1->SetHomePosition(Mason1Pos[2]);
+ }
+ if (Creature* Mason2 = me->GetCreature(*me,guidMason[1]))
+ {
+ Mason2->GetMotionMaster()->MovePoint(0, Mason2Pos[2]);
+ Mason2->SetHomePosition(Mason2Pos[2]);
+ }
+ if (Creature* Mason3 = me->GetCreature(*me,guidMason[2]))
+ {
+ Mason3->GetMotionMaster()->MovePoint(0, Mason3Pos[2]);
+ Mason3->SetHomePosition(Mason3Pos[2]);
+ }
+ events.ScheduleEvent(EVENT_START_FIGHT,5000);
+ events.ScheduleEvent(EVENT_MASON_ACTION,15000);
+ }
+ break;
+ case EVENT_MASON_ACTION:
+ {
+ if (Creature* Mason1 = me->GetCreature(*me,guidMason[0]))
+ {
+ Mason1->SetFacingTo(2.8972f);
+ Mason1->AI()->SetData(1,1); // triggers SAI actions on npc
+ }
+ if (Creature* Mason2 = me->GetCreature(*me,guidMason[1]))
+ {
+ Mason2->SetFacingTo(3.1241f);
+ Mason2->AI()->SetData(1,1); // triggers SAI actions on npc
+ }
+ if (Creature* Mason3 = me->GetCreature(*me,guidMason[2]))
+ {
+ Mason3->SetFacingTo(3.6651f);
+ Mason3->AI()->SetData(1,1); // triggers SAI actions on npc
+ }
+ }
+ break;
+ case EVENT_START_FIGHT:
+ {
+ if(Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100))
+ LK->AI()->Talk(LK_TALK_1);
+ if (Creature* Dalfors = me->GetCreature(*me,guidDalfors))
+ Dalfors->AI()->Talk(DALFORS_SAY_START);
+ events.ScheduleEvent(EVENT_WAVE_SPAWN,1000);
+ }
+ break;
+ case EVENT_WAVE_SPAWN:
+ {
+ if (PhaseCount == 3)
+ {
+ if (Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100))
+ LK->AI()->Talk(LK_TALK_2);
+ }
+ else if (PhaseCount == 6)
+ {
+ if (Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100))
+ LK->AI()->Talk(LK_TALK_3);
+ }
+ if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE,Mason3Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ if (urand(0,1) == 0)
+ {
+ if (Creature* tempsum = DoSummon(NPC_HIDEOUS_PLAGEBRINGER,Mason1Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ if (Creature* tempsum = DoSummon(NPC_HIDEOUS_PLAGEBRINGER,Mason2Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ }
+ else
+ {
+ if (Creature* tempsum = DoSummon(NPC_REANIMATED_CAPTAIN,Mason1Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ if (Creature* tempsum = DoSummon(NPC_REANIMATED_CAPTAIN,Mason2Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ }
+
+ PhaseCount++;
+
+ if (PhaseCount < 8)
+ events.ScheduleEvent(EVENT_WAVE_SPAWN,urand(10000,20000));
+ else
+ events.ScheduleEvent(EVENT_HALOF,urand(10000,20000));
+ }
+ break;
+ case EVENT_HALOF:
+ {
+ if (Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100))
+ LK->AI()->Talk(LK_TALK_4);
+ if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE,Mason1Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE,Mason2Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ if (Creature* tempsum = DoSummon(NPC_HALOF_THE_DEATHBRINGER,DalforsPos[0]))
+ {
+ HalofSpawned = true;
+ guidHalof = tempsum->GetGUID();
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ }
+ break;
+ case EVENT_ENDED:
+ {
+ Summons.DespawnAll();
+ me->DespawnOrUnsummon();
+ }
+ break;
+ }
+
+ if (PhaseCount == 8)
+ if (Creature* Halof = me->GetCreature(*me,guidHalof))
+ if (Halof->isDead())
+ {
+ DoCast(me,SPELL_CRUSADERS_SPIRE_VICTORY,true);
+ Summons.DespawnEntry(NPC_HIDEOUS_PLAGEBRINGER);
+ Summons.DespawnEntry(NPC_REANIMATED_CAPTAIN);
+ Summons.DespawnEntry(NPC_SCOURGE_DRUDGE);
+ Summons.DespawnEntry(NPC_HALOF_THE_DEATHBRINGER);
+ if (Creature* Dalfors = me->GetCreature(*me,guidDalfors))
+ Dalfors->AI()->Talk(DALFORS_YELL_FINISHED);
+ events.ScheduleEvent(EVENT_ENDED,10000);
+ }
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_blessed_bannerAI(creature);
+ }
+};
+
void AddSC_icecrown()
{
new npc_arete;
@@ -502,4 +874,5 @@ void AddSC_icecrown()
new npc_guardian_pavilion;
new npc_vereth_the_cunning;
new npc_tournament_training_dummy;
+ new npc_blessed_banner();
}
diff --git a/src/server/scripts/Northrend/sholazar_basin.cpp b/src/server/scripts/Northrend/sholazar_basin.cpp
index 8404413ad9d..5bf45452d34 100644
--- a/src/server/scripts/Northrend/sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/sholazar_basin.cpp
@@ -18,7 +18,7 @@
/* ScriptData
SDName: Sholazar_Basin
SD%Complete: 100
-SDComment: Quest support: 12570, 12573, 12621.
+SDComment: Quest support: 12570, 12573, 12621, 12726
SDCategory: Sholazar_Basin
EndScriptData */
@@ -26,6 +26,7 @@ EndScriptData */
npc_injured_rainspeaker_oracle
npc_vekjik
avatar_of_freya
+npc_haiphoon (Quest: "Song of Wind and Water")
EndContentData */
#include "ScriptMgr.h"
@@ -34,6 +35,8 @@ EndContentData */
#include "ScriptedEscortAI.h"
#include "SpellScript.h"
#include "SpellAuras.h"
+#include "Vehicle.h"
+#include "CombatAI.h"
#include "Player.h"
/*######
@@ -44,9 +47,9 @@ EndContentData */
enum eRainspeaker
{
- SAY_START_IRO = -1571000,
- SAY_QUEST_ACCEPT_IRO = -1571001,
- SAY_END_IRO = -1571002,
+ SAY_START_IRO = 0,
+ SAY_QUEST_ACCEPT_IRO = 1,
+ SAY_END_IRO = 2,
QUEST_FORTUNATE_MISUNDERSTANDINGS = 12570,
FACTION_ESCORTEE_A = 774,
@@ -106,7 +109,7 @@ public:
case 28:
player->GroupEventHappens(QUEST_FORTUNATE_MISUNDERSTANDINGS, me);
// me->RestoreFaction();
- DoScriptText(SAY_END_IRO, me);
+ Talk(SAY_END_IRO);
SetRun(false);
break;
}
@@ -146,7 +149,7 @@ public:
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
CAST_AI(npc_escortAI, (creature->AI()))->SetMaxPlayerDistance(35.0f);
creature->SetUnitMovementFlags(MOVEMENTFLAG_FALLING);
- DoScriptText(SAY_START_IRO, creature);
+ creature->AI()->Talk(SAY_START_IRO);
switch (player->GetTeam()){
case ALLIANCE:
@@ -162,7 +165,7 @@ public:
bool OnQuestAccept(Player* /*player*/, Creature* creature, Quest const* /*_Quest*/)
{
- DoScriptText(SAY_QUEST_ACCEPT_IRO, creature);
+ creature->AI()->Talk(SAY_QUEST_ACCEPT_IRO);
return false;
}
@@ -184,7 +187,7 @@ enum eVekjik
GOSSIP_TEXTID_VEKJIK1 = 13137,
GOSSIP_TEXTID_VEKJIK2 = 13138,
- SAY_TEXTID_VEKJIK1 = -1000208,
+ SAY_TEXTID_VEKJIK1 = 0,
SPELL_FREANZYHEARTS_FURY = 51469,
@@ -223,7 +226,7 @@ public:
break;
case GOSSIP_ACTION_INFO_DEF+2:
player->CLOSE_GOSSIP_MENU();
- DoScriptText(SAY_TEXTID_VEKJIK1, creature, player);
+ creature->AI()->Talk(SAY_TEXTID_VEKJIK1, player->GetGUID());
player->AreaExploredOrEventHappens(QUEST_MAKING_PEACE);
creature->CastSpell(player, SPELL_FREANZYHEARTS_FURY, false);
break;
@@ -342,13 +345,13 @@ enum eEnums
SPELL_EXPLODE_CRYSTAL = 62487,
SPELL_FLAMES = 64561,
- SAY_WP_7 = -1800047,
- SAY_WP_6 = -1800048,
- SAY_WP_5 = -1800049,
- SAY_WP_4 = -1800050,
- SAY_WP_3 = -1800051,
- SAY_WP_2 = -1800052,
- SAY_WP_1 = -1800053,
+ SAY_WP_1 = 0,
+ SAY_WP_2 = 1,
+ SAY_WP_3 = 2,
+ SAY_WP_4 = 3,
+ SAY_WP_5 = 4,
+ SAY_WP_6 = 5,
+ SAY_WP_7 = 6,
QUEST_DISASTER = 12688
};
@@ -371,19 +374,19 @@ public:
switch (waypointId)
{
case 0:
- DoScriptText(SAY_WP_2, me);
+ Talk(SAY_WP_2);
break;
case 1:
- DoScriptText(SAY_WP_3, me);
+ Talk(SAY_WP_3);
me->CastSpell(5918.33f, 5372.91f, -98.770f, SPELL_EXPLODE_CRYSTAL, true);
me->SummonGameObject(184743, 5918.33f, 5372.91f, -98.770f, 0, 0, 0, 0, 0, TEMPSUMMON_MANUAL_DESPAWN); //approx 3 to 4 seconds
me->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH);
break;
case 2:
- DoScriptText(SAY_WP_4, me);
+ Talk(SAY_WP_4);
break;
case 7:
- DoScriptText(SAY_WP_5, me);
+ Talk(SAY_WP_5);
break;
case 8:
me->CastSpell(5887.37f, 5379.39f, -91.289f, SPELL_EXPLODE_CRYSTAL, true);
@@ -391,13 +394,13 @@ public:
me->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH);
break;
case 9:
- DoScriptText(SAY_WP_6, me);
+ Talk(SAY_WP_6);
break;
case 13:
if (player)
{
player->GroupEventHappens(QUEST_DISASTER, me);
- DoScriptText(SAY_WP_7, me);
+ Talk(SAY_WP_7);
}
break;
}
@@ -448,7 +451,7 @@ public:
creature->setFaction(113);
pEscortAI->Start(false, false, player->GetGUID());
- DoScriptText(SAY_WP_1, creature);
+ creature->AI()->Talk(SAY_WP_1);
}
}
return true;
@@ -713,8 +716,8 @@ enum eAdventurousDwarf
GOSSIP_MENU_DWARF = 13307,
- SAY_DWARF_OUCH = -1571042,
- SAY_DWARF_HELP = -1571043
+ SAY_DWARF_OUCH = 0,
+ SAY_DWARF_HELP = 1
};
class npc_adventurous_dwarf : public CreatureScript
@@ -722,10 +725,17 @@ class npc_adventurous_dwarf : public CreatureScript
public:
npc_adventurous_dwarf() : CreatureScript("npc_adventurous_dwarf") { }
+ struct npc_adventurous_dwarfAI : public ScriptedAI
+ {
+ npc_adventurous_dwarfAI(Creature* creature) : ScriptedAI(creature)
+ {
+ Talk(SAY_DWARF_OUCH);
+ }
+ };
+
CreatureAI* GetAI(Creature* creature) const
{
- DoScriptText(SAY_DWARF_OUCH, creature);
- return NULL;
+ return new npc_adventurous_dwarfAI(creature);
}
bool OnGossipHello(Player* player, Creature* creature)
@@ -750,15 +760,24 @@ public:
{
player->PlayerTalkClass->ClearMenus();
uint32 spellId = 0;
+
switch (action)
{
- case GOSSIP_ACTION_INFO_DEF + 1: spellId = SPELL_ADD_ORANGE; break;
- case GOSSIP_ACTION_INFO_DEF + 2: spellId = SPELL_ADD_BANANAS; break;
- case GOSSIP_ACTION_INFO_DEF + 3: spellId = SPELL_ADD_PAPAYA; break;
+ case GOSSIP_ACTION_INFO_DEF + 1:
+ spellId = SPELL_ADD_ORANGE;
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2:
+ spellId = SPELL_ADD_BANANAS;
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3:
+ spellId = SPELL_ADD_PAPAYA;
+ break;
}
+
if (spellId)
player->CastSpell(player, spellId, true);
- DoScriptText(SAY_DWARF_HELP, creature);
+
+ creature->AI()->Talk(SAY_DWARF_HELP);
creature->DespawnOrUnsummon();
return true;
}
@@ -968,6 +987,52 @@ public:
}
};
+/*######
+## Quest: Song of Wind and Water ID: 12726
+######*/
+/*This quest precisly needs core script since battle vehicles are not well integrated with SAI,
+may be easily converted to SAI when they get.*/
+enum SongOfWindAndWater
+{
+ // Spells
+ SPELL_DEVOUR_WIND = 52862,
+ SPELL_DEVOUR_WATER = 52864,
+ // NPCs
+ NPC_HAIPHOON_WATER = 28999,
+ NPC_HAIPHOON_AIR = 28985
+};
+
+class npc_haiphoon : public CreatureScript
+{
+public:
+ npc_haiphoon() : CreatureScript("npc_haiphoon") { }
+
+ struct npc_haiphoonAI : public VehicleAI
+ {
+ npc_haiphoonAI(Creature* creature) : VehicleAI(creature) { }
+
+ void SpellHitTarget(Unit* target, SpellInfo const* spell)
+ {
+ if (target == me)
+ return;
+
+ if (spell->Id == SPELL_DEVOUR_WIND && me->GetCharmerOrOwnerPlayerOrPlayerItself())
+ {
+ me->UpdateEntry(NPC_HAIPHOON_AIR);
+ }
+ else if (spell->Id == SPELL_DEVOUR_WATER && me->GetCharmerOrOwnerPlayerOrPlayerItself())
+ {
+ me->UpdateEntry(NPC_HAIPHOON_WATER);
+ }
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_haiphoonAI(creature);
+ }
+};
+
void AddSC_sholazar_basin()
{
new npc_injured_rainspeaker_oracle();
@@ -979,4 +1044,5 @@ void AddSC_sholazar_basin()
new npc_jungle_punch_target();
new spell_q12620_the_lifewarden_wrath();
new spell_q12589_shoot_rjr();
+ new npc_haiphoon();
}
diff --git a/src/server/scripts/Northrend/storm_peaks.cpp b/src/server/scripts/Northrend/storm_peaks.cpp
index b3a379d903d..f87b24ce639 100644
--- a/src/server/scripts/Northrend/storm_peaks.cpp
+++ b/src/server/scripts/Northrend/storm_peaks.cpp
@@ -30,13 +30,13 @@
## npc_agnetta_tyrsdottar
######*/
-#define SAY_AGGRO -1571003
#define GOSSIP_AGNETTA "Skip the warmup, sister... or are you too scared to face soemeone your own size?"
enum eAgnetta
{
QUEST_ITS_THAT_YOUR_GOBLIN = 12969,
- FACTION_HOSTILE_AT1 = 45
+ FACTION_HOSTILE_AT1 = 45,
+ SAY_AGGRO = 0
};
class npc_agnetta_tyrsdottar : public CreatureScript
@@ -73,7 +73,7 @@ public:
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF+1)
{
- DoScriptText(SAY_AGGRO, creature);
+ creature->AI()->Talk(SAY_AGGRO);
player->CLOSE_GOSSIP_MENU();
creature->setFaction(FACTION_HOSTILE_AT1);
creature->AI()->AttackStart(player);
@@ -143,8 +143,8 @@ public:
enum eInjuredGoblin
{
QUEST_BITTER_DEPARTURE = 12832,
- SAY_QUEST_ACCEPT = -1800042,
- SAY_END_WP_REACHED = -1800043
+ SAY_QUEST_ACCEPT = 0,
+ SAY_END_WP_REACHED = 1
};
#define GOSSIP_ITEM_1 "I am ready, lets get you out of here"
@@ -167,7 +167,7 @@ public:
switch (waypointId)
{
case 26:
- DoScriptText(SAY_END_WP_REACHED, me, player);
+ Talk(SAY_END_WP_REACHED, player->GetGUID());
break;
case 27:
player->GroupEventHappens(QUEST_BITTER_DEPARTURE, me);
@@ -218,7 +218,7 @@ public:
bool OnQuestAccept(Player* /*player*/, Creature* creature, Quest const* quest)
{
if (quest->GetQuestId() == QUEST_BITTER_DEPARTURE)
- DoScriptText(SAY_QUEST_ACCEPT, creature);
+ creature->AI()->Talk(SAY_QUEST_ACCEPT);
return false;
}
diff --git a/src/server/scripts/Northrend/zuldrak.cpp b/src/server/scripts/Northrend/zuldrak.cpp
index e5763e5baf6..506c34d40fb 100644
--- a/src/server/scripts/Northrend/zuldrak.cpp
+++ b/src/server/scripts/Northrend/zuldrak.cpp
@@ -121,9 +121,9 @@ enum eRageclaw
SPELL_KNEEL = 39656
};
-const char * SAY_RAGECLAW_1 = "I poop on you, trollses!";
-const char * SAY_RAGECLAW_2 = "ARRRROOOOGGGGAAAA!";
-const char * SAY_RAGECLAW_3 = "No more mister nice wolvar!";
+const char* SAY_RAGECLAW_1 = "I poop on you, trollses!";
+const char* SAY_RAGECLAW_2 = "ARRRROOOOGGGGAAAA!";
+const char* SAY_RAGECLAW_3 = "No more mister nice wolvar!";
#define SAY_RAGECLAW RAND(SAY_RAGECLAW_1, SAY_RAGECLAW_2, SAY_RAGECLAW_3)
@@ -265,14 +265,16 @@ enum eGurgthock
NPC_FIEND_FIRE = 30042,
NPC_FIEND_EARTH = 30043,
- SAY_QUEST_ACCEPT_TUSKARRMAGEDON = -1571031,
- SAY_QUEST_ACCEPT_KORRAK_1 = -1571033,
- SAY_QUEST_ACCEPT_KORRAK_2 = -1571034,
- SAY_QUEST_ACCEPT_MAGNATAUR = -1571035,
+ SAY_QUEST_ACCEPT_TUSKARRMAGEDON = 0,
+ SAY_QUEST_ACCEPT_KORRAK_1 = 1,
+ SAY_QUEST_ACCEPT_KORRAK_2 = 2,
+ SAY_QUEST_ACCEPT_MAGNATAUR = 3,
+ EMOTE_YGGDRAS_SPAWN = 4,
+ SAY_STINKBEARD_SPAWN = 5,
+ SAY_GURGTHOCK_ELEMENTAL_SPAWN = 6,
- EMOTE_YGGDRAS_SPAWN = -1571039,
- SAY_STINKBEARD_SPAWN = -1571040,
- SAY_GURGTHOCK_ELEMENTAL_SPAWN = -1571041,
+ SAY_CALL_FOR_HELP = 0,
+ SAY_RECRUIT = 0,
SPELL_CRASHING_WAVE = 55909, // water
SPELL_SHOCKWAVE = 55918, // earth
@@ -380,12 +382,12 @@ public:
switch (uiValue)
{
case QUEST_AMPHITHEATER_ANGUISH_TUSKARRMAGEDDON:
- DoScriptText(SAY_QUEST_ACCEPT_TUSKARRMAGEDON, me);
+ Talk(SAY_QUEST_ACCEPT_TUSKARRMAGEDON);
uiPhase = 1;
uiTimer = 4000;
break;
case QUEST_AMPHITHEATER_ANGUISH_KORRAK_BLOODRAGER:
- DoScriptText(SAY_QUEST_ACCEPT_KORRAK_1, me);
+ Talk(SAY_QUEST_ACCEPT_KORRAK_1);
uiPhase = 3;
uiTimer = 3000;
break;
@@ -443,7 +445,7 @@ public:
SummonGUID = 0;
break;
case 3:
- DoScriptText(SAY_QUEST_ACCEPT_KORRAK_2, me);
+ Talk(SAY_QUEST_ACCEPT_KORRAK_2);
uiTimer = 3000;
uiPhase = 4;
break;
@@ -477,7 +479,7 @@ public:
}
break;
case 8:
- DoScriptText(SAY_QUEST_ACCEPT_MAGNATAUR, me);
+ Talk(SAY_QUEST_ACCEPT_MAGNATAUR);
uiTimer = 5000;
uiPhase = 11;
break;
@@ -494,12 +496,12 @@ public:
break;
case 10:
me->SummonCreature(NPC_YGGDRAS, SpawnPosition[1], TEMPSUMMON_CORPSE_DESPAWN, 1000);
- DoScriptText(EMOTE_YGGDRAS_SPAWN, me);
+ Talk(EMOTE_YGGDRAS_SPAWN);
uiPhase = 0;
break;
case 11:
if (Creature* creature = me->SummonCreature(NPC_STINKBEARD, SpawnPosition[0], TEMPSUMMON_CORPSE_DESPAWN, 1000))
- DoScriptText(SAY_STINKBEARD_SPAWN, creature);
+ creature->AI()->Talk(SAY_STINKBEARD_SPAWN);
uiPhase = 0;
break;
case 12:
@@ -514,7 +516,7 @@ public:
}
break;
case 13:
- DoScriptText(SAY_GURGTHOCK_ELEMENTAL_SPAWN, me);
+ Talk(SAY_GURGTHOCK_ELEMENTAL_SPAWN);
uiTimer = 3000;
uiPhase = 14;
break;
@@ -575,9 +577,7 @@ enum eOrinokoTuskbreaker
SPELL_SUMMON_WHISKER = 55946,
NPC_WHISKER = 30113,
- NPC_HUNGRY_PENGUIN = 30110,
-
- SAY_CALL_FOR_HELP = -1571032
+ NPC_HUNGRY_PENGUIN = 30110
};
class npc_orinoko_tuskbreaker : public CreatureScript
@@ -659,7 +659,7 @@ public:
if (!bSummoned && !HealthAbovePct(50))
{
- DoScriptText(SAY_CALL_FOR_HELP, me);
+ Talk(SAY_CALL_FOR_HELP);
//DoCast(me->getVictim(), SPELL_SUMMON_WHISKER); petai is not working correctly???
if (Creature* pWhisker = me->SummonCreature(NPC_WHISKER, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0))
@@ -1282,11 +1282,7 @@ enum eCrusade_recruit
QUEST_TROLL_PATROL_INTESTINAL_FORTITUDE = 12509,
- GOSSIP_CRUSADE_TEXT = 13069,
-
- SAY_RECRUIT_1 = -1571036,
- SAY_RECRUIT_2 = -1571037,
- SAY_RECRUIT_3 = -1571038
+ GOSSIP_CRUSADE_TEXT = 13069
};
#define GOSSIP_ITEM_1 "Get out there and make those Scourge wish they were never reborn!"
@@ -1325,7 +1321,7 @@ public:
// say random text
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
- DoScriptText(RAND(SAY_RECRUIT_1, SAY_RECRUIT_2, SAY_RECRUIT_3), me);
+ Talk(SAY_RECRUIT);
m_uiTimer = 3000;
m_uiPhase = 2;
break;
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
index 2e911406979..2e911406979 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h
index 14712e0150d..14712e0150d 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp
index a4b506e9271..a4b506e9271 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h
index 59bce7be298..59bce7be298 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
index abf807327e3..abf807327e3 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h
index ace68034dfc..ace68034dfc 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
index 9411bd8a363..9411bd8a363 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h
index c4975d142f0..c4975d142f0 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp
index fdf6533a64b..fdf6533a64b 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h
index dfab6d12cb8..dfab6d12cb8 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp
index 6644dd3f47f..6644dd3f47f 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h
index 8d2124a3791..8d2124a3791 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h
diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
index a8b4b1797cb..5739aa49549 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
@@ -126,30 +126,23 @@ public:
};
-#define SAY_INTRO -1558000
-#define SAY_SUMMON -1558001
-
-#define SAY_AGGRO_1 -1558002
-#define SAY_AGGRO_2 -1558003
-#define SAY_AGGRO_3 -1558004
-
-#define SAY_ROAR -1558005
-#define SAY_SOUL_CLEAVE -1558006
-
-#define SAY_SLAY_1 -1558007
-#define SAY_SLAY_2 -1558008
-
-#define SAY_DEATH -1558009
-
-#define SPELL_RIBBON_OF_SOULS 32422
-#define SPELL_SOUL_SCREAM 32421
-
-#define SPELL_STOLEN_SOUL 32346
-#define SPELL_STOLEN_SOUL_VISUAL 32395
-
-#define SPELL_SUMMON_AVATAR 32424
-
-#define ENTRY_STOLEN_SOUL 18441
+enum ExarchMaladaar
+{
+ SAY_INTRO = 0,
+ SAY_SUMMON = 1,
+ SAY_AGGRO = 2,
+ SAY_ROAR = 3,
+ SAY_SLAY = 4,
+ SAY_DEATH = 5,
+
+ SPELL_RIBBON_OF_SOULS = 32422,
+ SPELL_SOUL_SCREAM = 32421,
+ SPELL_STOLEN_SOUL = 32346,
+ SPELL_STOLEN_SOUL_VISUAL = 32395,
+ SPELL_SUMMON_AVATAR = 32424,
+
+ ENTRY_STOLEN_SOUL = 18441
+};
class boss_exarch_maladaar : public CreatureScript
{
@@ -196,7 +189,7 @@ public:
{
if (!HasTaunted && me->IsWithinDistInMap(who, 150.0f))
{
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
HasTaunted = true;
}
@@ -205,7 +198,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
}
void JustSummoned(Creature* summoned)
@@ -231,12 +224,12 @@ public:
if (rand()%2)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
//When Exarch Maladar is defeated D'ore appear.
me->SummonCreature(19412, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 600000);
}
@@ -251,7 +244,7 @@ public:
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(true);
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
DoCast(me, SPELL_SUMMON_AVATAR);
Avatar_summoned = true;
@@ -267,11 +260,7 @@ public:
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(true);
- uint32 i = urand(1, 2);
- if (i == 1)
- DoScriptText(SAY_ROAR, me);
- else
- DoScriptText(SAY_SOUL_CLEAVE, me);
+ Talk(SAY_ROAR);
soulmodel = target->GetDisplayId();
soulholder = target->GetGUID();
diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
index 351f30c926f..f7a2eb87d67 100644
--- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
@@ -33,14 +33,11 @@ EndContentData */
enum ePrince
{
- SAY_INTRO = -1557000,
- SAY_AGGRO_1 = -1557001,
- SAY_AGGRO_2 = -1557002,
- SAY_AGGRO_3 = -1557003,
- SAY_SLAY_1 = -1557004,
- SAY_SLAY_2 = -1557005,
- SAY_SUMMON = -1557006,
- SAY_DEAD = -1557007,
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_SUMMON = 3,
+ SAY_DEAD = 4,
SPELL_BLINK = 34605,
SPELL_FROSTBOLT = 32364,
@@ -110,14 +107,14 @@ public:
{
if (!HasTaunted && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 100.0f))
{
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
HasTaunted = true;
}
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
DoZoneInCombat();
summons.DoZoneInCombat();
@@ -143,12 +140,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEAD, me);
+ Talk(SAY_DEAD);
summons.DespawnAll();
}
@@ -203,7 +200,7 @@ public:
me->InterruptNonMeleeSpells(true);
if (!urand(0, 3))
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
DoCast(me, SPELL_ETHEREAL_BEACON, true);
diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp
index 459ba3a8f86..f174091311b 100644
--- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp
@@ -26,21 +26,19 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
-#define SAY_AGGRO_1 -1557008
-#define SAY_AGGRO_2 -1557009
-#define SAY_AGGRO_3 -1557010
-
-#define SAY_KILL_1 -1557011
-#define SAY_KILL_2 -1557012
-
-#define SAY_DEATH -1557013
-
-#define EMOTE_DARK_SHELL -1557014
+enum Pandemonius
+{
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_DEATH = 2,
+ EMOTE_DARK_SHELL = 3,
+
+ SPELL_VOID_BLAST = 32325,
+ H_SPELL_VOID_BLAST = 38760,
+ SPELL_DARK_SHELL = 32358,
+ H_SPELL_DARK_SHELL = 38759
+};
-#define SPELL_VOID_BLAST 32325
-#define H_SPELL_VOID_BLAST 38760
-#define SPELL_DARK_SHELL 32358
-#define H_SPELL_DARK_SHELL 38759
class boss_pandemonius : public CreatureScript
{
@@ -71,17 +69,17 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
+ Talk(SAY_KILL);
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
@@ -112,7 +110,7 @@ public:
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(true);
- DoScriptText(EMOTE_DARK_SHELL, me);
+ Talk(EMOTE_DARK_SHELL);
DoCast(me, SPELL_DARK_SHELL);
DarkShell_Timer = 20000;
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
index 0a85cf1dc5b..5bb396965a6 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
@@ -26,28 +26,25 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
-#define SAY_SUMMON -1556000
-
-#define SAY_AGGRO_1 -1556001
-#define SAY_AGGRO_2 -1556002
-#define SAY_AGGRO_3 -1556003
-
-#define SAY_SLAY_1 -1556004
-#define SAY_SLAY_2 -1556005
-
-#define SAY_DEATH -1556006
-
-#define SPELL_FROST_SHOCK 21401 //37865
-#define SPELL_FLAME_SHOCK 34354
-#define SPELL_SHADOW_SHOCK 30138
-#define SPELL_ARCANE_SHOCK 37132
-
-#define SPELL_CHAIN_LIGHTNING 15659 //15305
-
-#define SPELL_SUMMON_SYTH_FIRE 33537 // Spawns 19203
-#define SPELL_SUMMON_SYTH_ARCANE 33538 // Spawns 19205
-#define SPELL_SUMMON_SYTH_FROST 33539 // Spawns 19204
-#define SPELL_SUMMON_SYTH_SHADOW 33540 // Spawns 19206
+enum DarkweaverSyth
+{
+ SAY_SUMMON = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_DEATH = 3,
+
+ SPELL_FROST_SHOCK = 21401, //37865
+ SPELL_FLAME_SHOCK = 34354,
+ SPELL_SHADOW_SHOCK = 30138,
+ SPELL_ARCANE_SHOCK = 37132,
+
+ SPELL_CHAIN_LIGHTNING = 15659, //15305
+
+ SPELL_SUMMON_SYTH_FIRE = 33537, // Spawns 19203
+ SPELL_SUMMON_SYTH_ARCANE = 33538, // Spawns 19205
+ SPELL_SUMMON_SYTH_FROST = 33539, // Spawns 19204
+ SPELL_SUMMON_SYTH_SHADOW = 33540 // Spawns 19206
+};
#define SPELL_FLAME_BUFFET DUNGEON_MODE(33526, 38141)
#define SPELL_ARCANE_BUFFET DUNGEON_MODE(33527, 38138)
@@ -95,12 +92,12 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void KilledUnit(Unit* /*victim*/)
@@ -108,7 +105,7 @@ public:
if (rand()%2)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustSummoned(Creature* summoned)
@@ -119,7 +116,7 @@ public:
void SythSummoning()
{
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(false);
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp
index ec35d6c80b3..07169f031ab 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp
@@ -27,31 +27,26 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "sethekk_halls.h"
-#define SAY_INTRO -1556007
-
-#define SAY_AGGRO_1 -1556008
-#define SAY_AGGRO_2 -1556009
-#define SAY_AGGRO_3 -1556010
-
-#define SAY_SLAY_1 -1556011
-#define SAY_SLAY_2 -1556012
-#define SAY_DEATH -1556013
-#define EMOTE_ARCANE_EXP -1556015
-
-#define SPELL_BLINK 38194
-#define SPELL_BLINK_TELEPORT 38203
-#define SPELL_MANA_SHIELD 38151
-#define SPELL_ARCANE_BUBBLE 9438
-#define H_SPELL_SLOW 35032
-
-#define SPELL_POLYMORPH 38245
-#define H_SPELL_POLYMORPH 43309
-
-#define SPELL_ARCANE_VOLLEY 35059
-#define H_SPELL_ARCANE_VOLLEY 40424
-
-#define SPELL_ARCANE_EXPLOSION 38197
-#define H_SPELL_ARCANE_EXPLOSION 40425
+enum TailonkingIkiss
+{
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_DEATH = 3,
+ EMOTE_ARCANE_EXP = 4,
+
+ SPELL_BLINK = 38194,
+ SPELL_BLINK_TELEPORT = 38203,
+ SPELL_MANA_SHIELD = 38151,
+ SPELL_ARCANE_BUBBLE = 9438,
+ H_SPELL_SLOW = 35032,
+ SPELL_POLYMORPH = 38245,
+ H_SPELL_POLYMORPH = 43309,
+ SPELL_ARCANE_VOLLEY = 35059,
+ H_SPELL_ARCANE_VOLLEY = 40424,
+ SPELL_ARCANE_EXPLOSION = 38197,
+ H_SPELL_ARCANE_EXPLOSION = 40425
+};
class boss_talon_king_ikiss : public CreatureScript
{
@@ -99,7 +94,7 @@ public:
if (!Intro && me->IsWithinDistInMap(who, 100))
{
Intro = true;
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
}
if (!me->CanFly() && me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
@@ -116,12 +111,12 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_IKISSDOOREVENT, DONE);
@@ -129,7 +124,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -183,7 +178,7 @@ public:
if (Blink_Timer <= diff)
{
- DoScriptText(EMOTE_ARCANE_EXP, me);
+ Talk(EMOTE_ARCANE_EXP);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp
index a109e3738b1..c93143c1c5c 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp
@@ -30,14 +30,11 @@ EndScriptData */
enum eEnums
{
- SAY_INTRO = -1555000,
- SAY_AGGRO1 = -1555001,
- SAY_AGGRO2 = -1555002,
- SAY_AGGRO3 = -1555003,
- SAY_HELP = -1555004,
- SAY_SLAY1 = -1555005,
- SAY_SLAY2 = -1555006,
- SAY_DEATH = -1555007,
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ SAY_HELP = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
SPELL_BANISH = 30231,
SPELL_CORROSIVE_ACID = 33551,
@@ -119,7 +116,7 @@ public:
{
if (instance->GetData(TYPE_HELLMAW) != FAIL)
{
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
Start(true, false, 0, NULL, false, true);
}
@@ -129,17 +126,17 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3), me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_HELLMAW, DONE);
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
index e7063e479ee..eb06cce87fc 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
@@ -27,33 +27,26 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "shadow_labyrinth.h"
-#define SPELL_INCITE_CHAOS 33676
-#define SPELL_INCITE_CHAOS_B 33684 //debuff applied to each member of party
-#define SPELL_CHARGE 33709
-#define SPELL_WAR_STOMP 33707
-
-#define SAY_INTRO1 -1555008 //not used
-#define SAY_INTRO2 -1555009 //not used
-#define SAY_INTRO3 -1555010 //not used
-#define SAY_AGGRO1 -1555011
-#define SAY_AGGRO2 -1555012
-#define SAY_AGGRO3 -1555013
-#define SAY_SLAY1 -1555014
-#define SAY_SLAY2 -1555015
-#define SAY_HELP -1555016 //not used
-#define SAY_DEATH -1555017
-
-//below, not used
-#define SAY2_INTRO1 -1555018
-#define SAY2_INTRO2 -1555019
-#define SAY2_INTRO3 -1555020
-#define SAY2_AGGRO1 -1555021
-#define SAY2_AGGRO2 -1555022
-#define SAY2_AGGRO3 -1555023
-#define SAY2_SLAY1 -1555024
-#define SAY2_SLAY2 -1555025
-#define SAY2_HELP -1555026
-#define SAY2_DEATH -1555027
+enum BlackheartTheInciter
+{
+ SPELL_INCITE_CHAOS = 33676,
+ SPELL_INCITE_CHAOS_B = 33684, //debuff applied to each member of party
+ SPELL_CHARGE = 33709,
+ SPELL_WAR_STOMP = 33707,
+
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_HELP = 3,
+ SAY_DEATH = 4,
+
+ //below, not used
+ SAY2_INTRO = 5,
+ SAY2_AGGRO = 6,
+ SAY2_SLAY = 7,
+ SAY2_HELP = 8,
+ SAY2_DEATH = 9
+};
class boss_blackheart_the_inciter : public CreatureScript
{
@@ -94,12 +87,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_BLACKHEARTTHEINCITEREVENT, DONE);
@@ -107,7 +100,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3), me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_BLACKHEARTTHEINCITEREVENT, IN_PROGRESS);
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
index 303a30bea8f..d7dbb8ef722 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
@@ -28,30 +28,30 @@ EndScriptData */
#include "shadow_labyrinth.h"
#include "Player.h"
-#define SAY_INTRO -1555028
-#define SAY_AGGRO1 -1555029
-#define SAY_AGGRO2 -1555030
-#define SAY_AGGRO3 -1555031
-#define SAY_HELP -1555032
-#define SAY_SLAY1 -1555033
-#define SAY_SLAY2 -1555034
-#define SAY_DEATH -1555035
-
-#define SPELL_RAIN_OF_FIRE 33617
-#define H_SPELL_RAIN_OF_FIRE 39363
-
-#define SPELL_DRAW_SHADOWS 33563
-#define SPELL_SHADOWBOLT_VOLLEY 33841
-#define SPELL_BANISH 38791
-
-#define MOB_VOID_TRAVELER 19226
-#define SPELL_SACRIFICE 33587
-#define SPELL_SHADOW_NOVA 33846
-#define SPELL_EMPOWERING_SHADOWS 33783
-#define H_SPELL_EMPOWERING_SHADOWS 39364
-
-#define MOB_VOID_PORTAL 19224
-#define SPELL_VOID_PORTAL_VISUAL 33569
+enum GrandmasterVorpil
+{
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ SAY_HELP = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
+
+ SPELL_RAIN_OF_FIRE = 33617,
+ H_SPELL_RAIN_OF_FIRE = 39363,
+
+ SPELL_DRAW_SHADOWS = 33563,
+ SPELL_SHADOWBOLT_VOLLEY = 33841,
+ SPELL_BANISH = 38791,
+
+ MOB_VOID_TRAVELER = 19226,
+ SPELL_SACRIFICE = 33587,
+ SPELL_SHADOW_NOVA = 33846,
+ SPELL_EMPOWERING_SHADOWS = 33783,
+ H_SPELL_EMPOWERING_SHADOWS = 39364,
+
+ MOB_VOID_PORTAL = 19224,
+ SPELL_VOID_PORTAL_VISUAL = 33569
+};
float VorpilPosition[3] = {-252.8820f, -264.3030f, 17.1f};
@@ -219,7 +219,7 @@ public:
me->SummonCreature(MOB_VOID_TRAVELER, VoidPortalCoords[pos][0], VoidPortalCoords[pos][1], VoidPortalCoords[pos][2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
if (!HelpYell)
{
- DoScriptText(SAY_HELP, me);
+ Talk(SAY_HELP);
HelpYell = true;
}
}
@@ -232,12 +232,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
destroyPortals();
if (instance)
@@ -246,7 +246,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3), me);
+ Talk(SAY_AGGRO);
summonPortals();
if (instance)
@@ -259,7 +259,7 @@ public:
if (!Intro && me->IsWithinLOSInMap(who)&& me->IsWithinDistInMap(who, 100) && me->IsValidAttackTarget(who))
{
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
Intro = true;
}
}
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
index 1503c9f7234..9ca9f7d089c 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
@@ -28,15 +28,20 @@ EndScriptData */
#include "shadow_labyrinth.h"
#include "SpellInfo.h"
-#define EMOTE_SONIC_BOOM -1555036
+enum Murmur
+{
+ SPELL_RESONANCE = 33657,
+ SPELL_MAGNETIC_PULL = 33689,
+ SPELL_SONIC_SHOCK = 38797,
+ SPELL_THUNDERING_STORM = 39365,
+ EMOTE_SONIC_BOOM = 0
+};
#define SPELL_SONIC_BOOM_CAST DUNGEON_MODE(33923, 38796)
#define SPELL_SONIC_BOOM_EFFECT DUNGEON_MODE(33666, 38795)
-#define SPELL_RESONANCE 33657
+
#define SPELL_MURMURS_TOUCH DUNGEON_MODE(33711, 38794)
-#define SPELL_MAGNETIC_PULL 33689
-#define SPELL_SONIC_SHOCK 38797
-#define SPELL_THUNDERING_STORM 39365
+
class boss_murmur : public CreatureScript
{
@@ -123,7 +128,7 @@ public:
}
if (SonicBoom_Timer <= diff)
{
- DoScriptText(EMOTE_SONIC_BOOM, me);
+ Talk(EMOTE_SONIC_BOOM);
DoCast(me, SPELL_SONIC_BOOM_CAST);
SonicBoom_Timer = 30000;
SonicBoom = true;
diff --git a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
index fd775df3392..427c23bafa6 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
@@ -27,32 +27,33 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "black_temple.h"
-//Speech'n'Sound
-#define SAY_AGGRO -1564029
-#define SAY_SLAY1 -1564030
-#define SAY_SLAY2 -1564031
-#define SAY_SPECIAL1 -1564032
-#define SAY_SPECIAL2 -1564033
-#define SAY_ENRAGE1 -1564034
-#define SAY_ENRAGE2 -1564035
-#define SAY_DEATH -1564036
-
-//Spells
-#define SPELL_ACID_GEYSER 40630
-#define SPELL_ACIDIC_WOUND 40481
-#define SPELL_ARCING_SMASH 40599
-#define SPELL_BLOODBOIL 42005 // This spell is AoE whereas it shouldn't be
-#define SPELL_FEL_ACID 40508
-#define SPELL_FEL_RAGE_SELF 40594
-#define SPELL_FEL_RAGE_TARGET 40604
-#define SPELL_FEL_RAGE_2 40616
-#define SPELL_FEL_RAGE_3 41625
-#define SPELL_BEWILDERING_STRIKE 40491
-#define SPELL_EJECT1 40486 // 1000 Physical damage + knockback + script effect (should handle threat reduction I think)
-#define SPELL_EJECT2 40597 // 1000 Physical damage + Stun (used in phase 2?)
-#define SPELL_TAUNT_GURTOGG 40603
-#define SPELL_INSIGNIFIGANCE 40618
-#define SPELL_BERSERK 45078
+enum Bloodboil
+{
+ //Speech'n'Sound
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_SPECIAL = 2,
+ SAY_ENRAGE = 3,
+ SAY_DEATH = 4,
+
+ //Spells
+ SPELL_ACID_GEYSER = 40630,
+ SPELL_ACIDIC_WOUND = 40481,
+ SPELL_ARCING_SMASH = 40599,
+ SPELL_BLOODBOIL = 42005, // This spell is AoE whereas it shouldn't be
+ SPELL_FEL_ACID = 40508,
+ SPELL_FEL_RAGE_SELF = 40594,
+ SPELL_FEL_RAGE_TARGET = 40604,
+ SPELL_FEL_RAGE_2 = 40616,
+ SPELL_FEL_RAGE_3 = 41625,
+ SPELL_BEWILDERING_STRIKE = 40491,
+ SPELL_EJECT1 = 40486, // 1000 Physical damage + knockback + script effect (should handle threat reduction I think)
+ SPELL_EJECT2 = 40597, // 1000 Physical damage + Stun (used in phase 2?)
+ SPELL_TAUNT_GURTOGG = 40603,
+ SPELL_INSIGNIFIGANCE = 40618,
+ SPELL_BERSERK = 45078
+};
+
//This is used to sort the players by distance in preparation for the Bloodboil cast.
@@ -121,14 +122,14 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoZoneInCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_GURTOGGBLOODBOILEVENT, IN_PROGRESS);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
@@ -136,7 +137,7 @@ public:
if (instance)
instance->SetData(DATA_GURTOGGBLOODBOILEVENT, DONE);
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
// Note: This seems like a very complicated fix. The fix needs to be handled by the core, as implementation of limited-target AoE spells are still not limited.
@@ -219,7 +220,7 @@ public:
if (EnrageTimer <= diff)
{
DoCast(me, SPELL_BERSERK);
- DoScriptText(RAND(SAY_ENRAGE1, SAY_ENRAGE2), me);
+ Talk(SAY_ENRAGE);
} else EnrageTimer -= diff;
}
@@ -302,7 +303,7 @@ public:
//Cast this without triggered so that it appears in combat logs and shows visual.
DoCast(me, SPELL_FEL_RAGE_SELF);
- DoScriptText(RAND(SAY_SPECIAL1, SAY_SPECIAL2), me);
+ Talk(SAY_SPECIAL);
AcidGeyserTimer = 1000;
PhaseChangeTimer = 30000;
diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
index ec25a8f9f60..88e7c063c69 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
@@ -27,31 +27,29 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "black_temple.h"
-//Speech'n'Sounds
-#define SAY_TAUNT1 -1564018
-#define SAY_TAUNT2 -1564019
-#define SAY_TAUNT3 -1564020
-#define SAY_AGGRO -1564021
-#define SAY_SPELL1 -1564022
-#define SAY_SPELL2 -1564023
-#define SAY_SPELL3 -1564024
-#define SAY_SLAY1 -1564025
-#define SAY_SLAY2 -1564026
-#define SAY_ENRAGE -1564027
-#define SAY_DEATH -1564028
-
-//Spells
-#define SPELL_BEAM_SINISTER 40859
-#define SPELL_BEAM_VILE 40860
-#define SPELL_BEAM_WICKED 40861
-#define SPELL_BEAM_SINFUL 40827
-#define SPELL_ATTRACTION 40871
-#define SPELL_SILENCING_SHRIEK 40823
-#define SPELL_ENRAGE 23537
-#define SPELL_SABER_LASH 40810//43267
-#define SPELL_SABER_LASH_IMM 43690
-#define SPELL_TELEPORT_VISUAL 40869
-#define SPELL_BERSERK 45078
+enum MotherShahraz
+{
+ //Speech'n'Sounds
+ SAY_TAUNT = 0,
+ SAY_AGGRO = 1,
+ SAY_SPELL = 2,
+ SAY_SLAY = 3,
+ SAY_ENRAGE = 4,
+ SAY_DEATH = 5,
+
+ //Spells
+ SPELL_BEAM_SINISTER = 40859,
+ SPELL_BEAM_VILE = 40860,
+ SPELL_BEAM_WICKED = 40861,
+ SPELL_BEAM_SINFUL = 40827,
+ SPELL_ATTRACTION = 40871,
+ SPELL_SILENCING_SHRIEK = 40823,
+ SPELL_ENRAGE = 23537,
+ SPELL_SABER_LASH = 40810,//43267
+ SPELL_SABER_LASH_IMM = 43690,
+ SPELL_TELEPORT_VISUAL = 40869,
+ SPELL_BERSERK = 45078
+};
uint32 PrismaticAuras[]=
{
@@ -142,12 +140,12 @@ public:
instance->SetData(DATA_MOTHERSHAHRAZEVENT, IN_PROGRESS);
DoZoneInCombat();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
@@ -155,7 +153,7 @@ public:
if (instance)
instance->SetData(DATA_MOTHERSHAHRAZEVENT, DONE);
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void TeleportPlayers()
@@ -185,7 +183,7 @@ public:
{
Enraged = true;
DoCast(me, SPELL_ENRAGE, true);
- DoScriptText(SAY_ENRAGE, me);
+ Talk(SAY_ENRAGE);
}
//Randomly cast one beam.
@@ -236,7 +234,7 @@ public:
TeleportPlayers();
- DoScriptText(RAND(SAY_SPELL2, SAY_SPELL3), me);
+ Talk(SAY_SPELL);
FatalAttractionExplodeTimer = 2000;
FatalAttractionTimer = urand(40, 71) * 1000;
} else FatalAttractionTimer -= diff;
@@ -284,14 +282,14 @@ public:
if (EnrageTimer <= diff)
{
DoCast(me, SPELL_BERSERK);
- DoScriptText(SAY_ENRAGE, me);
+ Talk(SAY_ENRAGE);
} else EnrageTimer -= diff;
}
//Random taunts
if (RandomYellTimer <= diff)
{
- DoScriptText(RAND(SAY_TAUNT1, SAY_TAUNT2, SAY_TAUNT3), me);
+ Talk(SAY_TAUNT);
RandomYellTimer = urand(60, 151) * 1000;
} else RandomYellTimer -= diff;
diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
index 5ab9dcab667..00ea405e109 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
@@ -28,64 +28,61 @@ EndScriptData */
#include "black_temple.h"
#include "Spell.h"
-//Sound'n'speech
-//Suffering
-#define SUFF_SAY_FREED -1564047
-#define SUFF_SAY_AGGRO -1564048
-#define SUFF_SAY_SLAY1 -1564049
-#define SUFF_SAY_SLAY2 -1564050
-#define SUFF_SAY_SLAY3 -1564051
-#define SUFF_SAY_RECAP -1564052
-#define SUFF_SAY_AFTER -1564053
-#define SUFF_EMOTE_ENRAGE -1564054
-
-//Desire
-#define DESI_SAY_FREED -1564055
-#define DESI_SAY_SLAY1 -1564056
-#define DESI_SAY_SLAY2 -1564057
-#define DESI_SAY_SLAY3 -1564058
-#define DESI_SAY_SPEC -1564059
-#define DESI_SAY_RECAP -1564060
-#define DESI_SAY_AFTER -1564061
-
-//Anger
-#define ANGER_SAY_FREED -1564062
-#define ANGER_SAY_FREED2 -1564063
-#define ANGER_SAY_SLAY1 -1564064
-#define ANGER_SAY_SLAY2 -1564065
-#define ANGER_SAY_SPEC -1564066
-#define ANGER_SAY_BEFORE -1564067
-#define ANGER_SAY_DEATH -1564068
-
-//Spells
-#define AURA_OF_SUFFERING 41292
-#define AURA_OF_SUFFERING_ARMOR 42017 // linked aura, need core support
-#define ESSENCE_OF_SUFFERING_PASSIVE 41296 // periodic trigger 41294
-#define ESSENCE_OF_SUFFERING_PASSIVE2 41623
-#define SPELL_FIXATE_TARGET 41294 // dummy, select target
-#define SPELL_FIXATE_TAUNT 41295 // force taunt
-#define SPELL_ENRAGE 41305
-#define SPELL_SOUL_DRAIN 41303
-
-#define AURA_OF_DESIRE 41350
-#define AURA_OF_DESIRE_DAMAGE 41352
-#define SPELL_RUNE_SHIELD 41431
-#define SPELL_DEADEN 41410
-#define SPELL_SOUL_SHOCK 41426
-
-#define AURA_OF_ANGER 41337
-#define SPELL_SELF_SEETHE 41364 // force cast 41520
-#define SPELL_ENEMY_SEETHE 41520
-#define SPELL_SOUL_SCREAM 41545
-#define SPELL_SPITE_TARGET 41376 // cast 41377 after 6 sec
-#define SPELL_SPITE_DAMAGE 41377
-
-#define ENSLAVED_SOUL_PASSIVE 41535
-#define SPELL_SOUL_RELEASE 41542
-#define SPELL_SUBMERGE 37550 //dropout 'head'
-
-#define CREATURE_ENSLAVED_SOUL 23469
-#define NUMBER_ENSLAVED_SOUL 8
+enum ReliquaryOfSouls
+{
+ //Sound'n'speech
+ //Suffering
+ SUFF_SAY_FREED = 0,
+ SUFF_SAY_AGGRO = 1,
+ SUFF_SAY_SLAY = 2,
+ SUFF_SAY_RECAP = 3,
+ SUFF_SAY_AFTER = 4,
+ SUFF_EMOTE_ENRAGE = 5,
+
+ //Desire
+ DESI_SAY_FREED = 0,
+ DESI_SAY_SLAY = 1,
+ DESI_SAY_SPEC = 2,
+ DESI_SAY_RECAP = 3,
+ DESI_SAY_AFTER = 4,
+
+ //Anger
+ ANGER_SAY_FREED = 0,
+ ANGER_SAY_SLAY = 1,
+ ANGER_SAY_SPEC = 2,
+ ANGER_SAY_BEFORE = 3,
+ ANGER_SAY_DEATH = 4,
+
+ //Spells
+ AURA_OF_SUFFERING = 41292,
+ AURA_OF_SUFFERING_ARMOR = 42017, // linked aura, need core support
+ ESSENCE_OF_SUFFERING_PASSIVE = 41296, // periodic trigger 41294
+ ESSENCE_OF_SUFFERING_PASSIVE2 = 41623,
+ SPELL_FIXATE_TARGET = 41294, // dummy, select target
+ SPELL_FIXATE_TAUNT = 41295, // force taunt
+ SPELL_ENRAGE = 41305,
+ SPELL_SOUL_DRAIN = 41303,
+
+ AURA_OF_DESIRE = 41350,
+ AURA_OF_DESIRE_DAMAGE = 41352,
+ SPELL_RUNE_SHIELD = 41431,
+ SPELL_DEADEN = 41410,
+ SPELL_SOUL_SHOCK = 41426,
+
+ AURA_OF_ANGER = 41337,
+ SPELL_SELF_SEETHE = 41364, // force cast 41520
+ SPELL_ENEMY_SEETHE = 41520,
+ SPELL_SOUL_SCREAM = 41545,
+ SPELL_SPITE_TARGET = 41376, // cast 41377 after 6 sec
+ SPELL_SPITE_DAMAGE = 41377,
+
+ ENSLAVED_SOUL_PASSIVE = 41535,
+ SPELL_SOUL_RELEASE = 41542,
+ SPELL_SUBMERGE = 37550, //dropout 'head'
+
+ CREATURE_ENSLAVED_SOUL = 23469,
+ NUMBER_ENSLAVED_SOUL = 8
+};
struct Position2d
{
@@ -337,11 +334,11 @@ public:
case 5:
if (Phase == 1)
{
- DoScriptText(SUFF_SAY_AFTER, Essence);
+ Essence->AI()->Talk(SUFF_SAY_AFTER);
}
else
{
- DoScriptText(DESI_SAY_AFTER, Essence);
+ Essence->AI()->Talk(DESI_SAY_AFTER);
}
Essence->DespawnOrUnsummon();
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
@@ -425,7 +422,7 @@ public:
damage = 0;
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->Yell(SUFF_SAY_RECAP, LANG_UNIVERSAL, 0);
- DoScriptText(SUFF_SAY_RECAP, me);
+ Talk(SUFF_SAY_RECAP);
me->SetReactState(REACT_PASSIVE);
}
}
@@ -434,7 +431,7 @@ public:
{
if (!me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
{
- DoScriptText(SUFF_SAY_FREED, me);
+ Talk(SUFF_SAY_FREED);
DoZoneInCombat();
DoCast(me, AURA_OF_SUFFERING, true); // linked aura need core support
DoCast(me, ESSENCE_OF_SUFFERING_PASSIVE, true);
@@ -445,7 +442,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SUFF_SAY_SLAY1, SUFF_SAY_SLAY2, SUFF_SAY_SLAY3), me);
+ Talk(SUFF_SAY_SLAY);
}
void CastFixate()
@@ -483,7 +480,7 @@ public:
FixateTimer = 5000;
if (!(rand()%16))
{
- DoScriptText(SUFF_SAY_AGGRO, me);
+ Talk(SUFF_SAY_AGGRO);
}
} else FixateTimer -= diff;
}
@@ -496,7 +493,7 @@ public:
{
DoCast(me, SPELL_ENRAGE);
EnrageTimer = 60000;
- DoScriptText(SUFF_EMOTE_ENRAGE, me);
+ Talk(SUFF_EMOTE_ENRAGE);
} else EnrageTimer -= diff;
if (SoulDrainTimer <= diff)
@@ -545,7 +542,7 @@ public:
{
damage = 0;
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- DoScriptText(SUFF_SAY_RECAP, me);
+ Talk(SUFF_SAY_RECAP);
me->SetReactState(REACT_PASSIVE);
}
else
@@ -567,14 +564,14 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(DESI_SAY_FREED, me);
+ Talk(DESI_SAY_FREED);
DoZoneInCombat();
DoCast(me, AURA_OF_DESIRE, true);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(DESI_SAY_SLAY1, DESI_SAY_SLAY2, DESI_SAY_SLAY3), me);
+ Talk(DESI_SAY_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -604,7 +601,7 @@ public:
DeadenTimer = urand(25000, 35000);
if (!(rand()%2))
{
- DoScriptText(DESI_SAY_SPEC, me);
+ Talk(DESI_SAY_SPEC);
}
} else DeadenTimer -= diff;
@@ -652,7 +649,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(ANGER_SAY_FREED, ANGER_SAY_FREED2), me);
+ Talk(ANGER_SAY_FREED);
DoZoneInCombat();
DoCast(me, AURA_OF_ANGER, true);
@@ -660,12 +657,12 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(ANGER_SAY_DEATH, me);
+ Talk(ANGER_SAY_DEATH);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(ANGER_SAY_SLAY1, ANGER_SAY_SLAY2), me);
+ Talk(ANGER_SAY_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -684,7 +681,7 @@ public:
{
if (me->getVictim()->GetGUID() != AggroTargetGUID)
{
- DoScriptText(ANGER_SAY_BEFORE, me);
+ Talk(ANGER_SAY_BEFORE);
DoCast(me, SPELL_SELF_SEETHE, true);
AggroTargetGUID = me->getVictim()->GetGUID();
}
@@ -697,7 +694,7 @@ public:
SoulScreamTimer = urand(9000, 11000);
if (!(rand()%3))
{
- DoScriptText(ANGER_SAY_SPEC, me);
+ Talk(ANGER_SAY_SPEC);
}
} else SoulScreamTimer -= diff;
@@ -705,7 +702,7 @@ public:
{
DoCast(me, SPELL_SPITE_TARGET);
SpiteTimer = 30000;
- DoScriptText(ANGER_SAY_SPEC, me);
+ Talk(ANGER_SAY_SPEC);
} else SpiteTimer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
index 6e770249cf0..0180281cde3 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
@@ -29,12 +29,15 @@ EndScriptData */
#include "black_temple.h"
#include "Player.h"
-#define SAY_DEATH -1564013
-#define SAY_LOW_HEALTH -1564014
-// Ending cinematic text
-#define SAY_FREE -1564015
-#define SAY_BROKEN_FREE_01 -1564016
-#define SAY_BROKEN_FREE_02 -1564017
+enum ShadeOfAkama
+{
+ SAY_DEATH = 0,
+ SAY_LOW_HEALTH = 1,
+ // Ending cinematic text
+ SAY_FREE = 2,
+ SAY_BROKEN_FREE_01 = 0,
+ SAY_BROKEN_FREE_02 = 1
+};
#define GOSSIP_ITEM "We are ready to fight alongside you, Akama"
@@ -704,7 +707,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
EventBegun = false;
ShadeHasDied = false;
StartCombat = false;
@@ -729,7 +732,7 @@ public:
if (HealthBelowPct(15) && !HasYelledOnce)
{
- DoScriptText(SAY_LOW_HEALTH, me);
+ Talk(SAY_LOW_HEALTH);
HasYelledOnce = true;
}
@@ -825,7 +828,7 @@ public:
SummonBrokenTimer = 1;
break;
case 1:
- DoScriptText(SAY_FREE, me);
+ Talk(SAY_FREE);
++EndingTalkCount;
SoulRetrieveTimer = 25000;
break;
@@ -838,7 +841,7 @@ public:
{
if (!Yelled)
{
- DoScriptText(SAY_BROKEN_FREE_01, unit);
+ unit->AI()->Talk(SAY_BROKEN_FREE_01);
Yelled = true;
}
unit->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL);
@@ -863,7 +866,7 @@ public:
{
for (std::list<uint64>::const_iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr)
if (Creature* unit = Unit::GetCreature((*me), *itr))
- unit->MonsterYell(SAY_BROKEN_FREE_02, LANG_UNIVERSAL, 0);
+ unit->AI()->Talk(SAY_BROKEN_FREE_02);
}
SoulRetrieveTimer = 0;
break;
diff --git a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
index 77d1c86951b..388052f0a5e 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
@@ -28,32 +28,35 @@ EndScriptData */
#include "PassiveAI.h"
#include "black_temple.h"
-#define EMOTE_NEW_TARGET -1564010
-#define EMOTE_PUNCH_GROUND -1564011 //DoScriptText(EMOTE_PUNCH_GROUND, me);
-#define EMOTE_GROUND_CRACK -1564012
-
-//Spells
-#define SPELL_MOLTEN_PUNCH 40126
-#define SPELL_HATEFUL_STRIKE 41926
-#define SPELL_MOLTEN_FLAME 40980
-#define SPELL_VOLCANIC_ERUPTION 40117
-#define SPELL_VOLCANIC_SUMMON 40276
-#define SPELL_BERSERK 45078
-
-#define CREATURE_VOLCANO 23085
-#define CREATURE_STALKER 23095
-
-#define PHASE_STRIKE 1
-#define PHASE_CHASE 2
-
-#define EVENT_BERSERK 1
-#define EVENT_SWITCH_PHASE 2
-#define EVENT_FLAME 3
-#define EVENT_VOLCANO 4
-#define EVENT_SWITCH_TARGET 5
-#define EVENT_HATEFUL_STRIKE 6
-
-#define GCD_CAST 1
+enum Supremus
+{
+ EMOTE_NEW_TARGET = 0,
+ EMOTE_PUNCH_GROUND = 1, //Talk(EMOTE_PUNCH_GROUND);
+ EMOTE_GROUND_CRACK = 2,
+
+ //Spells
+ SPELL_MOLTEN_PUNCH = 40126,
+ SPELL_HATEFUL_STRIKE = 41926,
+ SPELL_MOLTEN_FLAME = 40980,
+ SPELL_VOLCANIC_ERUPTION = 40117,
+ SPELL_VOLCANIC_SUMMON = 40276,
+ SPELL_BERSERK = 45078,
+
+ CREATURE_VOLCANO = 23085,
+ CREATURE_STALKER = 23095,
+
+ PHASE_STRIKE = 1,
+ PHASE_CHASE = 2,
+
+ EVENT_BERSERK = 1,
+ EVENT_SWITCH_PHASE = 2,
+ EVENT_FLAME = 3,
+ EVENT_VOLCANO = 4,
+ EVENT_SWITCH_TARGET = 5,
+ EVENT_HATEFUL_STRIKE = 6,
+
+ GCD_CAST = 1
+};
class molten_flame : public CreatureScript
{
@@ -230,7 +233,7 @@ public:
{
DoResetThreat();
me->AddThreat(target, 5000000.0f);
- DoScriptText(EMOTE_NEW_TARGET, me);
+ Talk(EMOTE_NEW_TARGET);
}
events.ScheduleEvent(EVENT_SWITCH_TARGET, 10000, 0, PHASE_CHASE);
break;
@@ -242,7 +245,7 @@ public:
{
//DoCast(target, SPELL_VOLCANIC_SUMMON);//movement bugged
me->SummonCreature(CREATURE_VOLCANO, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 30000);
- DoScriptText(EMOTE_GROUND_CRACK, me);
+ Talk(EMOTE_GROUND_CRACK);
events.DelayEvents(1500, GCD_CAST);
}
events.ScheduleEvent(EVENT_VOLCANO, 10000, GCD_CAST, PHASE_CHASE);
diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
index 9a200d07d2b..ce17ac48cf5 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
@@ -27,30 +27,29 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "black_temple.h"
- //Speech'n'sound
-#define SAY_INTRO -1564037
-#define SAY_AGGRO -1564038
-#define SAY_SLAY1 -1564039
-#define SAY_SLAY2 -1564040
-#define SAY_SPELL1 -1564041
-#define SAY_SPELL2 -1564042
-#define SAY_SPECIAL1 -1564043
-#define SAY_SPECIAL2 -1564044
-#define SAY_ENRAGE -1564045
-#define SAY_DEATH -1564046
-
-//Spells
-#define SPELL_INCINERATE 40239
-#define SPELL_CRUSHING_SHADOWS 40243
-#define SPELL_SHADOWBOLT 40185
-#define SPELL_PASSIVE_SHADOWFORM 40326
-#define SPELL_SHADOW_OF_DEATH 40251
-#define SPELL_BERSERK 45078
-
-#define SPELL_ATROPHY 40327 // Shadowy Constructs use this when they get within melee range of a player
-
-#define CREATURE_DOOM_BLOSSOM 23123
-#define CREATURE_SHADOWY_CONSTRUCT 23111
+enum DoomBlossom
+{
+ //Speech'n'sound
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_SPELL = 3,
+ SAY_SPECIAL = 4,
+ SAY_ENRAGE = 5,
+ SAY_DEATH = 6,
+
+ //Spells
+ SPELL_INCINERATE = 40239,
+ SPELL_CRUSHING_SHADOWS = 40243,
+ SPELL_SHADOWBOLT = 40185,
+ SPELL_PASSIVE_SHADOWFORM = 40326,
+ SPELL_SHADOW_OF_DEATH = 40251,
+ SPELL_BERSERK = 45078,
+ SPELL_ATROPHY = 40327, // Shadowy Constructs use this when they get within melee range of a player
+
+ CREATURE_DOOM_BLOSSOM = 23123,
+ CREATURE_SHADOWY_CONSTRUCT = 23111
+};
class mob_doom_blossom : public CreatureScript
{
@@ -278,7 +277,7 @@ public:
me->GetMotionMaster()->Clear(false);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK);
AggroTargetGUID = who->GetGUID();
Intro = true;
@@ -290,7 +289,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
@@ -298,7 +297,7 @@ public:
if (instance)
instance->SetData(DATA_TERONGOREFIENDEVENT, DONE);
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
float CalculateRandomLocation(float Loc, uint32 radius)
@@ -387,7 +386,7 @@ public:
{
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
Done = true;
if (AggroTargetGUID)
@@ -461,7 +460,7 @@ public:
if (target)
{
- DoScriptText(RAND(SAY_SPECIAL1, SAY_SPECIAL2), me);
+ Talk(SAY_SPECIAL);
DoCast(target, SPELL_INCINERATE);
IncinerateTimer = urand(20, 51) * 1000;
}
@@ -494,7 +493,7 @@ public:
if (RandomYellTimer <= diff)
{
- DoScriptText(RAND(SAY_SPELL1, SAY_SPELL2), me);
+ Talk(SAY_SPELL);
RandomYellTimer = urand(50, 101) * 1000;
} else RandomYellTimer -= diff;
@@ -503,7 +502,7 @@ public:
if (EnrageTimer <= diff)
{
DoCast(me, SPELL_BERSERK);
- DoScriptText(SAY_ENRAGE, me);
+ Talk(SAY_ENRAGE);
} else EnrageTimer -= diff;
}
diff --git a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
index 9924bf1ffab..f56d55c36e3 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
@@ -31,16 +31,12 @@ EndScriptData */
enum eEnums
{
- SAY_AGGRO = -1564000,
- SAY_NEEDLE1 = -1564001,
- SAY_NEEDLE2 = -1564002,
- SAY_SLAY1 = -1564003,
- SAY_SLAY2 = -1564004,
- SAY_SPECIAL1 = -1564005,
- SAY_SPECIAL2 = -1564006,
- SAY_ENRAGE1 = -1564007, //is this text actually in use?
- SAY_ENRAGE2 = -1564008,
- SAY_DEATH = -1564009,
+ SAY_AGGRO = 0,
+ SAY_NEEDLE = 1,
+ SAY_SLAY = 2,
+ SAY_SPECIAL = 3,
+ SAY_ENRAGE = 4,
+ SAY_DEATH = 5,
//Spells
SPELL_NEEDLE_SPINE = 39992,
@@ -97,7 +93,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, me);
+ Talk(SAY_SLAY);
events.DelayEvents(5000, GCD_YELL);
}
@@ -106,7 +102,7 @@ public:
if (instance)
instance->SetData(DATA_HIGHWARLORDNAJENTUSEVENT, DONE);
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
@@ -124,7 +120,7 @@ public:
if (instance)
instance->SetData(DATA_HIGHWARLORDNAJENTUSEVENT, IN_PROGRESS);
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoZoneInCombat();
events.ScheduleEvent(EVENT_BERSERK, 480000, GCD_CAST);
events.ScheduleEvent(EVENT_YELL, 45000 + (rand()%76)*1000, GCD_YELL);
@@ -166,7 +162,7 @@ public:
ResetTimer(45000);
break;
case EVENT_BERSERK:
- DoScriptText(SAY_ENRAGE2, me);
+ Talk(SAY_ENRAGE);
DoCast(me, SPELL_BERSERK, true);
events.DelayEvents(15000, GCD_YELL);
break;
@@ -180,7 +176,7 @@ public:
SpineTargetGUID = target->GetGUID();
//must let target summon, otherwise you cannot click the spine
target->SummonGameObject(GOBJECT_SPINE, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), me->GetOrientation(), 0, 0, 0, 0, 30);
- DoScriptText(urand(0, 1) ? SAY_NEEDLE1 : SAY_NEEDLE2, me);
+ Talk(SAY_NEEDLE);
events.DelayEvents(1500, GCD_CAST);
events.DelayEvents(15000, GCD_YELL);
}
@@ -199,7 +195,7 @@ public:
return;
}
case EVENT_YELL:
- DoScriptText(RAND(SAY_SPECIAL1, SAY_SPECIAL2), me);
+ Talk(SAY_SPECIAL);
events.ScheduleEvent(EVENT_YELL, urand(25000, 100000), GCD_YELL);
events.DelayEvents(15000, GCD_YELL);
break;
diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
index 673d4bcc96f..dcbbb76162d 100644
--- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
+++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
@@ -29,35 +29,69 @@ EndScriptData */
#include "SpellAuraEffects.h"
#include "black_temple.h"
-//Speech'n'Sounds
-#define SAY_GATH_SLAY -1564085
-#define SAY_GATH_SLAY_COMNT -1564089
-#define SAY_GATH_DEATH -1564093
-#define SAY_GATH_SPECIAL1 -1564077
-#define SAY_GATH_SPECIAL2 -1564081
-
-#define SAY_VERA_SLAY -1564086
-#define SAY_VERA_COMNT -1564089 //signed for 22949
-#define SAY_VERA_DEATH -1564094
-#define SAY_VERA_SPECIAL1 -1564078
-#define SAY_VERA_SPECIAL2 -1564082
-
-#define SAY_MALA_SLAY -1564087
-#define SAY_MALA_COMNT -1564090
-#define SAY_MALA_DEATH -1564095
-#define SAY_MALA_SPECIAL1 -1564079
-#define SAY_MALA_SPECIAL2 -1564083
-
-#define SAY_ZERE_SLAY -1564088
-#define SAY_ZERE_COMNT -1564091
-#define SAY_ZERE_DEATH -1564096
-#define SAY_ZERE_SPECIAL1 -1564080
-#define SAY_ZERE_SPECIAL2 -1564084
+enum IllidariCouncil
+{
+ //Speech'n'Sounds
+ SAY_GATH_SPECIAL1 = 2,
+ SAY_GATH_SPECIAL2 = 3,
+ SAY_GATH_SLAY = 4,
+ SAY_GATH_COMNT = 5,
+ SAY_GATH_DEATH = 6,
+
+ SAY_MALA_SPECIAL1 = 2,
+ SAY_MALA_SPECIAL2 = 3,
+ SAY_MALA_SLAY = 4,
+ SAY_MALA_COMNT = 5,
+ SAY_MALA_DEATH = 6,
+
+ SAY_ZERE_SPECIAL1 = 2,
+ SAY_ZERE_SPECIAL2 = 3,
+ SAY_ZERE_SLAY = 4,
+ SAY_ZERE_COMNT = 5,
+ SAY_ZERE_DEATH = 6,
+
+ SAY_VERA_SPECIAL1 = 2,
+ SAY_VERA_SPECIAL2 = 3,
+ SAY_VERA_SLAY = 4,
+ SAY_VERA_COMNT = 5,
+ SAY_VERA_DEATH = 6,
+
+ AKAMAID = 23089,
+
+ // High Nethermancer Zerevor's spells
+ SPELL_FLAMESTRIKE = 41481,
+ SPELL_BLIZZARD = 41482,
+ SPELL_ARCANE_BOLT = 41483,
+ SPELL_ARCANE_EXPLOSION = 41524,
+ SPELL_DAMPEN_MAGIC = 41478,
+
+ // Lady Malande's spells
+ SPELL_EMPOWERED_SMITE = 41471,
+ SPELL_CIRCLE_OF_HEALING = 41455,
+ SPELL_REFLECTIVE_SHIELD = 41475,
+ SPELL_REFLECTIVE_SHIELD_T = 33619,
+ SPELL_DIVINE_WRATH = 41472,
+ SPELL_HEAL_VISUAL = 24171,
+
+ // Gathios the Shatterer's spells
+ SPELL_BLESS_PROTECTION = 41450,
+ SPELL_BLESS_SPELLWARD = 41451,
+ SPELL_CONSECRATION = 41541,
+ SPELL_HAMMER_OF_JUSTICE = 41468,
+ SPELL_SEAL_OF_COMMAND = 41469,
+ SPELL_SEAL_OF_BLOOD = 41459,
+ SPELL_CHROMATIC_AURA = 41453,
+ SPELL_DEVOTION_AURA = 41452,
+
+ // Veras Darkshadow's spells
+ SPELL_DEADLY_POISON = 41485,
+ SPELL_ENVENOM = 41487,
+ SPELL_VANISH = 41479,
+ SPELL_BERSERK = 45078
+};
#define ERROR_INST_DATA "SD2 ERROR: Instance Data for Black Temple not set properly; Illidari Council event will not function properly."
-#define AKAMAID 23089
-
struct CouncilYells
{
int32 entry;
@@ -66,53 +100,21 @@ struct CouncilYells
static CouncilYells CouncilAggro[]=
{
- {-1564069, 5000}, // Gathios
- {-1564070, 5500}, // Veras
- {-1564071, 5000}, // Malande
- {-1564072, 0}, // Zerevor
+ {0, 5000}, // Gathios
+ {0, 5500}, // Veras
+ {0, 5000}, // Malande
+ {0, 0}, // Zerevor
};
// Need to get proper timers for this later
static CouncilYells CouncilEnrage[]=
{
- {-1564073, 2000}, // Gathios
- {-1564074, 6000}, // Veras
- {-1564075, 5000}, // Malande
- {-1564076, 0}, // Zerevor
+ {1, 2000}, // Gathios
+ {1, 6000}, // Veras
+ {1, 5000}, // Malande
+ {1, 0}, // Zerevor
};
-// High Nethermancer Zerevor's spells
-#define SPELL_FLAMESTRIKE 41481
-#define SPELL_BLIZZARD 41482
-#define SPELL_ARCANE_BOLT 41483
-#define SPELL_ARCANE_EXPLOSION 41524
-#define SPELL_DAMPEN_MAGIC 41478
-
-// Lady Malande's spells
-#define SPELL_EMPOWERED_SMITE 41471
-#define SPELL_CIRCLE_OF_HEALING 41455
-#define SPELL_REFLECTIVE_SHIELD 41475
-#define SPELL_REFLECTIVE_SHIELD_T 33619
-#define SPELL_DIVINE_WRATH 41472
-#define SPELL_HEAL_VISUAL 24171
-
-// Gathios the Shatterer's spells
-#define SPELL_BLESS_PROTECTION 41450
-#define SPELL_BLESS_SPELLWARD 41451
-#define SPELL_CONSECRATION 41541
-#define SPELL_HAMMER_OF_JUSTICE 41468
-#define SPELL_SEAL_OF_COMMAND 41469
-#define SPELL_SEAL_OF_BLOOD 41459
-#define SPELL_CHROMATIC_AURA 41453
-#define SPELL_DEVOTION_AURA 41452
-
-// Veras Darkshadow's spells
-#define SPELL_DEADLY_POISON 41485
-#define SPELL_ENVENOM 41487
-#define SPELL_VANISH 41479
-
-#define SPELL_BERSERK 45078
-
class mob_blood_elf_council_voice_trigger : public CreatureScript
{
public:
@@ -179,9 +181,9 @@ public:
{
if (AggroYellTimer <= diff)
{
- if (Unit* pMember = Unit::GetUnit(*me, Council[YellCounter]))
+ if (Creature* pMember = Creature::GetCreature(*me, Council[YellCounter]))
{
- DoScriptText(CouncilAggro[YellCounter].entry, pMember);
+ pMember->AI()->Talk(CouncilAggro[YellCounter].entry);
AggroYellTimer = CouncilAggro[YellCounter].timer;
}
++YellCounter;
@@ -194,10 +196,10 @@ public:
{
if (EnrageTimer <= diff)
{
- if (Unit* pMember = Unit::GetUnit(*me, Council[YellCounter]))
+ if (Creature* pMember = Creature::GetCreature(*me, Council[YellCounter]))
{
pMember->CastSpell(pMember, SPELL_BERSERK, true);
- DoScriptText(CouncilEnrage[YellCounter].entry, pMember);
+ pMember->AI()->Talk(CouncilEnrage[YellCounter].entry);
EnrageTimer = CouncilEnrage[YellCounter].timer;
}
++YellCounter;
@@ -497,12 +499,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(SAY_GATH_SLAY, me);
+ Talk(SAY_GATH_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_GATH_DEATH, me);
+ Talk(SAY_GATH_DEATH);
}
Unit* SelectCouncilMember()
@@ -631,12 +633,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(SAY_ZERE_SLAY, me);
+ Talk(SAY_ZERE_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_ZERE_DEATH, me);
+ Talk(SAY_ZERE_DEATH);
}
void UpdateAI(const uint32 diff)
@@ -731,12 +733,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(SAY_MALA_SLAY, me);
+ Talk(SAY_MALA_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_MALA_DEATH, me);
+ Talk(SAY_MALA_DEATH);
}
void UpdateAI(const uint32 diff)
@@ -817,12 +819,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(SAY_VERA_SLAY, me);
+ Talk(SAY_VERA_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_VERA_DEATH, me);
+ Talk(SAY_VERA_DEATH);
}
void UpdateAI(const uint32 diff)
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
index a5737714e71..5a26ffd9acd 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
@@ -28,64 +28,62 @@ EndScriptData */
#include "serpent_shrine.h"
#include "ScriptedEscortAI.h"
-#define SAY_AGGRO -1548021
-#define SAY_GAIN_BLESSING -1548022
-#define SAY_GAIN_ABILITY1 -1548023
-#define SAY_GAIN_ABILITY2 -1548024
-#define SAY_GAIN_ABILITY3 -1548025
-#define SAY_SLAY1 -1548026
-#define SAY_SLAY2 -1548027
-#define SAY_SLAY3 -1548028
-#define SAY_DEATH -1548029
-
-//Karathress spells
-#define SPELL_CATACLYSMIC_BOLT 38441
-#define SPELL_POWER_OF_SHARKKIS 38455
-#define SPELL_POWER_OF_TIDALVESS 38452
-#define SPELL_POWER_OF_CARIBDIS 38451
-#define SPELL_ENRAGE 24318
-#define SPELL_SEAR_NOVA 38445
-#define SPELL_BLESSING_OF_THE_TIDES 38449
-
-//Sharkkis spells
-#define SPELL_LEECHING_THROW 29436
-#define SPELL_THE_BEAST_WITHIN 38373
-#define SPELL_MULTISHOT 38366
-#define SPELL_SUMMON_FATHOM_LURKER 38433
-#define SPELL_SUMMON_FATHOM_SPOREBAT 38431
-#define SPELL_PET_ENRAGE 19574
-
-//Tidalvess spells
-#define SPELL_FROST_SHOCK 38234
-#define SPELL_SPITFIRE_TOTEM 38236
-#define SPELL_POISON_CLEANSING_TOTEM 38306
-// Spell obsolete
-// #define SPELL_POISON_CLEANSING_EFFECT 8167
-#define SPELL_EARTHBIND_TOTEM 38304
-#define SPELL_EARTHBIND_TOTEM_EFFECT 6474
-#define SPELL_WINDFURY_WEAPON 38184
-
-//Caribdis Spells
-#define SPELL_WATER_BOLT_VOLLEY 38335
-#define SPELL_TIDAL_SURGE 38358
-#define SPELL_TIDAL_SURGE_FREEZE 38357
-#define SPELL_HEAL 38330
-#define SPELL_SUMMON_CYCLONE 38337
-#define SPELL_CYCLONE_CYCLONE 29538
-
-//Yells and Quotes
-#define SAY_GAIN_BLESSING_OF_TIDES "Your overconfidence will be your undoing! Guards, lend me your strength!"
-#define SOUND_GAIN_BLESSING_OF_TIDES 11278
-#define SAY_MISC "Alana be'lendor!" //don't know what use this
-#define SOUND_MISC 11283
-
-//Summoned Unit GUIDs
-#define CREATURE_CYCLONE 22104
-#define CREATURE_FATHOM_SPOREBAT 22120
-#define CREATURE_FATHOM_LURKER 22119
-#define CREATURE_SPITFIRE_TOTEM 22091
-#define CREATURE_EARTHBIND_TOTEM 22486
-#define CREATURE_POISON_CLEANSING_TOTEM 22487
+enum FathomlordKarathress
+{
+ SAY_AGGRO = 0,
+ SAY_GAIN_BLESSING = 1,
+ SAY_GAIN_ABILITY1 = 2,
+ SAY_GAIN_ABILITY2 = 3,
+ SAY_GAIN_ABILITY3 = 4,
+ SAY_SLAY = 5,
+ SAY_DEATH = 6,
+
+ //Karathress spells
+ SPELL_CATACLYSMIC_BOLT = 38441,
+ SPELL_POWER_OF_SHARKKIS = 38455,
+ SPELL_POWER_OF_TIDALVESS = 38452,
+ SPELL_POWER_OF_CARIBDIS = 38451,
+ SPELL_ENRAGE = 24318,
+ SPELL_SEAR_NOVA = 38445,
+ SPELL_BLESSING_OF_THE_TIDES = 38449,
+
+ //Sharkkis spells
+ SPELL_LEECHING_THROW = 29436,
+ SPELL_THE_BEAST_WITHIN = 38373,
+ SPELL_MULTISHOT = 38366,
+ SPELL_SUMMON_FATHOM_LURKER = 38433,
+ SPELL_SUMMON_FATHOM_SPOREBAT = 38431,
+ SPELL_PET_ENRAGE = 19574,
+
+ //Tidalvess spells
+ SPELL_FROST_SHOCK = 38234,
+ SPELL_SPITFIRE_TOTEM = 38236,
+ SPELL_POISON_CLEANSING_TOTEM = 38306,
+ // Spell obsolete
+ SPELL_EARTHBIND_TOTEM = 38304,
+ SPELL_EARTHBIND_TOTEM_EFFECT = 6474,
+ SPELL_WINDFURY_WEAPON = 38184,
+
+ //Caribdis Spells
+ SPELL_WATER_BOLT_VOLLEY = 38335,
+ SPELL_TIDAL_SURGE = 38358,
+ SPELL_TIDAL_SURGE_FREEZE = 38357,
+ SPELL_HEAL = 38330,
+ SPELL_SUMMON_CYCLONE = 38337,
+ SPELL_CYCLONE_CYCLONE = 29538,
+
+ //Yells and Quotes
+ SOUND_GAIN_BLESSING_OF_TIDES = 11278,
+ SOUND_MISC = 11283,
+
+ //Summoned Unit GUIDs
+ CREATURE_CYCLONE = 22104,
+ CREATURE_FATHOM_SPOREBAT = 22120,
+ CREATURE_FATHOM_LURKER = 22119,
+ CREATURE_SPITFIRE_TOTEM = 22091,
+ CREATURE_EARTHBIND_TOTEM = 22486,
+ CREATURE_POISON_CLEANSING_TOTEM = 22487,
+};
//entry and position for Seer Olum
#define SEER_OLUM 22820
@@ -94,6 +92,9 @@ EndScriptData */
#define OLUM_Z -7.54773f
#define OLUM_O 0.401581f
+#define SAY_GAIN_BLESSING_OF_TIDES "Your overconfidence will be your undoing! Guards, lend me your strength!"
+#define SAY_MISC "Alana be'lendor!" //don't know what use this
+
#define MAX_ADVISORS 3
//Fathom-Lord Karathress AI
class boss_fathomlord_karathress : public CreatureScript
@@ -160,19 +161,19 @@ public:
void EventSharkkisDeath()
{
- DoScriptText(SAY_GAIN_ABILITY1, me);
+ Talk(SAY_GAIN_ABILITY1);
DoCast(me, SPELL_POWER_OF_SHARKKIS);
}
void EventTidalvessDeath()
{
- DoScriptText(SAY_GAIN_ABILITY2, me);
+ Talk(SAY_GAIN_ABILITY2);
DoCast(me, SPELL_POWER_OF_TIDALVESS);
}
void EventCaribdisDeath()
{
- DoScriptText(SAY_GAIN_ABILITY3, me);
+ Talk(SAY_GAIN_ABILITY3);
DoCast(me, SPELL_POWER_OF_CARIBDIS);
}
@@ -193,7 +194,7 @@ public:
GetAdvisors();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoZoneInCombat();
instance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID());
@@ -202,12 +203,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_FATHOMLORDKARATHRESSEVENT, DONE);
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp
index bad10752db3..c8589cc05d8 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp
@@ -27,43 +27,45 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "serpent_shrine.h"
-#define SAY_AGGRO -1548000
-#define SAY_SWITCH_TO_CLEAN -1548001
-#define SAY_CLEAN_SLAY1 -1548002
-#define SAY_CLEAN_SLAY2 -1548003
-#define SAY_CLEAN_DEATH -1548004
-#define SAY_SWITCH_TO_CORRUPT -1548005
-#define SAY_CORRUPT_SLAY1 -1548006
-#define SAY_CORRUPT_SLAY2 -1548007
-#define SAY_CORRUPT_DEATH -1548008
-
-#define SWITCH_RADIUS 18
-
-#define MODEL_CORRUPT 20609
-#define MODEL_CLEAN 20162
-
-#define SPELL_WATER_TOMB 38235
-#define SPELL_MARK_OF_HYDROSS1 38215
-#define SPELL_MARK_OF_HYDROSS2 38216
-#define SPELL_MARK_OF_HYDROSS3 38217
-#define SPELL_MARK_OF_HYDROSS4 38218
-#define SPELL_MARK_OF_HYDROSS5 38231
-#define SPELL_MARK_OF_HYDROSS6 40584
-#define SPELL_MARK_OF_CORRUPTION1 38219
-#define SPELL_MARK_OF_CORRUPTION2 38220
-#define SPELL_MARK_OF_CORRUPTION3 38221
-#define SPELL_MARK_OF_CORRUPTION4 38222
-#define SPELL_MARK_OF_CORRUPTION5 38230
-#define SPELL_MARK_OF_CORRUPTION6 40583
-#define SPELL_VILE_SLUDGE 38246
-#define SPELL_ENRAGE 27680 //this spell need verification
-#define SPELL_SUMMON_WATER_ELEMENT 36459 //not in use yet(in use ever?)
-#define SPELL_ELEMENTAL_SPAWNIN 25035
-#define SPELL_BLUE_BEAM 40227 //channeled Hydross Beam Helper (not in use yet)
-
-#define ENTRY_PURE_SPAWN 22035
-#define ENTRY_TAINTED_SPAWN 22036
-#define ENTRY_BEAM_DUMMY 21934
+enum HydrossTheUnstable
+{
+ SAY_AGGRO = 0,
+ SAY_SWITCH_TO_CLEAN = 1,
+ SAY_CLEAN_SLAY = 2,
+ SAY_CLEAN_DEATH = 3,
+ SAY_SWITCH_TO_CORRUPT = 4,
+ SAY_CORRUPT_SLAY = 5,
+ SAY_CORRUPT_DEATH = 6,
+
+ SWITCH_RADIUS = 18,
+
+ MODEL_CORRUPT = 20609,
+ MODEL_CLEAN = 20162,
+
+ SPELL_WATER_TOMB = 38235,
+ SPELL_MARK_OF_HYDROSS1 = 38215,
+ SPELL_MARK_OF_HYDROSS2 = 38216,
+ SPELL_MARK_OF_HYDROSS3 = 38217,
+ SPELL_MARK_OF_HYDROSS4 = 38218,
+ SPELL_MARK_OF_HYDROSS5 = 38231,
+ SPELL_MARK_OF_HYDROSS6 = 40584,
+ SPELL_MARK_OF_CORRUPTION1 = 38219,
+ SPELL_MARK_OF_CORRUPTION2 = 38220,
+ SPELL_MARK_OF_CORRUPTION3 = 38221,
+ SPELL_MARK_OF_CORRUPTION4 = 38222,
+ SPELL_MARK_OF_CORRUPTION5 = 38230,
+ SPELL_MARK_OF_CORRUPTION6 = 40583,
+ SPELL_VILE_SLUDGE = 38246,
+ SPELL_ENRAGE = 27680, //this spell need verification
+ SPELL_SUMMON_WATER_ELEMENT = 36459, //not in use yet(in use ever?)
+ SPELL_ELEMENTAL_SPAWNIN = 25035,
+ SPELL_BLUE_BEAM = 40227, //channeled Hydross Beam Helper (not in use yet)
+
+ ENTRY_PURE_SPAWN = 22035,
+ ENTRY_TAINTED_SPAWN = 22036,
+ ENTRY_BEAM_DUMMY = 21934
+};
+
#define HYDROSS_X -239.439f
#define HYDROSS_Y -363.481f
@@ -169,7 +171,7 @@ public:
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, IN_PROGRESS);
@@ -177,10 +179,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- if (CorruptedForm)
- DoScriptText(RAND(SAY_CORRUPT_SLAY1, SAY_CORRUPT_SLAY2), me);
- else
- DoScriptText(RAND(SAY_CLEAN_SLAY1, SAY_CLEAN_SLAY2), me);
+ Talk(CorruptedForm ? SAY_CORRUPT_SLAY : SAY_CLEAN_SLAY);
}
void JustSummoned(Creature* summoned)
@@ -206,10 +205,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- if (CorruptedForm)
- DoScriptText(SAY_CORRUPT_DEATH, me);
- else
- DoScriptText(SAY_CLEAN_DEATH, me);
+ Talk(CorruptedForm ? SAY_CORRUPT_DEATH : SAY_CLEAN_DEATH);
if (instance)
instance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, DONE);
@@ -293,7 +289,7 @@ public:
CorruptedForm = false;
MarkOfHydross_Count = 0;
- DoScriptText(SAY_SWITCH_TO_CLEAN, me);
+ Talk(SAY_SWITCH_TO_CLEAN);
DoResetThreat();
SummonBeams();
@@ -377,7 +373,7 @@ public:
MarkOfCorruption_Count = 0;
CorruptedForm = true;
- DoScriptText(SAY_SWITCH_TO_CORRUPT, me);
+ Talk(SAY_SWITCH_TO_CORRUPT);
DoResetThreat();
DeSummonBeams();
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
index a934d03349c..6c4c51b03fe 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
@@ -30,48 +30,47 @@ EndScriptData */
#include "Player.h"
#include "WorldSession.h"
-#define SAY_INTRO -1548042
-#define SAY_AGGRO1 -1548043
-#define SAY_AGGRO2 -1548044
-#define SAY_AGGRO3 -1548045
-#define SAY_AGGRO4 -1548046
-#define SAY_PHASE1 -1548047
-#define SAY_PHASE2 -1548048
-#define SAY_PHASE3 -1548049
-#define SAY_BOWSHOT1 -1548050
-#define SAY_BOWSHOT2 -1548051
-#define SAY_SLAY1 -1548052
-#define SAY_SLAY2 -1548053
-#define SAY_SLAY3 -1548054
-#define SAY_DEATH -1548055
-
-#define SPELL_SURGE 38044
-#define SPELL_MULTI_SHOT 38310
-#define SPELL_SHOCK_BLAST 38509
-#define SPELL_ENTANGLE 38316
-#define SPELL_STATIC_CHARGE_TRIGGER 38280
-#define SPELL_FORKED_LIGHTNING 40088
-#define SPELL_SHOOT 40873
-#define SPELL_POISON_BOLT 40095
-#define SPELL_TOXIC_SPORES 38575
-#define SPELL_MAGIC_BARRIER 38112
-
-#define MIDDLE_X 30.134f
-#define MIDDLE_Y -923.65f
-#define MIDDLE_Z 42.9f
-
-#define SPOREBAT_X 30.977156f
+enum LadyVashj
+{
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ SAY_PHASE1 = 2,
+ SAY_PHASE2 = 3,
+ SAY_PHASE3 = 4,
+ SAY_BOWSHOT = 5,
+ SAY_SLAY = 6,
+ SAY_DEATH = 7,
+
+ SPELL_SURGE = 38044,
+ SPELL_MULTI_SHOT = 38310,
+ SPELL_SHOCK_BLAST = 38509,
+ SPELL_ENTANGLE = 38316,
+ SPELL_STATIC_CHARGE_TRIGGER = 38280,
+ SPELL_FORKED_LIGHTNING = 40088,
+ SPELL_SHOOT = 40873,
+ SPELL_POISON_BOLT = 40095,
+ SPELL_TOXIC_SPORES = 38575,
+ SPELL_MAGIC_BARRIER = 38112,
+
+ SHIED_GENERATOR_CHANNEL = 19870,
+ ENCHANTED_ELEMENTAL = 21958,
+ TAINTED_ELEMENTAL = 22009,
+ COILFANG_STRIDER = 22056,
+ COILFANG_ELITE = 22055,
+ TOXIC_SPOREBAT = 22140,
+ TOXIC_SPORES_TRIGGER = 22207
+};
+
+#define MIDDLE_X 30.134f
+#define MIDDLE_Y -923.65f
+#define MIDDLE_Z 42.9f
+
+#define SPOREBAT_X 30.977156f
#define SPOREBAT_Y -925.297761f
#define SPOREBAT_Z 77.176567f
#define SPOREBAT_O 5.223932f
-#define SHIED_GENERATOR_CHANNEL 19870
-#define ENCHANTED_ELEMENTAL 21958
-#define TAINTED_ELEMENTAL 22009
-#define COILFANG_STRIDER 22056
-#define COILFANG_ELITE 22055
-#define TOXIC_SPOREBAT 22140
-#define TOXIC_SPORES_TRIGGER 22207
+
#define TEXT_NOT_INITIALIZED "Instance script not initialized"
#define TEXT_ALREADY_DEACTIVATED "Already deactivated"
@@ -226,12 +225,12 @@ public:
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_LADYVASHJEVENT, DONE);
@@ -239,7 +238,7 @@ public:
void StartEvent()
{
- DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3, SAY_AGGRO4), me);
+ Talk(SAY_AGGRO);
Phase = 1;
@@ -269,7 +268,7 @@ public:
if (!Intro)
{
Intro = true;
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
}
if (!CanAttack)
return;
@@ -307,7 +306,7 @@ public:
}
if (rand()%3)
{
- DoScriptText(RAND(SAY_BOWSHOT1, SAY_BOWSHOT2), me);
+ Talk(SAY_BOWSHOT);
}
}
@@ -397,7 +396,7 @@ public:
if (Creature* creature = me->SummonCreature(SHIED_GENERATOR_CHANNEL, ShieldGeneratorChannelPos[i][0], ShieldGeneratorChannelPos[i][1], ShieldGeneratorChannelPos[i][2], ShieldGeneratorChannelPos[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0))
ShieldGeneratorChannel[i] = creature->GetGUID();
- DoScriptText(SAY_PHASE2, me);
+ Talk(SAY_PHASE2);
}
}
// Phase 3
@@ -527,7 +526,7 @@ public:
me->RemoveAurasDueToSpell(SPELL_MAGIC_BARRIER);
- DoScriptText(SAY_PHASE3, me);
+ Talk(SAY_PHASE3);
Phase = 3;
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
index 1221e59b96e..157473463af 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
@@ -28,47 +28,46 @@ EndScriptData */
#include "serpent_shrine.h"
#include "Player.h"
-// --- Spells used by Leotheras The Blind
-#define SPELL_WHIRLWIND 37640
-#define SPELL_CHAOS_BLAST 37674
-#define SPELL_BERSERK 26662
-#define SPELL_INSIDIOUS_WHISPER 37676
-#define SPELL_DUAL_WIELD 42459
-
-// --- Spells used in banish phase ---
-#define BANISH_BEAM 38909
-#define AURA_BANISH 37833
-
-// --- Spells used by Greyheart Spellbinders
-#define SPELL_EARTHSHOCK 39076
-#define SPELL_MINDBLAST 37531
-
-// --- Spells used by Inner Demons and Creature ID
-#define INNER_DEMON_ID 21857
-#define AURA_DEMONIC_ALIGNMENT 37713
-#define SPELL_SHADOWBOLT 39309
-#define SPELL_SOUL_LINK 38007
-#define SPELL_CONSUMING_MADNESS 37749 //not supported by core yet
-
-//Misc.
-#define MODEL_DEMON 20125
-#define MODEL_NIGHTELF 20514
-#define DEMON_FORM 21875
-#define MOB_SPELLBINDER 21806
-#define INNER_DEMON_VICTIM 1
-
-#define SAY_AGGRO -1548009
-#define SAY_SWITCH_TO_DEMON -1548010
-#define SAY_INNER_DEMONS -1548011
-#define SAY_DEMON_SLAY1 -1548012
-#define SAY_DEMON_SLAY2 -1548013
-#define SAY_DEMON_SLAY3 -1548014
-#define SAY_NIGHTELF_SLAY1 -1548015
-#define SAY_NIGHTELF_SLAY2 -1548016
-#define SAY_NIGHTELF_SLAY3 -1548017
-#define SAY_FINAL_FORM -1548018
-#define SAY_FREE -1548019
-#define SAY_DEATH -1548020
+enum LeotherasTheBlind
+{
+ // Spells used by Leotheras The Blind
+ SPELL_WHIRLWIND = 37640,
+ SPELL_CHAOS_BLAST = 37674,
+ SPELL_BERSERK = 26662,
+ SPELL_INSIDIOUS_WHISPER = 37676,
+ SPELL_DUAL_WIELD = 42459,
+
+ // Spells used in banish phase
+ BANISH_BEAM = 38909,
+ AURA_BANISH = 37833,
+
+ // Spells used by Greyheart Spellbinders
+ SPELL_EARTHSHOCK = 39076,
+ SPELL_MINDBLAST = 37531,
+
+ // Spells used by Inner Demons and Creature ID
+ INNER_DEMON_ID = 21857,
+ AURA_DEMONIC_ALIGNMENT = 37713,
+ SPELL_SHADOWBOLT = 39309,
+ SPELL_SOUL_LINK = 38007,
+ SPELL_CONSUMING_MADNESS = 37749,
+
+ //Misc.
+ MODEL_DEMON = 20125,
+ MODEL_NIGHTELF = 20514,
+ DEMON_FORM = 21875,
+ MOB_SPELLBINDER = 21806,
+ INNER_DEMON_VICTIM = 1,
+
+ SAY_AGGRO = 0,
+ SAY_SWITCH_TO_DEMON = 1,
+ SAY_INNER_DEMONS = 2,
+ SAY_DEMON_SLAY = 3,
+ SAY_NIGHTELF_SLAY = 4,
+ SAY_FINAL_FORM = 5,
+ SAY_FREE = 6,
+ SAY_DEATH = 7
+};
class mob_inner_demon : public CreatureScript
{
@@ -289,7 +288,7 @@ public:
void StartEvent()
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_LEOTHERASTHEBLINDEVENT, IN_PROGRESS);
}
@@ -389,19 +388,12 @@ public:
if (victim->GetTypeId() != TYPEID_PLAYER)
return;
- if (DemonForm)
- {
- DoScriptText(RAND(SAY_DEMON_SLAY1, SAY_DEMON_SLAY2, SAY_DEMON_SLAY3), me);
- }
- else
- {
- DoScriptText(RAND(SAY_NIGHTELF_SLAY1, SAY_NIGHTELF_SLAY2, SAY_NIGHTELF_SLAY3), me);
- }
+ Talk(DemonForm ? SAY_DEMON_SLAY : SAY_NIGHTELF_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
//despawn copy
if (Demon)
@@ -493,7 +485,7 @@ public:
//switch to demon form
me->RemoveAurasDueToSpell(SPELL_WHIRLWIND, 0);
me->SetDisplayId(MODEL_DEMON);
- DoScriptText(SAY_SWITCH_TO_DEMON, me);
+ Talk(SAY_SWITCH_TO_DEMON);
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
DemonForm = true;
@@ -556,7 +548,7 @@ public:
}
}
}
- DoScriptText(SAY_INNER_DEMONS, me);
+ Talk(SAY_INNER_DEMONS);
InnerDemons_Timer = 999999;
} else InnerDemons_Timer -= diff;
@@ -595,7 +587,7 @@ public:
IsFinalForm = true;
DemonForm = false;
- DoScriptText(SAY_FINAL_FORM, me);
+ Talk(SAY_FINAL_FORM);
me->SetDisplayId(MODEL_NIGHTELF);
me->LoadEquipment(me->GetEquipmentId());
}
@@ -629,7 +621,7 @@ public:
void StartEvent()
{
- DoScriptText(SAY_FREE, me);
+ Talk(SAY_FREE);
}
void KilledUnit(Unit* victim)
@@ -637,7 +629,7 @@ public:
if (victim->GetTypeId() != TYPEID_PLAYER)
return;
- DoScriptText(RAND(SAY_DEMON_SLAY1, SAY_DEMON_SLAY2, SAY_DEMON_SLAY3), me);
+ Talk(SAY_DEMON_SLAY);
}
void JustDied(Unit* /*killer*/)
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
index 32f03d4d1f9..9c7fdadc18a 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
@@ -30,37 +30,33 @@ EndScriptData */
enum eEnums
{
// Yell
- SAY_AGGRO = -1548030,
- SAY_SUMMON1 = -1548031,
- SAY_SUMMON2 = -1548032,
- SAY_SUMMON_BUBL1 = -1548033,
- SAY_SUMMON_BUBL2 = -1548034,
- SAY_SLAY1 = -1548035,
- SAY_SLAY2 = -1548036,
- SAY_SLAY3 = -1548037,
- SAY_DEATH = -1548038,
+ SAY_AGGRO = 0,
+ SAY_SUMMON = 1,
+ SAY_SUMMON_BUBL = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
// Emotes
- EMOTE_WATERY_GRAVE = -1548039,
- EMOTE_EARTHQUAKE = -1548040,
- EMOTE_WATERY_GLOBULES = -1548041,
+ EMOTE_WATERY_GRAVE = 5,
+ EMOTE_EARTHQUAKE = 6,
+ EMOTE_WATERY_GLOBULES = 7,
// Spells
- SPELL_TIDAL_WAVE = 37730,
- SPELL_WATERY_GRAVE = 38049,
- SPELL_EARTHQUAKE = 37764,
- SPELL_WATERY_GRAVE_EXPLOSION = 37852,
-
- SPELL_WATERY_GRAVE_1 = 38023,
- SPELL_WATERY_GRAVE_2 = 38024,
- SPELL_WATERY_GRAVE_3 = 38025,
- SPELL_WATERY_GRAVE_4 = 37850,
-
- SPELL_SUMMON_WATER_GLOBULE_1 = 37854,
- SPELL_SUMMON_WATER_GLOBULE_2 = 37858,
- SPELL_SUMMON_WATER_GLOBULE_3 = 37860,
- SPELL_SUMMON_WATER_GLOBULE_4 = 37861,
+ SPELL_TIDAL_WAVE = 37730,
+ SPELL_WATERY_GRAVE = 38049,
+ SPELL_EARTHQUAKE = 37764,
+ SPELL_WATERY_GRAVE_EXPLOSION = 37852,
+
+ SPELL_WATERY_GRAVE_1 = 38023,
+ SPELL_WATERY_GRAVE_2 = 38024,
+ SPELL_WATERY_GRAVE_3 = 38025,
+ SPELL_WATERY_GRAVE_4 = 37850,
+
+ SPELL_SUMMON_WATER_GLOBULE_1 = 37854,
+ SPELL_SUMMON_WATER_GLOBULE_2 = 37858,
+ SPELL_SUMMON_WATER_GLOBULE_3 = 37860,
+ SPELL_SUMMON_WATER_GLOBULE_4 = 37861,
// Creatures
- NPC_WATER_GLOBULE = 21913,
- NPC_TIDEWALKER_LURKER = 21920,
+ NPC_WATER_GLOBULE = 21913,
+ NPC_TIDEWALKER_LURKER = 21920
};
float MurlocCords[10][4] =
@@ -130,7 +126,7 @@ public:
void StartEvent()
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, IN_PROGRESS);
@@ -138,12 +134,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, DONE);
@@ -184,7 +180,7 @@ public:
}
else
{
- DoScriptText(RAND(SAY_SUMMON1, SAY_SUMMON2), me);
+ Talk(SAY_SUMMON);
for (uint8 i = 0; i < 10; ++i)
{
@@ -193,7 +189,7 @@ public:
if (target && Murloc)
Murloc->AI()->AttackStart(target);
}
- DoScriptText(EMOTE_EARTHQUAKE, me);
+ Talk(EMOTE_EARTHQUAKE);
Earthquake = false;
Earthquake_Timer = 40000+rand()%5000;
}
@@ -235,9 +231,9 @@ public:
}
}
- DoScriptText(RAND(SAY_SUMMON_BUBL1, SAY_SUMMON_BUBL2), me);
+ Talk(SAY_SUMMON_BUBL);
- DoScriptText(EMOTE_WATERY_GRAVE, me);
+ Talk(EMOTE_WATERY_GRAVE);
WateryGrave_Timer = 30000;
} else WateryGrave_Timer -= diff;
@@ -271,7 +267,7 @@ public:
pGlobuleTarget->CastSpell(pGlobuleTarget, globulespell[g], true);
}
}
- DoScriptText(EMOTE_WATERY_GLOBULES, me);
+ Talk(EMOTE_WATERY_GLOBULES);
WateryGlobules_Timer = 25000;
} else WateryGlobules_Timer -= diff;
}
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp
index 038300213a4..e2d581128fd 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp
@@ -32,20 +32,20 @@ EndContentData */
#include "ScriptedCreature.h"
#include "steam_vault.h"
-#define SAY_SUMMON -1545000
-#define SAY_AGGRO_1 -1545001
-#define SAY_AGGRO_2 -1545002
-#define SAY_AGGRO_3 -1545003
-#define SAY_SLAY_1 -1545004
-#define SAY_SLAY_2 -1545005
-#define SAY_DEAD -1545006
+enum HydromancerThespia
+{
+ SAY_SUMMON = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_DEAD = 3,
-#define SPELL_LIGHTNING_CLOUD 25033
-#define SPELL_LUNG_BURST 31481
-#define SPELL_ENVELOPING_WINDS 31718
+ SPELL_LIGHTNING_CLOUD = 25033,
+ SPELL_LUNG_BURST = 31481,
+ SPELL_ENVELOPING_WINDS = 31718,
-#define SPELL_WATER_BOLT_VOLLEY 34449
-#define H_SPELL_WATER_BOLT_VOLLEY 37924
+ SPELL_WATER_BOLT_VOLLEY = 34449,
+ H_SPELL_WATER_BOLT_VOLLEY = 37924
+};
class boss_hydromancer_thespia : public CreatureScript
{
@@ -82,7 +82,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEAD, me);
+ Talk(SAY_DEAD);
if (instance)
instance->SetData(TYPE_HYDROMANCER_THESPIA, DONE);
@@ -90,12 +90,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(TYPE_HYDROMANCER_THESPIA, IN_PROGRESS);
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
index 50cc913c669..6a70cb97759 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
@@ -32,22 +32,19 @@ EndContentData */
#include "ScriptedCreature.h"
#include "steam_vault.h"
-#define SAY_MECHANICS -1545007
-#define SAY_AGGRO_1 -1545008
-#define SAY_AGGRO_2 -1545009
-#define SAY_AGGRO_3 -1545010
-#define SAY_AGGRO_4 -1545011
-#define SAY_SLAY_1 -1545012
-#define SAY_SLAY_2 -1545013
-#define SAY_SLAY_3 -1545014
-#define SAY_DEATH -1545015
-
-#define SPELL_SUPER_SHRINK_RAY 31485
-#define SPELL_SAW_BLADE 31486
-#define SPELL_ELECTRIFIED_NET 35107
-#define H_SPELL_ENRAGE 1 //corrent enrage spell not known
-
-#define ENTRY_STREAMRIGGER_MECHANIC 17951
+enum MekgineerSteamrigger
+{
+ SAY_MECHANICS = 0,
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_DEATH = 3,
+
+ SPELL_SUPER_SHRINK_RAY = 31485,
+ SPELL_SAW_BLADE = 31486,
+ SPELL_ELECTRIFIED_NET = 35107,
+
+ ENTRY_STREAMRIGGER_MECHANIC = 17951
+};
class boss_mekgineer_steamrigger : public CreatureScript
{
@@ -91,7 +88,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_MEKGINEER_STEAMRIGGER, DONE);
@@ -99,12 +96,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(TYPE_MEKGINEER_STEAMRIGGER, IN_PROGRESS);
@@ -113,7 +110,7 @@ public:
//no known summon spells exist
void SummonMechanichs()
{
- DoScriptText(SAY_MECHANICS, me);
+ Talk(SAY_MECHANICS);
DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC, 5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC, -5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp
index ac730292545..51c477365a3 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp
@@ -28,21 +28,21 @@ EndScriptData */
#include "steam_vault.h"
#include "SpellInfo.h"
-#define SAY_INTRO -1545016
-#define SAY_REGEN -1545017
-#define SAY_AGGRO1 -1545018
-#define SAY_AGGRO2 -1545019
-#define SAY_AGGRO3 -1545020
-#define SAY_SLAY1 -1545021
-#define SAY_SLAY2 -1545022
-#define SAY_DEATH -1545023
-
-#define SPELL_SPELL_REFLECTION 31534
-#define SPELL_IMPALE 39061
-#define SPELL_WARLORDS_RAGE 37081
-#define SPELL_WARLORDS_RAGE_NAGA 31543
-
-#define SPELL_WARLORDS_RAGE_PROC 36453
+enum NagaDistiller
+{
+ SAY_INTRO = 0,
+ SAY_REGEN = 1,
+ SAY_AGGRO = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
+
+ SPELL_SPELL_REFLECTION = 31534,
+ SPELL_IMPALE = 39061,
+ SPELL_WARLORDS_RAGE = 37081,
+ SPELL_WARLORDS_RAGE_NAGA = 31543,
+
+ SPELL_WARLORDS_RAGE_PROC = 36453
+};
class mob_naga_distiller : public CreatureScript
{
@@ -139,7 +139,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3), me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(TYPE_WARLORD_KALITHRESH, IN_PROGRESS);
@@ -147,7 +147,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
@@ -161,7 +161,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_WARLORD_KALITHRESH, DONE);
@@ -176,7 +176,7 @@ public:
{
if (Creature* distiller = me->FindNearestCreature(17954, 100.0f))
{
- DoScriptText(SAY_REGEN, me);
+ Talk(SAY_REGEN);
DoCast(me, SPELL_WARLORDS_RAGE);
CAST_AI(mob_naga_distiller::mob_naga_distillerAI, distiller->AI())->StartRageGen(me);
}
diff --git a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
index 3443103fa70..797d0f0d799 100644
--- a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
+++ b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
@@ -30,17 +30,13 @@ EndScriptData */
enum eEnums
{
- SAY_AGGRO = -1565010,
- SAY_SLAM1 = -1565011,
- SAY_SLAM2 = -1565012,
- SAY_SHATTER1 = -1565013,
- SAY_SHATTER2 = -1565014,
- SAY_SLAY1 = -1565015,
- SAY_SLAY2 = -1565016,
- SAY_SLAY3 = -1565017,
- SAY_DEATH = -1565018,
-
- EMOTE_GROW = -1565019,
+ SAY_AGGRO = 0,
+ SAY_SLAM = 1,
+ SAY_SHATTER = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
+
+ EMOTE_GROW = 5,
SPELL_GROWTH = 36300,
SPELL_CAVE_IN = 36240,
@@ -100,7 +96,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_GRUULEVENT, IN_PROGRESS);
@@ -108,12 +104,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
{
@@ -172,7 +168,7 @@ public:
// Gruul can cast this spell up to 30 times
if (m_uiGrowth_Timer <= uiDiff)
{
- DoScriptText(EMOTE_GROW, me);
+ Talk(EMOTE_GROW);
DoCast(me, SPELL_GROWTH);
m_uiGrowth_Timer = 30000;
}
diff --git a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
index 03089d646f9..2d2c36104a2 100644
--- a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
+++ b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
@@ -27,46 +27,44 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "gruuls_lair.h"
-#define SAY_AGGRO -1565000
-#define SAY_ENRAGE -1565001
-#define SAY_OGRE_DEATH1 -1565002
-#define SAY_OGRE_DEATH2 -1565003
-#define SAY_OGRE_DEATH3 -1565004
-#define SAY_OGRE_DEATH4 -1565005
-#define SAY_SLAY1 -1565006
-#define SAY_SLAY2 -1565007
-#define SAY_SLAY3 -1565008
-#define SAY_DEATH -1565009
-
-// High King Maulgar
-#define SPELL_ARCING_SMASH 39144
-#define SPELL_MIGHTY_BLOW 33230
-#define SPELL_WHIRLWIND 33238
-#define SPELL_BERSERKER_C 26561
-#define SPELL_ROAR 16508
-#define SPELL_FLURRY 33232
-#define SPELL_DUAL_WIELD 29651 //used in phase
-
-// Olm the Summoner
-#define SPELL_DARK_DECAY 33129
-#define SPELL_DEATH_COIL 33130
-#define SPELL_SUMMON_WFH 33131
-
-//Kiggler the Craed
-#define SPELL_GREATER_POLYMORPH 33173
-#define SPELL_LIGHTNING_BOLT 36152
-#define SPELL_ARCANE_SHOCK 33175
-#define SPELL_ARCANE_EXPLOSION 33237
-
-//Blindeye the Seer
-#define SPELL_GREATER_PW_SHIELD 33147
-#define SPELL_HEAL 33144
-#define SPELL_PRAYER_OH 33152
-
-//Krosh Firehand
-#define SPELL_GREATER_FIREBALL 33051
-#define SPELL_SPELLSHIELD 33054
-#define SPELL_BLAST_WAVE 33061
+enum HighKingMaulgar
+{
+ SAY_AGGRO = 0,
+ SAY_ENRAGE = 1,
+ SAY_OGRE_DEATH = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
+
+ // High King Maulgar
+ SPELL_ARCING_SMASH = 39144,
+ SPELL_MIGHTY_BLOW = 33230,
+ SPELL_WHIRLWIND = 33238,
+ SPELL_BERSERKER_C = 26561,
+ SPELL_ROAR = 16508,
+ SPELL_FLURRY = 33232,
+ SPELL_DUAL_WIELD = 29651,
+
+ // Olm the Summoner
+ SPELL_DARK_DECAY = 33129,
+ SPELL_DEATH_COIL = 33130,
+ SPELL_SUMMON_WFH = 33131,
+
+ //Kiggler the Craed
+ SPELL_GREATER_POLYMORPH = 33173,
+ SPELL_LIGHTNING_BOLT = 36152,
+ SPELL_ARCANE_SHOCK = 33175,
+ SPELL_ARCANE_EXPLOSION = 33237,
+
+ //Blindeye the Seer
+ SPELL_GREATER_PW_SHIELD = 33147,
+ SPELL_HEAL = 33144,
+ SPELL_PRAYER_OH = 33152,
+
+ //Krosh Firehand
+ SPELL_GREATER_FIREBALL = 33051,
+ SPELL_SPELLSHIELD = 33054,
+ SPELL_BLAST_WAVE = 33061
+};
bool CheckAllBossDied(InstanceScript* instance, Creature* me)
{
@@ -171,12 +169,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (CheckAllBossDied(instance, me))
instance->SetData(DATA_MAULGAREVENT, DONE);
@@ -184,7 +182,7 @@ public:
void AddDeath()
{
- DoScriptText(RAND(SAY_OGRE_DEATH1, SAY_OGRE_DEATH2, SAY_OGRE_DEATH3, SAY_OGRE_DEATH4), me);
+ Talk(SAY_OGRE_DEATH);
}
void EnterCombat(Unit* who)
@@ -211,7 +209,7 @@ public:
GetCouncil();
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
instance->SetData64(DATA_MAULGAREVENT_TANK, who->GetGUID());
instance->SetData(DATA_MAULGAREVENT, IN_PROGRESS);
@@ -269,7 +267,7 @@ public:
if (!Phase2 && HealthBelowPct(50))
{
Phase2 = true;
- DoScriptText(SAY_ENRAGE, me);
+ Talk(SAY_ENRAGE);
DoCast(me, SPELL_DUAL_WIELD, true);
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 0);
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
index b42641c5171..4b364d1c0a8 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
@@ -29,7 +29,7 @@ EndScriptData */
enum eEnums
{
- SAY_AGGRO = -1542008,
+ SAY_AGGRO = 0,
SPELL_SLIME_SPRAY = 30913,
SPELL_POISON_CLOUD = 30916,
@@ -73,7 +73,7 @@ class boss_broggok : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void JustSummoned(Creature* summoned)
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp
index 3c07862e0f6..2fe95e1bf4d 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp
@@ -35,14 +35,11 @@ EndContentData */
enum eKelidan
{
- SAY_WAKE = -1542000,
- SAY_ADD_AGGRO_1 = -1542001,
- SAY_ADD_AGGRO_2 = -1542002,
- SAY_ADD_AGGRO_3 = -1542003,
- SAY_KILL_1 = -1542004,
- SAY_KILL_2 = -1542005,
- SAY_NOVA = -1542006,
- SAY_DIE = -1542007,
+ SAY_WAKE = 0,
+ SAY_ADD_AGGRO = 1,
+ SAY_KILL = 2,
+ SAY_NOVA = 3,
+ SAY_DIE = 4,
SPELL_CORRUPTION = 30938,
SPELL_EVOCATION = 30935,
@@ -117,7 +114,7 @@ class boss_kelidan_the_breaker : public CreatureScript
void EnterCombat(Unit* who)
{
- DoScriptText(SAY_WAKE, me);
+ Talk(SAY_WAKE);
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(true);
DoStartMovement(who);
@@ -130,7 +127,7 @@ class boss_kelidan_the_breaker : public CreatureScript
if (rand()%2)
return;
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
+ Talk(SAY_KILL);
}
void ChannelerEngaged(Unit* who)
@@ -138,7 +135,7 @@ class boss_kelidan_the_breaker : public CreatureScript
if (who && !addYell)
{
addYell = true;
- DoScriptText(RAND(SAY_ADD_AGGRO_1, SAY_ADD_AGGRO_2, SAY_ADD_AGGRO_3), me);
+ Talk(SAY_ADD_AGGRO);
}
for (uint8 i=0; i<5; ++i)
{
@@ -194,7 +191,7 @@ class boss_kelidan_the_breaker : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DIE, me);
+ Talk(SAY_DIE);
if (!instance)
return;
@@ -254,7 +251,7 @@ class boss_kelidan_the_breaker : public CreatureScript
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(true);
- DoScriptText(SAY_NOVA, me);
+ Talk(SAY_NOVA);
if (SpellInfo const* nova = sSpellMgr->GetSpellInfo(SPELL_BURNING_NOVA))
{
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp
index df9aefabe15..4dfd7e8a8e8 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp
@@ -29,17 +29,14 @@ EndScriptData */
enum eEnums
{
- SAY_AGGRO_1 = -1542009,
- SAY_AGGRO_2 = -1542010,
- SAY_AGGRO_3 = -1542011,
- SAY_KILL_1 = -1542012,
- SAY_KILL_2 = -1542013,
- SAY_DIE = -1542014,
-
- SPELL_ACID_SPRAY = 38153, // heroic 38973 ??? 38153
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_DIE = 2,
+
+ SPELL_ACID_SPRAY = 38153,
SPELL_EXPLODING_BREAKER = 30925,
SPELL_KNOCKDOWN = 20276,
- SPELL_DOMINATION = 25772 // ???
+ SPELL_DOMINATION = 25772
};
class boss_the_maker : public CreatureScript
@@ -81,7 +78,7 @@ class boss_the_maker : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
if (!instance)
return;
@@ -92,12 +89,12 @@ class boss_the_maker : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
+ Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DIE, me);
+ Talk(SAY_DIE);
if (!instance)
return;
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
index 56365216be5..a40c2e480bd 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
@@ -29,14 +29,12 @@ EndScriptData */
enum eSays
{
- SAY_AGGRO_1 = -1543009,
- SAY_AGGRO_2 = -1543010,
- SAY_AGGRO_3 = -1543011,
- SAY_SUMMON = -1543012,
- SAY_CURSE = -1543013,
- SAY_KILL_1 = -1543014,
- SAY_DIE = -1543015,
- SAY_WIPE = -1543016,
+ SAY_AGGRO = 0,
+ SAY_SUMMON = 1,
+ SAY_CURSE = 2,
+ SAY_KILL_1 = 3,
+ SAY_DIE = 4,
+ SAY_WIPE = 5,
};
enum eSpells
@@ -79,7 +77,7 @@ class boss_omor_the_unscarred : public CreatureScript
void Reset()
{
- DoScriptText(SAY_WIPE, me);
+ Talk(SAY_WIPE);
OrbitalStrike_Timer = 25000;
ShadowWhip_Timer = 2000;
@@ -94,7 +92,7 @@ class boss_omor_the_unscarred : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
@@ -102,12 +100,12 @@ class boss_omor_the_unscarred : public CreatureScript
if (rand()%2)
return;
- DoScriptText(SAY_KILL_1, me);
+ Talk(SAY_KILL_1);
}
void JustSummoned(Creature* summoned)
{
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
if (Unit* random = SelectTarget(SELECT_TARGET_RANDOM, 0))
summoned->AI()->AttackStart(random);
@@ -117,7 +115,7 @@ class boss_omor_the_unscarred : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DIE, me);
+ Talk(SAY_DIE);
}
void UpdateAI(const uint32 diff)
@@ -192,7 +190,7 @@ class boss_omor_the_unscarred : public CreatureScript
if (Aura_Timer <= diff)
{
- DoScriptText(SAY_CURSE, me);
+ Talk(SAY_CURSE);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
index f0c4330c9a3..5617c69aea9 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
@@ -39,7 +39,7 @@ enum eSpells
SPELL_REVENGE = 19130,
SPELL_REVENGE_H = 40392,
SPELL_KIDNEY_SHOT = 30621,
- SPELL_FIRE_NOVA_VISUAL = 19823,
+ SPELL_FIRE_NOVA_VISUAL = 19823
};
enum eUnits
@@ -50,20 +50,19 @@ enum eUnits
ENTRY_NAZAN = 17536,
ENTRY_LIQUID_FIRE = 22515,
ENTRY_REINFORCED_FEL_IRON_CHEST = 185168,
- ENTRY_REINFORCED_FEL_IRON_CHEST_H = 185169,
+ ENTRY_REINFORCED_FEL_IRON_CHEST_H = 185169
};
-enum eSays
+enum Says
{
- SAY_INTRO = -1543017,
- SAY_WIPE = -1543018,
- SAY_AGGRO_1 = -1543019,
- SAY_AGGRO_2 = -1543020,
- SAY_AGGRO_3 = -1543021,
- SAY_KILL_1 = -1543022,
- SAY_KILL_2 = -1543023,
- SAY_DIE = -1543024,
- EMOTE = -1543025,
+ SAY_INTRO = 0,
+
+ SAY_WIPE = 0,
+ SAY_AGGRO = 1,
+ SAY_KILL = 2,
+ SAY_DIE = 3,
+
+ EMOTE = 0
};
const float VazrudenMiddle[3] = {-1406.5f, 1746.5f, 81.2f};
@@ -153,7 +152,7 @@ class boss_nazan : public CreatureScript
if (Unit* victim = SelectTarget(SELECT_TARGET_NEAREST, 0))
me->AI()->AttackStart(victim);
DoStartMovement(me->getVictim());
- DoScriptText(EMOTE, me);
+ Talk(EMOTE);
return;
}
else
@@ -229,19 +228,19 @@ class boss_vazruden : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* who)
{
if (who && who->GetEntry() != ENTRY_VAZRUDEN)
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
+ Talk(SAY_KILL);
}
void JustDied(Unit* killer)
{
if (killer && killer != me)
- DoScriptText(SAY_DIE, me);
+ Talk(SAY_DIE);
}
void UpdateAI(const uint32 diff)
@@ -252,7 +251,7 @@ class boss_vazruden : public CreatureScript
{
if (!WipeSaid)
{
- DoScriptText(SAY_WIPE, me);
+ Talk(SAY_WIPE);
WipeSaid = true;
}
me->DisappearAndDie();
@@ -364,7 +363,7 @@ class boss_vazruden_the_herald : public CreatureScript
{
phase = 1;
check = 0;
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
}
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp
index 1d2ecccf3c7..156d5cbae2c 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp
@@ -28,15 +28,12 @@ EndScriptData */
enum eSays
{
- SAY_TAUNT = -1543000,
- SAY_HEAL = -1543001,
- SAY_SURGE = -1543002,
- SAY_AGGRO_1 = -1543003,
- SAY_AGGRO_2 = -1543004,
- SAY_AGGRO_3 = -1543005,
- SAY_KILL_1 = -1543006,
- SAY_KILL_2 = -1543007,
- SAY_DIE = -1543008,
+ SAY_TAUNT = 0,
+ SAY_HEAL = 1,
+ SAY_SURGE = 2,
+ SAY_AGGRO = 3,
+ SAY_KILL = 4,
+ SAY_DIE = 5
};
enum eSpells
@@ -81,7 +78,7 @@ class boss_watchkeeper_gargolmar : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
}
void MoveInLineOfSight(Unit* who)
@@ -99,7 +96,7 @@ class boss_watchkeeper_gargolmar : public CreatureScript
}
else if (!HasTaunted && me->IsWithinDistInMap(who, 60.0f))
{
- DoScriptText(SAY_TAUNT, me);
+ Talk(SAY_TAUNT);
HasTaunted = true;
}
}
@@ -107,12 +104,12 @@ class boss_watchkeeper_gargolmar : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
+ Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DIE, me);
+ Talk(SAY_DIE);
}
void UpdateAI(const uint32 diff)
@@ -130,7 +127,7 @@ class boss_watchkeeper_gargolmar : public CreatureScript
if (Surge_Timer <= diff)
{
- DoScriptText(SAY_SURGE, me);
+ Talk(SAY_SURGE);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_SURGE);
@@ -155,7 +152,7 @@ class boss_watchkeeper_gargolmar : public CreatureScript
{
if (HealthBelowPct(40))
{
- DoScriptText(SAY_HEAL, me);
+ Talk(SAY_HEAL);
YelledForHeal = true;
}
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
index 94272e4a50f..c5f79a2babd 100644
--- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
@@ -29,36 +29,22 @@ EndScriptData */
#include "Player.h"
#include "SpellInfo.h"
-struct Yell
-{
- int32 id;
-};
-
-static Yell RandomTaunt[]=
-{
- {-1544000},
- {-1544001},
- {-1544002},
- {-1544003},
- {-1544004},
- {-1544005},
-};
-
enum eSays
{
- SAY_FREED = -1544006,
- SAY_AGGRO = -1544007,
- SAY_BANISH = -1544008,
- SAY_CHAMBER_DESTROY = -1544009,
- SAY_PLAYER_KILLED = -1544010,
- SAY_DEATH = -1544011,
+ SAY_TAUNT = 0,
+ SAY_FREED = 1,
+ SAY_AGGRO = 2,
+ SAY_BANISH = 3,
+ SAY_CHAMBER_DESTROY = 4,
+ SAY_PLAYER_KILLED = 5,
+ SAY_DEATH = 6
};
enum eEmotes
{
- EMOTE_BERSERK = -1544012,
- EMOTE_BLASTNOVA = -1544013,
- EMOTE_BEGIN = -1544014,
+ EMOTE_BERSERK = 7,
+ EMOTE_BLASTNOVA = 8,
+ EMOTE_BEGIN = 9
};
enum eCreatures
@@ -309,7 +295,7 @@ class boss_magtheridon : public CreatureScript
// if 5 clickers from other cubes apply shadow cage
if (ClickerNum >= CLICKERS_COUNT && !me->HasAura(SPELL_SHADOW_CAGE))
{
- DoScriptText(SAY_BANISH, me);
+ Talk(SAY_BANISH);
DoCast(me, SPELL_SHADOW_CAGE, true);
}
else
@@ -322,7 +308,7 @@ class boss_magtheridon : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(SAY_PLAYER_KILLED, me);
+ Talk(SAY_PLAYER_KILLED);
}
void JustDied(Unit* /*killer*/)
@@ -330,7 +316,7 @@ class boss_magtheridon : public CreatureScript
if (instance)
instance->SetData(DATA_MAGTHERIDON_EVENT, DONE);
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void MoveInLineOfSight(Unit* /*who*/) {}
@@ -350,7 +336,7 @@ class boss_magtheridon : public CreatureScript
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE_C);
- DoScriptText(SAY_FREED, me);
+ Talk(SAY_FREED);
}
void UpdateAI(const uint32 diff)
@@ -359,7 +345,7 @@ class boss_magtheridon : public CreatureScript
{
if (RandChat_Timer <= diff)
{
- DoScriptText(RandomTaunt[rand()%6].id, me);
+ Talk(SAY_TAUNT);
RandChat_Timer = 90000;
}
else
@@ -374,7 +360,7 @@ class boss_magtheridon : public CreatureScript
if (Berserk_Timer <= diff)
{
DoCast(me, SPELL_BERSERK, true);
- DoScriptText(EMOTE_BERSERK, me);
+ Talk(EMOTE_BERSERK);
Berserk_Timer = 60000;
}
else
@@ -393,7 +379,7 @@ class boss_magtheridon : public CreatureScript
// to avoid earthquake interruption
if (!me->HasUnitState(UNIT_STATE_STUNNED))
{
- DoScriptText(EMOTE_BLASTNOVA, me);
+ Talk(EMOTE_BLASTNOVA);
DoCast(me, SPELL_BLASTNOVA);
BlastNova_Timer = 60000;
}
@@ -437,7 +423,7 @@ class boss_magtheridon : public CreatureScript
&& !me->HasUnitState(UNIT_STATE_STUNNED)) // shadow cage and earthquake
{
Phase3 = true;
- DoScriptText(SAY_CHAMBER_DESTROY, me);
+ Talk(SAY_CHAMBER_DESTROY);
DoCast(me, SPELL_CAMERA_SHAKE, true);
DoCast(me, SPELL_DEBRIS_KNOCKDOWN, true);
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
index c6434d9a989..e5b6ea71eb0 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
@@ -33,38 +33,15 @@ EndContentData */
#include "ScriptedCreature.h"
#include "shattered_halls.h"
-struct Say
-{
- int32 id;
-};
-
-static Say PeonAttacked[]=
-{
- {-1540001},
- {-1540002},
- {-1540003},
- {-1540004},
-};
-static Say PeonDies[]=
-{
- {-1540005},
- {-1540006},
- {-1540007},
- {-1540008},
-};
-
enum eSays
{
- SAY_INTRO = -1540000,
- SAY_TAUNT_1 = -1540009,
- SAY_TAUNT_2 = -1540010,
- SAY_TAUNT_3 = -1540011,
- SAY_AGGRO_1 = -1540012,
- SAY_AGGRO_2 = -1540013,
- SAY_AGGRO_3 = -1540014,
- SAY_SLAY_1 = -1540015,
- SAY_SLAY_2 = -1540016,
- SAY_DIE = -1540017,
+ SAY_INTRO = 0,
+ SAY_PEON_ATTACKED = 1,
+ SAY_PEON_DIES = 2,
+ SAY_TAUNT = 3,
+ SAY_AGGRO = 4,
+ SAY_SLAY = 5,
+ SAY_DIE = 6
};
enum eSpells
@@ -137,7 +114,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript
if (PeonEngagedCount >= 4)
return;
- DoScriptText(PeonAttacked[PeonEngagedCount].id, me);
+ Talk(SAY_PEON_ATTACKED);
++PeonEngagedCount;
}
@@ -146,7 +123,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript
if (PeonKilledCount >= 4)
return;
- DoScriptText(PeonDies[PeonKilledCount].id, me);
+ Talk(SAY_PEON_DIES);
++PeonKilledCount;
if (PeonKilledCount == 4)
@@ -159,7 +136,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript
void DoTauntPeons()
{
- DoScriptText(RAND(SAY_TAUNT_1, SAY_TAUNT_2, SAY_TAUNT_3), me);
+ Talk(SAY_TAUNT);
//TODO: kill the peons first
IsIntroEvent = false;
@@ -190,7 +167,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript
if (who->GetTypeId() != TYPEID_PLAYER)
return;
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
IntroOnce = true;
IsIntroEvent = true;
@@ -206,7 +183,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
+ Talk(SAY_AGGRO);
}
void JustSummoned(Creature* summoned)
@@ -222,12 +199,12 @@ class boss_grand_warlock_nethekurse : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DIE, me);
+ Talk(SAY_DIE);
if (!instance)
return;
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
index 3d2d39e9817..5d3ff2abcc5 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
@@ -34,9 +34,9 @@ EndContentData */
enum eEnums
{
- YELL_DIE_L = -1540039,
- YELL_DIE_R = -1540040,
- EMOTE_ENRAGE = -1540041,
+ YELL_DIE_L = 0,
+ YELL_DIE_R = 1,
+ EMOTE_ENRAGE = 2,
SPELL_BLAST_WAVE = 30600,
SPELL_FEAR = 30584,
@@ -57,49 +57,49 @@ struct Yell
static Yell GoCombat[]=
{
- {-1540018, NPC_LEFT_HEAD},
- {-1540019, NPC_LEFT_HEAD},
- {-1540020, NPC_LEFT_HEAD},
+ {0, NPC_LEFT_HEAD},
+ {1, NPC_LEFT_HEAD},
+ {2, NPC_LEFT_HEAD},
};
static Yell GoCombatDelay[]=
{
- {-1540021, NPC_RIGHT_HEAD},
- {-1540022, NPC_RIGHT_HEAD},
- {-1540023, NPC_RIGHT_HEAD},
+ {0, NPC_RIGHT_HEAD},
+ {1, NPC_RIGHT_HEAD},
+ {2, NPC_RIGHT_HEAD},
};
static Yell Threat[]=
{
- {-1540024, NPC_LEFT_HEAD},
- {-1540025, NPC_RIGHT_HEAD},
- {-1540026, NPC_LEFT_HEAD},
- {-1540027, NPC_LEFT_HEAD},
+ {3, NPC_LEFT_HEAD},
+ {3, NPC_RIGHT_HEAD},
+ {4, NPC_LEFT_HEAD},
+ {5, NPC_LEFT_HEAD},
};
static Yell ThreatDelay1[]=
{
- {-1540028, NPC_RIGHT_HEAD},
- {-1540029, NPC_LEFT_HEAD},
- {-1540030, NPC_RIGHT_HEAD},
- {-1540031, NPC_RIGHT_HEAD},
+ {4, NPC_RIGHT_HEAD},
+ {6, NPC_LEFT_HEAD},
+ {5, NPC_RIGHT_HEAD},
+ {6, NPC_RIGHT_HEAD},
};
static Yell ThreatDelay2[]=
{
- {-1540032, NPC_LEFT_HEAD},
- {-1540033, NPC_RIGHT_HEAD},
- {-1540034, NPC_LEFT_HEAD},
- {-1540035, NPC_LEFT_HEAD},
+ {7, NPC_LEFT_HEAD},
+ {7, NPC_RIGHT_HEAD},
+ {8, NPC_LEFT_HEAD},
+ {9, NPC_LEFT_HEAD},
};
static Yell Killing[]=
{
- {-1540036, NPC_LEFT_HEAD},
- {-1540037, NPC_RIGHT_HEAD},
+ {10, NPC_LEFT_HEAD},
+ {8, NPC_RIGHT_HEAD},
};
static Yell KillingDelay[]=
{
- {-1540038, NPC_RIGHT_HEAD},
- {-1000000, NPC_LEFT_HEAD},
+ {9, NPC_RIGHT_HEAD},
+ {11, NPC_LEFT_HEAD},
};
class mob_omrogg_heads : public CreatureScript
@@ -137,7 +137,7 @@ class mob_omrogg_heads : public CreatureScript
if (Death_Timer <= diff)
{
- DoScriptText(YELL_DIE_R, me);
+ Talk(YELL_DIE_R);
Death_Timer = false;
me->setDeathState(JUST_DIED);
} else Death_Timer -= diff;
@@ -222,17 +222,17 @@ class boss_warbringer_omrogg : public CreatureScript
void DoYellForThreat()
{
- Unit* pLeftHead = Unit::GetUnit(*me, LeftHeadGUID);
- Unit* pRightHead = Unit::GetUnit(*me, RightHeadGUID);
+ Creature* pLeftHead = Creature::GetCreature(*me, LeftHeadGUID);
+ Creature* pRightHead = Unit::GetCreature(*me, RightHeadGUID);
if (!pLeftHead || !pRightHead)
return;
ithreat = rand()%4;
- Unit* source = (pLeftHead->GetEntry() == Threat[ithreat].creature ? pLeftHead : pRightHead);
+ Creature* source = (pLeftHead->GetEntry() == Threat[ithreat].creature ? pLeftHead : pRightHead);
- DoScriptText(Threat[ithreat].id, source);
+ source->AI()->Talk(Threat[ithreat].id);
Delay_Timer = 3500;
ThreatYell = true;
@@ -243,11 +243,11 @@ class boss_warbringer_omrogg : public CreatureScript
me->SummonCreature(NPC_LEFT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0);
me->SummonCreature(NPC_RIGHT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0);
- if (Unit* pLeftHead = Unit::GetUnit(*me, LeftHeadGUID))
+ if (Creature* pLeftHead = Creature::GetCreature(*me, LeftHeadGUID))
{
iaggro = rand()%3;
- DoScriptText(GoCombat[iaggro].id, pLeftHead);
+ pLeftHead->AI()->Talk(GoCombat[iaggro].id);
Delay_Timer = 3500;
AggroYell = true;
@@ -272,25 +272,25 @@ class boss_warbringer_omrogg : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
- Unit* pLeftHead = Unit::GetUnit(*me, LeftHeadGUID);
- Unit* pRightHead = Unit::GetUnit(*me, RightHeadGUID);
+ Creature* pLeftHead = Creature::GetCreature(*me, LeftHeadGUID);
+ Creature* pRightHead = Creature::GetCreature(*me, RightHeadGUID);
if (!pLeftHead || !pRightHead)
return;
ikilling = rand()%2;
- Unit* source = (pLeftHead->GetEntry() == Killing[ikilling].creature ? pLeftHead : pRightHead);
+ Creature* source = (pLeftHead->GetEntry() == Killing[ikilling].creature ? pLeftHead : pRightHead);
switch (ikilling)
{
case 0:
- DoScriptText(Killing[ikilling].id, source);
+ source->AI()->Talk(Killing[ikilling].id);
Delay_Timer = 3500;
KillingYell = true;
break;
case 1:
- DoScriptText(Killing[ikilling].id, source);
+ source->AI()->Talk(Killing[ikilling].id);
KillingYell = false;
break;
}
@@ -298,13 +298,13 @@ class boss_warbringer_omrogg : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- Unit* pLeftHead = Unit::GetUnit(*me, LeftHeadGUID);
- Unit* pRightHead = Unit::GetUnit(*me, RightHeadGUID);
+ Creature* pLeftHead = Creature::GetCreature(*me, LeftHeadGUID);
+ Creature* pRightHead = Creature::GetCreature(*me, RightHeadGUID);
if (!pLeftHead || !pRightHead)
return;
- DoScriptText(YELL_DIE_L, pLeftHead);
+ pLeftHead->AI()->Talk(YELL_DIE_L);
CAST_AI(mob_omrogg_heads::mob_omrogg_headsAI, CAST_CRE(pRightHead)->AI())->DoDeathYell();
@@ -318,40 +318,40 @@ class boss_warbringer_omrogg : public CreatureScript
{
Delay_Timer = 3500;
- Unit* pLeftHead = Unit::GetUnit(*me, LeftHeadGUID);
- Unit* pRightHead = Unit::GetUnit(*me, RightHeadGUID);
+ Creature* pLeftHead = Creature::GetCreature(*me, LeftHeadGUID);
+ Creature* pRightHead = Creature::GetCreature(*me, RightHeadGUID);
if (!pLeftHead || !pRightHead)
return;
if (AggroYell)
{
- DoScriptText(GoCombatDelay[iaggro].id, pRightHead);
+ pRightHead->AI()->Talk(GoCombatDelay[iaggro].id);
AggroYell = false;
}
if (ThreatYell2)
{
- Unit* source = (pLeftHead->GetEntry() == ThreatDelay2[ithreat].creature ? pLeftHead : pRightHead);
+ Creature* source = (pLeftHead->GetEntry() == ThreatDelay2[ithreat].creature ? pLeftHead : pRightHead);
- DoScriptText(ThreatDelay2[ithreat].id, source);
+ source->AI()->Talk(ThreatDelay2[ithreat].id);
ThreatYell2 = false;
}
if (ThreatYell)
{
- Unit* source = (pLeftHead->GetEntry() == ThreatDelay1[ithreat].creature ? pLeftHead : pRightHead);
+ Creature* source = (pLeftHead->GetEntry() == ThreatDelay1[ithreat].creature ? pLeftHead : pRightHead);
- DoScriptText(ThreatDelay1[ithreat].id, source);
+ source->AI()->Talk(ThreatDelay1[ithreat].id);
ThreatYell = false;
ThreatYell2 = true;
}
if (KillingYell)
{
- Unit* source = (pLeftHead->GetEntry() == KillingDelay[ikilling].creature ? pLeftHead : pRightHead);
+ Creature* source = (pLeftHead->GetEntry() == KillingDelay[ikilling].creature ? pLeftHead : pRightHead);
- DoScriptText(KillingDelay[ikilling].id, source);
+ source->AI()->Talk(KillingDelay[ikilling].id);
KillingYell = false;
}
} else Delay_Timer -= diff;
@@ -373,7 +373,7 @@ class boss_warbringer_omrogg : public CreatureScript
if (BurningMaul_Timer <= diff)
{
- DoScriptText(EMOTE_ENRAGE, me);
+ Talk(EMOTE_ENRAGE);
DoCast(me, SPELL_BURNING_MAUL);
BurningMaul_Timer = 40000;
BlastWave_Timer = 16000;
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp
index 99f7c69aff2..37cd5666f73 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp
@@ -32,12 +32,9 @@ EndContentData */
enum eSays
{
- SAY_AGGRO1 = -1540042,
- SAY_AGGRO2 = -1540043,
- SAY_AGGRO3 = -1540044,
- SAY_SLAY1 = -1540045,
- SAY_SLAY2 = -1540046,
- SAY_DEATH = -1540047,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2
};
enum eSpells
@@ -111,7 +108,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3), me);
+ Talk(SAY_AGGRO);
}
void JustSummoned(Creature* summoned)
@@ -134,13 +131,13 @@ class boss_warchief_kargath_bladefist : public CreatureScript
{
if (victim->GetTypeId() == TYPEID_PLAYER)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
removeAdds();
}
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
index 5b5c3ff2326..91ff608a6c7 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
@@ -32,15 +32,13 @@ EndScriptData */
enum eEnums
{
- SAY_AGGRO = -1550007,
- SAY_SUMMON1 = -1550008,
- SAY_SUMMON2 = -1550009,
- SAY_KILL1 = -1550010,
- SAY_KILL2 = -1550011,
- SAY_KILL3 = -1550012,
- SAY_DEATH = -1550013,
- SAY_VOIDA = -1550014,
- SAY_VOIDB = -1550015,
+ SAY_AGGRO = 0,
+ SAY_SUMMON1 = 1,
+ SAY_SUMMON2 = 2,
+ SAY_KILL = 3,
+ SAY_DEATH = 4,
+ SAY_VOIDA = 5,
+ SAY_VOIDB = 6,
SPELL_ARCANE_MISSILES = 33031,
SPELL_WRATH_OF_THE_ASTROMANCER = 42783,
@@ -149,21 +147,21 @@ class boss_high_astromancer_solarian : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_KILL1, SAY_KILL2, SAY_KILL3), me);
+ Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
{
me->SetObjectScale(defaultsize);
me->SetDisplayId(MODEL_HUMAN);
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_HIGHASTROMANCERSOLARIANEVENT, DONE);
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoZoneInCombat();
if (instance)
@@ -333,7 +331,7 @@ class boss_high_astromancer_solarian : public CreatureScript
for (int j=1; j <= 4; j++)
SummonMinion(NPC_SOLARIUM_AGENT, Portals[i][0], Portals[i][1], Portals[i][2]);
- DoScriptText(SAY_SUMMON1, me);
+ Talk(SAY_SUMMON1);
Phase2_Timer = 10000;
}
else
@@ -360,7 +358,7 @@ class boss_high_astromancer_solarian : public CreatureScript
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetVisible(true);
- DoScriptText(SAY_SUMMON2, me);
+ Talk(SAY_SUMMON2);
AppearDelay = true;
Phase3_Timer = 15000;
}
@@ -394,8 +392,8 @@ class boss_high_astromancer_solarian : public CreatureScript
//To make sure she wont be invisible or not selecatble
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetVisible(true);
- DoScriptText(SAY_VOIDA, me);
- DoScriptText(SAY_VOIDB, me);
+ Talk(SAY_VOIDA);
+ Talk(SAY_VOIDB);
me->SetArmor(WV_ARMOR);
me->SetDisplayId(MODEL_VOIDWALKER);
me->SetObjectScale(defaultsize*2.5f);
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
index 2dbfb7b46c5..e87009737f1 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
@@ -32,42 +32,37 @@ EndScriptData */
enum eEnums
{
//kael'thas Speech
- SAY_INTRO = -1550016,
- SAY_INTRO_CAPERNIAN = -1550017,
- SAY_INTRO_TELONICUS = -1550018,
- SAY_INTRO_THALADRED = -1550019,
- SAY_INTRO_SANGUINAR = -1550020,
- SAY_PHASE2_WEAPON = -1550021,
- SAY_PHASE3_ADVANCE = -1550022,
- SAY_PHASE4_INTRO2 = -1550023,
- SAY_PHASE5_NUTS = -1550024,
- SAY_SLAY1 = -1550025,
- SAY_SLAY2 = -1550026,
- SAY_SLAY3 = -1550027,
- SAY_MINDCONTROL1 = -1550028,
- SAY_MINDCONTROL2 = -1550029,
- SAY_GRAVITYLAPSE1 = -1550030,
- SAY_GRAVITYLAPSE2 = -1550031,
- SAY_SUMMON_PHOENIX1 = -1550032,
- SAY_SUMMON_PHOENIX2 = -1550033,
- SAY_DEATH = -1550034,
+ SAY_INTRO = 0,
+ SAY_INTRO_CAPERNIAN = 1,
+ SAY_INTRO_TELONICUS = 2,
+ SAY_INTRO_THALADRED = 3,
+ SAY_INTRO_SANGUINAR = 4,
+ SAY_PHASE2_WEAPON = 5,
+ SAY_PHASE3_ADVANCE = 6,
+ SAY_PHASE4_INTRO2 = 7,
+ SAY_PHASE5_NUTS = 8,
+ SAY_SLAY = 9,
+ SAY_MINDCONTROL = 10,
+ SAY_GRAVITYLAPSE = 11,
+ SAY_SUMMON_PHOENIX = 12,
+ SAY_DEATH = 13,
//Thaladred the Darkener speech
- SAY_THALADRED_AGGRO = -1550035,
- SAY_THALADRED_DEATH = -1550036,
- EMOTE_THALADRED_GAZE = -1550037,
+ SAY_THALADRED_AGGRO = 0,
+ SAY_THALADRED_DEATH = 1,
+ EMOTE_THALADRED_GAZE = 2,
//Lord Sanguinar speech
- SAY_SANGUINAR_AGGRO = -1550038,
- SAY_SANGUINAR_DEATH = -1550039,
+ SAY_SANGUINAR_AGGRO = 0,
+ SAY_SANGUINAR_DEATH = 1,
//Grand Astromancer Capernian speech
- SAY_CAPERNIAN_AGGRO = -1550040,
- SAY_CAPERNIAN_DEATH = -1550041,
+ SAY_CAPERNIAN_AGGRO = 0,
+ SAY_CAPERNIAN_DEATH = 1,
//Master Engineer Telonicus speech
- SAY_TELONICUS_AGGRO = -1550042,
- SAY_TELONICUS_DEATH = -1550043,
+ SAY_TELONICUS_AGGRO = 0,
+ SAY_TELONICUS_DEATH = 1,
//Phase 2 spells
SPELL_SUMMON_WEAPONS = 36976,
@@ -369,7 +364,7 @@ class boss_kaelthas : public CreatureScript
{
sLog->outError(LOG_FILTER_TSCR, "Kael'Thas One or more advisors missing, Skipping Phases 1-3");
- DoScriptText(SAY_PHASE4_INTRO2, me);
+ Talk(SAY_PHASE4_INTRO2);
Phase = 4;
@@ -385,7 +380,7 @@ class boss_kaelthas : public CreatureScript
{
PrepareAdvisors();
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
instance->SetData(DATA_KAELTHASEVENT, 1);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -431,7 +426,7 @@ class boss_kaelthas : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
+ Talk(SAY_SLAY);
}
void JustSummoned(Creature* summoned)
@@ -456,7 +451,7 @@ class boss_kaelthas : public CreatureScript
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
summons.DespawnAll();
@@ -487,7 +482,7 @@ class boss_kaelthas : public CreatureScript
case 0:
if (Phase_Timer <= diff)
{
- DoScriptText(SAY_INTRO_THALADRED, me);
+ Talk(SAY_INTRO_THALADRED);
//start advisor within 7 seconds
Phase_Timer = 7000;
@@ -521,7 +516,7 @@ class boss_kaelthas : public CreatureScript
if (Advisor && (Advisor->getStandState() == UNIT_STAND_STATE_DEAD))
{
- DoScriptText(SAY_INTRO_SANGUINAR, me);
+ Talk(SAY_INTRO_SANGUINAR);
//start advisor within 12.5 seconds
Phase_Timer = 12500;
@@ -555,7 +550,7 @@ class boss_kaelthas : public CreatureScript
if (Advisor && (Advisor->getStandState() == UNIT_STAND_STATE_DEAD))
{
- DoScriptText(SAY_INTRO_CAPERNIAN, me);
+ Talk(SAY_INTRO_CAPERNIAN);
//start advisor within 7 seconds
Phase_Timer = 7000;
@@ -589,7 +584,7 @@ class boss_kaelthas : public CreatureScript
if (Advisor && (Advisor->getStandState() == UNIT_STAND_STATE_DEAD))
{
- DoScriptText(SAY_INTRO_TELONICUS, me);
+ Talk(SAY_INTRO_TELONICUS);
//start advisor within 8.4 seconds
Phase_Timer = 8400;
@@ -628,7 +623,7 @@ class boss_kaelthas : public CreatureScript
if (instance)
instance->SetData(DATA_KAELTHASEVENT, 2);
- DoScriptText(SAY_PHASE2_WEAPON, me);
+ Talk(SAY_PHASE2_WEAPON);
PhaseSubphase = 0;
Phase_Timer = 3500;
@@ -669,7 +664,7 @@ class boss_kaelthas : public CreatureScript
{
if (Phase_Timer <= diff)
{
- DoScriptText(SAY_PHASE3_ADVANCE, me);
+ Talk(SAY_PHASE3_ADVANCE);
if (instance)
instance->SetData(DATA_KAELTHASEVENT, 3);
Phase = 3;
@@ -705,7 +700,7 @@ class boss_kaelthas : public CreatureScript
if (Phase_Timer <= diff)
{
- DoScriptText(SAY_PHASE4_INTRO2, me);
+ Talk(SAY_PHASE4_INTRO2);
Phase = 4;
if (instance)
@@ -801,7 +796,7 @@ class boss_kaelthas : public CreatureScript
if (Phoenix_Timer <= diff)
{
DoCast(me, SPELL_PHOENIX_ANIMATION);
- DoScriptText(RAND(SAY_SUMMON_PHOENIX1, SAY_SUMMON_PHOENIX2), me);
+ Talk(SAY_SUMMON_PHOENIX);
Phoenix_Timer = 60000;
}
@@ -818,7 +813,7 @@ class boss_kaelthas : public CreatureScript
Phase = 5;
Phase_Timer = 10000;
- DoScriptText(SAY_PHASE5_NUTS, me);
+ Talk(SAY_PHASE5_NUTS);
me->StopMoving();
me->GetMotionMaster()->Clear();
@@ -913,7 +908,7 @@ class boss_kaelthas : public CreatureScript
break;
case 1:
- DoScriptText(RAND(SAY_GRAVITYLAPSE1, SAY_GRAVITYLAPSE2), me);
+ Talk(SAY_GRAVITYLAPSE);
// 2) At that point he will put a Gravity Lapse debuff on everyone
for (i = threatlist.begin(); i != threatlist.end(); ++i)
@@ -1041,14 +1036,14 @@ class boss_thaladred_the_darkener : public CreatureScript
if (!who || FakeDeath)
return;
- DoScriptText(SAY_THALADRED_AGGRO, me);
+ Talk(SAY_THALADRED_AGGRO);
me->AddThreat(who, 5000000.0f);
}
void JustDied(Unit* /*killer*/)
{
if (instance && instance->GetData(DATA_KAELTHASEVENT) == 3)
- DoScriptText(SAY_THALADRED_DEATH, me);
+ Talk(SAY_THALADRED_DEATH);
}
void UpdateAI(const uint32 diff)
@@ -1070,7 +1065,7 @@ class boss_thaladred_the_darkener : public CreatureScript
{
DoResetThreat();
me->AddThreat(target, 5000000.0f);
- DoScriptText(EMOTE_THALADRED_GAZE, me, target);
+ Talk(EMOTE_THALADRED_GAZE, target->GetGUID());
Gaze_Timer = 8500;
}
}
@@ -1134,13 +1129,13 @@ class boss_lord_sanguinar : public CreatureScript
if (!who || FakeDeath)
return;
- DoScriptText(SAY_SANGUINAR_AGGRO, me);
+ Talk(SAY_SANGUINAR_AGGRO);
}
void JustDied(Unit* /*killer*/)
{
if (instance && instance->GetData(DATA_KAELTHASEVENT) == 3)
- DoScriptText(SAY_SANGUINAR_DEATH, me);
+ Talk(SAY_SANGUINAR_DEATH);
}
void UpdateAI(const uint32 diff)
@@ -1205,7 +1200,7 @@ class boss_grand_astromancer_capernian : public CreatureScript
void JustDied(Unit* /*killer*/)
{
if (instance && instance->GetData(DATA_KAELTHASEVENT) == 3)
- DoScriptText(SAY_CAPERNIAN_DEATH, me);
+ Talk(SAY_CAPERNIAN_DEATH);
}
void AttackStart(Unit* who)
@@ -1249,7 +1244,7 @@ class boss_grand_astromancer_capernian : public CreatureScript
{
if (Yell_Timer <= diff)
{
- DoScriptText(SAY_CAPERNIAN_AGGRO, me);
+ Talk(SAY_CAPERNIAN_AGGRO);
Yell = true;
}
else
@@ -1344,7 +1339,7 @@ class boss_master_engineer_telonicus : public CreatureScript
void JustDied(Unit* /*killer*/)
{
if (instance && instance->GetData(DATA_KAELTHASEVENT) == 3)
- DoScriptText(SAY_TELONICUS_DEATH, me);
+ Talk(SAY_TELONICUS_DEATH);
}
void EnterCombat(Unit* who)
@@ -1355,7 +1350,7 @@ class boss_master_engineer_telonicus : public CreatureScript
if (!who || FakeDeath)
return;
- DoScriptText(SAY_TELONICUS_AGGRO, me);
+ Talk(SAY_TELONICUS_AGGRO);
}
void UpdateAI(const uint32 diff)
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp
index 2c778485131..14895f1d898 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp
@@ -29,13 +29,10 @@ EndScriptData */
enum eEnums
{
- SAY_AGGRO = -1550000,
- SAY_SLAY1 = -1550001,
- SAY_SLAY2 = -1550002,
- SAY_SLAY3 = -1550003,
- SAY_DEATH = -1550004,
- SAY_POUNDING1 = -1550005,
- SAY_POUNDING2 = -1550006,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_POUNDING = 3,
SPELL_POUNDING = 34162,
SPELL_ARCANE_ORB = 34172,
@@ -83,12 +80,12 @@ class boss_void_reaver : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
DoZoneInCombat();
if (instance)
@@ -97,7 +94,7 @@ class boss_void_reaver : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_VOIDREAVEREVENT, IN_PROGRESS);
@@ -111,7 +108,7 @@ class boss_void_reaver : public CreatureScript
if (Pounding_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_POUNDING);
- DoScriptText(RAND(SAY_POUNDING1, SAY_POUNDING2), me);
+ Talk(SAY_POUNDING);
Pounding_Timer = 15000; //cast time(3000) + cooldown time(12000)
}
else
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
index 83acc1258be..15241e35a4a 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
@@ -28,13 +28,11 @@ EndScriptData */
enum eSays
{
- SAY_AGGRO_1 = -1554006,
- SAY_HAMMER_1 = -1554007,
- SAY_HAMMER_2 = -1554008,
- SAY_SLAY_1 = -1554009,
- SAY_SLAY_2 = -1554010,
- SAY_DEATH_1 = -1554011,
- EMOTE_HAMMER = -1554012,
+ SAY_AGGRO = 0,
+ SAY_HAMMER = 1,
+ SAY_SLAY = 2,
+ SAY_DEATH = 3,
+ EMOTE_HAMMER = 4
};
enum eSpells
@@ -76,7 +74,7 @@ class boss_gatewatcher_iron_hand : public CreatureScript
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO_1, me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
@@ -84,12 +82,12 @@ class boss_gatewatcher_iron_hand : public CreatureScript
if (rand()%2)
return;
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH_1, me);
+ Talk(SAY_DEATH);
//TODO: Add door check/open code
}
@@ -112,14 +110,14 @@ class boss_gatewatcher_iron_hand : public CreatureScript
if (Jackhammer_Timer <= diff)
{
//TODO: expect cast this about 5 times in a row (?), announce it by emote only once
- DoScriptText(EMOTE_HAMMER, me);
+ Talk(EMOTE_HAMMER);
DoCast(me->getVictim(), SPELL_JACKHAMMER);
//chance to yell, but not same time as emote (after spell in fact casted)
if (rand()%2)
- return;
+ return;
- DoScriptText(RAND(SAY_HAMMER_1, SAY_HAMMER_2), me);
+ Talk(SAY_HAMMER);
Jackhammer_Timer = 30000;
}
else
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
index 02be844711d..1602ea56d93 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
@@ -29,13 +29,11 @@ EndScriptData */
enum eSays
{
- SAY_AGGRO = -1554013,
- SAY_SUMMON = -1554014,
- SAY_DRAGONS_BREATH_1 = -1554015,
- SAY_DRAGONS_BREATH_2 = -1554016,
- SAY_SLAY1 = -1554017,
- SAY_SLAY2 = -1554018,
- SAY_DEATH = -1554019,
+ SAY_AGGRO = 0,
+ SAY_SUMMON = 1,
+ SAY_DRAGONS_BREATH = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4
};
enum eSpells
@@ -92,19 +90,19 @@ class boss_nethermancer_sepethrea : public CreatureScript
if (instance)
instance->SetData(DATA_NETHERMANCER_EVENT, IN_PROGRESS);
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoCast(who, SPELL_SUMMON_RAGIN_FLAMES);
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_NETHERMANCER_EVENT, DONE);
}
@@ -140,7 +138,7 @@ class boss_nethermancer_sepethrea : public CreatureScript
{
if (rand()%2)
return;
- DoScriptText(RAND(SAY_DRAGONS_BREATH_1, SAY_DRAGONS_BREATH_2), me);
+ Talk(SAY_DRAGONS_BREATH);
}
dragons_breath_Timer = urand(12000, 22000);
}
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
index 622e6e6d7e6..adf1aac0639 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
@@ -28,14 +28,12 @@ EndScriptData */
enum eSays
{
- SAY_AGGRO = -1554020,
- SAY_DOMINATION_1 = -1554021,
- SAY_DOMINATION_2 = -1554022,
- SAY_SUMMON = -1554023,
- SAY_ENRAGE = -1554024,
- SAY_SLAY_1 = -1554025,
- SAY_SLAY_2 = -1554026,
- SAY_DEATH = -1554027,
+ SAY_AGGRO = 0,
+ SAY_DOMINATION = 1,
+ SAY_SUMMON = 2,
+ SAY_ENRAGE = 3,
+ SAY_SLAY = 4,
+ SAY_DEATH = 5
};
// Spells to be casted
enum eSpells
@@ -96,17 +94,17 @@ class boss_pathaleon_the_calculator : public CreatureScript
}
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
summons.DespawnAll();
}
@@ -135,7 +133,7 @@ class boss_pathaleon_the_calculator : public CreatureScript
if (target && Wraith)
Wraith->AI()->AttackStart(target);
}
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
Summon_Timer = urand(30000, 45000);
}
else
@@ -161,7 +159,7 @@ class boss_pathaleon_the_calculator : public CreatureScript
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
{
- DoScriptText(RAND(SAY_DOMINATION_1, SAY_DOMINATION_2), me);
+ Talk(SAY_DOMINATION);
DoCast(target, SPELL_DOMINATION);
}
Domination_Timer = urand(25000, 30000);
@@ -184,7 +182,7 @@ class boss_pathaleon_the_calculator : public CreatureScript
if (!Enraged && HealthBelowPct(21))
{
DoCast(me, SPELL_FRENZY);
- DoScriptText(SAY_ENRAGE, me);
+ Talk(SAY_ENRAGE);
Enraged = true;
}
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
index 730bab7e626..8a107090a28 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
@@ -34,16 +34,13 @@ EndContentData */
enum eSays
{
- SAY_INTRO = -1552000,
- SAY_AGGRO = -1552001,
- SAY_KILL_1 = -1552002,
- SAY_KILL_2 = -1552003,
- SAY_MIND_1 = -1552004,
- SAY_MIND_2 = -1552005,
- SAY_FEAR_1 = -1552006,
- SAY_FEAR_2 = -1552007,
- SAY_IMAGE = -1552008,
- SAY_DEATH = -1552009,
+ SAY_INTRO = 0,
+ SAY_AGGRO = 1,
+ SAY_KILL = 2,
+ SAY_MIND = 3,
+ SAY_FEAR = 4,
+ SAY_IMAGE = 5,
+ SAY_DEATH = 6
};
enum eSpells
@@ -115,7 +112,7 @@ class boss_harbinger_skyriss : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_HARBINGERSKYRISS, DONE);
}
@@ -139,7 +136,7 @@ class boss_harbinger_skyriss : public CreatureScript
if (victim->GetEntry() == 21436)
return;
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
+ Talk(SAY_KILL);
}
void DoSplit(uint32 val)
@@ -147,7 +144,7 @@ class boss_harbinger_skyriss : public CreatureScript
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(false);
- DoScriptText(SAY_IMAGE, me);
+ Talk(SAY_IMAGE);
if (val == 66)
DoCast(me, SPELL_66_ILLUSION);
@@ -167,13 +164,13 @@ class boss_harbinger_skyriss : public CreatureScript
switch (Intro_Phase)
{
case 1:
- DoScriptText(SAY_INTRO, me);
+ Talk(SAY_INTRO);
instance->HandleGameObject(instance->GetData64(DATA_SPHERE_SHIELD), true);
++Intro_Phase;
Intro_Timer = 25000;
break;
case 2:
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (Unit* mellic = Unit::GetUnit(*me, instance->GetData64(DATA_MELLICHAR)))
{
//should have a better way to do this. possibly spell exist.
@@ -224,7 +221,7 @@ class boss_harbinger_skyriss : public CreatureScript
if (me->IsNonMeleeSpellCasted(false))
return;
- DoScriptText(RAND(SAY_FEAR_1, SAY_FEAR_2), me);
+ Talk(SAY_FEAR);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
DoCast(target, SPELL_FEAR);
@@ -241,7 +238,7 @@ class boss_harbinger_skyriss : public CreatureScript
if (me->IsNonMeleeSpellCasted(false))
return;
- DoScriptText(RAND(SAY_MIND_1, SAY_MIND_2), me);
+ Talk(SAY_MIND);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
DoCast(target, SPELL_DOMINATION);
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp
index a53f62c96f4..4288061860e 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp
@@ -28,12 +28,10 @@ EndScriptData */
enum eSays
{
- SAY_AGGRO = -1553000,
- SAY_KILL_1 = -1553001,
- SAY_KILL_2 = -1553002,
- SAY_TREE_1 = -1553003,
- SAY_TREE_2 = -1553004,
- SAY_DEATH = -1553005,
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_TREE = 2,
+ SAY_DEATH = 3
};
enum eSpells
@@ -83,7 +81,7 @@ class boss_high_botanist_freywinn : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void JustSummoned(Creature* summoned)
@@ -105,12 +103,12 @@ class boss_high_botanist_freywinn : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
+ Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void UpdateAI(const uint32 diff)
@@ -120,7 +118,7 @@ class boss_high_botanist_freywinn : public CreatureScript
if (TreeForm_Timer <= diff)
{
- DoScriptText(RAND(SAY_TREE_1, SAY_TREE_2), me);
+ Talk(SAY_TREE);
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(true);
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp
index ed04c42edc7..3bda920fdeb 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp
@@ -42,7 +42,7 @@ enum eSpells
};
enum eOthers
{
- EMOTE_SUMMON = -1553006,
+ EMOTE_SUMMON = 0,
MODEL_DEFAULT = 13109,
MODEL_ARCANE = 14213,
MODEL_FIRE = 13110,
@@ -175,7 +175,7 @@ class boss_laj : public CreatureScript
{
if (Summon_Timer <= diff)
{
- DoScriptText(EMOTE_SUMMON, me);
+ Talk(EMOTE_SUMMON);
DoSummons();
Summon_Timer = 2500;
}
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
index 2937a5b9987..74f10f97754 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
@@ -28,12 +28,10 @@ EndScriptData */
enum eSays
{
- SAY_AGGRO = -1553007,
- SAY_SLAY_1 = -1553008,
- SAY_SLAY_2 = -1553009,
- SAY_SUMMON_1 = -1553010,
- SAY_SUMMON_2 = -1553011,
- SAY_DEATH = -1553012,
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_SUMMON = 2,
+ SAY_DEATH = 3
};
enum eSpells
@@ -162,17 +160,17 @@ class boss_warp_splinter : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
}
void SummonTreants()
@@ -188,7 +186,7 @@ class boss_warp_splinter : public CreatureScript
if (Creature* pTreant = me->SummonCreature(CREATURE_TREANT, treant_pos[i][0], treant_pos[i][1], treant_pos[i][2], O, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000))
CAST_AI(mob_warp_splinter_treant::mob_warp_splinter_treantAI, pTreant->AI())->WarpGuid = me->GetGUID();
}
- DoScriptText(RAND(SAY_SUMMON_1, SAY_SUMMON_2), me);
+ Talk(SAY_SUMMON);
}
void UpdateAI(const uint32 diff)
diff --git a/src/server/scripts/Outland/blades_edge_mountains.cpp b/src/server/scripts/Outland/blades_edge_mountains.cpp
index c263ac85ef5..3932b96ad07 100644
--- a/src/server/scripts/Outland/blades_edge_mountains.cpp
+++ b/src/server/scripts/Outland/blades_edge_mountains.cpp
@@ -87,11 +87,12 @@ public:
enum eNetherdrake
{
- SAY_NIHIL_1 = -1000169, //signed for 5955
- SAY_NIHIL_2 = -1000170, //signed for 5955
- SAY_NIHIL_3 = -1000171, //signed for 5955
- SAY_NIHIL_4 = -1000172, //signed for 20021, used by 20021, 21817, 21820, 21821, 21823
- SAY_NIHIL_INTERRUPT = -1000173, //signed for 20021, used by 20021, 21817, 21820, 21821, 21823
+ //Used by 20021, 21817, 21820, 21821, 21823 but not existing in database
+ SAY_NIHIL_1 = 0,
+ SAY_NIHIL_2 = 1,
+ SAY_NIHIL_3 = 2,
+ SAY_NIHIL_4 = 3,
+ SAY_NIHIL_INTERRUPT = 4,
ENTRY_WHELP = 20021,
ENTRY_PROTO = 21821,
@@ -176,7 +177,7 @@ public:
//we are nihil, so say before transform
if (me->GetEntry() == ENTRY_NIHIL)
{
- DoScriptText(SAY_NIHIL_INTERRUPT, me);
+ Talk(SAY_NIHIL_INTERRUPT);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
IsNihil = false;
}
@@ -203,19 +204,19 @@ public:
switch (NihilSpeech_Phase)
{
case 0:
- DoScriptText(SAY_NIHIL_1, me);
+ Talk(SAY_NIHIL_1);
++NihilSpeech_Phase;
break;
case 1:
- DoScriptText(SAY_NIHIL_2, me);
+ Talk(SAY_NIHIL_2);
++NihilSpeech_Phase;
break;
case 2:
- DoScriptText(SAY_NIHIL_3, me);
+ Talk(SAY_NIHIL_3);
++NihilSpeech_Phase;
break;
case 3:
- DoScriptText(SAY_NIHIL_4, me);
+ Talk(SAY_NIHIL_4);
++NihilSpeech_Phase;
break;
case 4:
@@ -266,7 +267,7 @@ public:
enum eDaranelle
{
- SAY_SPELL_INFLUENCE = -1000174,
+ SAY_SPELL_INFLUENCE = 0,
SPELL_LASHHAN_CHANNEL = 36904
};
@@ -294,7 +295,7 @@ public:
{
if (who->HasAura(SPELL_LASHHAN_CHANNEL) && me->IsWithinDistInMap(who, 10.0f))
{
- DoScriptText(SAY_SPELL_INFLUENCE, me, who);
+ Talk(SAY_SPELL_INFLUENCE, who->GetGUID());
//TODO: Move the below to updateAI and run if this statement == true
DoCast(who, 37028, true);
}
diff --git a/src/server/scripts/Outland/hellfire_peninsula.cpp b/src/server/scripts/Outland/hellfire_peninsula.cpp
index 4da98281eb2..7ac90320347 100644
--- a/src/server/scripts/Outland/hellfire_peninsula.cpp
+++ b/src/server/scripts/Outland/hellfire_peninsula.cpp
@@ -46,8 +46,8 @@ EndContentData */
enum eAeranas
{
- SAY_SUMMON = -1000138,
- SAY_FREE = -1000139,
+ SAY_SUMMON = 0,
+ SAY_FREE = 1,
FACTION_HOSTILE = 16,
FACTION_FRIENDLY = 35,
@@ -85,7 +85,7 @@ public:
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
me->setFaction(FACTION_FRIENDLY);
- DoScriptText(SAY_SUMMON, me);
+ Talk(SAY_SUMMON);
}
void UpdateAI(const uint32 diff)
@@ -109,7 +109,7 @@ public:
me->RemoveAllAuras();
me->DeleteThreatList();
me->CombatStop(true);
- DoScriptText(SAY_FREE, me);
+ Talk(SAY_FREE);
return;
}
@@ -136,9 +136,9 @@ public:
enum eAncestralWolf
{
- EMOTE_WOLF_LIFT_HEAD = -1000496,
- EMOTE_WOLF_HOWL = -1000497,
- SAY_WOLF_WELCOME = -1000498,
+ EMOTE_WOLF_LIFT_HEAD = 0,
+ EMOTE_WOLF_HOWL = 1,
+ SAY_WOLF_WELCOME = 2,
SPELL_ANCESTRAL_WOLF_BUFF = 29981,
@@ -168,7 +168,7 @@ public:
Reset();
}
- Unit* pRyga;
+ Creature* pRyga;
void Reset()
{
@@ -178,8 +178,9 @@ public:
void MoveInLineOfSight(Unit* who)
{
- if (!pRyga && who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_RYGA && me->IsWithinDistInMap(who, 15.0f))
- pRyga = who;
+ if (!pRyga && who->GetEntry() == NPC_RYGA && me->IsWithinDistInMap(who, 15.0f))
+ if (Creature* temp = who->ToCreature())
+ pRyga = temp;
npc_escortAI::MoveInLineOfSight(who);
}
@@ -189,14 +190,14 @@ public:
switch (waypointId)
{
case 0:
- DoScriptText(EMOTE_WOLF_LIFT_HEAD, me);
+ Talk(EMOTE_WOLF_LIFT_HEAD);
break;
case 2:
- DoScriptText(EMOTE_WOLF_HOWL, me);
+ Talk(EMOTE_WOLF_HOWL);
break;
case 50:
if (pRyga && pRyga->isAlive() && !pRyga->isInCombat())
- DoScriptText(SAY_WOLF_WELCOME, pRyga);
+ pRyga->AI()->Talk(SAY_WOLF_WELCOME);
break;
}
}
@@ -368,12 +369,12 @@ public:
enum eWoundedBloodElf
{
- SAY_ELF_START = -1000117,
- SAY_ELF_SUMMON1 = -1000118,
- SAY_ELF_RESTING = -1000119,
- SAY_ELF_SUMMON2 = -1000120,
- SAY_ELF_COMPLETE = -1000121,
- SAY_ELF_AGGRO = -1000122,
+ SAY_ELF_START = 0,
+ SAY_ELF_SUMMON1 = 1,
+ SAY_ELF_RESTING = 2,
+ SAY_ELF_SUMMON2 = 3,
+ SAY_ELF_COMPLETE = 4,
+ SAY_ELF_AGGRO = 5,
QUEST_ROAD_TO_FALCON_WATCH = 9375
};
@@ -415,25 +416,25 @@ public:
switch (waypointId)
{
case 0:
- DoScriptText(SAY_ELF_START, me, player);
+ Talk(SAY_ELF_START, player->GetGUID());
break;
case 9:
- DoScriptText(SAY_ELF_SUMMON1, me, player);
+ Talk(SAY_ELF_SUMMON1, player->GetGUID());
// Spawn two Haal'eshi Talonguard
DoSpawnCreature(16967, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
DoSpawnCreature(16967, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
break;
case 13:
- DoScriptText(SAY_ELF_RESTING, me, player);
+ Talk(SAY_ELF_RESTING, player->GetGUID());
break;
case 14:
- DoScriptText(SAY_ELF_SUMMON2, me, player);
+ Talk(SAY_ELF_SUMMON2, player->GetGUID());
// Spawn two Haal'eshi Windwalker
DoSpawnCreature(16966, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
DoSpawnCreature(16966, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
break;
case 27:
- DoScriptText(SAY_ELF_COMPLETE, me, player);
+ Talk(SAY_ELF_COMPLETE, player->GetGUID());
// Award quest credit
player->GroupEventHappens(QUEST_ROAD_TO_FALCON_WATCH, me);
break;
@@ -445,7 +446,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
if (HasEscortState(STATE_ESCORT_ESCORTING))
- DoScriptText(SAY_ELF_AGGRO, me);
+ Talk(SAY_ELF_AGGRO);
}
void JustSummoned(Creature* summoned)
diff --git a/src/server/scripts/Outland/nagrand.cpp b/src/server/scripts/Outland/nagrand.cpp
index 0c9a60603f5..54565553e94 100644
--- a/src/server/scripts/Outland/nagrand.cpp
+++ b/src/server/scripts/Outland/nagrand.cpp
@@ -149,13 +149,13 @@ public:
enum eMagharCaptive
{
- SAY_MAG_START = -1000482,
- SAY_MAG_NO_ESCAPE = -1000483,
- SAY_MAG_MORE = -1000484,
- SAY_MAG_MORE_REPLY = -1000485,
- SAY_MAG_LIGHTNING = -1000486,
- SAY_MAG_SHOCK = -1000487,
- SAY_MAG_COMPLETE = -1000488,
+ SAY_MAG_START = 0,
+ SAY_MAG_NO_ESCAPE = 0,
+ SAY_MAG_MORE = 1,
+ SAY_MAG_MORE_REPLY = 0,
+ SAY_MAG_LIGHTNING = 2,
+ SAY_MAG_SHOCK = 3,
+ SAY_MAG_COMPLETE = 4,
SPELL_CHAIN_LIGHTNING = 16006,
SPELL_EARTHBIND_TOTEM = 15786,
@@ -189,7 +189,7 @@ public:
pEscortAI->Start(true, false, player->GetGUID(), quest);
- DoScriptText(SAY_MAG_START, creature);
+ creature->AI()->Talk(SAY_MAG_START);
creature->SummonCreature(NPC_MURK_RAIDER, m_afAmbushA[0]+2.5f, m_afAmbushA[1]-2.5f, m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
creature->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushA[0]-2.5f, m_afAmbushA[1]+2.5f, m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
@@ -229,17 +229,17 @@ public:
switch (waypointId)
{
case 7:
- DoScriptText(SAY_MAG_MORE, me);
+ Talk(SAY_MAG_MORE);
if (Creature* temp = me->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushB[0], m_afAmbushB[1], m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000))
- DoScriptText(SAY_MAG_MORE_REPLY, temp);
+ temp->AI()->Talk(SAY_MAG_MORE_REPLY);
me->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushB[0]-2.5f, m_afAmbushB[1]-2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
me->SummonCreature(NPC_MURK_SCAVENGER, m_afAmbushB[0]+2.5f, m_afAmbushB[1]+2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
me->SummonCreature(NPC_MURK_SCAVENGER, m_afAmbushB[0]+2.5f, m_afAmbushB[1]-2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
break;
case 16:
- DoScriptText(SAY_MAG_COMPLETE, me);
+ Talk(SAY_MAG_COMPLETE);
if (Player* player = GetPlayerForEscort())
player->GroupEventHappens(QUEST_TOTEM_KARDASH_H, me);
@@ -252,7 +252,7 @@ public:
void JustSummoned(Creature* summoned)
{
if (summoned->GetEntry() == NPC_MURK_BRUTE)
- DoScriptText(SAY_MAG_NO_ESCAPE, summoned);
+ summoned->AI()->Talk(SAY_MAG_NO_ESCAPE);
if (summoned->isTotem())
return;
@@ -270,7 +270,7 @@ public:
if (rand()%10)
return;
- DoScriptText(SAY_MAG_LIGHTNING, me);
+ Talk(SAY_MAG_LIGHTNING);
}
}
@@ -367,18 +367,18 @@ enum CorkiData
NPC_CORKI = 18445,
NPC_CORKI_CREDIT_1 = 18369,
GO_CORKIS_PRISON = 182349,
- CORKI_SAY_THANKS = -1800071,
+ CORKI_SAY_THANKS = 0,
// 2nd quest
QUEST_CORKIS_GONE_MISSING_AGAIN = 9924,
NPC_CORKI_2 = 20812,
GO_CORKIS_PRISON_2 = 182350,
- CORKI_SAY_PROMISE = -1800072,
+ CORKI_SAY_PROMISE = 0,
// 3rd quest
QUEST_CHOWAR_THE_PILLAGER = 9955,
NPC_CORKI_3 = 18369,
NPC_CORKI_CREDIT_3 = 18444,
GO_CORKIS_PRISON_3 = 182521,
- CORKI_SAY_LAST = -1800073
+ CORKI_SAY_LAST = 0
};
class go_corkis_prison : public GameObjectScript
@@ -468,11 +468,11 @@ public:
Say_Timer = 5000;
ReleasedFromCage = true;
if (me->GetEntry() == NPC_CORKI)
- DoScriptText(CORKI_SAY_THANKS, me);
+ Talk(CORKI_SAY_THANKS);
if (me->GetEntry() == NPC_CORKI_2)
- DoScriptText(CORKI_SAY_PROMISE, me);
+ Talk(CORKI_SAY_PROMISE);
if (me->GetEntry() == NPC_CORKI_3)
- DoScriptText(CORKI_SAY_LAST, me);
+ Talk(CORKI_SAY_LAST);
}
};
};
@@ -521,7 +521,7 @@ public:
{
creature->SetStandState(UNIT_STAND_STATE_STAND);
EscortAI->Start(true, false, player->GetGUID(), quest);
- DoScriptText(SAY_KUR_START, creature);
+ creature->AI()->Talk(SAY_KUR_START);
creature->SummonCreature(NPC_KUR_MURK_RAIDER, kurenaiAmbushA[0]+2.5f, kurenaiAmbushA[1]-2.5f, kurenaiAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
creature->SummonCreature(NPC_KUR_MURK_BRUTE, kurenaiAmbushA[0]-2.5f, kurenaiAmbushA[1]+2.5f, kurenaiAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp
index eaea4960712..7bec3674a84 100644
--- a/src/server/scripts/Outland/netherstorm.cpp
+++ b/src/server/scripts/Outland/netherstorm.cpp
@@ -45,12 +45,12 @@ EndContentData */
//used by 20209, 20417, 20418, 20440, signed for 20209
enum eManaforgeConsoleData
{
- EMOTE_START = -1000211,
- EMOTE_60 = -1000212,
- EMOTE_30 = -1000213,
- EMOTE_10 = -1000214,
- EMOTE_COMPLETE = -1000215,
- EMOTE_ABORT = -1000216,
+ 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,
@@ -114,7 +114,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(EMOTE_ABORT, me);
+ Talk(EMOTE_ABORT);
if (someplayer)
{
@@ -247,31 +247,32 @@ public:
if (someplayer)
{
Unit* u = Unit::GetUnit(*me, someplayer);
- if (u && u->GetTypeId() == TYPEID_PLAYER) DoScriptText(EMOTE_START, me, u);
+ if (u && u->GetTypeId() == TYPEID_PLAYER)
+ Talk(EMOTE_START, u->GetGUID());
}
Event_Timer = 60000;
Wave = true;
++Phase;
break;
case 2:
- DoScriptText(EMOTE_60, me);
+ Talk(EMOTE_60);
Event_Timer = 30000;
++Phase;
break;
case 3:
- DoScriptText(EMOTE_30, me);
+ Talk(EMOTE_30);
Event_Timer = 20000;
DoFinalSpawnForCreature(me);
++Phase;
break;
case 4:
- DoScriptText(EMOTE_10, me);
+ Talk(EMOTE_10);
Event_Timer = 10000;
Wave = false;
++Phase;
break;
case 5:
- DoScriptText(EMOTE_COMPLETE, me);
+ Talk(EMOTE_COMPLETE);
if (someplayer)
{
Unit* u = Unit::GetUnit(*me, someplayer);
@@ -361,17 +362,19 @@ public:
// The Speech of Dawnforge, Ardonis & Pathaleon
enum eCommanderDawnforgeData
{
- SAY_COMMANDER_DAWNFORGE_1 = -1000128,
- SAY_ARCANIST_ARDONIS_1 = -1000129,
- SAY_COMMANDER_DAWNFORGE_2 = -1000130,
- SAY_PATHALEON_CULATOR_IMAGE_1 = -1000131,
- SAY_COMMANDER_DAWNFORGE_3 = -1000132,
- SAY_PATHALEON_CULATOR_IMAGE_2 = -1000133,
- SAY_PATHALEON_CULATOR_IMAGE_2_1 = -1000134,
- SAY_PATHALEON_CULATOR_IMAGE_2_2 = -1000135,
- SAY_COMMANDER_DAWNFORGE_4 = -1000136,
- SAY_ARCANIST_ARDONIS_2 = -1000136,
- SAY_COMMANDER_DAWNFORGE_5 = -1000137,
+ SAY_COMMANDER_DAWNFORGE_1 = 0,
+ SAY_COMMANDER_DAWNFORGE_2 = 1,
+ SAY_COMMANDER_DAWNFORGE_3 = 2,
+ SAY_COMMANDER_DAWNFORGE_4 = 3,
+ SAY_COMMANDER_DAWNFORGE_5 = 4,
+
+ SAY_ARCANIST_ARDONIS_1 = 0,
+ SAY_ARCANIST_ARDONIS_2 = 1,
+
+ SAY_PATHALEON_CULATOR_IMAGE_1 = 0,
+ SAY_PATHALEON_CULATOR_IMAGE_2 = 1,
+ SAY_PATHALEON_CULATOR_IMAGE_2_1 = 2,
+ SAY_PATHALEON_CULATOR_IMAGE_2_2 = 3,
QUEST_INFO_GATHERING = 10198,
SPELL_SUNFURY_DISGUISE = 34603,
@@ -516,8 +519,8 @@ public:
return;
}
- Unit* ardonis = Unit::GetUnit(*me, ardonisGUID);
- Unit* pathaleon = Unit::GetUnit(*me, pathaleonGUID);
+ Creature* ardonis = Creature::GetCreature(*me, ardonisGUID);
+ Creature* pathaleon = Creature::GetCreature(*me, pathaleonGUID);
Player* player = Unit::GetPlayer(*me, PlayerGUID);
if (!ardonis || !player)
@@ -536,19 +539,19 @@ public:
switch (Phase)
{
case 1:
- DoScriptText(SAY_COMMANDER_DAWNFORGE_1, me);
+ Talk(SAY_COMMANDER_DAWNFORGE_1);
++Phase;
Phase_Timer = 16000;
break;
//Phase 2 Ardonis say
case 2:
- DoScriptText(SAY_ARCANIST_ARDONIS_1, ardonis);
+ ardonis->AI()->Talk(SAY_ARCANIST_ARDONIS_1);
++Phase;
Phase_Timer = 16000;
break;
//Phase 3 Dawnforge say
case 3:
- DoScriptText(SAY_COMMANDER_DAWNFORGE_2, me);
+ Talk(SAY_COMMANDER_DAWNFORGE_2);
++Phase;
Phase_Timer = 16000;
break;
@@ -561,7 +564,7 @@ public:
break;
//Phase 5 Pathaleon say
case 5:
- DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_1, pathaleon);
+ pathaleon->AI()->Talk(SAY_PATHALEON_CULATOR_IMAGE_1);
++Phase;
Phase_Timer = 6000;
break;
@@ -577,7 +580,7 @@ public:
break;
//Subphase 2 Dawnforge say
case 1:
- DoScriptText(SAY_COMMANDER_DAWNFORGE_3, me);
+ Talk(SAY_COMMANDER_DAWNFORGE_3);
PhaseSubphase = 0;
++Phase;
Phase_Timer = 8000;
@@ -590,19 +593,19 @@ public:
{
//Subphase 1
case 0:
- DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_2, pathaleon);
+ pathaleon->AI()->Talk(SAY_PATHALEON_CULATOR_IMAGE_2);
++PhaseSubphase;
Phase_Timer = 12000;
break;
//Subphase 2
case 1:
- DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_2_1, pathaleon);
+ pathaleon->AI()->Talk(SAY_PATHALEON_CULATOR_IMAGE_2_1);
++PhaseSubphase;
Phase_Timer = 16000;
break;
//Subphase 3
case 2:
- DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_2_2, pathaleon);
+ pathaleon->AI()->Talk(SAY_PATHALEON_CULATOR_IMAGE_2_2);
PhaseSubphase = 0;
++Phase;
Phase_Timer = 10000;
@@ -611,8 +614,8 @@ public:
break;
//Phase 8 Dawnforge & Ardonis say
case 8:
- DoScriptText(SAY_COMMANDER_DAWNFORGE_4, me);
- DoScriptText(SAY_ARCANIST_ARDONIS_2, ardonis);
+ Talk(SAY_COMMANDER_DAWNFORGE_4);
+ ardonis->AI()->Talk(SAY_ARCANIST_ARDONIS_2);
++Phase;
Phase_Timer = 4000;
break;
@@ -627,7 +630,7 @@ public:
break;
//Phase 10 Dawnforge say
case 10:
- DoScriptText(SAY_COMMANDER_DAWNFORGE_5, me);
+ Talk(SAY_COMMANDER_DAWNFORGE_5);
player->AreaExploredOrEventHappens(QUEST_INFO_GATHERING);
Reset();
break;
@@ -667,7 +670,7 @@ enum eProfessorDabiriData
{
SPELL_PHASE_DISTRUPTOR = 35780,
- WHISPER_DABIRI = -1000522,
+ //WHISPER_DABIRI = 0, not existing in database
QUEST_DIMENSIUS = 10439,
QUEST_ON_NETHERY_WINGS = 10438,
@@ -680,13 +683,9 @@ class npc_professor_dabiri : public CreatureScript
public:
npc_professor_dabiri() : CreatureScript("npc_professor_dabiri") { }
- bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
- {
- if (quest->GetQuestId() == QUEST_DIMENSIUS)
- DoScriptText(WHISPER_DABIRI, creature, player);
-
- return true;
- }
+ //OnQuestAccept:
+ //if (quest->GetQuestId() == QUEST_DIMENSIUS)
+ //creature->AI()->Talk(WHISPER_DABIRI, player->GetGUID());
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
{
@@ -725,7 +724,7 @@ enum ePhaseHunterData
NPC_PHASE_HUNTER_ENTRY = 18879,
NPC_DRAINED_PHASE_HUNTER_ENTRY = 19595,
- EMOTE_WEAK = -1000303,
+ EMOTE_WEAK = 0,
// Spells
SPELL_RECHARGING_BATTERY = 34219,
@@ -827,7 +826,7 @@ public:
if (!Weak && HealthBelowPct(WeakPercent)
&& player->GetQuestStatus(QUEST_RECHARGING_THE_BATTERIES) == QUEST_STATUS_INCOMPLETE)
{
- DoScriptText(EMOTE_WEAK, me);
+ Talk(EMOTE_WEAK);
Weak = true;
}
if (Weak && !Drained && me->HasAura(SPELL_RECHARGING_BATTERY))
@@ -857,8 +856,8 @@ enum eBessyData
N_THADELL = 20464,
SPAWN_FIRST = 20512,
SPAWN_SECOND = 19881,
- SAY_THADELL_1 = -1000524,
- SAY_THADELL_2 = -1000525,
+ SAY_THADELL_1 = 0,
+ SAY_THADELL_2 = 1,
};
class npc_bessy : public CreatureScript
@@ -912,11 +911,11 @@ public:
case 12:
player->GroupEventHappens(Q_ALMABTRIEB, me);
if (me->FindNearestCreature(N_THADELL, 30))
- DoScriptText(SAY_THADELL_1, me);
+ Talk(SAY_THADELL_1);
break;
case 13:
if (me->FindNearestCreature(N_THADELL, 30))
- DoScriptText(SAY_THADELL_2, me, player);
+ Talk(SAY_THADELL_2, player->GetGUID());
break;
}
}
diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp
index dc91fb2c14f..65a4dbe92a5 100644
--- a/src/server/scripts/Outland/shadowmoon_valley.cpp
+++ b/src/server/scripts/Outland/shadowmoon_valley.cpp
@@ -55,7 +55,7 @@ EndContentData */
enum eMatureNetherwing
{
- SAY_JUST_EATEN = -1000175,
+ SAY_JUST_EATEN = 0,
SPELL_PLACE_CARCASS = 38439,
SPELL_JUST_EATEN = 38502,
@@ -152,7 +152,7 @@ public:
else if (bIsEating)
{
DoCast(me, SPELL_JUST_EATEN);
- DoScriptText(SAY_JUST_EATEN, me);
+ Talk(SAY_JUST_EATEN);
if (Player* pPlr = Unit::GetPlayer(*me, uiPlayerGUID))
{
@@ -674,25 +674,25 @@ enum eOverlordData
SPELL_THREE = 40216, // Dragonaw Faction
SPELL_FOUR = 42016, // Dragonaw Trasform
- OVERLORD_SAY_1 = -1000606,
- OVERLORD_SAY_2 = -1000607,
- OVERLORD_SAY_3 = -1000608, //signed for 28315
- OVERLORD_SAY_4 = -1000609,
- OVERLORD_SAY_5 = -1000610,
- OVERLORD_SAY_6 = -1000611,
-
- OVERLORD_YELL_1 = -1000612,
- OVERLORD_YELL_2 = -1000613,
-
- LORD_ILLIDAN_SAY_1 = -1000614,
- LORD_ILLIDAN_SAY_2 = -1000615,
- LORD_ILLIDAN_SAY_3 = -1000616,
- LORD_ILLIDAN_SAY_4 = -1000617,
- LORD_ILLIDAN_SAY_5 = -1000618,
- LORD_ILLIDAN_SAY_6 = -1000619,
- LORD_ILLIDAN_SAY_7 = -1000620,
-
- YARZILL_THE_MERC_SAY = -1000621,
+ OVERLORD_SAY_1 = 0,
+ OVERLORD_SAY_2 = 1,
+ //OVERLORD_SAY_3 = 2,
+ OVERLORD_SAY_4 = 3,
+ OVERLORD_SAY_5 = 4,
+ OVERLORD_SAY_6 = 5,
+
+ OVERLORD_YELL_1 = 6,
+ OVERLORD_YELL_2 = 7,
+
+ LORD_ILLIDAN_SAY_1 = 0,
+ LORD_ILLIDAN_SAY_2 = 1,
+ LORD_ILLIDAN_SAY_3 = 2,
+ LORD_ILLIDAN_SAY_4 = 3,
+ LORD_ILLIDAN_SAY_5 = 4,
+ LORD_ILLIDAN_SAY_6 = 5,
+ LORD_ILLIDAN_SAY_7 = 6,
+
+ YARZILL_THE_MERC_SAY = 0
};
class npc_overlord_morghor : public CreatureScript
@@ -754,7 +754,7 @@ public:
{
Player* player = Unit::GetPlayer(*me, PlayerGUID);
if (player)
- DoScriptText(OVERLORD_SAY_1, me, player);
+ Talk(OVERLORD_SAY_1, player->GetGUID());
}
ConversationTimer = 4200;
Step = 0;
@@ -764,7 +764,7 @@ public:
uint32 NextStep(uint32 Step)
{
Player* player = Unit::GetPlayer(*me, PlayerGUID);
- Unit* Illi = Unit::GetUnit(*me, IllidanGUID);
+ Creature* Illi = Creature::GetCreature(*me, IllidanGUID);
if (!player || !Illi)
{
@@ -782,7 +782,7 @@ public:
return 9000;
break;
case 2:
- DoScriptText(OVERLORD_YELL_1, me, player);
+ Talk(OVERLORD_YELL_1, player->GetGUID());
return 4500;
break;
case 3:
@@ -790,7 +790,7 @@ public:
return 3200;
break;
case 4:
- DoScriptText(OVERLORD_SAY_2, me, player);
+ Talk(OVERLORD_SAY_2, player->GetGUID());
return 2000;
break;
case 5:
@@ -805,31 +805,27 @@ public:
return 2000;
break;
case 7:
- DoScriptText(OVERLORD_YELL_2, me);
+ Talk(OVERLORD_YELL_2);
return 4500;
break;
case 8:
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 8);
- return 2500;
- break;
- case 9:
- DoScriptText(OVERLORD_SAY_3, me);
- return 6500;
+ return 9000;
break;
case 10:
- DoScriptText(LORD_ILLIDAN_SAY_1, Illi);
+ Illi->AI()->Talk(LORD_ILLIDAN_SAY_1);
return 5000;
break;
case 11:
- DoScriptText(OVERLORD_SAY_4, me, player);
+ Talk(OVERLORD_SAY_4, player->GetGUID());
return 6000;
break;
case 12:
- DoScriptText(LORD_ILLIDAN_SAY_2, Illi);
+ Illi->AI()->Talk(LORD_ILLIDAN_SAY_2);
return 5500;
break;
case 13:
- DoScriptText(LORD_ILLIDAN_SAY_3, Illi);
+ Illi->AI()->Talk(LORD_ILLIDAN_SAY_3);
return 4000;
break;
case 14:
@@ -837,7 +833,7 @@ public:
return 1500;
break;
case 15:
- DoScriptText(LORD_ILLIDAN_SAY_4, Illi);
+ Illi->AI()->Talk(LORD_ILLIDAN_SAY_4);
return 1500;
break;
case 16:
@@ -847,15 +843,15 @@ public:
return 5000;
break;
case 17:
- DoScriptText(LORD_ILLIDAN_SAY_5, Illi);
+ Illi->AI()->Talk(LORD_ILLIDAN_SAY_5);
return 5000;
break;
case 18:
- DoScriptText(LORD_ILLIDAN_SAY_6, Illi);
+ Illi->AI()->Talk(LORD_ILLIDAN_SAY_6);
return 5000;
break;
case 19:
- DoScriptText(LORD_ILLIDAN_SAY_7, Illi);
+ Illi->AI()->Talk(LORD_ILLIDAN_SAY_7);
return 5000;
break;
case 20:
@@ -864,7 +860,7 @@ public:
return 500;
break;
case 21:
- DoScriptText(OVERLORD_SAY_5, me);
+ Talk(OVERLORD_SAY_5);
return 500;
break;
case 22:
@@ -881,7 +877,7 @@ public:
return 5000;
break;
case 25:
- DoScriptText(OVERLORD_SAY_6, me);
+ Talk(OVERLORD_SAY_6);
return 2000;
break;
case 26:
@@ -905,24 +901,21 @@ public:
break;
case 29:
{
- Unit* Yarzill = me->FindNearestCreature(C_YARZILL, 50);
- if (Yarzill)
- DoScriptText(YARZILL_THE_MERC_SAY, Yarzill, player);
+ if (Creature* Yarzill = me->FindNearestCreature(C_YARZILL, 50.0f))
+ Yarzill->AI()->Talk(YARZILL_THE_MERC_SAY, player->GetGUID());
return 5000;
}
break;
case 30:
{
- Unit* Yarzill = me->FindNearestCreature(C_YARZILL, 50);
- if (Yarzill)
+ if (Creature* Yarzill = me->FindNearestCreature(C_YARZILL, 50.0f))
Yarzill->SetTarget(0);
return 5000;
}
break;
case 31:
{
- Unit* Yarzill = me->FindNearestCreature(C_YARZILL, 50);
- if (Yarzill)
+ if (Creature* Yarzill = me->FindNearestCreature(C_YARZILL, 50.0f))
Yarzill->CastSpell(player, 41540, true);
return 1000;
}
@@ -960,16 +953,13 @@ public:
enum eEarthmender
{
- SAY_WIL_START = -1000381,
- SAY_WIL_AGGRO1 = -1000382,
- SAY_WIL_AGGRO2 = -1000383,
- SAY_WIL_PROGRESS1 = -1000384,
- SAY_WIL_PROGRESS2 = -1000385,
- SAY_WIL_FIND_EXIT = -1000386,
- SAY_WIL_PROGRESS4 = -1000387,
- SAY_WIL_PROGRESS5 = -1000388,
- SAY_WIL_JUST_AHEAD = -1000389,
- SAY_WIL_END = -1000390,
+ SAY_WIL_START = 0,
+ SAY_WIL_AGGRO = 1,
+ SAY_WIL_PROGRESS1 = 2,
+ SAY_WIL_PROGRESS2 = 3,
+ SAY_WIL_FIND_EXIT = 4,
+ SAY_WIL_JUST_AHEAD = 5,
+ SAY_WIL_END = 6,
SPELL_CHAIN_LIGHTNING = 16006,
SPELL_EARTHBING_TOTEM = 15786,
@@ -990,7 +980,7 @@ public:
{
if (quest->GetQuestId() == QUEST_ESCAPE_COILSCAR)
{
- DoScriptText(SAY_WIL_START, creature, player);
+ creature->AI()->Talk(SAY_WIL_START, player->GetGUID());
creature->setFaction(FACTION_EARTHEN);
if (npc_earthmender_wildaAI* pEscortAI = CAST_AI(npc_earthmender_wilda::npc_earthmender_wildaAI, creature->AI()))
@@ -1024,14 +1014,14 @@ public:
switch (waypointId)
{
case 13:
- DoScriptText(SAY_WIL_PROGRESS1, me, player);
+ Talk(SAY_WIL_PROGRESS1, player->GetGUID());
DoSpawnAssassin();
break;
case 14:
DoSpawnAssassin();
break;
case 15:
- DoScriptText(SAY_WIL_FIND_EXIT, me, player);
+ Talk(SAY_WIL_FIND_EXIT, player->GetGUID());
break;
case 19:
DoRandomSay();
@@ -1058,7 +1048,7 @@ public:
DoSpawnAssassin();
break;
case 39:
- DoScriptText(SAY_WIL_JUST_AHEAD, me, player);
+ Talk(SAY_WIL_JUST_AHEAD, player->GetGUID());
break;
case 43:
DoRandomSay();
@@ -1067,7 +1057,7 @@ public:
DoSpawnAssassin();
break;
case 50:
- DoScriptText(SAY_WIL_END, me, player);
+ Talk(SAY_WIL_END, player->GetGUID());
player->GroupEventHappens(QUEST_ESCAPE_COILSCAR, me);
break;
}
@@ -1082,7 +1072,7 @@ public:
//this is very unclear, random say without no real relevance to script/event
void DoRandomSay()
{
- DoScriptText(RAND(SAY_WIL_PROGRESS2, SAY_WIL_PROGRESS4, SAY_WIL_PROGRESS5), me);
+ Talk(SAY_WIL_PROGRESS2);
}
void DoSpawnAssassin()
@@ -1102,7 +1092,7 @@ public:
{
//appears to be random
if (urand(0, 1))
- DoScriptText(RAND(SAY_WIL_AGGRO1, SAY_WIL_AGGRO2), who);
+ Talk(SAY_WIL_AGGRO);
}
}
@@ -1140,28 +1130,25 @@ npc_lord_illidan_stormrage : Creature that controls the event.
go_crystal_prison : GameObject that begins the event and hands out quest
EndContentData */
-#define END_TEXT -1000366 //signed for 10646
-
#define QUEST_BATTLE_OF_THE_CRIMSON_WATCH 10781
#define EVENT_AREA_RADIUS 65 //65yds
#define EVENT_COOLDOWN 30000 //in ms. appear after event completed or failed (should be = Adds despawn time)
struct TorlothCinematic
{
- int32 TextId;
uint32 creature, Timer;
};
// Creature 0 - Torloth, 1 - Illidan
static TorlothCinematic TorlothAnim[]=
{
- {-1000367, 0, 2000},
- {-1000368, 1, 7000},
- {-1000369, 0, 3000},
- {0, 0, 2000}, // Torloth stand
- {-1000370, 0, 1000},
- {0, 0, 3000},
- {0, 0, 0}
+ {0, 2000},
+ {1, 7000},
+ {0, 3000},
+ {0, 2000}, // Torloth stand
+ {0, 1000},
+ {0, 3000},
+ {0, 0}
};
struct Location
@@ -1195,15 +1182,14 @@ struct WaveData
{
uint8 SpawnCount, UsedSpawnPoint;
uint32 CreatureId, SpawnTimer, YellTimer;
- int32 WaveTextId;
};
static WaveData WavesInfo[]=
{
- {9, 0, 22075, 10000, 7000, -1000371}, //Illidari Soldier
- {2, 9, 22074, 10000, 7000, -1000372}, //Illidari Mind Breaker
- {4, 11, 19797, 10000, 7000, -1000373}, //Illidari Highlord
- {1, 15, 22076, 10000, 7000, -1000374} //Torloth The Magnificent
+ {9, 0, 22075, 10000, 7000}, //Illidari Soldier
+ {2, 9, 22074, 10000, 7000}, //Illidari Mind Breaker
+ {4, 11, 19797, 10000, 7000}, //Illidari Highlord
+ {1, 15, 22076, 10000, 7000} //Torloth The Magnificent
};
struct SpawnSpells
@@ -1278,9 +1264,6 @@ public:
return;
}
- if (TorlothAnim[AnimationCount].TextId)
- DoScriptText(TorlothAnim[AnimationCount].TextId, creature);
-
AnimationTimer = TorlothAnim[AnimationCount].Timer;
switch (AnimationCount)
@@ -1377,7 +1360,6 @@ public:
if (Creature* LordIllidan = (Unit::GetCreature(*me, LordIllidanGUID)))
{
- DoScriptText(END_TEXT, LordIllidan, killer);
LordIllidan->AI()->EnterEvadeMode();
}
}
@@ -1512,14 +1494,17 @@ public:
{
if (!Announced && AnnounceTimer <= diff)
{
- DoScriptText(WavesInfo[WaveCount].WaveTextId, me);
Announced = true;
- } else AnnounceTimer -= diff;
+ }
+ else
+ AnnounceTimer -= diff;
if (WaveTimer <= diff)
{
SummonNextWave();
- } else WaveTimer -= diff;
+ }
+ else
+ WaveTimer -= diff;
}
CheckEventFail();
diff --git a/src/server/scripts/Outland/shattrath_city.cpp b/src/server/scripts/Outland/shattrath_city.cpp
index 76cffa9e1fe..c45ad519d39 100644
--- a/src/server/scripts/Outland/shattrath_city.cpp
+++ b/src/server/scripts/Outland/shattrath_city.cpp
@@ -286,28 +286,32 @@ public:
# npc_kservant
######*/
-#define SAY1 -1000234
-#define WHISP1 -1000235
-#define WHISP2 -1000236
-#define WHISP3 -1000237
-#define WHISP4 -1000238
-#define WHISP5 -1000239
-#define WHISP6 -1000240
-#define WHISP7 -1000241
-#define WHISP8 -1000242
-#define WHISP9 -1000243
-#define WHISP10 -1000244
-#define WHISP11 -1000245
-#define WHISP12 -1000246
-#define WHISP13 -1000247
-#define WHISP14 -1000248
-#define WHISP15 -1000249
-#define WHISP16 -1000250
-#define WHISP17 -1000251
-#define WHISP18 -1000252
-#define WHISP19 -1000253
-#define WHISP20 -1000254
-#define WHISP21 -1000255
+enum KServant
+{
+ SAY1 = 0,
+ WHISP1 = 1,
+ WHISP2 = 2,
+ WHISP3 = 3,
+ WHISP4 = 4,
+ WHISP5 = 5,
+ WHISP6 = 6,
+ WHISP7 = 7,
+ WHISP8 = 8,
+ WHISP9 = 9,
+ WHISP10 = 10,
+ WHISP11 = 11,
+ WHISP12 = 12,
+ WHISP13 = 13,
+ WHISP14 = 14,
+ WHISP15 = 15,
+ WHISP16 = 16,
+ WHISP17 = 17,
+ WHISP18 = 18,
+ WHISP19 = 19,
+ WHISP20 = 20,
+ WHISP21 = 21
+};
+
class npc_kservant : public CreatureScript
{
public:
@@ -332,70 +336,70 @@ public:
switch (waypointId)
{
case 0:
- DoScriptText(SAY1, me, player);
+ Talk(SAY1, player->GetGUID());
break;
case 4:
- DoScriptText(WHISP1, me, player);
+ Talk(WHISP1, player->GetGUID());
break;
case 6:
- DoScriptText(WHISP2, me, player);
+ Talk(WHISP2, player->GetGUID());
break;
case 7:
- DoScriptText(WHISP3, me, player);
+ Talk(WHISP3, player->GetGUID());
break;
case 8:
- DoScriptText(WHISP4, me, player);
+ Talk(WHISP4, player->GetGUID());
break;
case 17:
- DoScriptText(WHISP5, me, player);
+ Talk(WHISP5, player->GetGUID());
break;
case 18:
- DoScriptText(WHISP6, me, player);
+ Talk(WHISP6, player->GetGUID());
break;
case 19:
- DoScriptText(WHISP7, me, player);
+ Talk(WHISP7, player->GetGUID());
break;
case 33:
- DoScriptText(WHISP8, me, player);
+ Talk(WHISP8, player->GetGUID());
break;
case 34:
- DoScriptText(WHISP9, me, player);
+ Talk(WHISP9, player->GetGUID());
break;
case 35:
- DoScriptText(WHISP10, me, player);
+ Talk(WHISP10, player->GetGUID());
break;
case 36:
- DoScriptText(WHISP11, me, player);
+ Talk(WHISP11, player->GetGUID());
break;
case 43:
- DoScriptText(WHISP12, me, player);
+ Talk(WHISP12, player->GetGUID());
break;
case 44:
- DoScriptText(WHISP13, me, player);
+ Talk(WHISP13, player->GetGUID());
break;
case 49:
- DoScriptText(WHISP14, me, player);
+ Talk(WHISP14, player->GetGUID());
break;
case 50:
- DoScriptText(WHISP15, me, player);
+ Talk(WHISP15, player->GetGUID());
break;
case 51:
- DoScriptText(WHISP16, me, player);
+ Talk(WHISP16, player->GetGUID());
break;
case 52:
- DoScriptText(WHISP17, me, player);
+ Talk(WHISP17, player->GetGUID());
break;
case 53:
- DoScriptText(WHISP18, me, player);
+ Talk(WHISP18, player->GetGUID());
break;
case 54:
- DoScriptText(WHISP19, me, player);
+ Talk(WHISP19, player->GetGUID());
break;
case 55:
- DoScriptText(WHISP20, me, player);
+ Talk(WHISP20, player->GetGUID());
break;
case 56:
- DoScriptText(WHISP21, me, player);
+ Talk(WHISP21, player->GetGUID());
player->GroupEventHappens(10211, me);
break;
}
@@ -429,16 +433,19 @@ public:
#define GOSSIP_BOOK "Ezekiel said that you might have a certain book..."
-#define SAY_1 -1000274
-#define SAY_2 -1000275
-#define SAY_3 -1000276
-#define SAY_4 -1000277
-#define SAY_5 -1000278
-#define SAY_GIVEUP -1000279
-
-#define QUEST_WBI 10231
-#define NPC_CREEPJACK 19726
-#define NPC_MALONE 19725
+enum DirtyLarry
+{
+ SAY_1 = 0,
+ SAY_2 = 1,
+ SAY_3 = 2,
+ SAY_4 = 3,
+ SAY_5 = 4,
+ SAY_GIVEUP = 5,
+
+ QUEST_WBI = 10231,
+ NPC_CREEPJACK = 19726,
+ NPC_MALONE = 19725
+};
class npc_dirty_larry : public CreatureScript
{
@@ -500,11 +507,11 @@ public:
if (Malone)
Malone->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); }return 2000;
- case 1: DoScriptText(SAY_1, me, player); return 3000;
- case 2: DoScriptText(SAY_2, me, player); return 5000;
- case 3: DoScriptText(SAY_3, me, player); return 2000;
- case 4: DoScriptText(SAY_4, me, player); return 2000;
- case 5: DoScriptText(SAY_5, me, player); return 2000;
+ case 1: Talk(SAY_1, player->GetGUID()); return 3000;
+ case 2: Talk(SAY_2, player->GetGUID()); return 5000;
+ case 3: Talk(SAY_3, player->GetGUID()); return 2000;
+ case 4: Talk(SAY_4, player->GetGUID()); return 2000;
+ case 5: Talk(SAY_5, player->GetGUID()); return 2000;
case 6: Attack = true; return 2000;
default: return 0;
}
@@ -572,7 +579,7 @@ public:
}
me->setFaction(1194);
Done = true;
- DoScriptText(SAY_GIVEUP, me, NULL);
+ Talk(SAY_GIVEUP);
me->DeleteThreatList();
me->CombatStop();
me->GetMotionMaster()->MoveTargetedHome();
diff --git a/src/server/scripts/Outland/terokkar_forest.cpp b/src/server/scripts/Outland/terokkar_forest.cpp
index 2298f676692..d1f37dd5bfc 100644
--- a/src/server/scripts/Outland/terokkar_forest.cpp
+++ b/src/server/scripts/Outland/terokkar_forest.cpp
@@ -45,14 +45,16 @@ EndContentData */
## mob_unkor_the_ruthless
######*/
-#define SAY_SUBMIT -1000194
+enum UnkorTheRuthless
+{
+ SAY_SUBMIT = 0,
-#define FACTION_HOSTILE 45
-#define FACTION_FRIENDLY 35
-#define QUEST_DONTKILLTHEFATONE 9889
+ FACTION_HOSTILE = 45,
+ FACTION_FRIENDLY = 35,
+ QUEST_DONTKILLTHEFATONE = 9889,
-#define SPELL_PULVERIZE 2676
-//#define SPELL_QUID9889 32174
+ SPELL_PULVERIZE = 2676
+};
class mob_unkor_the_ruthless : public CreatureScript
{
@@ -85,7 +87,7 @@ public:
void DoNice()
{
- DoScriptText(SAY_SUBMIT, me);
+ Talk(SAY_SUBMIT);
me->setFaction(FACTION_FRIENDLY);
me->SetStandState(UNIT_STAND_STATE_SIT);
me->RemoveAllAuras();
@@ -344,7 +346,7 @@ public:
enum eFloon
{
- SAY_FLOON_ATTACK = -1000195,
+ SAY_FLOON_ATTACK = 0,
SPELL_SILENCE = 6726,
SPELL_FROSTBOLT = 9672,
@@ -371,7 +373,7 @@ public:
{
player->CLOSE_GOSSIP_MENU();
creature->setFaction(FACTION_HOSTILE_FL);
- DoScriptText(SAY_FLOON_ATTACK, creature, player);
+ creature->AI()->Talk(SAY_FLOON_ATTACK, player->GetGUID());
creature->AI()->AttackStart(player);
}
return true;
@@ -447,10 +449,10 @@ public:
######*/
enum eIslaStarmaneData
{
- SAY_PROGRESS_1 = -1000571,
- SAY_PROGRESS_2 = -1000572,
- SAY_PROGRESS_3 = -1000573,
- SAY_PROGRESS_4 = -1000574,
+ SAY_PROGRESS_1 = 0,
+ SAY_PROGRESS_2 = 1,
+ SAY_PROGRESS_3 = 2,
+ SAY_PROGRESS_4 = 3,
QUEST_EFTW_H = 10052,
QUEST_EFTW_A = 10051,
@@ -480,16 +482,16 @@ public:
Cage->SetGoState(GO_STATE_ACTIVE);
break;
case 2:
- DoScriptText(SAY_PROGRESS_1, me, player);
+ Talk(SAY_PROGRESS_1, player->GetGUID());
break;
case 5:
- DoScriptText(SAY_PROGRESS_2, me, player);
+ Talk(SAY_PROGRESS_2, player->GetGUID());
break;
case 6:
- DoScriptText(SAY_PROGRESS_3, me, player);
+ Talk(SAY_PROGRESS_3, player->GetGUID());
break;
case 29:
- DoScriptText(SAY_PROGRESS_4, me, player);
+ Talk(SAY_PROGRESS_4, player->GetGUID());
if (player->GetTeam() == ALLIANCE)
player->GroupEventHappens(QUEST_EFTW_A, me);
else if (player->GetTeam() == HORDE)
diff --git a/src/server/scripts/Outland/zangarmarsh.cpp b/src/server/scripts/Outland/zangarmarsh.cpp
index 03e40b8d7dc..1fbb8a48324 100644
--- a/src/server/scripts/Outland/zangarmarsh.cpp
+++ b/src/server/scripts/Outland/zangarmarsh.cpp
@@ -45,9 +45,24 @@ EndContentData */
#define GOSSIP_ITEM_BLESS_ASH "Grant me your mark, wise ancient."
#define GOSSIP_ITEM_BLESS_KEL "Grant me your mark, mighty ancient."
-//signed for 17900 but used by 17900, 17901
-#define GOSSIP_REWARD_BLESS -1000359
-//#define TEXT_BLESSINGS "<You need higher standing with Cenarion Expedition to recive a blessing.>"
+
+enum AshyenAndKeleth
+{
+ GOSSIP_REWARD_BLESS = 0,
+
+ NPC_ASHYEN = 17900,
+ NPC_KELETH = 17901,
+
+ SPELL_BLESS_ASH_EXA = 31815,
+ SPELL_BLESS_ASH_REV = 31811,
+ SPELL_BLESS_ASH_HON = 31810,
+ SPELL_BLESS_ASH_FRI = 31808,
+
+ SPELL_BLESS_KEL_EXA = 31814,
+ SPELL_BLESS_KEL_REV = 31813,
+ SPELL_BLESS_KEL_HON = 31812,
+ SPELL_BLESS_KEL_FRI = 31807
+};
class npcs_ashyen_and_keleth : public CreatureScript
{
@@ -58,10 +73,10 @@ public:
{
if (player->GetReputationRank(942) > REP_NEUTRAL)
{
- if (creature->GetEntry() == 17900)
+ if (creature->GetEntry() == NPC_ASHYEN)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_ASH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
- if (creature->GetEntry() == 17901)
+ if (creature->GetEntry() == NPC_KELETH)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_KEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
}
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
@@ -78,54 +93,60 @@ public:
creature->SetMaxPower(POWER_MANA, 200); //set a "fake" mana value, we can't depend on database doing it in this case
creature->SetPower(POWER_MANA, 200);
- if (creature->GetEntry() == 17900) //check which Creature we are dealing with
+ if (creature->GetEntry() == NPC_ASHYEN) //check which Creature we are dealing with
{
+ uint32 spell = 0;
switch (player->GetReputationRank(942))
{ //mark of lore
case REP_FRIENDLY:
- creature->CastSpell(player, 31808, true);
- DoScriptText(GOSSIP_REWARD_BLESS, creature);
+ spell = SPELL_BLESS_ASH_FRI;
break;
case REP_HONORED:
- creature->CastSpell(player, 31810, true);
- DoScriptText(GOSSIP_REWARD_BLESS, creature);
+ spell = SPELL_BLESS_ASH_HON;
break;
case REP_REVERED:
- creature->CastSpell(player, 31811, true);
- DoScriptText(GOSSIP_REWARD_BLESS, creature);
+ spell = SPELL_BLESS_ASH_REV;
break;
case REP_EXALTED:
- creature->CastSpell(player, 31815, true);
- DoScriptText(GOSSIP_REWARD_BLESS, creature);
+ spell = SPELL_BLESS_ASH_EXA;
break;
default:
break;
}
+
+ if (spell)
+ {
+ creature->CastSpell(player, spell, true);
+ creature->AI()->Talk(GOSSIP_REWARD_BLESS);
+ }
}
- if (creature->GetEntry() == 17901)
+ if (creature->GetEntry() == NPC_KELETH)
{
+ uint32 spell = 0;
switch (player->GetReputationRank(942)) //mark of war
{
case REP_FRIENDLY:
- creature->CastSpell(player, 31807, true);
- DoScriptText(GOSSIP_REWARD_BLESS, creature);
+ spell = SPELL_BLESS_KEL_FRI;
break;
case REP_HONORED:
- creature->CastSpell(player, 31812, true);
- DoScriptText(GOSSIP_REWARD_BLESS, creature);
+ spell = SPELL_BLESS_KEL_HON;
break;
case REP_REVERED:
- creature->CastSpell(player, 31813, true);
- DoScriptText(GOSSIP_REWARD_BLESS, creature);
+ spell = SPELL_BLESS_KEL_REV;
break;
case REP_EXALTED:
- creature->CastSpell(player, 31814, true);
- DoScriptText(GOSSIP_REWARD_BLESS, creature);
+ spell = SPELL_BLESS_KEL_EXA;
break;
default:
break;
}
+
+ if (spell)
+ {
+ creature->CastSpell(player, spell, true);
+ creature->AI()->Talk(GOSSIP_REWARD_BLESS);
+ }
}
player->CLOSE_GOSSIP_MENU();
player->TalkedToCreature(creature->GetEntry(), creature->GetGUID());
@@ -304,12 +325,11 @@ public:
enum eKayra
{
- SAY_START = -1000343,
- SAY_AMBUSH1 = -1000344,
- SAY_PROGRESS = -1000345,
- SAY_AMBUSH2 = -1000346,
- SAY_NEAR_END = -1000347,
- SAY_END = -1000348, //this is signed for 10646
+ SAY_START = 0,
+ SAY_AMBUSH1 = 1,
+ SAY_PROGRESS = 2,
+ SAY_AMBUSH2 = 3,
+ SAY_END = 4,
QUEST_ESCAPE_FROM = 9752,
NPC_SLAVEBINDER = 18042
@@ -335,25 +355,24 @@ public:
switch (waypointId)
{
case 4:
- DoScriptText(SAY_AMBUSH1, me, player);
+ Talk(SAY_AMBUSH1, player->GetGUID());
DoSpawnCreature(NPC_SLAVEBINDER, -10.0f, -5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
DoSpawnCreature(NPC_SLAVEBINDER, -8.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break;
case 5:
- DoScriptText(SAY_PROGRESS, me, player);
+ Talk(SAY_PROGRESS, player->GetGUID());
SetRun();
break;
case 16:
- DoScriptText(SAY_AMBUSH2, me, player);
+ Talk(SAY_AMBUSH2, player->GetGUID());
DoSpawnCreature(NPC_SLAVEBINDER, -10.0f, -5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
DoSpawnCreature(NPC_SLAVEBINDER, -8.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break;
case 17:
SetRun(false);
- DoScriptText(SAY_NEAR_END, me, player);
break;
case 25:
- DoScriptText(SAY_END, me, player);
+ Talk(SAY_END, player->GetGUID());
player->GroupEventHappens(QUEST_ESCAPE_FROM, me);
break;
}
@@ -364,7 +383,7 @@ public:
{
if (quest->GetQuestId() == QUEST_ESCAPE_FROM)
{
- DoScriptText(SAY_START, creature, player);
+ creature->AI()->Talk(SAY_START, player->GetGUID());
if (npc_escortAI* pEscortAI = CAST_AI(npc_kayra_longmane::npc_kayra_longmaneAI, creature->AI()))
pEscortAI->Start(false, false, player->GetGUID());
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 026a0c7b280..77374932cbd 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -367,59 +367,9 @@ class spell_gen_remove_flight_auras : public SpellScriptLoader
}
};
-// 66118 Leeching Swarm
-enum LeechingSwarmSpells
-{
- SPELL_LEECHING_SWARM_DMG = 66240,
- SPELL_LEECHING_SWARM_HEAL = 66125,
-};
-
-class spell_gen_leeching_swarm : public SpellScriptLoader
-{
- public:
- spell_gen_leeching_swarm() : SpellScriptLoader("spell_gen_leeching_swarm") { }
-
- class spell_gen_leeching_swarm_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_gen_leeching_swarm_AuraScript);
-
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_LEECHING_SWARM_DMG) || !sSpellMgr->GetSpellInfo(SPELL_LEECHING_SWARM_HEAL))
- return false;
- return true;
- }
-
- void HandleEffectPeriodic(AuraEffect const* aurEff)
- {
- Unit* caster = GetCaster();
- if (Unit* target = GetTarget())
- {
- int32 lifeLeeched = target->CountPctFromCurHealth(aurEff->GetAmount());
- if (lifeLeeched < 250)
- lifeLeeched = 250;
- // Damage
- caster->CastCustomSpell(target, SPELL_LEECHING_SWARM_DMG, &lifeLeeched, 0, 0, false);
- // Heal
- caster->CastCustomSpell(caster, SPELL_LEECHING_SWARM_HEAL, &lifeLeeched, 0, 0, false);
- }
- }
-
- void Register()
- {
- OnEffectPeriodic += AuraEffectPeriodicFn(spell_gen_leeching_swarm_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
- }
- };
-
- AuraScript* GetAuraScript() const
- {
- return new spell_gen_leeching_swarm_AuraScript();
- }
-};
-
enum EluneCandle
{
- NPC_OMEN = 15467,
+ NPC_OMEN = 15467,
SPELL_ELUNE_CANDLE_OMEN_HEAD = 26622,
SPELL_ELUNE_CANDLE_OMEN_CHEST = 26624,
@@ -483,128 +433,6 @@ class spell_gen_elune_candle : public SpellScriptLoader
}
};
-// 24750 Trick
-enum TrickSpells
-{
- SPELL_PIRATE_COSTUME_MALE = 24708,
- SPELL_PIRATE_COSTUME_FEMALE = 24709,
- SPELL_NINJA_COSTUME_MALE = 24710,
- SPELL_NINJA_COSTUME_FEMALE = 24711,
- SPELL_LEPER_GNOME_COSTUME_MALE = 24712,
- SPELL_LEPER_GNOME_COSTUME_FEMALE = 24713,
- SPELL_SKELETON_COSTUME = 24723,
- SPELL_GHOST_COSTUME_MALE = 24735,
- SPELL_GHOST_COSTUME_FEMALE = 24736,
- SPELL_TRICK_BUFF = 24753,
-};
-
-class spell_gen_trick : public SpellScriptLoader
-{
- public:
- spell_gen_trick() : SpellScriptLoader("spell_gen_trick") {}
-
- class spell_gen_trick_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_gen_trick_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_MALE)
- || !sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_FEMALE)
- || !sSpellMgr->GetSpellInfo(SPELL_SKELETON_COSTUME) || !sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_TRICK_BUFF))
- return false;
- return true;
- }
-
- void HandleScript(SpellEffIndex /*effIndex*/)
- {
- Unit* caster = GetCaster();
- if (Player* target = GetHitPlayer())
- {
- uint8 gender = target->getGender();
- uint32 spellId = SPELL_TRICK_BUFF;
- switch (urand(0, 5))
- {
- case 1:
- spellId = gender ? SPELL_LEPER_GNOME_COSTUME_FEMALE : SPELL_LEPER_GNOME_COSTUME_MALE;
- break;
- case 2:
- spellId = gender ? SPELL_PIRATE_COSTUME_FEMALE : SPELL_PIRATE_COSTUME_MALE;
- break;
- case 3:
- spellId = gender ? SPELL_GHOST_COSTUME_FEMALE : SPELL_GHOST_COSTUME_MALE;
- break;
- case 4:
- spellId = gender ? SPELL_NINJA_COSTUME_FEMALE : SPELL_NINJA_COSTUME_MALE;
- break;
- case 5:
- spellId = SPELL_SKELETON_COSTUME;
- break;
- default:
- break;
- }
-
- caster->CastSpell(target, spellId, true, NULL);
- }
- }
-
- void Register()
- {
- OnEffectHitTarget += SpellEffectFn(spell_gen_trick_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
- }
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_gen_trick_SpellScript();
- }
-};
-
-// 24751 Trick or Treat
-enum TrickOrTreatSpells
-{
- SPELL_TRICK = 24714,
- SPELL_TREAT = 24715,
- SPELL_TRICKED_OR_TREATED = 24755
-};
-
-class spell_gen_trick_or_treat : public SpellScriptLoader
-{
- public:
- spell_gen_trick_or_treat() : SpellScriptLoader("spell_gen_trick_or_treat") {}
-
- class spell_gen_trick_or_treat_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_gen_trick_or_treat_SpellScript);
-
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_TRICK) || !sSpellMgr->GetSpellInfo(SPELL_TREAT) || !sSpellMgr->GetSpellInfo(SPELL_TRICKED_OR_TREATED))
- return false;
- return true;
- }
-
- void HandleScript(SpellEffIndex /*effIndex*/)
- {
- Unit* caster = GetCaster();
- if (Player* target = GetHitPlayer())
- {
- caster->CastSpell(target, roll_chance_i(50) ? SPELL_TRICK : SPELL_TREAT, true, NULL);
- caster->CastSpell(target, SPELL_TRICKED_OR_TREATED, true, NULL);
- }
- }
-
- void Register()
- {
- OnEffectHitTarget += SpellEffectFn(spell_gen_trick_or_treat_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
- }
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_gen_trick_or_treat_SpellScript();
- }
-};
-
class spell_creature_permanent_feign_death : public SpellScriptLoader
{
public:
@@ -1590,7 +1418,7 @@ class spell_gen_luck_of_the_draw : public SpellScriptLoader
if (group->isLFGGroup())
if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true))
if (LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(dungeonId))
- if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == uint32(map->GetDifficulty()))
+ if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == map->GetDifficulty())
if (randomDungeon && randomDungeon->type == LFG_TYPE_RANDOM)
return; // in correct dungeon
@@ -3305,6 +3133,61 @@ class spell_gen_gift_of_naaru : public SpellScriptLoader
}
};
+enum Replenishment
+{
+ SPELL_REPLENISHMENT = 57669,
+ SPELL_INFINITE_REPLENISHMENT = 61782
+};
+
+class spell_gen_replenishment : public SpellScriptLoader
+{
+ public:
+ spell_gen_replenishment() : SpellScriptLoader("spell_gen_replenishment") { }
+
+ class spell_gen_replenishment_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_gen_replenishment_AuraScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_REPLENISHMENT) ||
+ !sSpellMgr->GetSpellInfo(SPELL_INFINITE_REPLENISHMENT))
+ return false;
+ return true;
+ }
+
+ bool Load()
+ {
+ return GetUnitOwner()->GetPower(POWER_MANA);
+ }
+
+ void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
+ {
+ switch (GetSpellInfo()->Id)
+ {
+ case SPELL_REPLENISHMENT:
+ amount = GetUnitOwner()->GetMaxPower(POWER_MANA) * 0.002f;
+ break;
+ case SPELL_INFINITE_REPLENISHMENT:
+ amount = GetUnitOwner()->GetMaxPower(POWER_MANA) * 0.0025f;
+ break;
+ default:
+ break;
+ }
+ }
+
+ void Register()
+ {
+ DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_gen_replenishment_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_PERIODIC_ENERGIZE);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_gen_replenishment_AuraScript();
+ }
+};
+
void AddSC_generic_spell_scripts()
{
new spell_gen_absorb0_hitlimit1();
@@ -3312,12 +3195,9 @@ void AddSC_generic_spell_scripts()
new spell_gen_av_drekthar_presence();
new spell_gen_burn_brutallus();
new spell_gen_cannibalize();
- new spell_gen_leeching_swarm();
new spell_gen_parachute();
new spell_gen_pet_summoned();
new spell_gen_remove_flight_auras();
- new spell_gen_trick();
- new spell_gen_trick_or_treat();
new spell_creature_permanent_feign_death();
new spell_pvp_trinket_wotf_shared_cd();
new spell_gen_animal_blood();
@@ -3381,4 +3261,5 @@ void AddSC_generic_spell_scripts()
new spell_gen_upper_deck_create_foam_sword();
new spell_gen_bonked();
new spell_gen_gift_of_naaru();
+ new spell_gen_replenishment();
}
diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp
index 5b1cbe0c36a..40cef99048f 100644
--- a/src/server/scripts/Spells/spell_holiday.cpp
+++ b/src/server/scripts/Spells/spell_holiday.cpp
@@ -110,7 +110,241 @@ class spell_love_is_in_the_air_romantic_picnic : public SpellScriptLoader
}
};
+// 24750 Trick
+enum TrickSpells
+{
+ SPELL_PIRATE_COSTUME_MALE = 24708,
+ SPELL_PIRATE_COSTUME_FEMALE = 24709,
+ SPELL_NINJA_COSTUME_MALE = 24710,
+ SPELL_NINJA_COSTUME_FEMALE = 24711,
+ SPELL_LEPER_GNOME_COSTUME_MALE = 24712,
+ SPELL_LEPER_GNOME_COSTUME_FEMALE = 24713,
+ SPELL_SKELETON_COSTUME = 24723,
+ SPELL_GHOST_COSTUME_MALE = 24735,
+ SPELL_GHOST_COSTUME_FEMALE = 24736,
+ SPELL_TRICK_BUFF = 24753,
+};
+
+class spell_hallow_end_trick : public SpellScriptLoader
+{
+ public:
+ spell_hallow_end_trick() : SpellScriptLoader("spell_hallow_end_trick") { }
+
+ class spell_hallow_end_trick_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_hallow_end_trick_SpellScript);
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_MALE)
+ || !sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_FEMALE)
+ || !sSpellMgr->GetSpellInfo(SPELL_SKELETON_COSTUME) || !sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_TRICK_BUFF))
+ return false;
+ return true;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (Player* target = GetHitPlayer())
+ {
+ uint8 gender = target->getGender();
+ uint32 spellId = SPELL_TRICK_BUFF;
+ switch (urand(0, 5))
+ {
+ case 1:
+ spellId = gender ? SPELL_LEPER_GNOME_COSTUME_FEMALE : SPELL_LEPER_GNOME_COSTUME_MALE;
+ break;
+ case 2:
+ spellId = gender ? SPELL_PIRATE_COSTUME_FEMALE : SPELL_PIRATE_COSTUME_MALE;
+ break;
+ case 3:
+ spellId = gender ? SPELL_GHOST_COSTUME_FEMALE : SPELL_GHOST_COSTUME_MALE;
+ break;
+ case 4:
+ spellId = gender ? SPELL_NINJA_COSTUME_FEMALE : SPELL_NINJA_COSTUME_MALE;
+ break;
+ case 5:
+ spellId = SPELL_SKELETON_COSTUME;
+ break;
+ default:
+ break;
+ }
+
+ caster->CastSpell(target, spellId, true, NULL);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_hallow_end_trick_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_hallow_end_trick_SpellScript();
+ }
+};
+
+// 24751 Trick or Treat
+enum TrickOrTreatSpells
+{
+ SPELL_TRICK = 24714,
+ SPELL_TREAT = 24715,
+ SPELL_TRICKED_OR_TREATED = 24755,
+ SPELL_TRICKY_TREAT_SPEED = 42919,
+ SPELL_TRICKY_TREAT_TRIGGER = 42965,
+ SPELL_UPSET_TUMMY = 42966
+};
+
+class spell_hallow_end_trick_or_treat : public SpellScriptLoader
+{
+ public:
+ spell_hallow_end_trick_or_treat() : SpellScriptLoader("spell_hallow_end_trick_or_treat") {}
+
+ class spell_hallow_end_trick_or_treat_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_hallow_end_trick_or_treat_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_TRICK) || !sSpellMgr->GetSpellInfo(SPELL_TREAT) || !sSpellMgr->GetSpellInfo(SPELL_TRICKED_OR_TREATED))
+ return false;
+ return true;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (Player* target = GetHitPlayer())
+ {
+ caster->CastSpell(target, roll_chance_i(50) ? SPELL_TRICK : SPELL_TREAT, true, NULL);
+ caster->CastSpell(target, SPELL_TRICKED_OR_TREATED, true, NULL);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_hallow_end_trick_or_treat_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_hallow_end_trick_or_treat_SpellScript();
+ }
+};
+
+class spell_hallow_end_tricky_treat : public SpellScriptLoader
+{
+ public:
+ spell_hallow_end_tricky_treat() : SpellScriptLoader("spell_hallow_end_tricky_treat") { }
+
+ class spell_hallow_end_tricky_treat_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_hallow_end_tricky_treat_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_TRICKY_TREAT_SPEED))
+ return false;
+ if (!sSpellMgr->GetSpellInfo(SPELL_TRICKY_TREAT_TRIGGER))
+ return false;
+ if (!sSpellMgr->GetSpellInfo(SPELL_UPSET_TUMMY))
+ return false;
+ return true;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (caster->HasAura(SPELL_TRICKY_TREAT_TRIGGER) && caster->GetAuraCount(SPELL_TRICKY_TREAT_SPEED) > 3 && roll_chance_i(33))
+ caster->CastSpell(caster, SPELL_UPSET_TUMMY, true);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_hallow_end_tricky_treat_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_hallow_end_tricky_treat_SpellScript();
+ }
+};
+
+enum Mistletoe
+{
+ SPELL_CREATE_MISTLETOE = 26206,
+ SPELL_CREATE_HOLLY = 26207,
+ SPELL_CREATE_SNOWFLAKES = 45036
+};
+
+class spell_winter_veil_mistletoe : public SpellScriptLoader
+{
+ public:
+ spell_winter_veil_mistletoe() : SpellScriptLoader("spell_winter_veil_mistletoe") { }
+
+ class spell_winter_veil_mistletoe_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_winter_veil_mistletoe_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_CREATE_MISTLETOE) ||
+ !sSpellMgr->GetSpellInfo(SPELL_CREATE_HOLLY) ||
+ !sSpellMgr->GetSpellInfo(SPELL_CREATE_SNOWFLAKES))
+ return false;
+ return true;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+
+ if (Player* target = GetHitPlayer())
+ {
+ uint32 spellId = 0;
+ switch (urand(0, 2))
+ {
+ case 0:
+ spellId = SPELL_CREATE_MISTLETOE;
+ break;
+ case 1:
+ spellId = SPELL_CREATE_HOLLY;
+ break;
+ case 2:
+ spellId = SPELL_CREATE_SNOWFLAKES;
+ break;
+ default:
+ return;
+ }
+
+ caster->CastSpell(target, spellId, true);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_winter_veil_mistletoe_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_winter_veil_mistletoe_SpellScript();
+ }
+};
+
void AddSC_holiday_spell_scripts()
{
+ // Love is in the Air
new spell_love_is_in_the_air_romantic_picnic();
+ // Hallow's End
+ new spell_hallow_end_trick();
+ new spell_hallow_end_trick_or_treat();
+ new spell_hallow_end_tricky_treat();
+ // Winter Veil
+ new spell_winter_veil_mistletoe();
}
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index a73af6892ca..a5122ff5f08 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -706,6 +706,36 @@ class spell_hun_tame_beast : public SpellScriptLoader
}
};
+class spell_hun_target_only_pet_and_owner : public SpellScriptLoader
+{
+ public:
+ spell_hun_target_only_pet_and_owner() : SpellScriptLoader("spell_hun_target_only_pet_and_owner") { }
+
+ class spell_hun_target_only_pet_and_owner_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_hun_target_only_pet_and_owner_SpellScript);
+
+ void FilterTargets(std::list<WorldObject*>& targets)
+ {
+ targets.clear();
+ targets.push_back(GetCaster());
+ if (Unit* owner = GetCaster()->GetOwner())
+ targets.push_back(owner);
+ }
+
+ void Register()
+ {
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_target_only_pet_and_owner_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_PARTY);
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_target_only_pet_and_owner_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_CASTER_AREA_PARTY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_hun_target_only_pet_and_owner_SpellScript();
+ }
+};
+
void AddSC_hunter_spell_scripts()
{
new spell_hun_aspect_of_the_beast();
@@ -722,4 +752,5 @@ void AddSC_hunter_spell_scripts()
new spell_hun_misdirection_proc();
new spell_hun_disengage();
new spell_hun_tame_beast();
+ new spell_hun_target_only_pet_and_owner();
}
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index a15eb7ddc2c..2feb6e2b6ef 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -376,14 +376,14 @@ class spell_pri_vampiric_touch : public SpellScriptLoader
}
};
-class spell_priest_renew : public SpellScriptLoader
+class spell_pri_renew : public SpellScriptLoader
{
public:
- spell_priest_renew() : SpellScriptLoader("spell_priest_renew") { }
+ spell_pri_renew() : SpellScriptLoader("spell_pri_renew") { }
- class spell_priest_renew_AuraScript : public AuraScript
+ class spell_pri_renew_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_priest_renew_AuraScript);
+ PrepareAuraScript(spell_pri_renew_AuraScript);
bool Load()
{
@@ -408,13 +408,13 @@ class spell_priest_renew : public SpellScriptLoader
void Register()
{
- OnEffectApply += AuraEffectApplyFn(spell_priest_renew_AuraScript::HandleApplyEffect, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
+ OnEffectApply += AuraEffectApplyFn(spell_pri_renew_AuraScript::HandleApplyEffect, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
}
};
AuraScript* GetAuraScript() const
{
- return new spell_priest_renew_AuraScript();
+ return new spell_pri_renew_AuraScript();
}
};
@@ -460,6 +460,6 @@ void AddSC_priest_spell_scripts()
new spell_pri_mind_sear();
new spell_pri_prayer_of_mending_heal();
new spell_pri_vampiric_touch();
- new spell_priest_renew();
+ new spell_pri_renew();
new spell_pri_shadow_word_death();
}
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index da80ec8f1da..58b6fca8a81 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -1432,7 +1432,7 @@ class spell_q11010_q11102_q11023_choose_loc : public SpellScriptLoader
Unit* caster = GetCaster();
// Check for player that is in 65 y range
std::list<Player*> playerList;
- Trinity::AnyPlayerInObjectRangeCheck checker(caster, 765.0f);
+ Trinity::AnyPlayerInObjectRangeCheck checker(caster, 65.0f);
Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(caster, playerList, checker);
caster->VisitNearbyWorldObject(65.0f, searcher);
for (std::list<Player*>::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr)
diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp
index 178df2078f8..178df2078f8 100755..100644
--- a/src/server/scripts/World/achievement_scripts.cpp
+++ b/src/server/scripts/World/achievement_scripts.cpp
diff --git a/src/server/scripts/World/chat_log.cpp b/src/server/scripts/World/chat_log.cpp
index 236436b229b..236436b229b 100755..100644
--- a/src/server/scripts/World/chat_log.cpp
+++ b/src/server/scripts/World/chat_log.cpp
diff --git a/src/server/scripts/World/guards.cpp b/src/server/scripts/World/guards.cpp
index 951c0ed9688..8fc63a1eacf 100644
--- a/src/server/scripts/World/guards.cpp
+++ b/src/server/scripts/World/guards.cpp
@@ -39,9 +39,7 @@ enum GuardGeneric
{
GENERIC_CREATURE_COOLDOWN = 5000,
- SAY_GUARD_SIL_AGGRO1 = -1070001,
- SAY_GUARD_SIL_AGGRO2 = -1070002,
- SAY_GUARD_SIL_AGGRO3 = -1070003,
+ SAY_GUARD_SIL_AGGRO = 0,
NPC_CENARION_HOLD_INFANTRY = 15184,
NPC_STORMWIND_CITY_GUARD = 68,
@@ -67,7 +65,7 @@ public:
void EnterCombat(Unit* who)
{
if (me->GetEntry() == NPC_CENARION_HOLD_INFANTRY)
- DoScriptText(RAND(SAY_GUARD_SIL_AGGRO1, SAY_GUARD_SIL_AGGRO2, SAY_GUARD_SIL_AGGRO3), me, who);
+ Talk(SAY_GUARD_SIL_AGGRO, who->GetGUID());
if (SpellInfo const* spell = me->reachWithSpellAttack(who))
DoCast(who, spell->Id);
}
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index 4e0818c7c82..4524a3a9374 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -785,7 +785,7 @@ enum eEngineeringTrinkets
SPELL_TO_TOSHLEY = 36955,
};
-#define GOSSIP_ITEM_ZAP "[PH] Unknown"
+#define GOSSIP_ITEM_ZAP "This Dimensional Imploder sounds dangerous! How can I make one?"
#define GOSSIP_ITEM_JHORDY "I must build a beacon for this marvelous device!"
#define GOSSIP_ITEM_KABLAM "[PH] Unknown"
@@ -819,7 +819,7 @@ public:
switch (creature->GetEntry())
{
case NPC_ZAP:
- canLearn = CanLearn(player, 7249, 0, 260, S_GOBLIN, SPELL_TO_EVERLOOK, npcTextId);
+ canLearn = CanLearn(player, 6092, 0, 260, S_GOBLIN, SPELL_TO_EVERLOOK, npcTextId);
if (canLearn)
gossipItem = GOSSIP_ITEM_ZAP;
break;
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index b38530b2a4a..36657dc76c3 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -313,12 +313,16 @@ public:
# npc_chicken_cluck
#########*/
-#define EMOTE_HELLO -1070004
-#define EMOTE_CLUCK_TEXT -1070006
+enum ChickenCluck
+{
+ EMOTE_HELLO_A = 0,
+ EMOTE_HELLO_H = 1,
+ EMOTE_CLUCK_TEXT = 2,
-#define QUEST_CLUCK 3861
-#define FACTION_FRIENDLY 35
-#define FACTION_CHICKEN 31
+ QUEST_CLUCK = 3861,
+ FACTION_FRIENDLY = 35,
+ FACTION_CHICKEN = 31
+};
class npc_chicken_cluck : public CreatureScript
{
@@ -367,7 +371,7 @@ public:
{
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
me->setFaction(FACTION_FRIENDLY);
- DoScriptText(EMOTE_HELLO, me);
+ Talk(player->GetTeam() == HORDE ? EMOTE_HELLO_H : EMOTE_HELLO_A);
}
break;
case TEXT_EMOTE_CHEER:
@@ -375,7 +379,7 @@ public:
{
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
me->setFaction(FACTION_FRIENDLY);
- DoScriptText(EMOTE_CLUCK_TEXT, me);
+ Talk(EMOTE_CLUCK_TEXT);
}
break;
}
@@ -500,15 +504,15 @@ public:
## Triage quest
######*/
-//signed for 9623
-#define SAY_DOC1 -1000201
-#define SAY_DOC2 -1000202
-#define SAY_DOC3 -1000203
+enum Doctor
+{
+ SAY_DOC = 0,
-#define DOCTOR_ALLIANCE 12939
-#define DOCTOR_HORDE 12920
-#define ALLIANCE_COORDS 7
-#define HORDE_COORDS 6
+ DOCTOR_ALLIANCE = 12939,
+ DOCTOR_HORDE = 12920,
+ ALLIANCE_COORDS = 7,
+ HORDE_COORDS = 6
+};
struct Location
{
@@ -773,7 +777,7 @@ public:
//stand up
me->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_STAND);
- DoScriptText(RAND(SAY_DOC1, SAY_DOC2, SAY_DOC3), me);
+ Talk(SAY_DOC);
uint32 mobId = me->GetEntry();
me->SetWalk(false);
@@ -879,7 +883,7 @@ void npc_doctor::npc_doctorAI::UpdateAI(uint32 const diff)
//TODO: get text for each NPC
-enum eGarments
+enum Garments
{
SPELL_LESSER_HEAL_R2 = 2052,
SPELL_FORTITUDE_R1 = 1243,
@@ -896,18 +900,10 @@ enum eGarments
ENTRY_KORJA = 12430,
ENTRY_DG_KEL = 12428,
- //used by 12429, 12423, 12427, 12430, 12428, but signed for 12429
- SAY_COMMON_HEALED = -1000164,
- SAY_DG_KEL_THANKS = -1000165,
- SAY_DG_KEL_GOODBYE = -1000166,
- SAY_ROBERTS_THANKS = -1000167,
- SAY_ROBERTS_GOODBYE = -1000168,
- SAY_KORJA_THANKS = -1000169,
- SAY_KORJA_GOODBYE = -1000170,
- SAY_DOLF_THANKS = -1000171,
- SAY_DOLF_GOODBYE = -1000172,
- SAY_SHAYA_THANKS = -1000173,
- SAY_SHAYA_GOODBYE = -1000174, //signed for 21469
+ // used by 12429, 12423, 12427, 12430, 12428, but signed for 12429
+ SAY_THANKS = 0,
+ SAY_GOODBYE = 1,
+ SAY_HEALED = 2,
};
class npc_garments_of_quests : public CreatureScript
@@ -917,7 +913,10 @@ public:
struct npc_garments_of_questsAI : public npc_escortAI
{
- npc_garments_of_questsAI(Creature* creature) : npc_escortAI(creature) {Reset();}
+ npc_garments_of_questsAI(Creature* creature) : npc_escortAI(creature)
+ {
+ Reset();
+ }
uint64 CasterGUID;
@@ -936,15 +935,15 @@ public:
RunAwayTimer = 5000;
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- //expect database to have RegenHealth=0
+ // expect database to have RegenHealth=0
me->SetHealth(me->CountPctFromMaxHealth(70));
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) { }
- void SpellHit(Unit* caster, SpellInfo const* Spell)
+ void SpellHit(Unit* caster, SpellInfo const* spell)
{
- if (Spell->Id == SPELL_LESSER_HEAL_R2 || Spell->Id == SPELL_FORTITUDE_R1)
+ if (spell->Id == SPELL_LESSER_HEAL_R2 || spell->Id == SPELL_FORTITUDE_R1)
{
//not while in combat
if (me->isInCombat())
@@ -961,16 +960,16 @@ public:
case ENTRY_SHAYA:
if (player->GetQuestStatus(QUEST_MOON) == QUEST_STATUS_INCOMPLETE)
{
- if (IsHealed && !CanRun && Spell->Id == SPELL_FORTITUDE_R1)
+ if (IsHealed && !CanRun && spell->Id == SPELL_FORTITUDE_R1)
{
- DoScriptText(SAY_SHAYA_THANKS, me, caster);
+ Talk(SAY_THANKS, caster->GetGUID());
CanRun = true;
}
- else if (!IsHealed && Spell->Id == SPELL_LESSER_HEAL_R2)
+ else if (!IsHealed && spell->Id == SPELL_LESSER_HEAL_R2)
{
CasterGUID = caster->GetGUID();
me->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_COMMON_HEALED, me, caster);
+ Talk(SAY_HEALED, caster->GetGUID());
IsHealed = true;
}
}
@@ -978,16 +977,16 @@ public:
case ENTRY_ROBERTS:
if (player->GetQuestStatus(QUEST_LIGHT_1) == QUEST_STATUS_INCOMPLETE)
{
- if (IsHealed && !CanRun && Spell->Id == SPELL_FORTITUDE_R1)
+ if (IsHealed && !CanRun && spell->Id == SPELL_FORTITUDE_R1)
{
- DoScriptText(SAY_ROBERTS_THANKS, me, caster);
+ Talk(SAY_THANKS, caster->GetGUID());
CanRun = true;
}
- else if (!IsHealed && Spell->Id == SPELL_LESSER_HEAL_R2)
+ else if (!IsHealed && spell->Id == SPELL_LESSER_HEAL_R2)
{
CasterGUID = caster->GetGUID();
me->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_COMMON_HEALED, me, caster);
+ Talk(SAY_HEALED, caster->GetGUID());
IsHealed = true;
}
}
@@ -995,16 +994,16 @@ public:
case ENTRY_DOLF:
if (player->GetQuestStatus(QUEST_LIGHT_2) == QUEST_STATUS_INCOMPLETE)
{
- if (IsHealed && !CanRun && Spell->Id == SPELL_FORTITUDE_R1)
+ if (IsHealed && !CanRun && spell->Id == SPELL_FORTITUDE_R1)
{
- DoScriptText(SAY_DOLF_THANKS, me, caster);
+ Talk(SAY_THANKS, caster->GetGUID());
CanRun = true;
}
- else if (!IsHealed && Spell->Id == SPELL_LESSER_HEAL_R2)
+ else if (!IsHealed && spell->Id == SPELL_LESSER_HEAL_R2)
{
CasterGUID = caster->GetGUID();
me->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_COMMON_HEALED, me, caster);
+ Talk(SAY_HEALED, caster->GetGUID());
IsHealed = true;
}
}
@@ -1012,16 +1011,16 @@ public:
case ENTRY_KORJA:
if (player->GetQuestStatus(QUEST_SPIRIT) == QUEST_STATUS_INCOMPLETE)
{
- if (IsHealed && !CanRun && Spell->Id == SPELL_FORTITUDE_R1)
+ if (IsHealed && !CanRun && spell->Id == SPELL_FORTITUDE_R1)
{
- DoScriptText(SAY_KORJA_THANKS, me, caster);
+ Talk(SAY_THANKS, caster->GetGUID());
CanRun = true;
}
- else if (!IsHealed && Spell->Id == SPELL_LESSER_HEAL_R2)
+ else if (!IsHealed && spell->Id == SPELL_LESSER_HEAL_R2)
{
CasterGUID = caster->GetGUID();
me->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_COMMON_HEALED, me, caster);
+ Talk(SAY_HEALED, caster->GetGUID());
IsHealed = true;
}
}
@@ -1029,23 +1028,23 @@ public:
case ENTRY_DG_KEL:
if (player->GetQuestStatus(QUEST_DARKNESS) == QUEST_STATUS_INCOMPLETE)
{
- if (IsHealed && !CanRun && Spell->Id == SPELL_FORTITUDE_R1)
+ if (IsHealed && !CanRun && spell->Id == SPELL_FORTITUDE_R1)
{
- DoScriptText(SAY_DG_KEL_THANKS, me, caster);
+ Talk(SAY_THANKS, caster->GetGUID());
CanRun = true;
}
- else if (!IsHealed && Spell->Id == SPELL_LESSER_HEAL_R2)
+ else if (!IsHealed && spell->Id == SPELL_LESSER_HEAL_R2)
{
CasterGUID = caster->GetGUID();
me->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(SAY_COMMON_HEALED, me, caster);
+ Talk(SAY_HEALED, caster->GetGUID());
IsHealed = true;
}
}
break;
}
- //give quest credit, not expect any special quest objectives
+ // give quest credit, not expect any special quest objectives
if (CanRun)
player->TalkedToCreature(me->GetEntry(), me->GetGUID());
}
@@ -1068,19 +1067,19 @@ public:
switch (me->GetEntry())
{
case ENTRY_SHAYA:
- DoScriptText(SAY_SHAYA_GOODBYE, me, unit);
+ Talk(SAY_GOODBYE, unit->GetGUID());
break;
case ENTRY_ROBERTS:
- DoScriptText(SAY_ROBERTS_GOODBYE, me, unit);
+ Talk(SAY_GOODBYE, unit->GetGUID());
break;
case ENTRY_DOLF:
- DoScriptText(SAY_DOLF_GOODBYE, me, unit);
+ Talk(SAY_GOODBYE, unit->GetGUID());
break;
case ENTRY_KORJA:
- DoScriptText(SAY_KORJA_GOODBYE, me, unit);
+ Talk(SAY_GOODBYE, unit->GetGUID());
break;
case ENTRY_DG_KEL:
- DoScriptText(SAY_DG_KEL_GOODBYE, me, unit);
+ Talk(SAY_GOODBYE, unit->GetGUID());
break;
}
@@ -1587,49 +1586,6 @@ public:
}
};
-/*####
-## npc_winter_reveler
-####*/
-
-enum WinterReveler
-{
- SPELL_MISTLETOE_DEBUFF = 26218,
- SPELL_CREATE_MISTLETOE = 26206,
- SPELL_CREATE_HOLLY = 26207,
- SPELL_CREATE_SNOWFLAKES = 45036,
-};
-
-class npc_winter_reveler : public CreatureScript
-{
- public:
- npc_winter_reveler() : CreatureScript("npc_winter_reveler") { }
-
- struct npc_winter_revelerAI : public ScriptedAI
- {
- npc_winter_revelerAI(Creature* creature) : ScriptedAI(creature) {}
-
- void ReceiveEmote(Player* player, uint32 emote)
- {
- if (player->HasAura(SPELL_MISTLETOE_DEBUFF))
- return;
-
- if (!IsHolidayActive(HOLIDAY_FEAST_OF_WINTER_VEIL))
- return;
-
- if (emote == TEXT_EMOTE_KISS)
- {
- uint32 spellId = RAND<uint32>(SPELL_CREATE_MISTLETOE, SPELL_CREATE_HOLLY, SPELL_CREATE_SNOWFLAKES);
- me->CastSpell(player, spellId, false);
- me->CastSpell(player, SPELL_MISTLETOE_DEBUFF, false);
- }
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new npc_winter_revelerAI(creature);
- }
-};
/*####
## npc_snake_trap_serpents
@@ -2951,7 +2907,7 @@ public:
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
}
- void EnterCombat(Unit * /*who*/) { }
+ void EnterCombat(Unit* /*who*/) { }
void DoAction(const int32 /*param*/)
{
@@ -3040,7 +2996,6 @@ void AddSC_npcs_special()
new npc_sayge();
new npc_steam_tonk();
new npc_tonk_mine();
- new npc_winter_reveler();
new npc_brewfest_reveler();
new npc_snake_trap();
new npc_mirror_image();
diff --git a/src/server/shared/Common.cpp b/src/server/shared/Common.cpp
index 88e7d5a76fc..88e7d5a76fc 100755..100644
--- a/src/server/shared/Common.cpp
+++ b/src/server/shared/Common.cpp
diff --git a/src/server/shared/Common.h b/src/server/shared/Common.h
index ad0e6dd6437..ad0e6dd6437 100755..100644
--- a/src/server/shared/Common.h
+++ b/src/server/shared/Common.h
diff --git a/src/server/shared/CompilerDefs.h b/src/server/shared/CompilerDefs.h
index b8be66d928f..b8be66d928f 100755..100644
--- a/src/server/shared/CompilerDefs.h
+++ b/src/server/shared/CompilerDefs.h
diff --git a/src/server/shared/Configuration/Config.cpp b/src/server/shared/Configuration/Config.cpp
index e0df22b88ae..e0df22b88ae 100755..100644
--- a/src/server/shared/Configuration/Config.cpp
+++ b/src/server/shared/Configuration/Config.cpp
diff --git a/src/server/shared/Configuration/Config.h b/src/server/shared/Configuration/Config.h
index 82e4d9bcce0..82e4d9bcce0 100755..100644
--- a/src/server/shared/Configuration/Config.h
+++ b/src/server/shared/Configuration/Config.h
diff --git a/src/server/shared/Cryptography/ARC4.cpp b/src/server/shared/Cryptography/ARC4.cpp
index 5b2cf7a0a93..5b2cf7a0a93 100755..100644
--- a/src/server/shared/Cryptography/ARC4.cpp
+++ b/src/server/shared/Cryptography/ARC4.cpp
diff --git a/src/server/shared/Cryptography/ARC4.h b/src/server/shared/Cryptography/ARC4.h
index 541135e52f2..541135e52f2 100755..100644
--- a/src/server/shared/Cryptography/ARC4.h
+++ b/src/server/shared/Cryptography/ARC4.h
diff --git a/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp b/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp
index 5b4ffabd4f6..5b4ffabd4f6 100755..100644
--- a/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp
+++ b/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp
diff --git a/src/server/shared/Cryptography/Authentication/AuthCrypt.h b/src/server/shared/Cryptography/Authentication/AuthCrypt.h
index b40ce8ac40c..b40ce8ac40c 100755..100644
--- a/src/server/shared/Cryptography/Authentication/AuthCrypt.h
+++ b/src/server/shared/Cryptography/Authentication/AuthCrypt.h
diff --git a/src/server/shared/Cryptography/BigNumber.cpp b/src/server/shared/Cryptography/BigNumber.cpp
index def0a7fd02e..def0a7fd02e 100755..100644
--- a/src/server/shared/Cryptography/BigNumber.cpp
+++ b/src/server/shared/Cryptography/BigNumber.cpp
diff --git a/src/server/shared/Cryptography/BigNumber.h b/src/server/shared/Cryptography/BigNumber.h
index 36a618056a5..36a618056a5 100755..100644
--- a/src/server/shared/Cryptography/BigNumber.h
+++ b/src/server/shared/Cryptography/BigNumber.h
diff --git a/src/server/shared/Cryptography/HMACSHA1.cpp b/src/server/shared/Cryptography/HMACSHA1.cpp
index c9de1191464..c9de1191464 100755..100644
--- a/src/server/shared/Cryptography/HMACSHA1.cpp
+++ b/src/server/shared/Cryptography/HMACSHA1.cpp
diff --git a/src/server/shared/Cryptography/HMACSHA1.h b/src/server/shared/Cryptography/HMACSHA1.h
index 4b7667968ca..4b7667968ca 100755..100644
--- a/src/server/shared/Cryptography/HMACSHA1.h
+++ b/src/server/shared/Cryptography/HMACSHA1.h
diff --git a/src/server/shared/Cryptography/SHA1.cpp b/src/server/shared/Cryptography/SHA1.cpp
index 2af8e4d4cbe..2af8e4d4cbe 100755..100644
--- a/src/server/shared/Cryptography/SHA1.cpp
+++ b/src/server/shared/Cryptography/SHA1.cpp
diff --git a/src/server/shared/Cryptography/SHA1.h b/src/server/shared/Cryptography/SHA1.h
index 7c77defebfa..7c77defebfa 100755..100644
--- a/src/server/shared/Cryptography/SHA1.h
+++ b/src/server/shared/Cryptography/SHA1.h
diff --git a/src/server/shared/DataStores/DBCFileLoader.cpp b/src/server/shared/DataStores/DBCFileLoader.cpp
index 6f78ce5a02d..6f78ce5a02d 100755..100644
--- a/src/server/shared/DataStores/DBCFileLoader.cpp
+++ b/src/server/shared/DataStores/DBCFileLoader.cpp
diff --git a/src/server/shared/DataStores/DBCFileLoader.h b/src/server/shared/DataStores/DBCFileLoader.h
index eb8317fbefd..eb8317fbefd 100755..100644
--- a/src/server/shared/DataStores/DBCFileLoader.h
+++ b/src/server/shared/DataStores/DBCFileLoader.h
diff --git a/src/server/shared/DataStores/DBCStore.h b/src/server/shared/DataStores/DBCStore.h
index 9965a5c1d71..e872ead35db 100755..100644
--- a/src/server/shared/DataStores/DBCStore.h
+++ b/src/server/shared/DataStores/DBCStore.h
@@ -117,7 +117,7 @@ class DBCStorage
// Check if sql index pos is valid
if (int32(result->GetFieldCount()-1) < sql->sqlIndexPos)
{
- sLog->outError(LOG_FILTER_GENERAL, "Invalid index pos for dbc:'%s'", sql->sqlTableName.c_str());
+ sLog->outError(LOG_FILTER_SERVER_LOADING, "Invalid index pos for dbc:'%s'", sql->sqlTableName.c_str());
return false;
}
}
@@ -148,7 +148,7 @@ class DBCStorage
uint32 id = fields[sql->sqlIndexPos].GetUInt32();
if (indexTable.asT[id])
{
- sLog->outError(LOG_FILTER_GENERAL, "Index %d already exists in dbc:'%s'", id, sql->sqlTableName.c_str());
+ sLog->outError(LOG_FILTER_SERVER_LOADING, "Index %d already exists in dbc:'%s'", id, sql->sqlTableName.c_str());
return false;
}
indexTable.asT[id]=(T*)&sqlDataTable[offset];
@@ -203,7 +203,7 @@ class DBCStorage
offset+=1;
break;
case FT_STRING:
- sLog->outError(LOG_FILTER_GENERAL, "Unsupported data type in table '%s' at char %d", sql->sqlTableName.c_str(), columnNumber);
+ sLog->outError(LOG_FILTER_SERVER_LOADING, "Unsupported data type in table '%s' at char %d", sql->sqlTableName.c_str(), columnNumber);
return false;
case FT_SORT:
break;
@@ -215,13 +215,13 @@ class DBCStorage
}
else
{
- sLog->outError(LOG_FILTER_GENERAL, "Incorrect sql format string '%s' at char %d", sql->sqlTableName.c_str(), columnNumber);
+ sLog->outError(LOG_FILTER_SERVER_LOADING, "Incorrect sql format string '%s' at char %d", sql->sqlTableName.c_str(), columnNumber);
return false;
}
}
if (sqlColumnNumber != (result->GetFieldCount()-1))
{
- sLog->outError(LOG_FILTER_GENERAL, "SQL and DBC format strings are not matching for table: '%s'", sql->sqlTableName.c_str());
+ sLog->outError(LOG_FILTER_SERVER_LOADING, "SQL and DBC format strings are not matching for table: '%s'", sql->sqlTableName.c_str());
return false;
}
diff --git a/src/server/shared/Database/AdhocStatement.cpp b/src/server/shared/Database/AdhocStatement.cpp
index 95dce77e53c..95dce77e53c 100755..100644
--- a/src/server/shared/Database/AdhocStatement.cpp
+++ b/src/server/shared/Database/AdhocStatement.cpp
diff --git a/src/server/shared/Database/AdhocStatement.h b/src/server/shared/Database/AdhocStatement.h
index e17a85e7466..e17a85e7466 100755..100644
--- a/src/server/shared/Database/AdhocStatement.h
+++ b/src/server/shared/Database/AdhocStatement.h
diff --git a/src/server/shared/Database/DatabaseEnv.h b/src/server/shared/Database/DatabaseEnv.h
index 13b900d8392..13b900d8392 100755..100644
--- a/src/server/shared/Database/DatabaseEnv.h
+++ b/src/server/shared/Database/DatabaseEnv.h
diff --git a/src/server/shared/Database/DatabaseWorker.h b/src/server/shared/Database/DatabaseWorker.h
index c01a9c1bc3c..c01a9c1bc3c 100755..100644
--- a/src/server/shared/Database/DatabaseWorker.h
+++ b/src/server/shared/Database/DatabaseWorker.h
diff --git a/src/server/shared/Database/DatabaseWorkerPool.h b/src/server/shared/Database/DatabaseWorkerPool.h
index a0816686734..a0816686734 100755..100644
--- a/src/server/shared/Database/DatabaseWorkerPool.h
+++ b/src/server/shared/Database/DatabaseWorkerPool.h
diff --git a/src/server/shared/Database/Field.cpp b/src/server/shared/Database/Field.cpp
index 3ea153bdc0c..3ea153bdc0c 100755..100644
--- a/src/server/shared/Database/Field.cpp
+++ b/src/server/shared/Database/Field.cpp
diff --git a/src/server/shared/Database/Field.h b/src/server/shared/Database/Field.h
index 61e8fb7ccef..61e8fb7ccef 100755..100644
--- a/src/server/shared/Database/Field.h
+++ b/src/server/shared/Database/Field.h
diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.cpp b/src/server/shared/Database/Implementation/CharacterDatabase.cpp
index 5210ee6f39d..3ef94f3aafd 100644
--- a/src/server/shared/Database/Implementation/CharacterDatabase.cpp
+++ b/src/server/shared/Database/Implementation/CharacterDatabase.cpp
@@ -54,9 +54,11 @@ void CharacterDatabaseConnection::DoPrepareStatements()
PREPARE_STATEMENT(CHAR_SEL_CHAR_POSITION, "SELECT position_x, position_y, position_z, orientation, map, taxi_path FROM characters WHERE guid = ?", CONNECTION_SYNCH);
PREPARE_STATEMENT(CHAR_DEL_QUEST_STATUS_DAILY, "DELETE FROM character_queststatus_daily", CONNECTION_ASYNC);
PREPARE_STATEMENT(CHAR_DEL_QUEST_STATUS_WEEKLY, "DELETE FROM character_queststatus_weekly", CONNECTION_ASYNC);
+ PREPARE_STATEMENT(CHAR_DEL_QUEST_STATUS_MONTHLY, "DELETE FROM character_queststatus_monthly", CONNECTION_ASYNC);
PREPARE_STATEMENT(CHAR_DEL_QUEST_STATUS_SEASONAL, "DELETE FROM character_queststatus_seasonal WHERE event = ?", CONNECTION_ASYNC);
PREPARE_STATEMENT(CHAR_DEL_QUEST_STATUS_DAILY_CHAR, "DELETE FROM character_queststatus_daily WHERE guid = ?", CONNECTION_ASYNC);
PREPARE_STATEMENT(CHAR_DEL_QUEST_STATUS_WEEKLY_CHAR, "DELETE FROM character_queststatus_weekly WHERE guid = ?", CONNECTION_ASYNC);
+ PREPARE_STATEMENT(CHAR_DEL_QUEST_STATUS_MONTHLY_CHAR, "DELETE FROM character_queststatus_monthly WHERE guid = ?", CONNECTION_ASYNC);
PREPARE_STATEMENT(CHAR_DEL_QUEST_STATUS_SEASONAL_CHAR, "DELETE FROM character_queststatus_seasonal WHERE guid = ?", CONNECTION_ASYNC);
PREPARE_STATEMENT(CHAR_DEL_BATTLEGROUND_RANDOM, "DELETE FROM character_battleground_random", CONNECTION_ASYNC);
PREPARE_STATEMENT(CHAR_INS_BATTLEGROUND_RANDOM, "INSERT INTO character_battleground_random (guid) VALUES (?)", CONNECTION_ASYNC);
@@ -76,9 +78,11 @@ void CharacterDatabaseConnection::DoPrepareStatements()
"itemcount1, itemcount2, itemcount3, itemcount4, playercount FROM character_queststatus WHERE guid = ? AND status <> 0", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_SEL_CHARACTER_DAILYQUESTSTATUS, "SELECT quest, time FROM character_queststatus_daily WHERE guid = ?", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_SEL_CHARACTER_WEEKLYQUESTSTATUS, "SELECT quest FROM character_queststatus_weekly WHERE guid = ?", CONNECTION_ASYNC)
+ PREPARE_STATEMENT(CHAR_SEL_CHARACTER_MONTHLYQUESTSTATUS, "SELECT quest FROM character_queststatus_monthly WHERE guid = ?", CONNECTION_ASYNC);
PREPARE_STATEMENT(CHAR_SEL_CHARACTER_SEASONALQUESTSTATUS, "SELECT quest, event FROM character_queststatus_seasonal WHERE guid = ?", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_INS_CHARACTER_DAILYQUESTSTATUS, "INSERT INTO character_queststatus_daily (guid, quest, time) VALUES (?, ?, ?)", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_INS_CHARACTER_WEEKLYQUESTSTATUS, "INSERT INTO character_queststatus_weekly (guid, quest) VALUES (?, ?)", CONNECTION_ASYNC)
+ PREPARE_STATEMENT(CHAR_INS_CHARACTER_MONTHLYQUESTSTATUS, "INSERT INTO character_queststatus_monthly (guid, quest) VALUES (?, ?)", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_INS_CHARACTER_SEASONALQUESTSTATUS, "INSERT INTO character_queststatus_seasonal (guid, quest, event) VALUES (?, ?, ?)", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_SEL_CHARACTER_REPUTATION, "SELECT faction, standing, flags FROM character_reputation WHERE guid = ?", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_SEL_CHARACTER_INVENTORY, "SELECT creatorGuid, giftCreatorGuid, count, duration, charges, flags, enchantments, randomPropertyId, durability, playedTime, text, bag, slot, "
@@ -140,7 +144,7 @@ void CharacterDatabaseConnection::DoPrepareStatements()
PREPARE_STATEMENT(CHAR_SEL_CHARACTER_GIFT_BY_ITEM, "SELECT entry, flags FROM character_gifts WHERE item_guid = ?", CONNECTION_SYNCH);
PREPARE_STATEMENT(CHAR_SEL_ACCOUNT_BY_NAME, "SELECT account FROM characters WHERE name = ?", CONNECTION_SYNCH)
PREPARE_STATEMENT(CHAR_SEL_ACCOUNT_BY_GUID, "SELECT account FROM characters WHERE guid = ?", CONNECTION_SYNCH);
- PREPARE_STATEMENT(CHAR_SEL_ACCOUNT_NAME_BY_GUID, "SELECT account, name FROM characters WHERE guid = ?", CONNECTION_SYNCH);
+ PREPARE_STATEMENT(CHAR_SEL_CHARACTER_DATA_BY_GUID, "SELECT account, name, level FROM characters WHERE guid = ?", CONNECTION_SYNCH);
PREPARE_STATEMENT(CHAR_DEL_ACCOUNT_INSTANCE_LOCK_TIMES, "DELETE FROM account_instance_times WHERE accountId = ?", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_INS_ACCOUNT_INSTANCE_LOCK_TIMES, "INSERT INTO account_instance_times (accountId, instanceId, releaseTime) VALUES (?, ?, ?)", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_SEL_CHARACTER_NAME_CLASS, "SELECT name, class FROM characters WHERE guid = ?", CONNECTION_SYNCH);
@@ -536,6 +540,15 @@ void CharacterDatabaseConnection::DoPrepareStatements()
PREPARE_STATEMENT(CHAR_DEL_CHAR_ACTION_EXCEPT_SPEC, "DELETE FROM character_action WHERE spec<>? AND guid = ?", CONNECTION_ASYNC);
PREPARE_STATEMENT(CHAR_SEL_CHAR_PET_BY_ENTRY_AND_SLOT, "SELECT id, entry, owner, modelid, level, exp, Reactstate, slot, name, renamed, curhealth, curmana, curhappiness, abdata, savetime, CreatedBySpell, PetType FROM character_pet WHERE owner = ? AND slot = ?", CONNECTION_SYNCH);
+ // Items that hold loot or money
+ PREPARE_STATEMENT(CHAR_SEL_ITEMCONTAINER_ITEMS, "SELECT item_id, item_count, follow_rules, ffa, blocked, counted, under_threshold, needs_quest, rnd_prop, rnd_suffix FROM item_loot_items WHERE container_id = ?", CONNECTION_SYNCH);
+ PREPARE_STATEMENT(CHAR_DEL_ITEMCONTAINER_ITEMS, "DELETE FROM item_loot_items WHERE container_id = ?", CONNECTION_ASYNC);
+ PREPARE_STATEMENT(CHAR_DEL_ITEMCONTAINER_ITEM, "DELETE FROM item_loot_items WHERE container_id = ? AND item_id = ?", CONNECTION_ASYNC);
+ PREPARE_STATEMENT(CHAR_INS_ITEMCONTAINER_ITEMS, "INSERT INTO item_loot_items (container_id, item_id, item_count, follow_rules, ffa, blocked, counted, under_threshold, needs_quest, rnd_prop, rnd_suffix) VALUES (?,?,?,?,?,?,?,?,?,?,?)", CONNECTION_ASYNC);
+ PREPARE_STATEMENT(CHAR_SEL_ITEMCONTAINER_MONEY, "SELECT money FROM item_loot_money WHERE container_id = ?", CONNECTION_SYNCH);
+ PREPARE_STATEMENT(CHAR_DEL_ITEMCONTAINER_MONEY, "DELETE FROM item_loot_money WHERE container_id = ?", CONNECTION_ASYNC);
+ PREPARE_STATEMENT(CHAR_INS_ITEMCONTAINER_MONEY," INSERT INTO item_loot_money (container_id, money) VALUES (?,?)", CONNECTION_ASYNC);
+
// Calendar
PREPARE_STATEMENT(CHAR_REP_CALENDAR_EVENT, "REPLACE INTO calendar_events (id, creator, title, description, type, dungeon, eventtime, flags, time2) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC);
PREPARE_STATEMENT(CHAR_DEL_CALENDAR_EVENT, "DELETE FROM calendar_events WHERE id = ?", CONNECTION_ASYNC);
diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.h b/src/server/shared/Database/Implementation/CharacterDatabase.h
index 7e4fe6a0b0e..d2e69fb0d17 100644
--- a/src/server/shared/Database/Implementation/CharacterDatabase.h
+++ b/src/server/shared/Database/Implementation/CharacterDatabase.h
@@ -74,9 +74,11 @@ enum CharacterDatabaseStatements
CHAR_SEL_CHAR_POSITION,
CHAR_DEL_QUEST_STATUS_DAILY,
CHAR_DEL_QUEST_STATUS_WEEKLY,
+ CHAR_DEL_QUEST_STATUS_MONTHLY,
CHAR_DEL_QUEST_STATUS_SEASONAL,
CHAR_DEL_QUEST_STATUS_DAILY_CHAR,
CHAR_DEL_QUEST_STATUS_WEEKLY_CHAR,
+ CHAR_DEL_QUEST_STATUS_MONTHLY_CHAR,
CHAR_DEL_QUEST_STATUS_SEASONAL_CHAR,
CHAR_DEL_BATTLEGROUND_RANDOM,
CHAR_INS_BATTLEGROUND_RANDOM,
@@ -89,9 +91,11 @@ enum CharacterDatabaseStatements
CHAR_SEL_CHARACTER_QUESTSTATUS,
CHAR_SEL_CHARACTER_DAILYQUESTSTATUS,
CHAR_SEL_CHARACTER_WEEKLYQUESTSTATUS,
+ CHAR_SEL_CHARACTER_MONTHLYQUESTSTATUS,
CHAR_SEL_CHARACTER_SEASONALQUESTSTATUS,
CHAR_INS_CHARACTER_DAILYQUESTSTATUS,
CHAR_INS_CHARACTER_WEEKLYQUESTSTATUS,
+ CHAR_INS_CHARACTER_MONTHLYQUESTSTATUS,
CHAR_INS_CHARACTER_SEASONALQUESTSTATUS,
CHAR_SEL_CHARACTER_REPUTATION,
CHAR_SEL_CHARACTER_INVENTORY,
@@ -157,7 +161,7 @@ enum CharacterDatabaseStatements
CHAR_SEL_CHARACTER_COUNT,
CHAR_UPD_NAME,
CHAR_DEL_DECLINED_NAME,
- CHAR_SEL_ACCOUNT_NAME_BY_GUID,
+ CHAR_SEL_CHARACTER_DATA_BY_GUID,
CHAR_INS_GUILD,
CHAR_DEL_GUILD,
@@ -501,6 +505,14 @@ enum CharacterDatabaseStatements
CHAR_REP_CALENDAR_INVITE,
CHAR_DEL_CALENDAR_INVITE,
+ CHAR_SEL_ITEMCONTAINER_ITEMS,
+ CHAR_DEL_ITEMCONTAINER_ITEMS,
+ CHAR_DEL_ITEMCONTAINER_ITEM,
+ CHAR_INS_ITEMCONTAINER_ITEMS,
+ CHAR_SEL_ITEMCONTAINER_MONEY,
+ CHAR_DEL_ITEMCONTAINER_MONEY,
+ CHAR_INS_ITEMCONTAINER_MONEY,
+
MAX_CHARACTERDATABASE_STATEMENTS
};
diff --git a/src/server/shared/Database/Implementation/LoginDatabase.cpp b/src/server/shared/Database/Implementation/LoginDatabase.cpp
index 31d9f5ec1f6..31d9f5ec1f6 100755..100644
--- a/src/server/shared/Database/Implementation/LoginDatabase.cpp
+++ b/src/server/shared/Database/Implementation/LoginDatabase.cpp
diff --git a/src/server/shared/Database/Implementation/LoginDatabase.h b/src/server/shared/Database/Implementation/LoginDatabase.h
index b4f6713d118..b4f6713d118 100755..100644
--- a/src/server/shared/Database/Implementation/LoginDatabase.h
+++ b/src/server/shared/Database/Implementation/LoginDatabase.h
diff --git a/src/server/shared/Database/Implementation/WorldDatabase.cpp b/src/server/shared/Database/Implementation/WorldDatabase.cpp
index c491852b1bd..c491852b1bd 100755..100644
--- a/src/server/shared/Database/Implementation/WorldDatabase.cpp
+++ b/src/server/shared/Database/Implementation/WorldDatabase.cpp
diff --git a/src/server/shared/Database/Implementation/WorldDatabase.h b/src/server/shared/Database/Implementation/WorldDatabase.h
index 195d2ea8da5..195d2ea8da5 100755..100644
--- a/src/server/shared/Database/Implementation/WorldDatabase.h
+++ b/src/server/shared/Database/Implementation/WorldDatabase.h
diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp
index c6d2a165ca2..c6d2a165ca2 100755..100644
--- a/src/server/shared/Database/MySQLConnection.cpp
+++ b/src/server/shared/Database/MySQLConnection.cpp
diff --git a/src/server/shared/Database/MySQLConnection.h b/src/server/shared/Database/MySQLConnection.h
index b0b79ac0a33..b0b79ac0a33 100755..100644
--- a/src/server/shared/Database/MySQLConnection.h
+++ b/src/server/shared/Database/MySQLConnection.h
diff --git a/src/server/shared/Database/MySQLThreading.h b/src/server/shared/Database/MySQLThreading.h
index 038ec4ee794..038ec4ee794 100755..100644
--- a/src/server/shared/Database/MySQLThreading.h
+++ b/src/server/shared/Database/MySQLThreading.h
diff --git a/src/server/shared/Database/PreparedStatement.cpp b/src/server/shared/Database/PreparedStatement.cpp
index 21aef0f1834..21aef0f1834 100755..100644
--- a/src/server/shared/Database/PreparedStatement.cpp
+++ b/src/server/shared/Database/PreparedStatement.cpp
diff --git a/src/server/shared/Database/PreparedStatement.h b/src/server/shared/Database/PreparedStatement.h
index 90ea435d1f9..90ea435d1f9 100755..100644
--- a/src/server/shared/Database/PreparedStatement.h
+++ b/src/server/shared/Database/PreparedStatement.h
diff --git a/src/server/shared/Database/QueryHolder.cpp b/src/server/shared/Database/QueryHolder.cpp
index ed228c74667..ed228c74667 100755..100644
--- a/src/server/shared/Database/QueryHolder.cpp
+++ b/src/server/shared/Database/QueryHolder.cpp
diff --git a/src/server/shared/Database/QueryHolder.h b/src/server/shared/Database/QueryHolder.h
index 86b3b5955bd..86b3b5955bd 100755..100644
--- a/src/server/shared/Database/QueryHolder.h
+++ b/src/server/shared/Database/QueryHolder.h
diff --git a/src/server/shared/Database/QueryResult.cpp b/src/server/shared/Database/QueryResult.cpp
index cb21c088d00..cb21c088d00 100755..100644
--- a/src/server/shared/Database/QueryResult.cpp
+++ b/src/server/shared/Database/QueryResult.cpp
diff --git a/src/server/shared/Database/QueryResult.h b/src/server/shared/Database/QueryResult.h
index be7fa7b649c..be7fa7b649c 100755..100644
--- a/src/server/shared/Database/QueryResult.h
+++ b/src/server/shared/Database/QueryResult.h
diff --git a/src/server/shared/Database/SQLOperation.h b/src/server/shared/Database/SQLOperation.h
index 401535e39f7..401535e39f7 100755..100644
--- a/src/server/shared/Database/SQLOperation.h
+++ b/src/server/shared/Database/SQLOperation.h
diff --git a/src/server/shared/Database/Transaction.cpp b/src/server/shared/Database/Transaction.cpp
index 5aecda87797..5aecda87797 100755..100644
--- a/src/server/shared/Database/Transaction.cpp
+++ b/src/server/shared/Database/Transaction.cpp
diff --git a/src/server/shared/Database/Transaction.h b/src/server/shared/Database/Transaction.h
index 805d48f76cf..805d48f76cf 100755..100644
--- a/src/server/shared/Database/Transaction.h
+++ b/src/server/shared/Database/Transaction.h
diff --git a/src/server/shared/Debugging/Errors.h b/src/server/shared/Debugging/Errors.h
index 6ce3d926f4c..6ce3d926f4c 100755..100644
--- a/src/server/shared/Debugging/Errors.h
+++ b/src/server/shared/Debugging/Errors.h
diff --git a/src/server/shared/Define.h b/src/server/shared/Define.h
index 0f7c2163b7e..0f7c2163b7e 100755..100644
--- a/src/server/shared/Define.h
+++ b/src/server/shared/Define.h
diff --git a/src/server/shared/Dynamic/FactoryHolder.h b/src/server/shared/Dynamic/FactoryHolder.h
index 830e6d8b67d..830e6d8b67d 100755..100644
--- a/src/server/shared/Dynamic/FactoryHolder.h
+++ b/src/server/shared/Dynamic/FactoryHolder.h
diff --git a/src/server/shared/Dynamic/LinkedList.h b/src/server/shared/Dynamic/LinkedList.h
index 3969e22aa14..3969e22aa14 100755..100644
--- a/src/server/shared/Dynamic/LinkedList.h
+++ b/src/server/shared/Dynamic/LinkedList.h
diff --git a/src/server/shared/Dynamic/LinkedReference/RefManager.h b/src/server/shared/Dynamic/LinkedReference/RefManager.h
index 1c6e6956dbd..1c6e6956dbd 100755..100644
--- a/src/server/shared/Dynamic/LinkedReference/RefManager.h
+++ b/src/server/shared/Dynamic/LinkedReference/RefManager.h
diff --git a/src/server/shared/Dynamic/LinkedReference/Reference.h b/src/server/shared/Dynamic/LinkedReference/Reference.h
index 22921b075fe..22921b075fe 100755..100644
--- a/src/server/shared/Dynamic/LinkedReference/Reference.h
+++ b/src/server/shared/Dynamic/LinkedReference/Reference.h
diff --git a/src/server/shared/Dynamic/ObjectRegistry.h b/src/server/shared/Dynamic/ObjectRegistry.h
index bb3227514a7..bb3227514a7 100755..100644
--- a/src/server/shared/Dynamic/ObjectRegistry.h
+++ b/src/server/shared/Dynamic/ObjectRegistry.h
diff --git a/src/server/shared/Dynamic/TypeContainer.h b/src/server/shared/Dynamic/TypeContainer.h
index 67789d8ff42..67789d8ff42 100755..100644
--- a/src/server/shared/Dynamic/TypeContainer.h
+++ b/src/server/shared/Dynamic/TypeContainer.h
diff --git a/src/server/shared/Dynamic/TypeContainerFunctions.h b/src/server/shared/Dynamic/TypeContainerFunctions.h
index 5011ec1c1be..5011ec1c1be 100755..100644
--- a/src/server/shared/Dynamic/TypeContainerFunctions.h
+++ b/src/server/shared/Dynamic/TypeContainerFunctions.h
diff --git a/src/server/shared/Dynamic/TypeContainerVisitor.h b/src/server/shared/Dynamic/TypeContainerVisitor.h
index 155989f15f6..155989f15f6 100755..100644
--- a/src/server/shared/Dynamic/TypeContainerVisitor.h
+++ b/src/server/shared/Dynamic/TypeContainerVisitor.h
diff --git a/src/server/shared/Dynamic/TypeList.h b/src/server/shared/Dynamic/TypeList.h
index 4967ab0fbc0..4967ab0fbc0 100755..100644
--- a/src/server/shared/Dynamic/TypeList.h
+++ b/src/server/shared/Dynamic/TypeList.h
diff --git a/src/server/shared/Dynamic/UnorderedMap.h b/src/server/shared/Dynamic/UnorderedMap.h
index 5d485efa89b..5d485efa89b 100755..100644
--- a/src/server/shared/Dynamic/UnorderedMap.h
+++ b/src/server/shared/Dynamic/UnorderedMap.h
diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp
index d8914ac8ee0..d8914ac8ee0 100755..100644
--- a/src/server/shared/Logging/Log.cpp
+++ b/src/server/shared/Logging/Log.cpp
diff --git a/src/server/shared/Logging/Log.h b/src/server/shared/Logging/Log.h
index b66e774b527..b66e774b527 100755..100644
--- a/src/server/shared/Logging/Log.h
+++ b/src/server/shared/Logging/Log.h
diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h
index e79544e7315..c03c1a4572a 100755..100644
--- a/src/server/shared/Packets/ByteBuffer.h
+++ b/src/server/shared/Packets/ByteBuffer.h
@@ -52,7 +52,7 @@ class ByteBufferPositionException : public ByteBufferException
{
ACE_Stack_Trace trace;
- sLog->outError(LOG_FILTER_GENERAL, "Attempted to %s value with size: "SIZEFMTD" in ByteBuffer (pos: " SIZEFMTD " size: "SIZEFMTD")\n[Stacktrace: %s]" ,
+ sLog->outError(LOG_FILTER_NETWORKIO, "Attempted to %s value with size: "SIZEFMTD" in ByteBuffer (pos: " SIZEFMTD " size: "SIZEFMTD")\n[Stacktrace: %s]" ,
(_add ? "put" : "get"), ValueSize, Pos, Size, trace.c_str());
}
@@ -74,7 +74,7 @@ class ByteBufferSourceException : public ByteBufferException
{
ACE_Stack_Trace trace;
- sLog->outError(LOG_FILTER_GENERAL, "Attempted to put a %s in ByteBuffer (pos: "SIZEFMTD" size: "SIZEFMTD")\n[Stacktrace: %s]",
+ sLog->outError(LOG_FILTER_NETWORKIO, "Attempted to put a %s in ByteBuffer (pos: "SIZEFMTD" size: "SIZEFMTD")\n[Stacktrace: %s]",
(ValueSize > 0 ? "NULL-pointer" : "zero-sized value"), Pos, Size, trace.c_str());
}
};
diff --git a/src/server/shared/Packets/WorldPacket.h b/src/server/shared/Packets/WorldPacket.h
index 7ab95bc496d..7ab95bc496d 100755..100644
--- a/src/server/shared/Packets/WorldPacket.h
+++ b/src/server/shared/Packets/WorldPacket.h
diff --git a/src/server/shared/SystemConfig.h b/src/server/shared/SystemConfig.h
index 2431ebb7165..2431ebb7165 100755..100644
--- a/src/server/shared/SystemConfig.h
+++ b/src/server/shared/SystemConfig.h
diff --git a/src/server/shared/Threading/Callback.h b/src/server/shared/Threading/Callback.h
index 3e1e7ac692f..3e1e7ac692f 100755..100644
--- a/src/server/shared/Threading/Callback.h
+++ b/src/server/shared/Threading/Callback.h
diff --git a/src/server/shared/Threading/LockedQueue.h b/src/server/shared/Threading/LockedQueue.h
index 7f78dc07db8..7f78dc07db8 100755..100644
--- a/src/server/shared/Threading/LockedQueue.h
+++ b/src/server/shared/Threading/LockedQueue.h
diff --git a/src/server/shared/Threading/Threading.cpp b/src/server/shared/Threading/Threading.cpp
index f31db8fbdcd..f31db8fbdcd 100755..100644
--- a/src/server/shared/Threading/Threading.cpp
+++ b/src/server/shared/Threading/Threading.cpp
diff --git a/src/server/shared/Threading/Threading.h b/src/server/shared/Threading/Threading.h
index 7cc74574873..7cc74574873 100755..100644
--- a/src/server/shared/Threading/Threading.h
+++ b/src/server/shared/Threading/Threading.h
diff --git a/src/server/shared/Utilities/ByteConverter.h b/src/server/shared/Utilities/ByteConverter.h
index 05e8b8cc959..05e8b8cc959 100755..100644
--- a/src/server/shared/Utilities/ByteConverter.h
+++ b/src/server/shared/Utilities/ByteConverter.h
diff --git a/src/server/shared/Utilities/EventProcessor.cpp b/src/server/shared/Utilities/EventProcessor.cpp
index b4f67471323..b4f67471323 100755..100644
--- a/src/server/shared/Utilities/EventProcessor.cpp
+++ b/src/server/shared/Utilities/EventProcessor.cpp
diff --git a/src/server/shared/Utilities/EventProcessor.h b/src/server/shared/Utilities/EventProcessor.h
index 0f1a7c15216..0f1a7c15216 100755..100644
--- a/src/server/shared/Utilities/EventProcessor.h
+++ b/src/server/shared/Utilities/EventProcessor.h
diff --git a/src/server/shared/Utilities/ServiceWin32.cpp b/src/server/shared/Utilities/ServiceWin32.cpp
index 91a78af1adc..390b1a35010 100755..100644
--- a/src/server/shared/Utilities/ServiceWin32.cpp
+++ b/src/server/shared/Utilities/ServiceWin32.cpp
@@ -255,7 +255,7 @@ bool WinServiceRun()
if (!StartServiceCtrlDispatcher(serviceTable))
{
- sLog->outError(LOG_FILTER_GENERAL, "StartService Failed. Error [%u]", ::GetLastError());
+ sLog->outError(LOG_FILTER_WORLDSERVER, "StartService Failed. Error [%u]", ::GetLastError());
return false;
}
return true;
diff --git a/src/server/shared/Utilities/ServiceWin32.h b/src/server/shared/Utilities/ServiceWin32.h
index f810a0e5624..f810a0e5624 100755..100644
--- a/src/server/shared/Utilities/ServiceWin32.h
+++ b/src/server/shared/Utilities/ServiceWin32.h
diff --git a/src/server/shared/Utilities/SignalHandler.h b/src/server/shared/Utilities/SignalHandler.h
index a478c1f58d9..a478c1f58d9 100755..100644
--- a/src/server/shared/Utilities/SignalHandler.h
+++ b/src/server/shared/Utilities/SignalHandler.h
diff --git a/src/server/shared/Utilities/Timer.h b/src/server/shared/Utilities/Timer.h
index 4d3f02f6688..4d3f02f6688 100755..100644
--- a/src/server/shared/Utilities/Timer.h
+++ b/src/server/shared/Utilities/Timer.h
diff --git a/src/server/shared/Utilities/Util.cpp b/src/server/shared/Utilities/Util.cpp
index 407d0704619..407d0704619 100755..100644
--- a/src/server/shared/Utilities/Util.cpp
+++ b/src/server/shared/Utilities/Util.cpp
diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h
index f46fc991cc7..f46fc991cc7 100755..100644
--- a/src/server/shared/Utilities/Util.h
+++ b/src/server/shared/Utilities/Util.h
diff --git a/src/server/worldserver/CMakeLists.txt b/src/server/worldserver/CMakeLists.txt
index 13679cce866..d7c9a4152d1 100644
--- a/src/server/worldserver/CMakeLists.txt
+++ b/src/server/worldserver/CMakeLists.txt
@@ -151,7 +151,6 @@ endif()
add_dependencies(worldserver revision.h)
-
if( UNIX AND NOT NOJEM )
set(worldserver_LINK_FLAGS "-pthread -lncurses ${worldserver_LINK_FLAGS}")
endif()
diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp
index 23eeca11f66..23eeca11f66 100755..100644
--- a/src/server/worldserver/CommandLine/CliRunnable.cpp
+++ b/src/server/worldserver/CommandLine/CliRunnable.cpp
diff --git a/src/server/worldserver/CommandLine/CliRunnable.h b/src/server/worldserver/CommandLine/CliRunnable.h
index af5691367b3..af5691367b3 100755..100644
--- a/src/server/worldserver/CommandLine/CliRunnable.h
+++ b/src/server/worldserver/CommandLine/CliRunnable.h
diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp
index 16fbca2597d..16fbca2597d 100755..100644
--- a/src/server/worldserver/Main.cpp
+++ b/src/server/worldserver/Main.cpp
diff --git a/src/server/worldserver/Master.cpp b/src/server/worldserver/Master.cpp
index 7587a9d1904..7587a9d1904 100755..100644
--- a/src/server/worldserver/Master.cpp
+++ b/src/server/worldserver/Master.cpp
diff --git a/src/server/worldserver/Master.h b/src/server/worldserver/Master.h
index 548cd02c64a..548cd02c64a 100755..100644
--- a/src/server/worldserver/Master.h
+++ b/src/server/worldserver/Master.h
diff --git a/src/server/worldserver/RemoteAccess/RASocket.cpp b/src/server/worldserver/RemoteAccess/RASocket.cpp
index 18c90aa5ba5..18c90aa5ba5 100755..100644
--- a/src/server/worldserver/RemoteAccess/RASocket.cpp
+++ b/src/server/worldserver/RemoteAccess/RASocket.cpp
diff --git a/src/server/worldserver/RemoteAccess/RASocket.h b/src/server/worldserver/RemoteAccess/RASocket.h
index 450245a0ff4..450245a0ff4 100755..100644
--- a/src/server/worldserver/RemoteAccess/RASocket.h
+++ b/src/server/worldserver/RemoteAccess/RASocket.h
diff --git a/src/server/worldserver/TCSoap/TCSoap.cpp b/src/server/worldserver/TCSoap/TCSoap.cpp
index 40b35df9aee..40b35df9aee 100755..100644
--- a/src/server/worldserver/TCSoap/TCSoap.cpp
+++ b/src/server/worldserver/TCSoap/TCSoap.cpp
diff --git a/src/server/worldserver/TCSoap/TCSoap.h b/src/server/worldserver/TCSoap/TCSoap.h
index 51ffb3a91c8..51ffb3a91c8 100755..100644
--- a/src/server/worldserver/TCSoap/TCSoap.h
+++ b/src/server/worldserver/TCSoap/TCSoap.h
diff --git a/src/server/worldserver/WorldThread/WorldRunnable.cpp b/src/server/worldserver/WorldThread/WorldRunnable.cpp
index 42cfaae41ec..42cfaae41ec 100755..100644
--- a/src/server/worldserver/WorldThread/WorldRunnable.cpp
+++ b/src/server/worldserver/WorldThread/WorldRunnable.cpp
diff --git a/src/server/worldserver/WorldThread/WorldRunnable.h b/src/server/worldserver/WorldThread/WorldRunnable.h
index 31ae51f064d..31ae51f064d 100755..100644
--- a/src/server/worldserver/WorldThread/WorldRunnable.h
+++ b/src/server/worldserver/WorldThread/WorldRunnable.h
diff --git a/src/server/worldserver/worldserver.rc b/src/server/worldserver/worldserver.rc
index 2f778e599a1..2f778e599a1 100755..100644
--- a/src/server/worldserver/worldserver.rc
+++ b/src/server/worldserver/worldserver.rc
diff --git a/src/tools/map_extractor/dbcfile.h b/src/tools/map_extractor/dbcfile.h
index aef61df7aaa..6862678a73b 100644
--- a/src/tools/map_extractor/dbcfile.h
+++ b/src/tools/map_extractor/dbcfile.h
@@ -59,8 +59,8 @@ public:
}
private:
Record(DBCFile &file, unsigned char *offset): file(file), offset(offset) {}
- unsigned char *offset;
DBCFile &file;
+ unsigned char *offset;
friend class DBCFile;
friend class DBCFile::Iterator;
diff --git a/src/tools/vmap4_extractor/adtfile.h b/src/tools/vmap4_extractor/adtfile.h
index 08814996f68..3de1dccfacd 100644
--- a/src/tools/vmap4_extractor/adtfile.h
+++ b/src/tools/vmap4_extractor/adtfile.h
@@ -109,6 +109,11 @@ struct MapChunkHeader
class ADTFile
{
+private:
+ //size_t mcnk_offsets[256], mcnk_sizes[256];
+ MPQFile ADT;
+ //mcell Mcell;
+ string Adtfilename;
public:
ADTFile(char* filename);
~ADTFile();
@@ -126,11 +131,6 @@ public:
return Mcell;
}
*/
-private:
- //size_t mcnk_offsets[256], mcnk_sizes[256];
- MPQFile ADT;
- //mcell Mcell;
- string Adtfilename;
};
const char * GetPlainName(const char * FileName);
diff --git a/src/tools/vmap4_extractor/model.h b/src/tools/vmap4_extractor/model.h
index 7dd69212b54..bf15d813ce8 100644
--- a/src/tools/vmap4_extractor/model.h
+++ b/src/tools/vmap4_extractor/model.h
@@ -30,6 +30,15 @@ Vec3D fixCoordSystem(Vec3D v);
class Model
{
+private:
+ void _unload()
+ {
+ delete[] vertices;
+ delete[] indices;
+ vertices = NULL;
+ indices = NULL;
+ }
+ std::string filename;
public:
ModelHeader header;
Vec3D* vertices;
@@ -40,17 +49,6 @@ public:
Model(std::string& filename);
~Model() { _unload(); }
-
-private:
- void _unload()
- {
- delete[] vertices;
- delete[] indices;
- vertices = NULL;
- indices = NULL;
- }
-
- std::string filename;
};
class ModelInstance
@@ -63,7 +61,7 @@ public:
unsigned int d1, scale;
float w, sc;
- ModelInstance() : model(NULL), d1(0), scale(0), w(0.0f), sc(0.0f), id(0) {}
+ ModelInstance() : model(NULL), id(0), d1(0), scale(0), w(0.0f), sc(0.0f) {}
ModelInstance(MPQFile& f, char const* ModelInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE* pDirfile);
};
diff --git a/src/tools/vmap4_extractor/vmapexport.cpp b/src/tools/vmap4_extractor/vmapexport.cpp
index 40a22a2a6e0..186f9c8606e 100644
--- a/src/tools/vmap4_extractor/vmapexport.cpp
+++ b/src/tools/vmap4_extractor/vmapexport.cpp
@@ -470,7 +470,7 @@ int main(int argc, char ** argv)
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// Create the working directory
if (mkdir(szWorkDirWmo
-#ifdef __linux__
+#if defined(__linux__) || defined(__APPLE__)
, 0711
#endif
))
diff --git a/src/tools/vmap4_extractor/wdtfile.cpp b/src/tools/vmap4_extractor/wdtfile.cpp
index a799a928710..7420edfee2e 100644
--- a/src/tools/vmap4_extractor/wdtfile.cpp
+++ b/src/tools/vmap4_extractor/wdtfile.cpp
@@ -35,7 +35,7 @@ WDTFile::WDTFile(char* file_name, char* file_name1) : WDT(file_name), gWmoInstan
filename.append(file_name1,strlen(file_name1));
}
-bool WDTFile::init(char *map_id, unsigned int mapID)
+bool WDTFile::init(char */*map_id*/, unsigned int mapID)
{
if (WDT.isEof())
{
diff --git a/src/tools/vmap4_extractor/wdtfile.h b/src/tools/vmap4_extractor/wdtfile.h
index 2c66dbceb92..5d6aed8f0bc 100644
--- a/src/tools/vmap4_extractor/wdtfile.h
+++ b/src/tools/vmap4_extractor/wdtfile.h
@@ -10,6 +10,9 @@ class ADTFile;
class WDTFile
{
+private:
+ MPQFile WDT;
+ string filename;
public:
WDTFile(char* file_name, char* file_name1);
~WDTFile(void);
@@ -19,10 +22,6 @@ public:
int gnWMO;
ADTFile* GetMap(int x, int z);
-
-private:
- MPQFile WDT;
- string filename;
};
#endif
diff --git a/src/tools/vmap4_extractor/wmo.h b/src/tools/vmap4_extractor/wmo.h
index 74e666d3f82..d0333265851 100644
--- a/src/tools/vmap4_extractor/wmo.h
+++ b/src/tools/vmap4_extractor/wmo.h
@@ -44,9 +44,11 @@ static inline Vec3D fixCoords(const Vec3D &v){ return Vec3D(v.z, v.x, v.y); }
class WMORoot
{
+private:
+ std::string filename;
public:
- uint32 nTextures, nGroups, nP, nLights, nModels, nDoodads, nDoodadSets, RootWMOID, liquidType;
unsigned int col;
+ uint32 nTextures, nGroups, nP, nLights, nModels, nDoodads, nDoodadSets, RootWMOID, liquidType;
float bbcorn1[3];
float bbcorn2[3];
@@ -55,8 +57,6 @@ public:
bool open();
bool ConvertToVMAPRootWmo(FILE* output);
-private:
- std::string filename;
};
struct WMOLiquidHeader
@@ -77,9 +77,22 @@ struct WMOLiquidVert
class WMOGroup
{
+private:
+ std::string filename;
public:
// MOGP
- int groupName, descGroupName, mogpFlags;
+
+ char* MOPY;
+ uint16* MOVI;
+ uint16* MoviEx;
+ float* MOVT;
+ uint16* MOBA;
+ int* MobaEx;
+ WMOLiquidHeader* hlq;
+ WMOLiquidVert* LiquEx;
+ char* LiquBytes;
+ int groupName, descGroupName;
+ int mogpFlags;
float bbcorn1[3];
float bbcorn2[3];
uint16 moprIdx;
@@ -92,15 +105,6 @@ public:
int LiquEx_size;
unsigned int nVertices; // number when loaded
int nTriangles; // number when loaded
- char* MOPY;
- uint16* MOVI;
- uint16* MoviEx;
- float* MOVT;
- uint16* MOBA;
- int* MobaEx;
- WMOLiquidHeader* hlq;
- WMOLiquidVert* LiquEx;
- char* LiquBytes;
uint32 liquflags;
WMOGroup(std::string const& filename);
@@ -108,9 +112,6 @@ public:
bool open();
int ConvertToVMAPGroupWmo(FILE* output, WMORoot* rootWMO, bool preciseVectorData);
-
-private:
- std::string filename;
};
class WMOInstance
@@ -121,10 +122,10 @@ public:
int currx;
int curry;
WMOGroup* wmo;
+ int doodadset;
Vec3D pos;
Vec3D pos2, pos3, rot;
uint32 indx, id, d2, d3;
- int doodadset;
WMOInstance(MPQFile&f , char const* WmoInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE* pDirfile);